[Civ2] Civilization 2 Opponents Capital city size

klindegron

Chieftain
Joined
Jan 11, 2016
Messages
12
Location
Estonia
Hi

Few days ago I tried with King (also with Emperor and Deity) difficulty. I noticed that other civilizations capitals are smaller. Capital city size/icon should be like when your secondly founded city grows to size 4, but opponents capitals are like when you build second city with size 1.
When I played with Prince difficulty then everything was normal - my and other civilizations capital cities looked all the same.
Is it a technical flaw or is it normal when you are playing with King or more difficult level?

I added some pictures to make more clear about the problem. First one is with King difficulty and second is Prince.
Civilization 2 Multiplayer Gold Edition
 

Attachments

  • king.PNG
    king.PNG
    2.9 MB · Views: 45
  • prince.PNG
    prince.PNG
    1.9 MB · Views: 2,777
Last edited:
Yes, indeed, for the capital city icon is taken one size larger for human player or for computer opponents at difficulty <= 2 (Chieftain, Warlord, Prince).
Code:
if ( j_Q_CityHasImprovement_sub_43D20A(aCityIndex, 1) )
{
  if ( (V_HumanCivIndex_dword_6D1DA0 == vOwner
     || V_GameParameters_stru_655AE8.DifficultyLevel <= 2u
     && (V_GameParameters_stru_655AE8.HumanPlayersBits & (1 << vOwner)) == 0)
    && v17 < 3 )
  {
    ++v17;
  }
}
 
Yes, indeed, for the capital city icon is taken one size larger for human player or for computer opponents at difficulty <= 2 (Chieftain, Warlord, Prince).
Code:
if ( j_Q_CityHasImprovement_sub_43D20A(aCityIndex, 1) )
{
  if ( (V_HumanCivIndex_dword_6D1DA0 == vOwner
     || V_GameParameters_stru_655AE8.DifficultyLevel <= 2u
     && (V_GameParameters_stru_655AE8.HumanPlayersBits & (1 << vOwner)) == 0)
    && v17 < 3 )
  {
    ++v17;
  }
}
Is it possible to change it? If it is, where and how you can do it?
Thank you in advance.
 
Is it possible to change it? If it is, where and how you can do it?
Thank you in advance.
In CIV2.EXE file find following HEX sequence
Code:
.text:0056D5E6                               loc_56D5E6:                             ; CODE XREF: Q_DrawCitySprite_sub_56D289:loc_56D540↑j
.text:0056D5E6                                                                       ; Q_DrawCitySprite_sub_56D289:loc_56D598↑j ...
.text:0056D5E6 6A 01                           push    1
.text:0056D5E8 8B 45 0C                        mov     eax, [ebp+arg_4]
.text:0056D5EB 50                              push    eax
.text:0056D5EC E8 57 56 E9 FF                  call    j_Q_CityHasImprovement_sub_43D20A
.text:0056D5F1 83 C4 08                        add     esp, 8
.text:0056D5F4 85 C0                           test    eax, eax
.text:0056D5F6 0F 84 45 00 00 00               jz      loc_56D641
.text:0056D5FC 8B 45 A8                        mov     eax, [ebp+vOwner]
.text:0056D5FF 39 05 A0 1D 6D 00               cmp     V_HumanCivIndex_dword_6D1DA0, eax
.text:0056D605 0F 84 29 00 00 00               jz      loc_56D634
.text:0056D60B 33 C0                           xor     eax, eax
.text:0056D60D A0 08 5B 65 00                  mov     al, V_GameParameters_stru_655AE8.DifficultyLevel
.text:0056D612 83 F8 02                        cmp     eax, 2
.text:0056D615 0F 8F 26 00 00 00               jg      loc_56D641
.text:0056D61B 33 C0                           xor     eax, eax
.text:0056D61D A0 0B 5B 65 00                  mov     al, V_GameParameters_stru_655AE8.HumanPlayersBits
.text:0056D622 BA 01 00 00 00                  mov     edx, 1
.text:0056D627 8A 4D A8                        mov     cl, byte ptr [ebp+vOwner]
.text:0056D62A D3 E2                           shl     edx, cl
.text:0056D62C 85 C2                           test    edx, eax
.text:0056D62E 0F 85 0D 00 00 00               jnz     loc_56D641
.text:0056D634
.text:0056D634                               loc_56D634:                             ; CODE XREF: Q_DrawCitySprite_sub_56D289+37C↑j
.text:0056D634 83 7D B8 03                     cmp     [ebp+var_48], 3
.text:0056D638 0F 8D 03 00 00 00               jge     loc_56D641
.text:0056D63E FF 45 B8                        inc     [ebp+var_48]
To remove dependency from difficulty level you can, for example, simply replace number '2' with a deliberately larger one, like '15'. If you have MGE game version 5.4.0f (check in menu - Game - Game options), then needed byte will be at offset 0x0016CA14. Change it to '0F'.
upload_2022-7-4_20-28-4.png
 
In CIV2.EXE file find following HEX sequence
Code:
.text:0056D5E6                               loc_56D5E6:                             ; CODE XREF: Q_DrawCitySprite_sub_56D289:loc_56D540↑j
.text:0056D5E6                                                                       ; Q_DrawCitySprite_sub_56D289:loc_56D598↑j ...
.text:0056D5E6 6A 01                           push    1
.text:0056D5E8 8B 45 0C                        mov     eax, [ebp+arg_4]
.text:0056D5EB 50                              push    eax
.text:0056D5EC E8 57 56 E9 FF                  call    j_Q_CityHasImprovement_sub_43D20A
.text:0056D5F1 83 C4 08                        add     esp, 8
.text:0056D5F4 85 C0                           test    eax, eax
.text:0056D5F6 0F 84 45 00 00 00               jz      loc_56D641
.text:0056D5FC 8B 45 A8                        mov     eax, [ebp+vOwner]
.text:0056D5FF 39 05 A0 1D 6D 00               cmp     V_HumanCivIndex_dword_6D1DA0, eax
.text:0056D605 0F 84 29 00 00 00               jz      loc_56D634
.text:0056D60B 33 C0                           xor     eax, eax
.text:0056D60D A0 08 5B 65 00                  mov     al, V_GameParameters_stru_655AE8.DifficultyLevel
.text:0056D612 83 F8 02                        cmp     eax, 2
.text:0056D615 0F 8F 26 00 00 00               jg      loc_56D641
.text:0056D61B 33 C0                           xor     eax, eax
.text:0056D61D A0 0B 5B 65 00                  mov     al, V_GameParameters_stru_655AE8.HumanPlayersBits
.text:0056D622 BA 01 00 00 00                  mov     edx, 1
.text:0056D627 8A 4D A8                        mov     cl, byte ptr [ebp+vOwner]
.text:0056D62A D3 E2                           shl     edx, cl
.text:0056D62C 85 C2                           test    edx, eax
.text:0056D62E 0F 85 0D 00 00 00               jnz     loc_56D641
.text:0056D634
.text:0056D634                               loc_56D634:                             ; CODE XREF: Q_DrawCitySprite_sub_56D289+37C↑j
.text:0056D634 83 7D B8 03                     cmp     [ebp+var_48], 3
.text:0056D638 0F 8D 03 00 00 00               jge     loc_56D641
.text:0056D63E FF 45 B8                        inc     [ebp+var_48]
To remove dependency from difficulty level you can, for example, simply replace number '2' with a deliberately larger one, like '15'. If you have MGE game version 5.4.0f (check in menu - Game - Game options), then needed byte will be at offset 0x0016CA14. Change it to '0F'.View attachment 633158
Struggled to find the exact offset, but finally did it.
Thank you so, so much for your help!
Have a nice day!
 
Top Bottom