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.

aehubrs

So confused about modoverrides.lua

Recommended Posts

aehubrs    1

Hey folks, I've been having a lot of trouble with modoverrides.lua.

Here is what I have so far:

 

return {
 

["workshop-676297854"] = { enabled = true,
        configuration_options =
        {
            {
                name    = 'campfire',
                label   = 'Allow rez at campfires',
                default = true,
                options = {
                    {description = 'Yes(Default)', data = true},
                    {description = 'No',           data = false},
                },
            },

            {
                name    = 'fire_rez_lighting_strike_on_rez',
                label   = 'Lighting strike on rezzing',
                default = false,
                options = {
                    {description = 'Enabled', data = true},
                    {description = 'Disabled', data = false},
                },
            },

           {
                name    = 'fire_rez_hunger_level',
                label   = 'Hunger level after res',
                default = 'default',
                options = {
                    {description = 'Default', data = 'default'},
                    {description = '50%',     data = 0.5},
                    {description = '40%',     data = 0.4},
                    {description = '30%',     data = 0.3},
                    {description = '20%',     data = 0.2},
                    {description = '10%',     data = 0.1},
                    {description = '5%',      data = 0.05},
                },
            },
        } -- Fire Resurrection

 

However, even though the default is set to false here, it's still causing a lightning strike. Am I supposed to change this to this?:

["workshop-676297854"] = { enabled = true,
        configuration_options =
        {
            ["campfire"] = "Yes(Default)"
            ["fire_rez_lighting_strike_on_rez"] = "Enabled"

            ["fire_rez_hunger_level"] = "50%"

        } -- Fire Resurrection

Share this post


Link to post
Share on other sites
Daniel86268    368

I think my guide on installing and configuring mods on a dedicated server would help you here. (Part "Configuring your mods")

TLDR your config should look something like this:

 ["workshop-676297854"] = { enabled = true,
        configuration_options =
        {
            ["campfire"] = "default",
            ["fire_rez_lighting_strike_on_rez"] = "true",
            ["fire_rez_hunger_level"] = "0.5"
        } -- Fire Resurrection 
}

The following errors were in your config:

1. You were missing commas between the configuration options.

2. You need to use the data of the configuration options, not the description. (That's what the user sees in the UI, the computer has no idea what that does.)

3. You were missing a } at the end to close the block.

 

hope this helps.

Ps: The first thing just looks like the config file for the mod itself. That doesn't belong into the modoverrides.lua whatsoever.

Share this post


Link to post
Share on other sites