RPG System


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

a month ago
0.16 - 2.0
121K

b Crafting speed bonus stops working after armour switch

2 months ago
(updated 2 months ago)

As title says, it seems if you remove or put on armour then the crafting speed bonus stops working. It seems as if it resets your crafting skill back to 0 although the UI will still show your points as normal. The only way to fix this I have found is to reset skill points and reallocate but this is a pain to do every time when you want to swap armours.

We are using extended vanilla: personal equipment mod. This may have an impact.

2 months ago
(updated 2 months ago)

as you said, the cause is a conflict with anoter mod. Probably the author removes all the speed modifier.
Rpg adds on top of actual value... player.character.character_running_speed_modifier = player.character.character_running_speed_modifier + X

2 months ago
(updated 2 months ago)

I am having the same issue. I did find the same work around using an amnesia potion. Yet whenever you switch armors, the crafting speed is lost once again. Amnesia potions aren't exactly easy to farm with the RNG and using commands to bring them in disables achievements.

Would def prefer a way to craft that particular potion, no expectation of that happening though.

a month ago

I had a little look into the extended vanilla mod and saw that it does indeed set the crafting modifier to 0 whenever armour is removed.

I think you could add some compatibility in to account for this. By setting the extended vanilla mod mod to be an optional dependency you ensure it is loaded first. Then I added an event to control.lua:
script.on_event(defines.events.on_player_armor_inventory_changed, function(event)
if script.active_mods["Better-Power-Armor-Grid"] then
local player = game.players[event.player_index]
AdjustPlayerStat(player, 'character_crafting_speed_modifier')
end
end)

Note: The internal name for the extended vanilla: personal equipment mod is "Better-Power-Armor-Grid"

So if the mod is installed and you take your armour off then: extended vanilla sets your bonus to 0. But then the rpg mod sets it back to your correct bonus.
I have done some testing with and without the extended vanilla mod and this seems to be working.
If you have time it would be great if you could verify and test this and maybe implement if you think it's a good solution.
I think it would be great to keep being able to use both together without the need for commands or farming amnesia potions.

a month ago
(updated a month ago)

I'd need to add fix lines to all mods that does something similar... It is better to ask the other mod author do add / subtract his bonuses.

New response