UPGRADES onlin limit?

BOLLOmanuel

hello

I have created a mod with many upgrades.. many many upgrades

if I use this mod offline (test, single race) it works fine, I mean that I can see ingame all the upgrades installed

but if I use it online, I can't see all the upgrades, in particular don't work the last upgrades of the list.
for example: the last category of the upgrades are the number.. and I can't see them ingame online. But if I move this category on the top of the upgrades list, then I can see the numbers online ingame

so the question is: in there a limit of upgrades online?
 
Yeah, there would be. If you check the log file from the session you'll see it shows an upgrade code like this for each vehicle:

<UpgradeCode>00000000 00000000</UpgradeCode>

This is a bitfield showing which upgrades are selected for the car. I think rfactor automatically works out how many bits are needed for each upgrade type (so if you have two tyre compounds available, it only needs to allow for two options, which is 1 bit; if you have 3 levels of dirty windscreen it'll use 2 bits [which is actually 4 different possible values, but the last one is wasted], and so on.)

Pretty sure the above is hex, so a total there of... uh... 8 bytes, so 64 bits. If the number of upgrades multiplied (sort of) by the number of options in each will exceed 64 bits, you'll lose the last ones.

Hopefully that makes sense and I'm not wrong :)
 
thanks Lazza

this colud be even the reason why for any category of Upgrades the limit is 64 elements (I discovered this some time ago)

I did not undestood which and where is this log file to check
 
The 64 elements for a single upgrade would be somewhat coincidental, just a 'sensible/reasonable' limit set by the game (you only need 6 bits for 64 options).

The logs are in Userdata\Log\Results. An .xml file is created for each session by default, and this includes a list of all vehicles with some info. Offline the game will probably handle more data, as you've found. Online, there is probably just the 8 bytes allocated for vehicle upgrades when sending vehicle info during connection to the server (and for sending upgrade info for all cars to other players, since upgrades can be graphical), so anything else is lost.
 
it's a disaster... I have 20 category of editable elements.. after some test, I've seen the category allowed online are 14-15

what a pity :(
 
You might need to explore combining some, or removing others altogether. Maybe you can add some additional vehicles that cover off quite a few of the alternative options, but obviously you'd very quickly end up with a lot of cars...

It might be possible to save one or two if you can work out where any wasted bits might be and somehow use them up, but it would take some planning. If you have an upgrade with 5 choices for example, the game will use 3 bits to store the setting, but 3 bits can actually store up to 8 different values - so 3 are wasted. If you can bring it down to 4 you will gain 1 bit that can then help to squeeze another option in.
 

Back
Top