Page 1 of 1

Commanders.txt

Posted: Sun Dec 17, 2006 11:53 pm
by jsaurman
I've been trying to mess around with this file a bit. I wanted to make all the Union Generals start out at one star, as I always play the Union.
Somehow, whatever I did, erased all the generals from any new game I start. All old saved games still have their generals.
Luckily I saved a backup of the original file, so I'm not worried about that, I can go back to the default whenever I want.

But here are the interesting things I found out.
1. Another poster in another thread, said this file was a comma separated text file, that appears to be incorrect. I think it is a TAB separated text file.
2. Here are the attributes for each general:
Name
Mugshot
Nation
StartDate
StartProv
HomeState
Chance (This appears to be a percentage, but instead of 100 percent, which no general has, all of the 100% generals say 200)
rank (One through Five, obviously)
Leadership
Tactical
Initiative
Command
Cavalry
WP (I think they get a bonus if they are a West Point graduate)
VMI (Same for VMI)
GradRank (Appears to be only 1 or 2, or zero if they didn't finish in the top two of their class)
Foreign
Relieved
Resigned
Medal
Special0 (I guess this is their special abilities)
Special1
Special2
Special3
Special4
Notes (Appears to be notes that the designers were using)


What I did was take this file, and look at it in Notepad, but it was too messy to work with.
I did notice that there were no commas separating any of the data.
Then I imported it into Excel, as a tab delimited list
It looked fine. I did a Data Sort by Nation to get the Union and Confed seperate.
Then I did a sort by rank, and changed all the Union numbers in the rank column to 1
Then I saved the file as tab-delimited text with the same name (Commanders.txt)

Anyone have any idea what went wrong? All new games with this file have NO generals at all. There are no Generals icons, the only place that I can see any reference to generals, is in the military screen where it lists the total quantity of various star ranks at the bottom left, but when I do a sort to ditch everything but generals there are no generals listed there either.

Thanks!
JIM

RE: Commanders.txt

Posted: Mon Dec 18, 2006 12:03 am
by scott64

RE: Commanders.txt

Posted: Mon Dec 18, 2006 1:57 am
by satchel
ORIGINAL: jsaurman
I did a Data Sort by Nation to get the Union and Confed seperate.
Then I did a sort by rank, and changed all the Union numbers in the rank column to 1

This might be part of your problem. Modifying the data in the fields should be work fine, but changing the order of the generals might have messed up the way the game is reading the file. I'd leave all the lines in the same order, and just go into the fields and change the data. I wouldn't "sort" in any way.

RE: Commanders.txt

Posted: Mon Dec 18, 2006 3:26 am
by jsaurman
That was it exactly.
Upon further examination, it appears the original sort order was by Chance, then by Number, then by Nation.
Works perfectly now.
 
Thanks!
 
JIM

RE: Commanders.txt

Posted: Mon Dec 18, 2006 1:58 pm
by ericbabe
The first line of the file is always a comment line, so anything there doesn't get read.  The last line should be the "end of file" line -- the game stops reading the file whenever it reaches that line.  If a sort moves the end of file line up to the top, then the game reads that line and stops.  Apart from these two lines, the order of the other lines does not matter.