If one modifies the force.following_robots_lifetime_modifier, it takes effect but doesn't modify the tooltip, unlike damage, firing rate, etc.
[Twinsen] Capsule lifetime isn't changed in UI
[Twinsen] Capsule lifetime isn't changed in UI
I have mods! I guess!
Link
Link
Re: [Twinsen] Capsule lifetime isn't changed in UI
If you want, here's a control.lua to experiment:
Code: Select all
local commands_table = {}
commands_table.follower_lifetime_bonus = {}
commands_table.follower_lifetime_bonus.command = "follower_lifetime_bonus"
commands_table.follower_lifetime_bonus.help = "add or subtract to following_robots_lifetime_bonus. no +/- sets the value, no number prints the value. Value can be decimal"
commands_table.follower_lifetime_bonus.func = function(callback)
local prm = callback.parameter
local player_index = callback.player_index
local value = nil
local sign = nil
if prm ~= nil then
-- game.player.print("string passed was " .. prm)
else
-- game.player.print("nothing was passed")
end
if prm == nil then prm = "" end
sign = string.match(prm, "^([+-])")
value = string.match(prm, "^[+-]?([0-9]*%.?[0-9]*)")
-- the pattern [0-9]*%.?[0-9]* may match none, none, none, producing a successful ""
if value == nil or value == "" then
game.player.print("No or invalid value. The current bonus is " .. game.get_player(player_index).force.following_robots_lifetime_modifier)
return
end
--implicitly prm is not nil for this
if sign == nil then
game.player.print("setting follower lifetime bonus to " .. value)
game.get_player(player_index).force.following_robots_lifetime_modifier = tonumber(value)
game.player.print("Bonus is now: " .. game.get_player(player_index).force.following_robots_lifetime_modifier)
return
elseif sign == "+" then
game.player.print("Adding to bonus")
game.get_player(player_index).force.following_robots_lifetime_modifier = game.get_player(player_index).force.following_robots_lifetime_modifier + tonumber(value)
game.player.print("Bonus is now: " .. game.get_player(player_index).force.following_robots_lifetime_modifier)
return
elseif sign == "-" then
game.player.print("Subtracting from bonus")
game.get_player(player_index).force.following_robots_lifetime_modifier = game.get_player(player_index).force.following_robots_lifetime_modifier - tonumber(value)
game.player.print("Bonus is now: " .. game.get_player(player_index).force.following_robots_lifetime_modifier)
return
end
-- we should never reach here
return
end
for _, cmd in pairs(commands_table) do
commands.add_command(cmd.command, cmd.help, cmd.func)
end
I have mods! I guess!
Link
Link
Re: [Twinsen] Capsule lifetime isn't changed in UI
Fixed in Version: 0.18.0.
Thanks for the report.
Let me know if you notice other issues like this.
Thanks for the report.
Let me know if you notice other issues like this.
Re: [Twinsen] Capsule lifetime isn't changed in UI
There's a tiny one I noticed, unrelated: (edit: I may not even call it a bug)
Unloading a mod migrates all the items etc, but it doesn't update map data. Not sure if there's a sane way to do it without showing someone an updated version of the map.
The purple/pinkish ore on the left was removed.
Unloading a mod migrates all the items etc, but it doesn't update map data. Not sure if there's a sane way to do it without showing someone an updated version of the map.
The purple/pinkish ore on the left was removed.
I have mods! I guess!
Link
Link
Re: [Twinsen] Capsule lifetime isn't changed in UI
We should have a system for re-charting the map when we think something changed, not sure why it's not happening in this case. Please make a separate bug report about it and someone should look at it.