I answered a question in another thread about editing some of the files and now realize this would be a good place to put those comments... so I'm going to copy the replys I made there to here...
Quick tips on modifying a scenario:
Copy one of existing folders in the \Scenarios folder and rename it. This will get you most of the files you will wnat to modify and give you a good staring point. Make sure you keep the “_s” at the end.
Now here are some of the easy things to modify:
AcwPlayers.txt – basic player (side) information. This file contains the name of the sides, their ID number, base moral, and base container size information.
ID: this number is used in other tables to identify the side. By default USA = 1, CSA = 2
The following fields contain the value for the maximum number of units that can be attached to that container:
MaxContainer0--armies
MaxContainer1--corps
MaxContainer2--fleets
MaxContainer3--cities
MaxContainer4-Divisions
MaxUnitStr : this is the max size in men that a brigade can contain.
Simple Tips - Editing files
Moderator: Gil R.
Simple Tips - Editing files
“Ifs defeated the Confederates…” U.S.Grant
RE: Simple Tips - Editing files
[font="times new roman"]AcwUnits.txt – this file contains the basic information about unit types. The important things in this table you may want to mod are the costs. This file may not be in the scenario folder. But I believe you can copy it there from the data folder and modify it. But even if you don't it has some information of value to make note of... most importantly the ID number.[/font]
[font="times new roman"] [/font]
[font="times new roman"]ID: this is the id# for the unit type. This number is important as it is used later in the setup to identify unit types don’t confuse this with the “type” field. The “type” field just tells what category the unit is (it seems to be container type, city/fort type, and military unit type.)[/font]
[font="times new roman"] [/font]
[font="times new roman"]The following control the cost of the unit:[/font]
[font="times new roman"]Money[/font]
[font="times new roman"]Horses[/font]
[font="times new roman"]Labor[/font]
[font="times new roman"]Pop.cost[/font]
[font="times new roman"]Iron[/font]
[font="times new roman"] [/font]
[font="times new roman"]There are also fields that contain the upkeep costs (I won’t list them since the all start with Upkeep)[/font]
note that I believe this is a "universal only" table... I don't think it will work to put in your scenario folder... however you may need to look up the unit type values in it or you may just want to change the cost of units overall.
[font="times new roman"] [/font]
[font="times new roman"]ID: this is the id# for the unit type. This number is important as it is used later in the setup to identify unit types don’t confuse this with the “type” field. The “type” field just tells what category the unit is (it seems to be container type, city/fort type, and military unit type.)[/font]
[font="times new roman"] [/font]
[font="times new roman"]The following control the cost of the unit:[/font]
[font="times new roman"]Money[/font]
[font="times new roman"]Horses[/font]
[font="times new roman"]Labor[/font]
[font="times new roman"]Pop.cost[/font]
[font="times new roman"]Iron[/font]
[font="times new roman"] [/font]
[font="times new roman"]There are also fields that contain the upkeep costs (I won’t list them since the all start with Upkeep)[/font]
note that I believe this is a "universal only" table... I don't think it will work to put in your scenario folder... however you may need to look up the unit type values in it or you may just want to change the cost of units overall.
“Ifs defeated the Confederates…” U.S.Grant
RE: Simple Tips - Editing files
[font="times new roman"]AcwStart.txt – this is the Order of Battle for the scenario. It lists all the starting units, their locations, and strength. It also lists the scenario starting turn. The starting turn is on the 3rd line down. The November Southern Steel scenario starts on turn 20 while the July Coming Fury starts on turn 13.[/font]
[font="times new roman"][/font]
[font="times new roman"]Now for the hard part I’ll use an example...[/font]
[font="times new roman"]The important column names are as follows: [/font]
[font="times new roman"][/font][font="times new roman"][blank 1st col] playerID name type location strength Morale[/font]
[font="times new roman"][/font] [font="times new roman"]
// Union in the Potomac
0 1 Army_Potomac 1 215 0 0
1 1 x 3 215 0 0
2 1 x 6 215 2500 1.2
2 1 x 6 215 2500 1.75
2 1 x 6 215 2500 2
2 1 x 6 215 2500 2
2 1 Berdan's_Sharpshooters 6 215 2500 4.5
1 1 x 3 215 0 0
2 1 x 6 215 2500 3
2 1 x 6 215 2500 1.2
2 1 Sykes'_Regulars 6 215 2500 5.5
2 1 x 6 215 2500 4.5
2 1 x 6 215 2500 3
I will come back to the first column… Let's start with the easy ones.
playerid (2nd column) – this contains the ID number from AcwPlayers.txt and determines which side owns this unit. (USA = 1, CSA = 2)
Name (3rd column) – Name of unit. Do not include spaces! Put an underscore in place of any spaces.
Type (4th column) – This is the unit type number found in the first column of AcwUnits.txt. Army = 1, Corps = 2, Div = 3, Infantry = 6, etc….
Location (5th column) – this is the province ID number where the unit starts in. Look in AcwProvinces.txt for the ID number of a province.
Strength (6th column) – this is the starting manpower of the unit.
Moral (7th column) – this is the stating moral of the unit.
Now back to that 1st column (which I’ll call container or [cont]) This column determines what container a unit starts inside of.
0 = base container (in other words it starts inside of nothing but the province)
Each higher number is the next level of grouping. So in the example above the Army of the Potomac container is at level 0. It’s inside of nothing.
The next unit listed has a 1. This happens to be a Division. So it is located within the Previous level 0 container… the AoP listed above it.
The next unit has a 2… this is an Infantry Brigade. The 2 means it’s contained in the first 1 level unit listed above it… which is the Division.
The next few units also have 2’s so they are also loaded into the first 1 level unit above them in the list.
Now we come to another 1.. this is another Division. Since it’s a 1 not a 0 it must be inside of something… so the next lowest number is 0 and the first 0 listed above it in the table is the AoP so it’s put inside of the AoP.
The next few units listed are more brigades and they all have 2’s so they must be in the first 1 listed above them… which is the division just above their listings… but not the first one in the army… but the one listed just below Berdan’s Sharpshooters.
Here’s an example of how a bunch of units could be listed. The number in () is the number found in the first column..
Army (0) ---- (base container )
(1) Corps ----- (within above 0 unit)
(2) Division---- (within above 1 unit)
(3) Brigade (within above 2 unit)
(3) Brigade
(3) Brigade
(1) Division ----- (within above 0 unit)
(2) Brigade (within above 1 unit)
(2) Brigade
(2) Brigade
(0) Corps ----- (base container)
(1) Division---- (within above 0 unit)
(2) Brigade (within above 1 unit)
(2) Brigade
(2) Brigade
(0) Division---- (base container)
(1) Brigade (within above 0 unit)
(1) Brigade
(1) Brigade
Fleets and ships follow the same rules.
If you just want some spare brigade... just leave it level 0 and it won't be placed inside of a container.
The simplest thing to do is just copy a line of the file and paste it at the spot you want to add something. Want a new brigade? Just copy an existing one... edit it's values it you want... but make very sure you have the right playerID and 1st column (container setting) correct.
My perfered set up for example has all of the army's converted to corps. This is just a simple change of switching the value for the Army Container's column 4 value (type) from a 1 (army as per the AcwUnit's file) to a 2 (corps). I've also at times added an artillary unit to the AoP as an experiment. Just copy an existing brigade, edit it's type from 6 (infantry) to a 10 (artillary) and then adjust it's strength and moral values.
Hope this makes sense...
Dude[/font]
[font="times new roman"][/font]
[font="times new roman"]Now for the hard part I’ll use an example...[/font]
[font="times new roman"]The important column names are as follows: [/font]
[font="times new roman"][/font][font="times new roman"][blank 1st col] playerID name type location strength Morale[/font]
[font="times new roman"][/font] [font="times new roman"]
// Union in the Potomac
0 1 Army_Potomac 1 215 0 0
1 1 x 3 215 0 0
2 1 x 6 215 2500 1.2
2 1 x 6 215 2500 1.75
2 1 x 6 215 2500 2
2 1 x 6 215 2500 2
2 1 Berdan's_Sharpshooters 6 215 2500 4.5
1 1 x 3 215 0 0
2 1 x 6 215 2500 3
2 1 x 6 215 2500 1.2
2 1 Sykes'_Regulars 6 215 2500 5.5
2 1 x 6 215 2500 4.5
2 1 x 6 215 2500 3
I will come back to the first column… Let's start with the easy ones.
playerid (2nd column) – this contains the ID number from AcwPlayers.txt and determines which side owns this unit. (USA = 1, CSA = 2)
Name (3rd column) – Name of unit. Do not include spaces! Put an underscore in place of any spaces.
Type (4th column) – This is the unit type number found in the first column of AcwUnits.txt. Army = 1, Corps = 2, Div = 3, Infantry = 6, etc….
Location (5th column) – this is the province ID number where the unit starts in. Look in AcwProvinces.txt for the ID number of a province.
Strength (6th column) – this is the starting manpower of the unit.
Moral (7th column) – this is the stating moral of the unit.
Now back to that 1st column (which I’ll call container or [cont]) This column determines what container a unit starts inside of.
0 = base container (in other words it starts inside of nothing but the province)
Each higher number is the next level of grouping. So in the example above the Army of the Potomac container is at level 0. It’s inside of nothing.
The next unit listed has a 1. This happens to be a Division. So it is located within the Previous level 0 container… the AoP listed above it.
The next unit has a 2… this is an Infantry Brigade. The 2 means it’s contained in the first 1 level unit listed above it… which is the Division.
The next few units also have 2’s so they are also loaded into the first 1 level unit above them in the list.
Now we come to another 1.. this is another Division. Since it’s a 1 not a 0 it must be inside of something… so the next lowest number is 0 and the first 0 listed above it in the table is the AoP so it’s put inside of the AoP.
The next few units listed are more brigades and they all have 2’s so they must be in the first 1 listed above them… which is the division just above their listings… but not the first one in the army… but the one listed just below Berdan’s Sharpshooters.
Here’s an example of how a bunch of units could be listed. The number in () is the number found in the first column..
Army (0) ---- (base container )
(1) Corps ----- (within above 0 unit)
(2) Division---- (within above 1 unit)
(3) Brigade (within above 2 unit)
(3) Brigade
(3) Brigade
(1) Division ----- (within above 0 unit)
(2) Brigade (within above 1 unit)
(2) Brigade
(2) Brigade
(0) Corps ----- (base container)
(1) Division---- (within above 0 unit)
(2) Brigade (within above 1 unit)
(2) Brigade
(2) Brigade
(0) Division---- (base container)
(1) Brigade (within above 0 unit)
(1) Brigade
(1) Brigade
Fleets and ships follow the same rules.
If you just want some spare brigade... just leave it level 0 and it won't be placed inside of a container.
The simplest thing to do is just copy a line of the file and paste it at the spot you want to add something. Want a new brigade? Just copy an existing one... edit it's values it you want... but make very sure you have the right playerID and 1st column (container setting) correct.
My perfered set up for example has all of the army's converted to corps. This is just a simple change of switching the value for the Army Container's column 4 value (type) from a 1 (army as per the AcwUnit's file) to a 2 (corps). I've also at times added an artillary unit to the AoP as an experiment. Just copy an existing brigade, edit it's type from 6 (infantry) to a 10 (artillary) and then adjust it's strength and moral values.
Hope this makes sense...
Dude[/font]
“Ifs defeated the Confederates…” U.S.Grant
RE: Simple Tips - Editing files
Some of the other files (but I'm not going to go into details... most of the column names make it clear what they control). Some of these file will be found in the Scenario folder and others are in the Data folder (some are in both... in which case the Scenario version take precedence.) Though I have not tested to see if all files can be put in the Scenario folder and work?
Bldgs.txt - This file lists the types of buildings and their costs, time to build, and if USA or CSA can build it. The important number in this file is the first column. It's the ID number of that building type and is used in AcwStartBldgs.txt.
AcwStartBldgs.txt - This files lists what buildings are in each province. The first column list the Provice ID number (found in AcwProvinces.txt) and the second column list the Buiding Type number (found in Bldgs.txt). The table is sorted by building type not province.
Guns.txt - This sets the values for all weapons used by the units in the game. Some of the imporatant values are of course the ID number in the first column but also:
USA: can the USA purchase this
CSA: can the CSA purchase this
BaseCount: the base number that can be purchased before increased costs go into effect... tired of the USA being charged a fortune to equip more than 100 units with Springfields? increase this value!
The other fields are pretty much self explanitory.
Commanders.txt -- This is the stats for the generals. A key value here is Chance. This controls how likely a general will show up on his startdate.
StartDate is the turn he will show up on (assuming Chance says he does...) Note that this is NOT the turn since the game started... it's based off some fixed value for the game engine that all scenarios share (i've never bothered to calculate back what it is... Gil?). So if you have have a guy that has a StartDate of 20 ... that may only be 7 turns into the game if your game starts on turn 13!
AcwProvinces.txt -- This is the list of all the provinces and their starting values for owner and all the other key things like base production values, manpower, max population, etc...
AcwConstants.txt -- modify at your own risk... this will control a lot things that the AI will do. I do sometimes though change the caps for Money, Labor, Iron, Horses, and Guns so I can have more saved at the end of each turn (usually not a problem early war [:D]...)
AcwGovReq.txt -- what the Govenor is most likely to request. They were kind enought to explain the values at the top of the file...
Bldgs.txt - This file lists the types of buildings and their costs, time to build, and if USA or CSA can build it. The important number in this file is the first column. It's the ID number of that building type and is used in AcwStartBldgs.txt.
AcwStartBldgs.txt - This files lists what buildings are in each province. The first column list the Provice ID number (found in AcwProvinces.txt) and the second column list the Buiding Type number (found in Bldgs.txt). The table is sorted by building type not province.
Guns.txt - This sets the values for all weapons used by the units in the game. Some of the imporatant values are of course the ID number in the first column but also:
USA: can the USA purchase this
CSA: can the CSA purchase this
BaseCount: the base number that can be purchased before increased costs go into effect... tired of the USA being charged a fortune to equip more than 100 units with Springfields? increase this value!
The other fields are pretty much self explanitory.
Commanders.txt -- This is the stats for the generals. A key value here is Chance. This controls how likely a general will show up on his startdate.
StartDate is the turn he will show up on (assuming Chance says he does...) Note that this is NOT the turn since the game started... it's based off some fixed value for the game engine that all scenarios share (i've never bothered to calculate back what it is... Gil?). So if you have have a guy that has a StartDate of 20 ... that may only be 7 turns into the game if your game starts on turn 13!
AcwProvinces.txt -- This is the list of all the provinces and their starting values for owner and all the other key things like base production values, manpower, max population, etc...
AcwConstants.txt -- modify at your own risk... this will control a lot things that the AI will do. I do sometimes though change the caps for Money, Labor, Iron, Horses, and Guns so I can have more saved at the end of each turn (usually not a problem early war [:D]...)
AcwGovReq.txt -- what the Govenor is most likely to request. They were kind enought to explain the values at the top of the file...
“Ifs defeated the Confederates…” U.S.Grant
RE: Simple Tips - Editing files
Some quotes from Gil R. from the other thread that pertain to this:
ORIGINAL: Gil R.
I should note that anyone working on a post-1861 scenario might want to hold off for a bit. FOF was initially written to start only in 1861 (since didn't include later scenarios). To create a scenario that begins in 1862 or later there are a bunch of things you want to be able to set: upgrades already gained (e.g., Hasty Entrenchments), diplomatic levels, national will, etc. Now that we are internally working on a pre-Fredericksburg (= Nov. 1862) scenario, Eric is adding code to handle such things. So if, for example, you wanted to play the Newt Gingrich scenario, you'd want both sides to start with a certain number of research upgrades that they had by July 1863, and you can't do that yet. The one thing you can definitely work on now would be OOB's, though even here there will very likely be a change: Eric's going to try to add code that allows us to pre-attach generals to their historical division/corps/army commands using the ACWStart.txt file. So if doing an OOB you should definitely keep track of which generals would go where, so that if that code is indeed added you can then add the generals.
Your comment makes me think that it would be a good idea to share what we’re hoping to encode for the purpose of adding post-1861 scenarios. This is the current list. (Ignore the fact that #7-8 are missing. They’re not relevant.)
1) Ability to have generals attached to a container at start of scenario
2) Implement the IsDead column to contain the game turn at which a general died historically. Scenarios that start at or past this date won't include these generals at all. [This is not something you guys need to worry about – I make the changes myself to the master generals files, and you can then just copy the IsDead column.]
3) Diplomacy levels
4) Starting upgrades
5) Starting emancipation state
6) Muster/conscript numbers??? [i.e., chances of mustering or conscripting]
9) national will
10) changing the size limits for armies/corps/divisions/brigades
11) Governors
In addition, I’ve identified attitd.txt as a definite COG vestigial file, and provstrt.txt and relstrt.txt look like they are COG files based on their dates. Also, mapregion.txt is blank, so it probably serves no purpose. I’ll see if we can get these removed for the next patch.
One more note: do not sort commanders.txt – keep it in the order it’s in, because changing its order 1) can cause crashes if you do it the wrong way and 2) you won’t be able to import new data whenever I update the generals files with new bios, ratings, abilities, start dates, etc.
“Ifs defeated the Confederates…” U.S.Grant
RE: Simple Tips - Editing files
Here are the values for the Turn/Dates: (use can use these for start dates for the scenario or when generals will arrive for example... )
This is the table for determining dates within the game. (I hope the formatting works.)
1861 1862 1863 1864 1865 1866
Jan 0 24 48 72 96 120
Feb 2 26 50 74 98 122
Mar 4 28 52 76 100 124
Apr 6 30 54 78 102 126
May 8 32 56 80 104 128
Jun 10 34 58 82 106 130
Jul 12 36 60 84 108 132
Aug 14 38 62 86 110 134
Sep 16 40 64 88 112 136
Oct 18 42 66 90 114 138
Nov 20 44 68 92 116 140
Dec 22 46 70 94 118 142
EDIT: Hmm. It doesn't work. Well, you can figure it out: 0=EarlyJan1861, 1=LateJan1861, 24=EarlyJan1862, etc.
“Ifs defeated the Confederates…” U.S.Grant
RE: Simple Tips - Editing files
Dude, your the Dude!!! Thanks for posting this in the correct forum, now I don't have to go looking for that info again.
RE: Simple Tips - Editing files
ORIGINAL: cesteman
Dude, your the Dude!!! Thanks for posting this in the correct forum, now I don't have to go looking for that info again.
I had a brain fart earlier or I would have posted it here the first time... didn't think to stick the mod stuff in the... duh... mod forum... [8|]
“Ifs defeated the Confederates…” U.S.Grant