Jump to content
  • gamestages.xml example has strange math, doesn't make sense with information given


    tyswid
    • Version: A21 b317

    Summary: Prompted by a subjectively "mid" night 7 (probably bc we died a lot) I looked through the gamestages xml to find out why it didn't feel intense. Trying to understand the cause I ran into this strange math where the multiplier resets for one player in the example.
     

     

    Game Version: (A21 b317)

    OS/Version: Windows

    CPU Model: AMD Ryzen 7 5600x

    System Memory: 16 GB 

    GPU Model and VRAM: RTX 3070 Ti 8GB

    Screen Resolution: 1920x1080

    Video Settings: Ultra

    Game mode: MP client

     

    Did you wipe old saves? No

     

    Did you start a new game? Yes* on first A21 experimental

     

    Did you validate your files? No

     

    Are you using any mods? No

     

    EAC on or off? On

     

    Status: NEW

     

    Bug Description:

    Quote

     

    This is how the game stage of a PARTY is calculated:
    The game stage of all (up to) 6 players is calculated.
    The players are sorted by game stage.

    The highest GS number is multiplied by "startingWeight".
    This then loops down the list and "startingWeight" is multiplied by "diminishingReturns" every time.

    Example:
    Players with GS 120, 30, 60, 91, 5, 80.
    startingWeight= 1.7, diminishingReturns=0.5

    So we get
    120 * 1.70 = 204
     91 *  .85 =  77
     80 *  .42 =  34
     60 *  .21 =  13
     30 *  .82 =  24
      5 *  .11 =   1
    ... or a total party GS of 353

     

    The problems are twofold:
    first at the 30 gamestage, it is multiplied by .82. If my math is correct, it should be .10 (.109 truncated like the .42). and the 5 should be multiplied by .05. This would equal a gamestage of 331.  Unless there is a multiplier I missed.

    Second is that parties can go up to 8, so does it take only the top 6? The example is unclear. Adding two more gamestages numbers and showing only the top 6 would help clarify.

     

    Detailed steps to reproduce the bug:

    1)Open game file location

    2)Open gamestages.xml in notepad

    3) search .82

     

    Actual result: example is introducing an unexpected .82

     

    Expected result: 
    So we get
    120 * 1.70 = 204
     91 *  .85 =  77
     80 *  .42 =  34
     60 *  .21 =  13
     30 *  .10 =  3
      5 *  .05 =   0
    ... or a total party GS of 331


    https://pastebin.com/0WgpHh8j


    User Feedback

    Recommended Comments

    Yup! That documentation is out-of-date. Here is the new version for your reference.
     

    
    This is how the game stage (GS) of a PARTY is calculated:
    
    The GS of all players in the party are calculated.
    The players are sorted by GS.
    The highest GS number is multiplied by "startingWeight".
    This then loops down the list and "startingWeight" is multiplied by "diminishingReturns" every time.
    The final result is then converted to an INT that rounds down.
    
    Example:
    Players with GS 120, 30, 60, 91, 5, 1, 2, 80
    startingWeight= 1, diminishingReturns=0.5 (defined in this xml file below)
    
    So we get
    120 * 1.0000000 = 204
     91 * 0.5000000 = 45.5
     80 * 0.2500000 = 20
     60 * 0.1250000 = 7.5
     30 * 0.0625000 = 1.875
      5 * 0.0312500 = 0.15625
      2 * 0.0156250 = 0.03125
      1 * 0.0078125 = 0.0078125
    
    ...for a total of 279.0703125 which is then rounded down to a GS of 279

     

    Link to comment
    Share on other sites

    8 hours ago, jdifran said:

    The first line of the calculation should = 120, so the total gamestage should really be 195.


    HA! Dang it! I used 204 as the GS in the spreadsheet that used to check this. Will fix! Thanks!

    Link to comment
    Share on other sites

    This is a clever mechanism with a limit of 2x the highest GS (if all players had the same GS).  By setting diminishingReturns=0.0 it would make the GS equal to the highest GS regardless of the number of players.

     

    I mention it because some folks on our multiplayer server don't like that group hordes are significantly harder than solo hordes (not just in numbers, but in the types of zombies that show up).  Setting diminishingReturns=0.0 would fix that.

    Link to comment
    Share on other sites



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...