There is a Technology "Effect" called "follower-robot-lifetime" listed at: [https://lua-api.factorio.com/latest/Con ... gyModifier]
A mod introducing a Technology that uses this Effect can be defined as:
Code: Select all
{
type = "technology",
effects =
{
{
type = "follower-robot-lifetime",
modifier = 1
}
},
...
},
https://steamcommunity.com/sharedfiles/ ... 2940981130 (note 45+45 lifetime)
https://steamcommunity.com/sharedfiles/ ... 2940981402 (note 90 lifetime)
When using a modifier such as 0.2, the capsule's lifetime showed as expected, but the spawned robot does not:
https://steamcommunity.com/sharedfiles/ ... 2940983281 (note 45+9 lifetime)
https://steamcommunity.com/sharedfiles/ ... 2940983354 (note 45 lifetime)
To the best of my knowledge, this Effect is not used by the game but seems to have been made available for use by mods / future use. Is anyone familiar with it, or have experienced similar issues for other Effects? Guessing this is actually a problem when the actual robot is spawned based on the item - since the correct lifetime and research bonus is displayed with a decimal value.
As an alternative, I was considering hooking the on_research_finished event and attempting to change the robot lifetime. I'm not familiar enough with whether that is feasible yet though - planning to look into that further. Alternatively, maybe hook when a robot is spawned, and change its lifetime - but the performance implications of that are likely much heavier.
Appreciate any pointers. Thanks!