Sotar Posted October 2, 2024 Share Posted October 2, 2024 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. Link to comment https://forums.kleientertainment.com/forums/topic/160048-mod-problem-about-custom-recipes-blueprint/ Share on other sites More sharing options...
ClumsyPenny Posted October 2, 2024 Share Posted October 2, 2024 After a quick look at the line the crash is mentioning, it seems the game is assuming there would be a string for your recipe. Try adding this in modmain: STRINGS.NAMES.GEARS_CM = "Gears" 1 Link to comment https://forums.kleientertainment.com/forums/topic/160048-mod-problem-about-custom-recipes-blueprint/#findComment-1751554 Share on other sites More sharing options...
Sotar Posted October 6, 2024 Author Share Posted October 6, 2024 thank you, it works! 1 Link to comment https://forums.kleientertainment.com/forums/topic/160048-mod-problem-about-custom-recipes-blueprint/#findComment-1752051 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now