About a year ago I studied the truck file parser of v0.4.0.7 (year 2013, before all my changes) and I discovered that sectionconfig and nodes2 were far more powerful than anyone knew. See this example:
; this defines a list of configurations the player can select from when spawning.
sectionconfig -1 VanillaSportscar
sectionconfig -1 SportscarWithRearWing
sectionconfig -1 SportscarWithFrontWing
sectionconfig -1 SportscarWithBothWings
; the vanilla car: nodes2, beams
section -1 SportscarWithFrontWing, SportscarWithBothWings
; the front wing: nodes2, beams
end_section
section -1 SportscarWithRearWing, SportscarWithBothWings
; the rear wing: nodes2, beams
end_section
; anything else using named nodes
The takeaways:
Each section/end_section could be part of multiple configurations
Each section/end_section could introduce arbitrary number of nodes2. Anything that referenced nodes by name could follow and it would not break.
Unfortunately this was never documented... I saw a single mod "KickerRamp" in the archive which would use sectionconfig to put additional named nodes in the middle of the truck file. Apparently someone knew about the functionality but most people didn't. Also, it was very difficult to understand from the code itself, so I unwittingly removed it as part of cleanup efforts. I'm currently working to restore it:
2711 - my first attempt, restored everything but was too sloppy and buggy. Abandoned.
Hello.
About a year ago I studied the truck file parser of v0.4.0.7 (year 2013, before all my changes) and I discovered that
sectionconfig
andnodes2
were far more powerful than anyone knew. See this example:The takeaways:
section/end_section
could be part of multiple configurationssection/end_section
could introduce arbitrary number ofnodes2
. Anything that referenced nodes by name could follow and it would not break.Unfortunately this was never documented... I saw a single mod "KickerRamp" in the archive which would use sectionconfig to put additional named nodes in the middle of the truck file. Apparently someone knew about the functionality but most people didn't. Also, it was very difficult to understand from the code itself, so I unwittingly removed it as part of cleanup efforts. I'm currently working to restore it:
2711 - my first attempt, restored everything but was too sloppy and buggy. Abandoned.
2829 - Preparation for the second attempt.
2922 - Final parser revert.