Skip to content

Fix ammo loading on all turrets after w237/238 (ammo-table migration + slot-filter fix)#15

Closed
asconley wants to merge 2 commits into
AgentKush:mainfrom
asconley:main
Closed

Fix ammo loading on all turrets after w237/238 (ammo-table migration + slot-filter fix)#15
asconley wants to merge 2 commits into
AgentKush:mainfrom
asconley:main

Conversation

@asconley

Copy link
Copy Markdown
Contributor

Summary

Restores ammo loading on all 15 turret variants, which broke with the Week 237/238
update. Builds on v3.3 (mesh fix) — this PR is purely the ammo side. All changes are
additive; no vanilla rows are overwritten.

What broke

Two separate things, both from the update streamlining game tables:

  1. Dead ammo categories. The per-type vanilla ValidAmmoTypes rows the turrets
    referenced (AllPistol, AllArrows, AllBolts, AllJavelins, Rock_Golem_Gun,
    etc.) were removed/renamed, so every turret's ammo reference dangled.
  2. Slot tag filter. All turrets reused the vanilla Inventory_Turret_Pistol,
    whose slot only admits Item.Ammo.*-tagged items. Even after fixing the ammo rows,
    arrows/bolts loaded but throwing spears (Item.Weapon.Spear.Thrown) and stone
    (Item.Resource.Stone) were rejected at the slot before ValidAmmoTypes was checked.
    Javelins were also renamed *_Throwing_Spear (the word "Javelin" was dropped).

Changes (all additive)

  • D_ValidAmmoTypes — 9 self-contained TV_ rows (Pistol, AssaultRifle, Rifle,
    Sniper, Shotgun, Bolts, Arrows, Javelin, Rock) populated from current item names.
  • D_TagQueries — 2 new slot queries: TV_Thrown_Ammo (ANY(Item.Weapon.Spear.Thrown))
    and TV_Rock_Ammo (ANY(Item.Resource.Stone)).
  • D_Inventory / D_InventoryInfo — 3 custom turret inventories at 4 slots each:
    standard ammo, thrown spears, and stone.
  • D_Turret — repointed 14 turrets to the new TV_ ammo rows (Flamethrower left on
    vanilla BioFuel, which survived the update).
  • D_ItemsStatic — repointed 5 turret items (Bow, Crossbow, RapidCrossbow, Javelin,
    Rock) to the matching new inventory.

Ammo lists were verified against the current extracted D_ItemsStatic and cross-checked
with Jimk72's All_Ammo_Turret and Ferani's Compatible_Ammo for the current naming
(e.g. the 5.56 Ammo_AssaultRifle_Round vs 7.62 Ammo_Rifle_Round split, and the
*_Throwing_Spear rename). Self-contained TV_ rows mean future vanilla table changes
won't re-break this.

Testing

  • ✅ All 15 turrets load their correct ammo type in-game.
  • 🔲 Firing/projectile pass still in progress. One known caveat: the Quarrite Gun applies
    a weapon-side projectile-damage bonus the turret won't have, so the Rock Thrower's
    stone may hit softer — likely a damage-tuning tweak, not a mechanic issue.

Notes

The Rock Thrower fires real Stone (which carries its own Ballistic + AmmoType),
not a substitute. Open to feedback on naming/conventions for the TV_ rows if you'd
prefer something else.

AgentKush added a commit that referenced this pull request Jun 29, 2026
…p of v3.4 meshes - TV_ ammo rows, slot tag-queries, custom inventories for spears/stone
@AgentKush

Copy link
Copy Markdown
Owner

Thanks for this, @asconley — genuinely sharp work. 🙏

The slot tag-filter catch was the missing piece — spears (Item.Weapon.Spear.Thrown) and stone (Item.Resource.Stone) getting rejected at the inventory slot before ValidAmmoTypes was ever checked. And the self-contained TV_ rows are a clean, future-proof call.

I've folded your ammo fix into v3.6 rather than merging directly, because main had a separate mesh regression to undo first (an earlier merge had swapped the turret models for a generic fabricator box). So v3.6 = restored meshes + your ammo fix. While I was in there I also expanded the TV_ lists to the full current game sets — they were just missing the universal Ammo_EDS round and the DLC Scyther_Throwing_Spear.

All 15 turrets now load and fire their correct ammo in-game — tested and confirmed. You're credited in the changelog.

Closing since it's all live on main now. Thanks for jumping in — please send more!

PS: that red ✗ on the checks wasn't your code — GitHub blocks fork PRs from posting the validator's result comment (a 403). I've fixed the workflow so it won't fail like that for contributors anymore.

@AgentKush AgentKush closed this Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants