Page 1 of 3 123 LastLast
Results 1 to 10 of 30

Thread: <UpgradeCode> tag in the results file

  1. #1
    Senior Member
    Join Date
    Oct 2010
    Location
    Jacksonville, FL
    Posts
    435

    <UpgradeCode> tag in the results file

    Has anyone ever been able to figure out how the <UpgradeCode> tag works in the XML results files? I would like to know how to verify that people have the correct upgrades installed once a race is over.

  2. #2
    Former ISI Staff
    Join Date
    Sep 2010
    Posts
    171
    This explanation requires understanding of how the upgrade code is nothing more than a series of bits (but displayed in hexadecimal, IIRC).

    Each upgrade type, depending on the number of available levels, gets a number of bits assigned to it. If there are only two levels, it requires one bit. If there are 3 or 4 levels, it requires 2 bits. 5,6,7,8 -> 3 bits, etc. These bits are allocated from the full upgrade code, which is 64 bits.

    The first upgrade type uses the least significant bits, the second upgrade type uses the next bits, etc., so it's packed fairly tight. The current level is stored in binary inside the allocated bits.

    You might try an easy test with a car that has only one upgrade. Try different numbers of levels, and then also change the selected level and see how the code changes.

    Hope that helps.
    Please see the FAQ section for solutions to common issues

  3. #3
    Senior Member
    Join Date
    Oct 2010
    Location
    Jacksonville, FL
    Posts
    435
    Thanks Bee... That gives me some idea. Now I need to do some trial and error. If I can figure it out I may be able to write a little program that will read the XML results and then display the upgrades that each driver used. This would be really handy for admins.

  4. #4
    Senior Member
    Join Date
    Oct 2010
    Location
    Jacksonville, FL
    Posts
    435
    I thought I figured it out but now I am confused.

    0 = Option 0 (default)
    1 = Option 1
    2 = Option 2
    4 = Option 3
    8 = Option 4
    12 = Option 5
    16 = Option 6
    32 = Option 7
    64 = Option 8

    It made sense until that 12 was thrown in. To me a 12 would have indicated that Option 3 and Option 4 were both installed. So now I am confused again. Hahaha.

  5. #5
    Senior Member
    Join Date
    Oct 2010
    Location
    Jacksonville, FL
    Posts
    435
    It looks like the upgrade groups have some effect on how the options are valued.

  6. #6
    Former ISI Staff
    Join Date
    Sep 2010
    Posts
    171
    12 = Option 5
    Not sure I understand how you came up with that as a bit value?
    Please see the FAQ section for solutions to common issues

  7. #7
    Senior Member
    Join Date
    Oct 2010
    Location
    Jacksonville, FL
    Posts
    435
    Scratch what I said before. I thought I understood how it work at that time. I am still a little confused right now but here are some tests I did. I only selected one upgrade at a time. On this list I show at the far right which upgrade was selected. The first number it the upgrade group and the second number is the level. Level one would be default.

    <UpgradeCode>00000000 00000000</UpgradeCode> 1 1
    <UpgradeCode>01000000 00000000</UpgradeCode> 1 2
    <UpgradeCode>02000000 00000000</UpgradeCode> 1 3

    <UpgradeCode>00000000 00000000</UpgradeCode> 2 1
    <UpgradeCode>04000000 00000000</UpgradeCode> 2 2
    <UpgradeCode>08000000 00000000</UpgradeCode> 2 3
    <UpgradeCode>0c000000 00000000</UpgradeCode> 2 4
    <UpgradeCode>10000000 00000000</UpgradeCode> 2 5

    <UpgradeCode>00000000 00000000</UpgradeCode> 3 1
    <UpgradeCode>20000000 00000000</UpgradeCode> 3 2
    <UpgradeCode>40000000 00000000</UpgradeCode> 3 3
    <UpgradeCode>60000000 00000000</UpgradeCode> 3 4
    <UpgradeCode>80000000 00000000</UpgradeCode> 3 5
    <UpgradeCode>A0000000 00000000</UpgradeCode> 3 6
    <UpgradeCode>C0000000 00000000</UpgradeCode> 3 7
    <UpgradeCode>E0000000 00000000</UpgradeCode> 3 8
    <UpgradeCode>00010000 00000000</UpgradeCode> 3 9

    <UpgradeCode>00000000 00000000</UpgradeCode> 4 1
    <UpgradeCode>00020000 00000000</UpgradeCode> 4 2
    <UpgradeCode>00040000 00000000</UpgradeCode> 4 3

    <UpgradeCode>00000000 00000000</UpgradeCode> 5 1
    <UpgradeCode>00100000 00000000</UpgradeCode> 5 2
    <UpgradeCode>00200000 00000000</UpgradeCode> 5 3

  8. #8
    Senior Member
    Join Date
    Oct 2010
    Location
    Jacksonville, FL
    Posts
    435
    Never mind.. Figured it out. And you explained it exactly how it is. Hahaha. I am just a little slow I guess. You can't read the upgradecode without first knowing what upgrades are available for the car so you know how many bits are allocated for each upgrade for the car.

    Thanks again Bee for your assistance!

  9. #9
    Senior Member
    Join Date
    Oct 2010
    Location
    Jacksonville, FL
    Posts
    435
    So I was sick and took the day off work so I figured I would right this Upgrade Checker app. For pathing reasons you have to install it in your rFactor root directory. If you open an XML results file for a mod that isn't installed in this rFactor root then it will not work. If you have more then one install that you want to use this app with then you will have to install it for each rFactor install. This app will mostly be used by admins and I am sure they will understand the pathing issues.

    Here is a screen shot:


    And here is a download link:
    http://storage.srrs-racing.net/Misc/...ker%200.95.exe

    Oh yeah, this app requires dotNet 2.0 which most people probably have by now.

    Thanks again Bee for your assistance!

  10. #10
    Senior Member
    Join Date
    Oct 2010
    Location
    Okinawa/Holland
    Posts
    570
    Noel can i ask you something quickly since its silly to create an account on your website just for a quick question :-)

    We have added weights to our mod (F171) as upgrades. it ranges from 0 to 100KG. drivers select their own weight and after the race we check if they took the correct ones.

    We are seeing that not all weights are displayed proporly in the checker. for example a driver with 80kg's shows as 5KG's in the checker or 80 shows as 40KG (yes we tested it ourselfes)

    I see somewhere in your threads that the mod needs to be installed proporly in rf and the checker must be in root.

    Now, we have kept F171 vannila, created a secondary league mod with adjusted hdv and upgrade ini's and people can switch to either one using a batch file.
    Could this be the problem? Because the mod is not 100% where it should be?
    mod folders: F171 and then either F1-71OrigFiles or F1-71TWFCFiles.

    This thing is doing my head in, i cant find the source for the errors and the mod-split might be it?

    Any advise is appreciated :-)

Similar Threads

  1. rFactor results file errors
    By CordellCahill in forum rFactor 1 Technical Support
    Replies: 9
    Last Post: 01-27-2013, 11:34 PM
  2. XML Results reader in Java
    By Elantrax in forum rFactor 1 Technical Support
    Replies: 0
    Last Post: 07-15-2012, 03:30 PM
  3. Online rFactor Parser for Results
    By mAxL in forum rFactor 1 General Discussion
    Replies: 2
    Last Post: 12-09-2011, 07:27 AM
  4. XML Results file randomly written
    By Marcodika in forum rFactor 1 Technical Support
    Replies: 4
    Last Post: 07-01-2011, 04:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •