rigs-of-rods icon indicating copy to clipboard operation
rigs-of-rods copied to clipboard

Parser corrections (nodes2, forset, sectionconfig)

Open ohlidalp opened this issue 2 years ago • 6 comments

I reverted the parser to the original (2013 and earlier) sequential mechanic. That means things that one worked are back, but so are some restrictions that didn't apply in the time between.

ALPHA STATUS - Features and restrictions can still change.

Returning features:

  • everything except authors, fileinfo, guid, description can now be in section/end_section.
  • you can add various number of nodes2 in each section/end_section.
  • all elements except forset support named nodes (nodes2).
  • you can specify multiple configs for a single section, like this:
    sectionconfig 0 conf1
    sectionconfig 0 conf2
    
    section 0 conf1, conf2
    ; applies to both!
    end_section
    

Returning restrictions:

  • the fusedrag autocalc only takes in consideration nodes defined before it, so by defining them after it you basically instruct the game to exclude them from the autocalculation.
  • the managedmaterials must be specified before the props/flexbodies/flares which use them, otherwise they will end up all white.
  • Essentially all the "A must come before B" restrictions are back.

Bugfixes:

  • Fixes #171
  • Fixes #2881

Improvements:

  • forset is now a regular directive - you can put comments, empty lines or even section in between the flexbody proplike-line and the forset.
  • in the selector UI, the configuration combobox is now on top and the values below (click the ShowDetails checkbox) are accurately counted for that configuration. The counts are all saved in modcache. Cachefile format version was bumped. obrazek

ohlidalp avatar Jul 17 '22 21:07 ohlidalp

Issue list (will update as i find more)

Make sure you have skidmarks and particles enabled before testing (there is a segfault related)

  • https://forum.rigsofrods.org/resources/gavril-omega-det.591/ (spawns with doors broken, backspace fixes it) - same for Honda Accord and Ford Tudor
  • https://github.com/RigsOfRods/rigs-of-rods/files/4625970/Trailmasher.zip (wheels melt)

tritonas00 avatar Jul 28 '22 06:07 tritonas00

The cache should automatically update on version bump, but it's bugged in master. UPDATE: fixed in https://github.com/RigsOfRods/rigs-of-rods/pull/2928

Liebherr13HM spawns fine for me (f1testtrack, skidmarks on) but it's very jumpy at the start - might be a bug in #2829. UPDATE: No it isn't, it's just as jumpy.

ohlidalp avatar Jul 29 '22 16:07 ohlidalp

Liebherr13HM spawns fine for me (f1testtrack, skidmarks on)

Yeah, the skidmarks issue seems to be gone for me also, after your latest changes

tritonas00 avatar Jul 29 '22 16:07 tritonas00

RESOLVED: it was a stupid typo regarding float beam_t::maxnegstress - initial spawn set it to positive value (wrong), resetting set it to negative value (correct). Kudos to @tritonas00 for pinpointing what's different.

I'm wrestling a real mystery.... Honda Accord (download: https://forum.rigsofrods.org/resources/honda-accord.281/) blows up, even though all N/B values are exactly the same as in my v0.4.0.7 retro-build (see README). I made a debug dump from both versions (option diag_actor_dump) and compared with diff tool... spring, mass, damp, positions, refLen, bounding, short/long bounds... all equivalent. And it doesn't happen after repair using Backspace key, only at initial spawn. The GIF is slow-motion with ratio 0.07 btw. parserRevertHondaAccordMystery-w300 In the retrobuild, it just works. Both spawn and Backspace-repair do the same. It looks like I'm going to have to take a detour and create a diagnostic tool which would let me inspect the simulation step-by-step. UPDATE: Also added wings (FlexAirfoil) to the debug dump - no luck. UPDATE2: Added fusedrag and turbulent drag to the dump - again, no luck. UPDATE3: Added hydros and shocks - no luck.

ohlidalp avatar Sep 14 '22 13:09 ohlidalp

Purpose: My great personal amend - to make the vehicle parsing/spawning work at least as well as in v0.4.0.7 (year 2013, before I started working on it).

Estimate: 2 man days. Pending review...

ohlidalp avatar Oct 28 '22 11:10 ohlidalp

  • 1982 Ford Mustang missing textures (https://forum.rigsofrods.org/resources/ford-mustang-1979-1982.712/)
  • Austin Mini needs exorcism (https://forum.rigsofrods.org/resources/1965-austin-mini.298/)

tritonas00 avatar Mar 08 '23 16:03 tritonas00

The Austin Mini is posessed by fusedrag autocalc which is misplaced - it needs to be placed after nodes, otherwise it produces garbage. This is a classic limitation of the old parser which wasn't effective in between 2013-2023 but now is back - along with all the other "B must come after A" limitations, actually. The Mini must have been either updated in between 2013-2023 when the order didn't matter, or it may have used old-style fusedrag before. Either way, both the mod and the docs must be corrected:

  • Austin Mini https://forum.rigsofrods.org/resources/1965-austin-mini.298/ must be updated to have fusedrag autocalc after nodes. I tested it.
  • Docs must be updated https://docs.rigsofrods.org/vehicle-creation/fileformat-truck/#fusedrag - the autocalc only takes in consideration nodes defined above it, so by defining them after it you basically instruct the game to exclude them from the autocalculation.

ohlidalp avatar Mar 10 '23 12:03 ohlidalp

The Ford Mustang has managedmaterials after the wheels and some flexbodies (rear wing...) that use them. Again, this didn't matter between 2013-2023 but now it's back. I updated the PR summary to mention this.

ohlidalp avatar Mar 11 '23 09:03 ohlidalp

Current issues I've noticed so far:

  • Soundsources are always defined before nodes, this warning is incorrect image
  • Console spammed with debug info relating to beams
  • ~~Vehicle wind sounds from e.g. Gavrils continues playing after deletion~~ Actually a bug in master, not related to this PR
  • Ford F-Series Pack (https://forum.rigsofrods.org/resources/ford-f-series-pack.17/) issues:
    • Fusedrag section is also before nodes.
    • Parser claims forsets are defined outside available node range, which doesn't appear to be true: image
  • SM V5 monster truck pack (https://sim-monsters.com/files/file/4278-sm-v5/) resets infinitely. Amusingly, the truck travels quite quickly while resetting 😄 https://streamable.com/03mk1j. I assume this is caused by set_default_minimass not being parsed correctly (T menu claims the truck weighs 1.71 tons, should be 7.74 tons) image

CuriousMike56 avatar Mar 12 '23 07:03 CuriousMike56