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

Slightly worried about this one though since I've made a bunch of mods with custom video file replacements and because Civ2 normally prioritizes local installed files it would ensure my custom videos were played even if the user had the CD in. If I'm understanding correctly it now sounds like my total conversion mods with only work properly if people don't have their CD in the drive which is a bit of a shame, I'll need to change my ReadMe instructions.
Sorry that the description was unclear. It was about music.
It seems that the priorities regarding the video are different. First local file is checked and then from CD.
Just check it out for yourself.
 
Uh oh it's happening again. I've got a couple of people on social media reporting a Trojan:Script/Wacatac.B!ml warning when they download your latest version. I'll try to find out what scanners they're using so you can submit your stuff to them. I didn't get any warnings with Microsoft security Essentials.

EDIT: Both of them say Windows Defender
That's the curse of Delphi 7. Next week I will spend sending false positive reports to AV vendors.
 
Sweet! Was just preparing to resume an old Civ2 save I'd messed around with a few months ago.
edit: Haha, was not expecting the snowfall.
edit2: Wow, I am LOVING the City UI changes! Indicating the trade-route connection-bonus level is wonderful! And I love the display of base yields in the city map-view.
 
Last edited:
Hello and thanks for the new update FoxAhead. I just wanted to ask if it was possible to switch off snowfall and goody hut change so it doesn't load automatically when game starts? It looks like like it's active by default, even when I switch it off.
 
Hello Fox,

Just swining by. Been using UIA patche for years now. Latest version doesn't seem to work. Clicking "play" just makes the box disappear and game doesn't load. Tried clean installs of Civ 2 with no luck. Also tried the other new patcher alongside it.

Old version of UIA still works on my system. Is there any more specific info I can provide?

OS: Windows 10. Managed to get a screenshot of the loader before it disappeared.
 

Attachments

  • civ 2.png
    civ 2.png
    88.5 KB · Views: 31
Hello and thanks for the new update FoxAhead. I just wanted to ask if it was possible to switch off snowfall and goody hut change so it doesn't load automatically when game starts? It looks like like it's active by default, even when I switch it off.
Sorry, that this Christmas Easter egg become annoying for you. I failed to add an option to permanently disable it. It becomes active from week #51 to week #3. So either you can wait or download "NoSanta" version of Civ2UIA.dll:
It differs only in one byte, so instead of downloading you can manually hex-edit current Civ2UIA.dll:
Change this
1734598880308.png

to:
1734598912611.png
 
Sorry, that this Christmas Easter egg become annoying for you. I failed to add an option to permanently disable it. It becomes active from week #51 to week #3. So either you can wait or download "NoSanta" version of Civ2UIA.dll:
It differs only in one byte, so instead of downloading you can manually hex-edit current Civ2UIA.dll:
Change this
View attachment 712756
to:
View attachment 712757
Thanks, and it's not that annoying, I just love how old goody hut looks and snowfall looks cosy, but annoying part is that snowflakes stay on terrain and that fast piece slide don't work when snowfall is active.
 
Thanks, and it's not that annoying, I just love how old goody hut looks and snowfall looks cosy, but annoying part is that snowflakes stay on terrain and that fast piece slide don't work when snowfall is active.
Yes that effect loads CPU a bit and units start moving slower. I'm just curious what are the technical specs of your computer?
 
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: 23
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.
 
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.
Here is the answer from ChatGPT:

Running older games like Civilization II under Wine or Lutris on a Steam Deck can sometimes lead to audio issues, especially with sound effects and music playback. Here are several troubleshooting steps you can take to resolve the popping noise and music playback issues:
  1. Install Required Libraries:Make sure you have the required libraries installed for audio and multimedia support in Wine. You can try installing winepulse or winealsa depending on your configuration.
  2. Configure Audio Settings:In Lutris, go to the game configuration settings for Civ 2. Under the "Runner options" tab, try switching between different audio drivers (like PulseAudio or ALSA) to see if that improves the sound output.
  3. Change Audio Settings in Wine:If you haven't already, configure the audio settings in Wine by running winecfg. Go to the "Audio" tab and experiment with different settings. Lowering the sample rate or changing the driver from default to ALSA or PulseAudio might help.
  4. Use Wine Staging:Ensure that you're using Wine Staging, which has more experimental features and fixes that may resolve audio issues. You can select Wine Staging as the runner in Lutris.
  5. Set Up an Emulator for Music:Civ 2 may rely on MIDI for music playback. Consider setting up a virtual MIDI synthesizer like FluidSynth or Timidity++ to handle MIDI music playback. You can configure this within Wine.
  6. Check File Formats:Since you mentioned issues with FLAC files, try converting your music files to a more universally supported format like WAV or OGG, which may work better under Wine. Sometimes, using different codecs can also make a difference.
  7. Update Lutris and Wine:Ensure that you're using the latest version of Lutris and Wine. Updates often contain bug fixes and improvements that can resolve issues like these.
  8. Adjusting Wine’s DirectSound Settings:You can adjust the DirectSound settings by adding the following to the game's configuration in Lutris:

    [Software\\Wine\\DirectSound]
    "UseDirectSound"="true"
  9. Disable Audio in Settings:If all else fails and audio is still problematic, consider disabling sound effects and music in the game settings and using external media players for music.
  10. Community Resources:Search for user-generated guides on the Lutris website or Steam Deck forums. Other users may have experienced similar issues and could have posted specific fixes.
If you continue to experience issues after these steps, consider checking the Lutris forums or the WineHQ App Database for additional help specific to Civ 2 and your current setup.
 
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.
 
Top Bottom