Offsets

Moderator: Patch Team

domtos88
Decent Young Player
Posts: 68
Joined: Sat Sep 04, 2021 6:36 pm
Has thanked: 3 times
Been thanked: 2 times

Offsets

Post by domtos88 »

HaroldFinch wrote: Tue Oct 25, 2022 7:22 pm
domtos88 wrote: Tue Oct 25, 2022 6:57 pm I would like to play: Austria, Switzerland and Czech Republic (also Romania and Ukraine)...
I would like delete: Northern Ireland, Wales, Australia, Finland (also Republic of Ireland)_
Patch form to apply with nick's patcher?
:lol: :lol:
???
erenereneren
Trialist
Posts: 3
Joined: Wed Oct 19, 2022 7:15 pm

Offsets

Post by erenereneren »

Hello, I can only play 11 foreign players in the match squad in the Turkish league. I couldn't find how to increase it. Can you help?
User avatar
Xeno
Patch Team
Posts: 1861
Joined: Wed Nov 25, 2020 5:01 am
Has thanked: 175 times
Been thanked: 598 times

Offsets

Post by Xeno »

erenereneren wrote: Thu Oct 27, 2022 6:56 am Hello, I can only play 11 foreign players in the match squad in the Turkish league. I couldn't find how to increase it. Can you help?
You need to search better next time
viewtopic.php?p=44116#p44116
* [TUTORIAL] How to install and run the game CM0102?> viewtopic.php?f=85&t=3571
Please use search bar for solution before posting your issue
erenereneren
Trialist
Posts: 3
Joined: Wed Oct 19, 2022 7:15 pm

Offsets

Post by erenereneren »

Xeno wrote: Thu Oct 27, 2022 7:11 am
erenereneren wrote: Thu Oct 27, 2022 6:56 am Hello, I can only play 11 foreign players in the match squad in the Turkish league. I couldn't find how to increase it. Can you help?
You need to search better next time
viewtopic.php?p=44116#p44116
Thank you for response but when I try this both load game doesn't work and I cant start a new season from new game.

https://ibb.co/kQ6rLDB
User avatar
Xeno
Patch Team
Posts: 1861
Joined: Wed Nov 25, 2020 5:01 am
Has thanked: 175 times
Been thanked: 598 times

Offsets

Post by Xeno »

erenereneren wrote: Thu Oct 27, 2022 4:14 pm
Xeno wrote: Thu Oct 27, 2022 7:11 am
erenereneren wrote: Thu Oct 27, 2022 6:56 am Hello, I can only play 11 foreign players in the match squad in the Turkish league. I couldn't find how to increase it. Can you help?
You need to search better next time
viewtopic.php?p=44116#p44116
Thank you for response but when I try this both load game doesn't work and I cant start a new season from new game.

https://ibb.co/kQ6rLDB
Do you hava another patch already applied?
Run as admin and win xp compatibility?
* [TUTORIAL] How to install and run the game CM0102?> viewtopic.php?f=85&t=3571
Please use search bar for solution before posting your issue
erenereneren
Trialist
Posts: 3
Joined: Wed Oct 19, 2022 7:15 pm

Offsets

Post by erenereneren »

Xeno wrote: Thu Oct 27, 2022 4:16 pm
erenereneren wrote: Thu Oct 27, 2022 4:14 pm
Xeno wrote: Thu Oct 27, 2022 7:11 am
You need to search better next time
viewtopic.php?p=44116#p44116
Thank you for response but when I try this both load game doesn't work and I cant start a new season from new game.

https://ibb.co/kQ6rLDB
Do you hava another patch already applied?
Run as admin and win xp compatibility?
Yes, I applied some patches about the Turkish league. After deleting everything and applying only this patch from the beginning, everything worked properly. Thanks
Rodry97
Youth Team Player
Posts: 43
Joined: Thu Nov 26, 2020 1:42 am
Has thanked: 25 times
Been thanked: 7 times

New regen good country

Post by Rodry97 »

Hello!

This is a patch included in Nick's Misc (I don't know its author)

Indicates that a regen with 120 or more CA will have the nationality of a country with 12 or more reputation.

Is it possible to increase that 120 CA up to 140/150?
David00c
Youth Team Player
Posts: 15
Joined: Wed Nov 25, 2020 3:33 pm
Has thanked: 3 times
Been thanked: 1 time

Offsets

Post by David00c »

I have a question if some one can help me. In the original Fifa WCC i want to change the starting year but i can only have it started in odd years.

The code:

0092919C |> 66:8B46 40 /MOV AX,WORD PTR DS:[ESI+40]
009291A0 |. 0FBFD0 |MOVSX EDX,AX
009291A3 |. 81E2 01000080 |AND EDX,80000001
009291A9 |. 79 05 |JNS SHORT cm0102.009291B0
009291AB |. 4A |DEC EDX
009291AC |. 83CA FE |OR EDX,FFFFFFFE
009291AF |. 42 |INC EDX
009291B0 |> 74 06 |JE SHORT cm0102.009291B8
009291B2 |. 66:3D CE07 |CMP AX,7CE
009291B6 |. 7D 07 |JGE SHORT cm0102.009291BF
009291B8 |> 40 |INC EAX
009291B9 |. 66:8946 40 |MOV WORD PTR DS:[ESI+40],AX
009291BD |.^EB DD \JMP SHORT cm0102.0092919C

What are the 009291A3 and 009291AC offsets refering to?
Nick+Co
Patch Team
Posts: 780
Joined: Tue Apr 14, 2020 2:11 pm
Has thanked: 68 times
Been thanked: 869 times

Offsets

Post by Nick+Co »

@David: Those aren't offsets just maths tricks using logical operators :) really you can just look at the data that references the year which is held in ESI+40. I wouldn't try any thing clever just move the year you want to start from into ESI+40 after this loop and override any of the stuff.

The C code equivalent is

Code: Select all

(ESI + 0x40) = functions_second_argument; // The year. below finds the first even year after 2003 and then puts that year back in ESI+0x40
  while ( 1 )
  {
    v4 = *(ESI + 0x40);  
    if ( v4 % 2 )   // is the year divisible by 2
    {
      if ( v4 >= 2003 )
        break;
    }
    *(ESI + 0x40) = v4 + 1;
  }
And here:

Code: Select all

00929D9E  |>  66:8346 40 02             ADD WORD PTR DS:[ESI+40],2 
is the line that will advance it by 2 years each time.
Rodry97
Youth Team Player
Posts: 43
Joined: Thu Nov 26, 2020 1:42 am
Has thanked: 25 times
Been thanked: 7 times

Offsets

Post by Rodry97 »

Xeno wrote: Mon Dec 06, 2021 4:15 am Regen nation randomizer Thanks to Nick+Co's post >>> https://champman0102.co.uk/showthread.p ... post491895
Note from MadScientist: The regen nation randomness in 3.9.68 is not weighted, so for example a Brazilian legend can regen in Fiji. The randomness in the Tapani patch is weighted, so a Brazilian legend will likelly regen in a country with big tradition in football.

In clean 3.9.68 - you have a 1 in 4 chance it seems of the regen not getting the same nationality. It's this code that decides:

Code: Select all

007ABCDF  |.  6A 04                               PUSH 4                                   ; /Arg1 = 4                       <-------- This is setting the 1 in 4 chance. Raise this to a higher number to make it even more rare. Or lower it to make it more common.
007ABCE1  |.  E8 DA121600                         CALL 0090CFC0                            ; \cm0102.0090CFC0                <-------- Call the random function
007ABCE9  |.  85C0                                TEST EAX,EAX                                                               <-------- Test for Zero
007ABCEB  |.  75 33                               JNZ SHORT 007ABD20                                                         <-------- NOP this jump-if-not-zero and all regens will have a new nationality
007ABCED  |.  8B15 5023AE00                       MOV EDX,DWORD PTR DS:[0AE2350]
007ABCF3  |.  52                                  PUSH EDX                                 ; /Arg1 => [0AE2350] = 0D5              <------- Make it random which country is picked [0AE2350] contains the number of countries
007ABCF4  |.  E8 C7121600                         CALL 0090CFC0                            ; \cm0102.0090CFC0
007ABCF9  |.  8B15 A823AE00                       MOV EDX,DWORD PTR DS:[0AE23A8]
007ABCFF  |.  8D0CC0                              LEA ECX,[EAX*8+EAX]
007ABD02  |.  C1E1 04                             SHL ECX,4
007ABD05  |.  03C8                                ADD ECX,EAX
007ABD07  |.  83C4 04                             ADD ESP,4
007ABD0A  |.  8D044A                              LEA EAX,[ECX*2+EDX]
007ABD0D  |.  8B4C4A 71                           MOV ECX,DWORD PTR DS:[ECX*2+EDX+71]
007ABD11  |.  85C9                                TEST ECX,ECX
007ABD13  |.  74 0B                               JZ SHORT 007ABD20
007ABD15  |.  39B8 88000000                       CMP DWORD PTR DS:[EAX+88],EDI
007ABD1B  |.  7D 03                               JGE SHORT 007ABD20
007ABD1D  |.  8946 1A                             MOV DWORD PTR DS:[ESI+1A],EAX               <------ Load the new nationality into our new player

You could tweak things just slightly to have it almost vanilla 3.9.68 but slightly different. So, if a normal vanilla game has this code:

Code: Select all

007ABC7A  |.  BF 64000000               MOV EDI,64                                       <--- EDI is set as 100
....
007ABCD7  |.  39B8 88000000             CMP DWORD PTR DS:[EAX+88],EDI                        <---- Are there 100 staff
007ABCDD  |.  7D 41                     JGE SHORT 007ABD20                                                 <---- If yes or more then skip
007ABCDF  |.  6A 04                     PUSH 4                                   ; /Arg1 = 4                    <---- 1 in 4 chance   
007ABCE1  |.  E8 DA121600               CALL 0090CFC0                            ; \cm0102.0090CFC0            <----- random function
007ABCE6  |.  83C4 04                   ADD ESP,4
007ABCE9  |.  85C0                      TEST EAX,EAX                                                              <--- if the random function 
007ABCEB  |.  75 33                     JNZ SHORT 007ABD20                                                  <--- does not return 0 - then skip selecting a random country
007ABCED  |.  8B15 5023AE00             MOV EDX,DWORD PTR DS:[0AE2350]                      <--- get the number of countries
007ABCF3  |.  52                        PUSH EDX                                 ; /Arg1 => [0AE2350] = 0    <----- Pick a random one
007ABCF4  |.  E8 C7121600               CALL 0090CFC0                            ; \cm0102.0090CFC0
007ABCF9  |.  8B15 A823AE00             MOV EDX,DWORD PTR DS:[0AE23A8]                     <---- get the pointer to the countries
......
007ABD15  |.  39B8 88000000             CMP DWORD PTR DS:[EAX+88],EDI              <--- check the new country for 100 staff 
007ABD1B  |.  7D 03                     JGE SHORT 007ABD20
007ABD1D  |.  8946 1A                   MOV DWORD PTR DS:[ESI+1A],EAX                 <---- if the country has less that 100 staff, then pick that as the country - so it is frickin' rare to get a new country!

*** Regen nation randomizer: So if you want the code to always just select a random team for the regen, you can patch out the jumps (JGE and JNZ) to NOP:
Warning of risk : If all regen nations are randomized, there may be a risk that the smaller nations who have less players will be bereft of players and this result may cause an error in the game.

Code: Select all

003ABCDD: 7D 90
003ABCDE: 41 90
003ABCEB: 75 90
003ABCEC: 33 90
003ABD1B: 7D 90
003ABD1C: 03 90
(^ not tested)

hello xeno

There is a patch in Nick patcher that achieves that regens with a potential of 120 are from countries with a good reputation "AlwaysRegenToGoodCountry"

Is it possible to increase the potential from 120 to 150?

So the countries with less reputation are not so relegated with the passage of time
User avatar
Xeno
Patch Team
Posts: 1861
Joined: Wed Nov 25, 2020 5:01 am
Has thanked: 175 times
Been thanked: 598 times

Offsets

Post by Xeno »

Rodry97 wrote: Wed Nov 16, 2022 5:45 am
Xeno wrote: Mon Dec 06, 2021 4:15 am Regen nation randomizer Thanks to Nick+Co's post >>> https://champman0102.co.uk/showthread.p ... post491895
Note from MadScientist: The regen nation randomness in 3.9.68 is not weighted, so for example a Brazilian legend can regen in Fiji. The randomness in the Tapani patch is weighted, so a Brazilian legend will likelly regen in a country with big tradition in football.

In clean 3.9.68 - you have a 1 in 4 chance it seems of the regen not getting the same nationality. It's this code that decides:

Code: Select all

007ABCDF  |.  6A 04                               PUSH 4                                   ; /Arg1 = 4                       <-------- This is setting the 1 in 4 chance. Raise this to a higher number to make it even more rare. Or lower it to make it more common.
007ABCE1  |.  E8 DA121600                         CALL 0090CFC0                            ; \cm0102.0090CFC0                <-------- Call the random function
007ABCE9  |.  85C0                                TEST EAX,EAX                                                               <-------- Test for Zero
007ABCEB  |.  75 33                               JNZ SHORT 007ABD20                                                         <-------- NOP this jump-if-not-zero and all regens will have a new nationality
007ABCED  |.  8B15 5023AE00                       MOV EDX,DWORD PTR DS:[0AE2350]
007ABCF3  |.  52                                  PUSH EDX                                 ; /Arg1 => [0AE2350] = 0D5              <------- Make it random which country is picked [0AE2350] contains the number of countries
007ABCF4  |.  E8 C7121600                         CALL 0090CFC0                            ; \cm0102.0090CFC0
007ABCF9  |.  8B15 A823AE00                       MOV EDX,DWORD PTR DS:[0AE23A8]
007ABCFF  |.  8D0CC0                              LEA ECX,[EAX*8+EAX]
007ABD02  |.  C1E1 04                             SHL ECX,4
007ABD05  |.  03C8                                ADD ECX,EAX
007ABD07  |.  83C4 04                             ADD ESP,4
007ABD0A  |.  8D044A                              LEA EAX,[ECX*2+EDX]
007ABD0D  |.  8B4C4A 71                           MOV ECX,DWORD PTR DS:[ECX*2+EDX+71]
007ABD11  |.  85C9                                TEST ECX,ECX
007ABD13  |.  74 0B                               JZ SHORT 007ABD20
007ABD15  |.  39B8 88000000                       CMP DWORD PTR DS:[EAX+88],EDI
007ABD1B  |.  7D 03                               JGE SHORT 007ABD20
007ABD1D  |.  8946 1A                             MOV DWORD PTR DS:[ESI+1A],EAX               <------ Load the new nationality into our new player

You could tweak things just slightly to have it almost vanilla 3.9.68 but slightly different. So, if a normal vanilla game has this code:

Code: Select all

007ABC7A  |.  BF 64000000               MOV EDI,64                                       <--- EDI is set as 100
....
007ABCD7  |.  39B8 88000000             CMP DWORD PTR DS:[EAX+88],EDI                        <---- Are there 100 staff
007ABCDD  |.  7D 41                     JGE SHORT 007ABD20                                                 <---- If yes or more then skip
007ABCDF  |.  6A 04                     PUSH 4                                   ; /Arg1 = 4                    <---- 1 in 4 chance   
007ABCE1  |.  E8 DA121600               CALL 0090CFC0                            ; \cm0102.0090CFC0            <----- random function
007ABCE6  |.  83C4 04                   ADD ESP,4
007ABCE9  |.  85C0                      TEST EAX,EAX                                                              <--- if the random function 
007ABCEB  |.  75 33                     JNZ SHORT 007ABD20                                                  <--- does not return 0 - then skip selecting a random country
007ABCED  |.  8B15 5023AE00             MOV EDX,DWORD PTR DS:[0AE2350]                      <--- get the number of countries
007ABCF3  |.  52                        PUSH EDX                                 ; /Arg1 => [0AE2350] = 0    <----- Pick a random one
007ABCF4  |.  E8 C7121600               CALL 0090CFC0                            ; \cm0102.0090CFC0
007ABCF9  |.  8B15 A823AE00             MOV EDX,DWORD PTR DS:[0AE23A8]                     <---- get the pointer to the countries
......
007ABD15  |.  39B8 88000000             CMP DWORD PTR DS:[EAX+88],EDI              <--- check the new country for 100 staff 
007ABD1B  |.  7D 03                     JGE SHORT 007ABD20
007ABD1D  |.  8946 1A                   MOV DWORD PTR DS:[ESI+1A],EAX                 <---- if the country has less that 100 staff, then pick that as the country - so it is frickin' rare to get a new country!

*** Regen nation randomizer: So if you want the code to always just select a random team for the regen, you can patch out the jumps (JGE and JNZ) to NOP:
Warning of risk : If all regen nations are randomized, there may be a risk that the smaller nations who have less players will be bereft of players and this result may cause an error in the game.

Code: Select all

003ABCDD: 7D 90
003ABCDE: 41 90
003ABCEB: 75 90
003ABCEC: 33 90
003ABD1B: 7D 90
003ABD1C: 03 90
(^ not tested)

hello xeno

There is a patch in Nick patcher that achieves that regens with a potential of 120 are from countries with a good reputation "AlwaysRegenToGoodCountry"

Is it possible to increase the potential from 120 to 150?

So the countries with less reputation are not so relegated with the passage of time
You can apply below patch after applying "AlwaysRegenToGoodCountry" from Nick's patcher. Then, regens with a potential of 150 will be from countries with a good reputation.

Code: Select all

003ABCE0: 78 96
Rodry97
Youth Team Player
Posts: 43
Joined: Thu Nov 26, 2020 1:42 am
Has thanked: 25 times
Been thanked: 7 times

Offsets

Post by Rodry97 »

Xeno wrote: Wed Nov 16, 2022 6:06 am
Rodry97 wrote: Wed Nov 16, 2022 5:45 am
Xeno wrote: Mon Dec 06, 2021 4:15 am Regen nation randomizer Thanks to Nick+Co's post >>> https://champman0102.co.uk/showthread.p ... post491895
Note from MadScientist: The regen nation randomness in 3.9.68 is not weighted, so for example a Brazilian legend can regen in Fiji. The randomness in the Tapani patch is weighted, so a Brazilian legend will likelly regen in a country with big tradition in football.

In clean 3.9.68 - you have a 1 in 4 chance it seems of the regen not getting the same nationality. It's this code that decides:

Code: Select all

007ABCDF  |.  6A 04                               PUSH 4                                   ; /Arg1 = 4                       <-------- This is setting the 1 in 4 chance. Raise this to a higher number to make it even more rare. Or lower it to make it more common.
007ABCE1  |.  E8 DA121600                         CALL 0090CFC0                            ; \cm0102.0090CFC0                <-------- Call the random function
007ABCE9  |.  85C0                                TEST EAX,EAX                                                               <-------- Test for Zero
007ABCEB  |.  75 33                               JNZ SHORT 007ABD20                                                         <-------- NOP this jump-if-not-zero and all regens will have a new nationality
007ABCED  |.  8B15 5023AE00                       MOV EDX,DWORD PTR DS:[0AE2350]
007ABCF3  |.  52                                  PUSH EDX                                 ; /Arg1 => [0AE2350] = 0D5              <------- Make it random which country is picked [0AE2350] contains the number of countries
007ABCF4  |.  E8 C7121600                         CALL 0090CFC0                            ; \cm0102.0090CFC0
007ABCF9  |.  8B15 A823AE00                       MOV EDX,DWORD PTR DS:[0AE23A8]
007ABCFF  |.  8D0CC0                              LEA ECX,[EAX*8+EAX]
007ABD02  |.  C1E1 04                             SHL ECX,4
007ABD05  |.  03C8                                ADD ECX,EAX
007ABD07  |.  83C4 04                             ADD ESP,4
007ABD0A  |.  8D044A                              LEA EAX,[ECX*2+EDX]
007ABD0D  |.  8B4C4A 71                           MOV ECX,DWORD PTR DS:[ECX*2+EDX+71]
007ABD11  |.  85C9                                TEST ECX,ECX
007ABD13  |.  74 0B                               JZ SHORT 007ABD20
007ABD15  |.  39B8 88000000                       CMP DWORD PTR DS:[EAX+88],EDI
007ABD1B  |.  7D 03                               JGE SHORT 007ABD20
007ABD1D  |.  8946 1A                             MOV DWORD PTR DS:[ESI+1A],EAX               <------ Load the new nationality into our new player

You could tweak things just slightly to have it almost vanilla 3.9.68 but slightly different. So, if a normal vanilla game has this code:

Code: Select all

007ABC7A  |.  BF 64000000               MOV EDI,64                                       <--- EDI is set as 100
....
007ABCD7  |.  39B8 88000000             CMP DWORD PTR DS:[EAX+88],EDI                        <---- Are there 100 staff
007ABCDD  |.  7D 41                     JGE SHORT 007ABD20                                                 <---- If yes or more then skip
007ABCDF  |.  6A 04                     PUSH 4                                   ; /Arg1 = 4                    <---- 1 in 4 chance   
007ABCE1  |.  E8 DA121600               CALL 0090CFC0                            ; \cm0102.0090CFC0            <----- random function
007ABCE6  |.  83C4 04                   ADD ESP,4
007ABCE9  |.  85C0                      TEST EAX,EAX                                                              <--- if the random function 
007ABCEB  |.  75 33                     JNZ SHORT 007ABD20                                                  <--- does not return 0 - then skip selecting a random country
007ABCED  |.  8B15 5023AE00             MOV EDX,DWORD PTR DS:[0AE2350]                      <--- get the number of countries
007ABCF3  |.  52                        PUSH EDX                                 ; /Arg1 => [0AE2350] = 0    <----- Pick a random one
007ABCF4  |.  E8 C7121600               CALL 0090CFC0                            ; \cm0102.0090CFC0
007ABCF9  |.  8B15 A823AE00             MOV EDX,DWORD PTR DS:[0AE23A8]                     <---- get the pointer to the countries
......
007ABD15  |.  39B8 88000000             CMP DWORD PTR DS:[EAX+88],EDI              <--- check the new country for 100 staff 
007ABD1B  |.  7D 03                     JGE SHORT 007ABD20
007ABD1D  |.  8946 1A                   MOV DWORD PTR DS:[ESI+1A],EAX                 <---- if the country has less that 100 staff, then pick that as the country - so it is frickin' rare to get a new country!

*** Regen nation randomizer: So if you want the code to always just select a random team for the regen, you can patch out the jumps (JGE and JNZ) to NOP:
Warning of risk : If all regen nations are randomized, there may be a risk that the smaller nations who have less players will be bereft of players and this result may cause an error in the game.

Code: Select all

003ABCDD: 7D 90
003ABCDE: 41 90
003ABCEB: 75 90
003ABCEC: 33 90
003ABD1B: 7D 90
003ABD1C: 03 90
(^ not tested)

hello xeno

There is a patch in Nick patcher that achieves that regens with a potential of 120 are from countries with a good reputation "AlwaysRegenToGoodCountry"

Is it possible to increase the potential from 120 to 150?

So the countries with less reputation are not so relegated with the passage of time
You can apply below patch after applying "AlwaysRegenToGoodCountry" from Nick's patcher.

Code: Select all

003ABCE0: 78 96
I have tried it and it is SPECTACULAR!

A magnificent realism is achieved.

Thank you very much Xeno. I recommend it 100%

Can I ask you another question/request? I forgive the audacity.

Could something be done with the Copa Libertadores and Sudamericana fixtures? To start on the actual dates
Paky87
Youth Team Player
Posts: 32
Joined: Sun Dec 13, 2020 6:09 pm
Has thanked: 3 times

Offsets

Post by Paky87 »

Is it possible to disable the final for the 3rd place of the copa america?
Laudrup
Decent Young Player
Posts: 66
Joined: Wed Nov 25, 2020 2:59 pm
Has thanked: 14 times
Been thanked: 2 times

Offsets

Post by Laudrup »

What cources the local council blocking? Size, attendance, finance and attraction are not the problem.
I found out that e.g. Fulham and Salernitana can build massive stadiums, much bigger then the other clubs in their league. Also the German league Bayern and Dortmund. And the Brazilian league. Fulham are building even if you do not ask for bigger stadium, and most important without any Local Council Blocking !
What happens in England / France if your stadium doesn’t have any expansion capability in the db? Does the promotion overrule it and force through an expansion “against the wishes of the local council”?
Even though you use the "Remove Stadium Limits" patch, the Local Council will still block your expansion plans 😢 Can this be fixed somehow? It seems that even though you have the fans, earned the money and won the trophies 🏆 Some clubs just cannot expand, which sucks when you do long career games 😭😭
David00c
Youth Team Player
Posts: 15
Joined: Wed Nov 25, 2020 3:33 pm
Has thanked: 3 times
Been thanked: 1 time

Offsets

Post by David00c »

Xeno wrote: Tue Feb 09, 2021 12:18 pm I move Saturn's explanation for the offsets which exist in all fixture blocks for cup competitions.
https://champman0102.co.uk/showthread.p ... post290845

Saturn's post:

Here is an explanation for the offsets which exist in all fixture blocks for cup competitions. A lot of these were found by Golly but I've expanded on a few on a few of them.

MOV WORD PTR DS:[***+7],xxx Round name
MOV WORD PTR DS:[***+9],xxx Round number
MOV WORD PTR DS:[***+B],xxx Round draw type
MOV WORD PTR DS:[***+D],xxx Game 1 tiebreak
MOV BYTE PTR DS:[***+17],xxx ?
MOV WORD PTR DS:[***+18],xxx Total teams in round
MOV WORD PTR DS:[***+1A],xxx Ties
MOV WORD PTR DS:[***+1C],xxx New teams entering round
MOV WORD PTR DS:[***+F],xxx Game 2 tiebreak
MOV WORD PTR DS:[***+11],xxx Game 3 tiebreak
MOV WORD PTR DS:[***+1E],xxx Total teams already entered into cup
MOV BYTE PTR DS:[***+20],xxx Replays
MOV BYTE PTR DS:[***+21],xxx Legs
MOV BYTE PTR DS:[***+22],xxx Days between legs or replays
MOV DWORD PTR DS:[***+5C],xxx Prize money for reaching round
MOV DWORD PTR DS:[***+60],xxx Prize money for winning this round
MOV DWORD PTR DS:[***+64],xxx Prize money for losing this round


The offsets mightn't be written in this order in the code (especially after the first block), but they will all follow the same order (the offset with the lowest ***+x figure will be the Round name, the second lowest ***+x will be the Round number etc).

Now to explain each a bit further.

MOV WORD PTR DS:[***+7],xxx - Round name
The name of that cup competition's round, eg Qualifying Round, Second Round, Semi Final etc. A full list of available names can be located at 004B4919, but some of the main ones are below.

Code: Select all

0   = Used for competitions with just one round (Super Cups etc)
0A  = First Round
14  = Second Round
1E  = Third Round
28  = Fourth Round
32  = Fifth Round
3C  = Sixth Round
46  = Seventh Round
50  = Eighth Round
5A  = Ninth Round
64  = Tenth Round
6E  = Eleventh Round
78  = Quarter Final
82  = Semi Final
8C  = Third Place Playoff
96  = Final
A0  = Playoff
BE  = Playout
DC  = Qualifying Round
E6  = Preliminary Round
FA  = First Qualifying Phase
104 = Second Qualifying Phase
10E = Third Qualifying Phase
These are easily changed. For instance we can give the English FA Cup Quarter Final round its older title by editing:
0056F8CD - MOV WORD PTR DS:[ESI+277],78 -> 3C

Furthermore, we can create new round names by editing some unused ones that exist in the exe. At 004B627E we have the Interior Zone, a Round name used in Argentina from previous editions. The actual name Interior Zone is stored at 009A68C4, so by editing the ASCII here we can create...

...through renaming the round and changing 0092C95D - MOV WORD PTR DS:[ESI+7],14 -> 436.

Sometimes, the game will use an additional name to prefix all the Round names. These can be located at the beginning of the cup fixtures block, and are alongside the offset that determines the number of rounds in the competition. For example, in the English First Division's cup fixtures (the playoffs), we can find:

Code: Select all

00572A34	PUSH 0D0                                       ; 208 (2*104)
00572A39	MOV WORD PTR DS:[EAX],2                        ; Rounds
00572A3E	MOV WORD PTR DS:[ECX],0A0                      ; Playoff
These will be used alongside the Round name offsets at 00572AE5 - MOV WORD PTR DS:[ESI+7],82 and 00572B6E - MOV WORD PTR DS:[ESI+6F],96 to create the full Round names: Playoff Semi Final and Playoff Final.

The prefixed Round names are also located at 004B4919, a few of the most used ones are below:

Code: Select all

0   = Normal
1E  = Third Round
96  = Final
118 = Playoff 1
122 = Playoff 2
0A0 = Playoff
3E8 = Numeric Group Stage
40F = Carribean Zone
417 = MLS Cup
41D = Northern / Southern Section
420 = Alphabetic Group Stage
434 = Opening Stage
435 = Closing Stage
438 = Promotion
44B = Championship Group
44C = Relegation Group
452 = Relegation Playoff
453 = North / South / Central
458 = Promotion Playoff
45A = Second Promotion Playoff
45B = Third Promotion Playoff
45C = Fourth Promotion Playoff
473 = Central American Zone Group 1
475 = Classification Group 1
480 = East / West
They are often used for league offsets too.

MOV WORD PTR DS:[***+9],xxx - Round Number
Simply the Round number of the competition. The number of rounds will be set at the beginning of the cup's fixture block, as mentioned above. The rounds progress in a chronological order as expected, apart from the Third Place Playoff which comes after the Final.

MOV WORD PTR DS:[***+B],xxx - Round draw type
Sets whether the draw for this round of the competition is completely open or not. Most rounds are open, ie a fully random draw where anyone can draw anyone. Others are seeded (European club competitions), while others are biased towards lower division teams (lower division teams will not be drawn away to higher division teams). These are roughly what the values here mean:

Code: Select all

1 = Team from lower/equivalent division hosts
3 = Team from lower/equivalent division hosts
4 = Seeded teams
8 = Higher placed league position hosts
There are probably differences between 1 and 3.

A list of competitions that use non-open draws (probably incomplete):

Code: Select all

004212A6 MOV WORD PTR DS:[ESI+B],8
Belgian Super Cup

0042A38B MOV WORD PTR DS:[ESI+B],8
Brazilian First Division Playoffs

0042C97B MOV WORD PTR DS:[ESI+B],8
Brazilian Second Division Playoffs

00550D62 MOV WORD PTR DS:[ESI+B],1
Danish Cup (excluding Semi Final & Final)

00583D1D MOV WORD PTR DS:[ESI+B],4
European Cup Qualifying Rounds

005BA559 MOV WORD PTR DS:[ESI+73],1 (AX)
French Cup (excluding Sixth Round & Final)

005D8FD1 MOV WORD PTR DS:[ESI+B],1 (BP)
German Cup (excluding Final)

0078A95D MOV WORD PTR DS:[ESI+B],8
Northern Irish Cup (excluding Semi Final & Final)

007E9696 MOV WORD PTR DS:[ESI+73],8
Russian Cup Third Round

0084D312 MOV WORD PTR DS:[ESI+B],3 (BP)
Spanish Cup (excluding Final)

0088D015 MOV WORD PTR DS:[ESI+B],1
Swedish Cup (excluding Quarter Final, Semi Final & Final)

0090275E MOV WORD PTR DS:[ECX+B],4
UEFA Cup Qualifying Rounds

00927DA8 MOV WORD PTR DS:[ESI+B],8 (AX)
Welsh Premier Cup Semi Final
MOV WORD PTR DS:[***+D],xxx - Game 1 tiebreak
This sets the tiebreak for games with one leg or no replays. The values are:
0 - No tiebreaker, means that there is a second leg or replay set in an offset further down.
1 - Penalties after 90 minutes.
2 - Extra-time (with no penalties - usually means it will go to a replay AET if scores are still level).
3 - Extra-time & penalties.
4 - ? (Only in Copa Libertadores and Copa Mercosur - might be why it goes straight to penalties in second leg)
83 - Golden goal extra-time & penalties.

MOV WORD PTR DS:[***+F],xxx - Game 2 tiebreak
This sets the tiebreak for games with two legs or replays. The values are:
0 - No tiebreaker, means that there is a second replay or a decider.
1 - Penalties after 90 minutes of the second leg if scores and away goals are level (no extra-time used).
Penalties after 90 minutes of the second leg if scores are level (no away goals or extra-time used - Copa Libertadores and Copa Mercosur only).
3 - Away goals, extra-time and penalties.
7 - Extra-time and penalties used (no away goals)
83 - Away goals, golden goal extra-time and penalties.

MOV WORD PTR DS:[***+11],xxx - Game 3 tiebreak
This sets the tiebreak for games undecided after two legs or a replay. This offset will usually not be present as only two competitions actually use it - the English FA Trophy and the Copa Mercosur Final.
3 - Extra-time and penalties used.

For now this only covers actual cup competitions. League playoffs (which the game sees as cups) aren't covered yet, so tiebreakers like US style shootouts or teams winning because of higher league positions aren't included. Generally though the other tiebreakers stay the same from what I've seen.

There are also values within the (true) cup offsets that I don't understand yet. For example the Italian Super Cup has a +D value of 0302. The 03 bit is extra-time and penalties, but I don't know what the 02 part (+E essentially) is. I've seen values of 00-04 for +E.

MOV BYTE PTR DS:[***+17],xxx - ?
I don't know what this refers to. Its value can change within competitions from round to round, but I've noticed that it's always 0A for international competitions.

MOV WORD PTR DS:[***+18],xxx - Total teams in round
Self-explanatory.

MOV WORD PTR DS:[***+1A],xxx - Ties
Number of ties (xxx vs xxx) in the round.

MOV WORD PTR DS:[***+1C],xxx - New teams entering round
Teams that are entering the competition without playing in a previous round, eg Premier League & First Division teams entering the FA Cup Third Round.

MOV WORD PTR DS:[***+1E],xxx - Total teams already entered into cup
I struggled to put a label on this offset but this is the closest I can think of. It's only a non-zero figure if new teams are entered into the current round, in which case the value given is the [New teams entering round] figure from the previous round. The next round the value is the [New teams entering round] figure from the previous round plus the [Total teams already entered into cup] figure from the previous round. This goes on until no new teams are entered into the cup, in which case the value given is simply the [Total teams already entered into cup] figure from the previous round. After that the value reverts to zero again. ...I wouldn't dwell too much on this.

MOV BYTE PTR DS:[***+20],xxx - Replays
Sets the number of replays.

MOV BYTE PTR DS:[***+21],xxx - Legs
Sets whether a tie is one leg or two.

MOV BYTE PTR DS:[***+22],xxx - Days between legs or replays
Self explanatory.

MOV DWORD PTR DS:[***+5C],xxx - Prize money for reaching round
Self-explanatory.

MOV DWORD PTR DS:[***+60],xxx - Prize money for winning this round
Self-explanatory for the most part. Sometimes this will be -1, which means the value will be a percentage of a prize pool set elsewhere in the competition's offsets.

MOV DWORD PTR DS:[***+64],xxx - Prize money for losing this round
Self-explanatory. Further information on competitions' prize money figures can be found here https://champman0102.co.uk/showthread.p ... post265990 .
Hi. Does anyone have this page saved from the old forum?

https://champman0102.co.uk/showthread.p ... post265990

It contained information about the finances of the competitions and pool values.
erenakarsu
Posts: 1
Joined: Sat Nov 28, 2020 8:25 pm
Has thanked: 2 times
Been thanked: 1 time

Offsets

Post by erenakarsu »

I can't patch the foreign rule in Turkish leagues. Is there anyone who can help?
robb
Youth Team Player
Posts: 25
Joined: Sat Nov 28, 2020 7:01 am
Has thanked: 17 times
Been thanked: 4 times

Offsets

Post by robb »

Use Nick's patcher. Click tools then apply a misc patch. You can find there on the list.
Nick+Co
Patch Team
Posts: 780
Joined: Tue Apr 14, 2020 2:11 pm
Has thanked: 68 times
Been thanked: 869 times

Offsets

Post by Nick+Co »

@David00c: https://nic.hopto.org/open/cm0102/OldTh ... 20Rip).pdf <--- it's from the old Offsets thread (page 757 (!))
User avatar
Xeno
Patch Team
Posts: 1861
Joined: Wed Nov 25, 2020 5:01 am
Has thanked: 175 times
Been thanked: 598 times

Offsets

Post by Xeno »

Changing Day/Time of TV Matches (thanks to Golly)

Example of a fixture block >>> English Premier League - 3rd round matches fixture

00573789 . 66:8B57 40 MOV DX,WORD PTR DS:[EDI+40]
0057378D . 6A 00 PUSH 0
0057378F . 52 PUSH EDX
00573790 . 6A 01 PUSH 1
00573792 . 6A 05 PUSH 5
00573794 . 6A 00 PUSH 0
00573796 . 6A 07 PUSH 7
00573798 . 6A 1A PUSH 1A
0057379A . 6A 02 PUSH 2
0057379C . 56 PUSH ESI
0057379D . E8 BE691100 CALL cm0102.0068A160
005737A2 . 83C4 40 ADD ESP,40
005737A5 . 6A 00 PUSH 0
005737A7 . 6A 02 PUSH 2
005737A9 . 6A 01 PUSH 1
005737AB . 6A 06 PUSH 6
005737AD . 6A 00 PUSH 0
005737AF . 6A 02 PUSH 2
005737B1 . 56 PUSH ESI
005737B2 . E8 096A1100 CALL cm0102.0068A1C0
005737B7 . 6A 00 PUSH 0
005737B9 . 6A 02 PUSH 2
005737BB . 6A 01 PUSH 1
005737BD . 6A 06 PUSH 6
005737BF . 6A 01 PUSH 1
005737C1 . 6A 02 PUSH 2
005737C3 . 56 PUSH ESI
005737C4 . E8 F7691100 CALL cm0102.0068A1C0
005737C9 . 6A 00 PUSH 0
005737CB . 6A 02 PUSH 2
005737CD . 6A 02 PUSH 2
005737CF . 6A 00 PUSH 0
005737D1 . 6A 02 PUSH 2
005737D3 . 6A 02 PUSH 2
005737D5 . 56 PUSH ESI
005737D6 . E8 E5691100 CALL cm0102.0068A1C0
005737DB . 83C4 54 ADD ESP,54
005737DE . 6A 00 PUSH 0
005737E0 . 6A FF PUSH -1
005737E2 . 6A FF PUSH -1
005737E4 . 6A FF PUSH -1
005737E6 . 6A 03 PUSH 3
005737E8 . 6A 02 PUSH 2
005737EA . 56 PUSH ESI
005737EB . E8 D0691100 CALL cm0102.0068A1C0

*** The offsets for Match 3 (Arg2 = 2) has 5 sections. The top section is the timing of the round of fixtures...

Code: Select all

00573789 - MOV DX,WORD PTR DS:[EDI+40]
0057378D - PUSH 0 (Arg9) = fixture venue. 0 is for the home team hosting the game. If you switched it to 4 an entire round of fixtures would be played at the National Stadium of that competitions country. ie Wembley for EPL.
0057378F - PUSH EDX (Arg8) = ???
00573790 - PUSH 1 (Arg7) = time of day. 0= AM (Morning), 1= PM (Afternoon) and 2= EVE (Night)
00573792 - PUSH 5 (Arg6) = day of week. 0= Monday, 1= Tuesday, 2= Wednesday, 3= Thursday, 4= Friday, 5= Saturday and 6= Sunday
00573794 - PUSH 0 (Arg5) = year of season. So for 2001-02 season... 0= 2001 and 1= 2002
00573796 - PUSH 7 (Arg4) = month of year. 7= August
00573798 - PUSH 1A (Arg3) = day of month. 1A= 26th        >>> ( IMPORTANT NOTE: always choose the exact calender dates in 2001-2002 calender as dates in 3.9.68 exe are arranged based on it ) 
0057379A - PUSH 2 (Arg2) = fixture round. For EPL 0= match 1, 1= match 2... 0F= match 16, 10= match 17... 24= match 37, 25= match 38
0057379C - PUSH ESI (Arg1) = ???
0057379D - CALL cm0102.0068A160
So the match above takes place on the nearest Saturday to August 26th (23rd-29th) in the afternoon.

*** The next 3 sections are the timing of the TV matches. For each match Arg5= the time of day and Arg4= the day of the week. So the 3 TV matches above are played on Sunday PM, Sunday PM and Monday EVE.

Code: Select all

005737A2 - ADD ESP,40
005737A5 - PUSH 0 (Arg7) =
005737A7 - PUSH 2 (Arg6) =
005737A9 - PUSH 1 (Arg5) = time of day. 0= AM (Morning), 1= PM (Afternoon) and 2= EVE (Night)
005737AB - PUSH 6 (Arg4) = day of week. 0= Monday, 1= Tuesday, 2= Wednesday, 3= Thursday, 4= Friday, 5= Saturday and 6= Sunday
005737AD - PUSH 0 (Arg3) = round of TV matches in this fixture round. 0= 1st , 1= 2nd, 2= 3rd, ...
005737AF - PUSH 2 (Arg2) = fixture round. For EPL 0= match 1, 1= match 2... 0F= match 16, 10= match 17... 24= match 37, 25= match 38
005737B1 - PUSH ESI (Arg1)
005737B2 - CALL cm0102.0068A1C0
005737B7 - PUSH 0 (Arg7) =
005737B9 - PUSH 2 (Arg6) =
005737BB - PUSH 1 (Arg5) = time of day. 0= AM (Morning), 1= PM (Afternoon) and 2= EVE (Night)
005737BD - PUSH 6 (Arg4) = day of week. 0= Monday, 1= Tuesday, 2= Wednesday, 3= Thursday, 4= Friday, 5= Saturday and 6= Sunday
005737BF - PUSH 1 (Arg3) = round of TV matches in this fixture round. 0= 1st , 1= 2nd, 2= 3rd, ...
005737C1 - PUSH 2 (Arg2) = fixture round. For EPL 0= match 1, 1= match 2... 0F= match 16, 10= match 17... 24= match 37, 25= match 38
005737C3 - PUSH ESI (Arg1)
005737C4 - CALL cm0102.0068A1C0
005737C9 - PUSH 0 (Arg7) =
005737CB - PUSH 2 (Arg6) =
005737CD - PUSH 2 (Arg5) = time of day. 0= AM (Morning), 1= PM (Afternoon) and 2= EVE (Night)
005737CF - PUSH 0 (Arg4) = day of week. 0= Monday, 1= Tuesday, 2= Wednesday, 3= Thursday, 4= Friday, 5= Saturday and 6= Sunday
005737D1 - PUSH 2 (Arg3) = round of TV matches in this fixture round. 0= 1st , 1= 2nd, 2= 3rd, ...
005737D3 - PUSH 2 (Arg2) = fixture round. For EPL 0= match 1, 1= match 2... 0F= match 16, 10= match 17... 24= match 37, 25= match 38
005737D5 - PUSH ESI (Arg1)
005737D6 - CALL cm0102.0068A1C0
*** The last section is standard for all fixtures offsets, but it appears the Arg3 value is the amount of TV matches played. The value on the example shown is 3.

Code: Select all

005737DB - ADD ESP,54
005737DE - PUSH 0 (Arg7) =
005737E0 - PUSH -1 (Arg6) =
005737E2 - PUSH -1 (Arg5) =
005737E4 - PUSH -1 (Arg4) =
005737E6 - PUSH 3 (Arg3) = amount of TV matches played.
005737E8 - PUSH 2 (Arg2) = fixture round. For EPL 0= match 1, 1= match 2... 0F= match 16, 10= match 17... 24= match 37, 25= match 38
005737EA - PUSH ESI (Arg1)
005737EB - CALL cm0102.0068A1C0
User avatar
Offside Trap
Network Game Team
Posts: 934
Joined: Sun May 10, 2020 6:42 pm
Location: Peterborough, UK
Has thanked: 172 times
Been thanked: 255 times

Offsets

Post by Offside Trap »

So I've a patch where the 'School' search minimises the search results to that of players with a minimum of 180 PA. Does such thing exist for 'No Club' ?
Find me on YouTube and enjoy CM related content - https://www.youtube.com/channel/UCmoWKH ... wcF_cLC70w
Nick+Co
Patch Team
Posts: 780
Joined: Tue Apr 14, 2020 2:11 pm
Has thanked: 68 times
Been thanked: 869 times

Offsets

Post by Nick+Co »

@offside: Not a difficult patch to make:

Code: Select all

CPU Disasm
Address   Hex dump                       Command                                                                                       Comments
0080541A  |.  BE 5CA19C00                MOV ESI,OFFSET 009CA15C                                                                       ; ASCII "No Club"
0080541F  |.  8BC7                       MOV EAX,EDI
00805421  |>  8A18                       /MOV BL,BYTE PTR DS:[EAX]                    <---- this is a poor man's string compare :) (It's case sensitive)
00805423  |.  8ACB                       |MOV CL,BL
00805425  |.  3A1E                       |CMP BL,BYTE PTR DS:[ESI]
00805427  |.  75 1C                      |JNE SHORT 00805445
00805429  |.  84C9                       |TEST CL,CL
0080542B  |.  74 14                      |JZ SHORT 00805441
0080542D  |.  8A58 01                    |MOV BL,BYTE PTR DS:[EAX+1]
00805430  |.  8ACB                       |MOV CL,BL
00805432  |.  3A5E 01                    |CMP BL,BYTE PTR DS:[ESI+1]
00805435  |.  75 0E                      |JNE SHORT 00805445
00805437  |.  83C0 02                    |ADD EAX,2
0080543A  |.  83C6 02                    |ADD ESI,2
0080543D  |.  84C9                       |TEST CL,CL
0080543F  |.^ 75 E0                      \JNZ SHORT 00805421
00805441  |>  33C0                       XOR EAX,EAX
00805443  |.  EB 05                      JMP SHORT 0080544A
00805445  |>  1BC0                       SBB EAX,EAX                                                                                   ; Calculates sign(EAX)
00805447  |.  83D8 FF                    SBB EAX,-1
0080544A  |>  85C0                       TEST EAX,EAX
0080544C  |.  75 60                      JNZ SHORT 008054AE
0080544E  |.  A1 6423AE00                MOV EAX,DWORD PTR DS:[0AE2364]
00805453  |.  33C9                       XOR ECX,ECX
00805455  |.  85C0                       TEST EAX,EAX
00805457  |.  0F8E 970A0000              JLE 00805EF4
0080545D  |.  8B9424 20020000            MOV EDX,DWORD PTR SS:[ARG.2]
00805464  |.  8B7424 10                  MOV ESI,DWORD PTR SS:[LOCAL.129]
00805468  |.  8B7C24 14                  MOV EDI,DWORD PTR SS:[LOCAL.128]
0080546C  |>  8A45 5F                    MOV AL,BYTE PTR SS:[EBP+5F]                              <----- get staff "Classification"
0080546F  |.  3C 03                      CMP AL,3
00805471  |.  74 0E                      JE SHORT 00805481
00805473  |.  85D2                       TEST EDX,EDX
00805475  |.  74 06                      JZ SHORT 0080547D
00805477  |.  3C 01                      CMP AL,1
00805479  |.  74 06                      JE SHORT 00805481
0080547B  |.  EB 17                      JMP SHORT 00805494
0080547D  |>  3C 02                      CMP AL,2
0080547F  |.  75 13                      JNE SHORT 00805494
00805481  |>  8B45 39                    MOV EAX,DWORD PTR SS:[EBP+39]                        <----- get staff's club job
00805484      85C0                       TEST EAX,EAX
00805486  |.  75 0C                      JNZ SHORT 00805494
00805488  |.  892E                       MOV DWORD PTR DS:[ESI],EBP
0080548A  |.  8B47 38                    MOV EAX,DWORD PTR DS:[EDI+38]
0080548D  |.  83C6 04                    ADD ESI,4
00805490  |.  40                         INC EAX
00805491  |.  8947 38                    MOV DWORD PTR DS:[EDI+38],EAX
00805494  |>  A1 6423AE00                MOV EAX,DWORD PTR DS:[0AE2364]
00805499  |.  83C5 6E                    ADD EBP,6E
0080549C  |.  41                         INC ECX
0080549D  |.  3BC8                       CMP ECX,EAX
0080549F  |.^ 7C CB                      JL SHORT 0080546C
So after the staff club job check, you'd want to check the player field and get potential from there. I did this by breaking/disabling "Recurring" search special word (just to find some nearby space)

Code: Select all

00805484     /EB 39                      JMP SHORT 008054BF     <--- jump out into some space
...
008054BD     /EB 22                      JMP SHORT 008054E1   <---- disabling the Recurring special word
008054BF     |85C0                       TEST EAX,EAX              <---- test if they do have a club
008054C1    ^|75 D1                      JNE SHORT 00805494   <---- if they do skip adding this person to search
008054C3     |3E:8B45 61                 MOV EAX,DWORD PTR DS:[EBP+61]          <---- get their player attributes
008054C7     |85C0                       TEST EAX,EAX                                                        
008054C9    ^|74 C9                      JE SHORT 00805494                                   <---- if they don't have player attributes skip this person
008054CB     |66:8178 07 9600            CMP WORD PTR DS:[EAX+7],96              <---- compare their potential to 150 (0x96)
008054D1    ^|7C C1                      JL SHORT 00805494                                   <---- if less skip this person
008054D3    ^|EB B3                      JMP SHORT 00805488                                 <---- must be 150 or higher, add them to the search
008054D5     |90                         NOP
^ I wrote this very quick, but seemed to work - hope this helps others make similar patches.

EDIT:
Forgot to add this - here's the patch in patch form for those that want to try it:

Code: Select all

00405484: 85 EB
00405485: C0 39
004054BD: 8A EB
004054BE: 18 22
004054BF: 8A 85
004054C0: CB C0
004054C1: 3A 75
004054C2: 1E D1
004054C3: 75 3E
004054C4: 1C 8B
004054C5: 84 45
004054C6: C9 61
004054C7: 74 85
004054C8: 14 C0
004054C9: 8A 74
004054CA: 58 C9
004054CB: 01 66
004054CC: 8A 81
004054CD: CB 78
004054CE: 3A 07
004054CF: 5E 96
004054D0: 01 00
004054D1: 75 7C
004054D2: 0E C1
004054D3: 83 EB
004054D4: C0 B3
004054D5: 02 90
User avatar
Offside Trap
Network Game Team
Posts: 934
Joined: Sun May 10, 2020 6:42 pm
Location: Peterborough, UK
Has thanked: 172 times
Been thanked: 255 times

Offsets

Post by Offside Trap »

Cheers Nick, prior to you adding in patch form, I attempted, well I opened up Olly, and didnt have a clue what to do or where to start, so gave up. Just came back on here and saw you'd posted it up. Have applied it and its brilliant, worked a treat, many thanks
Find me on YouTube and enjoy CM related content - https://www.youtube.com/channel/UCmoWKH ... wcF_cLC70w
David00c
Youth Team Player
Posts: 15
Joined: Wed Nov 25, 2020 3:33 pm
Has thanked: 3 times
Been thanked: 1 time

Offsets

Post by David00c »

In Tapani Patch 2.18.1 one of the described changes is:

* Some cup selections now use a mix between reputation and team quality, instead of just reputation (or random). This includes:
-- For selecting missing teams in the UEFA cup (when there are too few teams qualified there -- SI games by default used just reputation)
-- For selecting lower league teams in English FA cup
-- For selecting some teams in Irish league cup
-- For selecting some teams for Club world championships
-- For selecting some teams Oceania Cup

To try to understand how he did it, I compared a 2.17 exe and a 2.18.1 exe and looked for example in the FIFA club world cup offsets. Apart from changes in fixtures dates the only change was he noped a call:

0092A391 |. E8 34AF0100 CALL 0_68.009452CA

Can someone help me figure out what it changes?

Thank you
Nick+Co
Patch Team
Posts: 780
Joined: Tue Apr 14, 2020 2:11 pm
Has thanked: 68 times
Been thanked: 869 times

Offsets

Post by Nick+Co »

@David00c: Not too familiar with this part - but in Tapani 2.22 he does a lot of changing PUSH 004B07D0 to PUSH 00601E00 so that the code at 00601E00 gets called. It could be that - but not checked it out (and it's not immediately obvious from the code! :) )

EDIT: looks like a sorting function or similar, the original one at 004B07D0 is checking the club reputation (the +80 parts) - so think this is the place.
David00c
Youth Team Player
Posts: 15
Joined: Wed Nov 25, 2020 3:33 pm
Has thanked: 3 times
Been thanked: 1 time

Offsets

Post by David00c »

Nick+Co wrote: Wed Feb 01, 2023 2:58 pm @David00c: Not too familiar with this part - but in Tapani 2.22 he does a lot of changing PUSH 004B07D0 to PUSH 00601E00 so that the code at 00601E00 gets called. It could be that - but not checked it out (and it's not immediately obvious from the code! :) )

EDIT: looks like a sorting function or similar, the original one at 004B07D0 is checking the club reputation (the +80 parts) - so think this is the place.
He made the change in some competitions (cups). But in the Fifa World Club Cup he didn't. I was trying to understand how this competition chooses its participants from non playable leagues. It's clearly not just based on reputation. It's anoying that obscure teams sometimes appear. I would prefer it was just on reputation. I found this loop in the code, I don't know if it's related to the selection of teams:

0092AFB1 |. BB 88130000 MOV EBX,1388
0092AFB6 |> 66:81FB 30F8 /CMP BX,0F830
0092AFBB |. 7E 78 |JLE SHORT cm0102.0092B035
0092AFBD |. 8B0D 5023AE00 |MOV ECX,DWORD PTR DS:[AE2350] ------------> ECX : NUMBER NATIONS???
0092AFC3 |. A1 B423AE00 |MOV EAX,DWORD PTR DS:[AE23B4] -------------> EAX : ???
0092AFC8 |. 33F6 |XOR ESI,ESI ESI=0
0092AFCA |. 33FF |XOR EDI,EDI EDI=0
0092AFCC |. 8D1409 |LEA EDX,DWORD PTR DS:[ECX+ECX]
0092AFCF |. 8B0D 5C23AE00 |MOV ECX,DWORD PTR DS:[AE235C] --------> ECX : NUMBER OF CLUBS???
0092AFD5 |. 2BCA |SUB ECX,EDX
0092AFD7 |. 85C9 |TEST ECX,ECX
0092AFD9 |. 7E 4E |JLE SHORT cm0102.0092B029
0092AFDB |> 8B50 53 |/MOV EDX,DWORD PTR DS:[EAX+53] -------------> Club Nation
0092AFDE |. 85D2 ||TEST EDX,EDX
0092AFE0 |. 74 34 ||JE SHORT cm0102.0092B016
0092AFE2 |. 8B52 71 ||MOV EDX,DWORD PTR DS:[EDX+71] ---------------> Nation Continent
0092AFE5 |. 85D2 ||TEST EDX,EDX
0092AFE7 |. 74 2D ||JE SHORT cm0102.0092B016
0092AFE9 |. 8BAC24 5821000>||MOV EBP,DWORD PTR SS:[ESP+2158]
0092AFF0 |. 392A ||CMP DWORD PTR DS:[EDX],EBP
0092AFF2 |. 75 1B ||JNZ SHORT cm0102.0092B00F
0092AFF4 |. 66:3998 800000>||CMP WORD PTR DS:[EAX+80],BX ------------> compare club reputation to 1388(5000) set in 0092AFB1
0092AFFB |. 7C 12 ||JL SHORT cm0102.0092B00F


But i cant understand some parts, and some teams are selected with less 5000 rep. Maybe i'm looking in the wrong place
Post Reply