[1.1.65] Max flame count doesn't behave right for a high value

Bugs that are actually features.
Post Reply
User avatar
Muppet9010
Filter Inserter
Filter Inserter
Posts: 278
Joined: Sat Dec 09, 2017 6:01 pm
Contact:

[1.1.65] Max flame count doesn't behave right for a high value

Post by Muppet9010 »

If you create a fire with the max initial_ground_flame_count of 255, the fire doesn't burn like the a high fire count should. This can be seen by creating a fire at 255 and at 254 (1 less). The 254 fire spreads out from the center for a bit and will catch any near by trees on fire. But the 255 value fire just burns briefly in its center and then goes out. It also won't set any trees on fire
start.PNG
start.PNG (530.78 KiB) Viewed 867 times
after few seconds.PNG
after few seconds.PNG (427.75 KiB) Viewed 867 times

Code: Select all

/c game.player.surface.create_entity({name = "fire-flame", position = {0,0}, initial_ground_flame_count = 255}) game.player.surface.create_entity({name = "fire-flame", position = {10,0}, initial_ground_flame_count = 254})

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2257
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.65] Max flame count doesn't behave right for a high value

Post by boskid »

This behavior is because value of 255 is internally used as a special marker when creating a fire flame saying "use initial_flame_count value from prototype instead" which for a fire-flame is 0. Value of 0 is then interpreted as "use particle offset count / 5" which is equal to 6 or 7 based on variation selected.

Usage of such high values is pointless because the flame count is internally capped anyway. There are 15 hardcoded particle offset variation patterns, largest one (index 5) has 35 offsets defined which means usage of a value higher than 35 has no observable behavior differences other than the value of 255. I am not considering this to be a bug.

Post Reply

Return to “Not a bug”