0x32 — character_auto_rate_anim
Resolves a character and drives CCharaAutoRateAnim play/stop methods for color-rate, transparency, scale, palette morph, and visibility animations, including WithChild variants.
proven— handler traced, and exercised by at least one shipped script.
At a glance
| Opcode | 0x32 (50) |
|---|---|
| Handler | CRadiScript::Command_32 |
| Signature | CRadiScript::Command_32(int,SCR_DATA*,unsigned int,unsigned int) |
| Translation unit | r_script_run2.cpp |
| Address | — debug build; click for all 3 |
| Handler size | 0x710 (1808 bytes) |
| Engine name | character_auto_rate_anim |
| Family | Characters |
| Command size | 4 + extra_words * 4 bytes |
Documented forms
This opcode is documented under more than one name, one per branch of the handler. They are the same opcode and the same handler; which branch runs is chosen by the argument byte or a control word.
| Form | Engine name | What it does |
|---|---|---|
animate_character_material | character_auto_rate_anim | Animates a character's material over time: colour, transparency, scale, palette, or visibility. |
character_auto_rate_visual_animation | — | Animates a character's material over time - colour, transparency, scale, palette morph or visibility. No structured form yet, so it takes a raw payload; animate_character_material is the readable form of the same opcode. |
Handler behaviour
Resolves a character and drives CCharaAutoRateAnim play/stop methods for color-rate, transparency, scale, palette morph, and visibility animations, including WithChild variants.
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 | 0x32 |
+----------------+----------------+----------------+----------------+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
34 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 |
|---|---|---|
arg | input | Raw handler argument byte from the command header. It is printed only when it differs from the value the named fields already imply, so seeing it means the command uses an unusual argument encoding. |
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. |
color_end_vec | input | Three-component vector (x, y, z) for color end. |
color_flag2 | input | Enable bit 2 for color. |
color_mode | input | Mode selector for color; the handler branches on it. |
color_rate | derived | Rate at which color changes. |
color_start_vec | input | Three-component vector (x, y, z) for color start. |
duration | input | Human-readable rendering of the command's duration word. Edit the underlying duration_word when it is listed as an input. |
event_duration | derived | Set when the duration is an event value rather than a literal time. |
flags | input | Command header flag byte. Bit 0x80 is the keep-going bit: set (the hidden default), the next command runs in the same frame; clear (printed as yield=1), the script pauses until the next game update. Other bits are rare and stay as an explicit flags= byte. |
mode | input | Handler path selector taken from the argument byte. The meaning is specific to each command. |
option_bits | input | Names of the bits set in the matching packed value. |
palette | derived | Set when the palette is animated by this line; the palette values follow. |
palette_flag7 | input | Enable bit 7 for palette. |
palette_from | input | Start value for palette; the animation runs from here to the matching _to. |
palette_id | input | Identifier selecting which palette to use. |
palette_to | input | End value for palette; the animation runs from the matching _from to here. |
scale | derived | Set when scale is animated by this line; the scale values follow. |
scale_end_vec | input | Three-component vector (x, y, z) for scale end. |
scale_flag4 | input | Enable bit 4 for scale. |
target_child | input | Whether child objects are included with target. |
target_name | input | Name operand for target. |
transparent | derived | Set when transparency is animated by this line; the transparency values follow. |
transparent_flag7 | input | Enable bit 7 for transparent. |
transparent_from | input | Start value for transparent; the animation runs from here to the matching _to. |
transparent_mode | input | Mode selector for transparent; the handler branches on it. |
transparent_to | input | End value for transparent; the animation runs from the matching _from to here. |
visibility | derived | Set when visibility is animated by this line; the visibility values follow. |
visibility_flag2 | input | Enable bit 2 for visibility. |
visibility_from | input | Start value for visibility; the animation runs from here to the matching _to. |
visibility_to | input | End value for visibility; the animation runs from the matching _from to here. |
with_child | input | Whether child objects are included with with. |
words | input | Raw fallback payload, used when a command shape has no named form yet. |
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:
CAutoRateManager (color / transparency / scale / palette / visibility)CCharaAutoRateAnim::PlayColorRateAnim(unsigned int,int,float,const CVector*,const CVector*,const char*)CCharaAutoRateAnim::PlayColorRateAnimWithChild(unsigned int,int,float,const CVector*,const CVector*,const char*)CCharaAutoRateAnim::PlayPaletteMorphAnim(unsigned int,unsigned int,float,float,float,const char*)CCharaAutoRateAnim::PlayPaletteMorphAnimWithChild(unsigned int,unsigned int,float,float,float,const char*)CCharaAutoRateAnim::PlayScaleAnim(unsigned int,float,const CVector*,const CVector*,const char*)CCharaAutoRateAnim::PlayScaleAnimWithChild(unsigned int,float,const CVector*,const CVector*,const char*)CCharaAutoRateAnim::PlayTransparentAnim(unsigned int,int,float,float,float,const char*)CCharaAutoRateAnim::PlayTransparentAnimWithChild(unsigned int,int,float,float,float,const char*)CCharaAutoRateAnim::PlayVisibilityAnim(unsigned int,float,float,float,const char*)CCharaAutoRateAnim::PlayVisibilityAnimWithChild(unsigned int,float,float,float,const char*)CCharacterManager::GetCharacterClass2(int,unsigned int,const CCharacter*,unsigned int)CCharacterManager::GetCharacterSubManager(int)CRadiScript::GetCharacterID(unsigned int&,unsigned int&,unsigned int*,SCR_DATA*,unsigned int)CRadiScript::GetEventValueForScript(int,const SCR_DATA*)
Bit masks
Masks the handler applies to its argument byte or operand words:
0x0001 0x0003 0x0010