Skip to content

0x36 — character_anim_signal

Character animation signal query/update helper. It resolves a character/SSF object and can call CCharacterAnim::GetPlayingAnimationSignal, GetEventValueForScript, and SetEventValueForScript.

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

At a glance

Opcode0x36 (54)
HandlerCRadiScript::Command_36
SignatureCRadiScript::Command_36(int,SCR_DATA*,unsigned int,unsigned int)
Translation unitr_script_run2.cpp
Address— debug build; click for all 3
Handler size0x444 (1092 bytes)
Engine namecharacter_anim_signal
FamilyCharacters
Command size4 + extra_words * 4 bytes

Handler behaviour

Character animation signal query/update helper. It resolves a character/SSF object and can call CCharacterAnim::GetPlayingAnimationSignal, GetEventValueForScript, and SetEventValueForScript.

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   |  0x36          |
+----------------+----------------+----------------+----------------+

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

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

FieldRoleMeaning
characterinputThe packed 32-bit character selector word. Its low half is the character id and byte 2 is a secondary class/variant input; see character_number and character_variant.
event_valueinputScript event-value id that the condition or command reads.
name_sourcederivedSelects where a name operand comes from, such as an inline four-word string.
result_opderivedOperation applied to result.
signal_nameinputName operand for signal.
signal_raw_byte3inputByte 3 of the packed signal raw entry.
signal_selectorinputSelects which signal the handler acts on.

Engine calls

Engine functions this handler was observed calling:

  • CCharacterAnim::GetPlayingAnimationSignal(float,const CHierarchicalObject*) const
  • CCharacterManager::GetCharacterClass2(int,unsigned int,const CCharacter*,unsigned int)
  • CQuaternion::ToEuler() const
  • CRadiScript::GetCharacterID(unsigned int&,unsigned int&,unsigned int*,SCR_DATA*,unsigned int)
  • CRadiScript::GetEventValueForScript(int,const SCR_DATA*)
  • CRadiScript::SetEventValueForScript(int,int,SCR_DATA*)
  • CSsfHandler::SearchName(const char*) const
  • CVector::GetEuler(const CMatrix*)

Bit masks

Masks the handler applies to its argument byte or operand words:

0xFFFF 0x0001 0x0003 0x00FF 0x0041 0x0007