[Civ2] Civilization II MGE User Interface Additions (CIV2UIA)

New version 1.12 (build 63).
The author of civ2patch project @deeves updated his fix for CPU usage.

Hi has added options for CPU throttling
  • Implemented a backoff to periodically increase the message wait timeout.
  • Exposed configuration to tweak CPU usage to accommodate different types of computers.

Download
https://github.com/FoxAhead/Civ2-UI-Additions/releases/tag/v1.12

@deeves, thanks! and welcome back to CFF! :)
 
Greetings!
Does your patch solve the problem of limiting the number of cities to 254 units?
 
Greetings!
Does your patch solve the problem of limiting the number of cities to 254 units?
No. City ID is one byte variable in most of structures like HomeCity in Unit structure for example. I think it is the same for trading routes and many other uses. So that is why number of cities is limited to no more than 0xFF. Changing this means changing all that dependent structures and places in assembler code. Moving the place of storage for Cities array in memory to another wider place. Changing save format and rewriting Save/Load procedures. So it is more about rewriting the whole game rather than "patching".
 
I would like to share my experiences using the Civ2UIA project on Fedora 28 Linux in Wine.
I need to examine the exact wine version, but I remember that I have it configured to act like Windows 7 32-bit, and the game was MGE 5.4.0f (Patch 3)

First of all, this project is amazing! Thank you so much for writing it and bundling it all together, and for letting it be free and open source.

1. Middle mouse support works as described!
2. Scrollbar in unit popup works.
3. Work accumulation counter works.
4. Click bounds seemed to line up visually, and I only vaguely remember the improper bounds from the past. So let's go with, it works!
5. Turn counter visible. I guess modern gaming mechanics have spoiled us. This is the sort of thing that should have been in the game from the very beginning.
6. Beaker count visible. An incredibly useful feature!
7. Did not test.
8. Works.
9. Did not test.
10. Works
11. Works! This is another really handy feature.
12. Did not test. I was using the 32-bit Wine
13. Did not test. Believe it or not, but I actually still have my real MGE CD!
14. Did not test multiplayer.

civ2patches that I tried:
* AI hostility. I confess it's been a while since my last 2.42 game (or otherwise non MGE) or even MGE game, but they did seem a little less hostile than normal.
* Map size limit. I could not get this to work in the game, when trying to specify a map size. Perhaps it's meant to be used only in the map editor.
 
@ArcherHombre thanks for the feedback! I'm glad you liked this project.
About the size of the map, and how did you understand that it does not work? This is about starting a new game through the "Customize World" option and selecting "Custom" size. There despite the text saying
"Rule: X times Y must be no more than 10,000 and no less than 1000.
Each dimension must be at least 20, no more than 250."
you should be able set values up to those you set in launcher options.
 
Thank you for the response! I tried the custom map sizes after re-reading the limit of the total size. I was able to set individual values above 250, however a few quick experiments showed that the "MapSizeLimit" in the ini file was not always followed, and actually a 400x84 was accepted (but errored out) with a MapSizeLimit of 32767.
 
Just want to follow-up and provide an update to one of my problems regarding intro movie playback.

So I tried installing the Indeo Video codec (version 5) and ffdshow codec as mentioned in some of the other threads on this topic. It didn't work. But I did download the K-lite codec pack and enable Indeo v4 in its settings. Now the Intro & Wonder movies play fine.

As another feature request, since multiple users are having this same problem according to the threads, would it be possible to have this codec-enabling feature integrated directly in your Civ2UIA tweak? It would also prevent unnecessarily downloading other external third party programs (which may contain adware or such) just to enable this codec. Thank you sincerely.


[edit] Sorry, just wanted to add one more request. I notice the music track pauses when you access certain features like when consulting High Council or talking to other leaders. This is good. But once you return back to the game, instead of continuing where it left off, it moves to the next track. Would it be possible to have it continue from that point where it left off?
 
Last edited:
Just want to follow-up and provide an update to one of my problems regarding intro movie playback.

So I tried installing the Indeo Video codec (version 5) and ffdshow codec as mentioned in some of the other threads on this topic. It didn't work. But I did download the K-lite codec pack and enable Indeo v4 in its settings. Now the Intro & Wonder movies play fine.

As another feature request, since multiple users are having this same problem according to the threads, would it be possible to have this codec-enabling feature integrated directly in your Civ2UIA tweak? It would also prevent unnecessarily downloading other external third party programs (which may contain adware or such) just to enable this codec. Thank you sincerely.


[edit] Sorry, just wanted to add one more request. I notice the music track pauses when you access certain features like when consulting High Council or talking to other leaders. This is good. But once you return back to the game, instead of continuing where it left off, it moves to the next track. Would it be possible to have it continue from that point where it left off?
@lerny_42, thank you for feedback and suggestions! I believe all features you requested are possible to implement. It is all just question of free time. It could take several months or even half-year. That is why I made this project open source - so everyone could contribute. There are already some feature requests in the Issues section at github. BTW they concern movies window size and music playback from folder.

Concerning video playback, besides activating Indeo 4 codec, remember to turn off No-CD feature ("Disable CD check").
 
Concerning video playback, besides activating Indeo 4 codec, remember to turn off No-CD feature ("Disable CD check").
Ah yes, thanks. I forgot to mention that I did figure out to turn it off while experimenting with the video settings.

And I completely understand about free time. Even if you don't have the time to implement such features, I thank you regardless for everything you've done so far. I wish I had the technical ability to contribute but programming is beyond my level, not to mention getting to even know the in-game mechanics. :)


[edit] Oh, i forgot to mention one odd behavior regarding music playback. Sometimes, very randomly, some track would play for 1-2 seconds, and then bizarrely switch to the next track. I have no idea why this happens. I don't try to access any game feature, I simply stare at the screen, yet somehow the music track gets disrupted...
 
Last edited:
Hello! Is it possible to bypass the limit on the number of units in the game?
 
Hello! Is it possible to bypass the limit on the number of units in the game?
Not for this project. As I described earlier, some limits are strictly related to the location of data in memory. This is a task of a different level and effort. It's more about completely decompiling the game and rebuilding it into a new port.
 
Greetings, and thanks in advance for your patches.

My problem occurs right at startup. When I run the Civ2UIALauncher.exe I get the normal startup screen. The launcher and civ2.exe locations are noted correctly. When I press PLAY I get:

"Error: ReadProcessMemory: 5"

I am running MGE 5.4.0f and the Civ2x64EditboxPatcher.exe (which works perfectly, BTW) on Win 7 Pro v 6.1 build 7601 SP1.
Civ runs normally when run directly. I did notice it doesn't seem to run when I start it up (no activity after as much as a minute), but will start up right away if I start it again. I did have to set compatibility on civ2.exe to "win XP SP3" to get the videos to play after loading the codecs, though. This particular problem doesn't seem to be mentioned in this forum, but may be a specific to Win 7 thing.
 
Greetings, and thanks in advance for your patches.

My problem occurs right at startup. When I run the Civ2UIALauncher.exe I get the normal startup screen. The launcher and civ2.exe locations are noted correctly. When I press PLAY I get:

"Error: ReadProcessMemory: 5"

I am running MGE 5.4.0f and the Civ2x64EditboxPatcher.exe (which works perfectly, BTW) on Win 7 Pro v 6.1 build 7601 SP1.
Civ runs normally when run directly. I did notice it doesn't seem to run when I start it up (no activity after as much as a minute), but will start up right away if I start it again. I did have to set compatibility on civ2.exe to "win XP SP3" to get the videos to play after loading the codecs, though. This particular problem doesn't seem to be mentioned in this forum, but may be a specific to Win 7 thing.
Hi!
That has something to do with memory access rights. Error code 5 is ERROR_ACCESS_DENIED. Which probably means that launcher can not read/write memory of created game process. That is strange because in all my test environments all works fine. For now I can not reproduce this error. But I can recommend to try run the launcher "As Administrator". Also check if some antivirus software interferes.
 

Thank you FoxAhead. Using your launcher for my multi gold and very happy with the way in which it has eliminated the hostile ai. I also like the feature where f6 keeps track of how much science has been completed and how the settler displays his number of turns of stored work.
 
Last edited:
I have an issue with Civ2 that perhaps your fixes might be able to address, FoxAhead. I'm on Windows 10 64bit and when any paratrooper sacks a city the game crashes after the message pops up. WW2 scenario, any scenario, random game. Paradrop! message, click ok or not, game crashes.
 
I have an issue with Civ2 that perhaps your fixes might be able to address, FoxAhead. I'm on Windows 10 64bit and when any paratrooper sacks a city the game crashes after the message pops up. WW2 scenario, any scenario, random game. Paradrop! message, click ok or not, game crashes.
Please, drop your save file somewhere so I can try it and reproduce this error.
 
I was playing as Franco in a Hotseat situation by myself. Playing it single player seems to let the airdrop happen without a crash, but I hate watching a bazillion moves every turn lol.

*edit had uploaded the file after closing the game, which unfortunately had Germany already sack Belgrade and the next paradrop would be substantially later. This one should yield the expected result if loaded in hotseat mode.

I tested with a Internet TCP/IP mode to play (Turks and Spanish) by myself to verify, the paradrop does not cause a crash in TCP/IP mode. Seems like it is isolated to hotseat play.
 

Attachments

Last edited:
Back
Top Bottom