0x35 — character_single_manager
Character single-manager helper. It resolves a character, gets a character sub-manager, allocates or clears CSingleManager data, and dispatches several virtual construction/append paths.
proven— handler traced, and exercised by at least one shipped script.
At a glance
| Opcode | 0x35 (53) |
|---|---|
| Handler | CRadiScript::Command_35 |
| Signature | CRadiScript::Command_35(int,SCR_DATA*,unsigned int,unsigned int) |
| Translation unit | r_script_run2.cpp |
| Address | — debug build; click for all 3 |
| Handler size | 0x7B8 (1976 bytes) |
| Engine name | character_single_manager |
| Family | Characters |
| Command size | 4 + extra_words * 4 bytes |
Handler behaviour
Character single-manager helper. It resolves a character, gets a character sub-manager, allocates or clears CSingleManager data, and dispatches several virtual construction/append paths.
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 | 0x35 |
+----------------+----------------+----------------+----------------+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
15 documented fields. input fields are read from the command's operand words; derived fields are computed from other fields rather than stored separately.
| Field | Role | Meaning |
|---|---|---|
character | input | The 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. |
character_number | derived | Low 16 bits of the character selector: the character/actor id. |
character_variant | derived | Byte 2 of the character selector: a secondary character/class input passed alongside the id. |
entry0 | input | Entry 0 of the packed record this command builds. |
entry1 | input | Entry 1 of the packed record this command builds. |
entry1_manager_type | derived | Which kind of entry1 manager this is; the handler branches on it. |
entry3 | input | Entry 3 of the packed record this command builds. |
entry3_manager_type | derived | Which kind of entry3 manager this is; the handler branches on it. |
entry4 | input | Entry 4 of the packed record this command builds. |
entry4_manager_type | derived | Which kind of entry4 manager this is; the handler branches on it. |
manager_flag14_bit0 | input | Argument-byte bit 4, stored as bit 0 of the sub-manager's flag byte (CSingleManager+0x14). No mapped code reads that bit back, so the name says where it is written rather than what it does. |
manager_mode | derived | Mode selector for manager; the handler branches on it. |
mask | input | Which sub-object slots this line sets up: one bit per slot, and each set bit consumes one entry from the stream. Bits 0-4 are the ones scripts use. |
mask_bits | derived | Names of the bits set in the matching packed value. |
yield | derived | Pause the script here for one game frame; the next command runs on the following update. Lines without it keep running immediately. |
Engine calls
Engine functions this handler was observed calling:
CCharacter sub-manager [1]CCharacterManager::GetCharacterClass2(int,unsigned int,const CCharacter*,unsigned int)CCharacterManager::GetCharacterSubManager(int)CRadiScript::GetAbstractionCharacterNumber(unsigned int&,unsigned int&,const SCR_DATA*)CRadiScript::GetCharacterID(unsigned int&,unsigned int&,unsigned int*,SCR_DATA*,unsigned int)CSingleManagerCSingleManager::CSingleManager()CSingleManager::DeleteAllElements()operator new(unsigned int,int,const char*)
Bit masks
Masks the handler applies to its argument byte or operand words:
0x0001 0xFFFF 0x00FF