Jump to content

Reno tab subheaders in list of recipes can cause error on spawning blueprints

  • Version: PC/MAC/Linux Pending

It appears that the renovation tab subheaders ("reno_tab_floors", "reno_tab_plantholders", etc.) are contained in the list of available recipes, but have no corresponding entries in STRINGS.NAMES.  The instantiation function for blueprints is set to the randomised MakeAnyBlueprint() rather than the neutral fn(), which means that every time a blueprint is spawned, a random recipe unknown to the player is chosen, and if that recipe happens to be one of the renovation tab subheaders, the name lookup fails and an error occurs when attempting to append " Blueprint" to the nil value. (DLC0003/scripts/prefabs/blueprint.lua, line 79)

I discovered this when I loaded a Hamlet game that contained several blueprints brought over from a linked RotG survival world.  On loading, the blueprints are first spawned with random recipes, before the saved values are restored to them, which means that every blueprint existing in the saved game has a chance of causing this error. Additionally, the more real recipes are known to the player, the higher the chance that one of the subheaders is randomly chosen.

The subheader "recipes" should be removed from the list of recipes.  If they need to be there for some other reason, MakeAnyBlueprint() should be adjusted to filter them out along with the known recipes, when the list of unknown recipes is constructed.

As an aside, MakeAnyBlueprint() appends the literal string " Blueprint" to the looked-up name, which surely should be STRINGS.NAMES.BLUEPRINT.

Steps to Reproduce
1. Start a RotG and Hamlet compatible game. 2. Collect blueprints in the survival world. 3. Move to Hamlet world, bringing the blueprints over. 4. Save game. 5. Load game. On loading, each blueprint has a chance of causing an error, dependent on the number of recipes known by the player.
  • Thanks 1

User Feedback

Here's a script that should reproduce the error on command.  It unlocks as many real recipes as possible at the time, and then spawns a bunch of blueprints, usually triggering the error within a few spawns.


Share this comment

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...