MAIN
home
modding home
ARITCLES
basic scenario creation
uniform modding overview
the order of things
variables reference
commands reference
map layout
INI FILES
cwbr.ini
level.ini
MAP CSV LAYOUT
map_name.csv
SCENARIO CSV LAYOUT
units.csv
events.csv
objectives.csv
MAIN CSV LAYOUT
artyammo.csv
effects.csv
formation.csv
gamescreens.csv
gamesounds.csv
levels.csv
mainscreens.csv
mainsounds.csv
names.csv
openobjs.csv
openplay.csv
sprites.csv
tables.csv
toolbar.csv
tooltext.csv
unitcommon.csv
units.csv
unitsprite.csv
weapons.csv
units.csv

The units.csv file is the OOB (Order of Battle) for CWBR. It lists who is going to be in the fight. Each scenario has a units.csv file that is specific to the scenario that is located in that scenarios mmg file or directory. There is also one main units.csv file that is located in the main CWBR.mmg file or the main "Data Files" folder that is used by Open Play. I think that this is the first csv file that we ever made. It just got so clumsy that we branched out into others.

Originally there were no limits to the number of armies that could be in the units.csv file. As development progressed many other things came to depend on their only be two armies. I have never tried it with three, but I don't think that it will crash. All new code that is written will try to not depend on the number of armies. But I do believe that all armies will fight every other army. There are no alliances. So you could do the battle of the 7 (I think) armies at the end of The Hobbit, I think that they would all fight. You couldn't recreate the Dwarf/Men/Elf/Eagle alliance.

A couple of important notes:
You must follow things in order when assigning the Army Structure. You cannot skip numbers.
The Supply Wagon is the Last line before changing Divisions.
The Courier has to be the Last Line of the both (Armies) or the game will CTD.
( Examine the Units.csv ) file to see the last line of both armies.
All headings for the columns are in the 1st row.

Column Explanation
A: Army

Number 1 or 2. 1 for Union, 2 for Confederate. The first five columns designate who the unit is. They must be in order and no number(s) can be skipped.

These columns are used to designate the command structure of the army. The structure MUST be correct and in order or the game will crash when the AI starts to issue commands. There can be only 2 armies. No gaps in #s...all values must be consecutive.

B: Corps

The Corps ID number.

C: Div The Division ID number.
D: Brigade The Brigade ID number.
E: Regiment The Regiment ID number. If you want to have companies instead of regiments, then this would be the company ID number.
F: ID Name This acts as a nickname for the unit and allows the scenario designer to name them specifically for use in a scenario. Whenever this unit is referenced in another csv file, they will use this ID. This is especially used in the objectives.csv file.
G: Class ID name from Column A of the unitcommon.csv file. Each unit must be associated with 1 and only 1 class from the unitcommon.csv file. This will define attributes such as graphics and sounds.
H: Weapon This column references the WEAPONS.csv file and is the weapon assigned to the unit.
I: Ammo Specify the ammo levels of the specific unit type. This is the amount of ammo that EACH SOLDIER in the regiment will have. So multiply this number times the regiments strength to see how much the entire regiment is carrying.
J & K: Dir X/Dir Z

This is a normalized 2D vector that determines the facing of the unit when the scenario starts. This is pretty hard to compute, so we recommend that you use our automated process.

For full details please see the help on CWBR.ini and the NoAI flag.

By hitting the L key while in game…the game will spit out a file into the main folder called unitlocs.csv…use this file to set positions for Custom Scenarios.

L & M: loc X/loc Z This is the 2D coordinates of this unit's flag bearer on the map. The valid values are from 0.0 - 131072.0. Though we recommend not getting too close the edge of the map. As above, this is much easier to set using the NoAI process.
N: Flags Specifies the flag graphic, from sprites.csv, of the specific unit.
O: Formation Specifies the starting formation, from formation.csv, of the specific unit for the scenario.
P: Name The name of this unit. Stored in the $name variable.
Q: Name 2 The 2nd name for this unit. Stored in the $name2 variable.
R: Name 3 The 3rd name for this unit. Stored in the $name3 variable.
S: Strength

This is the number of men in the unit. Note that we always create a flag bearer, so he does not count in this number. Also we create 1 sprite for every ten men. We show a max of 60 sprites per unit. So a unit will be full with 590 men, since 1 sprites is used for the flag bearer. If there are more men, they will be distributed evenly amount all the sprites.

For 1 men units, such as arty, ammo wagons, and officers. You can specify anywhere between 1-10 men and still only have your 1 sprite + flag bearer. The number of men does not matter for officers and wagons, but does matter for arty.

UNIT TRAINING

The rest of the columns have to match exactly the ROWS from the levels.csv file. Starting after weather, each row of the levels.csv file is matched here in the units.csv file. This is important because you CAN add more rows to the levels.csv file and match them in the units.csv file, and it will work. You can add your own skills to the game.

Refer to the levels.csv file to see what the min and max values can be for each different attribute.

T-X: Officer Attributes These columns only affect officers. They are explained in more depth in the levels.csv file.
Y: Experience (Quality) This column affects both officers and fighting men. It's the amount of battle experience that they have. This is explained in more detail in the levels.csv file.
Z-?: Regiment Attributes The rest of the columns affect only the fighting men, be they infantry, cavalry, or artillery. They are explained in more depth in the levels.csv file. Note that the morale and fatigue columns affect many items in the game that may not be mentioned in the levels.csv file. This is because they are such a core part of the AI and fighting in CWBR.