Make combat-robot.time_to_live optional

Things that we aren't going to implement
DRT99
Inserter
Inserter
Posts: 25
Joined: Mon Jul 11, 2016 5:11 pm
Contact:

Make combat-robot.time_to_live optional

Post by DRT99 »

I would like to request that, if possible, time_to_live be changed from a mandatory property to an optional property for combat-robot entities.

I could set the value to several million ticks but that just seems like a band-aid / workaround that would force the game to keep track of a few timers that it doesnt really need to.
sparr
Smart Inserter
Smart Inserter
Posts: 1446
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Make combat-robot.time_to_live optional

Post by sparr »

in the mean time, set it to math.huge, not some arbitrary large number
DRT99
Inserter
Inserter
Posts: 25
Joined: Mon Jul 11, 2016 5:11 pm
Contact:

Re: Make combat-robot.time_to_live optional

Post by DRT99 »

Im guessing math.huge is just the maximum possible value?
sparr
Smart Inserter
Smart Inserter
Posts: 1446
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Make combat-robot.time_to_live optional

Post by sparr »

yeah. if you print it you'll get "inf", positive infinity.
DRT99
Inserter
Inserter
Posts: 25
Joined: Mon Jul 11, 2016 5:11 pm
Contact:

Re: Make combat-robot.time_to_live optional

Post by DRT99 »

So i just tried math.huge and got an error along the lines of "value is outside allowed range", so it looks like that is out and 999999999 is in for the time being
Rseding91
Factorio Staff
Factorio Staff
Posts: 14288
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Make combat-robot.time_to_live optional

Post by Rseding91 »

The game would still have to track each robot to see each tick if it had a time to live. It's a simple if in the robot update function and wouldn't just vanish if the robot was set to not expire.

Setting it to some large value is effectively the same so I don't see the point of this.
If you want to get ahold of me I'm almost always on Discord.
sparr
Smart Inserter
Smart Inserter
Posts: 1446
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Make combat-robot.time_to_live optional

Post by sparr »

999999999 ticks is 4629 hours. Some people have games approaching that age...
Rseding91
Factorio Staff
Factorio Staff
Posts: 14288
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Make combat-robot.time_to_live optional

Post by Rseding91 »

sparr wrote: Sat Aug 29, 2020 4:55 pm 999999999 ticks is 4629 hours. Some people have games approaching that age...
The game mentions the limits when trying to set the value to something out of the range. '999999999' isn't even close to the max it can be.
Capture.PNG
Capture.PNG (15.82 KiB) Viewed 2184 times
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Won't implement”