Home › Dev CE (experimental) › PlayerWMDs

Experimental: needs Dev CE (fork of the Community Extension, release zip and source). A GameCore that adds these Lua methods by calling engine functions directly. Not part of the upstream Community Extension, single-player testing only. Descriptions on these pages were written by an AI assistant from decompiled code and are marked inferred unless a test result confirms them.

PlayerWMDs

2 methods (Dev CE test build). this is found with the game's own IPlayerWMDs instance resolver (plain).

Method Signature Purpose (AI-written, inferred) Tested Engine function Current
GetAllWMDCounts PlayerWMDs:GetAllWMDCounts() → number Sums the player's stockpile counts over all WMD definitions, treating an invalid index as -1. plumbing ✓ — 0x35f0a0
SetWeaponCount PlayerWMDs:SetWeaponCount(eWMD: integer, iValue: integer) Sets the player's stockpile count of a WMD type and sends a reporting event with the player and WMD type. plumbing ✓ — 0x35f330

Details

GetAllWMDCounts

Input checks: Invalid WMD indices contribute -1.

Multiplayer: read-only, sums stockpile array. Risk: low (Pure getter.). Confidence of the reading: medium.

SetWeaponCount

Arguments: eWMD — WMD type; iValue — New stockpile count

Writes - WMD stockpile array entry at WMDs+0x98

Side effects - Reporting event 0x23f12549 (player, WMD)

Input checks: Ignores -1 type; no upper bound check on the type index and no range check on value.

Multiplayer: may-desync, writes player stockpile. Risk: medium (No bounds check against array size.). Confidence of the reading: high.