Jump to content

Discussion about script triggers


Recommended Posts

IESDP does not yet provide descriptions for a number of script triggers. This topic is intended to present and discuss descriptions for new or existing script triggers, so that they can be added to IESDP eventually.

 

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

 

0x0006 ReceivedOrder(O:Object*,I:Order ID*)

See post #7.

 

0x0007 Said(O:Object*,I:Dialog ID*)

No description yet.

 

0x406D UnselectableVariable(I:Num*)

See post #8.

 

0x406E UnselectableVariableGT(I:Num*)

See post #8.

 

0x406F UnselectableVariableLT(I:Num*)

See post #8.

 

0x40B5 RealGlobalTimerExact(S:Name*,S:Area*)

No description yet.

 

0x40C6 G(S:ResRef*,I:Num*)

See post #2.

 

0x40C7 GGT(S:ResRef*,I:Num*)

See post #2.

 

0x40C8 GLT(S:ResRef*,I:Num*)

See post #2.

 

0x40ED INI(S:Name*,I:Number*)

No description yet.

 

0x40F1 ModalStateObject(O:Object*,I:ModalState*Modal)

See post #4.

 

0x40F8 CanEquipRanged()

See post #9.

 

0x40F9 ImmuneToSpellLevel(O:Object*,I:Level*)

See post #9.

 

0x40FB IsForcedRandomEncounterActive(S:Area*)

See post #9.

 

0x4103 CheckItemSlot(O:Object*,S:Item*,I:Slot*SLOTS)

See post #9.

 

0x4104 CurrentAmmo(S:ResRef*,O:Object*)

See post #9.

 

 

The following PSTEE triggers are not listed on IESDP yet:

 

0x40ee Faction(O:Object*,I:Faction*Faction)

No description yet.

 

0x40ef Team(O:Object*,I:Team*Team)

No description yet.

 

0x40f0 IsLocked(O:Object*)

No description yet.

 

0x40f7 BitCheck(S:Name*,S:Area*,I:Bit*Bits)

No description yet.

 

0x40fc PartyScriptsActive()

No description yet.

 

0x0101 WasInDialog()

No description yet.

 

0x4105 TimerActive(I:ID*)

No description yet.

 

0x0106 NamelessBitTheDust()

No description yet.

 

0x4107 NearbyDialog(S:DialogFile*)

No description yet.

 

0x4109 StuffGlobalRandom(S:Name*,S:Scope*,I:Range*)

No description yet.

 

0x0108 FailedToOpen(O:Object*)

No description yet.

 

0x410a Proficiency(O:Object*,I:Slot*WProf,I:Value*)

No description yet.

 

0x410b ProficiencyGT(O:Object*,I:Slot*WProf,I:Value*)

No description yet.

 

0x410c ProficiencyLT(O:Object*,I:Slot*WProf,I:Value*)

No description yet.

 

0x010d NullDialog(O:Object*)

No description yet.

 

0x410d ExtraProficiency(O:Object*,I:Value*)

No description yet.

 

0x410e ExtraProficiencyGT(O:Object*,I:Value*)

No description yet.

 

0x410f ExtraProficiencyLT(O:Object*,I:Value*)

No description yet.

 

0x4110 LastPersonTalkedTo(O:Object*)

No description yet.

 

0x4111 NearSavedLocationPST(I:Range*)

No description yet.

 

0x0112 Vacant()

No description yet.

 

0x0113 HarmlessOpened(O:Object*)

No description yet.

 

0x0114 HarmlessClosed(O:Object*)

No description yet.

 

0x0115 HarmlessEntered(O:Object*)

No description yet.

 

 

Edited by argent77
Link to comment

I used these on occasions in my mods:

 

0x40C6 G(S:ResRef*,I:Num*)
Shorthand for Global

0x40C7 GGT(S:ResRef*,I:Num*)
Shorthand for GlobalGT

0x40C8 GLT(S:ResRef*,I:Num*)
Shorthand for GlobalLt

 

I never saw this one used anywhere

0x40F1 ModalStateObject(O:Object*,I:ModalState*Modal)
No description yet.

 

Only ever used

0x40C9 ModalState(I:State*MODAL)
Returns true only if the active CRE is in the state/mode specified. e.g. detecting traps.

e.g.

IF
ActionListEmpty()
AreaType(DUNGEON)
CombatCounter(0)
!See([ENEMY])
!ModalState(DETECTTRAPS)
OR(2)
!StateCheck(Myself,STATE_INVISIBLE)
!StateCheck(Myself,STATE_IMPROVEDINVISIBILITY)
THEN
RESPONSE #100
FindTraps()
END

Link to comment

This info is based on the GiveOrder() action description and verified by a quick test in BG1EE:

0x0006 ReceivedOrder(O:Object*,I:Order ID*)
This trigger is used in conjunction with the GiveOrder action, and works in a similar way to the Heard trigger. Only one creature at a time responds to an order, and creatures do not detect their own orders. The creature must be in visual range for this trigger to work.

Link to comment

The following triggers appear to be related to the unselectable state from script action MakeUnselectable() or effect opcode 365:

0x406D UnselectableVariable(I:Num*)
Returns true only if the active creature is for exactly the specified number of ticks (1/15th seconds) left under the effect of the script action MakeUnselectable() or opcode 365.
Note: By default in BG2EE creatures stop processing scripts while under effect of the script action MakeUnselectable().

0x406E UnselectableVariableGT(I:Num*)
Returns true only if the active creature is for more than the specified number of ticks (1/15th seconds) left under the effect of the script action MakeUnselectable() or opcode 365.
Note: By default in BG2EE creatures stop processing scripts while under effect of the script action MakeUnselectable().

0x406F UnselectableVariableLT(I:Num*)
Returns true only if the active creature is for less than the specified number of ticks (1/15th seconds) left under the effect of the script action MakeUnselectable() or opcode 365.
Note: By default in BG2EE creatures stop processing scripts while under effect of the script action MakeUnselectable().

Link to comment

0x40F8 CanEquipRanged()

Returns true only if the active creature can switch to a ranged weapon that is ready for use (e.g. a throwing weapon, such as darts, or a launcher with corresponding ammo, such as bow and arrow).

 

0x40F9 ImmuneToSpellLevel(O:Object*,I:Level*)

Returns true if the specified object is immune to spells of the level specified by the 2nd parameter.

 

0x40FB IsForcedRandomEncounterActive(S:Area*)

Returns true only if a random encounter to the specified area has been initialized by a preceding call of ForceRandomEncounter() or ForceRandomEncounterEntry().

 

0x4103 CheckItemSlot(O:Object*,S:Item*,I:Slot*SLOTS)

Returns true only if the item specified in the 2nd parameter can be found in the inventory slot (taken from SLOTS.IDS) of the specified object.

 

0x4104 CurrentAmmo(S:ResRef*,O:Object*)

Returns true only if the specified object has a ranged weapon with the ammo specified by ResRef equipped.

Edited by argent77
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...