BillBobJoy Posted March 4, 2014 Share Posted March 4, 2014 If you want a mod to be usable to people to have the original game and the RoG DLC would the capable of interacting with DLC content be backwards compatible? Link to comment https://forums.kleientertainment.com/forums/topic/32265-question-with-the-new-dlc-is-it-necessary-to-have-two-versions-of-a-mod-available/ Share on other sites More sharing options...
squeek Posted March 4, 2014 Share Posted March 4, 2014 (edited) Here's what I'm using to detect if the DLC is enabled (IsDLCEnabled and the REIGN_OF_GIANTS constant are defined in dlcsupport.lua): local is_rog_enabled = IsDLCEnabled ~= nil and IsDLCEnabled(REIGN_OF_GIANTS)So, you won't need to make 2 different versions of the mod, but instead use different logic based on whether or not the DLC is enabled. It'll definitely make mods more complicated to support, especially after there have been a few DLCs.Here's an example of what I do in my Trick-or-Treat mod to support both RoG's 4 seasons and the standard 2 seasons:local hasfourseasons = IsDLCEnabled ~= nil and IsDLCEnabled(REIGN_OF_GIANTS)if (hasfourseasons and seasonmanager:IsAutumn()) or (not hasfourseasons and seasonmanager:IsSummer()) then -- do stuffend Edited March 4, 2014 by squeek Link to comment https://forums.kleientertainment.com/forums/topic/32265-question-with-the-new-dlc-is-it-necessary-to-have-two-versions-of-a-mod-available/#findComment-423851 Share on other sites More sharing options...
BillBobJoy Posted March 4, 2014 Author Share Posted March 4, 2014 I see, so whenever a mod encounters something that could be different in the standard version and the DLC version just detect which they are running and have code for both cases. Link to comment https://forums.kleientertainment.com/forums/topic/32265-question-with-the-new-dlc-is-it-necessary-to-have-two-versions-of-a-mod-available/#findComment-423859 Share on other sites More sharing options...
squeek Posted March 4, 2014 Share Posted March 4, 2014 I see, so whenever a mod encounters something that could be different in the standard version and the DLC version just detect which they are running and have code for both cases.Exactly. Link to comment https://forums.kleientertainment.com/forums/topic/32265-question-with-the-new-dlc-is-it-necessary-to-have-two-versions-of-a-mod-available/#findComment-423883 Share on other sites More sharing options...
Developer SethR Posted March 4, 2014 Developer Share Posted March 4, 2014 We're hoping to add a way for modders to specify in the modinfo file if it's a main-game-only mod or a DLC-only mod or a mod that works with both! Even once we do add that flag, you'll quite possibly need to do some special casing using a IsDLCEnabled(REIGN_OF_GIANTS) call, as @squeek mentioned. Link to comment https://forums.kleientertainment.com/forums/topic/32265-question-with-the-new-dlc-is-it-necessary-to-have-two-versions-of-a-mod-available/#findComment-423927 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