See file maps/journey/functions.lua function Public.wipe_offline_players(journey) - line 777, 778, 790 and 792 (ignoring one line, they are consecutive)
Save file:
Open save file, and wait 15 seconds for the game to freeze. Check the log.
File with a command that does the same as the script code:
For whatever reason, assigning player 46, budar, the force enemy freezes the game in script, but not in command.
[1.1.33] Strange game freeze when assigning force in script
[1.1.33] Strange game freeze when assigning force in script
I have mods! I guess!
Link
Link
Re: [1.1.33] Strange game freeze when assigning force in script
Thanks for the report.
It freezes due to the game searching for positions to spill the player's inventory due to it being downsized due to the new force not having the same character inventory bonus from toolbelt researches.
I think the game freezing when it can't find place for spilled out items is a problem, but I don't have good idea how to fix it, so I'll move this to minor issues and you'll have to handle it in the scenario script.
Ref: 64269
It freezes due to the game searching for positions to spill the player's inventory due to it being downsized due to the new force not having the same character inventory bonus from toolbelt researches.
I think the game freezing when it can't find place for spilled out items is a problem, but I don't have good idea how to fix it, so I'll move this to minor issues and you'll have to handle it in the scenario script.
Ref: 64269
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: [1.1.33] Strange game freeze when assigning force in script
If spilling created one item_on_ground (with amount = n) per item type instead of one per singular item that might help .
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: [1.1.33] Strange game freeze when assigning force in script
Is there a reason why the command succeeds? Unless I'm mistaken, both assign budar to enemy, but only the script freezes.posila wrote: ↑Wed May 19, 2021 3:39 pmThanks for the report.
It freezes due to the game searching for positions to spill the player's inventory due to it being downsized due to the new force not having the same character inventory bonus from toolbelt researches.
I think the game freezing when it can't find place for spilled out items is a problem, but I don't have good idea how to fix it, so I'll move this to minor issues and you'll have to handle it in the scenario script.
Ref: 64269
I have mods! I guess!
Link
Link
Re: [1.1.33] Strange game freeze when assigning force in script
Ahaha the famous cpu gobbler function to spill items. The enemy number one to eradicate any cases when it might happen so server might not get cpu overloaded. Still sucks that it does it automatically on so many cases, but well.
Luckily one can decrease the times when it happens by very cheaty methods, but not every action has pre-event to deny player do such lol.
Luckily one can decrease the times when it happens by very cheaty methods, but not every action has pre-event to deny player do such lol.
Re: [1.1.33] Strange game freeze when assigning force in script
Good question ... the item spill happens on the surface on which was the player last registered, which in case of budar is surface 1 (nauvis). When I run the command before the scenario, the surface has chunks generated and the item spill is successful. When the scenario runs it, there are no chunks generated on the surface, and the item spill ends freezes in very long loop.
There are things to consider about spilling items from offline players ... maybe it shouldn't spill and destroy the items instead, since the player is not on the map (technically). Or maybe it shouldn't resize inventory for offline players and do it when the player re-connects.
However, whatever we would choose as a better bahavior, I don't think it would be satisfying for your scenario, and you just want to avoid the inventory down-size, which you can do by setting some large enough inventory size bonus to the enemy force.