silbinarywolf / sw-zombie-fortress

A VScript mod that aims to be a faithful reimplementation of the Zombie Fortress mode made originally with SourceMod
Other
0 stars 0 forks source link

add ability to configure zombie fortress settings #20

Closed silbinarywolf closed 1 year ago

silbinarywolf commented 1 year ago

Rather than always forcing Zombie Fortress on, we should allow the server-owner to configure when this is enabled

silbinarywolf commented 1 year ago

I have a first pass of this working and it'll likely land in v0.3.0. Currently user config files are optional and will look like this:

// User configuration file
//
// Instructions:
// - Rename this file to "config.nut" to use it
// - Remove the // comments for values where you want to change the defaults.
//
// If it's loaded successfully, the server logs will say "[ZF] Loaded user configuration"
::SW_ZF_LoadUserConfig <- function() {
    return {
        // Do not modify this, this is the config file format version.
        // This will allow us to support old config files if this structure gets updated.
        config_version = "1",

        // force_enabled will enable zombie fortress for all maps, not just zombie maps.
        // Default: false
        force_enabled = true,

        // survivor_team_ratio will make the survivor team have 65% of the player, and zombies
        // will have 35%.
        // Default: 0.65
        // survivor_team_ratio = 0.65,
    }
}
silbinarywolf commented 1 year ago

Released in https://github.com/silbinarywolf/sw-zombie-fortress/releases/tag/v0.3.0