Page 1 of 1

[boskid][2.0.41] Follower Robot Lifetime Research Effect

Posted: Sun Mar 16, 2025 11:21 pm
by waremon
Same issue as this post in modding help : 105419

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
  }
},
...
},
This works as expected with a modifier of 1 (or any larger integer.) Capsule items in inventory show the expected bonus, and spawned robots have the expected lifetime:

(note 45+45 lifetime)
03-17-2025, 00-06-24.png
03-17-2025, 00-06-24.png (99.6 KiB) Viewed 267 times
(note 90 lifetime)
03-17-2025, 00-08-06.png
03-17-2025, 00-08-06.png (57.79 KiB) Viewed 267 times
When using a modifier such as 0.2, the capsule's lifetime showed as expected, but the spawned robot does not:

(note 45+9 lifetime)
03-17-2025, 00-08-59.png
03-17-2025, 00-08-59.png (81.67 KiB) Viewed 267 times
(note 45 lifetime)
03-17-2025, 00-09-25.png
03-17-2025, 00-09-25.png (55.36 KiB) Viewed 267 times
The modifier is displayed correctly in the bonuses tab :
03-17-2025, 00-13-25.png
03-17-2025, 00-13-25.png (9.21 KiB) Viewed 267 times

Log file:
factorio-previous.log
(15.85 KiB) Downloaded 4 times
factorio-current.log
(9.01 KiB) Downloaded 4 times
Simple mod with follower lifetime research:
FollowerLifetimeMod.zip
(3.62 KiB) Downloaded 5 times

Re: [boskid][2.0.41] Follower Robot Lifetime Research Effect

Posted: Sun Mar 16, 2025 11:47 pm
by boskid
Thanks for the report. Issue is now fixed for 2.0.42. It looks like fraction modifiers were not working because this value was incorrectly converted to an integer before multiplying lifetime value from the prototype.

Re: [boskid][2.0.41] Follower Robot Lifetime Research Effect

Posted: Mon Mar 17, 2025 12:07 am
by waremon
That was fast.
Thanks !!!