Skip to content

Script bindings: Configuration (Cfg)

Verified against: SLUS_212.15 (NTSC-U, SHA1 e9cb2cc49aa046b9e494313dce2f5038ed17b2f4).

Bindings for the Cfg* tables the config scripts fill: characters, objects, levels, sounds: 117 in all. Conventions, the other categories and how to read an entry are on the masterlist.

Binding Returns Scripts Boot Mission 1 Evidence
CfgActionDistance - 6 yes no confirmed (code)
CfgAnimSpeeds - 1 yes no confirmed (code)
CfgAnnounceMessage - 1 yes no confirmed (code)
CfgAttackDelay - 1 yes no confirmed (code)
CfgAttackFromIdle - 1 yes no confirmed (code)
CfgAutoCloseMode - 0 no no confirmed (code)
CfgAutoCombat - 0 no no inferred
CfgAutoLock - 0 no no inferred
CfgAutoLockAndCombat - 1 yes no confirmed (code)
CfgBaseChanceToBlock - 16 yes no confirmed (code)
CfgBreakAndEnterDelay - 6 yes no confirmed (code)
CfgBreathingSound - 1 yes no confirmed (code)
CfgBurnRates - 1 yes no confirmed (code)
CfgBurnTime - 2 yes no confirmed (code)
CfgButtonHeldFrames - 1 yes no confirmed (code)
CfgButtonMash - 1 yes no confirmed (code)
CfgCanBeAttackedModifier - 1 yes no confirmed (code)
CfgChanceToGetHelp - 7 no no confirmed (code)
CfgChar - 6 yes no confirmed (code)
CfgCharClassAttribs - 1 yes no confirmed (code)
CfgCivilianAggression - 6 yes no confirmed (code)
CfgClimbWithGhetto - 0 no no inferred
CfgCombatTimeout - 0 no no inferred
CfgCombo - 0 no no inferred
CfgCredits - 1 no no confirmed (code)
CfgCrimeMessage - 1 yes no confirmed (code)
CfgCrimeResponders - 10 no no confirmed (code)
CfgDamageEndurance - 0 no no inferred
CfgDisableMusicForScenes - 21 yes no confirmed (code)
CfgDistances - 1 yes no confirmed (code)
CfgEnableCrimeType - 3 no no confirmed (code)
CfgEnableDispatcher - 3 no no confirmed (code)
CfgEnableGrappleCounters - 1 no no confirmed (code)
CfgEnableTurfInvasion - 2 yes no confirmed (code)
CfgExcludedVandalizeZone - 1 no no confirmed (code)
CfgFollowCamera - 13 yes yes confirmed (code)
CfgGang - 1 yes no confirmed (code)
CfgGangMusic - 1 yes no confirmed (code)
CfgGangSizeForCombatMusic - 5 no no confirmed (code)
CfgGearData - 1 yes no confirmed (code)
CfgGrabCounterWithAttack - 0 no no inferred
CfgHat - 1 yes no confirmed (code)
CfgHUDColor - 1 yes no confirmed (code)
CfgHUDMessage - 1 yes no confirmed (code)
CfgHuInventoryCallback - 12 no no confirmed (code)
CfgHuInventoryCallback2 - 0 no no confirmed (code)
CfgInventoryCallback - 9 no yes confirmed (code)
CfgInventoryItem - 2 yes no confirmed (code)
CfgJumpIsAction - 1 yes no confirmed (code)
CfgLanguage - 1 yes no confirmed (code)
CfgLevelName - 1 yes no confirmed (code)
CfgLockOn - 0 no no inferred
CfgMercyStruggleDamage - 1 no no confirmed (code)
CfgMoneyCallback - 6 no no confirmed (code)
CfgMultiplayerJoin - 52 no yes confirmed (code)
CfgObj - 2 yes no confirmed (code)
CfgObjectGroup - 0 no no confirmed (code)
CfgObjectValueMod - 4 no no confirmed (code)
CfgPedInteractDelay - 1 no no confirmed (code)
CfgPickupIsAction - 1 yes no confirmed (code)
CfgPickupIsGrab - 1 yes no confirmed (code)
CfgPlayerCombatWalkOnly - 13 yes no confirmed (code)
CfgPlayerMugging - 9 no yes confirmed (code)
CfgPlayerRunButton - 1 yes no confirmed (code)
CfgPowerClass - 6 yes no confirmed (code)
CfgPowerEndurance - 1 yes no confirmed (code)
CfgPowerupPickup - 5 no no confirmed (code)
CfgQueueGrappleCombos - 0 no no inferred
CfgRageHandlers - 2 yes yes confirmed (code)
CfgRagePoints - 1 yes no confirmed (code)
CfgRagePowerMode - 1 yes no confirmed (code)
CfgRaindrops - 9 no no confirmed (code)
CfgRumbleArena - 1 no no confirmed (code)
CfgRumbleChar - 5 no no confirmed (code)
CfgRumbleGame - 1 no no confirmed (code)
CfgRumbleGang - 1 no no confirmed (code)
CfgScrFx - 1 yes no confirmed (code)
CfgSearchCounts - 1 yes no confirmed (code)
CfgSearchTimes - 1 yes no confirmed (code)
CfgSetCollisionLengths - 0 no no confirmed (code)
CfgSetCrimeCallback - 2 no no confirmed (code)
CfgSetDatabaseSizes - 90 yes yes confirmed (code)
CfgSetDefaultFollowSlotSet - 2 yes yes confirmed (code)
CfgSetEnemySpotting - 24 yes yes confirmed (code)
CfgSetGlassProperties - 1 yes no confirmed (code)
CfgSetGlobalTimeToLive - 2 yes yes confirmed (code)
CfgSetLockPickHandler - 7 no no confirmed (code)
CfgSetLockPickStageFailHandler - 0 no no confirmed (code)
CfgSetMaxThrowError - 1 no no confirmed (code)
CfgSetMeleeRange - 1 yes no confirmed (code)
CfgSetOutdoorMode - 15 yes no confirmed (code)
CfgSetStatTypeMax - 2 yes no confirmed (code)
CfgSetStatValue - 2 yes yes confirmed (code)
CfgSetSteroTheftHandler - 6 no yes confirmed (code)
CfgSetTargetingPoints - 1 yes no confirmed (code)
CfgSetTargetingPointsEx - 1 yes no confirmed (code)
CfgSetTimeScale - 0 no no inferred
CfgSetTurnRates - 1 yes no confirmed (code)
CfgSetWarriorSpotting - 25 yes yes confirmed (code)
CfgSetWarriorVandalize - 1 no no confirmed (code)
CfgSnap - 1 yes no confirmed (code)
CfgSpeedClass - 1 yes no confirmed (code)
CfgSteam - 13 no no confirmed (code)
CfgStickDeflection - 4 yes no confirmed (code)
CfgStrafe - 0 no no inferred
CfgStrafeRStick - 0 no no inferred
CfgSubtitles - 1 yes yes confirmed (code)
CfgTagSettings - 9 no no confirmed (code)
CfgTagStartCallback - 6 yes no confirmed (code)
CfgTurnRate - 1 yes no confirmed (code)
CfgTutorialMessage - 1 yes no confirmed (code)
CfgVerticalSightModifier - 4 yes no confirmed (code)
CfgWarriorClass - 6 yes no confirmed (code)
CfgWarriorCommand - 1 yes no confirmed (code)
CfgWarriorUpgrade - 1 yes no confirmed (code)
CfgWarriorWeapons - 1 no no confirmed (code)
CfgWorkoutParams - 2 yes no confirmed (code)

CfgActionDistance

CfgActionDistance(action, metres)
# Argument Read as Meaning
1 action number, truncated to an unsigned integer Action kind index 0-5 (no range check).
2 metres number (single precision) Distance in metres within which the action prompt is offered; stored squared.

Returns nothing.

Sets the reach of one context action (stored squared at 0x00514878 + action x 4). global.lua sets kinds 0-5 (2, 1.1, 2, 2, 1.75, 1.5 m) and levels widen kind 1.

Notes. The kinds, confirmed (code) at 0x00417ca0: 0 a handcuffed human, 1 an object or flag with its own text, 2 a pickable lock, 3 a car stereo, 4 and 5 objects with their own text (Crimes: context records).

  • Evidence: confirmed (code) at 0x00417af0; detail: traced
  • Wrapper 0x0036c130 (registered by RegisterBindings); calls 0x00417af0 Cfg_SetActionDistance
  • Used by 6 of 467 script chunks (30 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 3 of 28 levels, first level95 (the hub)
  • Coney: implemented

CfgAnimSpeeds

CfgAnimSpeeds(speed1, speed2, speed3, speed4)
# Argument Read as Meaning
1 speed1 number (single precision) First animation playback-rate factor (0.75 in config_preload2.lua), global 0x00510260.
2 speed2 number (single precision) Second factor (0.8), 0x00510264.
3 speed3 number (single precision) Third factor (1), 0x00510268.
4 speed4 number (single precision) Fourth factor (0.9), 0x0051026c.

Returns nothing.

Stores four animation playback-rate factors in globals 0x00510260-0x0051026c, set once by config_preload2.lua.

Notes. Which animations each factor scales is not traced.

  • Evidence: confirmed (code) at 0x002364a0; detail: traced
  • Wrapper 0x0035a510 (registered by RegisterBindings); calls 0x002364a0 Cfg_SetAnimSpeeds
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgAnnounceMessage

CfgAnnounceMessage(id, text)
# Argument Read as Meaning
1 id number, truncated to an integer Announcement string id (ANNOUNCE index).
2 text string The text; copied and its pointer kept at 0x00622e20 + id x 4.

Returns nothing.

Stores one announcer message string by id; config_preload2.lua fills the table from the language file.

  • Evidence: confirmed (code) at 0x001b5c10; detail: traced
  • Wrapper 0x0035e6f0 (registered by RegisterBindings); calls 0x001b5c10 Cfg_SetAnnounceMessage
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: implemented

CfgAttackDelay

CfgAttackDelay(attack, ms)
# Argument Read as Meaning
1 attack number, truncated to an integer Attack or move index 0-44.
2 ms number, truncated to an integer Delay in milliseconds (200 for most; 0 to 1000 for some).

Returns nothing.

Stores one attack's delay in the table at 0x006b6658 (one int per index), set for 44 indices by config_preload2.lua. Only the AI reads it (0x002fa9a8 through 0x00223800): the wait before an AI human attacks, the table value times the attacker's power class +0x1c (+0x20 when the target is down).

Notes. No range check on the index. That the unit is milliseconds is inferred from the values.

  • Evidence: confirmed (code) at 0x00228ca8; detail: traced
  • Wrapper 0x003697f0 (registered by RegisterBindings); calls 0x00228ca8 Cfg_SetAttackDelay
  • Used by 1 of 467 script chunks (44 references); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgAttackFromIdle

CfgAttackFromIdle(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) true lets AI or player attacks start straight from idle; config_preload2.lua sets false.

Returns nothing.

Sets the global combat flag 0x00510270.

Notes. Storage confirmed (code) at 0x002364d8; the combat meaning follows the name.

  • Evidence: confirmed (code) at 0x002364d8; detail: traced
  • Wrapper 0x0035a610 (registered by RegisterBindings); calls 0x002364d8 Cfg_SetAttackFromIdle
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgAutoCloseMode

CfgAutoCloseMode(mode)
# Argument Read as Meaning
1 mode number, truncated to an unsigned integer 0 off; 1 (the default) on while the player holds a lock-on at a fight target (record flags 0x8 and 0x4); 2 or more also while he is in the lock-on movement state.

Returns nothing.

Sets the close (combat) camera mode (0x00510228): while it holds, player 1's follow camera pulls in to 2.4 m, tilts to 15 degrees and keeps his fight target 27 degrees off centre, and shakes are weaker (Camera).

Notes. Read by 0x00233c50 (one player, not riding, with a fight target), used by the follow camera's update and the shake code; 0x0051489c + 0x228 is player 1's handle, not a level object. Never called by the scripts.

  • Evidence: confirmed (code) at 0x00233c40; detail: traced
  • Wrapper 0x0035a188 (registered by RegisterBindings); calls 0x00233c40
  • Used by no script on the disc
  • Coney: not implemented

CfgAutoCombat

CfgAutoCombat(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) Auto-combat flag (global 0x005104b0).

Returns nothing.

Stores the auto-combat flag tested by the player target routine 0x00241b90 after the lock-on and auto-lock flags; never called by the scripts.

Notes. Storage confirmed (code) at 0x0023a5b8.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035def0 (registered by RegisterBindings); calls 0x0023a5b8
  • Used by no script on the disc
  • Coney: not implemented

CfgAutoLock

CfgAutoLock(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) Auto-lock flag (global 0x005104b4).

Returns nothing.

Stores the auto-lock flag tested by 0x00241b90; never called by the scripts.

Notes. Storage confirmed (code) at 0x0023a598.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035df20 (registered by RegisterBindings); calls 0x0023a598
  • Used by no script on the disc
  • Coney: not implemented

CfgAutoLockAndCombat

CfgAutoLockAndCombat(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) true (config_preload2.lua): the player automatically locks onto and fights the nearest enemy.

Returns nothing.

Stores the flag 0x005104b8, one of four targeting modes (lock-on, auto-lock, auto-lock-and-combat, auto-combat) that the player targeting routine 0x00241b90 tests in order.

  • Evidence: confirmed (code) at 0x0023a5a8; detail: traced
  • Wrapper 0x0035df50 (registered by RegisterBindings); calls 0x0023a5a8 Cfg_SetAutoLockAndCombat
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgBaseChanceToBlock

CfgBaseChanceToBlock(percent)
# Argument Read as Meaning
1 percent number, truncated to an unsigned integer Base chance (0-100) that an AI fighter blocks an attack; values above 100 are ignored.

Returns nothing.

Sets the AI's base block chance (0x00510ac8). global.lua sets it from BaseChanceToBlock and the armies levels raise it per gang (0 to 70).

  • Evidence: confirmed (code) at 0x002947f0; detail: traced
  • Wrapper 0x0035e258 (registered by RegisterBindings); calls 0x002947f0 Cfg_SetBaseChanceToBlock
  • Used by 16 of 467 script chunks (18 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 5 of 28 levels, first level60 (Armies of the Night 1)
  • Coney: not implemented

CfgBreakAndEnterDelay

CfgBreakAndEnterDelay(delay)
# Argument Read as Meaning
1 delay number, truncated to an unsigned integer Delay before a break-in is reported (easy 15, normal 10, fury 7).

Returns nothing.

Stores the break-and-enter delay (0x005148a4), set by each difficulty config.

Notes. Unit (seconds) and meaning inferred from the values and name.

  • Evidence: confirmed (code) at 0x0041d910; detail: traced
  • Wrapper 0x0036c0f8 (registered by RegisterBindings); calls 0x0041d910 Cfg_SetBreakAndEnterDelay
  • Used by 6 of 467 script chunks (6 references); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgBreathingSound

CfgBreathingSound(threshold, intervalMs, durationMs, sound)
# Argument Read as Meaning
1 threshold number (single precision) Float stored in the game state at +0x24c (config_preload2.lua passes 1).
2 intervalMs number, truncated to an unsigned integer Milliseconds, stored at game state +0x250 (5000).
3 durationMs number, truncated to an unsigned integer Milliseconds, stored at game state +0x254 (2000).
4 sound string Sound name (a 'vags/...' path); looked up in the sound bank and the resulting id stored at game state +0x258.

Returns nothing.

Configures the angry breathing sound: the sound (resolved by name), two times in milliseconds and a float threshold, all stored in the game state (+0x24c to +0x258).

Notes. The two times are the breathing loop's fade-in and fade-out while the camera frames a fight and after (Breathing_Configure 0x004193e8, Breathing_Update 0x00419150; docs/research/sound.md#warriors-functions), and the threshold is the players' combat sound factor (docs/research/sound-events.md#players).

  • Evidence: confirmed (code) at 0x0041d480; detail: traced
  • Wrapper 0x0035a7c0 (registered by RegisterBindings); calls 0x0041d480 Cfg_SetBreathingSound
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgBurnRates

CfgBurnRates(rate1, rate2, rate3, rate4, rate5)
# Argument Read as Meaning
1 rate1 number, truncated to an unsigned integer Power drained per second while blocking, global 0x005101e4 (0 in config_preload2.lua).
2 rate2 number, truncated to an unsigned integer Power drained per second while grabbing, 0x005101e8 (15).
3 rate3 number, truncated to an unsigned integer Power drained per second while tackling, 0x005101ec (15).
4 rate4 number, truncated to an unsigned integer Power drained per second in a further grab state (inferred: moving with the victim), 0x005101f0 (2).
5 rate5 number, truncated to an unsigned integer Rate for another state, 0x005101f4 (20).

Returns nothing.

Stores five whole-number rates as floats; 0x00223280 picks one of them by the human's current movement state (and returns 0 otherwise).

Notes. The first four are the power meter's drain per second (combat-rage.md#power-meter), confirmed (runtime) for 0, 15 and 15; rate5's state is not traced.

  • Evidence: confirmed (code) at 0x0023a658; detail: traced
  • Wrapper 0x0035dc90 (registered by RegisterBindings); calls 0x0023a658 Cfg_SetBurnRates
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgBurnTime

CfgBurnTime(ms)
# Argument Read as Meaning
1 ms number, truncated to an unsigned integer Duration in milliseconds (global.lua 3000, one level 1500).

Returns nothing.

Sets the duration (0x00510220) that 0x00219238 adds to the game timer to arm a per-human timer (+0x10c of the human's state block), presumably how long a human stays on fire.

Notes. The 'burning' meaning is inferred from the name; the timer use is confirmed (code).

  • Evidence: confirmed (code) at 0x0023a9a0; detail: traced
  • Wrapper 0x0035a6b0 (registered by RegisterBindings); calls 0x0023a9a0 Cfg_SetBurnTime
  • Used by 2 of 467 script chunks (2 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level86 (mission 9)
  • Coney: not implemented

CfgButtonHeldFrames

CfgButtonHeldFrames(frames)
# Argument Read as Meaning
1 frames number, truncated to an unsigned integer How many consecutive input frames a button must be down to count as held; clamped to 2-7 (config_preload2.lua sets 7).

Returns nothing.

Sets the hold length (0x0050b708) used by the pad 'button held' test (0x00144e50), which ANDs that many entries of the pad's 8-frame button history.

  • Evidence: confirmed (code) at 0x00236420; detail: traced
  • Wrapper 0x0035a5d8 (registered by RegisterBindings); calls 0x00236420 Cfg_SetButtonHeldFrames
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgButtonMash

CfgButtonMash(decay, pressGain, target)
# Argument Read as Meaning
1 decay number, truncated to an integer Integer at 0x005102bc (15 in config_preload2.lua): what the mash meter loses each update, 0x0027e6d8.
2 pressGain number, truncated to an integer Integer at 0x005102c0 (250): halved, then scaled by 1.5 or 0.7 by the Warrior class, it is what one alternating press adds, 0x0027e6d8.
3 target number, truncated to an integer Integer at 0x005102b8: the meter total that completes the mash (1000); 0x00255f08 compares a counter with it and draws the fraction.

Returns nothing.

Configures the button mash of mini-game mode 1, freeing a handcuffed partner without a key (alternate L1 and R1): the value the mash meter must reach and two tuning integers; the stereo theft and mode 4 start their meter at twice the gain. The grabbed player's struggle does not use it (Crimes).

Notes. The target's use is confirmed (code); the decay and the press gain are confirmed (code) at 0x0027e6d8, mode 1 (L1 and R1 held alternately).

  • Evidence: confirmed (code) at 0x0023a560; detail: traced
  • Wrapper 0x0035ddf0 (registered by RegisterBindings); calls 0x0023a560 Cfg_SetButtonMash
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgCanBeAttackedModifier

CfgCanBeAttackedModifier(factor)
# Argument Read as Meaning
1 factor number (single precision) Float modifier (config_preload2.lua sets 1).

Returns nothing.

Stores an AI modifier (0x00510ad0) for how readily a human can be attacked.

Notes. Meaning from the name; readers not traced.

  • Evidence: confirmed (code) at 0x00294818; detail: traced
  • Wrapper 0x0035e2c8 (registered by RegisterBindings); calls 0x00294818 Cfg_SetCanBeAttackedModifier
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgChanceToGetHelp

CfgChanceToGetHelp(percent)
# Argument Read as Meaning
1 percent number, truncated to an unsigned integer Chance 0-100 that a civilian who sees an attack calls for help; values above 100 become 100.

Returns nothing.

Sets the global call-for-help chance (byte 0x00510adf). When a civilian within 15 m of an attacker sees a civilian, gang member or dealer being attacked, it rolls this chance; on success it goes to report the crime (goal 0x002a7d58), or calls a gang (Goal_CallGang) when no police gang exists. An attack on a cop is always reported (100%); an attack on a Warrior or the player never is, and a civilian that does not report reacts with the ped-reaction goal (107) instead.

Notes. Reader: CivilianBrain_OnEvent event 0x14 (0x002ffb30). No report while the attacker's gang noted a crime in the last 40 s (gang +0x5f4) or while the crime kind is switched off (W_GameState + 0x294 + kind); the report kinds 0, 2 and 8 are not traced further.

  • Evidence: confirmed (code) at 0x00294888; detail: traced
  • Wrapper 0x0035e958 (registered by RegisterBindings); calls 0x00294888 Cfg_SetChanceToGetHelp
  • Used by 7 of 467 script chunks (7 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 5 of 28 levels, first level34 (mission 4)
  • Coney: implemented

CfgChar

CfgChar(charType, v2, v3, speedClass, v5, v6, damage, attacks, damageScale, model, str11, warrior, v13, ranges, str15, v16, str17)
# Argument Read as Meaning
1 charType number, truncated to an integer Character type id (the number HuCreate takes); record at 0x00684620 + charType x 0x1ac (Characters).
2 v2 number, truncated to an integer Byte at +0x11a (3 for the Warriors).
3 v3 number, truncated to an integer Byte at +0x11b: the category (14 for the Warriors), which also picks the CfgCharClassAttribs record for the starting money.
4 speedClass number, truncated to an integer Speed class (see CfgSpeedClass), byte at +0x11c.
5 v5 number, truncated to an integer Byte at +0x11d: the power class an AI human of the type gets (human +0x1b8; a player's +0x1b9 unless a Warriors type gets its Warrior's, 0x00218008).
6 v6 number, truncated to an integer 16-bit value at +0x116 (1800: probably hit points).
7 damage table of 45 numbers (t[1]..t[45]) Table of 45 numbers (a damage table such as DamageWarriors), each multiplied by damageScale and stored as 16 bits from +0xb8.
8 attacks table of 45 numbers (t[1]..t[45]) Table of 45 numbers (an attack table such as Att_Warrior), stored as bytes from +0x11e.
9 damageScale number (single precision) Multiplier applied to the damage table (1).
10 model string Model name (e.g. 'warr_re_cv'); its model index goes to +0x112 and that of '_a' (the armies variant) to +0x114.
11 str11 string String (31 characters) at +0x14c ('none' for most).
12 warrior number, truncated to an integer 16-bit value at +0x118: the voice set, the folder number of vags/character/voices// (Human_Init 0x00218008 copies it to human +0x3b0; type 259 instead draws 120-125). Rembrandt 7. Confirmed (code).
13 v13 number, truncated to an integer Byte at +0x14b.
14 ranges table of 45 numbers (t[1]..t[45]) Table of 45 numbers (a range table such as RangeNormal), divided by 100 and stored as floats from +0x00: per attack kind, the far range in metres of that kind's anim ids (Human_AttachInstance 0x00217a98; 0 leaves the anims' own; Characters#classes).
15 str15 string String (31 characters) at +0x16c: the object a human of the type may carry, a grp_ object group to pick one from, or none (Crimes: starting money).
16 v16 number, truncated to an integer Integer at +0xb4: -1 gives the class money range; otherwise the carried object's drop chance (+0x278) and a cap on the starting money (0 or 5 in some calls).
17 str17 string String (31 characters) at +0x18c: the weapon, an object type the human holds from creation (Human_PlaceItemInHand 0x0024c280 from Human_Init); none for no weapon (dyn_baton for the police).

Returns nothing.

Fills one character class: speed class, health-like values, the 45-entry damage, attack and range tables, the model (and its armies variant) and three strings. The difficulty configs call it for every character type.

Notes. Layout confirmed (code) at 0x00228af8; argument meanings beyond speed class, model and the tables are inferred from the values.

  • Evidence: confirmed (code) at 0x00228af8; detail: traced
  • Wrapper 0x00383f38 (registered by the script system); calls 0x00228af8 Cfg_SetCharacterClass
  • Used by 6 of 467 script chunks (764 references); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgCharClassAttribs

CfgCharClassAttribs(classId, a, b, chance, c, d, e)
# Argument Read as Meaning
1 classId number, truncated to an integer Character class index (1-12 in config_preload2.lua); selects a 16-byte record at game state + classId x 16.
2 a number, truncated to an integer Byte +0x08: the least money a human of the class starts with, dollars (1-10 in the scripts).
3 b number, truncated to an integer Byte +0x09: the most money, dollars (4-20).
4 chance number (single precision) Fraction 0-1 stored as a float at record +0x0c (0.1-0.25); not read by the creation code.
5 c number, truncated to an integer Byte +0x10: the percent chance of carrying no object (0, 20 or 100); a roll of 0-100 at or below it gives none.
6 d number, truncated to an integer Byte +0x11: the percent chance of the money bonus (0 or 1); a second roll of 0-100 at or below it multiplies the money.
7 e number (single precision) Float +0x14: the money bonus multiplier (1 or 5).

Returns nothing.

Fills one character-class attribute record in the game state (W_GameState + classId x 16, fields +0x08 to +0x14) with the money a human of that class starts with and whether it carries an object. config_preload2.lua sets classes 1 to 12. The class is the CfgChar category byte (+0x11b); Human_Init (0x00218008) reads the record when a human is created (Crimes: starting money).

Notes. Layout confirmed (code) at 0x0041d428; the reader at 0x002187e4-0x00218a90. The values of classes 1-12 were read at runtime (confirmed (runtime)); the float at +0x0c has no reader found.

  • Evidence: confirmed (code) at 0x0041d428; detail: traced
  • Wrapper 0x0035a330 (registered by RegisterBindings); calls 0x0041d428 Cfg_SetCharClassAttribs
  • Used by 1 of 467 script chunks (16 references); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgCivilianAggression

CfgCivilianAggression(percentA, percentB)
# Argument Read as Meaning
1 percentA number, truncated to an unsigned integer Percentage 0-100 stored as a byte at 0x00510ad8 (20 by default; levels use 0, 25, 100).
2 percentB number, truncated to an unsigned integer Percentage 0-100 stored at 0x00510ad9 (20 by default).

Returns nothing.

Sets two civilian aggression percentages (how likely civilians fight back), stored as bytes.

Notes. Which situation each percentage covers is not traced.

  • Evidence: confirmed (code) at 0x00294828; detail: traced
  • Wrapper 0x0035e300 (registered by RegisterBindings); calls 0x00294828 Cfg_SetCivilianAggression
  • Used by 6 of 467 script chunks (11 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 3 of 28 levels, first level87 (mission 3)
  • Coney: implemented

CfgClimbWithGhetto

CfgClimbWithGhetto(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) true lets climbing be started with the 'ghetto' (context) control; false turns that path off. Stored as a global flag.

Returns nothing.

Sets a global player-control flag (0x00510250) that one combat/locomotion routine (0x00281c20) tests before taking its climb branch. No script calls it.

Notes. Storage confirmed (code) at 0x00235f10; what the flag means in play is inferred from the name and the single reader.

  • Evidence: inferred; detail: brief
  • Wrapper 0x00359d28 (registered by RegisterBindings); calls 0x00235f10
  • Used by no script on the disc
  • Coney: not implemented

CfgCombatTimeout

CfgCombatTimeout(seconds)
# Argument Read as Meaning
1 seconds number (single precision) Combat timeout (float, global 0x00510994).

Returns nothing.

Stores how long combat mode lasts without a fight; never called by the scripts.

Notes. Storage confirmed (code) at 0x0023a5d8; unit not traced.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035dfb0 (registered by RegisterBindings); calls 0x0023a5d8
  • Used by no script on the disc
  • Coney: not implemented

CfgCombo

CfgCombo(mode)
# Argument Read as Meaning
1 mode number, truncated to an unsigned integer Combo setting stored in global 0x005102b0.

Returns nothing.

Stores a combo setting; never called by the scripts.

Notes. Storage confirmed (code) at 0x0023a540.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035ddb8 (registered by RegisterBindings); calls 0x0023a540
  • Used by no script on the disc
  • Coney: not implemented

CfgCredits

CfgCredits(style, role, name)
# Argument Read as Meaning
1 style number, truncated to an unsigned integer Line style (4 is treated as 2).
2 role string First text (a heading or role).
3 name string Second text (a person's name), or nil.

Returns nothing.

Adds one line to the credits list (a CreditData record, texts interned in the credits string pool); credits.lua makes 578 calls.

  • Evidence: confirmed (code) at 0x001a8fb8; detail: brief
  • Wrapper 0x0036ee48 (registered by RegisterBindings); calls 0x001a8fb8
  • Used by 1 of 467 script chunks (578 references); boot to menu: no; mission 1: no; result used: no
  • Coney: implemented

CfgCrimeMessage

CfgCrimeMessage(id, text)
# Argument Read as Meaning
1 id number, truncated to an integer Crime string id (CRIME index).
2 text string The text; copied and its pointer kept at 0x006007f8 + id x 4.

Returns nothing.

Stores one crime-message string by id: the text is copied (0x003864e0) and the copy's pointer kept in the table at 0x006007f8 + id x 4, which the HUD reads when a crime is reported. config_preload2.lua fills the table in a loop over its CRIME strings.

Notes. No range check on the id. The scripts call it inside a for loop, which an earlier call-site survey missed; the reference counts are by name reference.

  • Evidence: confirmed (code) at 0x0041d9c8; detail: traced
  • Wrapper 0x0035e690 (registered by RegisterBindings); calls 0x0041d9c8
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: implemented

CfgCrimeResponders

CfgCrimeResponders(crime, count)
# Argument Read as Meaning
1 crime number, truncated to an unsigned integer Crime type, used as a byte index.
2 count number, truncated to an unsigned integer Number of responders (police) queued for that crime, stored as a byte (0-2 in the scripts).

Returns nothing.

Sets how many responders a crime type draws: the byte at game state +0x294 + crime. When that crime is reported with responders, this many are queued on the nearest spawner in a responding state (custom crimes, type 4, use the report's own count instead); see AI: crimes. The difficulty configs and some levels set it.

Notes. No range check: a crime index past 14 writes into the next game-state fields. Types 6, 7, 10, 12 and 14 never send responders whatever is set.

  • Evidence: confirmed (code) at 0x0041d8a0, 0x0041b8a0; detail: traced
  • Wrapper 0x0036be50 (registered by RegisterBindings); calls 0x0041d8a0 Cfg_SetCrimeResponders, 0x0041b8a0
  • Used by 10 of 467 script chunks (37 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 5 of 28 levels, first level87 (mission 3)
  • Coney: implemented

CfgDamageEndurance

CfgDamageEndurance(factor)
# Argument Read as Meaning
1 factor number (single precision) Damage endurance factor (float).

Returns nothing.

Stores a global float (0x00510274), presumably how much damage resistance a human has; never called by the scripts.

Notes. Storage confirmed (code) at 0x002364e8.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035a640 (registered by RegisterBindings); calls 0x002364e8
  • Used by no script on the disc
  • Coney: not implemented

CfgDisableMusicForScenes

CfgDisableMusicForScenes(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) true: music is stopped while a cutscene plays (global.lua sets true); false or nil leaves it playing.

Returns nothing.

Sets the global flag 0x005148ac that tells the scene code to silence the level music during cutscenes.

Notes. Storage confirmed (code) at 0x0041d930; the scene behaviour follows the name (readers not traced).

  • Evidence: confirmed (code) at 0x0041d930; detail: traced
  • Wrapper 0x0035e530 (registered by RegisterBindings); calls 0x0041d930 Cfg_SetDisableMusicForScenes
  • Used by 21 of 467 script chunks (35 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 13 of 28 levels, first level80 (mission 2)
  • Coney: implemented

CfgDistances

CfgDistances(near, mid, far)
# Argument Read as Meaning
1 near number (single precision) Distance in metres (2 in config_preload2.lua); stored squared at 0x005104bc.
2 mid number (single precision) Distance in metres (2.5); stored squared at 0x005104c0.
3 far number (single precision) Distance in metres (3); stored squared at 0x005104c4.

Returns nothing.

Stores three combat distances, squared, which the player combat routine 0x0027ce90 compares against squared distances to the target.

  • Evidence: confirmed (code) at 0x0023a630; detail: traced
  • Wrapper 0x0035e0a0 (registered by RegisterBindings); calls 0x0023a630 Cfg_SetCombatDistances
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgEnableCrimeType

CfgEnableCrimeType(crime, enabled)
# Argument Read as Meaning
1 crime number, truncated to an integer Crime type 0-14; anything else (also a negative number) is ignored.
2 enabled boolean (nil or 0 is false) true enables the crime type; false (or nil) disables it.

Returns nothing.

Enables or disables one crime type: a byte at game state +0x32b + crime. Only type 12 (trespassing) is read back, by the police brain (0x00300910, 0x00301770), so in practice this switches whether cops act on trespassing (AI: crimes).

Notes. Disabling another type has no effect: crime reports do not check the byte; what the police brain does differently for type 12 is not traced here.

  • Evidence: confirmed (code) at 0x0041da80, 0x0041d0d0; detail: traced
  • Wrapper 0x0036bec8 (registered by RegisterBindings); calls 0x0041da80 Cfg_EnableCrimeType, 0x0041d0d0 GameState_SetCrimeTypeEnabled
  • Used by 3 of 467 script chunks (3 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 2 of 28 levels, first level95 (the hub)
  • Coney: implemented

CfgEnableDispatcher

CfgEnableDispatcher(enabled, voice)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false); default true true (the default) turns the police radio dispatcher on; false off (game state +0x32a).
2 voice number, truncated to an integer; default -1 Voice id of the dispatcher (game state +0x328, 16-bit); -1 (the default) means voice 125.

Returns nothing.

Turns the police radio dispatcher on or off and picks its voice. When a cop says a line that has a radio code (Human_SayCopLine, 0x0021ed28) and the dispatcher is on, the dispatcher's reply in that voice is queued on the cop (human +0x184); the dispatcher voice also builds the cops' radio-code file names (0x00233890, 0x002af670) and the reply itself (0x0021ede0). The game state's reset (0x00418c68) turns it on with voice 125.

Notes. Turning it off only stops the queued replies; the cop's own lines still play. How the queued reply at +0x184 is later played was not traced.

  • Evidence: confirmed (code) at 0x0041d8e0; detail: traced
  • Wrapper 0x0035e418 (registered by RegisterBindings); calls 0x0041d8e0 GameState_EnableDispatcher
  • Used by 3 of 467 script chunks (3 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level9 (mission 13)
  • Coney: not implemented

CfgEnableGrappleCounters

CfgEnableGrappleCounters(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false); default true true (the default) lets every AI human counter grabs and tackles; false limits counters to the AI kinds that always may.

Returns nothing.

Sets the grapple-counter switch (byte at game state +0x56e3). While it is set, any AI with a counter chance above 0 may answer a grab or tackle with a counter move; while it is 0, only a human with brain type 3 or a class whose +0x11b is 13 can (AI). Strikes are never countered this way.

Notes. Reader: the counter tests on ai.md (0x00223e20). Which humans brain type 3 and class +0x11b 13 are is open. The byte's value before any call is not traced.

  • Evidence: confirmed (code) at 0x0041da60; detail: traced
  • Wrapper 0x0036c1d8 (registered by RegisterBindings); calls 0x0041da60 Cfg_SetGrappleCounters
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level87 (mission 3)
  • Coney: implemented

CfgEnableTurfInvasion

CfgEnableTurfInvasion(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false); default true true (the default) lets rival gangs invade turf; global.lua sets false.

Returns nothing.

Stores the turf-invasion switch (byte at game state +0x56e1).

  • Evidence: confirmed (code) at 0x0041da50; detail: traced
  • Wrapper 0x0036c1a8 (registered by RegisterBindings); calls 0x0041da50 Cfg_SetTurfInvasion
  • Used by 2 of 467 script chunks (3 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level95 (the hub)
  • Coney: implemented

CfgExcludedVandalizeZone

CfgExcludedVandalizeZone(zone)
# Argument Read as Meaning
1 zone number, truncated to an integer; default -1 Object zone number (Object zones) whose objects may not be vandalised; -1 (the default) for none.

Returns nothing.

Stores a 16-bit object zone (0x005148bc) excluded from vandalism. The vandalisable-object test (0x00394f30, used by the AI's object searches 0x0029d4f8 and 0x0029d558) refuses any object whose zone (object +0x114) is this one, so characters looking for things to smash leave that zone's objects alone. The level reset (0x00418c68) sets it back to -1.

Notes. Only one zone can be excluded at a time. Which AI behaviours call the two searches was not traced.

  • Evidence: confirmed (code) at 0x0041d978; detail: traced
  • Wrapper 0x0035e598 (registered by RegisterBindings); calls 0x0041d978 Cfg_SetExcludedVandalizeZone
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level55 (mission 17)
  • Coney: not implemented

CfgFollowCamera

CfgFollowCamera(minDist, maxDist, defaultDist, pitchDeg, fov, nearPlane, offset, slowmo)
# Argument Read as Meaning
1 minDist number (single precision) Minimum follow distance in metres (global.lua: 3).
2 maxDist number (single precision) Maximum follow distance in metres (6.6).
3 defaultDist number (single precision) Default distance in metres (4.8).
4 pitchDeg number (single precision) Pitch in degrees (13), stored in radians.
5 fov number (single precision) Field of view in degrees (65).
6 nearPlane number (single precision) Near clip plane in metres (0.1).
7 offset table of 3 numbers (t[1]..t[3]) Look-at offset {x, y, z} in metres from the target's feet ({0, 0, 1.4}).
8 slowmo number (single precision) Global slow-motion factor (0.2), stored at 0x005148a0: the characters' step becomes factor / 30 s while an animation's slow-motion event runs.

Returns nothing.

Configures player 1's follow camera: distance limits and default, pitch (reached at once), field of view (eased over 1 s), near plane, look-at offset and the slow-motion factor; then, with one player camera, moves the band to the minimum distance as CamSetFollowZoom(0) does (Camera). Usually called through global.lua's CameraCreateFollow and CameraNormal.

  • Evidence: confirmed (code) at 0x0011c0b8; detail: traced
  • Wrapper 0x0036ab88 (registered by RegisterBindings); calls 0x0011c0b8 Cam_ConfigureFollow
  • Used by 13 of 467 script chunks (28 references); boot to menu: yes; mission 1: yes; result used: no
  • Later in the story: 28 of 28 levels, first level80 (mission 2)
  • Coney: implemented

CfgGang

CfgGang(gang, v2, v3, v4, v5, strategy, v7, v8, v9)
# Argument Read as Meaning
1 gang number, truncated to an unsigned integer Gang id (0-24).
2 v2 number, truncated to an unsigned integer Byte at gang record +0x6c.
3 v3 number, truncated to an unsigned integer Byte at +0x6d.
4 v4 number, truncated to an unsigned integer Byte at +0x6e.
5 v5 number, truncated to an unsigned integer Byte at +0x6f.
6 strategy table of 7 numbers (t[1]..t[7]) Table of seven numbers (a strategy table such as StratNormal), stored as bytes from +0x73.
7 v7 number, truncated to an unsigned integer Byte at +0x70.
8 v8 number, truncated to an unsigned integer Byte at +0x71.
9 v9 number, truncated to an unsigned integer Byte at +0x72 (0 or 50).

Returns nothing.

Fills one gang's configuration record (0x0050caa8, 0x7a bytes per gang): six small values and its seven-entry fighting strategy. config_preload2.lua sets every gang.

Notes. Field meanings (group sizes, aggression) are not traced.

  • Evidence: confirmed (code) at 0x0016b178; detail: traced
  • Wrapper 0x00384480 (registered by the script system); calls 0x0016b178 Cfg_SetGang
  • Used by 1 of 467 script chunks (25 references); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgGangMusic

CfgGangMusic(gang, tracks)
# Argument Read as Meaning
1 gang number, truncated to an unsigned integer Gang id (0-23 in config_preload2.lua).
2 tracks table of 3 strings (t[1]..t[3]) Table of three music track names (stream paths like 'music/...'), each up to 35 characters.

Returns nothing.

Sets the three music tracks played when fighting a gang, stored in the gang configuration table (0x0050caa8, 0x7a bytes per gang).

Notes. When each of the three tracks is chosen is not traced.

  • Evidence: confirmed (code) at 0x0016b108; detail: traced
  • Wrapper 0x0036a728 (registered by RegisterBindings); calls 0x0016b108 Cfg_SetGangMusic
  • Used by 1 of 467 script chunks (24 references); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgGangSizeForCombatMusic

CfgGangSizeForCombatMusic(count)
# Argument Read as Meaning
1 count number, truncated to an integer Members the nearest rival gang must have before its being near the player's crew can start the combat state (levels use 1-3).

Returns nothing.

Stores a gang-size threshold (0x005148a8) read by the game state's music-state update (0x0041a060): when the nearest rival gang to the player's gang is close (within both gangs' radii plus 30 m) and has at least count members, a crew member seeing one of them switches the state (game state +0x40c) to 1, inferred to be combat music. A smaller gang nearby leaves the music calm unless it is already fighting the crew.

Notes. The only reader is 0x0041a060. That state 1 means combat music, and that 0x00222288 is a sight test, are inferred; a rival gang already fighting a crew member (goal 0xc) gives state 1 without the threshold. The global's value before any call is not traced.

  • Evidence: confirmed (code) at 0x0041d920; detail: traced
  • Wrapper 0x0035e4f8 (registered by RegisterBindings); calls 0x0041d920 Cfg_SetGangSizeForCombatMusic
  • Used by 5 of 467 script chunks (5 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 3 of 28 levels, first level87 (mission 3)
  • Coney: implemented

CfgGearData

CfgGearData(pos1, rot1, pos2, rot2, pos3, rot3, pos4, rot4)
# Argument Read as Meaning
1 pos1 table of 3 numbers (t[1]..t[3]) Ignored: overwritten with a built-in offset {x, y, z} (metres) and written back into the table.
2 rot1 table of 4 numbers (t[1]..t[4]) Ignored: overwritten with a built-in rotation quaternion {i, j, k, r} and written back.
3 pos2 table of 3 numbers (t[1]..t[3]) Ignored: overwritten with a built-in offset and written back.
4 rot2 table of 4 numbers (t[1]..t[4]) Ignored: overwritten with a built-in quaternion and written back.
5 pos3 table of 3 numbers (t[1]..t[3]) Third attachment offset {x, y, z} in metres, relative to the attach bone.
6 rot3 table of 4 numbers (t[1]..t[4]) Third attachment rotation as a quaternion {i, j, k, r}.
7 pos4 table of 3 numbers (t[1]..t[3]) Fourth attachment offset {x, y, z} in metres.
8 rot4 table of 4 numbers (t[1]..t[4]) Fourth attachment rotation as a quaternion {i, j, k, r}.

Returns nothing.

Stores four attachment transforms (offset and rotation pairs) for carried gear in a global table at 0x00715480 (0x20 bytes each), read by one character routine (0x0024cef0). The first two pairs are replaced by constants compiled into the game before being stored, so only the last two pairs take effect.

Notes. The constants overwrite the caller's tables in place (the wrapper writes all eight tables back), so a script reading pos1..rot2 afterwards sees the built-in values. What the four 'gear' slots attach (hands, back) is not traced.

  • Evidence: confirmed (code) at 0x002361e8; detail: traced
  • Wrapper 0x00359d58 (registered by RegisterBindings); calls 0x002361e8 Cfg_SetGearData
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgGrabCounterWithAttack

CfgGrabCounterWithAttack(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) true makes the attack button counter (break) a grab; false uses the default control.

Returns nothing.

Sets a global combat flag (0x00510254) that the grab-counter routines (0x00270560, 0x0026c1d8) test to choose which button breaks a grab. Never called by the scripts.

Notes. Storage confirmed (code) at 0x00236450.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035a1c0 (registered by RegisterBindings); calls 0x00236450
  • Used by no script on the disc
  • Coney: not implemented

CfgHat

CfgHat(set, owner, hat, pos, rot)
# Argument Read as Meaning
1 set number, truncated to an integer Hat-fit set index (1-48): selects a 0xa90-byte record at 0x00662b70 + set x 0xa90, one per head shape.
2 owner number, truncated to an integer The character type the set belongs to (record +0xa80): a Warriors human finds its hat by the type it was created as, else by its class (0x003a3ba0).
3 hat string Hat object name (as given to CfgObj, e.g. a 'dyn_' name); put into the first free slot of the set's 48 name slots.
4 pos table of 3 numbers (t[1]..t[3]) Offset {x, y, z} in metres of the hat relative to the head.
5 rot table of 4 numbers (t[1]..t[4]) Rotation quaternion {i, j, k, r} of the hat.

Returns nothing.

Adds one hat fitting to a hat-fit set: the hat's name goes into the first slot still named 'none' and its offset and rotation into the matching transform. config_preload2.lua makes 908 such calls (41 hats per set).

Notes. A set holds at most 48 hats; when all slots are used the slot index is -1 and the write lands before the record (no check).

  • Evidence: confirmed (code) at 0x00228d70; detail: traced
  • Wrapper 0x0036a000 (registered by RegisterBindings); calls 0x00228d70 Cfg_AddHatFit
  • Used by 1 of 467 script chunks (908 references); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgHUDColor

CfgHUDColor(id, colour)
# Argument Read as Meaning
1 id number, truncated to an integer Colour slot 1-9 (button, cash, warriors, text, grey, bonus, blue, orange, big money in config_preload2.lua).
2 colour string Colour as a string from global.lua's CL table; copied and its pointer kept at 0x00600660 + id x 4.

Returns nothing.

Stores a named HUD colour string by slot, used by the HUD text code; config_preload2.lua sets slots 1 to 9 from the CL table.

Notes. The string's format (a colour tag for the text layout) is inferred.

  • Evidence: confirmed (code) at 0x0041d9e8; detail: traced
  • Wrapper 0x0035e750 (registered by RegisterBindings); calls 0x0041d9e8 Cfg_SetHUDColour
  • Used by 1 of 467 script chunks (10 references); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgHUDMessage

CfgHUDMessage(id, text)
# Argument Read as Meaning
1 id number, truncated to an integer Global string id (an index into GlobalStrings: GSTRING.HUD's index).
2 text string The text; copied into the Lua pool.

Returns nothing.

Stores a HUD string: copies the text and keeps its pointer at 0x00600048 + id x 4, where GlobalString_Get (0x0019ee70) finds it (GUI strings).

Notes. The language set-up fills GSTRING.HUD through it on the boot-to-menu path, its one call in the scripts (Front end).

  • Evidence: confirmed (code) at 0x0041d988; detail: traced
  • Wrapper 0x0035e5d0 (registered by RegisterBindings); calls 0x0041d988
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: implemented

CfgHuInventoryCallback

CfgHuInventoryCallback(fn)
# Argument Read as Meaning
1 fn string Name of a Lua function (up to 32 characters, copied) called when an item is given to a player with notification, or nil to clear it.

Returns nothing.

Stores a second inventory callback name in the inventory block (game state +0x480 + 0xff4). When Inventory_AddItem runs with its notify flag, it calls this function, if it exists, with the player index (0 or 1) and the item id (0-22), after the CfgInventoryCallback one (which gets only the item id).

Notes. Despite the name it is per player, not per human: other humans' pickups do not call it. Called for any change with the notify flag, whatever its sign. Which pickups set the flag is not traced here.

  • Evidence: confirmed (code) at 0x0041ed10, 0x0041e490, 0x0041e5b0; detail: traced
  • Wrapper 0x0036c068 (registered by RegisterBindings); calls 0x0041ed10 Cfg_SetHuInventoryCallback, 0x0041e490 Inventory_SetHuCallback, 0x0041e5b0 Inventory_AddItem
  • Used by 12 of 467 script chunks (30 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 9 of 28 levels, first level3 (mission 6)
  • Coney: implemented

CfgHuInventoryCallback2

CfgHuInventoryCallback2(fn)
# Argument Read as Meaning
1 fn string Lua function name for a second per-human inventory event, or nil.

Returns nothing.

Stores a second per-human inventory callback name (0x0041e4c0); no script calls it.

  • Evidence: confirmed (code) at 0x0041ed38; detail: brief
  • Wrapper 0x0036c098 (registered by RegisterBindings); calls 0x0041ed38
  • Used by no script on the disc
  • Coney: not implemented

CfgInventoryCallback

CfgInventoryCallback(fn)
# Argument Read as Meaning
1 fn string Lua function name (up to 31 characters) called when the player picks up an inventory item, or nil.

Returns nothing.

Stores the inventory pickup callback name (inventory +0xfd4). The tutorial uses it to count loot.

  • Evidence: confirmed (code) at 0x0041ece8; detail: traced
  • Wrapper 0x0036c038 (registered by RegisterBindings); calls 0x0041ece8 Cfg_SetInventoryCallback
  • Used by 9 of 467 script chunks (12 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 4 of 28 levels, first level34 (mission 4)
  • Coney: implemented

CfgInventoryItem

CfgInventoryItem(objectName, slot, count, sound, ms)
# Argument Read as Meaning
1 objectName string Object type name of the item (e.g. a 'dyn_' name), up to 31 characters.
2 slot number, truncated to an integer Inventory slot / item id (1-12 in config_preload2.lua).
3 count number, truncated to an integer Integer stored with the item (0 in the scripts; negative becomes 0).
4 sound string Pickup sound name ('vags/interface/...'), stored as its hash.
5 ms number, truncated to an unsigned integer; default 10000 Duration in milliseconds (default 10000), for timed power-ups.

Returns nothing.

Defines one inventory item kind in both players' inventories (game state +0x480, two blocks of 0x3f4 bytes): its object, count, pickup sound and duration.

Notes. Slot entries are 0x2c bytes from +0x04. That the duration is how long a power-up lasts is inferred.

  • Evidence: confirmed (code) at 0x0041eca0; detail: traced
  • Wrapper 0x0036bf58 (registered by RegisterBindings); calls 0x0041eca0 Cfg_SetInventoryItem
  • Used by 2 of 467 script chunks (18 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level20 (flashback 4)
  • Coney: implemented

CfgJumpIsAction

CfgJumpIsAction(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) true: jumping is done with the action button (global.lua sets true); false: a separate jump control.

Returns nothing.

Sets the global flag 0x0051099c that decides whether jump is mapped onto the context action button.

Notes. Storage confirmed (code) at 0x0023a970; the control meaning follows the name and its pairing with CfgPickupIsAction (readers not traced).

  • Evidence: confirmed (code) at 0x0023a970; detail: traced
  • Wrapper 0x0035a2c8 (registered by RegisterBindings); calls 0x0023a970 Cfg_SetJumpIsAction
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgLanguage

CfgLanguage(language)
# Argument Read as Meaning
1 language number, truncated to an integer Language number: 0 English, 1 Spanish, 2 French, 3 Italian, 4 German (global.lua passes SCENELANGUAGE).

Returns nothing.

Writes the game state's language (+0x120), the value GetLanguage returns.

  • Evidence: confirmed (code) at 0x0041da40; detail: traced
  • Wrapper 0x0035e7e0 (registered by RegisterBindings); calls 0x0041da40 Cfg_SetLanguage
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgLevelName

CfgLevelName(index, name, name2, worldName, name4, levelId, v7, v8, flag1, flag2, flag4, v12, f13, f14, f15, v16, v17, v18)
# Argument Read as Meaning
1 index number, truncated to an integer Level record index 0-127 (config_preload3.lua passes position - 1, so level100 is record 0); record at W_GameState + 0x14d4 + index x 0x84.
2 name string Level name such as 'level100' (15 characters, record +0x14): the name MenuLoadLevel and the level flow use.
3 name2 string Second name (20 characters, +0x24); always empty in the shipped scripts.
4 worldName string Streamed world name (15 characters, +0x39), see Level loading.
5 name4 string Fourth name (31 characters, +0x49); always empty in the shipped scripts.
6 levelId number, truncated to an integer Level number (record +0x04), what GetLevelId returns (100 for level100).
7 v7 number, truncated to an integer Integer at record +0x08.
8 v8 number, truncated to an unsigned integer Byte at record +0x0c.
9 flag1 number, truncated to an unsigned integer 1 sets bit 0 of the flags byte (+0x0d).
10 flag2 number, truncated to an unsigned integer 1 sets bit 1 of the flags byte.
11 flag4 number, truncated to an unsigned integer 1 sets bit 2 of the flags byte.
12 v12 number, truncated to an integer Integer at record +0x10.
13 f13 number (single precision) Float at record +0x6c.
14 f14 number (single precision) Float at record +0x70.
15 f15 number (single precision) Float at record +0x74.
16 v16 number, truncated to an unsigned integer Integer at record +0x78.
17 v17 number, truncated to an unsigned integer Byte at record +0x7c.
18 v18 number, truncated to an unsigned integer Integer at record +0x80.

Returns nothing.

Writes one record of the level table (128 records of 0x84 bytes in the game state) and raises the level count (+0x56d4) to include it. config_preload3.lua calls it for each of the 111 entries of levelNames (Front end).

Notes. Only the flag values exactly 1 set a bit. Meanings of the numeric fields beyond the level number are open; the flags and floats likely describe the level type, lock state and map position.

  • Evidence: confirmed (code) at 0x0041d510; detail: traced
  • Wrapper 0x0036b220 (registered by RegisterBindings); calls 0x0041d510 Cfg_SetLevelRecord
  • Used by 1 of 467 script chunks (2 references); boot to menu: yes; mission 1: no; result used: no
  • Coney: implemented

CfgLockOn

CfgLockOn(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) Manual lock-on flag (global 0x005104ac).

Returns nothing.

Stores the lock-on flag tested first by 0x00241b90; never called by the scripts.

Notes. Storage confirmed (code) at 0x0023a5c8.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035df80 (registered by RegisterBindings); calls 0x0023a5c8
  • Used by no script on the disc
  • Coney: not implemented

CfgMercyStruggleDamage

CfgMercyStruggleDamage(damage)
# Argument Read as Meaning
1 damage number, truncated to an integer Damage dealt to a held human every 30 brain updates (default 2).

Returns nothing.

Sets the damage a character holding someone with the GrabTarget goal (type 0x1f) deals to them while holding (0x00510acc, default 2): GrabTargetGoal_Process (0x002bb858) adds it as pending damage to the held human every 30th update of the holder's brain. Named for Mercy, whom gangs grab and carry in the Mercy mode and in level 55.

Notes. The value is a global, never reset by the level; it applies to every GrabTarget holder.

  • Evidence: confirmed (code) at 0x00294860; detail: traced
  • Wrapper 0x0035e8a8 (registered by RegisterBindings); calls 0x00294860 Cfg_SetMercyStruggleDamage
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level55 (mission 17)
  • Coney: not implemented

CfgMoneyCallback

CfgMoneyCallback(fn)
# Argument Read as Meaning
1 fn string Name of a Lua function (up to 32 characters, copied, not interned) called when a player's money changes, or nil to clear it.

Returns nothing.

Stores the money callback's name in the inventory block (game state +0x480 + 0x1034). Whenever money (item 2) is added to or taken from a player's inventory, Inventory_AddItem calls the function, if it exists, with the player index, 0 or 1, and the signed change in dollars.

Notes. Called for every change, notify flag or not; the call happens after the count is clamped, but passes the requested change, not the clamped one.

  • Evidence: confirmed (code) at 0x0041ed60, 0x0041e4f0, 0x0041e5b0; detail: traced
  • Wrapper 0x0036c0c8 (registered by RegisterBindings); calls 0x0041ed60 Cfg_SetMoneyCallback, 0x0041e4f0 Inventory_SetMoneyCallback, 0x0041e5b0 Inventory_AddItem
  • Used by 6 of 467 script chunks (15 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 4 of 28 levels, first level95 (the hub)
  • Coney: implemented

CfgMultiplayerJoin

CfgMultiplayerJoin(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) true allows a second player to join (drop-in co-op); false forbids it.

Returns nothing.

Sets the game state's 'second player may join' flag (+0x56e8); when it changes to true it also calls 0x0041a460 with -1 to reset the join state. The tutorial and most missions switch it per section.

Notes. 0x0041a460 (GameState_SyncPlayers) is the two-player sync CheckMultiplayer also runs: it makes a gang Warrior player 2, or drops player 2 back to the AI, to match the two-player flag, and calls the SetMultiplayerCallback function with (human, joined).

  • Evidence: confirmed (code) at 0x0041da08; detail: traced
  • Wrapper 0x0035e818 (registered by RegisterBindings); calls 0x0041da08 Cfg_SetMultiplayerJoin
  • Used by 52 of 467 script chunks (69 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 11 of 28 levels, first level80 (mission 2)
  • Coney: implemented

CfgObj

CfgObj(name, className, hitpoints, v4, v5, v6, centre, size, shape, axis, mass, v12, material, pickupAnim, f15, f16, f17, f18, objectType, animSet, holdPos, holdRot)
# Argument Read as Meaning
1 name string Object type name (e.g. a 'dyn_' prop or hat name), kept at +0x28 (26 characters); its CRC-32 (+0x8c) is the Object List key of the model.
2 className string Object class name (e.g. 'hat_object', 'simple_object'), kept at +0x43; its index in the script type table at +0x5c gives the object's init, update and message code.
3 hitpoints number, truncated to an integer 16-bit value at +0x58: a door's or barrier's hitpoints (0x003fb5f8, 0x003b2f40); for a held weapon, damage added to the hit (0x0021b290).
4 v4 number, truncated to an integer Byte at +0x5a.
5 v5 number, truncated to an integer Byte at +0x5b.
6 v6 number, truncated to an integer 16-bit weight at +0x62: the object's physics attribute 1 (0x00395e40), which weighs pushes (a human's is 82.0); 10 or 50 for most types.
7 centre table of 3 numbers (t[1]..t[3]) Collision centre offset {x, y, z} in metres.
8 size table of 3 numbers (t[1]..t[3]) Collision box size {x, y, z} in metres (+0x78).
9 shape number, truncated to an unsigned integer Physics shape (PHYS table: NONE, OBB, ...), byte at +0x84.
10 axis number, truncated to an unsigned integer Main axis (AXIS table), byte at +0x85.
11 mass number (single precision) Float at +0x88: not a mass but the bounce restitution, the object's physics attribute 8 (0x00395e40) that contact code 2 bounces with (Physics); 0.1 for 1,359 of the 1,371 types.
12 v12 number, truncated to an unsigned integer 16 bits at +0x5e; meaning not traced.
13 material number, truncated to an unsigned integer Surface material (MATERIAL table), byte at +0x64: a door's collision triangles and impact sounds use it (0x003a37b8 case 3).
14 pickupAnim number, truncated to an unsigned integer Animation used to pick it up (ANIM table), byte at +0x65.
15 f15 number (single precision) Float at +0x68.
16 f16 number (single precision) Float at +0x6c.
17 f17 number (single precision) Float at +0x70.
18 f18 number (single precision) Float at +0x74.
19 objectType number, truncated to an unsigned integer Object kind (OBJECT table: TYPE_HAT, TYPE_RIOT_HAT, ...), byte at +0x86.
20 animSet number, truncated to an integer Animation set (ANIM table, e.g. NONE_SET), byte at +0x87.
21 holdPos table of 3 numbers (t[1]..t[3]) Offset {x, y, z} in metres when held or worn.
22 holdRot table of 4 numbers (t[1]..t[4]) Rotation quaternion {i, j, k, r} when held or worn.

Returns nothing.

Defines one object type in the object database (0x00512c04): name, class, collision shape and size, physics, material, pickup animation, kind and the transform used when it is carried. config_preload2.lua and config_preload3.lua's CfgObjectsAtoC..TtoZ make about 1,370 calls.

Notes. Layout confirmed (code) at 0x00390f18: 0x90-byte records, +0x60 the record's index, the name hashed with the standard CRC-32 table at 0x005d91e0 (Objects: object types); argument meanings for the enum-typed fields come from the scripts' table names (PHYS, AXIS, MATERIAL, ANIM, OBJECT); the wrapper (0x0036a1a0) passes argument 12 to +0x5e, 13 to +0x64 and 14 to +0x65. The getter 0x003a37b8 reads +0x58 (0), +0x5a (1), +0x62 (2), +0x64 (3), +0x65 (4) and +0x86 (10).

  • Evidence: confirmed (code) at 0x00390f18; detail: traced
  • Wrapper 0x0036a1a0 (registered by RegisterBindings); calls 0x00390f18 Cfg_AddObjectType
  • Used by 2 of 467 script chunks (1371 references); boot to menu: yes; mission 1: no; result used: no
  • Coney: implemented

CfgObjectGroup

CfgObjectGroup(group, name, members)
# Argument Read as Meaning
1 group number, truncated to an unsigned integer Object group index.
2 name string Group name.
3 members table of 5 strings (t[1]..t[5]) Up to five object type names; a name that is not found ends the list.

Returns nothing.

Defines a named group of up to five object types in the object database (0x003915d0); no script calls it.

  • Evidence: confirmed (code) at 0x00390e88; detail: brief
  • Wrapper 0x00384398 (registered by the script system); calls 0x00390e88
  • Used by no script on the disc
  • Coney: not implemented

CfgObjectValueMod

CfgObjectValueMod(factor)
# Argument Read as Meaning
1 factor number (single precision) Multiplier on the cash value of stolen loot (1 full value, 0.5 half); not range-checked.

Returns nothing.

Sets the loot value factor (float at game state +0x380). When a player, or an AI Warrior for his leader, picks up a stolen object, he gains loot item 10 and money (item 2) equal to the object type's value byte (+0x5a) times this factor, truncated; a beaten player who drops carried loot loses the same amount. Level scripts set 0.5 or 1.

Notes. The factor persists in the game state until set again; with 0 loot is worth nothing.

  • Evidence: confirmed (code) at 0x0041d618, 0x0023bf00, 0x00232c60; detail: traced
  • Wrapper 0x0035a2f8 (registered by RegisterBindings); calls 0x0041d618 GameState_SetObjectValueMod, 0x0023bf00 Human_PickUpObject, 0x00232c60 Human_DropCarried
  • Used by 4 of 467 script chunks (4 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 3 of 28 levels, first level95 (the hub)
  • Coney: implemented

CfgPedInteractDelay

CfgPedInteractDelay(delay)
# Argument Read as Meaning
1 delay number, truncated to an unsigned integer Milliseconds after one pedestrian conversation ends before another may start anywhere (default 10000; the one level sets 2).

Returns nothing.

Sets the global gap between pedestrian interactions (0x00510fcc). When two pedestrians finish a conversation (greeting, chat lines 0xab/0xac, 0xb3, 0xb4, 0xb5), the interaction goal (0x002a9508) sets the next allowed start time 0x00510fc8 to now + delay, and the pedestrian think (0x002ab4b8) starts no new one before it. A small value makes the street chatter constantly.

Notes. InitLevel (0x0015fe90) resets the next-start time but not the delay, so a set delay carries over to later levels until set again (inferred from the writes found). Level 20 calls it.

  • Evidence: confirmed (code) at 0x002948a0, 0x002a9508; detail: traced
  • Wrapper 0x0035e990 (registered by RegisterBindings); calls 0x002948a0 Peds_SetInteractDelay, 0x002a9508 PedInteractGoal_Process
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level20 (flashback 4)
  • Coney: not implemented

CfgPickupIsAction

CfgPickupIsAction(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) true (global.lua): picking up objects uses the action button.

Returns nothing.

Sets the global flag 0x005109a0 choosing whether object pickup is mapped to the context action button.

Notes. Storage confirmed (code) at 0x0023a980; the control meaning follows the name.

  • Evidence: confirmed (code) at 0x0023a980; detail: traced
  • Wrapper 0x0035a4b0 (registered by RegisterBindings); calls 0x0023a980 Cfg_SetPickupIsAction
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgPickupIsGrab

CfgPickupIsGrab(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) true: picking up objects uses the grab button; false (global.lua): it does not.

Returns nothing.

Sets the global flag 0x005109a4 choosing whether object pickup is mapped to grab.

Notes. Storage confirmed (code) at 0x0023a990; the control meaning follows the name (readers not traced).

  • Evidence: confirmed (code) at 0x0023a990; detail: traced
  • Wrapper 0x0035a480 (registered by RegisterBindings); calls 0x0023a990 Cfg_SetPickupIsGrab
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgPlayerCombatWalkOnly

CfgPlayerCombatWalkOnly(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) true: a player-controlled human may only walk while in combat (no running or sprinting); false (the default from global.lua) allows the normal gait choice.

Returns nothing.

Sets the global flag 0x0051031c, which the locomotion and combat routines check together with 'is this human pad-controlled' to keep players at walking pace while fighting. global.lua turns it off and the armies levels (60-64) turn it on.

Notes. Readers: 0x00240e38, 0x00287a18, 0x0025f4d0, 0x00286cc8, 0x0025d390; each tests the flag with the human's pad-controlled byte (+0x1b of its pad record).

  • Evidence: confirmed (code) at 0x00236480; detail: traced
  • Wrapper 0x0035a1f0 (registered by RegisterBindings); calls 0x00236480 Cfg_SetPlayerCombatWalkOnly
  • Used by 13 of 467 script chunks (15 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 6 of 28 levels, first level95 (the hub)
  • Coney: implemented

CfgPlayerMugging

CfgPlayerMugging(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false); default true true (the default) lets a player mug the other player's human; false prevents it (the first mission turns it off). Humans no player controls are not affected.

Returns nothing.

Stores the player-mugging switch in the game state (+0x5708). Mug_CanMugVictim (0x00225ff0) reads it only for a victim with a player number, who must also hold one of items 0-6; such a mugging hands over all of them (Crimes: mugging). Mug_CanMugVictim (0x00225ff0) reads it only for a victim with a player number, who must also hold one of items 0-6; such a mugging hands over all of them (Crimes: mugging).

  • Evidence: confirmed (code) at 0x0041daf8; detail: traced
  • Wrapper 0x0035e9c8 (registered by RegisterBindings); calls 0x0041daf8 Cfg_SetPlayerMugging
  • Used by 9 of 467 script chunks (9 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 6 of 28 levels, first level87 (mission 3)
  • Coney: implemented

CfgPlayerRunButton

CfgPlayerRunButton(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) true: running needs a run button held as well as the left stick pushed past the run deflection; false (what config_preload2.lua sets): running comes from the stick deflection alone.

Returns nothing.

Sets the global flag 0x00510258 read by the walk/run/sprint predicates (0x00225a50, 0x00225c10, 0x00225dc0). With it set, those predicates also require the human's 'run button' input bit.

Notes. With gamepad input the shipped setting (false) means the analog stick alone picks walk or run.

  • Evidence: confirmed (code) at 0x00236460; detail: traced
  • Wrapper 0x0035a220 (registered by RegisterBindings); calls 0x00236460 Cfg_SetPlayerRunButton
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgPowerClass

CfgPowerClass(classId, p2, p3, p4, p5, p6, p7, p8, f9, f10, f11, f12, f13, f14, f15, f16, f17, n18, n19, f20, n21, flag22, n23, n24, n25, n26, n27, n28, percent29, flag30, flag31)
# Argument Read as Meaning
1 classId number, truncated to an integer Power class index; selects a 0x44-byte record at 0x006619a0 + classId x 0x44 (0-66 in the difficulty configs).
2 p2 number, truncated to an integer 16-bit value at +0x28 (180-650): the power meter's maximum (400 for the player), 0x00223068.
3 p3 number, truncated to an integer 16-bit value at +0x2a (30-110): the power meter's refill per second (60 for the player).
4 p4 number, truncated to an integer 16-bit value at +0x2c (80-135): the stamina maximum, 0x00223188.
5 p5 number, truncated to an integer 16-bit value at +0x2e (10-40): the stamina refill per second.
6 p6 number, truncated to an integer 16-bit value at +0x34 (2000-2750): ms a knocked-down human stays down before rising, 0x0022f100.
7 p7 number, truncated to an integer 16-bit value at +0x30 (200-750): ms a stun lasts, 0x0022f658.
8 p8 number, truncated to an integer 16-bit value at +0x32 (300-750).
9 f9 number (single precision) Float at +0x00: as the attacker, multiplies the victim's stun for some weapon hits (damage 20-49), 0x0022f658.
10 f10 number (single precision) Float at +0x04: the hurt threshold; below this fraction of maximum health the human is hurt, 0x00222ff8.
11 f11 number (single precision) Float at +0x08.
12 f12 number (single precision) Float at +0x0c.
13 f13 number (single precision) Float at +0x10: the stun time's factor while hurt, 0x0022f658.
14 f14 number (single precision) Float at +0x14: the ground time's factor while hurt, 0x0022f100.
15 f15 number (single precision) Float at +0x18: the power meter maximum's factor while hurt, 0x00223068.
16 f16 number (single precision) Float at +0x1c: the AI attack delay's factor (CfgAttackDelay), 0x00223800.
17 f17 number (single precision) Float at +0x20: the AI attack delay's factor when the target is down, 0x00223800.
18 n18 number, truncated to an integer Byte at +0x36, at least 1: grab struggle divisor; a grabbed human's strike costs the grabber 1/n of its power, 0x0027fd68.
19 n19 number, truncated to an integer Byte at +0x37, clamped 0-15.
20 f20 number (single precision) Float at +0x24, clamped to 0-1.
21 n21 number, truncated to an integer Byte at +0x38, clamped 0-127.
22 flag22 number, truncated to an integer Byte at +0x39, clamped 0-1: when 1, an AI grabber of this class throws or pushes into a wall next to the pair (Grabbing_PickMove 0x002b5b98, ai.md#fight-reactions).
23 n23 number, truncated to an integer Byte at +0x3a.
24 n24 number, truncated to an integer Byte at +0x3b.
25 n25 number, truncated to an integer Byte at +0x3c.
26 n26 number, truncated to an integer Byte at +0x3d.
27 n27 number, truncated to an integer Byte at +0x3f (-1, 0 or 1 in the scripts).
28 n28 number, truncated to an integer Byte at +0x3e (-1, 0 or 1).
29 percent29 number, truncated to an integer Byte at +0x40, clamped 0-100 (30-85 in the scripts).
30 flag30 number, truncated to an integer Byte at +0x41, clamped 0-1.
31 flag31 number, truncated to an integer Byte at +0x42, clamped 0-1.

Returns nothing.

Fills one power class, the combat-strength profile a character type refers to: seven 16-bit values, nine floats, and a run of small bytes, with the clamps listed per argument; it also marks the record as set (+0x43 = 1). The difficulty scripts (config_easy/normal/hard/fury and Rumble) each define the whole set, so the profile depends on difficulty.

Notes. Layout and clamps confirmed (code) at 0x002288c0; the record is read through 0x00222b78. The meanings given in the argument list are confirmed (code) at the cited readers (combat.md and characters.md); the others are not traced. The record has 31 fields; Coney needs all of them stored even before their meaning is known.

  • Evidence: confirmed (code) at 0x002288c0; detail: traced
  • Wrapper 0x00369868 (registered by RegisterBindings); calls 0x002288c0 Cfg_SetPowerClass
  • Used by 6 of 467 script chunks (311 references); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgPowerEndurance

CfgPowerEndurance(factor)
# Argument Read as Meaning
1 factor number (single precision) Power-attack endurance factor (config_preload2.lua sets 0.25).

Returns nothing.

Stores a global float (0x00510278) beside CfgDamageEndurance's, set once by config_preload2.lua.

Notes. The grab's power strike (cross held, square pressed while grabbing) needs the power meter's fraction (record +0x148 over its maximum) above this value, confirmed (code) at 0x0027f3b0 and confirmed (runtime) 0.25; a throw costs the same fraction of the meter (docs/research/combat.md).

  • Evidence: confirmed (code) at 0x002364f8; detail: traced
  • Wrapper 0x0035a678 (registered by RegisterBindings); calls 0x002364f8 Cfg_SetPowerEndurance
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgPowerupPickup

CfgPowerupPickup(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false); default true true (the default) lets players pick up power-ups; false stops them.

Returns nothing.

Stores the power-up pickup switch (byte at game state +0x56e5, 1 after every level load). With it 0, the three pickup paths (Human_OnContact at 0x0021a3d8, Human_FindPickupNear at 0x00219550, WorldObject_TryTouchPickUp 0x00395510) skip only a TYPE_REVIVAL (14, a flash; object type +0x86) for a player human (+0x1b0 not -1) at full health; every other power-up, a hurt player and AI humans are unaffected.

Notes. Reset to 1 by the level set-up (0x00418c68). Used by Armies of the Night (levels 60-64) to control when power-ups can be collected.

  • Evidence: confirmed (code) at 0x0041da70; detail: traced
  • Wrapper 0x0036c208 (registered by RegisterBindings); calls 0x0041da70 GameState_SetPowerupPickup
  • Used by 5 of 467 script chunks (5 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 5 of 28 levels, first level60 (Armies of the Night 1)
  • Coney: implemented

CfgQueueGrappleCombos

CfgQueueGrappleCombos(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) true lets grapple combo inputs be queued during a grapple animation.

Returns nothing.

Sets the global flag 0x0051025c; never called by the scripts.

Notes. Storage confirmed (code) at 0x00236490; meaning from the name.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035a4e0 (registered by RegisterBindings); calls 0x00236490
  • Used by no script on the disc
  • Coney: not implemented

CfgRageHandlers

CfgRageHandlers(enterFn, exitFn, fullFn, durationMs, warnMs)
# Argument Read as Meaning
1 enterFn string Lua function name (up to 31 characters) called when rage mode starts, or nil.
2 exitFn string Lua function name called when rage mode ends, or nil.
3 fullFn string Lua function name called when the rage meter is full (or checked), or nil.
4 durationMs number, truncated to an unsigned integer Milliseconds (20000 in global.lua and the tutorial), global 0x00510294.
5 warnMs number, truncated to an unsigned integer Milliseconds (5000), global 0x00510290.

Returns nothing.

Registers the three rage-mode script callbacks by name (copied into 32-byte buffers at 0x006b6830, 0x006b6850 and 0x006b6810) and two times in milliseconds. global.lua installs SetRageMode/ClrRageMode/RageFull and the tutorial replaces them.

Notes. Unlike most callback setters the names are copied, not interned. That the times are the rage duration and a warning period is inferred.

  • Evidence: confirmed (code) at 0x00236c58; detail: traced
  • Wrapper 0x0035a950 (registered by RegisterBindings); calls 0x00236c58 Cfg_SetRageHandlers
  • Used by 2 of 467 script chunks (3 references); boot to menu: yes; mission 1: yes; result used: no
  • Coney: implemented

CfgRagePoints

CfgRagePoints(points, gain, decay)
# Argument Read as Meaning
1 points number (single precision) Rage points (25 in config_preload2.lua), global 0x005108d8.
2 gain number (single precision) Rage gain factor (1), global 0x005108e0.
3 decay number (single precision) Rage decay factor (0.1), global 0x005108e4.

Returns nothing.

Stores three rage-meter tuning floats in globals 0x005108d8, 0x005108e0 and 0x005108e4.

Notes. The names of the three values are inferred; the readers are not traced.

  • Evidence: confirmed (code) at 0x00236c28; detail: traced
  • Wrapper 0x0035a8b0 (registered by RegisterBindings); calls 0x00236c28 Cfg_SetRagePoints
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgRagePowerMode

CfgRagePowerMode(mode)
# Argument Read as Meaning
1 mode number, truncated to an unsigned integer Rage power mode number (global.lua sets 1).

Returns nothing.

Stores the rage power mode in the global 0x00510298.

Notes. What each mode does is not traced.

  • Evidence: confirmed (code) at 0x00236c48; detail: traced
  • Wrapper 0x0035a878 (registered by RegisterBindings); calls 0x00236c48 Cfg_SetRagePowerMode
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgRaindrops

CfgRaindrops(colour, count, scale)
# Argument Read as Meaning
1 colour table of 4 numbers (t[1]..t[4]) Splash colour {r, g, b, a}, each 0-255, packed as one word r<<24 \| g<<16 \| b<<8 \| a (raindrops +0x10; default white at alpha 64).
2 count number, truncated to an unsigned integer Splashes spawned per frame per view (raindrops +0x08, default 2); levels pass 1-3.
3 scale number (single precision) Size given to each splash particle (raindrops +0x0c, default 0.6); levels pass 0.75 or 1.

Returns nothing.

Configures the ground splashes of rain: the raindrops object (0x005971a8, created at 0x00183510) that runs while StartRain's main layer is on. Each frame, per view, it picks count random points on upward-facing collision triangles near the camera and spawns a sub_splash particle there with this colour and size, plus a sub_ripple when the point is within 15 m of the camera.

Notes. The colour table is written back as read. The settings stay until changed (no reset at level end traced). Splashes stop when the game is paused (0x00184568 checks the task clock).

  • Evidence: confirmed (code) at 0x0018dd58, 0x00183630, 0x00184568; detail: traced
  • Wrapper 0x00368550 (registered by RegisterBindings); calls 0x0018dd58 ScreenFx_SetRaindrops, 0x00183630 Raindrops_Configure, 0x00184568 Raindrops_Update
  • Used by 9 of 467 script chunks (21 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 5 of 28 levels, first level93 (mission 10)
  • Coney: not implemented

CfgRumbleArena

CfgRumbleArena(levelId, value, modes)
# Argument Read as Meaning
1 levelId number, truncated to an unsigned integer Arena level number (101-199); must be unlocked (unlockables kind 2).
2 value number, truncated to an unsigned integer Number stored in the arena entry (9 in all calls).
3 modes table of 16 numbers (t[1]..t[16]) Up to 16 game-mode ids allowed in this arena, ended by 0 or -1.

Returns nothing.

Adds an arena to the Rumble arena menu (RM_ChooseAreaWidget list at 0x0063ee40) when it is unlocked and allows the currently chosen mode (0x0063eec2); the entry keeps the arena's level-table index.

Notes. A modes table whose first value is 0 allows every mode.

  • Evidence: confirmed (code) at 0x001eaa30; detail: brief
  • Wrapper 0x0036b670 (registered by RegisterBindings); calls 0x001eaa30
  • Used by 1 of 467 script chunks (29 references); boot to menu: no; mission 1: no; result used: no
  • Coney: implemented

CfgRumbleChar

CfgRumbleChar(charType, name, gangName, gang, rank, n6, n7, bio)
# Argument Read as Meaning
1 charType number, truncated to an unsigned integer Character type id; the key of the Rumble character map.
2 name string Character display name (stored upper-cased).
3 gangName string Gang name text (stored as given).
4 gang number, truncated to an unsigned integer Gang id (byte at +0x0c).
5 rank number, truncated to an unsigned integer Rank (RM_WARCHIEF, RM_LT, RM_SOLDIER), byte at +0x0d.
6 n6 number, truncated to an unsigned integer 16-bit value at +0x0e (0 in the scripts).
7 n7 number, truncated to an unsigned integer Byte at +0x10 (20-80: a strength rating, inferred).
8 bio string Description text (stored upper-cased).

Returns nothing.

Registers one character's Rumble data (RM_CharData) under its type id in a sorted map, replacing an earlier entry with the same id.

  • Evidence: confirmed (code) at 0x001f0e60; detail: brief
  • Wrapper 0x0036b8a8 (registered by RegisterBindings); calls 0x001f0e60
  • Used by 5 of 467 script chunks (732 references); boot to menu: no; mission 1: no; result used: no
  • Coney: implemented

CfgRumbleGame

CfgRumbleGame(title, mode, flagA, flagB, flagC, unused, n7, n8, n9, description)
# Argument Read as Meaning
1 title string Game-mode title text (from the Rumble string table).
2 mode number, truncated to an unsigned integer Rumble game mode id (RM_* constants); the mode is added only if the unlockables manager reports it unlocked.
3 flagA boolean (nil or 0 is false) Offers the one-player entry (against the computer) on the Game Type screen; record +0x10, copied to 0x0063ef6c.
4 flagB boolean (nil or 0 is false) Offers the co-op entry (two players, gameMode 2); record +0x14, copied to 0x0063ef70.
5 flagC boolean (nil or 0 is false) Offers the versus entry (two players, gameMode 1); record +0x18, copied to 0x0063ef74.
6 unused number, truncated to an unsigned integer Ignored: never stored (the scripts pass the same value as the next argument).
7 n7 number, truncated to an unsigned integer Fighters per side (1, 3, 5 or 9), record +0x1c, copied to the set-up's gangSize (index 2).
8 n8 number, truncated to an unsigned integer Preset character type for side 1 (0 = choose gangs; RM_Wchair passes 458), record +0x20; when not 0 it fills all nine members of side 1 and no gangs are chosen (packs 255).
9 n9 number, truncated to an unsigned integer Preset character type for side 2 (459 for RM_Wchair), record +0x22.
10 description string Description text; formatted with the title into the mode widget's text (size tags around a big-font title).

Returns nothing.

Adds one game mode to the Rumble mode menu (an RM_GameModeWidget record on the list at 0x0063ee84), if that mode is unlocked.

Notes. Unlock check 0x00424130 on the unlockables manager (0x006fe998) with kind 1. Only the Rumble data script calls it.

  • Evidence: confirmed (code) at 0x001f8110; detail: brief
  • Wrapper 0x0036b4f0 (registered by RegisterBindings); calls 0x001f8110
  • Used by 1 of 467 script chunks (9 references); boot to menu: no; mission 1: no; result used: no
  • Coney: implemented

CfgRumbleGang

CfgRumbleGang(gang, name, members)
# Argument Read as Meaning
1 gang number, truncated to an integer Gang id; added only if unlocked (unlockables kind 3), or always when negative.
2 name string Gang display name (interned in the Rumble string pool).
3 members table of 9 numbers (t[1]..t[9]) Nine character type ids making up the gang's Rumble roster.

Returns nothing.

Adds a gang with its nine-member roster to the Rumble gang chooser (RM_ChooseGangsWidget list at 0x0063ee4c).

Notes. The 0x54-byte record keeps the gang id (+0x00), the name (+0x04) and two copies of the roster (+0x08 and +0x2c, one per side, rotated separately to choose the warchief). Each type passes through 0x001ec490, which replaces a locked character type (unlockables kind 4) with a fixed stand-in.

  • Evidence: confirmed (code) at 0x001ec980; detail: brief
  • Wrapper 0x0036b790 (registered by RegisterBindings); calls 0x001ec980
  • Used by 1 of 467 script chunks (46 references); boot to menu: no; mission 1: no; result used: no
  • Coney: implemented

CfgScrFx

CfgScrFx(effect, inMs, outMs, ms, n, f1, f2)
# Argument Read as Meaning
1 effect number, truncated to an unsigned integer Look slot; this numeric form is meant for look 5, the blur pulse (Screen effects), whose fourth number also sets a frame count.
2 inMs number, truncated to an unsigned integer Milliseconds, stored as seconds at the effect's +0x10.
3 outMs number, truncated to an unsigned integer Milliseconds, stored as seconds at +0x14.
4 ms number, truncated to an unsigned integer For type 5: milliseconds converted to 60 Hz frames (x 0.06) at +0x98.
5 n number, truncated to an unsigned integer Integer stored at +0x148.
6 f1 number (single precision) Float stored at +0x14c (0.002 for type 5).
7 f2 number (single precision) Float stored at +0x150 (0.003).

Returns nothing.

Configures a full-screen effect (fades, flashes, blur) in both screen-effect managers (0x005fdeb8, one per view). The registered form takes seven numbers (used for type 5); when argument 2 is a table the call falls back to the colour form.

Notes. Which effect each type number is (fade, damage flash, rage) is not traced.

Overload (registered first; the wrapper above checks its argument types and calls this one when they do not match): Used when the arguments do not match the numeric form exactly (the scripts pass a colour table as argument 2 for every type but 5): sets the colour and timings of one screen-effect type.

CfgScrFx(effect, colour, inMs, outMs, value, ms, value2)
# Argument Read as Meaning
1 effect number, truncated to an unsigned integer Look slot 0-12 (Screen effects): selects a 0x18-byte slot in both screen-effect managers.
2 colour table of 4 numbers (t[1]..t[4]) Effect colour {r, g, b, a}, each 0-255.
3 inMs number, truncated to an unsigned integer Milliseconds, stored as seconds at slot +0x10.
4 outMs number, truncated to an unsigned integer Milliseconds, stored as seconds at slot +0x14.
5 value number, truncated to an unsigned integer Integer stored at slot +0x18.
6 ms number, truncated to an unsigned integer Milliseconds converted to 60 Hz frames at slot +0x20.
7 value2 number, truncated to an unsigned integer Integer stored at slot +0x1c.

Returns nothing.

Wrapper 0x0036ae60; calls 0x0018e470.

  • Evidence: confirmed (code) at 0x0018e530; detail: traced
  • Wrapper 0x0036b020 (registered by RegisterBindings); calls 0x0018e530
  • Used by 1 of 467 script chunks (11 references); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgSearchCounts

CfgSearchCounts(countA, countB)
# Argument Read as Meaning
1 countA number, truncated to an unsigned integer Count stored as a byte at 0x00510ade (2).
2 countB number, truncated to an unsigned integer Count stored as a byte at 0x00510add (2).

Returns nothing.

Stores two AI search counts (how many searchers or search points), set by config_preload2.lua.

Notes. Meaning inferred; note the bytes are stored in reverse order.

  • Evidence: confirmed (code) at 0x00294870; detail: traced
  • Wrapper 0x0035e8e0 (registered by RegisterBindings); calls 0x00294870 Cfg_SetSearchCounts
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgSearchTimes

CfgSearchTimes(time1, time2, time3)
# Argument Read as Meaning
1 time1 number, truncated to an unsigned integer Search time stored as a byte at 0x00510ada (6).
2 time2 number, truncated to an unsigned integer Search time at 0x00510adb (10).
3 time3 number, truncated to an unsigned integer Search time at 0x00510adc (20).

Returns nothing.

Stores three AI search durations (bytes) used when enemies look for a player they lost.

Notes. Unit (probably seconds) and the use are inferred.

  • Evidence: confirmed (code) at 0x00294840; detail: traced
  • Wrapper 0x0035e378 (registered by RegisterBindings); calls 0x00294840 Cfg_SetSearchTimes
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgSetCollisionLengths

CfgSetCollisionLengths(objectName, lengthA, lengthB)
# Argument Read as Meaning
1 objectName string Name of an object type already defined with CfgObj.
2 lengthA number (single precision) Float stored at the type's +0x68.
3 lengthB number (single precision) Float stored at the type's +0x6c.

Returns nothing.

Overrides two collision lengths of an existing object type found by name; no script calls it.

Notes. 0x003910f0 does not check the lookup result.

  • Evidence: confirmed (code) at 0x003910f0; detail: brief
  • Wrapper 0x0036a690 (registered by RegisterBindings); calls 0x003910f0
  • Used by no script on the disc
  • Coney: not implemented

CfgSetCrimeCallback

CfgSetCrimeCallback(fn)
# Argument Read as Meaning
1 fn string Name of a global Lua function (up to 31 characters), or nil to clear it.

Returns nothing.

Names a script function to call whenever a crime with a known offender is reported (game state +0x2dc). The crime report (GameState_ReportCrime, 0x0041b8b0, see AI: crimes) calls it through GameState_RunCrimeCallback (0x0041ae60) with two numbers: the offender's gang id and the crime type. The level reset (0x00418c68) clears it.

Notes. Not called while crime reporting is off, for an offender in a police gang, or for a crime without an offender. A name that does not resolve to a function is skipped silently.

  • Evidence: confirmed (code) at 0x0041dab0, 0x0041ae30; detail: traced
  • Wrapper 0x0036bf28 (registered by RegisterBindings); calls 0x0041dab0 Script_SetCrimeCallback, 0x0041ae30 GameState_SetCrimeCallback
  • Used by 2 of 467 script chunks (3 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 2 of 28 levels, first level9 (mission 13)
  • Coney: not implemented

CfgSetDatabaseSizes

CfgSetDatabaseSizes(objectTasks, worldFlags, boxes)
# Argument Read as Meaning
1 objectTasks number, truncated to an unsigned integer Number of object task records for the level; the pool gets this many plus 500 (ObjectTaskManager).
2 worldFlags number, truncated to an unsigned integer Number of world flags (positions named in the level); the pool holds this many plus 4.
3 boxes table of 4 numbers (t[1]..t[4]) Table {volumeBoxes, unused, playerBoxes, turfBoxes}: pool sizes for volume boxes, (ignored), player boxes and turf boxes; 0 makes no pool.

Returns nothing.

Allocates the level's script-object pools: object tasks, world flags, volume boxes, player boxes and turf boxes. Every level script calls it first (level100.lua included).

Notes. The second table entry goes to 0x00413200, which does nothing. Allocation names: ObjectTaskRec, WorldFlag, FreeList, FreeList, FreeListContainer. Calling it twice leaks the old pools (inferred: no free is made).

  • Evidence: confirmed (code) at 0x0041d628; detail: traced
  • Wrapper 0x0036bb10 (registered by RegisterBindings); calls 0x0041d628 Cfg_SetDatabaseSizes, 2 virtual calls
  • Used by 90 of 467 script chunks (90 references); boot to menu: yes; mission 1: yes; result used: no
  • Later in the story: 28 of 28 levels, first level80 (mission 2)
  • Coney: implemented

CfgSetDefaultFollowSlotSet

CfgSetDefaultFollowSlotSet(set, slots)
# Argument Read as Meaning
1 set number, truncated to an integer Slot set 0 or 1.
2 slots table of 20 numbers (t[1]..t[20]) Table of 20 numbers: (x, y) pairs in metres giving formation positions relative to the leader (x to the side, negative y behind).

Returns nothing.

Sets the default formation slots that followers (the other Warriors) take around their leader, for every human record (0x006ceaf0 onwards); the first nine positions are converted and stored.

Notes. 0x00294bf8 converts the floats with the VU0 to fixed point; nine of the ten pairs are used. Which human records use set 0 or 1 is not traced.

  • Evidence: confirmed (code) at 0x00294788; detail: traced
  • Wrapper 0x0036bcb8 (registered by RegisterBindings); calls 0x00294788 Cfg_SetDefaultFollowSlotSet
  • Used by 2 of 467 script chunks (4 references); boot to menu: yes; mission 1: yes; result used: no
  • Coney: implemented

CfgSetEnemySpotting

CfgSetEnemySpotting(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false); default true true (the default) lets enemies spot the player; false makes them ignore the player until provoked.

Returns nothing.

Stores the enemy-spotting switch in the game state (+0x56f8).

  • Evidence: confirmed (code) at 0x0041d738; detail: traced
  • Wrapper 0x0036bd90 (registered by RegisterBindings); calls 0x0041d738 Cfg_SetEnemySpotting
  • Used by 24 of 467 script chunks (44 references); boot to menu: yes; mission 1: yes; result used: no
  • Later in the story: 26 of 28 levels, first level80 (mission 2)
  • Coney: implemented

CfgSetGlassProperties

CfgSetGlassProperties(glassType, windowLink, alarm, sprite, brokenSprite)
# Argument Read as Meaning
1 glassType number, truncated to an unsigned integer Glass type (0-18 in config_preload2.lua); selects a 16-byte entry.
2 windowLink boolean (nil or 0 is false) Entry +0x14: the pane closes the navigation jump link through it until it breaks.
3 alarm boolean (nil or 0 is false) Entry +0x18: breaking the pane reports a break-in (crime type 1).
4 sprite number, truncated to an unsigned integer Entry +0x1c: the whole pane's sprite word; its low 16 bits are the rectangle drawn (65556 is rectangle 20).
5 brokenSprite number, truncated to an unsigned integer Entry +0x20: the sprite word left after the pane breaks; 0 draws nothing.

Returns nothing.

Sets one breakable-glass type's two flags and two ids in the world object's glass table (0x00512c7c + 0x84c).

Notes. The readers are the glass pane's initialiser and hit handler (0x003e29e8, 0x003e2d90) and its break (0x0038f378); World objects: glass.

  • Evidence: confirmed (code) at 0x0039c290; detail: traced
  • Wrapper 0x0036ad80 (registered by RegisterBindings); calls 0x0039c290 Cfg_SetGlassProperties
  • Used by 1 of 467 script chunks (19 references); boot to menu: yes; mission 1: no; result used: no
  • Coney: implemented

CfgSetGlobalTimeToLive

CfgSetGlobalTimeToLive(ms)
# Argument Read as Meaning
1 ms number, truncated to an integer Lifetime in milliseconds (config_preload2.lua 30000; the tutorial's second lesson sets 1000 and 10000).

Returns nothing.

Stores a global lifetime (game state +0x26c) for temporary things such as dropped items or bodies.

Notes. What expires after this time is inferred from the name.

  • Evidence: confirmed (code) at 0x0041d4f8; detail: traced
  • Wrapper 0x0036a658 (registered by RegisterBindings); calls 0x0041d4f8 Cfg_SetGlobalTimeToLive
  • Used by 2 of 467 script chunks (3 references); boot to menu: yes; mission 1: yes; result used: no
  • Coney: implemented

CfgSetLockPickHandler

CfgSetLockPickHandler(startFn, stopFn, successFn)
# Argument Read as Meaning
1 startFn string Name of a Lua function (dotted names allowed) called with the human's and the door's handles when lock picking starts, or nil.
2 stopFn string Name of a Lua function called with the human and the door when a pick is abandoned, or nil.
3 successFn string Name of a Lua function called with the human and the door when the lock is picked, or nil.

Returns nothing.

Registers three script callbacks for the lock-picking minigame; the names are interned (script-system slot +0xcc) and kept in globals 0x00510288, 0x00510284 and 0x00510280. The start one runs from LockPick_Start (0x0022d790), the other two from LockPick_End (0x0022d908) (Crimes: lock picking).

  • Evidence: confirmed (code) at 0x002365f0; detail: traced
  • Wrapper 0x0035a6e8 (registered by RegisterBindings); calls 0x002365f0
  • Used by 7 of 467 script chunks (12 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 6 of 28 levels, first level80 (mission 2)
  • Coney: implemented

CfgSetLockPickStageFailHandler

CfgSetLockPickStageFailHandler(fn)
# Argument Read as Meaning
1 fn string Name of a Lua function called with the human's and the door's handles on a missed press, or nil.

Returns nothing.

Registers a script callback (interned name at 0x0051028c) run on every missed press of the lock-picking dial (0x002366d8 from LockPick_JudgePress, 0x002878b8), which resets the pins; no script calls it (Crimes: lock picking).

  • Evidence: confirmed (code) at 0x00236698; detail: traced
  • Wrapper 0x0035a760 (registered by RegisterBindings); calls 0x00236698
  • Used by no script on the disc
  • Coney: implemented

CfgSetMaxThrowError

CfgSetMaxThrowError(verticalDeg, horizontalDeg)
# Argument Read as Meaning
1 verticalDeg number (single precision) Largest up-or-down aiming error in degrees of an AI throw at a target (stored in radians at 0x005148b0).
2 horizontalDeg number (single precision) Largest sideways aiming error in degrees (radians at 0x005148b4).

Returns nothing.

Sets how far a thrown object may stray from its aim. When a human throws at a target, Human_ComputeThrowVelocity (0x002570e8) turns the throw sideways about the vertical axis and then up or down, each by a random part of the maximum scaled by the distance to the target over 30 m (between 0.1 and 1). An allied Warrior (brain type 3) gets 60% of the error. One level sets 5 and 5.

Notes. No error for a human with flag 0x40000 at +0xe0 (inferred: the player). The globals' default values are not traced. Readers: 0x00257a08, 0x00257a14.

  • Evidence: confirmed (code) at 0x0041d940; detail: traced
  • Wrapper 0x0035e480 (registered by RegisterBindings); calls 0x0041d940 Cfg_SetMaxThrowError
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level2 (mission 5)
  • Coney: implemented

CfgSetMeleeRange

CfgSetMeleeRange(near, far)
# Argument Read as Meaning
1 near number (single precision) Distance in metres (3), global 0x00510ab4.
2 far number (single precision) Distance in metres (5), global 0x00510ab8.

Returns nothing.

Stores the AI's two melee ranges (config_preload2.lua sets 3 and 5).

Notes. Unit inferred from the values.

  • Evidence: confirmed (code) at 0x00294690; detail: traced
  • Wrapper 0x0036a7f0 (registered by RegisterBindings); calls 0x00294690 Cfg_SetMeleeRange
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgSetOutdoorMode

CfgSetOutdoorMode(outdoor)
# Argument Read as Meaning
1 outdoor boolean (nil or 0 is false) true for an outdoor area, false for indoors.

Returns nothing.

Stores the outdoor flag in the game state (+0x3e4); global.lua switches it as the player moves between areas.

Notes. What the flag changes (lighting, weather, camera) is not traced.

  • Evidence: confirmed (code) at 0x0041d728; detail: traced
  • Wrapper 0x0036ad50 (registered by RegisterBindings); calls 0x0041d728 Cfg_SetOutdoorMode
  • Used by 15 of 467 script chunks (29 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 13 of 28 levels, first level80 (mission 2)
  • Coney: implemented

CfgSetStatTypeMax

CfgSetStatTypeMax(combat, crime, harmony, style, mission, bonus)
# Argument Read as Meaning
1 combat number, truncated to an unsigned integer Maximum combat points (16-bit).
2 crime number, truncated to an unsigned integer Maximum crime points.
3 harmony number, truncated to an unsigned integer Maximum harmony points.
4 style number, truncated to an unsigned integer Maximum style points.
5 mission number, truncated to an unsigned integer Maximum mission points.
6 bonus number, truncated to an unsigned integer Maximum bonus points.

Returns nothing.

Sets the six statistic categories' maximum points for the mission rating (six 16-bit values at 0x00715840). global.lua sets them per level from its points matrix.

Notes. Stored in the order mission, bonus, style, combat, crime, harmony. Category names come from global.lua's points matrix fields.

  • Evidence: confirmed (code) at 0x004223e8; detail: traced
  • Wrapper 0x0037c7a8 (registered by RegisterBindings); calls 0x004223e8 Cfg_SetStatTypeMax
  • Used by 2 of 467 script chunks (3 references); boot to menu: yes; mission 1: no; result used: no
  • Coney: implemented

CfgSetStatValue

CfgSetStatValue(table, index, value)
# Argument Read as Meaning
1 table number, truncated to an unsigned integer Statistic table 0-5; other values are ignored.
2 index number, truncated to an unsigned integer Entry index in that table.
3 value number, truncated to an unsigned integer Value (16-bit), e.g. points awarded for an event.

Returns nothing.

Writes one 16-bit entry of a statistics points table; config_preload2.lua fills tables 0-5 and level99 sets table 0 entry 0 to 1000.

Notes. Tables: 0 at 0x005971b8, 1 at 0x005971c0, 2 at 0x00715510, 3 at 0x00715500, 4 at 0x00715818, 5 at 0x00715830. No index check.

  • Evidence: confirmed (code) at 0x00422430; detail: traced
  • Wrapper 0x0037c8c0 (registered by RegisterBindings); calls 0x00422430 Cfg_SetStatValue
  • Used by 2 of 467 script chunks (46 references); boot to menu: yes; mission 1: yes; result used: no
  • Coney: implemented

CfgSetSteroTheftHandler

CfgSetSteroTheftHandler(fn)
# Argument Read as Meaning
1 fn string Name of a Lua function (dotted allowed) called when a car stereo is stolen, or nil to clear.

Returns nothing.

Registers the script callback for stealing a car stereo; the name is interned through the script system (slot +0xcc) and stored at 0x0051027c. The tutorial (level99_lesson1) uses it to count the stolen radio.

Notes. 'Stero' is the binding's own spelling. When the callback fires is inferred from the name and the scripts.

  • Evidence: confirmed (code) at 0x00236508; detail: traced
  • Wrapper 0x0035a790 (registered by RegisterBindings); calls 0x00236508 Cfg_SetStereoTheftHandler
  • Used by 6 of 467 script chunks (11 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 5 of 28 levels, first level87 (mission 3)
  • Coney: implemented

CfgSetTargetingPoints

CfgSetTargetingPoints(f1, n2, n3, n4, n5, n6, n7, n8, n9)
# Argument Read as Meaning
1 f1 number (single precision) Points per metre the enemy is inside the scorer's sight range (0x00510b4c).
2 n2 number, truncated to an integer Points for a stunned enemy (0x00510b58).
3 n3 number, truncated to an integer Points for an enemy outside the field of view (0x00510b5c).
4 n4 number, truncated to an integer Points for a knocked-down enemy (0x00510b60).
5 n5 number, truncated to an integer Points for a grabbed enemy (0x00510b64).
6 n6 number, truncated to an integer Ignored: read but not stored.
7 n7 number, truncated to an integer Points per near-a-train flag (0x00510b74; never counts).
8 n8 number, truncated to an integer Points for an enemy who targets the scorer (0x00510b6c).
9 n9 number, truncated to an integer Points for keeping the previous target (0x00510b84).

Returns nothing.

Stores the point weights the AI uses to score targets; config_preload2.lua sets them once. The sixth argument has no effect.

Notes. Callee 0x002946c0 never stores its sixth parameter. The score is Brain_ScoreEnemy (0x0029ce98); the terms are on the AI page (Choosing among enemies).

  • Evidence: confirmed (code) at 0x002946c0; detail: traced
  • Wrapper 0x0036a868 (registered by RegisterBindings); calls 0x002946c0 Cfg_SetTargetingPoints
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgSetTargetingPointsEx

CfgSetTargetingPointsEx(f1, n2, n3, n4, n5, n6, n7, n8, n9)
# Argument Read as Meaning
1 f1 number (single precision) Points per metre the enemy is inside the sight range of the scorer gang's leader (0x00510b50).
2 n2 number, truncated to an integer Points for an enemy who leads his gang (0x00510b54).
3 n3 number, truncated to an integer Points for an enemy grabbed from the rear (0x00510b68).
4 n4 number, truncated to an integer Points for a running enemy (0x00510b70).
5 n5 number, truncated to an integer Points for an enemy who is tagging (0x00510b78).
6 n6 number, truncated to an integer Points for an armed enemy who targets the scorer (0x00510b7c).
7 n7 number, truncated to an integer Points when no straight walkable line leads to the enemy (0x00510b90).
8 n8 number, truncated to an integer Base points when the scorer cannot chase the enemy (0x00510b94).
9 n9 number, truncated to an integer Points for an enemy who is a player (0x00510b80).

Returns nothing.

Stores the remaining AI target-scoring weights, beside CfgSetTargetingPoints'.

  • Evidence: confirmed (code) at 0x00294718; detail: traced
  • Wrapper 0x0036a9f8 (registered by RegisterBindings); calls 0x00294718 Cfg_SetTargetingPointsEx
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgSetTimeScale

CfgSetTimeScale(scale)
# Argument Read as Meaning
1 scale number (single precision) Game-timer speed factor (1 normal speed).

Returns nothing.

Writes a speed factor into the game timer object (0x0050b734 + 0x50), slowing or speeding up game time; no script calls it.

Notes. Storage confirmed (code) at 0x0041d968; that +0x50 scales the timer is inferred from the name.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035e560 (registered by RegisterBindings); calls 0x0041d968
  • Used by no script on the disc
  • Coney: not implemented

CfgSetTurnRates

CfgSetTurnRates(rate1, rate2, rate3, rate4, rate5, rate6)
# Argument Read as Meaning
1 rate1 number (single precision) Degrees (0 to under 90); converted to radians into 0x005101b0. Out-of-range values leave the old value.
2 rate2 number (single precision) Degrees, into 0x005101b8.
3 rate3 number (single precision) Degrees, into 0x005101c0.
4 rate4 number (single precision) Degrees, into 0x005101c8.
5 rate5 number (single precision) Degrees, into 0x005101d0.
6 rate6 number (single precision) Degrees, into 0x005101d8.

Returns nothing.

Sets six turn-rate angles (config_preload2.lua: 11, 16, 18, 18, 20, 24 degrees), converted to radians; each is accepted only in the range 0 to 90.

Notes. Probably one per gait or state (walk to sprint); the readers are not traced.

  • Evidence: confirmed (code) at 0x0023a7a0; detail: traced
  • Wrapper 0x0035e140 (registered by RegisterBindings); calls 0x0023a7a0 Cfg_SetTurnRates
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgSetWarriorSpotting

CfgSetWarriorSpotting(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false); default true Meant to switch whether the Warriors spot enemies; ignored: the game always stores 0.

Returns nothing.

Clears the game state's warrior-spotting switch (+0x56fc). Whatever the argument, the callee writes 0, so the binding can only turn the feature off.

Notes. Bug in the original: 0x0041d748 ignores its parameter. Scripts call it with both true and false.

  • Evidence: confirmed (code) at 0x0041d748; detail: traced
  • Wrapper 0x0036bdc0 (registered by RegisterBindings); calls 0x0041d748 Cfg_SetWarriorSpotting
  • Used by 25 of 467 script chunks (45 references); boot to menu: yes; mission 1: yes; result used: no
  • Later in the story: 26 of 28 levels, first level80 (mission 2)
  • Coney: implemented

CfgSetWarriorVandalize

CfgSetWarriorVandalize(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false); default true true (the default) sets the switch, false clears it.

Returns nothing.

Stores the warrior-vandalise switch, a word at W_GameState + 0x5700. The level set-up (0x00418c68, from InitLevel 0x0015fe90) clears it to 0 on every level load. No code reading it was found, so it has no visible effect in this build.

Notes. Only one level (92) calls it. Searched for direct 0x5700 accesses only; a read through another base register would have been missed. Inferred intent from the name: let the Warrior squad AI smash objects.

  • Evidence: confirmed (code) at 0x0041d758; detail: traced
  • Wrapper 0x0036bdf0 (registered by RegisterBindings); calls 0x0041d758 GameState_SetWarriorVandalize
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level92 (flashback 2)
  • Coney: not implemented

CfgSnap

CfgSnap(enabled)
# Argument Read as Meaning
1 enabled number, truncated to an unsigned integer Non-zero turns on snapping of attack direction onto targets (config_preload2.lua sets 1).

Returns nothing.

Stores a 0/1 flag at 0x005102b4 that the player attack routines (0x00280708, 0x00286cc8) use when choosing an attack direction from the left stick.

Notes. Read as a number (not a boolean) and normalised to 0/1.

  • Evidence: confirmed (code) at 0x0023a550; detail: traced
  • Wrapper 0x0035dd80 (registered by RegisterBindings); calls 0x0023a550 Cfg_SetSnap
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgSpeedClass

CfgSpeedClass(class, speeds)
# Argument Read as Meaning
1 class number, truncated to an integer Speed class 0-4; record at 0x006b6548 + class x 0x18.
2 speeds table of 6 numbers (t[1]..t[6]) Six speeds in metres per second: base, (no getter), walk, jog, run, sprint.

Returns nothing.

Fills one speed class's six speeds (Characters). In play the humans' own per-human values are used instead while 0x005101e0 is set.

  • Evidence: confirmed (code) at 0x00228888; detail: traced
  • Wrapper 0x003842c0 (registered by the script system); calls 0x00228888 Cfg_SetSpeedClass
  • Used by 1 of 467 script chunks (5 references); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgSteam

CfgSteam(object, colour, interval, puffInterval, size, growth, life, speed, rise, dragH, dragV, still)
# Argument Read as Meaning
1 object number, truncated to an unsigned integer Handle of a steam emitter (a part_steam particle object from the level's Objects table); no type check.
2 colour table of 4 numbers (t[1]..t[4]) Puff colour {r, g, b, a}, each 0-255; alpha is each puff's peak opacity: it fades in over the first update and out linearly over the life. Written back unchanged.
3 interval number, truncated to an unsigned integer 60 Hz ticks between puffs (the emitter's update interval).
4 puffInterval number, truncated to an unsigned integer Each puff's update interval in 60 Hz ticks; must not be 0 (it divides).
5 size number (single precision) Puff start size (each puff takes 0.8-1.2 times it).
6 growth number (single precision) Size added at each puff update (every puffInterval ticks), times a random 0.8-1.2: per update, not per second.
7 life number (single precision) Puff lifetime in seconds: round(life × 60) / puffInterval updates.
8 speed number (single precision) Start speed along the emitter's −x axis, metres per second (the velocity is integrated with elapsed time).
9 rise number (single precision) Start vertical speed (z), metres per second, times a random 0.8-1.2 per puff.
10 dragH number (single precision) Horizontal drag: at each update the start velocity's x and y lose start × (age / life) × dragH, so 1 brings them to 0 at the end of the life and 0 keeps them.
11 dragV number (single precision) The same for the vertical speed.
12 still boolean (nil or 0 is false) true gives the puffs no wind: otherwise each drifts with the vector at 0x006f31a0 times a factor of 0.005-0.015 times its current size (inferred: wind).

Returns nothing.

Configures a steam vent: sends the emitter message 0x27 with the colour (packed r, g, b, a), the two intervals and two vectors (dragH, dragV, size, growth) and (speed, rise, life, 1). While enabled and within 30 m and 20 m of the tests' points and the particle budget allows, the emitter spawns a sub_smoke puff every interval ticks (part_page1 rectangle 42-44). Each puff update sets the velocity to start + wind − start × (age / life) × drag, times a random 0.75-1.15, grows the size by growth and fades the alpha linearly. Details: Particles, Steam vents.

Notes. Traced for part_steam (update 0x003f6bf0, message handler 0x003f6b40, puff 0x003f61d8 / 0x003f6460); part_steam_huge and part_steam_large have their own handlers, not read. The wind vector's source and that the draw blends the size and colour over each update are inferred. Arguments renamed from n3, n4, f5-f11, flag.

  • Evidence: confirmed (code) at 0x0039be28, 0x003f6720; detail: traced
  • Wrapper 0x003792c0 (registered by RegisterBindings); calls 0x0039be28 Steam_Configure, 0x003f6720
  • Used by 13 of 467 script chunks (36 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 7 of 28 levels, first level87 (mission 3)
  • Coney: implemented

CfgStickDeflection

CfgStickDeflection(creepDeflection, runDeflection)
# Argument Read as Meaning
1 creepDeflection number (single precision) Ignored: the callee does not store it (global.lua passes DefCreepDeflection).
2 runDeflection number (single precision) Left-stick magnitude (0 to 1) above which a human runs instead of walking.

Returns nothing.

Sets the left-stick deflection threshold for running (0x005102e8), compared against the pad record's stick magnitude by the locomotion predicates. The first argument is read from Lua but never stored.

Notes. Callee 0x00236470 stores only its second float. Readers include 0x00225a50, 0x00225c10, 0x00225dc0, 0x00240e38, 0x00259578.

  • Evidence: confirmed (code) at 0x00236470; detail: traced
  • Wrapper 0x0035a250 (registered by RegisterBindings); calls 0x00236470 Cfg_SetStickDeflection
  • Used by 4 of 467 script chunks (4 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level95 (the hub)
  • Coney: implemented

CfgStrafe

CfgStrafe(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) Strafe setting flag (global 0x005104a8).

Returns nothing.

Stores a strafe flag for the player controls; never called by the scripts.

Notes. Storage confirmed (code) at 0x0023a588. Read only by the follow camera (0x0012b084): with CfgStrafeRStick also on, a locked-on player's right stick stops turning the camera (camera.md#right-stick).

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035de90 (registered by RegisterBindings); calls 0x0023a588
  • Used by no script on the disc
  • Coney: not implemented

CfgStrafeRStick

CfgStrafeRStick(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) true would make the right stick strafe (global 0x005104d0).

Returns nothing.

Stores a right-stick strafe flag; never called by the scripts.

Notes. Storage confirmed (code) at 0x0023a5e8. Read by Human_FightStanceMove (0x002424a8) and the follow camera (0x0012b074): with CfgStrafe also on, a locked-on player's right stick stops turning the camera (camera.md#right-stick).

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035dec0 (registered by RegisterBindings); calls 0x0023a5e8
  • Used by no script on the disc
  • Coney: not implemented

CfgSubtitles

CfgSubtitles(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) true shows cutscene subtitles (global.lua passes SCENESUBTITLES).

Returns nothing.

Stores the subtitle switch in the game state (+0x438), the field PM_Subtitles and the options menu write and the profile saves (Saving). It decides whether ordinary captions (cutscenes and movies) are drawn; emphasised kind-2 captions always are (Movies). The game state's reset turns it on for every language but English.

  • Evidence: confirmed (code) at 0x0041da30; detail: traced
  • Wrapper 0x0035e7b0 (registered by RegisterBindings); calls 0x0041da30 Cfg_SetSubtitles
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: yes; result used: no
  • Later in the story: 26 of 28 levels, first level80 (mission 2)
  • Coney: implemented

CfgTagSettings

CfgTagSettings(object, sprite, start, fade, depth)
# Argument Read as Meaning
1 object number, truncated to an unsigned integer Handle of a tag spot (a part_spray_tag particle object); anything that is not a particle system is ignored.
2 sprite number, truncated to an unsigned integer Sprite word of the finished tag's image: sheet in the top 16 bits, rectangle in the low 16 (0x50000 before any call). Message 0x27.
3 start number (single precision); default 0.5 A fraction stored at the tag's +0xc0 (default 0.5). Message 0x37. The stick game does not read it (it starts at the painted fraction +0xc8); its reader is not traced.
4 fade number (single precision); default 0.005 Opacity change per update (every second frame) while the tag fades in or out (default 0.005). Message 0x38.
5 depth number (single precision); default 1 Draw-order offset: the sprite batch's depth becomes 10 + depth × 0.1; a negative value gives 10 (default 1). Message 0x3b.

Returns nothing.

Configures a graffiti tag spot through four messages: the image its sprite batch draws (the batch is rebuilt), a start fraction (+0xc0), how fast the painted tag fades in when sprayed and out when cleared, and its draw depth. Level scripts call it for each tag spot at setup.

Notes. Handler 0x003fc8d8, update 0x003fca68 (every second frame), init 0x003fc600. start is stored at the object's +0xc0 (0.5 from init); the stick game (TagGame_Init 0x002741d8) instead starts at the tag's painted fraction +0xc8 (0 on a fresh tag), so start does not choose the stick game's start; who reads +0xc0 is not traced. The fade runs while the spot fades in or out after a spray (Crimes: tag spots). That the batch depth orders drawing is inferred. Arguments renamed from n2, f3-f5.

  • Evidence: confirmed (code) at 0x0039bc28, 0x003fc8d8; detail: traced
  • Wrapper 0x003795c0 (registered by RegisterBindings); calls 0x0039bc28 Tag_Configure, 0x003fc8d8
  • Used by 9 of 467 script chunks (47 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 5 of 28 levels, first level87 (mission 3)
  • Coney: implemented

CfgTagStartCallback

CfgTagStartCallback(fn)
# Argument Read as Meaning
1 fn string Lua function name called as fn(tagger, tag, flag) when a human starts spraying a tag, or nil (global.lua clears it).

Returns nothing.

Registers the script callback (interned, stored at 0x006b6870) fired when a tag (graffiti) starts: 0x00238f50 calls it with three object handles, the tagger (the human), the tag object (human +0x36c) and the flag sprayed from (the human's target +0x33c), asking no result.

Notes. It fires once per spray, not at HuTag: when the spray animation's hook (0x00277ed8) runs, 0x0022e610 sets the tagging state, tells the tag its tagger and calls 0x00238f50, which skips only a missing name or human. The tag's end reaches scripts as event 14 (self, tag, finished) instead. Crimes: the script callbacks.

  • Evidence: confirmed (code) at 0x00238f10; detail: traced
  • Wrapper 0x0035cc20 (registered by RegisterBindings); calls 0x00238f10 Cfg_SetTagStartCallback
  • Used by 6 of 467 script chunks (8 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 3 of 28 levels, first level87 (mission 3)
  • Coney: implemented

CfgTurnRate

CfgTurnRate(modeA, modeB, maxAngle, rate)
# Argument Read as Meaning
1 modeA boolean (nil or 0 is false) Flag at 0x00510308 (config_preload2.lua: true); with it clear the turn amount is scaled by the angle divided by maxAngle.
2 modeB boolean (nil or 0 is false) Flag at 0x00510304 (false); either flag enables the turn-rate code.
3 maxAngle number (single precision) Angle (radians) stored at 0x00510310 and doubled at 0x00510318 (2).
4 rate number (single precision) Rate factor stored at 0x0051030c and 0x00510314 (0.8).

Returns nothing.

Configures how fast a pad-controlled human turns toward the left stick's direction; the locomotion routines (0x00240898, 0x00240e38, 0x00245310) read these values.

Notes. Exact roles of the two flags are inferred from the readers' branches.

  • Evidence: confirmed (code) at 0x0023a5f8; detail: traced
  • Wrapper 0x0035dfe8 (registered by RegisterBindings); calls 0x0023a5f8 Cfg_SetTurnRate
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgTutorialMessage

CfgTutorialMessage(id, text)
# Argument Read as Meaning
1 id number, truncated to an integer Tutorial string id (TSTRING index).
2 text string The text; copied (0x003864e0) and its pointer kept at 0x00622fd0 + id x 4.

Returns nothing.

Stores one tutorial message string by id for the HUD's tutorial prompts; config_preload2.lua fills the table from the language file.

  • Evidence: confirmed (code) at 0x0041d9a8; detail: traced
  • Wrapper 0x0035e630 (registered by RegisterBindings); calls 0x0041d9a8 Cfg_SetTutorialMessage
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: implemented

CfgVerticalSightModifier

CfgVerticalSightModifier(factor)
# Argument Read as Meaning
1 factor number (single precision) Multiplier on the AI's vertical sight range (1.2 default; levels use 0.75 to 8).

Returns nothing.

Stores the AI vertical sight modifier (0x00510ad4).

Notes. How the sight test uses it is not traced.

  • Evidence: confirmed (code) at 0x00294808; detail: traced
  • Wrapper 0x0035e290 (registered by RegisterBindings); calls 0x00294808 Cfg_SetVerticalSightModifier
  • Used by 4 of 467 script chunks (4 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 3 of 28 levels, first level87 (mission 3)
  • Coney: implemented

CfgWarriorClass

CfgWarriorClass(classId, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13)
# Argument Read as Meaning
1 classId number, truncated to an integer Warrior class 0-9 (0-8 one per playable Warrior, 9 everyone else); selects a 14-byte record at 0x006b65c0 + classId x 14.
2 s1 number, truncated to an unsigned integer Byte +0x05: a player's health and its maximum in percent (0x00229c40; divided back at 0x0022a2a8).
3 s2 number, truncated to an unsigned integer Byte +0x06: a player's attack damage scale in percent (0x00229c40, 0x00217a98, 0x00236038); the pause Stats screen's Strength bar.
4 s3 number, truncated to an unsigned integer 16 bits at +0x00: the rage maximum (0x00223260).
5 s4 number, truncated to an unsigned integer Byte +0x02: the rage gain percentage (0x00264cf8).
6 s5 number, truncated to an unsigned integer Byte +0x03: idle rage decay, percent of the maximum per 20 s (0x002562d0).
7 s6 number, truncated to an unsigned integer Byte +0x04: rage drain while raging, percent of the maximum per 20 s (0x002562d0).
8 s7 number, truncated to an unsigned integer Byte +0x07, cuffing (1-3): picks the cuffing hold's stick-game times, 2, 3 or any other (0x00282b68, 0x00283078).
9 s8 number, truncated to an unsigned integer Byte +0x08, mash (1-3): the uncuff mash's gain per alternation, 1 x 1.5, 3 x 0.7, any other x 1 (0x0027e6d8).
10 s9 number, truncated to an unsigned integer Byte +0x09, tagging (1-3): the tagging game's tuning row, 0 as 1 and above 3 as 3 (0x002739d8).
11 s10 number, truncated to an unsigned integer Byte +0x0a, lock pick (1-3): the lock-pick dial's difficulty plus 1 (0x0022d790).
12 s11 number, truncated to an unsigned integer Byte +0x0b, stereo (1-3): the stereo theft's turns per stage, 1 for 0-1, else 3 x (n - 1) (0x0022dd08).
13 s12 number, truncated to an unsigned integer Byte +0x0c, mugging (1-3): picks the mugging stick game's times, 2, 3 or any other (0x00284ca0).
14 s13 number, truncated to an unsigned integer Byte +0x0d: stored, never read.

Returns nothing.

Fills one Warrior class record (stats as bytes and one 16-bit value) for the current difficulty; the difficulty configs set all nine playable classes, config_preload2.lua class 9.

Notes. Layout confirmed (code) at 0x00228a70. Every reader goes through 0x00222b58; each byte's use is confirmed (code) at the cited address, and +0x0d has none (Warrior classes).

  • Evidence: confirmed (code) at 0x00228a70; detail: traced
  • Wrapper 0x00369d10 (registered by RegisterBindings); calls 0x00228a70 Cfg_SetWarriorClass
  • Used by 6 of 467 script chunks (55 references); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgWarriorCommand

CfgWarriorCommand(id, text)
# Argument Read as Meaning
1 id number, truncated to an integer Warrior command id (COMMAND index).
2 text string The command's display text; copied and its pointer kept at 0x006007c0 + id x 4.

Returns nothing.

Stores the display text of one squad command (the orders given to the other Warriors) by id; config_preload2.lua fills the table.

  • Evidence: confirmed (code) at 0x0041dad8; detail: traced
  • Wrapper 0x0035e848 (registered by RegisterBindings); calls 0x0041dad8 Cfg_SetWarriorCommandText
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: implemented

CfgWarriorUpgrade

CfgWarriorUpgrade(u1, u2, u3, u4)
# Argument Read as Meaning
1 u1 number, truncated to an unsigned integer Byte at 0x006b6650 (10): the punch damage bonus in percent with unlockable (6, 5), brass knuckles.
2 u2 number, truncated to an unsigned integer Byte at 0x006b6651 (20): the kick damage bonus with (6, 6), steel toe caps.
3 u3 number, truncated to an unsigned integer Byte at 0x006b6652 (10): the power meter maximum bonus with (6, 11).
4 u4 number, truncated to an unsigned integer Byte at 0x006b6653 (20): the stamina maximum bonus with (6, 12).

Returns nothing.

Stores four upgrade amounts (bytes at 0x006b6650-0x006b6653), read through the getter 0x00228860; config_preload2.lua sets 10, 20, 10, 20.

Notes. Read at 0x0021b518, 0x0021b570, 0x00223068 and 0x00223188, each only while its unlockable is unlocked (Inventory, unlockables and statistics).

  • Evidence: confirmed (code) at 0x00228ad8; detail: traced
  • Wrapper 0x00369f38 (registered by RegisterBindings); calls 0x00228ad8 Cfg_SetWarriorUpgrade
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

CfgWarriorWeapons

CfgWarriorWeapons(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) true lets the AI Warriors pick up weapons; false stops them.

Returns nothing.

Stores the warrior-weapons switch in the game state (+0x5704, 1 by default). While it is off, the AI-controlled Warriors' item search (0x002bbfa0, 0x002bcf88) skips any pickup whose object type is a weapon (type class 4), so they fight bare-handed but still pick up other items. Level 5 turns it off and back on.

Notes. The game state constructor (0x00418588) and another reset (0x00418c68) set it to 1. WarriorBrain_Think (0x003052f0, the read at 0x003055e0) applies the same rule to the Warriors' own pick-up search (AI page, The Warriors' pick-ups). The player's own pickups are not affected (inferred: only brain code reads it).

  • Evidence: confirmed (code) at 0x0041d770; detail: traced
  • Wrapper 0x0036be20 (registered by RegisterBindings); calls 0x0041d770 GameState_SetWarriorWeapons
  • Used by 1 of 467 script chunks (2 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level5 (mission 7)
  • Coney: implemented

CfgWorkoutParams

CfgWorkoutParams(rates1, rates2, rates3, factor)
# Argument Read as Meaning
1 rates1 table of 3 numbers (t[1]..t[3]) Three floats copied to 0x00510690: per-step progress increments for the workout minigame.
2 rates2 table of 3 numbers (t[1]..t[3]) Three floats copied to 0x005106a0.
3 rates3 table of 3 numbers (t[1]..t[3]) Three floats copied to 0x005106b0.
4 factor boolean (nil or 0 is false) Read as a boolean in Lua, then stored as a float at 0x005106ac (config_preload2.lua passes 1.8, which arrives as 1).

Returns nothing.

Stores the workout (training) minigame's tuning: three 3-float tables and a factor, read by the workout routine 0x00255540, which adds the first table's values to a progress value clamped to 1.

Notes. The fourth argument goes through the boolean helper, so any non-nil value other than 0 becomes 1.0: the 1.8 the script passes is lost. Likely a bug in the binding.

  • Evidence: confirmed (code) at 0x00234530; detail: traced
  • Wrapper 0x0035c5a0 (registered by RegisterBindings); calls 0x00234530 Cfg_SetWorkoutParams
  • Used by 2 of 467 script chunks (4 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level95 (the hub)
  • Coney: implemented