minty1 Posted May 11, 2022 Share Posted May 11, 2022 I am working on a character mod character right now who has his own crafting tab and own items he can craft. Issue is that I can't seem to find a way to have the recipe change depending on the DLC that is in use in the world. I presumed the code would be really simple, just requiring this code : Spoiler if SaveGameIndex:IsModeShipwrecked() then local runningteacraft = GLOBAL.Recipe("runningtea", {Ingredient ("jungletreeseed", 2), Ingredient ("coffeebeans_cooked", 1), Ingredient ("petals", 2)}, RECIPETABS.SPEEDTAB, {SCIENCE = 1, MAGIC = 0, ANCIENT = 0}) else local runningteacraft = GLOBAL.Recipe("runningtea", {Ingredient ("acorn", 2), Ingredient ("coffeebeans_cooked", 1), Ingredient ("petals", 2)}, RECIPETABS.SPEEDTAB, {SCIENCE = 1, MAGIC = 0, ANCIENT = 0}) end (My item is called Running Tea) Anyway when I try to go into a world with this code, it gives me an error message which I posted as an image below. The weird thing is that the game still seems to run normally despite this error message, like I can see Maxwell's introduction dialogue and my character is able to die even though I am stuck on this screen. I am sure this is quite a simple problem with an easy fix, but I am new to modding so not sure on how everything works just yet. Anyone able to help me out? I would be very appreciative! Link to comment Share on other sites More sharing options...
Leonidas IV Posted May 12, 2022 Share Posted May 12, 2022 This error occour cause SaveGameIndex is in GLOBAL scope and don't exist in mod environment, so you need GLOBAL.SaveGameIndex Also, you need GLOBAL.RECIPETABS too Link to comment Share on other sites More sharing options...
minty1 Posted May 13, 2022 Author Share Posted May 13, 2022 15 hours ago, Leonidas IV said: This error occour cause SaveGameIndex is in GLOBAL scope and don't exist in mod environment, so you need GLOBAL.SaveGameIndex Also, you need GLOBAL.RECIPETABS too Ah hah! I can't believe that I missed that! Thank you so much dude, this was the issue. I really appreciate you helping me out, and also helping everybody out on this forum. God speed you magnificent bastard. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.