Turret XP


Track XP, levels, and combat stats for vanilla gun turrets.

Tweaks
an hour ago
2.0
0
Combat

Changelog

Version: 0.4.3
Date: 2026-06-04
  Features:
    - Added a real Veteran Core feeder inventory entity that is created next to a turret when a Veteran Core is installed.
    - Element unlock projects and element mastery milestones now consume matching materials from the feeder inventory.
    - Added feeder status to the Evolution panel, showing whether the feeder exists, slot use, and relevant element materials waiting inside it.
  Changes:
    - Removed player-inventory material feeding. Element materials must now be inserted into the feeder port like a machine input.
    - Extracting or mining a turret with an installed Veteran Core now destroys the feeder port and spills leftover feeder contents.
    - Existing installed cores create a feeder port automatically the next time they refresh.
  Notes:
    - If no adjacent tile is available, the core remains installed but material projects will wait until space is cleared and a feeder can be created.
Version: 0.4.2
Date: 2026-06-04
  Features:
    - Added hidden gun-turret body variants for specializations so Sniper, Machine Gun, Bulwark, and Brawler change real turret range, cooldown, damage modifier, and health values.
    - Added short visual feedback for bounce, pierce, fire, electric, explosive, and combo upgrade effects.
    - Added element mastery milestones after element unlocks, using the same element resource for ongoing progression.
  Changes:
    - Extracting a Veteran Core now returns the turret body to the normal gun turret.
    - Replaced exponential level scaling with linear per-level scaling so high levels remain playtestable through level 100.
    - Changed powerful augments to cost one augment point per rank, with one augment point earned every ten levels starting at level 30.
    - Removed material deposit buttons. Element projects and mastery milestones now consume the matching carried item automatically while the turret is open.
    - Simplified the top of the Turret XP panel by removing the redundant turret/name/ammo row.
    - Updated specialization and augment copy to reflect their actual behavior.
  Notes:
    - Specializations are now prototype-backed turret stat changes. Core upgrades, augments, elements, and combos remain runtime upgrade effects.
Version: 0.4.1
Date: 2026-06-04
  Features:
    - Added the Veteran Core, a non-stackable item-with-tags profile item for choosing which gun turrets become unique progression turrets.
    - Added Veteran Core install and extract controls to the Turret XP panel.
    - Moved XP, kills, damage, evolution choices, active material projects, and dev XP onto the installed core profile.
    - Added safe turret movement: mining a turret with an installed core returns the normal turret item and separately returns or spills the Veteran Core.
    - Added optional core-carried turret names with floating labels rendered as "name (lvl N)" above the current turret body.
    - Added a dev button to create a test Veteran Core for local playtesting.
    - Added compact always-visible dev controls above the Evolution list so playtest level/material buttons are not hidden below scroll content.
  Changes:
    - Ordinary gun turrets stay stackable and do not gain XP until a Veteran Core is installed.
    - Existing 0.4.0 entity-keyed turret progression migrates to an installed legacy Veteran Core when that turret is next opened or touched by runtime logic.
    - Changed the Evolution list to use a vertically scrollable area so it does not expand beyond the vanilla turret GUI height.
    - Simplified locked Evolution sections to centered "Unlocks at level ..." gate messages.
    - Simplified core upgrade rows to name, rank, and a compact "+" allocation button.
    - Replaced the first core upgrade set with Damage, Regeneration, Lifesteal, Crit Chance, and Crit Damage.
    - Removed the always-visible Elements/Specialization summary line from the Evolution panel.
  Notes:
    - V0.4.0 was uploaded to the Mod Portal for playtesting before this follow-up release.
    - Destroyed turrets currently lose the installed core/profile; mined turrets return it.
Version: 0.4.0
Date: 2026-06-04
  Features:
    - Replaced the experimental skill tree with a simpler five-section Evolution list.
    - Added infinite core upgrades that spend one point per rank: Damage Drills, Field Repair, Siphon Plating, Veteran Logbook, and Lucky Loader.
    - Added level-gated element unlock projects at levels 10 and 40 for Explosive, Fire, and Electric elements.
    - Added material project progress bars, carried-item deposit buttons, and permanent element assignment when requirements are complete.
    - Added a free level-20 specialization choice: Sniper, Machine Gun, or Bulwark.
    - Added level-30 powerful augments with doubling point costs: Bullet Bounce, Piercing Follow-through, and Longshot Optics.
    - Added first-draft runtime combat effects for bonus damage, crits, bounce, pierce follow-through, fire, electric arcs, explosive splash, mixed-element combos, passive repair, and vampiric healing.
    - Added dev buttons in the Turret XP panel to grant quick levels and complete active material projects for playtesting.
  Changes:
    - Removed the embedded click-drag skill-tree spike and its custom input because it did not function reliably in the relative turret GUI.
    - Migrated old 0.3.x skill ranks into equivalent 0.4.0 core upgrade ranks when possible.
Version: 0.3.2
Date: 2026-06-04
  Features:
    - Added an embedded click-drag panning spike for the skill tree inside the existing Turret XP panel.
  Changes:
    - Added logical skill-tree cells so drag gestures can shift the scroll focus without opening a separate window or replacing the turret GUI.
    - Added a hidden custom input linked to Factorio's normal left-click GUI/open action to capture drag start positions without blocking normal GUI clicks.
    - Added hover-aware logical tree cells so the scroll focus can move while the cursor crosses the embedded graph.
  Notes:
    - The panning uses GUI hover transitions and click release because Factorio runtime GUI events expose click positions, but not continuous child-widget drag deltas for an embedded relative panel.
Version: 0.3.1
Date: 2026-06-04
  Changes:
    - Rebuilt the skill tree as a larger two-axis scrollable surface with a central gun-turret root and branching technology-style nodes.
    - Changed skill hover tooltips to show only the next allocated effect, using rich-text color for readability.
    - Changed the root turret node tooltip to summarize currently allocated skill bonuses.
    - Removed skill tooltip flavor text, explanatory click text, and the skill panel title.
    - Changed the XP progress bar to a custom solid style so it no longer reads as a split productivity-style bar.
  Documentation:
    - Documented the current `entity-gui-lib` decision: useful for future full GUI replacement, but not needed for this focused relative-panel/tree update.
Version: 0.3.0
Date: 2026-06-04
  Features:
    - Added a first skill tree panel below the main Turret XP panel.
    - Added per-turret skill points derived from level minus spent ranks.
    - Added four allocatable baseline skills: Ballistics Drill, Kill Chain, Field Repairs, and Targeting Data.
    - Added active skill effects for XP modifiers and passive Field Repairs healing.
  Changes:
    - Simplified the top panel into one sober stats table with HP, shooting speed, range, damage, estimated DPS, kills, and damage dealt.
    - Moved loaded ammo and the gun turret icon into the title row.
    - Removed the quality text row, prototype info marker, bottom no-bonuses note, progression section, kill-credit row, XP-source rows, and total-XP row.
    - Kept the XP area to one progress bar plus compact progress text.
  Bugfixes:
    - Filtered Factorio's hidden `quality-unknown` prototype out of custom quality summary tooltips.
Version: 0.2.0
Date: 2026-06-04
  Features:
    - Added Factorio Library (`flib`) as a required dependency and started using its GUI styles for slot buttons, pushers, and status indicators.
    - Added quality summaries on hover for quality-affected HP and range rows using the real `[img=quality_info]` marker and runtime quality prototypes.
    - Added estimated DPS, damage XP, and kill-credit XP rows to make current combat output and XP sources easier to understand.
  Changes:
    - Rebuilt the Turret XP relative panel with vanilla-like shallow/deep frames, subheaders, richer spacing, status indicators, and a more scannable progression block.
    - Replaced the incorrect `utility/tip_icon` sprite with the same `[img=info]` rich-text marker pattern used by Factory Planner.
    - Updated the panel in place during refresh ticks instead of destroying and rebuilding it, making hover tooltips and reading flow more stable.
    - Changed range display to use turret attack range plus quality multiplier instead of the broader turret prototype range.
  Notes:
    - The quality marker tooltip is a custom summary because Factorio does not expose the native Factoriopedia quality popover as an arbitrary runtime GUI widget.
Version: 0.1.4
Date: 2026-06-04
  Bugfixes:
    - Fixed shooting speed research bonuses not showing by deriving the ammo category from loaded ammo or attack parameters.
    - Fixed damage research display to include both ammo damage and gun turret attack research modifiers.
  Changes:
    - Removed the experimental custom quality stat marker because it did not reuse Factorio's built-in quality stat marker/popover behavior.
    - Replaced gray framed custom info buttons with the exposed vanilla `utility/tip_icon` sprite; if that sprite is unavailable, the panel leaves the cell empty instead of showing a fake marker.
  Notes:
    - Exact vanilla quality stat pills inside arbitrary custom GUI rows are deferred until a supported API path or dependency is confirmed.
Version: 0.1.3
Date: 2026-06-04
  Changes:
    - Reworked the Turret XP panel to better match vanilla GUI structure with an inner shallow frame, slot-style ammo display, simpler section headers, and compact row info buttons.
    - Moved the prototype note behind a top info button instead of showing it as a full paragraph at the bottom of the panel.
    - Updated shooting speed and damage display to show base values plus force research bonuses in a vanilla-like format.
    - Colored positive research bonus values green for easier scanning.
Version: 0.1.2
Date: 2026-06-04
  Features:
    - Added runtime-global mod settings for XP per damage, XP per kill credit, base level XP, and level XP growth.
    - Added contribution-based kill credit so gun turrets earn proportional kill XP even when another source lands the final hit.
    - Added a quality-aware gun turret icon to the Turret XP panel with the vanilla entity-with-quality tooltip.
  Changes:
    - Rebalanced default XP pacing to make damage worth much less XP and level requirements grow exponentially.
    - Reworked displayed progression to derive from lifetime damage and kill credit using the current settings.
    - Updated range display to match the vanilla turret hover range instead of applying ammo range modifiers.
    - Updated shooting speed display to include force gun speed bonuses in a vanilla-like base plus bonus format.
    - Reorganized the Turret XP panel to make progression and current turret stats easier to scan.
Version: 0.1.1
Date: 2026-06-04
  Bugfixes:
    - Fixed a crash when opening a gun turret caused by reading max health from the turret prototype instead of the turret entity.
    - Hardened optional prototype stat reads used by the Turret XP panel.
  Documentation:
    - Added library/framework candidates to consider for future GUI, migration, and debugging work.
Version: 0.1.0
Date: 2026-06-04
  Features:
    - Adds a Turret XP panel to the vanilla gun turret GUI.
    - Tracks per-turret XP, level, kill count, and lifetime damage dealt.
    - Awards XP from damage dealt by gun turrets and a small bonus on kills.
    - Shows first-pass turret stats: HP, attack speed, range, loaded ammo, estimated ammo damage, kills, total damage, and total XP.
  Notes:
    - Level bonuses are not applied to turret combat stats yet; this release focuses on reliable tracking and GUI feedback.