Food Industry (2.0 beta)

by Oceanel

[Warning (!): Mod is still under development, and is not intended for a long game] This mod adds hunger and ways to produce foods and drinks. From grown foods can be obtained effect capsules.

Content
3 years ago
0.16 - 1.1
1.18K
Fluids Manufacturing

b [Available in beta 2.0] Mod incompatibility - modifiers

5 years ago
(updated 5 years ago)

This is a well-made and fun mod. The way modifiers are set makes it incompatible with a number of other mods however (and also power armor?).

Would it be possible to change it so that the goal for the mod to only add and remove from the modifiers?

E.g. take this portion of character_running_speed:

if global.energy[index] < global.energy_max[index] * 0.25 then -- if Energy level down below 25% - decrease running speed
                                    player.character_running_speed_modifier = (global.energy[index] - (global.energy_max[index] * 0.2))/global.energy_max[index]
                                else
                                    player.character_running_speed_modifier = 0
                                end

It would be better if the last update's global.energy[index] and global.energy_max[index] were stored. That way the change in character_running_speed_modifier due to this mod can be calculated and applied.

E.g something like

function calc_speed_modifier(energy, energy_max) 
    if energy < energy_max * 0.25 then
        return 0
    else
       return (energy - energy_max * 0.2)/energy_max
    end
end

mod_last = calc_speed_modifier(global.energy_last[index], global.energy_max_last[index])
mod_trg = calc_speed_modifier(global.energy[index], global.energy_max[index])
player.character_running_speed_modifier = player.character_running_speed_modifier + mod_trg - mod_last

Some examples of conflicting mods: TurtleSpeed, RPGSystem, ProgressiveRunning

5 years ago
(updated 5 years ago)

Thank for your feedback. I know about this issue, but I don't have enough time to do everything.
And, thanks for the clarification and code example. I will try to correct this and other modifiers :)

5 years ago

Fair enough; it's also a more thorough change that would ideally also see similar changes made by other mod makers. Hope you'll consider it!

New response