Skip to content

0xD2 — character_script_param_holder

Builds or reads a per-character script param holder: battle-team member lists, free stand positions, or child characters, with the result count/element written to an event value.

proven— handler traced, and exercised by at least one shipped script.

At a glance

Opcode0xD2 (210)
HandlerCRadiScript::Command_d2
SignatureCRadiScript::Command_d2(int,SCR_DATA*,unsigned int,unsigned int)
Translation unitr_script_rund.cpp
Address— debug build; click for all 3
Handler size0x1380 (4992 bytes)
Engine namecharacter_script_param_holder
FamilyPerson, battle and effects
Command size4 + extra_words * 4 bytes

Handler behaviour

Builds or reads a per-character script param holder: battle-team member lists, free stand positions, or child characters, with the result count/element written to an event value.

Encoding

The command header is one 32-bit word, as described in §3 Instruction encoding:

 31            24 23            16 15             8 7              0
+----------------+----------------+----------------+----------------+
|  flags         |  argument byte |  extra words   |  0xD2          |
+----------------+----------------+----------------+----------------+

Bits 8–15 give the number of 32-bit operand words that follow. Bits 16–23 are handed to the handler as a bitfield; on character commands bit 0 normally says whether a character selector word is present. Bit 31 is the keep-going bit.

Operand fields

5 documented fields. input fields are read from the command's operand words; derived fields are computed from other fields rather than stored separately.

FieldRoleMeaning
actioninputWhich action this command performs, read from its mode or control bits.
characterinputThe packed 32-bit character selector word.
selectorinputSub-selector choosing which variant of the behaviour runs.
selector_from_eventinputOperand field selector_from_event.
to_eventinputEvent value id the result is written to.

Engine calls

Engine functions this handler was observed calling:

  • CBackGround::GetStandPosition
  • CCharacter::GetNumberOfChildren
  • CQuaternion::Euler
  • dword_3FB6C0/3FB610/3FB580/3FB400/3FB4B0