Scope: TNC only. A corpus census of 340 AI entity decls across all 29 archives, plus a string/pointer cross-check against the game executable's compiled schema tables. Builds on the existing finding that enemy health lives at entityDef.aiHealth.components.components[0].max/cur — re-measured and confirmed here, not rediscovered.
Summary
The question was where AI tuning lives in TNC's decls and what the smallest edit is that makes enemies noticeably harder or easier. An AI's entire tuning lives under one decl (the entityDef it spawns as), split into clear sibling blocks: hit points, a 480-leaf behavior/perception/accuracy block, faction-based hostility, and starting weapon. There is no "aggression" field anywhere — neither in any decl nor as a compiled string in the executable at all — hostility is entirely faction-based. "Difficulty scaling tables" turned out to be a misnomer for what actually ships: the one decl-level hook shaped like a per-archetype difficulty table is empty in retail and carries no numeric payload even if read; real difficulty scaling is seven global cvars, not a decl table. Decl field names were cross-checked as compiled schema entries in the game executable (static, read-only); the proposed health edit was proven to touch only its three intended values by diffing the patched decl text. Neither of those is a game launch — the mechanism itself ("set"-style decl edits reaching the running game) is confirmed in game only via an unrelated, already-proven edit (pistol magazine size), not this specific field.
1. Corpus structure
340 entityDefs descend from the AI base class across all 29 archives. Twelve archetype "bases" (soldier, commander, elite übersoldat, supersoldat, attack dog, boss, drone, civilian, etc.) sit directly under the root; every other AI inherits, directly or transitively, from one of these twelve.
| Root archetype | Descendants | What |
|---|---|---|
| civilian base | 152 | non-combat NPCs, not "enemies" |
| soldier base | 125 | soldiers, elites, officers — 68% of real combat archetypes |
| commander base | 25 | commanders |
| supersoldier base | 9 | elite super-soldiers |
| combat drone base | 6 | drones |
| über-soldier base | 6 | über-soldiers |
| attack-dog base | 5 | dogs |
| boss base | 3 | bosses |
| 4 misc bases | 2 each | mechs, alligator, etc. |
Combat archetypes total 185 of the 340; soldier base alone covers 125 of those 185 — the single biggest lever for "enemies in general."
2. The field surface
Health is its own block, separate from the behavior block:
edit.aiHealth.components.components[0].{max,cur,starting} # the HP field
edit.aiHealth.components.components[1].* # always 0 in all 340 decls, corpus-wide — dead, unused second health pool
The behavior block has 480 distinct field paths corpus-wide, grouped as: perception (detection radius, field of view, light-meter usage), AI-side weapon handling (which weapon slot, swap behavior — the weapon itself is a separate starting-inventory field), melee/grenade damage references, and accuracy. Accuracy is an 8-tier named enum (from "use the skill/difficulty default" up to "perfect") explicitly overridden on only 2 of 74 sampled archetypes; the actually continuous accuracy knob lives one hop away, in a separate, shared "tracking parameters" decl referenced by name — lowering its aim-error value toward 0 is, functionally, "never misses," and it is shared across every soldier-type AI that doesn't set its own tracking parameters, so it is just as corpus-wide-leveraged as the soldier-base health field.
"Aggression" does not exist as a field, anywhere — confirmed both by a corpus-wide text search and by its total absence as a compiled string in the game executable. What the game has instead is faction membership: each AI names a faction decl, and that decl's relationship table assigns one of 9 compiled attitude values (hate, dislike, neutral, like, love, etc.) toward other factions — this is exactly the mechanism an existing shipped mod already uses to make two factions fight each other.
3. Difficulty: a cvar layer, not a decl table
The one decl-level hook shaped like a per-archetype difficulty table ships empty in retail, and even its one populated entry carries no numeric payload field at all — there is nothing to scale with even if a filled block were read. The real difficulty system is seven cvars scaling AI-incoming damage per difficulty tier, three scaling player-incoming damage, three scaling player health/armor, plus three manual debug-override cvars — all confirmed to have real code cross-references in the executable (not just unused strings). None of these are per-archetype — they are single global multipliers, which is why only the decl-level health edit can target one archetype specifically.
4. Cross-checked against the compiled executable
For 15 real field/cvar names, each exists as a compiled string in the executable with exactly one schema-table pointer reference — proof the engine's decl-binding code knows the field, not just that game-data text happens to use the word. Two negative controls (aggression, and a fabricated nonexistent field name) both resolve to zero occurrences anywhere in the executable. This proves the field is compiled into the schema; it does not prove a specific code path reads it every frame (that needs a decompiler, not available for this pass).
5. Modder reference
| Want to change… | Edit this path | On this decl | Scope |
|---|---|---|---|
| one archetype's max HP | edit.aiHealth.components.components[0].{max,cur,starting} |
that archetype's base (or one specific NPC) | per-decl, inherited downward |
| hit-rate for most soldiers at once | edit.aimError.aimError |
the shared default tracking-parameters decl | every AI using the default tracker |
| one archetype's accuracy tier | edit.aiEditable.skill.aimAccuracy |
that archetype's base | per-decl |
| detection range/field of view | the perception sub-block | that archetype's base | per-decl |
| melee punch damage | the damage decl the attack references | that damage decl |
shared by every AI referencing it |
| which weapon an archetype spawns with | the starting-inventory item field | that archetype's base | per-decl |
| who an archetype fights | add a relationship entry with an attitude value | the relevant faction decl |
per-faction |
| overall difficulty | the 7+3+3 difficulty cvars, or the difficulty splines | cvars / table decls (not editable by this project's mod system for the cvars) |
global |
6. The smallest decl-only "harder/easier enemies" mod
One decl, three numbers, using the exact set-style edit every shipped mod already relies on. Targets the soldier base decl, which reaches 125 of 340 AI archetypes (68% of the real combat roster):
{
"id": "example.tnc_aidecl_soldiers_tougher",
"name": "Soldiers: Much Tougher",
"spiel": "tnc",
"priority": 150,
"assets": {
"entityDef:ai/soldier/soldier_base": {
"set": {
"edit.aiHealth.components.components[0].max": 300,
"edit.aiHealth.components.components[0].cur": 300,
"edit.aiHealth.components.components[0].starting": 300
}
}
}
}
For "easier/near one-hit-kill," use 5 instead of 300. The patched decl re-parses cleanly and a diff against the original touches exactly these three numeric leaves and nothing else.
Failed hypotheses
- Per-difficulty decl variants (e.g. a separate "hard" soldier decl) — none exist; difficulty is not an archetype axis at all.
- A dedicated "weapons" sub-block inside the behavior block — doesn't exist; weapon-related tuning is scattered across combat-behavior and starting-inventory fields instead.
- The second (always-zero) health component is a used armor/shield pool — refuted corpus-wide, it is dead data in every shipped AI.
- "Aggression" exists under a different name (a tactical-positioning weight field was checked and ruled out; it's a cover-selection weight, not a hostility knob) — the only real mechanism is faction attitude.
Open questions
- Whether the empty difficulty-mapping hook is ever actually read by a live code path — only its schema presence was confirmed, not its consumer (needs a decompiler).
- Whether the shared aim-error field meaningfully changes hit rate at runtime — schema-bound and referenced by name, but its numeric effect was not traced.
- Whether the same
aiHealthlever exists in the other game (The New Order) the same way — plausible by analogy (an existing doc for that game uses the identical field path), not independently re-verified here. - Whether raising the soldier base's HP is actually visible in game as "clearly harder" — the decl-edit mechanism itself is proven in game (via an unrelated field), this specific field was not launch-tested.
In-game test (for the tester)
- Save the mod above, enable it, build and run normally.
- On the custom kit map, shoot a regular soldier with the pistol and count hits. With the "harder" variant it should take noticeably more hits than the untouched game; with the "easier" variant, one pistol shot should be enough. If no difference shows, check that the soldier actually inherits from
ai/soldier/soldier_baseand not one of the other eleven archetype bases.