Commanders.txt

From the creators of Crown of Glory come an epic tale of North Vs. South. By combining area movement on the grand scale with optional hex based tactical battles when they occur, Forge of Freedom provides something for every strategy gamer. Control economic development, political development with governers and foreign nations, and use your military to win the bloodiest war in US history.

Moderator: Gil R.

Post Reply
jsaurman
Posts: 129
Joined: Wed Jun 28, 2000 8:00 am
Location: Alexandria, VA

Commanders.txt

Post 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
User avatar
scott64
Posts: 4019
Joined: Sun Sep 12, 2004 5:34 pm
Location: Colorado
Contact:

RE: Commanders.txt

Post by scott64 »

Lucky for you, tonight it's just me


Any ship can be a minesweeper..once !! :)

http://suspenseandmystery.blogspot.com/
User avatar
satchel
Posts: 18
Joined: Wed Sep 26, 2001 8:00 am
Location: Fort Smith, Ark. USA

RE: Commanders.txt

Post 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.
enemy sighted—enemy met
jsaurman
Posts: 129
Joined: Wed Jun 28, 2000 8:00 am
Location: Alexandria, VA

RE: Commanders.txt

Post 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
User avatar
ericbabe
Posts: 11848
Joined: Wed Mar 23, 2005 3:57 am
Contact:

RE: Commanders.txt

Post 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.
Image
Post Reply

Return to “Forge of Freedom: The American Civil War 1861-1865”