Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

I have a small problem, and I'm not sure if it has to do with the base game or this mod. My game effectively soft locks for a few minutes after large amounts of fresh slaves are brought to the house. It then loads in a lagging glitched out menu, that can only be fixed by going to main menu. It has a error message in the log, so I'm wondering if I should adjust the file as it is recommended by the game log?


Edit: How would I go about this fix?

I recall having similar errors in vanilla when bringing back 8-12 slaves during a save with a large mansion. I can’t recall if there was a fix for it, but I know that limiting each run to 5-8 slaves resolved it for me. It’s something about the game overloading when trying to add a lot of slaves back to the mansion at once.

This issue is the result of Godot using a static sized queue to handle GUI event messages, which are issued when the GUI is changed. When new slaves are brought back to the mansion they are added to the slave list one at a time and for each one the mansion's GUI listing the slaves is refreshed. The issue is that this refresh involves deleting all of the existing slave listings and creating new ones. Each line in the slave list GUI is fairly complex so this adds up to a lot of messages, especially if the player already has a lot of slaves in the mansion.

I have just recently released a new version for the bugfix patch which addresses this issue by reusing as much of the slave list GUI as possible, which should significantly reduce the number of messages added to the queue. This will be incorporated by Aric at some point, but it's a bit of work.

The error message proposes what seems like it would be a very simple fix to the problem: "increase the size of the queue". However, this is a rather irresponsible approach to solving the problem and may come with unforeseen side effects. The problem is not of a fixed size and increases exponentially so regardless of the new size it will still be possible to trigger it again by simply having more slaves. Warnings aside, it may be a while before the fix is implemented for Aric's mod so it may provide some relief until then.

Using a decent text editor, add these 2 lines(with 1 tab before each line) after _init() in globals.gd, and the new size will go into effect after you start the game to apply the change and restart the game to use the change. After the change has been applied the code can be removed and the effect will continue for that program folder. It creates a file named "project.godot" that stores the new setting for future use.

ProjectSettings.set_setting("memory/limits/message_queue/max_size_kb", 8192)
ProjectSettings.save()

This code will increase the size of the queue by 8x, which may or may not be enough, but I would recommend against increasing this number by more than another 8x as it will be hogging a significant amount of RAM.

Interesting, I'll give it a try. After I make a few backups of course.