Szalyn Posted November 26, 2021 Share Posted November 26, 2021 So I've tried to create a mod in which you can craft rocks from wood and cutgrass (Wanna add something to "The minimalist challenge") Everything is fine, I have my recipies, they do work, but I still want to add a description to them. Please note, that this is my first mod and basically my first modification to a game ever made. So here is the code: STRINGS = GLOBAL.STRINGS RECIPETABS = GLOBAL.RECIPETABS Recipe = GLOBAL.Recipe Ingredient = GLOBAL.Ingredient TECH = GLOBAL.TECH Recipe("rocks", { Ingredient("cutgrass", 1), Ingredient("log", 1)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE) Recipe("flint", { Ingredient("rocks", 1)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE) Recipe("nitre", { Ingredient("rocks", 1)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE) Recipe("goldnugget", { Ingredient("rope", 1), Ingredient("rocks", 10)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE) Recipe("moonrocknugget", { Ingredient("goldnugget", 5), Ingredient("nitre", 3)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE STRINGS.RECIPE_DESC.rocks = "Create rock, with grass and log." STRINGS.RECIPE_DESC.flint = "Create flint, with all mighty rock." STRINGS.RECIPE_DESC.nitre = "Create nitre, with all mighty rock." STRINGS.RECIPE_DESC.goldnugget = "Create gold, with rocks and ropes." STRINGS.RECIPE_DESC.moonrocknugget = "Create moon fragments, with gold and some nitre." Can someone please explain to me how it should be done so that it can work? Link to comment https://forums.kleientertainment.com/forums/topic/135643-need-help-with-adding-descriptions-to-the-simple-mod/ Share on other sites More sharing options...
CarlZalph Posted November 27, 2021 Share Posted November 27, 2021 14 hours ago, Szalyn said: Can someone please explain to me how it should be done so that it can work? The names after RECIPE_DESC also need to be capitalized. See: scripts/strings.lua: RECIPE_DESC = { BOOK_BIRDS = "1000 species: habits, habitats, and calls.", BOOK_TENTACLES = "Let's learn about our subterranean friends!", BOOK_GARDENING = "On the care and feeding of plants.", BOOK_SILVICULTURE = "A guide to branch management.", 1 Link to comment https://forums.kleientertainment.com/forums/topic/135643-need-help-with-adding-descriptions-to-the-simple-mod/#findComment-1517350 Share on other sites More sharing options...
Szalyn Posted November 27, 2021 Author Share Posted November 27, 2021 So I did it, but the game shows a crash now. Here is the code as for this moment: STRINGS = GLOBAL.STRINGS RECIPETABS = GLOBAL.RECIPETABS Recipe = GLOBAL.Recipe Ingredient = GLOBAL.Ingredient TECH = GLOBAL.TECH Recipe("rocks", { Ingredient("cutgrass", 1), Ingredient("log", 1)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE) Recipe("flint", { Ingredient("rocks", 1)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE) Recipe("nitre", { Ingredient("rocks", 1)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE) Recipe("goldnugget", { Ingredient("rope", 1), Ingredient("rocks", 10)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE) Recipe("moonrocknugget", { Ingredient("goldnugget", 5), Ingredient("nitre", 3)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE STRINGS.RECIPE_DESC.ROCKS = "Create rock, with grass and log." STRINGS.RECIPE_DESC.FLINT = "Create flint, with all mighty rock." STRINGS.RECIPE_DESC.NITRE = "Create nitre, with all mighty rock." STRINGS.RECIPE_DESC.GOLDNUGGET = "Create gold, with rocks and ropes." STRINGS.RECIPE_DESC.MOONROCKNUGGET = "Create moon fragments, with gold and some nitre." What may be going wrong? Link to comment https://forums.kleientertainment.com/forums/topic/135643-need-help-with-adding-descriptions-to-the-simple-mod/#findComment-1517453 Share on other sites More sharing options...
CarlZalph Posted November 27, 2021 Share Posted November 27, 2021 4 hours ago, Szalyn said: Recipe("rocks", { Ingredient("cutgrass", 1), Ingredient("log", 1)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE) Recipe("flint", { Ingredient("rocks", 1)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE) Recipe("nitre", { Ingredient("rocks", 1)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE) Recipe("goldnugget", { Ingredient("rope", 1), Ingredient("rocks", 10)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE) Recipe("moonrocknugget", { Ingredient("goldnugget", 5), Ingredient("nitre", 3)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE What may be going wrong? You're missing the ')' to end the Recipe function call at the last one there. 1 1 Link to comment https://forums.kleientertainment.com/forums/topic/135643-need-help-with-adding-descriptions-to-the-simple-mod/#findComment-1517496 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