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.

jangofet

Section for DLC mods?

Recommended Posts

jangofet    45

I was wondering if we should make a new section for all the mods compatible for the new Reign of Giants DLC. I would love to use some of these, but of course, I don't know which ones work with the dlc and which ones don't.

Share this post


Link to post
Share on other sites
Heavenfall    185

Also, I have a mod that should be compatible with both normal and DLC games. Player says he crashed with normal game because there wasn't a IsDLCEnabled function. I can't actually check if this function is in the normal (non-DLC) game, because I can't disable the DLC on steam. But surely this function was patched into the normal game as well as the DLC game? Otherwise what's the point.

Share this post


Link to post
Share on other sites
DeathDisciple    292

IsDLCEnabled did not exist in standalone clients until latest patch, however was added in update about a week ago, altogether with api 5.

 

You could catch that error yourself if you want to ensure further backwards compatibility, like so

 

GLOBAL.FA_DLCACCESS=false
GLOBAL.xpcall(function()
                    GLOBAL.FA_DLCACCESS=  GLOBAL.IsDLCEnabled(GLOBAL.REIGN_OF_GIANTS)
                end,
                function()

                  --pre-dlc game version, throw a warning or something
                end
            )

 

however it will crash without error on api 5

Share this post


Link to post
Share on other sites
Heavenfall    185

The relevant mods are not backwards compatible anyway, but thank you for the reply and the suggested code. It is safe to assume player did not have an updated client then.

Share this post


Link to post
Share on other sites
DevilXD    49

You can use:

local ROGDLC = false

local DLCSupportExist = GLOBALsoftresolvefilepath("dlcsupport")

if not DLCSupportExist then

ROGDLC = false

else

if GLOBAL.IsDlcEnabled(GLOBAL.REGIN_OF_GIANTS) then ROGDLC = true end

end

Share this post


Link to post
Share on other sites
SethR    1229

Just wanted to let you guys know that the next patch will add a system for mod makers to specify if their mod is compatible with just the base game, just Reign of Giants, or both.  I'll post more details about how the system works when we push the patch out (probably next week), but basically you'll be able to specify:

dont_starve_compatible = truereign_of_giants_compatible = false

in the modinfo.lua file and the system will only load mods that have been specified to be compatible with the mode of the save slot that the player is starting (i.e. if I were to start a Reign of Giants game with a mod with the above specification, it would not load the mod for that game, but would keep it enabled).

 

This will also come with a new API version number. At this point, all moddable versions of Don't Starve should have the IsDLCInstalled and IsDLCEnabled functions reliably available to you, so the onus will still be on you to do any special case handling that your mod might call for.

Share this post


Link to post
Share on other sites
Rincevvind    61

hm what point in dont_starve_compatible ?

what happened if its will be false :)?

 

tbh what really need here - its some kind of folder with settings for mods, like data/moddata/_modnamehere_, which allows to save mod's settings for any session, not just current via adding custom component for storing data in save.

Share this post


Link to post
Share on other sites
DevilXD    49

If you make a mod, that modifies for ex. volt goats, there is no need to that mod be enabled if you play regular (non-

DLC) world...

Share this post


Link to post
Share on other sites