blahpers Posted June 7, 2015 Share Posted June 7, 2015 Greetings, I'm attempting to minimize the amount of script changes needed to port a mod. What's the most reliable way to test whether the current environment is Don't Starve versus Don't Starve Together? Thanks! Link to comment https://forums.kleientertainment.com/forums/topic/54954-detecting-dst-vs-ds/ Share on other sites More sharing options...
Seiai Posted June 7, 2015 Share Posted June 7, 2015 @blahpers,if TheSim:GetGameID()=="DST" then Link to comment https://forums.kleientertainment.com/forums/topic/54954-detecting-dst-vs-ds/#findComment-645001 Share on other sites More sharing options...
DarkXero Posted June 7, 2015 Share Posted June 7, 2015 function IsDST_1() return GLOBAL.DST_CHARACTERLIST and true or falseendfunction IsDST_2() return GLOBAL.TheNet and true or falseend Link to comment https://forums.kleientertainment.com/forums/topic/54954-detecting-dst-vs-ds/#findComment-645005 Share on other sites More sharing options...
Seiai Posted June 7, 2015 Share Posted June 7, 2015 function IsDST_1() return GLOBAL.DST_CHARACTERLIST and true or falseendfunction IsDST_2() return GLOBAL.TheNet and true or falseend and what if they add that to DS, for whatever reason?^^ Link to comment https://forums.kleientertainment.com/forums/topic/54954-detecting-dst-vs-ds/#findComment-645008 Share on other sites More sharing options...
DarkXero Posted June 7, 2015 Share Posted June 7, 2015 @Seiai, then you get happy because that means new updates. Link to comment https://forums.kleientertainment.com/forums/topic/54954-detecting-dst-vs-ds/#findComment-645013 Share on other sites More sharing options...
blahpers Posted June 7, 2015 Author Share Posted June 7, 2015 Good enough for me. Thanks! Link to comment https://forums.kleientertainment.com/forums/topic/54954-detecting-dst-vs-ds/#findComment-645027 Share on other sites More sharing options...
Developer PeterA Posted June 8, 2015 Developer Share Posted June 8, 2015 if TheSim:GetGameID()=="DST" then This is correct! We also added this function to single player where it returns "DS". Link to comment https://forums.kleientertainment.com/forums/topic/54954-detecting-dst-vs-ds/#findComment-645359 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