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.

_Q_

IsDLCEnabled

Recommended Posts

_Q_    644

So command like that in modmain:

print(GLOBAL.IsDLCEnabled(GLOBAL.REIGN_OF_GIANTS))
print(GLOBAL.IsDLCEnabled(GLOBAL.CAPY_DLC))
print(GLOBAL.IsDLCEnabled(GLOBAL.PORKLAND_DLC))

returns something like this:

[00:00:48]: ../mods/Beffalo DS/modmain.lua(65,1) true    
[00:00:48]: ../mods/Beffalo DS/modmain.lua(66,1) true    
[00:00:48]: ../mods/Beffalo DS/modmain.lua(67,1) true   

for Vanilla hamlet enabled world.

Either its bugged or totally useless.

Share this post


Link to post
Share on other sites
MidrealmDM    104

print "Rog"
print(IsDLCEnabled(REIGN_OF_GIANTS))
print "Cappy"
print(IsDLCEnabled(CAPY_DLC))
print "Porkland"
print(IsDLCEnabled(PORKLAND_DLC))

Upon booting the game - this appears in the log...
[00:00:04]: ../mods/waiter-381565292/modmain.lua(213,1) Rog    
[00:00:04]: ../mods/waiter-381565292/modmain.lua(214,1) true    
[00:00:04]: ../mods/waiter-381565292/modmain.lua(215,1) Cappy    
[00:00:04]: ../mods/waiter-381565292/modmain.lua(216,1) true    
[00:00:04]: ../mods/waiter-381565292/modmain.lua(217,1) Porkland    
[00:00:04]: ../mods/waiter-381565292/modmain.lua(218,1) true   

Upon loading a Saved Game, this appears in the log.
[00:00:23]: ../mods/waiter-381565292/modmain.lua(213,1) Rog    
[00:00:23]: ../mods/waiter-381565292/modmain.lua(214,1) false    
[00:00:23]: ../mods/waiter-381565292/modmain.lua(215,1) Cappy    
[00:00:23]: ../mods/waiter-381565292/modmain.lua(216,1) false    
[00:00:23]: ../mods/waiter-381565292/modmain.lua(217,1) Porkland    
[00:00:23]: ../mods/waiter-381565292/modmain.lua(218,1) true

Share this post


Link to post
Share on other sites
_Q_    644
2 hours ago, MidrealmDM said:

print "Rog"
print(IsDLCEnabled(REIGN_OF_GIANTS))
print "Cappy"
print(IsDLCEnabled(CAPY_DLC))
print "Porkland"
print(IsDLCEnabled(PORKLAND_DLC))

Upon booting the game - this appears in the log...
[00:00:04]: ../mods/waiter-381565292/modmain.lua(213,1) Rog    
[00:00:04]: ../mods/waiter-381565292/modmain.lua(214,1) true    
[00:00:04]: ../mods/waiter-381565292/modmain.lua(215,1) Cappy    
[00:00:04]: ../mods/waiter-381565292/modmain.lua(216,1) true    
[00:00:04]: ../mods/waiter-381565292/modmain.lua(217,1) Porkland    
[00:00:04]: ../mods/waiter-381565292/modmain.lua(218,1) true   

Upon loading a Saved Game, this appears in the log.
[00:00:23]: ../mods/waiter-381565292/modmain.lua(213,1) Rog    
[00:00:23]: ../mods/waiter-381565292/modmain.lua(214,1) false    
[00:00:23]: ../mods/waiter-381565292/modmain.lua(215,1) Cappy    
[00:00:23]: ../mods/waiter-381565292/modmain.lua(216,1) false    
[00:00:23]: ../mods/waiter-381565292/modmain.lua(217,1) Porkland    
[00:00:23]: ../mods/waiter-381565292/modmain.lua(218,1) true

So it is bugged. I need it on startup of new world as well, in case someone is starting new game. Older mods that were using that method stopped functioning and are loading wrong scripts on startup, causing various issues.

Share this post


Link to post
Share on other sites