-
Notifications
You must be signed in to change notification settings - Fork 4
Config Format
All .cfg from Drop That (apart from drop_that.cfg) are loaded using a custom parser.
This results in some different behaviour than you would normally see in valheim config files.
- Detection of when settings are missing and when settings are empty.
- Warnings while parsing incorrect config files.
- Faster load time.
- No automatic comments for settings. Gotta go to this wiki now. Sorry.
[] are sections, that will contain all the lines following them, until the next section is reached.
- Eg., The section SomeSectionName will get the settings Line1 and Line2 assigned to it.
[SomeSectionName]
Line1 = Value1
Line2 = Value2
[SomeOtherSectionName]Sections can be "nested", by adding dots (.) to the section name. This will indicate the hierarchy they are in. This is also how Drop That makes lists.
Eg.,
[TopLevel]
Line1 = Value1
[TopLevel.LowerLevel]
Line1 = Value1Means that TopLevel will have a single line, but also an extra section associated, which has its own line.
Whether or not a nested section can be used, and which names are valid, depends on the specic configuration file in question.
Section lines always consist of a setting name, followed by a value. Eg.,
Setting1 = SettingValue`If a setting is not added, Drop That will select a value for that setting in the following order:
- Other configurations (eg. ones done by other mods), if any are present.
- The original value for the entity being modified, if any is being modified.
- The default value for that setting
If a setting value is not specified, but the setting is:
Setting1 = Drop That will read that as a desire to revert existing configurations to the original. Eg., if a mod is configuring Drop That to give a drop a higher amount, adding a corresponding line without setting the value, will make Drop That remove that increased higher amount and use the original.
Decimal numbers are always expected separated by .. That means 1/10 should be written as 0.1.
Comment lines can be added by starting with any of the following identifiers:
//#--
Whitespace before it is ignored.
Eg.,
# Some Comment
Setting=ValueLines starting with any of these identifiers are skipped during parsing. Comments in same line as normal settings is not supported.
Eg., Setting1=Value # Some Comment will attempt to read Setting1 as Value # Some Comment, and not just Value.
- CharacterDrop - Adding drops
- CharacterDrop - Modifying drops
- CharacterDrop - Disabling drops
- DropTable - Adding drops
- DropTable - Modifying drops
- DropTable - Disabling drops
- CharacterDrop - Named Lists
- DropTable - Named Lists