0x20 — character_data
Resolves or creates character objects and drives character data loading/releasing through CCharacterManager and CRadiDataCenter modeling/action/animation/algorithm methods.
proven— handler traced, and exercised by at least one shipped script.
At a glance
| Opcode | 0x20 (32) |
|---|---|
| Handler | CRadiScript::Command_20 |
| Signature | CRadiScript::Command_20(int,SCR_DATA*,unsigned int,unsigned int) |
| Translation unit | r_script_run2.cpp |
| Address | — debug build; click for all 3 |
| Handler size | 0x8F0 (2288 bytes) |
| Engine name | character_data |
| Family | Characters |
| Command size | 4 + extra_words * 4 bytes |
Handler behaviour
Resolves or creates character objects and drives character data loading/releasing through CCharacterManager and CRadiDataCenter modeling/action/animation/algorithm methods.
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 | 0x20 |
+----------------+----------------+----------------+----------------+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
6 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 |
|---|---|---|
action | input | Which action this command performs, read from its mode or control bits. Each name is one branch of the handler, so changing it changes what the line does. |
animations | input | Animation slots as slot:word pairs, one per set animation bit in control. |
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. |
mode | input | Which load path runs, from the top two bits of the argument byte. 2 uses the CRadiDataCenter load/release path; other values use the live CCharacterManager path. |
modeling | input | Modeling data word. Low byte is the modeling selector (0xFF is a sentinel that looks the value up from character data +0x77), byte 1 is a second modeling argument, and on the data-center path the signed high half selects load or release. |
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:
CCharacterManager::CreateCharacter(unsigned int,unsigned int)CCharacterManager::GetCharacterClass2(int,unsigned int,const CCharacter*,unsigned int)CCharacterManager::GetEmptyCharaID(unsigned int,unsigned int,unsigned int)CCharacterManager::LoadActionData(CCharacter*,unsigned int,unsigned int)CCharacterManager::LoadAnimationData(CCharacter*,unsigned int,unsigned int,unsigned int)CCharacterManager::LoadModelingData(CCharacter*,unsigned int,unsigned int,unsigned int,bool)CRadiApp::ProcessTaskReady(unsigned int)CRadiDataCenter::LoadAlgorithmDataCRadiDataCenter::LoadCharaActionDataMain(unsigned int,unsigned int,unsigned int,int,unsigned int*)CRadiDataCenter::LoadCharaModelingData(unsigned int,unsigned int,unsigned int,unsigned int)CRadiDataCenter::ReleaseCharaAnimationData(unsigned int,unsigned int,unsigned int)CRadiDataCenter::ReleaseCharaModelingData(unsigned int,unsigned int,unsigned int)CRadiScript::GetAbstractionCharacterNumber(unsigned int&,unsigned int&,const SCR_DATA*)CRadiScript::SetEventValueForScript(int,int,SCR_DATA*)GetAbstractionCharacterNumber(unsigned int&)
Bit masks
Masks the handler applies to its argument byte or operand words:
0xFFFF 0x00FF 0x0001 0x0002 0x03FF 0x0400