Online Upgrade Limitations

Excel240k

I've come to the end of a mod I've been working on for a couple of weeks, but there's one big problem:

Half of the car's upgrades don't work online.


In a singeplayer race, the car will work flawlessly with all upgrades appearing and functioning correctly; but when playing online, the last handful of upgrade types (not levels) will fail to show or function.

I've tried to diagnose the problem myself, and here is what I have found:

Trace.log
Upgrades.cpp 1015: Too much data in vehicle upgrade list to pack into 8 hardcoded bytes

This error appears around 4 times, although it seems to vary. To be fair, my upgrade list is pretty big by normal standards (around 205 upgrades), so right away I was thinking this is the problem; that it's simply too big for the game to handle. But is it? It's the most likely that I've found but still not concrete.

Taking a closer look at other mods, specifically drift mods, some have even more upgrades than mine, and still seem to work fine online. They also generate copies of the same error code. So now I'm just confused.

There are no errors in the upgrade file (brackets, indents, overlap, typos, etc).
File size and amount of lines does not matter.

Again referencing other mods, with both more and less upgrades, some exceed 3000 lines of code, and over 180kb in file size. I stand at a rough 2500 lines, and 78kb in size.

So taking all of the above into consideration, I tried reducing the file size, amount of lines and amount of upgrades. I took it down to 1500 lines, 50kb, and 120 upgrades. Still, the last few upgrade types did not work online.

At one point, I had it pinpointed to when I added 1 upgrade level to the last upgrade type, that upgrade level would stop working, but here's what happened:

-Add 1 upgrade level to last upgrade type = Stops working
-Add 1 upgrade level to second last upgrade type = Stops working
-Remove 3 upgrade levels from second last upgrade type = Working
-Remove 3 upgrade levels from second last upgrade type, Add 1 upgrade level to last upgrade type = Stops working.

The most confusing part is that the last upgrade type was only about 4 lines per upgrade level, and the second last upgrade type was about 15 lines per upgrade level. I reversed positions of the two upgrade types, one above the other, and the problem persisted.

I just finished my latest upgrades file, 1000 lines, 64kb, 172 upgrades, and only the very last upgrade type will not work.

Clean installation does not matter.
Different computer, different installation, did not change.
Server configurations do not matter.


There is no pattern I'm seeing in any of this, I've rewritten the upgrades file and the .gen files several times now and I think I'm about to go insane, or just release my mod as is for solo use only.

If anyone has any ideas, regardless of how silly, I'm willing to try it; all help is appreciated!
 

Back
Top