Node/beam diagnostic options roundup

only_a_ptr

Infamous Developer
Administrator
Developer
Joined
Jan 31, 2018
Messages
167
Location
Prague, CZ
A few days ago I got a few very good Discord suggestions for N/B diagnostic logging, so I thought to look at what we provide and if it could work better.

My idea: each diagnostic feat should be:
  • controlled by a `diag_*` cvar, toggleable in real time (as opposed to spawn-time-only) by console (or GUI if present there)
  • log to ingame console (automatically written to RoR.log, too) as "area: actor, type: notice".
The following table shows the state of each feature in stable release vs. my working branch https://github.com/RigsOfRods/rigs-of-rods/pull/2846. Written as "stable -> working".
cvarrealtimeingame consolemsgs
diag_truck_mass (bool)yesno -> yes
  • "Node '{}' mass ({} Kg) is too light. Resetting to 'minimass' ({} Kg)"
  • "Node {}: {:.3} Kg" ... (info about loaded / override settings)
diag_log_beam_break (bool)no->yesyes
  • "Support beam {} (between nodes {} and {}) just broke from over-extension (cur. length: {} / max. length: {})"
  • "Beam {} (between nodes {} and {}) just broke (force: {} / strength {}, detacher_group: {})."
  • "Beam {} (between nodes {} and {}) was by detacher_group {}"
  • "Wheel {} (axis nodes {} and {}) was detached by detacher_group {}"
  • "Inter-actor beam {} (between nodes {} and {}) just broke (force: {} / strength {})."
diag_log_beam_deform (bool)no->yesyes
  • "Beam {} (between nodes {} and {}) just deformed from over-compression (force: {} / strength: {})"
  • Beam {} (between nodes {} and {}) just deformed from over-extension (force: {} / strength: {})"
  • "Inter-actor beam {} (between nodes {} and {}) just deformed from over-compression (force: {} / strength: {})"
  • "Inter-actor beam {} (between nodes {} and {}) just deformed from over-extension (force: {} / strength: {})"
diag_log_beam_trigger (bool)noyestbd

Ideas by Danny Werewolf#9179 @Discord:
  • I would love to know why the beam broke, at the least if it was because of a detacher_group triggering it, and if it was broken because of over-contraction or over-extension.
  • One diagnostic (I think, or tool I guess) would be a way to see what major detacher_group beam broke a detacher_group. Would make troubleshooting unwanted breakage alot easier.
UPDATE: Turns out both suggestions were already covered, I just added a detacher group to the "beam broke" message and nodes to the "beam/wheel detached" messages.

I'll update this post as I go.
 
Last edited:
It so hapenned that I need very detailed physics diagnostic tool myself, because https://github.com/RigsOfRods/rigs-of-rods/pull/2922#issuecomment-1246750364
My plan of action:
  • Check what feats my v0.4.0.7 retro-build (see README) has. I don't want anything useful to get lost. I already noticed one thing - in 'skeletonview', stressed beams start progressively change collor from dark green (low stress) to red (high stress). The current skeletonview does it too, but the colors are badly visible and the sensitivity is completely elsewhere...
  • Add logging to capture physics state of selected nodes/beams every N physics ticks.
  • Add GUI to let you step the physics manually by given number of ticks, or set conditions which will make the game slow down/halt physics in certain conditions. In other words, tools to investigate glitches and irregularities in the simulation.
  • Research and dust off our 'Replay' features which actually captures physics frames and lets you rewind time. But enabling it is an excercise in RoR.cfg. I'll make it more accessible.
 
Back
Top