A Diablo like RPG stats system - now with magic! | PD fork: caster-force spells + exp token craftable + Allows other mods to add spells. fixed multiplayer pvp, and desync issues. installing pd_rpg_extra_spells is recommended!
Mods introducing new content into the game.
Version: 2.1.21
Date: 2026-01-30
- Fixed Spell UI mana display updating in real time during mana regeneration.
Version: 2.1.20
Date: 2026-01-30
Fix:
- Runtime/remote spells registered via RPG.register_spell now correctly consume mana on successful cast (addon spells couldn't call funcs.remove_mana across remote).
Version: 2.1.18
Date: 2026-01-29
Changes:
- Removed temporary spells 'Summon Turret' and 'Summon Artillery' from the core mod.
- These spells are now provided by PD_RPG_Extra_Spells via the runtime spell registration API.
Version: 2.1.14
Date: 2026-01-29
Fix:
- Runtime spell registration now works even if another mod calls RPG.register_spell during its on_init before RPG's on_init (buffers registrations until global exists).
Version: 2.1.13
Date: 2026-01-29
Changes:
- Add runtime spell registry + remote API so other mods can register spells into the existing RPG spell UI (supports hotkeys + mana cost + cooldown).
- Remote interface: add_new_spell now registers runtime spells (plus new register_spell/unregister_spell/clear_runtime_spells).
Version: 2.1.12
Date: 2026-01-29
Fix:
- XP token crafting: removed unreliable queue-cancel approach and replaced it with a next-tick cleanup that removes any minted token output first, then refunds ingredients (prevents the 'free token when no existing stack' bug).
Version: 2.1.11
Date: 2026-01-29
Fix:
- XP token crafting now properly blocks minting when you don't have enough XP (prevents free tokens).
Version: 2.1.6
Date: 2026-01-29
- Fix spell UI stats row: show Cost/Mana/Max/Lvl/XP in a single centered, stretchable line.
Version: 2.1.5
Date: 2026-01-29
Changes:
- Fix spell GUI stat row layout so all stat blocks (Cost/Mana/Max/Lvl/XP) render correctly and stretch.
Version: 2.1.3
Date: 2026-01-29
Changes:
- UI: add small labels (Cost/Mana/Max/Lvl/XP) above the mana/level/xp numbers in the spell GUI.
Version: 2.1.2
Date: 2026-01-29
Changes:
- UI: add Level and XP readouts to the spell GUI.
Version: 2.1.0
Date: 2026-01-29
Changes:
- UI: adjust spell GUI layout so mana and cooldown use extra space when more slots are enabled.
Version: 2.1.1
Date: 2026-01-29
Changes:
- Fix: mana numbers and cooldown bar now properly stretch to the spell GUI width.
Version: 2.0.99
Date: 2026-01-29
Changes:
- Fix: resolved Lua EOF syntax error in prototypes/custom_inputs.lua (startup crash).
Version: 2.0.98
Date: 2026-01-29
Changes:
- Refactor: modularized data stage prototypes and final-fixes for easier maintenance.
- Perf: runtime settings now apply on change (no periodic polling).
- Cleanup: removed redundant quickslot init call.
Version: 2.0.97
Date: 2026-01-28
- Fix: CTRL+1..CTRL+9 hotkeys now always cast their assigned slot spell (works on old saves).
- Fix: Add migration to ensure 9-slot quickslot fields exist for pre-2.0.94 saves.
- Fix: Spell GUI quickslot highlighting no longer breaks when indices are missing.
Version: 2.0.95
Date: 2026-01-27
- MP: Made explosives processing deterministic to reduce desync risk.
- MP: Made tidal wave updates deterministic to reduce desync risk.
Version: 2.0.94
Date: 2026-01-27
- Increased active skill slots to 9.
- Added CTRL+1..CTRL+9 hotkeys to cast quick-slot skills (configurable in controls).
Version: 2.0.92
Date: 2026-01-27
- Fix: localized Tokens crafting tab and subgroups
Version: 2.0.90
Date: 2026-01-27
- Fixed token->science recipe titles (localized names) so they no longer show Unknown key.
Version: 2.0.89
Date: 2026-01-27
Fixes:
- Token conversion recipes no longer grant crafting XP.
Version: 2.0.88
Date: 2026-01-27
Fixes:
- Token conversion recipes no longer consume player XP.
(Minting tokens from iron still costs XP as intended.)
Version: 2.0.87 Date: 2026-01-27 - XP tokens now stack to 1000. - Added token conversion recipes (100 <-> 1k <-> 10k, including direct 100 <-> 10k). - Tokens tab split into subgroups so mint / convert / science recipes are separated. - Token-to-science costs rebalanced: red x10 = 1x bronze, promethium x10 = 1x gold (incremental scaling).
Version: 2.0.86 Date: 2026-01-27 - Added bronze/silver/gold XP token icons. - Added Tokens crafting tab and token-to-science exchange recipes with configurable costs. - Token-to-science recipes unlock when the science pack recipe is available.
Version: 2.0.84
Date: 2026-01-27
Fixes:
- Fixed save load error: removed extra stray top-level 'end' in rpg/main.lua.
Changes:
- XP token recipes cost 1x iron plate each (plus XP conversion handled in script).
Version: 2.0.83
Date: 2026-01-27
Fixes:
- Fixed save load syntax error in rpg/main.lua (removed stray indented leftover XP-token block).
Changes:
- XP token recipe now costs 1x iron plate (plus the XP conversion cost handled in script).
- Locale updated to describe token XP cost and (amount - global tax) return.
Version: 2.0.82
Date: 2026-01-26
Fixes:
- Fixed save load error: removed stray duplicate XP-token code block in rpg/main.lua.
Version: 2.0.81
Date: 2026-01-26
Changes:
- Added XP Tokens in 100, 1,000, and 10,000 sizes.
- Token descriptions explain: crafting costs XP, consuming grants (amount - global tax).
Version: 2.0.77
Date: 2026-01-26
Fixes:
- Fixed main.lua syntax error that prevented saves from loading (removed stray duplicate XP-token lines).
Version: 2.0.76
Date: 2026-01-26
Fixes:
- Fixed XP Token use not granting XP: handler is now defined before Event.add registration.
Version: 2.0.75
Date: 2026-01-26
Changes:
- XP Token now grants XP when used (listens for on_player_used_capsule).
- XP Token already includes icon + item description.
Version: 2.0.74
Date: 2026-01-26
Fixes:
- Fixed XP token icon size mismatch (icon_size set to 32 to match xp-token.png).
Version: 2.0.73
Date: 2026-01-26
Fixes:
- Fixed locale syntax (merged XP token description into a single key/value line).
Version: 2.0.72
Date: 2026-01-26
Fixes:
- Fixed XP token recipe for Quality/Recycling: recipe now uses results[] format (no more "Recipe has no results").
Version: 2.0.71
Date: 2026-01-26
Changes:
- Added craftable/consumable XP Token for trading XP between players:
Crafting a token converts 1000 RPG XP into 1 token (does not reduce level).
Using the token grants 1000 RPG XP to the user (no global-pool fee).
Version: 2.0.70
Date: 2026-01-26
Changes:
- Removed all PD_* debug chat messages.
Version: 2.0.69
Date: 2026-01-26
Fixes:
- Fixed turret ammo crash: pd_try_inv_insert is now defined before it is used (Lua local scope order).
Version: 2.0.68
Date: 2026-01-26
Changes:
- Fixed missing helper: pd_try_inv_insert is now always defined before turret ammo code runs (prevents nil-function crash).
Version: 2.0.67
Date: 2026-01-26
Changes:
- Turret ammo: added fallback ammo-name selection that doesn't rely on mod detection or ammo categories (finds rifle magazines by prototype name keywords).
- Ammo insertion now tries both inventory.insert and entity.insert (pcall), to support modded turret inventories.
- Still strict: only magazine ammo names; no uranium/piercing fallback.
Version: 2.0.66
Date: 2026-01-26
Changes:
- Fixed turret spell syntax error (removed corrupted/duplicated ammo code).
- Turret ammo loader is strict: only tries preferred_ammo via safe pcall insert; no scanning or uranium fallback.
Version: 2.0.65
Date: 2026-01-26
Changes:
- Turret ammo is now STRICT and category-safe:
It will only ever load rifle-magazine (if it matches the turret's ammo_category) or firearm-magazine (if it matches).
No uranium/piercing fallback exists anywhere.
- Added diagnostic line: "Ammo pick: turret_cat=... ammo=..."
Version: 2.0.64
Date: 2026-01-26
Changes:
- Turret ammo selection no longer relies on mod detection or prototype tables.
It now tries ONLY: rifle-magazine first, then firearm-magazine, using safe pcall inserts.
- Retry loader updated to the same strict two-ammo behavior (no uranium/piercing fallback possible).
Version: 2.0.63
Date: 2026-01-26
Changes:
- Turret ammo selection is now by prototype availability: prefers rifle-magazine when present, otherwise firearm-magazine.
- Retry ammo loader is STRICT (no fallback to uranium/piercing/etc) and uses the same selected ammo.
Version: 2.0.62
Date: 2026-01-26
Changes:
- Fixed K2SO detection crash on Factorio API variants: uses script.active_mods (pcall) with fallback.
- Turret ammo is now STRICT: only firearm-magazine (vanilla) or rifle-magazine (K2SO); no more fallback ammo types.
Version: 2.0.61
Date: 2026-01-26
Changes:
- Turret ammo: loads ONLY firearm-magazine in vanilla, and ONLY rifle-magazine when Krastorio 2 Spaced Out is detected.
- Improved K2SO detection (handles varying mod keys).
- Fixed turret ammo debug print crash (tostring for inventory content values).
Version: 2.0.60
Date: 2026-01-26
Changes:
- Fixed load crash: removed a stray leftover code block in rpg/spells.lua (ammo loader helper) that caused a syntax error.
Version: 2.0.59
Date: 2026-01-26
Changes:
- Fixed turret ammo loader crash on Factorio API variants where accessing game.item_prototypes throws: all remaining uses now go through pd_item_prototypes() (pcall).
Version: 2.0.58
Date: 2026-01-26
Changes:
- Fixed load crash: repaired missing 'end' statements in insert_any_accepted_ammo_token (rpg/spells.lua).
Version: 2.0.57
Date: 2026-01-26
Changes:
- Fixed load crash: removed stray 'end' statements in rpg/spells.lua (ammo retry token).
Version: 2.0.56
Date: 2026-01-26
Changes:
- Fixed load crash: repaired insert_entity_ammo_token Lua syntax and removed broken prototype iteration.
- Ammo loader now uses a safe candidate ammo list compatible with Factorio versions that lack game.item_prototypes.
Version: 2.0.55
Date: 2026-01-26
Changes:
- Fixed turret ammo loader for Factorio versions where game.item_prototypes is unavailable: uses 'prototypes' when present and a static ammo candidate list.
Version: 2.0.54
Date: 2026-01-26
Changes:
- Fix loading error in spells.lua (removed stray 'end' introduced in 2.0.53).
Version: 2.0.53
Date: 2026-01-26
Changes:
- Turret ammo loader: removed inventory filter operations entirely (fixes "Given inventory does not have filters" crash on turret_ammo).
Version: 2.0.52
Date: 2026-01-26
Changes:
- Fixed Turret ammo loader crash: only attempts to clear inventory filters when the inventory supports filters (LuaInventory:supports_filters()).
Version: 2.0.51
Date: 2026-01-26
Changes:
- Turret ammo loader: guaranteed chat diagnostics + pcall error capture (so failures can't be silent).
- Removed old category-based ammo loader call from Turret spell to reduce confusion.
Version: 2.0.50
Date: 2026-01-26
Changes:
- Turret ammo: clears turret_ammo inventory filters before inserting (fixes cases where all ammo is rejected).
- Added guaranteed diagnostic prints: ammo loaded/failed + inventory contents and slot1 stack after attempt.
Version: 2.0.49
Date: 2026-01-26
Changes:
- Added data-final-fixes.lua to restore ammo_category on ammo-turrets (overrides other mods that wipe gun-turret attack_parameters).
Version: 2.0.48
Date: 2026-01-26
Changes:
- Data-stage fix: restores missing ammo_category/ammo_type.category on all ammo-turrets (fixes modpacks where turrets can't accept ammo).
- Turret spell diagnostics now also prints ammo_type.category.
Version: 2.0.47
Date: 2026-01-26
Changes:
- Turret ammo: added set_stack fallback (some modded turrets reject insert even for valid ammo).
- Retry token updated to use turret_ammo inventory + set_stack fallback + clearer debug.
Version: 2.0.46
Date: 2026-01-26
Changes:
- Turret ammo: switched to inventory.can_insert + detailed diagnostics (shows which ammo items are accepted).
- Prints turret prototype attack parameters + inventory contents after insert attempts.
Version: 2.0.45
Date: 2026-01-26
Changes:
- Fixed Turret ammo in modpacks where gun-turret reports ammo_category=nil: turret now brute-force inserts any accepted ammo type.
- Added immediate ammo attempt + retry token with debug messages.
Version: 2.0.44
Date: 2026-01-26
Changes:
- Turret spell: fixed summon ownership + placement by always using the caster's LuaForce (supports custom forces like player2).
- Added K2 Spaced Out detection to pick a valid ammo-turret prototype and prefer rifle-magazine when K2SO is present.
- Added start diagnostic print so you can confirm the spell triggers (shows has_k2so, turret_entity, force).
Version: 2.0.43
Date: 2026-01-26
Changes:
- Summoned entities/projectiles now use the caster's LuaForce (fixes ownership going to hardcoded 'player').
- Turret spell: force handling fixed + added in-game diagnostics (placement, spawned turret, ammo inventory size/category).
- Turret ammo loader call cleaned and retries increased.
Version: 2.0.42
Date: 2026-01-26
Changes:
- Fixed summoned entities/projectiles using hardcoded force 'player'. They now belong to the caster's force (supports custom forces like 'player2').
Version: 2.0.40
Date: 2026-01-25
Changes:
- Turret spell now auto-selects an ammo-turret prototype with a real ammo inventory (fixes modpacks where gun-turret has 0 ammo slots).
- Added chat debug showing chosen turret entity, ammo inventory size, and ammo category.
Version: 2.0.39
Date: 2026-01-25
Changes:
- Turret ammo loader: robust probe + scan + retries (up to 6 attempts) to support K2/K2SO ammo/inventory quirks.
Version: 2.0.38
Date: 2026-01-25
Changes:
- Fixed Turret ammo in modpacks where default magazines are renamed/removed or turret ammo_category is nil:
* Added fallback: scan all ammo prototypes and insert the first one the turret accepts.
- Kept Artillery spell working as before.
Version: 2.0.37
Date: 2026-01-25
Changes:
- Fixed spells.lua syntax error (extra spells were injected inside create_projectiles).
- Moved Turret/Artillery spells to the correct location and switched despawn to destroy_temp_entity_token.
- Kept K2/K2SO ammo loader token with debug prints.
Version: 2.0.36
Date: 2026-01-25
Changes:
- Fixed sprite icon paths to use __rpg_pd_fork__ (prevents missing __RPG__ icon crash).
Version: 2.0.35
Date: 2026-01-25
Changes:
- Rebases PD fork on original RPG 2.0.2 for stability (UI + core restored).
- Adds summon spells: Turret (500 mana, 100 ammo) and Artillery (2000 mana, 5 shells), temporary despawn.
- Ammo loads next tick via category-matching loader (K2/K2SO compatible) with debug prints.
- Marks as incompatible with original 'RPG' mod.
Version: 2.0.2
Date: 2025-08-15
Changes:
- This mod now respects other mods gui elements and does not touch them.
Version: 2.0.1
Date: 2024-10-31
Added:
- Added mod gui style support.
Version: 2.0.0
Date: 2024-10-31
Added:
- Updated for 2.0 and added support for SA.
- Added hotkey to cast spells (CTRL+E).
- Added more spells. (mining drones, defender drones)
Version: 1.0.18
Date: 2024-08-23
Change:
- Fixed an issue with global xp pool reward.
Version: 1.0.17
Date: 2023-10-04
Change:
- Spelling correction - gui label
Version: 1.0.16
Date: 2023-10-04
Change:
- Fixed that RPG caused/broke other mods GUI.
- Added a toggle option for each modifier in RPG settings.
Version: 1.0.15
Date: 2023-05-30
Change:
- Added more remote interfaces and updated the module.
- Added more details on how to add new spells.
Version: 1.0.14
Date: 2022-07-18
Change:
- Fixed that some mods cleared player modifiers.
Version: 1.0.13
Date: 2022-07-06
Change:
- Added support for mod-gui for the top button. Changeable via the games mod settings.
- Added support for multiple surface. This means that the mod supports SE and other multi-surface mods.
Version: 1.0.12
Date: 2022-06-30
Change:
- Fixed a rare bug where the value points_left was missing from the player table.
Version: 1.0.11
Date: 2022-06-03
Change:
- Fix broken changelog in game.
Version: 1.0.10
Date: 2022-06-03
Change:
- Fixed an issue where player modifiers table was missing.
Version: 1.0.9
Date: 2022-06-03
Change:
- Fixed an issue where if you migrate to a newer version of RPG it would fail and make the buttons ingame non-clickable.
Version: 1.0.8
Date: 2022-05-18
Change:
- Fixed wrong version on changelog.
Version: 1.0.7
Date: 2022-05-18
Change:
- Added remote call:
- /c remote.call("RPG", "rpg_reset_player", "%playername")
- Resets a given player.
- /c remote.call("RPG", "give_xp", 1337)
- Gives XP to all connected players.
- /c remote.call("RPG", "gain_xp", "Gerkiz", 1337)
- Gives XP to a given connected player.
- Fixed an issue where if you loaded this mod after a world was created then player modifiers were not applied.
- Various changes and improvements.
Version: 1.0.6
Date: 2021-03-11
Change:
- Added command to view stats.
- /stats <playerName>
- Various changes and improvements.
- Added explosive bullets.
Version: 1.0.5
Date: 2020-11-24
Change:
- Added support for 1.1
Version: 1.0.4
Date: 2020-09-23
Change:
- Disabled debug mode so we don't spam the console/factorio-current.log.
Version: 1.0.3
Date: 2020-09-23
Change:
- Fixed minor issue where you leveled up but did not receive any points nor did the GUI update.
Version: 1.0.2
Date: 2020-09-12
Change:
- Minor tweaks.
Version: 1.0.1
Date: 2020-09-12
Change:
- Minor tweaks.
- Added auto-allocate of skills.
Version: 1.0.0
Date: 2020-08-04
Change:
- Initial commit.