RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
990 stars 175 forks source link

Tuning system glitches and shortcomings #3122

Closed ohlidalp closed 1 month ago

ohlidalp commented 4 months ago

Glitches:

Minor enhancements:

CuriousMike56 commented 4 months ago

MV4S_SuspensionMods.zip Apply two addons (any suspension mods) that change the same nodes -> crash. Ideally the game should display an error if conflicting parts (wheels, node/prop/flexbody tweaks) are installed. RoR_2024-02-11_21-12-04 devenv_2024-02-11_21-07-10

Miner34dev commented 4 months ago

Ideally the game should display an error if conflicting parts (wheels, node/prop/flexbody tweaks) are installed.

I was thinking about another solution... What about addon categories? Inside the addon parts you could add some drop down menus, Which should allow to only use one of the parts in the same category at the same time.

CuriousMike56 commented 2 months ago

In addition, the tuning menu has MP specific bugs:

Simplest workaround for now is to just disable the tuning menu when playing MP.

Miner34dev commented 2 months ago

Applying any addon reloads the vehicle, the server treats this as if you spawned a new vehicle. This can trigger the spawn spam protection if enabled. One time the spam protection kicked me but also crashed all other players on the server. Have yet to reproduce.

Can confirm, the same also happened to me.

ohlidalp commented 2 months ago

I looked into the crash when 2 addonparts tweak the same node. The problem is division by zero, which happens because both axis nodes of a wheel somehow end up having precisely the same coordinates - as result the axis vector is <0,0,0> and you know the rest. obrazek I couldn't figure out why this happens. When 2 tweaks clash on the same node, none of them actually take effect, the orignally logged tweak gets withdrawn. For example (RoR.log):

 ~~~ First tweak is found - added to working tuneup ~~~
 [RoR|Addonpart] INFO: file 'MV4_lowered.addonpart', element 'addonpart_tweak_node': tweaking node 119 with params { x=-1.523, y=0.266, z=-0.695 }

 ~~~ Second tweak is found - the previous one gets withdrawn ~~~
 [RoR|Addonpart] INFO: file 'MV4_rally.addonpart', element 'addonpart_tweak_node': Conflict of tweaks at node '119', addon parts '' and 'MV4_rally.addonpart'

I need to improve the logging - the collision message shows the 2nd addonpart name twice and 1st addonpart name is blank.

UPDATE: Fixed in #3151

ohlidalp commented 1 month ago

@Miner34dev

I was thinking about another solution... What about addon categories? Inside the addon parts you could add some drop down menus, Which should allow to only use one of the parts in the same category at the same time.

For the record, that makes sense but cannot be coded properly. There's no way for the game to figure out the category itself, i.e. suspension nodes cannot be distinguished from any other node. And relying on the addonpart creator to categorize the parts correctly won't fix this issue as inevitably some of them will make mistakes. @CuriousMike56

ohlidalp commented 1 month ago

Resolved by #3151