Page 1 of 1

[0.17.79] Changing atomic bomb repeat count completely freezes game

Posted: Tue Jan 21, 2020 4:24 pm
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.

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

Posted: Tue Jan 21, 2020 8:06 pm
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.

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

Posted: Tue Jan 21, 2020 8:15 pm
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.

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

Posted: Tue Jan 21, 2020 8:25 pm
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 :).

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

Posted: Tue Jan 21, 2020 8:36 pm
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.

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

Posted: Tue Jan 21, 2020 8:42 pm
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.