[boskid][2.0.41] Follower Robot Lifetime Research Effect

This subforum contains all the issues which we already resolved.
User avatar
waremon
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Mar 16, 2025 10:42 pm
Contact:

[boskid][2.0.41] Follower Robot Lifetime Research Effect

Post 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 222 times
(note 90 lifetime)
03-17-2025, 00-08-06.png
03-17-2025, 00-08-06.png (57.79 KiB) Viewed 222 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 222 times
(note 45 lifetime)
03-17-2025, 00-09-25.png
03-17-2025, 00-09-25.png (55.36 KiB) Viewed 222 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 222 times

Log file:
factorio-previous.log
(15.85 KiB) Downloaded 3 times
factorio-current.log
(9.01 KiB) Downloaded 3 times
Simple mod with follower lifetime research:
FollowerLifetimeMod.zip
(3.62 KiB) Downloaded 4 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3645
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

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

Post 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.
User avatar
waremon
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Mar 16, 2025 10:42 pm
Contact:

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

Post by waremon »

That was fast.
Thanks !!!
Post Reply

Return to “Resolved Problems and Bugs”