Thread Tools
Old April 30, 2002, 20:58   #1
Darius
Prince
 
Darius's Avatar
 
Local Time: 18:51
Local Date: October 31, 2010
Join Date: Mar 2000
Location: Connecticut, USA
Posts: 883
Fixing Faction Colors
As most of you know, some SMAX games do not display the various factions' units and bases using the proper colors. For example, Hive units might appear yellow instead of blue, with the Hive bases displayed with Morganite architecture. To make matters worse, a game so afflicted might well use different colors every turn. It doesn't happen in every game, but when it does, it is annoying at best and downright confusing at worst. I believe that games that are started using the scenario editor are the ones affected, but perhaps someone else can shed more light on this point.

The problem lies in the way that SMAX uses the "Alpha Centauri.ini" file. I won't go into detail here, as others have done a fine job of that already. For example, see johndmuller's explanation in this thread. In that same thread, Mongoose suggests maintaining a customized .ini file for each affected game, and replacing the Alpha Centauri.ini file with the custom file before playing a turn. Building from these ideas, I have developed a batch file which will automatically replace the Alpha Centuri.ini file with the appropriate customized .ini file and then run SMAX. I will post the procedure and the batch file here in the hope that others will find it useful.

Let's assume that you have a game, which we will call "game_x", which is afflicted with the problem. Here is the procedure to follow.

Step 1: Determine the factions and their order in your game

You could always ask whomever started your game what the factions are, and in what order. But you can figure it out yourself by looking at the bars on the powergraph. Don't use the colors, because they are wrong (that's why we're here ) Use the initials on the bars, as follows:
A: Angels
B: Believers
C: Consciousness or Caretakers
D: Drones
G: Gaians
H: Hive
M: Morgan
P: Peacekeepers or Planet Cult or Pirates
S: Spartans
U: University or Usurpers

Write down the factions in your game, reading the bars in order from left to right.

Step 2: Create a custom .ini file for this game

Make a copy of the Alpha Centruri.ini file. Name the copy using the name of your game, for example "game_x.ini". Now edit that file. There will be a section in that file that looks like this:
Faction 1=CYBORG
Faction 2=PIRATES
Faction 3=DRONE
Faction 4=ANGELS
Faction 5=FUNGBOY
Faction 6=CARETAKE
Faction 7=USURPER
Edit these faction names to correspond, in order, to the names you wrote down in step 1. The faction names to use here are as follows (note that some are plural and some are not):
ANGELS
BELIEVE
CYBORG
CARETAKE
DRONE
GAIANS
HIVE
MORGAN
PEACE
FUNGBOY
PIRATES
SPARTANS
UNIV
USURPER

Step 2b (optional): Set your game load folder
You will also find a line like this in the .ini file:
Latest Save=C:\Program Files\Games\Alpha Centauri\saves\Bdmps\BDMPS-2123Darius
This is the pathname to the last saved game, and when you start the game and click "load" it will open this folder. Edit this line to open in the folder for this particular game.

Step 3: Create a batch file
Create a file called, for example, "game_x.bat". Edit the file to read as follows:

copy "game_x.ini" "C:\Program Files\Games\Alpha Centauri\Alpha Centauri.ini"
cd "C:\Program Files\Games\Alpha Centauri"
terranx.exe

In the first line, substitute the actual name of your ini file instead of "game_x.ini". Change the first and second lines to point to the folder where you have SMAX installed. (Mine is not the default directory, so yours will be different.)

Step 3b (optional): Set the batch file properties to close its window after it runs
Right-click on the batch file icon and click "Properties". Click the "Program" tab. Check the "Close on Exit" box. Click "OK". (This closes the ugly DOS window after the batch file runs so you don't have to look at it.)

Step 4: Take the .ini file and the .bat file and put them somewhere
Where is up to you. big_canuk has suggested putting them in the folder where you keep the games saves for this game. Good idea. I'm going to try a different approach: I keep all of the .ini files and .bat files together in one folder, and I have a key on my programmable keyboard set up as a shortcut to that folder. Then by pressing one key, I basically have a menu of all of my games presented to me.

You will need a .ini file and a .bat file as described above for each game which has incorrect colors. Although it takes a bit of work initially to set up each game, I think you will find it worthwhile when the blue guy comes after you and you can tell it's the Hive and not Fungus-Boy.
__________________
"I love justice, I hate iniquity. It is not my pleasure that the lower suffer injustice because of the higher." - Darius I, 550-486 BC
Darius is offline  
Old May 1, 2002, 16:14   #2
BustaMike
The Courts of Candle'Bre
King
 
BustaMike's Avatar
 
Local Time: 15:51
Local Date: October 31, 2010
Join Date: Nov 1999
Location: You think you're better than me? You've been handling my ass pennies!!!
Posts: 1,101
Yeah, that works but it's way too much work for me. I always just start a new game with the factions in the correct order (same as the game I want to fix) and then ctrl+shift+q back to the menu and load my game. Fixed no problem. If you don't remember the order of the factions, look at the order they are in on the powergraph. This is way less steps and usually takes only 20 to 30 secs to do.
__________________
"Luck's last match struck in the pouring down wind." - Chris Cornell, "Mindriot"
BustaMike is offline  
Old May 1, 2002, 17:36   #3
big_canuk
ACDG3 Gaians
King
 
big_canuk's Avatar
 
Local Time: 18:51
Local Date: October 31, 2010
Join Date: Jul 2000
Location: Leamington, ON, Canada
Posts: 1,167
Ah, yes BustaMike, but that is 20 or 30 seconds *every* time you load the PBEM. I would rather spend the 5 minutes (and probably 2 minutes once you get used to it) to set up the batch file. At 20 seconds this would pay back in only 15 turns.
And maybe I can get the batch file to launch my notepad file with the game info too. And don't forget, it will automatically launch smax or smac as appropriate. I still occasionally launch the wrong program.

A great thanks to Darius for setting this up for us. I have started based on his post in the other thread. The list of proper spellings for the ini is where I was at. Perfect timing on this Darius!!



bc
big_canuk is offline  
Old May 1, 2002, 17:57   #4
BustaMike
The Courts of Candle'Bre
King
 
BustaMike's Avatar
 
Local Time: 15:51
Local Date: October 31, 2010
Join Date: Nov 1999
Location: You think you're better than me? You've been handling my ass pennies!!!
Posts: 1,101
Oh yeah, wasn't even thinking of PBEM. When I do play it's an IP game or hotseat on occasion because PBEM is so slow. You should definately do it that way for PBEM. You'll probably save 30 mins. by the time the game is done.
__________________
"Luck's last match struck in the pouring down wind." - Chris Cornell, "Mindriot"
BustaMike is offline  
Old May 2, 2002, 10:10   #5
Darius
Prince
 
Darius's Avatar
 
Local Time: 18:51
Local Date: October 31, 2010
Join Date: Mar 2000
Location: Connecticut, USA
Posts: 883
Like BC, I love it when I find a way that, with a small effort up-front, I can save time repeatedly in the future. Makes me feel good every time I open a turn. And it really only takes a couple of minutes to set up after you get through it once. I wrote it up in some detail, but I'm sure it takes longer to read about it than just to do it.

I love your idea to open your game notes with the batch file. I wonder what else we could do with it?

Quote:
A great thanks to Darius
I must share the credit with johndmuller, who explained this bug in a manner that I could (finally) understand.
__________________
"I love justice, I hate iniquity. It is not my pleasure that the lower suffer injustice because of the higher." - Darius I, 550-486 BC
Darius is offline  
Old May 6, 2002, 20:16   #6
buster
ACDG3 CMNsACDG The Free Drones
King
 
buster's Avatar
 
Local Time: 01:51
Local Date: November 1, 2010
Join Date: Oct 1999
Location: Aarhus, Denmark
Posts: 1,301
One note on the batch files:

they are processed by dos and under win9x dos does not support long file names.

A directory name like alpha centauri will be trunkated to first 6 letters followed by a ~1 (if there are several that truncate to the same first six it will then be ~2 etc).

Thus for example (explosion on planet being an example game subdir):
cd \program files\firaxis\sid meyer's alpha centauri\saves\explosion on planet
in the batch file should be:
cd \progra~1\firaxis\sidmey~1\saves\explos~1

Personally though I don't bother - its only a graphics thing and after a while one learns not to assume that you are playing against Hive just because the bases are blue.
buster is offline  
Old May 6, 2002, 20:47   #7
big_canuk
ACDG3 Gaians
King
 
big_canuk's Avatar
 
Local Time: 18:51
Local Date: October 31, 2010
Join Date: Jul 2000
Location: Leamington, ON, Canada
Posts: 1,167
I used xcopy, and it seems to work with long file names. At least it got a new ini copied from a save directory back to alpha centari.ini in the main directory.

Probably, copy, as it is internal to dos, won't recognize the long file names.

bc
big_canuk is offline  
Old May 6, 2002, 21:03   #8
Darius
Prince
 
Darius's Avatar
 
Local Time: 18:51
Local Date: October 31, 2010
Join Date: Mar 2000
Location: Connecticut, USA
Posts: 883
It works with long file names if you use the quotes. I know because I've been using it that way.

And I don't "assume" I'm playing the Hive if the bases are blue. I just prefer to fix the problem.
__________________
"I love justice, I hate iniquity. It is not my pleasure that the lower suffer injustice because of the higher." - Darius I, 550-486 BC
Darius is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 19:51.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team