


This mod does not add content by itself, its an API for other modders that want an easy way to achieve file-dependant configurations that the user can modify ingame easily using an interface.
Configurable company will generate a menu when you click Host that will allow you to set variations of different aspects of the game. These variations will be stored among the save file of the game so you can have three different configurations.
This is only relevant if you plan on using the API
To create a new configuration use the class ConfigurationBuilder wich allows to instantiate new builders for the configuration.
Here is a visualization of how any configuration could be created:
ConfigurationBuilder.NewConfig("modder_config_name")
.SetName("Configuration name")
.SetType(ConfigurationType.Boolean)
.SetValue(true)
.Build();
The configuration system requires you to use a unique identifier for your individual configurations, I recommend setting it to something like modder_configuration_name as you can only use alphanumeric characters and underscores.
SetName(string) changes the displayed name of the configuration.SetType(ConfigurationType) sets what kind of values are accepted, you can choose one of the following:
0 to 100SetValue(?) specifies the default value when there is no previous one (OPTIONAL)Finally you must call the Build() method, as this will return you the configuration itself for you to use (you should really keep configurations as variables of type Configuration).
Alternatively you can just call Configuration.Create(identifier, name, category, type, defaultValue) but due to the complexity of the arguments, you might want to use the ConfigurationBuilder.
WARNING Keep in mind that your configurations must be created before the configuration menu is displayed, make sure to call any initializers for static variables or class references before this happens. As a suggestion, I recommend you to declare these configurations inside your main class as static variables.
If you plan to access other declared configurations, you can do so by calling Configuration.TryGet(identifier, out Configuration result) wich will try to get it and will return false if it does not exist, this allows you to keep soft dependencies with other mods.
Although not yet implemented, categories will be a way to sort different types of configuration into containers that will allow you to organize the configuartions.
You can still declare them and use them, however there will be no change until they are implemented.
To create a new category just call ConfigurationBuilder.NewCategory in the same way you call it to create a new configuration.
Categories will only be visual so you can only provide them with a display name.