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

Yes that effect loads CPU a bit and units start moving slower. I'm just curious what are the technical specs of your computer?
MBD: Gigabyte GA-Z87MX-D3H-CF
CPU: Intel Core i7-4770K @ 3.50GHz
GPU: MSI Nvidia GTX 770 2GB
SSD: Kingston SSDNow V300 120GB
HDD: Seagate Barracuda 2TB (2016)
RAM: Patriot 160C0 V3 Series 16GB (4x4)
PSU: Sharkoon SilentStorm Icewind Black 750W
 
@FoxAhead

FEATURE: CDAudio: Finally. In case of no Civ2 CD detected, music now can be played from files in the MUSIC folder. There can be separate MUSIC folder in each subfolder (scenario). Files are filtered by extensions: MP3, WAV, AIFF, FLAC, OGG, AAC, WMA, APE. The playability of specific format depends on codecs installed in your system. Please note the following logic of the original game. Files are sorted alphabetically case-insensitively, and the first file corresponds to Track #2 (the Track #1 on the CD is data). If the number of files is 9, 11, 17 or 23, the game allows you to use 'Pick Music' dialog from the Game menu, suggesting titles from the GAME.TXT file from the @PICKMUSIC, @PICKMUSICGOLD, @PICKMUSICSCENARIO, @PICKMUSICFANWORLDS sections respectively. Otherwise "music disc" is considered "Custom" and no track can be picked manually. The music switches to the next random track at the end of the current track or after leaving some no-music screens such as High Council or foreign dialogs. In "Custom" mode it could be any track, otherwise Track #2 and Track #3 (first and second files) are excluded, as they are reserved for special events: Track #2 "Funeral March" for loosing and Track #3 "Ode to Joy" for joyful events.

This feature seems to be semi-working as intended. When the music is .wav files you can skip the song with the button on the map bar, but that's it. Pick music doesn't work at all regardless of having .wavs or mp3 with the appropriate number of files in the Music folder. Providing a screenshot of my Music folder with 11 files. I had the full set of 23 songs in there including the music from Fantastic Worlds, but then UIA plays all of them in any order (so it's a little weird to get the XCOM and Civil War in the ancient era). Not sure if there is a fix so just giving you a heads up so you can potentially fix this in a future update.

Nevertheless thank you for this patch! Finally I can play Civ 2 with music/video without dragging out my portable CD reader 😆


Cheers and Merry Christmas/Happy Holidays 🎅
 

Attachments

  • Screenshot 2024-12-24 041922.png
    Screenshot 2024-12-24 041922.png
    59.4 KB · Views: 46
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've been trying to get Civ 2 with CIV2UIA running under wine on my Steam Deck, by way of Lutris, and I've run into the same popping noise for sounds as in this post.

To add to that, it won't play music properly. It will play some of the files supported, but even then it won't move to the next track, getting stuck on the last second until an event changes the track instead. Considering that was with mp3 files, and the flac files I have running fine on my Windows laptop did absolutely nothing, I'm scratching my head here.

It's almost there, I almost have a repeatable way to get this working, and working completely, in game mode, but I'm tripping on the finish line.
 
Out of curiosity is Garfield's old quoted suggestion there of a ToTPP like DirectSound conversion of Civ2 how you were able to add all the new music formats in the latest version of Civ2UIA?
I used the same Media Control Interface for playing files. Game uses MCI for playing CD Audio. And uses sndPlaySound function for sounds. Both are from winmm.dll library.
I do avoid adding DirectX dependency for better compatibility with older OS like Win98.
 
Pick Music works perfect for me, all tracks are .wav files, bitrate 1,411 kbps, put in Music folder, from TRACK02 to TRACK24. All tracks from here except The Dome.
 

Attachments

  • Music.jpg
    Music.jpg
    443.9 KB · Views: 23
Sorry, actually, it seems like the reboot was a bit of a red herring. It was actually because I didn't have the CD mounted anymore after rebooting. Mounting the CD (I wanted the videos) led to the black screen issue again.
try the advice from this post, maybe this is the issue
 
New version 1.21.1 (build 2701).
FIX: Use VirtualAlloc for thiscall thunks instead of code in data to avoid DEP errors. You don't need to add DEP exclusions anymore.
FIX #32: UnitsLimit: Add one more array element for index -1 in Units array to fix crashes with this patch enabled.
ADD: Now you can create empty Civ2UIANoSanta.txt file in the game directory to permanently disable Christmas mode.

Download
https://github.com/FoxAhead/Civ2-UI-Additions/releases/tag/v1.21.1
 
Hey, I've had a recurrent crashing issue based on one particular world map premade world, where the game crashes after a certain number of turns. I've attached a save file that should crash as soon as the turn passes. I can try and log more crashed save files if needed - I kept accidentally overwriting them with other autosaves.
The tech stagnation should be set to 126 instead of 10, if that's a relevant concern (yes I am one of those people).

I'll try playing on a different premade world for now, and see if that decides it likes to crash also.

EDIT: Added another save file that should crash right after you hit enter.
Yes, I found the error. It is Units limit patch again. There will be another hotfix release soon. For now you can continue playing without Units limit patch.
 
Error: Wrong size of game exe file. Game version Multiplayer Gold Edition 5.4.0f (Patch 3) supported only.
Any clue what caused this?
Only version Multiplayer Gold Edition 5.4.0f (Patch 3) is supported (CIV2.EXE file size should be 2489344 bytes, preferably unmodified).
You can see version of your game at Menu - Game- Game options. If it is not 5.4.0f, then to use Civ2UIA, you have the option to upgrade it with update pack from download section of CF.
 
New version 1.21.3 (build 2751).
FIX: PatchUnitsLimit: Crash with this option due to overlapping of patching addresses between different patches. To diagnose such intersections in the future, a MemWatchDog module has been added.
FIX: PatchResetEngineersOrder: With this setting turned OFF, the original algorithm was broken, which led to an overestimation of the engineer's work counter when joined to another worker. The error has been present since 1.16. I hope no one has taken advantage of this or suffered from it.

Download
https://github.com/FoxAhead/Civ2-UI-Additions/releases/tag/v1.21.3
 
After clicking Play I'm presented with the message: "Error: ReadProcessMemory: 5" and nothing happens.
the search gives the result:
Error 5 (ERROR_ACCESS_DENIED) when using the ReadProcessMemory function means that the program does not have sufficient rights to open the process, even to read

try to launch the game and patch from the folder where you have the necessary access rights.
 
Moderator Action: @FoxAhead OP restored - I hope. Yours was one of the oldest threads impacted so will very hard to fully reproduce the discussion. I will try to do that with time. I hope this is the right location..I had to use google magic to figure out the subforum, and thread title. Please PM me with issues. Hopefully I can at least get more recent posts moved over, but the issue is identifying them. Cheers

Moderator Action: Also, I am not sure if you had the resource stored on site here. If so, please check to see if it is still here. It may likely have to be recreated. Let me know if you need assistance with that and getting the discussion attached to it. Also, check the links in your sig, as some may be broken
 
Last edited:
Back
Top Bottom