MidrealmDM Posted August 2, 2015 Share Posted August 2, 2015 I have a mod that has some features that are disable if RoG is not enabled. However, they are also disabled on DsT, even though DsT has all the features from RoG This is the code I am using to disable it when RoG is not installed.How can I keep it disable when RoG is not installed, but still enabled on DsT? if GLOBAL.IsDLCEnabled(GLOBAL.REIGN_OF_GIANTS) then AddCookerRecipe("cookpot", molasses_recipe) else end Link to comment Share on other sites More sharing options...
UnionGaming Posted August 2, 2015 Share Posted August 2, 2015 (edited) Surely there's a check to see if it's running on DST, and then adding the recipe if it is. I know that is a check, someone used it before ^^ What he said v Edited August 2, 2015 by UnionGaming Link to comment Share on other sites More sharing options...
Kzisor Posted August 2, 2015 Share Posted August 2, 2015 @MidrealmDM, if TheSim:GetGameID()=="DST" then -- do code for DST. Link to comment Share on other sites More sharing options...
MidrealmDM Posted August 2, 2015 Author Share Posted August 2, 2015 (edited) @MidrealmDM, if TheSim:GetGameID()=="DST" then -- do code for DST. Tried that... Got this error...scripts/mods.lua(211,1) Mod: waiter (Waiter 101 v3.2) Error loading mod!...s/common/dont_starve/data/../mods/waiter/modmain.lua:298: attempt to index global 'TheSim' (a nil value) Code from Modmain.lua: if TheSim:GetGameID()=="DST" then AddCookerRecipe("cookpot", molasses_recipe) else end Interestingly that piece of code works fine in the prefabs, but not in the modmain Edited August 2, 2015 by MidrealmDM Link to comment Share on other sites More sharing options...
Kzisor Posted August 2, 2015 Share Posted August 2, 2015 @MidrealmDM, That's because you need 'GLOBAL.' in front of it in modmain.lua. Link to comment Share on other sites More sharing options...
MidrealmDM Posted August 2, 2015 Author Share Posted August 2, 2015 @MidrealmDM, That's because you need 'GLOBAL.' in front of it in modmain.lua. Dang - yeah that did the trick. Thanks Link to comment 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