0x55 — camera_capture_target
Camera capture target control. It configures CCharacterCapture, position/posture enable bits, offsets, Euler posture, and camera target coefficients.
proven— handler traced, and exercised by at least one shipped script.
At a glance
| Opcode | 0x55 (85) |
|---|---|
| Handler | CRadiScript::Command_55 |
| Signature | CRadiScript::Command_55(int,SCR_DATA*,unsigned int,unsigned int) |
| Translation unit | r_script_run5.cpp |
| Address | — debug build; click for all 3 |
| Handler size | 0x480 (1152 bytes) |
| Engine name | camera_capture_target |
| Family | Background, map, landscape and camera |
| Command size | 4 + extra_words * 4 bytes |
Handler behaviour
Camera capture target control. It configures CCharacterCapture, position/posture enable bits, offsets, Euler posture, and camera target coefficients.
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 | 0x55 |
+----------------+----------------+----------------+----------------+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
13 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 |
|---|---|---|
capture_control | input | Bitmask controlling which optional capture values follow. |
capture_rate | derived | Rate at which capture changes. |
capture_rate_word | input | Raw float word behind capture_rate. |
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. |
enable_capture | derived | Whether capture is enabled on this line; unpacked from capture_control. |
has_angle_pair | derived | Whether angle pair is present on this line. |
has_coeff_pair | derived | Whether coeff pair is present on this line. |
has_position_vec | derived | Three-component vector (x, y, z) for has position. |
has_posture_vec | derived | Three-component vector (x, y, z) for has posture. |
position_flag | derived | Boolean option controlling position. |
posture | input | Set when a posture operand is included on this line. |
target_mode | derived | Mode selector for target; the handler branches on it. |
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:
CCharacterCapture::EnableSetPosition(bool,bool,bool)CCharacterCapture::EnableSetPosture(bool,bool,bool)CCharacterCapture::Initialize()CCharacterCapture::SetPositionOffset(const CVector&,float)CCharacterCapture::SetTargetCharacter(unsigned int,unsigned int,const char*)CQuaternion::Euler(const CVector&)CRadiCameraSystem::SetCameraTargetCoefficient(float,float)CRadiScript::GetAbstractionCharacterNumber(unsigned int&,unsigned int&,const SCR_DATA*)
Bit masks
Masks the handler applies to its argument byte or operand words:
0x0001 0xFFFF 0x00FF 0x0003 0x0002 0x0008 0x0010 0x0020