Jump to content

[WITH SOLUTION] Modded recipes with a name different from product crash if their blueprint is spawned.


O_Atoba_Azul
  • Pending

Modded recipes with a specific name, different from their result, will result in their blueprints crashing, because blueprints attempt to concatenate the recipe's name, which is nil. (In most cases anyways.)

A simple solution would be to use the recipe's product for the name.

   
--@blueprint.lua, 186-189
inst.recipetouse =
        (#unknownrecipes > 0 and unknownrecipes[math.random(#unknownrecipes)].product) or
        (#knownrecipes > 0 and knownrecipes[math.random(#knownrecipes)].product) or
        "unknown"

And while we're here, can you please make the beefalo ice costume blueprint's prefab name be something else?
If a mod adds a recipe for ice, that'll overwrite it.


Steps to Reproduce

Create a recipe. with a name different from it's result.
Spawn several (random) blueprints

 

  • Like 2
  • Big Ups 1



User Feedback


There are no comments to display.



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...