[SOLVED] Need clarification on "r-wheel definition" error and the reason behind naming convention.

Post Reply
ChiliBeef
Posts: 493
Joined: 27 Mar 2022 18:34

[SOLVED] Need clarification on "r-wheel definition" error and the reason behind naming convention.

#1 Post by ChiliBeef » 02 Nov 2022 16:02

This is a bit of a long read with examples, but bear with me. This has been something that's been confusing me for a long time, and only more so since I started creating my first mod: r-wheel definition and its associated errors.

Searching about this has not actually produced a real answer as to how and, most importantly, why the r-wheel definitions need to be set a certain way. I've only seen a couple threads on here only mentioning "just look at how a vanilla truck has it" or "you need to add rnuts2, etc.", but that doesn't actually provide the answer on how the r-wheel definitions work.

My mod has three variations, two of which are tandem axles and one which is a tridem axle. Trying to access the tridem axle variation in the dealership results in a crash with the infamous "<ERROR> Incorrect r-wheel definition for truck.pmd".

Code: Select all

<ERROR> Incorrect r-wheel definition for /vehicle/truck/389cruiser/truck.pmd
<ERROR> d:\buildbot\slaves\win_slave\final_build_ats_145_windows_bin_steam_x64\build\prism\src\p3core\collections\arrays\arrays_base_impl.h(491): ??A?$array_t@_N@prism@@QEAAAEA_N_K@Z: Index outside array boundaries.

My dealership def file is set up just like how the vanilla truck (Peterbilt 359) has it.

Code: Select all

accessories[]: .ftire
accessories[]: .fdisc
accessories[]: .fhub
accessories[]: .fnuts

accessories[]: .rtire1
accessories[]: .rdisc1
accessories[]: .rhub1
accessories[]: .rnuts1

accessories[]: .rtire2
accessories[]: .disc2
accessories[]: .rhub2
accessories[]: .rnuts2
The same goes for the chassis def files with the whole "residual_travel", "powered_axle", "kerb_weight" thing.

If you would like to look over my .def files to see if I'm overlooking something, here you go: https://easyupload.io/6aysdl

Also, the vanilla truck uses the same .pmd file for all its chassis def files and has variants to allow different axle setups. The same goes for mine. The only thing that I've noticed in the vanilla truck's .pmd is how it does its wheel_r locator names as compared to mine.

First, here is my wheel_r setup:
[ external image ]

And, here is the vanilla truck's:
[ external image ]

This is where I want to understand how it should be set up. I've seen other multi-axle truck mods work without a problem but, again, their wheel_r locators work but when I try to even replicate that, I would still get the errors. Is there a limit to how many wheel_r locator names there should be (i.e., go no higher than r_wheel_3) ? Is there a particular naming convention (i.e., r_wheel_0_0, r_wheel_0, r_wheel_0.001, etc) to follow?

So, this is where I genuinely want to know HOW the r-wheel definitions are supposed to work and for what reason. I haven't found an actual document or anything that says something along the lines of, "The wheel definitions needs to be set as this for the front axles and the rear axles. This is why it needs to be done this way. Here is an example to show correct and incorrect way." The Wiki documentation is severely lacking on this, also.

If someone who is very knowledgeable on this would explain it to me, I would greatly appreciate it. For me, when something doesn't work I want to know the "Why?" behind it so that I can get a better understanding of how it all works which helps me be able to fix it.
Last edited by ChiliBeef on 08 Jan 2023 17:53, edited 2 times in total.
You can write almost any way you want, and you might make yourself understood.
But, if you don't use standard English properly, you would also help people understand that you aren't well educated.
User avatar
xXCARL1992Xx
Posts: 16462
Joined: 17 Aug 2016 12:18
Contact:

Re: Another question from me: Need clarification on "r-wheel definition" error, and the reason behind naming convention.

#2 Post by xXCARL1992Xx » 02 Nov 2022 17:10

you number them 0 to 5 for a tridem, where the left side of the vehicle is always even numbers (0, 2, 4 etc.) and the right side always odd ones (1, 3, 5 etc.)

and not more then 0 to 5 if it is a tridem or else the game thinks you have a truck with even more axles but it cant find definitions for it so that is why you see the _0, _1, _3 suffix, this is because multiple chassis are in 1 file but even if it is only 1 chassis SCS still keeps this template

on the 49X for example it is wheel_r_0_l, for whatever reason to wheel_r_5l on the tridem axle trucks, you just numbered them 0 though 14 wich, ofc, causes conflict

the wheel definitions are always per axle, so rdisc1 is the first axle (wheel_r_0 and wheel_r_1) rdisc2 is the second one, rdisc3 the third etc.
| !!!NO SUPPORT OR REQUESTS OF ANY SORT VIA PM!!! | Screenshot Thread | Steam Workshop | World of Trucks Profil |
[ external image ]
ChiliBeef
Posts: 493
Joined: 27 Mar 2022 18:34

Re: Another question from me: Need clarification on "r-wheel definition" error, and the reason behind naming convention.

#3 Post by ChiliBeef » 02 Nov 2022 17:43

@xXCARL1992Xx, haha, I actually figured it out (half of what you said) and came here to write what I found out just in case someone else comes across this problem. And, I actually just closed out the 49X file, as well. :lol: As always, thank you, Carl, for your advice. You did mention some things that I was not aware of, such as the highest number allowed for the locators' sequence.


The solution
What happened was that it eventually dawned on me to see if what the game requires is for each variant to have its OWN series of wheel locators starting from 0. So, I went back to my file and renamed the locators respective to their variant versus being an overall sequence of numbers regardless of what variant they belong to.

So, I have three variants: daycab, sleeper, legacy.

Daycab's rear wheel locators are
wheel_r_0 & wheel_r_1
wheel_r_2 & wheel_r_3


Sleeper's rear wheel locators are:
wheel_r_0.001 & wheel_r_1.001
wheel_r_2.001 & wheel_r_3.001


Legacy's rear wheel locators are:
wheel_r_0.002 & wheel_r_1.002
wheel_r_2.002 & wheel_r_3.002
wheel_r_4.002 & wheel_r_5.002


[ external image ]

Lo and behold, it all worked!
xXCARL1992Xx wrote: 02 Nov 2022 17:10 the wheel definitions are always per axle, so rdisc1 is the first axle (wheel_r_0 and wheel_r_1) rdisc2 is the second one, rdisc3 the third etc.
I was wondering about that, actually. So, you CAN have an rdisc3 in the def file (so long as the truck that's to be displayed has three rear axles) ?
Last edited by ChiliBeef on 08 Jan 2023 17:54, edited 1 time in total.
You can write almost any way you want, and you might make yourself understood.
But, if you don't use standard English properly, you would also help people understand that you aren't well educated.
User avatar
xXCARL1992Xx
Posts: 16462
Joined: 17 Aug 2016 12:18
Contact:

Re: Another question from me: Need clarification on "r-wheel definition" error, and the reason behind naming convention.

#4 Post by xXCARL1992Xx » 02 Nov 2022 17:55

yes, because the definition always define an axle and not a single wheel, so for a tridem you need 3 rdisc, rnuts etc.
| !!!NO SUPPORT OR REQUESTS OF ANY SORT VIA PM!!! | Screenshot Thread | Steam Workshop | World of Trucks Profil |
[ external image ]
ChiliBeef
Posts: 493
Joined: 27 Mar 2022 18:34

Re: Another question from me: Need clarification on "r-wheel definition" error, and the reason behind naming convention.

#5 Post by ChiliBeef » 03 Nov 2022 13:32

@xXCARL1992Xx Thank you for that clarification. :)
You can write almost any way you want, and you might make yourself understood.
But, if you don't use standard English properly, you would also help people understand that you aren't well educated.
Post Reply

Return to “Blender Tools”

Who is online

Users browsing this forum: No registered users and 3 guests