Skip to content

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

Opcode0x55 (85)
HandlerCRadiScript::Command_55
SignatureCRadiScript::Command_55(int,SCR_DATA*,unsigned int,unsigned int)
Translation unitr_script_run5.cpp
Address— debug build; click for all 3
Handler size0x480 (1152 bytes)
Engine namecamera_capture_target
FamilyBackground, map, landscape and camera
Command size4 + 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.

FieldRoleMeaning
capture_controlinputBitmask controlling which optional capture values follow.
capture_ratederivedRate at which capture changes.
capture_rate_wordinputRaw float word behind capture_rate.
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.
enable_capturederivedWhether capture is enabled on this line; unpacked from capture_control.
has_angle_pairderivedWhether angle pair is present on this line.
has_coeff_pairderivedWhether coeff pair is present on this line.
has_position_vecderivedThree-component vector (x, y, z) for has position.
has_posture_vecderivedThree-component vector (x, y, z) for has posture.
position_flagderivedBoolean option controlling position.
postureinputSet when a posture operand is included on this line.
target_modederivedMode selector for target; the handler branches on it.
yieldderivedPause 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