[0.17.79] Changing atomic bomb repeat count completely freezes game

Bugs that are actually features.
Honktown
Smart Inserter
Smart Inserter
Posts: 1058
Joined: Thu Oct 03, 2019 7:10 am
Contact:

[0.17.79] Changing atomic bomb repeat count completely freezes game

Post by Honktown »

I was trying to change the radius of the atomic-bomb explosion, and first, the radius in the projectile target_effects did nothing. I then thought maybe that was broken/unused (not listed in api at all), and tried changing the repeat_count.

First attempt: Changing repeat count to 4000 (default 2000). Froze game on rocket hitting the target. Thought maybe too high of a value broke it.

Changed it to 2001. Game still freezes, hit's 100% CPU usage, and doesn't seem to recover (I didn't give it much time, but it doesn't seem to do anything).

save file - new game, 1000x1000 world, /cheat enabled:
brokenrepeatcount.zip
(1.33 MiB) Downloaded 58 times
Mod to trigger the break:
repeatcount_1.0.0.zip
(775 Bytes) Downloaded 57 times
In-game: c-fire the rocket. When the rocket reaches the target the game freezes and goes to 100% thread use.
I have mods! I guess!
Link
posila
Former Staff
Former Staff
Posts: 5448
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.17.79] Changing atomic bomb repeat count completely freezes game

Post by posila »

Thanks for the report, and extra thank you for including ready-to use minimal mod with save.

However ... I think you haven't done sanity check (assigning 2000) :D
You asked it to repeat 2001 times the action it's doing (create 2000 random projectiles) ... which despite the optimizations still takes a while.
Honktown
Smart Inserter
Smart Inserter
Posts: 1058
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: [0.17.79] Changing atomic bomb repeat count completely freezes game

Post by Honktown »

posila wrote: Tue Jan 21, 2020 8:06 pm Thanks for the report, and extra thank you for including ready-to use minimal mod with save.

However ... I think you haven't done sanity check (assigning 2000) :D
You asked it to repeat 2001 times the action it's doing (create 2000 random projectiles) ... which despite the optimizations still takes a while.
2000 is the default value! Edit: the repeat_count is changing from 2000 to 2001, I'm not adding anything.
I have mods! I guess!
Link
posila
Former Staff
Former Staff
Posts: 5448
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.17.79] Changing atomic bomb repeat count completely freezes game

Post by posila »

What you are doing:

Code: Select all

data.raw.projectile["atomic-rocket"].action.action_delivery.target_effects[5].repeat_count = 2001
what you ment to do:

Code: Select all

data.raw.projectile["atomic-rocket"].action.action_delivery.target_effects[5].action.repeat_count = 2001
Honktown wrote: Tue Jan 21, 2020 8:15 pm2000 is the default value!
Yes, that's why it's sanity check :).
Honktown
Smart Inserter
Smart Inserter
Posts: 1058
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: [0.17.79] Changing atomic bomb repeat count completely freezes game

Post by Honktown »

posila wrote: Tue Jan 21, 2020 8:25 pm What you are doing:

Code: Select all

data.raw.projectile["atomic-rocket"].action.action_delivery.target_effects[5].repeat_count = 2001
what you ment to do:

Code: Select all

data.raw.projectile["atomic-rocket"].action.action_delivery.target_effects[5].action.repeat_count = 2001
Honktown wrote: Tue Jan 21, 2020 8:15 pm2000 is the default value!
Yes, that's why it's sanity check :).
Damnit there we go. I'll test in a minute. Probably explains why radius wasn't working either.
I have mods! I guess!
Link
Honktown
Smart Inserter
Smart Inserter
Posts: 1058
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: [0.17.79] Changing atomic bomb repeat count completely freezes game

Post by Honktown »

I don't know if repeat count editing would make it denser, but radius now works, which was my goal. Not a bug, etc.
I have mods! I guess!
Link
Post Reply

Return to “Not a bug”