Jump to content

Recommended Posts

I using AddRecipe2 method add some vanilla items recipe which vanilla cannot craft, like gears, goldnuggets, livinglog etc.
 
statements like this:
AddRecipe2("gears_cm", { Ingredient("flint", 3), Ingredient("transistor", 1), Ingredient("rope", 1) }, TECH.SCIENCE_TWO, { product = "gears" })
 
Because Wormwood can craft living log, Wilson can craft gold, so I unified add "_cm" after these item's name as this method's "name" parameter to avoid cover its original recipe, but game spawns these recipe's blueprint automatically, I didn't write these item's blueprint code.
 
And these blueprint sometimes will cause game crash, like I trying to get one of these blueprints by using "c_give("gears_cm_blueprint")" in console, or sometimes game spawns these blueprint, crash info is "[string "scripts/prefabs/blueprint.lua"]:195: attempt to concatenate field '?' (a nil value)".
And sometimes these blueprint won't crash the game, I don't know why it didn't crash, I just walk around and saw a blurprint on the ground, it called like "unknown blueprint", because I using Chinese language, it shows "未知 蓝图", translate is unknown blueprint, I learned it and unlock a recipe which is in my mod.
 
Anyone can help me? Let game generate correct gears blueprint by mod code is ok, delete these blueprint straightly to forbidden game spawn these item's blueprint is also ok. I never write code about blueprint before so I don't know how to correct it or delete it.

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