Jump to content

Discussion about script actions


Recommended Posts

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:

 

371 ResetMorale(I:Failure*BOOLEAN,I:Level*)

No description yet.

 

372 MoveToCampaign(S:Campaign*)

See post #5.

 

373 AddWorldmapAreaFlag(S:Area*,I:Type*WMPFLAG)

See post #5.

 

374 RemoveWorldmapAreaFlag(S:Area*,I:Type*WMPFLAG)

See post #5.

 

375 SetNoWaitX(I:SetReset*BOOLEAN)

No description yet.

 

376 DisplayStringNoNameDlg(O:Object*,I:StrRef*)

See post #2.

 

377 SetGlobalTimerRandom(S:Name*,S:Area*,I:Min*GTimes,I:Max*GTimes)

See post #5.

 

378 ExportParty(S:Name*)

See post #2.

 

379 TakeCreatureItems(O:Object*,I:Type*TAKEITM)

No description yet.

 

380 TakeObjectGoldGlobal(S:Name*,S:Area*,O:Object*)

No description yet.

 

381 GiveObjectGoldGlobal(S:Name*,S:Area*,O:Object*)

No description yet.

 

382 JoinPartyOverride()

No description yet.

 

384 AddXPWorth(O:Object*)

384 AddXPWorthOnce(O:Object*,I:ClearStat*BOOLEAN)

No description yet.

 

385 XEquipItem(S:Item*,O:Object*,I:Slot*Slots,I:EquipUnEquip*XEQUIP)

No description yet.

 

386 MoveToObjectOffset(O:Target*,P:Offset*)

No description yet.

 

387 SetCutSceneBreakable(I:Breakable*BOOLEAN)

See post #2.

 

388 DisplayStringHeadNoLog(O:Object*,I:StrRef*)

See post #2.

 

389 SetItemFlags(S:ItemName*,I:Flags*INVITEM,I:SetReset*BOOLEAN)

See post #2.

 

390 DisableAI(O:Object*,I:Disable*BOOLEAN)

No description yet.

 

406 ContinueGame(I:State*Boolean)

No description yet.

 

408 DisplayStringPointLog(I:Strref*,P:Location*)

No description yet.

 

409 ResetPlayerAI()

No description yet.

 

410 RandomWalkTime(I:Time*)

No description yet.

 

411 RandomWalkContinuousTime(I:Time*)

No description yet.

 

412 ZoomLock(I:Lock*BOOLEAN)

See post #2.

 

 

The following PSTEE actions are not listed on IESDP yet:

 

413 ForceAttack(O:Object*,O:Target*)

No description yet.

 

414 GenerateModronMaze()

See post #3.

 

415 RandomFace()

No description yet.

 

416 GeneratePartyMember(P:Location,I:Value*Specific)

No description yet.

 

417 SetNamelessDisguise(I:DisguiseNum*Disguise)

No description yet.

 

418 StickySinisterPoof(S:BamResRef*,O:Object*,I:Iterations*)

No description yet.

 

419 SetNamelessClass(I:Value*Class)

No description yet.

 

420 DisableFogDither()

No description yet.

 

421 EnableFogDither()

No description yet.

 

422 DisableSpriteDither()

No description yet.

 

423 EnableSpriteDither()

No description yet.

 

424 Damage(O:Target*,I:Delta*Delta,I:Modifier*Bones)

No description yet.

 

425 FloatMessage(O:Object*,I:StrRef*)

No description yet.

 

426 FloatMessageFixed(P:Location*,I:StrRef*)

No description yet.

 

427 FloatMessageRnd(O:Object*,S:Pool*)

No description yet.

 

428 FloatMessageFixedRnd(P:Location*,S:Pool*)

No description yet.

 

429 KillFloatMessage(O:Object*)

No description yet.

 

430 PermanentStatChange(O:Object*,I:StadID*Stats,I:Delta*Delta,I:Modifier*Bones)

No description yet.

 

431 DestroyPartyItem(S:Object*,I:All*Boolean)

No description yet.

 

432 TransformPartyItem(S:OldObject*,S:NewObject*,I:Charge1*,I:Charge2*,I:Charge3*)

No description yet.

 

433 ForceAIScript(S:ScriptFile*,O:Target*,I:Level*Scrlev)

No description yet.

 

434 QuitGame(I:Value*MovVal,I:Value*MovVal,I:Value*MovVal)

No description yet.

 

435 ExploreMapChunk(P:Center*,I:Radius*,I:Mode*)

No description yet.

 

436 PlaySequenceTimed(I:Anim*Seq,I:Seconds*)

No description yet.

 

437 FloatRebus(O:Target*)

No description yet.

 

438 ChangeDialog(O:Object*,S:ResRef*)

No description yet.

 

439 SetDoorLocked(O:Object*,I:Locked*Boolean)

No description yet.

 

440 ChangeColor(I:Range*ClownRge,I:Color*ClownClr)

No description yet.

 

441 IncrementProficiency(O:Target*,I:SlotNum*WProf,I:Modifier*)

No description yet.

 

442 IncrementExtraProficiency(O:Target*,I:Modifier*)

No description yet.

 

443 ForceFacing(O:Object*,I:Dir*)

No description yet.

 

444 SinisterPoof(S:BamResRef*,P:Location*,I:Itterations*)

No description yet.

 

445 CreateCreatureAtFeet(S:ResRef*)

No description yet.

 

446 IncrementGlobalOnce(S:Name1*,S:Area1*,S:Name2*,S:Area2*,I:Val*)

No description yet.

 

446 IncrementGlobalOnceEx(S:Var1*,S:Var2*,I:Val*)

No description yet.

 

447 TimedMoveToPoint(P:Point*,I:Time*)

No description yet.

 

448 SavePlace()

No description yet.

 

449 ReturnToSavedPlace()

No description yet.

 

450 FullHeal(O:Object*)

No description yet.

 

451 FullHealEx(O:Object*)

No description yet.

 

452 SetNoOneOnTrigger(O:Trigger*)

No description yet.

 

453 SetAnimState(O:Object*,I:Anim*Seq)

No description yet.

 

454 PlaySequence(I:Anim*Seq)

No description yet.

 

455 DestroyItemObject(S:Object*,O:Target*,I:All*Boolean)

No description yet.

 

456 FixEngineRoom()

No description yet.

 

457 PlaySoundNotRanged(S:Sound*)

No description yet.

 

458 DestroyPartyGold(I:Amount*)

No description yet.

 

459 StartCutScenePST(S:CutScene*,I:Value*)

No description yet.

 

460 RunToSavedPlace()

No description yet.

 

461 SetCorpseEnabled(S:Name*,I:State*)

No description yet.

 

462 GiveExperience(O:Object*,I:Amount*)

No description yet.

 

463 SetZoomViewport(P:Point*)

No description yet.

 

464 StoreZoomLevel()

No description yet.

 

465 RestoreZoomLevel()

No description yet.

 

466 ForceSpellRESNoFeedback(S:RES*,O:Target)

No description yet.

 

467 SetRenderable(O:Target*,I:Renderable*Boolean)

No description yet.

 

468 ShowFirstTimeHelp()

No description yet.

 

469 WaitSync(I:Amount*)

No description yet.

 

470 WaitForVoiceChannel()

No description yet.

 

471 PlaySoundThroughVoice(S:Sound*)

No description yet.

 

 

Edited by argent77
Link to comment

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.
Link to comment

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
Link to comment

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.

Link to comment

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.

Link to comment

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.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...