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

That worked beautifully! Thank you for your endless devotion to this timeless masterpiece. Will be teaching my son how to play in the weeks to come.
 
@FoxAhead

I got both computer systems up and connected on a network game. The problem I run into now is I can't actually get a game to start. He connects into my game and we can get our Civs set up, but then my system just locks up on the building world screen and his screen says waiting for other people to join. I set it up for 4 civilizations on a large map so it should be me, him, and 2 AI. Not sure what I'm missing but everything else is working great.

Remove the CPU FIX option from the Launcher when playing in multiplayer.
 
Why does your masterpiece have no option to increase the units up to 32000? Even in ancient Civ2Unlimited it is present and works.
 
Is there a way to increase the maximum unit count like the civ2Unlimited patch?
That's a big coincidence. I came here to ask exactly this.
Why does your masterpiece have no option to increase the units up to 32000? Even in ancient Civ2Unlimited it is present and works.
New version 1.15 (build 67).
  1. Added experimental section with an option UnitsLimit. It is possible to extend this limit up to 32767 units now.
  2. Set FormMain position to poScreenCenter instead of poDesktopCenter. Should help in case of multi-monitor setups.
Download
https://github.com/FoxAhead/Civ2-UI-Additions/releases/tag/v1.15
 
It works! The message that it is impossible to create new units is gone. Thank you so much! :thumbsup:
 
When settlers/engineers are working they display how much work they have done. Is there a way to reverse that to show how much work is yet to be done? i.e. run from 10 to 0 instead of 0 to 10.
 
When settlers/engineers are working they display how much work they have done. Is there a way to reverse that to show how much work is yet to be done? i.e. run from 10 to 0 instead of 0 to 10.
I think no. Because it is work accumulator that unit is holding. So you can give engineer a task to raze a mountain, wait until it reaches 58 and then wake him for a walk. And he still will have these 58 points, so you can bring him to another tile and build anything you want just immediately. Just read those two links from the first post to get the idea of using this accumulator and working with multiple engineers at once.
 
I'm not sure how difficult this is, but I'd like to suggest a patch along the lines of Test of Time Patch Project DirectShow sound:

Code:
Uses DirectShow for sound playback, supporting numerous file formats. Requires DirectX9.

Files in the main "Sound" folder have hard-coded filenames, so they still need the wav extension, but can be reencoded as mp3 for example. Unit sounds can be configured in RULES.TXT, so their filenames are free-form.This is also the case for the PlayWaveFile event. Only looping sounds (only menuloop.wav AFAIK) cannot be reencoded, since not all file formats support seamless looping.

The reason is that when using Linux and Wine, there is a 'popping' noise when sounds are played, but the DirectShow patch fixes that. (I double checked by turning the patch on and off.) Such an addition should allow MGE to be run on Linux equally well as Test of Time is.
 
I was disassembling civ2.exe MGE with IDA. With default settings it gives a lot of incorrect standard library function names. After some analysis I guessed that civ2.exe was build using Visual C++ 4.xx. Then I got LIBCD file and used FLAIR tools to make my own signature library. With some additional fixes now it detects almost all library functions correctly.
Next big step is decompilation. And here is big challenge of decompiling try.. catch code or some vector constructors.. destructors. As it is using some not obvious exception handling structures, and Hex-Rays plugin doesn't generate clean code for them. Most times it fails with stack error. Actually official page says "exception handling is not supported".
There is good topic about it
http://www.openrce.org/articles/full_view/21
But that means too much manual work. Interesting that most game logic part uses simple c/c++ code. And complicated code is found mostly in multiplayer part.
Never used Ghidra. How does it deals with exception handling structures? Does it generates clean pseodo-code for that?
 
I'm sure I've said this earlier in the thread over the years but you really are 'da man' @FoxAhead . Thank you so much for what you've done for this community with your excellent programs. I'm gonna be finally releasing my Civ2 on modern machines tribute video in the near future and your work gets big praise in my video!

I'm not sure how difficult this is, but I'd like to suggest a patch along the lines of Test of Time Patch Project DirectShow sound:

Code:
Uses DirectShow for sound playback, supporting numerous file formats. Requires DirectX9.

Files in the main "Sound" folder have hard-coded filenames, so they still need the wav extension, but can be reencoded as mp3 for example. Unit sounds can be configured in RULES.TXT, so their filenames are free-form.This is also the case for the PlayWaveFile event. Only looping sounds (only menuloop.wav AFAIK) cannot be reencoded, since not all file formats support seamless looping.

The reason is that when using Linux and Wine, there is a 'popping' noise when sounds are played, but the DirectShow patch fixes that. (I double checked by turning the patch on and off.) Such an addition should allow MGE to be run on Linux equally well as Test of Time is.

Interesting! I've also experienced some strange sound issues over the last year except in my case certain sounds would seemingly randomly stop working. Eg the little tune that would play when starting a scenario and the emotion/reaction tunes in diplomacy. Then they'd just start working again. Files were still there and working fine (eg I played them outside of the game to make sure all was well) nor was I messing with the files in any way. They just stopped working for 6mths and then started working again for no obvious reason haha. Wasn't a total sound failure as I'd still get unit sounds and menu music etc however I believe @Metro Polis has no sounds at all on his install despite having all the sound files.

So I wonder if switching to DirectShow for sound playback might solve some of these weird little sound gremlins too!

.
 
It seems that your system doesn't have ActiveX installed. May be it was stripped by 98lite? ActiveX module is used in this project for shortcut creation feature (button "Create shortcut...").

Thanks for your reply, and sorry about very late reply.

Yes, removal of the web integration means that ActiveX is also stripped down.
 
Good time of day everyone,

I've recently bought a new Windows 10 laptop to replace my old, aging one. I thought of getting Civ2 working on it, and transferred my old (working) Civ2folder/executable to my new laptop via external HDD. I updated to FoxAhead's newest CIV2UIA launcher patch, then Windows prompted me to the DirectPlay plugin, which Wikipedia told me was necessary to run old games. (Perhaps it was installed from the disk on my old computer: my new one doesn't have an optical drive, which is why I would get the prompt.)

Anyhow, I now have an error when I try to use the launcher, with all its default settings active. The log tells me: 1. Received message wParam=0000, IParam=0000.
Civ2.exe briefly runs in Task Manager, but shuts down without a sound. Google doesn't have any records of a similar problem happening. Not sure which parameters are being referred to (perhaps the lack of optical drives? Couldn't find such a reference in the "game.txt"-like files) The only thing that changed is, obviously, is Windows 10... and the optical drive missing.

I'd love some assistance here, if only to get a record of it on Google. Thanks!
 

Attachments

  • civ2 uia hooks but does not run.png
    civ2 uia hooks but does not run.png
    887.9 KB · Views: 117
Good time of day everyone,

I've recently bought a new Windows 10 laptop to replace my old, aging one. I thought of getting Civ2 working on it, and transferred my old (working) Civ2folder/executable to my new laptop via external HDD. I updated to FoxAhead's newest CIV2UIA launcher patch, then Windows prompted me to the DirectPlay plugin, which Wikipedia told me was necessary to run old games. (Perhaps it was installed from the disk on my old computer: my new one doesn't have an optical drive, which is why I would get the prompt.)

Anyhow, I now have an error when I try to use the launcher, with all its default settings active. The log tells me: 1. Received message wParam=0000, IParam=0000.
Civ2.exe briefly runs in Task Manager, but shuts down without a sound. Google doesn't have any records of a similar problem happening. Not sure which parameters are being referred to (perhaps the lack of optical drives? Couldn't find such a reference in the "game.txt"-like files) The only thing that changed is, obviously, is Windows 10... and the optical drive missing.

I'd love some assistance here, if only to get a record of it on Google. Thanks!
@Jokemaster, does civ2.exe runs directly without UIA?
What Windows update version do you have? (Win+R, winver)
 
It briefly runs and stops in Task Manager, same as before. I do not get a "we cannot find the disk for Civ2 Multiplayer" like I usually would get if I tried to run disk-less on my old laptop.
Winver 20H2 (OS Build 19042.84)
 
It briefly runs and stops in Task Manager, same as before. I do not get a "we cannot find the disk for Civ2 Multiplayer" like I usually would get if I tried to run disk-less on my old laptop.
Winver 20H2 (OS Build 19042.84)
@Jokemaster, please, zip and drop somewhere your civ2 folder.
 
Back
Top Bottom