Results 1 to 22 of 22

Thread: Changing World Cup qualifiers?

  1. #1
    Join Date
    21-06-14
    Location
    Canada
    Posts
    489
    vCash
    500

    Changing World Cup qualifiers?

    So, another two-part question from me!

    1. How can one change the teams who've qualified for the 2002 World Cup? I imagine this is hardcoded somewhere... have the necessary offsets been found, if so?

    2. Is it possible to change the number of countries that qualify from each continent?

  2. #2
    Join Date
    05-06-12
    Posts
    1,035
    vCash
    3700
    Code:
    0092EB46  |.  66:817F 40 D2 CMP WORD PTR DS:[EDI+40],7D2 //7D2 = 2002 in decimal
    0092EB4C  |.  0F85 9D040000 JNE 0092EFEF
    0092EB52  |.  A1 00F39C00   MOV EAX,DWORD PTR DS:[9CF300]            ; France
    0092EB72  |.  A1 60F49C00   MOV EAX,DWORD PTR DS:[9CF460]            ; Senegal
    0092EB92  |.  A1 F4F49C00   MOV EAX,DWORD PTR DS:[9CF4F4]            ; Uruguay
    0092EBB3  |.  A1 C0F29C00   MOV EAX,DWORD PTR DS:[9CF2C0]            ; Denmark
    
    0092EBD3  |.  A1 88F49C00   MOV EAX,DWORD PTR DS:[9CF488]            ; Spain
    0092EBF4  |.  A1 74F49C00   MOV EAX,DWORD PTR DS:[9CF474]            ; Slovenia
    0092EC14  |.  A1 20F49C00   MOV EAX,DWORD PTR DS:[9CF420]            ; Paraguay
    0092EC35  |.  A1 80F49C00   MOV EAX,DWORD PTR DS:[9CF480]            ; South Africa
    
    0092EC55  |.  A1 60F29C00   MOV EAX,DWORD PTR DS:[9CF260]            ; Brazil
    0092EC76  |.  A1 DCF49C00   MOV EAX,DWORD PTR DS:[9CF4DC]            ; Turkey
    0092EC96  |.  A1 98F29C00   MOV EAX,DWORD PTR DS:[9CF298]            ; China
    0092ECB7  |.  A1 A8F29C00   MOV EAX,DWORD PTR DS:[9CF2A8]            ; Costa Rica
    
    0092ECD7  |.  A1 84F49C00   MOV EAX,DWORD PTR DS:[9CF484]            ; South Korea
    0092ECF8  |.  A1 30F49C00   MOV EAX,DWORD PTR DS:[9CF430]            ; Poland
    0092ED18  |.  A1 F8F49C00   MOV EAX,DWORD PTR DS:[9CF4F8]            ; USA
    0092ED39  |.  A1 34F49C00   MOV EAX,DWORD PTR DS:[9CF434]            ; Portugal
    
    0092ED5C  |.  A1 14F39C00   MOV EAX,DWORD PTR DS:[9CF314]            ; Germany
    0092ED7D  |.  A1 58F49C00   MOV EAX,DWORD PTR DS:[9CF458]            ; Saudi Arabia
    0092ED9D  |.  A1 DCF29C00   MOV EAX,DWORD PTR DS:[9CF2DC]            ; Ireland
    0092EDBE  |.  A1 7CF29C00   MOV EAX,DWORD PTR DS:[9CF27C]            ; Cameroon
    
    0092EDDE  |.  A1 18F29C00   MOV EAX,DWORD PTR DS:[9CF218]            ; Argentina
    0092EDFF  |.  A1 00F49C00   MOV EAX,DWORD PTR DS:[9CF400]            ; Nigeria
    0092EE1F  |.  A1 E4F29C00   MOV EAX,DWORD PTR DS:[9CF2E4]            ; England
    0092EE40  |.  A1 A8F49C00   MOV EAX,DWORD PTR DS:[9CF4A8]            ; Sweden
    
    0092EE60  |.  A1 60F39C00   MOV EAX,DWORD PTR DS:[9CF360]            ; Italy
    0092EE81  |.  A1 D4F29C00   MOV EAX,DWORD PTR DS:[9CF2D4]            ; Ecuador
    0092EEA1  |.  A1 ACF29C00   MOV EAX,DWORD PTR DS:[9CF2AC]            ; Croatia
    0092EEC5  |.  A1 D0F39C00   MOV EAX,DWORD PTR DS:[9CF3D0]            ; Mexico
    
    0092EEE8  |.  A1 6CF39C00   MOV EAX,DWORD PTR DS:[9CF36C]            ; Japan
    0092EF0C  |.  A1 44F29C00   MOV EAX,DWORD PTR DS:[9CF244]            ; Belgium
    0092EF2F  |.  A1 48F49C00   MOV EAX,DWORD PTR DS:[9CF448]            ; Russia
    0092EF53  |.  A1 D8F49C00   MOV EAX,DWORD PTR DS:[9CF4D8]            ; Tunisia
    You should be able to change the first line to alter the year the games uses these nations.
    Filling the second line with NOP should result in the game always using these nations.

    Config file for use with Hugo - just save as a .txt file in the ./config/hugo/ directory.
    Hugo can be downloaded here: http://www.champman0102.co.uk/downlo...do=file&id=201
    This will let you edit the nations by selecting from a series of drop-down lists.
    Code:
    3.9.68
    nation 0x52EB53 France
    nation 0x52EB73 Senegal
    nation 0x52EB93 Uruguay
    nation 0x52EBB4 Denmark
    nation 0x52EBD4 Spain
    nation 0x52EBF5 Slovenia
    nation 0x52EC15 Paraguay
    nation 0x52EC36 South Africa
    nation 0x52EC56 Brazil
    nation 0x52EC77 Turkey
    nation 0x52EC97 China
    nation 0x52ECB8 Costa Rica
    nation 0x52ECD8 South Korea
    nation 0x52ECF9 Poland
    nation 0x52ED19 USA
    nation 0x52ED3A Portugal
    nation 0x52ED5D Germany
    nation 0x52ED7E Saudi Arabia
    nation 0x52ED9E Ireland
    nation 0x52EDBF Cameroon
    nation 0x52EDDF Argentina
    nation 0x52EE00 Nigeria
    nation 0x52EE20 England
    nation 0x52EE41 Sweden
    nation 0x52EE61 Italy
    nation 0x52EE82 Ecuador
    nation 0x52EEA2 Croatia
    nation 0x52EEC6 Mexico
    nation 0x52EEE9 Japan
    nation 0x52EF0D Belgium
    nation 0x52EF30 Russia
    nation 0x52EF54 Tunisia
    Please note: I haven't actually tested any of the above.

  3. The Following 2 Users Say Thank You to JohnLocke For This Useful Post:


  4. #3
    Join Date
    21-06-14
    Location
    Canada
    Posts
    489
    vCash
    500
    Thanks, I'm gonna give this a try right now.

    I just finished the whole process for seeding and drawing the groups (since I need 8 groups instead of 6, and a few more teams) - this was fun, and something in the code made me have to do some FIFA-like backroom manipulations to make sure the actual host nations are recognised as being hosts by the game (i.e. have to make sure the hosts are replacing South Korea and Japan in groups D and H respectively).

  5. #4
    Join Date
    05-06-12
    Posts
    1,035
    vCash
    3700
    Hosts for the 2002 World Cup is determined by these two lines
    005F9A21 |. 8B15 84F49C00 MOV EDX,DWORD PTR DS:[9CF484] ; South Korea
    005F9A2C |. 8B0D 6CF39C00 MOV ECX,DWORD PTR DS:[9CF36C] ; Japan

    Add these two lines to the Hugo config file (untested) and you should be able to edit the hosts.
    Code:
    nation 0x1F9A23 Co-Host: South Korea
    nation 0x1F9A2F Co-Host: Japan

  6. #5
    Join Date
    21-06-14
    Location
    Canada
    Posts
    489
    vCash
    500
    Okay, so I changed everything - hosts (present and future bidders), qualifiers for the 2002 edition and other stuff (hosts for other international comps). Started the game and went immediately on vacation, at the "updating game" times I returned from vacation to see things...

    On December 26 there was an error: v3.9.68 Cup..cpp 1187. But this error clicked right through, and the game continued. I checked the groups for the World Cup, and everything was as should be per the changes I'd made.

    On January 2 there was another error: v3.9.68 Cup..cpp 1450. This one also clicked right through and the game continued on.

    Vacationed until just before the start of the World Cup, and advanced through manually - everything went just fine without a problem. So, I'm encouraged, this looks to be working!

    For the record, in the final, Alex Morgan scored her 50th international goal in the 27th minute to beat England 1:0.

  7. The Following 2 Users Say Thank You to Rapinoe For This Useful Post:


  8. #6
    Join Date
    05-06-12
    Posts
    1,035
    vCash
    3700
    These error codes can be found at:
    0051A36F | PUSH 4A3 (1187 decimal)
    0051AB0F | PUSH 5AA (1450 decimal)

    The latter seems to relate to this message: "CUP::process_fixture() : third match should not have a replay (round %d in %s)"

    Filling the following two lines with NOP should suppress the error messages - but it won't fix the underlying cause. (Untested)
    0051A396 | CALL 005E8290
    0051ABD9 | CALL 005E8290

  9. The Following User Says Thank You to JohnLocke For This Useful Post:


  10. #7
    Join Date
    02-03-12
    Posts
    4,850
    vCash
    1075
    Quote Originally Posted by JohnLocke View Post
    Hosts for the 2002 World Cup is determined by these two lines
    005F9A21 |. 8B15 84F49C00 MOV EDX,DWORD PTR DS:[9CF484] ; South Korea
    005F9A2C |. 8B0D 6CF39C00 MOV ECX,DWORD PTR DS:[9CF36C] ; Japan

    Add these two lines to the Hugo config file (untested) and you should be able to edit the hosts.
    Code:
    nation 0x1F9A23 Co-Host: South Korea
    nation 0x1F9A2F Co-Host: Japan
    what if you set the same nation twice? e.g. brazil & brazil

  11. #8
    Join Date
    21-06-14
    Location
    Canada
    Posts
    489
    vCash
    500
    I read in the thread about changing World Cup hosts that if you do that, then Brazil would show up twice, in two groups, and the game would crash if they both advanced out of the group stage.

    I started a new game, and checking the WC qualifiers, we see this:



    ...and this is /after/ changing the qualifiers via the offsets listed by JohnLocke above! This suggests to me that there is some other location where the WC qualifiers are mentioned in the code, perhaps? Because, after drawing the groups on December 27, it looks like this:



    ...which is all as it should be per the offsets I changed. (Apart from Germany being the 'previous winner'... which I don't know if I can change that other than by swapping Germany and Japan in the groups).

  12. The Following User Says Thank You to Rapinoe For This Useful Post:


  13. #9
    Join Date
    05-06-12
    Posts
    1,035
    vCash
    3700
    Quote Originally Posted by Rapinoe View Post
    (Apart from Germany being the 'previous winner'... which I don't know if I can change that other than by swapping Germany and Japan in the groups).
    Could that be based on the data?

  14. The Following User Says Thank You to JohnLocke For This Useful Post:


  15. #10
    Join Date
    04-01-13
    Posts
    40
    vCash
    500
    The only problem with previous 2001 start dates is the World Cup qualification first draw, which is hard-coded for some continents to year 2004. Would it be possible to change this using OllyDbg?

  16. #11
    Join Date
    18-03-14
    Posts
    687
    vCash
    5100
    Try changing:
    Code:
    009182DB MOV EAX,7D4 --> MOV EAX,7CC
    00918473 JL 0091847C --> JMP 0091847C 
    0092036D MOV EAX,7D4 --> MOV EAX,7CC
    009204B8 JL 009204C1 --> JMP 009204C1

  17. The Following User Says Thank You to saturn For This Useful Post:


  18. #12
    Join Date
    04-01-13
    Posts
    40
    vCash
    500
    Quote Originally Posted by saturn View Post
    Try changing:
    Code:
    009182DB MOV EAX,7D4 --> MOV EAX,7CC
    00918473 JL 0091847C --> JMP 0091847C 
    0092036D MOV EAX,7D4 --> MOV EAX,7CC
    009204B8 JL 009204C1 --> JMP 009204C1
    It works!

    Only the Asian section is still expecting the draw for 28th March 2005. Do you have the offsets?

    Thank you!

  19. #13
    Join Date
    18-03-14
    Posts
    687
    vCash
    5100
    00911CB7 MOV EAX,7D4

  20. The Following User Says Thank You to saturn For This Useful Post:


  21. #14
    Join Date
    04-01-13
    Posts
    40
    vCash
    500
    Perfect! Thank you, saturn.

  22. #15
    Join Date
    15-12-13
    Posts
    53
    vCash
    500
    Hi Mercurio, does it also work for backdates and have you tested it? Can we finally start a game before 2001 without crashing? Would be awesome to start in 1993 or 1995 with one of Cam F's nineties databases.

  23. #16
    Join Date
    04-01-13
    Posts
    40
    vCash
    500
    Quote Originally Posted by Ravanelli View Post
    Hi Mercurio, does it also work for backdates and have you tested it? Can we finally start a game before 2001 without crashing? Would be awesome to start in 1993 or 1995 with one of Cam F's nineties databases.
    Yes, that's the goal. I'm doing a 1996/97 update. I'm gonna test it in holiday mode .

  24. #17
    Join Date
    04-01-13
    Posts
    40
    vCash
    500
    Three seasons tested. It works fine. No errors.

  25. #18
    Join Date
    15-12-13
    Posts
    53
    vCash
    500
    That's great. Could you make a 1993 start available? Cam F has a great and detailled database of that season, so would be ideal!

  26. #19
    Join Date
    04-01-13
    Posts
    40
    vCash
    500
    Quote Originally Posted by Ravanelli View Post
    That's great. Could you make a 1993 start available? Cam F has a great and detailled database of that season, so would be ideal!
    Yep. But that data is for CM 00/01. This just works for CM 01/02.

  27. #20
    Join Date
    15-12-13
    Posts
    53
    vCash
    500
    I think he can easily convert it to cm 0102, he did it in the past. Could you make a download available?

  28. #21
    Join Date
    04-01-13
    Posts
    40
    vCash
    500
    Quote Originally Posted by Ravanelli View Post
    I think he can easily convert it to cm 0102, he did it in the past. Could you make a download available?
    Try this: https://www.sendspace.com/file/5r9fs1

  29. #22
    Join Date
    04-01-13
    Posts
    40
    vCash
    500
    It crashes on 27th December 2001. World Cup 2002 draw date.

Posting Permissions

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