Hello if anyone is having troubles launching this I've used ChatGPT to give me to code necessary to fix this mod, I can now successfully launch the game.
In "data-final-fixes.lua" copy this code over the "setResistancePercent" function.
"local function setResistancePercent(entity, resistanceType, setPercent)
if not entity then return 0 end
-- Create resistances table if it doesn't exist
if not entity.resistances then
entity.resistances = {}
end
-- Find existing resistance
local entityResist = nil
for i = 1, #entity.resistances do
if entity.resistances[i].type == resistanceType then
entityResist = entity.resistances[i]
break
end
end
-- If we’re just reading the percent
if not setPercent then
if entityResist then
return entityResist.percent or 0
else
return 0
end
end
-- If resistance doesn’t exist, add it
if not entityResist then
entityResist = {type = resistanceType, decrease = 0, percent = 0}
table.insert(entity.resistances, entityResist)
end
-- Finally, set the new percent
entityResist.percent = setPercent
return entityResist.percent
end"