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

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: 47
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.
 
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: 24
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.
I'm having this issue as well, also on Windows 10. Did you ever get this working? (or barring that, do you have any ideas @FoxAhead ? :) )
 
I'm having this issue as well, also on Windows 10. Did you ever get this working? (or barring that, do you have any ideas @FoxAhead ? :) )
It was DEP (Data Execution Prevention) that caused the issue. Just add an exception for civ2.exe.
 
It was DEP (Data Execution Prevention) that caused the issue. Just add an exception for civ2.exe.
Thanks! That got it to launch, but now I get two black windows covering up the "Civilization II Multiplayer Gold" launched window, if I alt-tab over to the main window, there's no sound or main menu and although I can open Game Settings, etc, if I choose New Game, nothing happens... If I launch civ2.exe ignoring the CIV2UIA launcher entirely, it does open correctly.
 
Thanks! That got it to launch, but now I get two black windows covering up the "Civilization II Multiplayer Gold" launched window, if I alt-tab over to the main window, there's no sound or main menu and although I can open Game Settings, etc, if I choose New Game, nothing happens... If I launch civ2.exe ignoring the CIV2UIA launcher entirely, it does open correctly.
Sounds very confusing. What is the "Game Settings" you are talking about? Have you tried to reboot your computer after changing DEP settings? Do you have Civ2 CD mounted? May be some screenshots will be helpful.
 
Sounds very confusing. What is the "Game Settings" you are talking about? Have you tried to reboot your computer after changing DEP settings? Do you have Civ2 CD mounted? May be some screenshots will be helpful.
Oh jeez, I hadn't restarted my computer, didn't even think about that, but rebooting made it work! :crazyeye: By the way, when I said "Game Settings", I meant File > Game Settings from the main Civ II window when it launched. Thanks for the help, this is my first time re-playing Civ II in like 25 years and I'm excited to get back into it!
 
Sounds very confusing. What is the "Game Settings" you are talking about? Have you tried to reboot your computer after changing DEP settings? Do you have Civ2 CD mounted? May be some screenshots will be helpful.
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.
 
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
 
Uh oh.. they're stopping you again.. I've force allowed it as usual but figured I'd better let you know..

View attachment 722803

View attachment 722804
Analyst comments:
At this time, the submitted files do not meet our criteria for malware or potentially unwanted applications. The detection has been removed. Please follow the steps below to clear cached detections and obtain the latest malware definitions.
1. Open command prompt as administrator and change directory to c:\Program Files\Windows Defender
2. Run “MpCmdRun.exe -removedefinitions -dynamicsignatures”
3. Run "MpCmdRun.exe -SignatureUpdate"Alternatively, the latest definition is available for download here: https://docs.microsoft.com/microsof...pdates-baselines-microsoft-defender-antivirus
 
Back
Top Bottom