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
weapons.csv

The weapons.csv file describes the firing abilities of every ranged weapon in the game. Weapons such as artillery have extra parameters that are described below. There is no limit to the amount of weapons that you can create.

The weapons.csv file is a little obscure, so please read this carefully to understand how it all works. There are 7 base ranges that are used by the game, they are described in columns C - I, each weapon will set it's own particular yardage for each range. The first line of the csv is just header text that is not read by the program. The second line is the most important line because it sets the percent chance of a hit for each of the 7 ranges. This chance of a hit is set in row 2 columns C - I. In each of these boxes there is a number that describes the chance of a hit out of 1000. This is the same for every weapon in the file, the way that the weapons differentiate themselves is by setting the yardage for each range.

For example: The first range is Min Range, we have set this to have a 400 out of 1000 chance of a hit, or 40%. This is our highest percent chance because this is the closest that you will get. Now most of our artillery has the Min Range at 100 yards. That means that those guns will have a 40% chance to hit anything within 100 yards. Our rifles are different, many of them have this range set at 30 yards. That means for these riles to have the same 40% chance of a hit, they would have to be at least within 30 yards of the target. Although the 40% chance of a hit does not change, the range to get that 40% chance can and does change for every ranged weapon.

These ranges also affect how the AI works. The AI will not tell their men to move within 50 yards of the enemy, that's not how it thinks. The AI will tell their men to move to Medium range (for example). So depending on the rifles that their men have, their distance to the enemy will vary. This is seen in the stance.csv file.

Note: The chance of a hit, the chance of a misfire, and the firing time are all also modified by the individuals firing the weapon and their skills in doing so. These values are in levels.csv.

Column Explanation
A: Name The name of this ranged weapon. This name is used in other csv files to reference this weapon.
B: Name2 This is an extra line of text to describe the weapon. This field is used for display only, and is not referenced anywhere except by the variable that displays it.
C: Min Range The number of yards away from the enemy for this weapon to be considered at minimum range. The minimum range value will be used for 0 - Min Range.
D: Optimal Range The number of yards away from the enemy for this weapon to be considered at optimal range. The optimal range value will be used for Min Range - Optimal Range.
E: Medium The number of yards away from the enemy for this weapon to be considered at medium range. The medium range value will be used for Optimal - Medium Range.
F: Typical The number of yards away from the enemy for this weapon to be considered at typical range. The typical range value will be used for Medium - Typical Range.
G: Long The number of yards away from the enemy for this weapon to be considered at Long range. The Long range value will be used for Typical - Long Range.
H: Longest The number of yards away from the enemy for this weapon to be considered at Longest range. The Longest range value will be used for Long - Longest Range.
I: Max Range The number of yards away from the enemy for this weapon to be considered at maximum range. The maximum range value will be used for Longest - Max Range. This also specifiies the maximum range in which this type of weapon can be fired. The men will not fire if the enemy target is farther away than this range.
J: Misfires This column is probably labeled incorrectly. It's really the chance you have of loading your rifle correctly. It's out of 1000 like the chance of a hit. This is also modified by the units levels in level.csv. So if this number is 200, then you have a 20% chance of even getting the shot off.
K: Firing Time This is the number of seconds that it takes between firing your weapon and getting it reloaded. Obviously the lower time here the better. This, as well as misfires and shooting, should be set for the lowest level of men, for the green guys. Because unit experience and skills will bring this number down.
L-O: Arty Ammo Quantities These next four columns need to be in the same exact order as the ammo types listed in the artyammo.csv file. They are matched 1-1 by the program when the level is loaded. These four numbers need to add up to exactly 100. Basically when an artillery unit is loaded, they are given a certain amount of ammo from the units.csv file. Since arty has 4 types of ammo, we use these numbers as percentages to divide up the ammo into the different types. It also effectively allows certain artillery types to not receive certain ammo types. So you can use 0 as a valid value if that piece of artillery would never shoot that type of ammo. If these numbers add up to more or less than 100, the results are undetermined, but definitly not good.