warzone2100 icon indicating copy to clipboard operation
warzone2100 copied to clipboard

js api: Expose `weaponmodifier` and `structuremodifier` via Stats object

Open aubergineagain opened this issue 4 months ago • 0 comments

Describe the feature you'd like

Expose contents of following json files as properties of the global Stats object:

  • structuremodifier.json
    • Note: this would also require structure Strength property to be exposed via objects in Stats.Building (see #4696)
  • weaponmodifier.json
    • _Note: this would also require propulsion Type property to be exposed via objects in Stats.Propulsion (see #4701)

As the property keys between the two files are unique (eg. structures are Strength-based, weapons are Propulsion-based) they could be merged together in to a single Modifiers object which would keyed by weaponEffect with object values that are key-value pairs of the various damage modifiers.

Describe why do you think it is needed

The data is currently not exposed via the js api yet is required for AI bots to make informed decisions about what weapons to use against various targets.

aubergineagain avatar Dec 08 '25 04:12 aubergineagain