-
Notifications
You must be signed in to change notification settings - Fork 49
Parsed data and other info
Some comments mark a field as Optional. Most fields are actually optional, in that if you don’t define them, they will use their default value. But the Optional fields mark extra behaviour that you would not normally bother with.
Modules like FSmeshSwitch, FStextureSwitch2 and FSfuelSwitch don’t use confignodes (the values inside a module that are inside a further set of { } ), they instead use a single line with a list of values. What used to look like this in FStextureSwitch:
MODULE
{
name = FStextureSwitch
textures
{
name = MyMod/Parts/bp/biPlaneGreen
name = MyMod/Parts/bp/biPlaneRed
}
objects
{
name = obj_main
name = obj_ctrlSrf
}
}
Now looks like this in FStextureSwitch2:
MODULE
{
name = FStextureSwitch2
textureNames = MyMod/Parts/bp/biPlaneGreen;MyMod/Parts/bp/biPlaneRed
objectNames = obj_main;obj_ctrlSrf
}
Options are separated with semicolons, and, if there’s a set of values inside one option, they are separated by commas. A floatCurve looks like this:
fuelConsumption = 0,0.01;0.7,0.04;1,0.1
or with tangents:
fuelConsumption = 0,0.01,0,0;0.7,0.04,0.1,0.1;1,0.1,0.3,0
Note the difference between semicolon separators, commas separating values that belong together, and periods for decimal points. There are no spaces after the commas or semicolons.
This system isn’t very pretty, but it avoids the use of confignodes, which is more prone to bugs, and can’t easily be updated by reloading the database while the game is running.