RPG System


This mod adds a basic RPG system to the game (XP, level-up and skills)

a month ago
0.16 - 2.1
147K
Combat Armor

b Fails to load on Factorio 2.1

a month ago

Failed to load mods: Error while loading entity prototype "biter-spawner" (unit-spawner): 'probability' property on a product prototype was renamed into 'independent_probability'. Please update. in property tree at ROOT.unit-spawner.biter-spawner.loot[0]
Modifications: Base mod › RPG System

Two ways this can be fixed.
independent_probability: (Each item will have a chance of dropping, allowing a spawner to have potentially all of them if extremely lucky)

    table.insert ( loot , {item = "rpg_level_up_potion",  count_min = 1,  count_max = 1,  independent_probability = 0.005}) 
table.insert ( loot , {item = "rpg_amnesia_potion",  count_min = 1,  count_max = 1,  independent_probability = 0.003})
table.insert ( loot , {item = "rpg_small_xp_potion",  count_min = 1,  count_max = 1,  independent_probability = 0.015})
table.insert ( loot , {item = "rpg_big_xp_potion",  count_min = 1,  count_max = 1,  independent_probability = 0.01})
table.insert ( loot , {item = "rpg_small_healing_potion",  count_min = 1,  count_max = 1,  independent_probability = 0.02})
table.insert ( loot , {item = "rpg_big_healing_potion",  count_min = 1,  count_max = 2,  independent_probability = 0.01})
table.insert ( loot , {item = "rpg_crafting_potion",  count_min = 1,  count_max = 2,  independent_probability = 0.01})
table.insert ( loot , {item = "rpg_speed_potion",  count_min = 1,  count_max = 2,  independent_probability = 0.01})
if mods['death_curses'] then table.insert ( loot , {item = "rpg_curse_cure_potion",  count_min = 1,  count_max = 1,  independent_probability = 0.02}) end

shared_probability: (One and only one loot option will drop (One dice roll is taken for shared_probability, and whatever items match that range min <= roll < max determines the item received.)

table.insert ( loot , {item = "rpg_level_up_potion", count_min = 1, count_max = 1, shared_probability = {min = 0, max=0.005}})
table.insert ( loot , {item = "rpg_amnesia_potion", count_min = 1, count_max = 1, shared_probability = {min = 0.005, max=0.008}})
table.insert ( loot , {item = "rpg_small_xp_potion", count_min = 1, count_max = 1, shared_probability = {min = 0.008, max=0.023}})
table.insert ( loot , {item = "rpg_big_xp_potion", count_min = 1, count_max = 1, shared_probability = {min = 0.023, max=0.033}})
table.insert ( loot , {item = "rpg_small_healing_potion", count_min = 1, count_max = 1, shared_probability = {min = 0.033, max=0.053}})
table.insert ( loot , {item = "rpg_big_healing_potion", count_min = 1, count_max = 2, shared_probability = {min = 0.053, max=0.063}})
table.insert ( loot , {item = "rpg_crafting_potion", count_min = 1, count_max = 2, shared_probability = {min = 0.063, max=0.073}})
table.insert ( loot , {item = "rpg_speed_potion", count_min = 1, count_max = 2, shared_probability = {min = 0.073, max=0.083}})
if mods['death_curses'] then table.insert ( loot , {item = "rpg_curse_cure_potion", count_min = 1, count_max = 1, shared_probability = {min = 0.083, max=0.103}}) end

a month ago

And fixing that reveals another thing. They changed the structure of loot.

This is the Independent_probability version. shared_probability I don't fell like setting up again, but the values are in the prior post.

table.insert ( loot , {type = "item", name  = "rpg_level_up_potion",  amount_min = 1,  amount_max = 1,  independent_probability = 0.005}) 
table.insert ( loot , {type = "item", name  = "rpg_amnesia_potion",  amount_min = 1,  amount_max = 1,  independent_probability = 0.003})
table.insert ( loot , {type = "item", name  = "rpg_small_xp_potion",  amount_min = 1,  amount_max = 1,  independent_probability = 0.015})
table.insert ( loot , {type = "item", name  = "rpg_big_xp_potion",  amount_min = 1,  amount_max = 1,  independent_probability = 0.01})
table.insert ( loot , {type = "item", name  = "rpg_small_healing_potion",  amount_min = 1,  amount_max = 1,  independent_probability = 0.02})
table.insert ( loot , {type = "item", name  = "rpg_big_healing_potion",  amount_min = 1,  amount_max = 2,  independent_probability = 0.01})
table.insert ( loot , {type = "item", name = "rpg_crafting_potion",  amount_min = 1,  amount_max = 2,  independent_probability = 0.01})
table.insert ( loot , {type = "item", name  = "rpg_speed_potion",  amount_min = 1,  amount_max = 2,  independent_probability = 0.01})
if mods['death_curses'] then table.insert ( loot , {type = "item", name = "rpg_curse_cure_potion",  amount_min = 1,  amount_max = 1,  independent_probability = 0.02}) end
a month ago

Fixed. thanks

New response