Jump to content

mods using default settings after being changed in modoverrides.lua


Recommended Posts

This is my first attempt at making a dedicated server and trying to setup mods.  The problem is, after changing the mod settings via the modoverrides.lua file, the mod still uses default settings after launching the server.  After some testing I can sucessfully turn the mod on and off using the modoverrides but the individual settings are not working out.  The modoverrides.lua is installed in the Documents > Klei > DoNotStarveTogether_EasyConfigOverworld and Documents > Klei > DoNotStarveTogether_EasyConfigCaves locations.  As a test, the only option I changed was number of grass collected from 7 (default) to 3. Any help on this would be greatly appreciated. 

modoverrides.lua

log.txt

Link to comment
Share on other sites

Hey @Xenovia welcome to the forums. Just inspected your modoverrides.lua and it seems you just got the syntax wrong. A sample of a working modoverrides.lua with individual mod changes can be seen in this post. You can't write up your own input data which was not specified by the mod creator from the list of options data in the modinfo.lua. Like writing 8.3333335E-4 for the rare big boss or 0.0014285714 for the rare boss while the options for opt_rare are only  0.0 ~ 1.0/3000 all explicitly as fractions.

That aside, I think this falls under the mod creator's responsibility to optimize their code to be able to be configurable for dedicated servers. If they are still actively keeping up the mod and still wish to do so. Inspecting the mod's modinfo.lua, the names for the mod options are written with spaces which I haven't encountered before with other mods that works for dedicated servers (I don't use a lot of mods). Normally the name and label should be different, but the Resourceful mod creator only specifies the name for the option which in turn makes the label default to what ever the name option is. The label is what you see in the configure mod options in-client while the name is the variable that carries the data that is manipulated by the mod. So I could be wrong but toggling mod options for this mod only works if you're toggling the data from an in-client create server page. 

Although it's also probably cause I haven't encountered a DST server mod written that way (Again, I don't use a lot of mods). If it is configurable via modoverrides.lua, I have no idea how to do so. I'd recommend you try other mods that does what you need or contact the mod creator to put out a modoverrides.lua file for their mod so the players that use their mod can use it for dedicated servers.

Then again, mod creators are not obligated to do so and only if they wish to still keep updating it. This is noted in the first bullet under the Modding Etiquette: General Guidelines. The Resourceful mod was last updated on 13 Dec, 2015 seen on the mod page.

Sorry for not being much help, good luck though and have fun tweaking your dedicated server. Cheers...

 

Link to comment
Share on other sites

Thanks for the help.  I didn't write this version of the modoverrides.lua file, I scrapped the original I started writing when I found the generation tool posted by Denoflions.  I thought it would save some time and hopefully remove part of the inexperience element on my part.  Maybe I will try and rewrite it the way I started just for fun to see if I can get it working that way.  Thanks again for the input.

Link to comment
Share on other sites

Hi @Xenovia

i have fixed your modoverrides.lua:

return {
["workshop-564227789"] = { --Resourceful
    enabled = true,
    configuration_options =
    {
        ["evergreen more log"] = 1,
        ["evergreen more log size increase"] = 1,
        ["evergreen more log lucky"] = 3,
        ["deciduous tree more log"] = 4,
        ["deciduous tree more log probability"] = 0.3,
        ["more grass"] = 3,
        ["more twig"] = 5,
        ["more rocks"] = 5,
        ["more rocks lucky"] = 7,
        ["more flint"] = 1,
        ["more flint lucky"] = 3,
        ["more goldnugget"] = 1,
        ["more goldnugget lucky"] = 5,
        ["more nitre"] = 1,
        ["more nitre lucky"] = 5,
        ["more meat"] = 1,
        ["more meat lucky"] = 4,
        ["drop pigskin probability"] = 0.1,
        ["rare redgem"] = 1.0/65,
        ["rare bluegem"] = 1.0/65,
        ["rare marble"] = 1.0/65,
        ["rare gear"] = 1.0/160,
        ["rare dragon_scales"] = 1.0/200,
        ["rare knight"] = 1.0/550,
        ["rare mandrake"] = 1.0/550,
        ["rare boss"] = 1.0/1000,
        ["rare big boss"] = 1.0/2200,
        ["rare feather"] = 1.0/100,
        ["rare rock"] = 1.0/65,
        ["rare flint"] = 1.0/65,
        ["rare spider"] = 1.0/40,
        ["rare spidergland"] = 1.0/65,
        ["rare silk"] = 1.0/50,
        ["chop tree drop change boost"] = 1,
        ["dig drop change boost"] = 2,
        ["dig unpickable drop change boost"] = 0.4,
    }
}
}

i have tested on my server and it's works:

160206093626959138.jpg

of course you can change value for all options, but you need check modinfo.lua of this mod:

Steam\steamapps\common\Don't Starve Together\mods\workshop-564227789\modinfo.lua

 

Link to comment
Share on other sites

To be honest, I do not see any functional difference between original @Xenovia's and @ToNiO55's modoverrides (apart from different numbers used), both logs show that the options are being overriden.

The reason that Xenovia's change of value of more grass option was not taken into account is that modmain is in fact not reading value of this configuration option at all, it is using hard coded value of 7.

Btw, using modoverrides to change values of configuration options is more powerful than changing them from client; you can specify any value. However you need to make sure that mod can actually take that value, put it to use and it won't for example crash. Values from modinfo should be safe to use. For example, Welcome message mod actually relies on this, you need to specify your own value, thus making this mod usable for dedicated servers only.

Link to comment
Share on other sites

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.

×
  • Create New...