Jump to content


Photo

Discussion about script actions

actions bgee bg2ee pstee

7 replies to this topic

#1 argent77

argent77
  • Modders
  • 714 posts
  • Gender:Male

Posted 30 September 2017 - 01:49 AM

IESDP does not yet provide descriptions for many script actions introduced by the more recent Enhanced Editions patches. This topic is intended to present and discuss descriptions for new or existing script actions, so that they can be added to IESDP eventually.

The following BG(2)EE actions are still lacking a meaningful description:
Spoiler

The following PSTEE actions are not listed on IESDP yet:
Spoiler

Edited by argent77, 01 October 2017 - 01:11 PM.


#2 argent77

argent77
  • Modders
  • 714 posts
  • Gender:Male

Posted 30 September 2017 - 01:59 AM

I'll start with a first batch of actions.

376 DisplayStringNoNameDlg(O:Object*,I:StrRef*)
This action behaves like DisplayStringNoName, except that it also works in dialogues. It displays the strref specified by the StrRef parameter in the message window, without attributing the text to an object.

 
378 ExportParty(S:Name*)
This action will export all exportable characters of the party into the "Characters" folder of the game. "Name" specifies the prefix for each exported character, which is expanded by the character's party slot number. This action creates both .CHR and .BIO files.

 
387 SetCutSceneBreakable(I:Breakable*BOOLEAN)
This action controls whether a cutscene can be skipped by pressing ESC. When set to TRUE the cutscene can be interrupted. Set it to FALSE to prevent the cutscene from being interrupted. When properly prepared a skipped cutscene can be detected and completed in a safe manner.

Code snippet of the BG2EE opening cutscene (NEWGAME.BCS):

IF
  True()
THEN
  RESPONSE #100
    CutSceneId("CSJon")
    SetAreaScript("cutskip2",OVERRIDE)
    SetGlobal("BD_CUTSCENE_BREAKABLE","GLOBAL",1)
    SetCutSceneBreakable(TRUE)
    CreateCreatureEffect("M05PCSPY","",[3374.3068],S)

    // more script actions...

    SetCutSceneBreakable(FALSE)
    SetGlobal("BD_CUTSCENE_BREAKABLE","GLOBAL",0)
    SetAreaScript("",OVERRIDE)
    ActionOverride("Imoen",EndCutSceneMode())
    ActionOverride("Imoen",Dialogue(Player1))
    DestroySelf()
END

SetAreaScript("cutskip2",OVERRIDE) defines a "failsafe" script to execute when the cutscene has been skipped. The OVERRIDE slot ensures it has precedence over the default area script. SetGlobal("BD_CUTSCENE_BREAKABLE","GLOBAL",1) is used to identify the cutscene that has been interrupted (if the failsafe script handles more than one cutscene).

 
388 DisplayStringHeadNoLog(O:Object*,I:StrRef*)
This action displays the string specified by the StrRef parameter over the head of the given object on the game-screen, but not in the message log.

 
389 SetItemFlags(S:ItemName*,I:Flags*INVITEM,I:SetReset*BOOLEAN)
This action sets or resets specific item flags, such as "IDENTIFIED" or "STOLEN". Setting the third parameter to TRUE sets the bit, setting it to FALSE clears the bit.

Example from Siege of Dragonspear (BDINTRO.BCS):

IF
  Global("SOD_fromimport","GLOBAL",0)
  !HasItemEquiped("ring05",Player1)  // Sandthief's Ring
  InMyArea("safana")  // Safana
THEN
  RESPONSE #100
    CutSceneId(Player1)
    GiveItemCreate("ring05","safana",7,0,0)  // Sandthief's Ring
    ActionOverride("safana",SetItemFlags("ring05",IDENTIFIED,TRUE))  // Sandthief's Ring
    XEquipItem("ring05","safana",SLOT_RING_RIGHT,EQUIP)  // Sandthief's Ring
END

 
412 ZoomLock(I:Lock*BOOLEAN)
This action can be used to set zoom to 100%. When set to TRUE zoom factor is locked at 100% and can not be changed by user input. Setting it to FALSE restores the original zoom factor. The zoom lock state is not saved.



#3 Avenger

Avenger
  • Modders
  • 3710 posts
  • Gender:Male
  • Location:Hungary

Posted 30 September 2017 - 03:28 AM

For missing PSTEE actions, you can copy & paste vanilla PST where available.

Well, some are different, for example:

 

GenerateModronMaze()

This action generates data for the Modron Maze (AR13**). The generated data is held in a separate torment.maze file, which is in the compressed saved game.

 

The maze file is 1856 bytes long. Starts with MAZEV1.0 the rest of the data is the same as the maze structure in vanilla PST. 

.maze resource ID is 0x0804 (though it will never appear in a bif).


Edited by Avenger, 30 September 2017 - 03:42 AM.


#4 argent77

argent77
  • Modders
  • 714 posts
  • Gender:Male

Posted 30 September 2017 - 03:46 AM

Unfortunately the PST section doesn't look much better in this regard. :(



#5 argent77

argent77
  • Modders
  • 714 posts
  • Gender:Male

Posted 01 October 2017 - 01:10 PM

372 MoveToCampaign(S:Campaign*)
This action reinitializes important default values and resource references based on definitions from campaign.2da, such as world scripts, save folder name or starting area. Campaign refers to the name defined in the first column of that table. It is currently used to switch from BGEE to the Siege of Dragonspear campaign.

373 AddWorldmapAreaFlag(S:Area*,I:Type*WMPFLAG)
This action can be used to set flags of an area on the worlmap that control visibility or accessibility. Flags are taken from wmpflag.ids.

374 RemoveWorldmapAreaFlag(S:Area*,I:Type*WMPFLAG)
This action can be used to clear flags of an area on the worlmap that control visibility or accessibility. Flags are taken from wmpflag.ids.

377 SetGlobalTimerRandom(S:Name*,S:Area*,I:Min*GTimes,I:Max*GTimes)
This action sets a global timer to a random value within the range of Min and Max specified by the 3rd and 4th parameter. Both parameters accept symbolic values from gtimes.ids. The timer is checked by the GlobalTimerExpired() and GlobalTimerNotExpired() triggers.



#6 Roxanne

Roxanne
  • Modders
  • 1576 posts
  • Gender:Not Telling

Posted 02 October 2017 - 01:00 AM

372 MoveToCampaign(S:Campaign*)
This action reinitializes important default values and resource references based on definitions from campaign.2da, such as world scripts, save folder name or starting area. Campaign refers to the name defined in the first column of that table. It is currently used to switch from BGEE to the Siege of Dragonspear campaign.

373 AddWorldmapAreaFlag(S:Area*,I:Type*WMPFLAG)
This action can be used to set flags of an area on the worlmap that control visibility or accessibility. Flags are taken from wmpflag.ids.

374 RemoveWorldmapAreaFlag(S:Area*,I:Type*WMPFLAG)
This action can be used to clear flags of an area on the worlmap that control visibility or accessibility. Flags are taken from wmpflag.ids.

377 SetGlobalTimerRandom(S:Name*,S:Area*,I:Min*GTimes,I:Max*GTimes)
This action sets a global timer to a random value within the range of Min and Max specified by the 3rd and 4th parameter. Both parameters accept symbolic values from gtimes.ids. The timer is checked by the GlobalTimerExpired() and GlobalTimerNotExpired() triggers.

With respect to 372

This is used by EET for the transitions between the various campaigns. May be worth to ask K4thos about how he exactly makes use of it or whether the rest of his transition actions are all in scripts etc. See *Modder's Notes* in the docs folder of EET download.


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#7 argent77

argent77
  • Modders
  • 714 posts
  • Gender:Male

Posted 02 October 2017 - 11:58 AM

With respect to 372
This is used by EET for the transitions between the various campaigns. May be worth to ask K4thos about how he exactly makes use of it or whether the rest of his transition actions are all in scripts etc. See *Modder's Notes* in the docs folder of EET download.

 
Yeah, this action looks like a quick way to switch between thematically independent parts of the story. I can imagine the next IWDEE patch will also make use of it for the HoW and TotLM expansions.



#8 lynx

lynx
  • Modders
  • 2990 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 02 October 2017 - 12:32 PM

TotLM likely not, since it starts and ends in HoW and needs no special treatment (old worldmap).


GemRB - IE anywhere.
Mages needed! Looking for Planescape: Torment testers
Market android version IS NOT SUPPORTED ANYMORE: reported bugs will be ignored! Still looking for builders ...



Reply to this topic



  



Also tagged with one or more of these keywords: actions, bgee, bg2ee, pstee

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users