Currently there are 18 variables that define a unit, 9 variables that define a squad, and 7 variables that have to deal with the overall battle settings. Below I will list the variables along with a brief description of each. Be sure to see my YouTube videos for more information on my War Simulation project, and leave any questions or ideas in the comments.
UNIT VARIABLES (As seen on the Excel Workbook – Units Sheet)
ID – Each unit should have a unique ID number greater than zero. When building a squad you will use ID numbers to identify what type of unit the squad is composed of along with what unit is the leader of the squad.
Unit – The name of the unit. Currently this is only for personal use and can serve as kind of an identifier or reminder, though in the future the name of the unit may be used in the battle summary printout or other places.
Stamina – Stamina should be a whole number greater than zero and represents how much energy a unit can expend before tiring itself out. Currently the only use for this in the simulation is the act of Charging costs 1 Stamina per second and loses it’s benefits when the unit’s stamina is reduced to zero, Charging will allow the unit to move faster and gain a bonus to their deadlock efficiency for a few seconds after they become deadlocked with an opposing squad. The charge speed and charge cost modifiers can also be changed by the user (see SETTINGS VARIABLES below).
Speed – This represents the units marching or walking speed in meters per second (if you prefer mph, simply divide your mph measurement by 2.237 to get m/s). This doesn’t represent the unit’s running speed, though their max speed would be their speed times the charge speed multiplier found in the settings variables. Speed should be a number greater than or equal to zero (zero if the unit is stationary, though be careful about having too many stationary units).
Max HP – The hit points or health of the unit, when these are depleted the unit will die. HP is reduced from enemy attacks both ranged or melee attacks. HP should be set to a whole number greater than zero.
Charge – When a squad charges at an enemy squad they increase their momentum counter which is used as follows: For the first X seconds of a deadlock, the units in the squad have their Melee Attack stat increased by their Charge stat where X is determined by their momentum counter. Charge should be a whole number greater than or equal to zero.
Bravery – Not currently used yet, this stat will help in determining a unit’s chance of fleeing due to troop losses or low morale with a higher bravery stat representing the unit being less likely to flee. Should be a whole number greater than or equal to zero, though can be left blank if Disbanding is turned off.
Armor – Any attack, ranged or melee, will have one of four possibilities for the outcome of the attack being: Miss, Graze, Hit, or Critical Hit. The amount of HP loss will then be calculated based on the result: Miss – no HP loss, Graze – HP loss is equal to Damage-Armor, Hit – HP loss equal to Damage – Armor/4, and Critical Hit – HP Loss equal to Damage – Armor/8. Armor should be a whole number greater than or equal to zero, and it is perfectly reasonable to have a unit with an armor value much larger than the typical damage value because it will still be possible to do damage (attacks have a minimum damage amount based on the attack result this way armor can’t prevent damage from say an attack landed on a critical spot).
Attack & Defense (Melee or Ranged) – Both attack and defense should be a whole number greater than or equal to zero, though a unit with zero attack won’t attack and a unit with zero defense won’t be able to defend itself by trying to avoid or deflect oncoming attacks. Also, note that in my examples units have around 10-50 attack and defense, but the common values is completely up to the user as determining attack results is done by comparison of the two numbers. For example, a 5000 attack vs 1000 defense is the same as a 5 attack against a 1 defense. When a unit attacks another unit the attack and defense values are modified by factors such as charge bonus (for attack if applicable) and morale bonuses and compared to determine the attack result (Miss, Graze, Hit, or Critical Hit). Melee attacks use melee attack and melee defense, and ranged attacks used ranged attack and ranged defense.
Damage (Melee or Ranged) – Should be a whole number greater than or equal to zero, this stat represents the maximum amount of HP loss an opponent will take from an attack by this unit. A value of zero represents no ability to inflict damage.
Rate (Melee or Ranged) – This should be a number greater than zero, and represents how many melee or ranged attacks the unit can perform in a second. For example a value of 0.5 represents an attack every 2 seconds where a value of 2 represents 2 attacks per second.
Range – Represents the maximum range of the unit’s ranged attacks in yards.
Ammo – Represents how many ‘shots’ a unit can perform with their ranged weapon. Each attack depletes one ammo, and when all ammo is depleted the unit will no longer be able to use its ranged attack.
SQUAD VARIABLES (As seen on the Excel Workbook – Squads Sheet)
Squad – The name of your squad, this is the name that will appear in the information box for the squad during the simulation. It’s recommended to limit the name to a maximum of 20 characters for best display. Also note that when creating squads in the excel workbook, they will be created and displayed in the same order that they are listed in the Squads worksheet. So if you have more than six squads in the blue army for example, the simulator will only show the top six surviving squads.
Side – Must be either Red or Blue, this variable indicates which army the squad belongs too and will determine who their allies and enemies are.
Unit ID – Must be a unit ID from the Units worksheet or a value of zero if there are no units in the squad.
Leader ID – Must be an ID from the Units worksheet or a value of zero if there is no leader for the squad.
Unit Count – The total number of units in the squad, must be a whole number greater than or equal to zero. During the simulation this number, plus 1 if the squad has a leader, will be the troop count displayed at the start of the battle.
Unit Morale – The starting morale of the unit, must be a real number. Morale hasn’t been fully implemented yet and currently only influences Attack and Defense values for both Melee and Ranged attacks, it will eventually increase or decrease based on events during the battle and may affect other things such as the chance that the unit flees battle. A Morale of zero is a basic or ‘normal’ morale and can increase or decrease to include both positive and negative real numbers. The more positive morale is the better the unit will perform while a more negative morale will have much worse consequences.
Leader Position – Can be one of three values: 1, 0, or -1. A one indicates that the leader marches in front of the units in the squad, while a -1 indicates that the leader marches behind all of the units and a 0 indicates that a leader marches in the middle of their units. The closer the leader is to the front of the squad, the more likely they are to engage in melee combat while the closer they are to the back of the squad the less likely they are to engage in melee combat. Position has less effect on ranged attacks.
X / Y Position – The position of the squad on the battlefield at the start of the battle with x=0, y=0 being the top left of the battlefield and x=420, y=275 being the bottom right of the battlefield, and x being the horizontal coordinate and y being the vertical. (x must be a real number between 0 and 420, and y a real number between 0 and 275). The units are yards, so x=50, y=60 represents a squad that starts 50 yards to the right of the top left corner and 60 yards down.
SETTINGS VARIABLES (As seen on the Excel Workbook – Settings Sheet)
Disbanding – Either 1 or 0. A value of zero indicates that all units will fight to the death of every last man. A value of one indicates that units may flee from combat based on their morale, bravery stat and other factors. DISBANDING has not yet been implemented into the simulation.
Game Speed – Speed at which the simulation occurs, must be a real number greater than or equal to 1. A value of 3 for example would indicate that 3 seconds in the simulation is 1 actual second, or the simulation occurs at 1/3 the speed.
Charge Cost – The cost per second of charging, must be a real number greater than or equal to zero. Though keep in mind a value of zero would make it so units can charge as often as they like without ever expending stamina to do so.
Charge Speed – The multiplier to a unit’s speed value when they are charging. It makes most sense for this variable to be a real number greater than 1.
Standard Size – This variable will determine the size of the blocks which represent each squad. A block will range in size from 0.25 x 0.25 units up to 4 x 4 units, with a squad of X units being represented by a 1 x 1 block where X is the value assigned to Standard Size. Look at the examples at the following link: https://www.youtube.com/watch?v=RnlIwiDKpOM for more on this. In this first battle standard size was 20 and in the second it was 500.
Blue Army Name and Red Army Name – Here you can define the names that will appear for each army, the Blue Army and Red Army respectively. It is recommended to keep the names to a 40 character limit.
Leave any questions or ideas below or on any of my other Blogs or YouTube videos and thanks for your interest in my WarSim project!
UNIT VARIABLES (As seen on the Excel Workbook – Units Sheet)
ID – Each unit should have a unique ID number greater than zero. When building a squad you will use ID numbers to identify what type of unit the squad is composed of along with what unit is the leader of the squad.
Unit – The name of the unit. Currently this is only for personal use and can serve as kind of an identifier or reminder, though in the future the name of the unit may be used in the battle summary printout or other places.
Stamina – Stamina should be a whole number greater than zero and represents how much energy a unit can expend before tiring itself out. Currently the only use for this in the simulation is the act of Charging costs 1 Stamina per second and loses it’s benefits when the unit’s stamina is reduced to zero, Charging will allow the unit to move faster and gain a bonus to their deadlock efficiency for a few seconds after they become deadlocked with an opposing squad. The charge speed and charge cost modifiers can also be changed by the user (see SETTINGS VARIABLES below).
Speed – This represents the units marching or walking speed in meters per second (if you prefer mph, simply divide your mph measurement by 2.237 to get m/s). This doesn’t represent the unit’s running speed, though their max speed would be their speed times the charge speed multiplier found in the settings variables. Speed should be a number greater than or equal to zero (zero if the unit is stationary, though be careful about having too many stationary units).
Max HP – The hit points or health of the unit, when these are depleted the unit will die. HP is reduced from enemy attacks both ranged or melee attacks. HP should be set to a whole number greater than zero.
Charge – When a squad charges at an enemy squad they increase their momentum counter which is used as follows: For the first X seconds of a deadlock, the units in the squad have their Melee Attack stat increased by their Charge stat where X is determined by their momentum counter. Charge should be a whole number greater than or equal to zero.
Bravery – Not currently used yet, this stat will help in determining a unit’s chance of fleeing due to troop losses or low morale with a higher bravery stat representing the unit being less likely to flee. Should be a whole number greater than or equal to zero, though can be left blank if Disbanding is turned off.
Armor – Any attack, ranged or melee, will have one of four possibilities for the outcome of the attack being: Miss, Graze, Hit, or Critical Hit. The amount of HP loss will then be calculated based on the result: Miss – no HP loss, Graze – HP loss is equal to Damage-Armor, Hit – HP loss equal to Damage – Armor/4, and Critical Hit – HP Loss equal to Damage – Armor/8. Armor should be a whole number greater than or equal to zero, and it is perfectly reasonable to have a unit with an armor value much larger than the typical damage value because it will still be possible to do damage (attacks have a minimum damage amount based on the attack result this way armor can’t prevent damage from say an attack landed on a critical spot).
Attack & Defense (Melee or Ranged) – Both attack and defense should be a whole number greater than or equal to zero, though a unit with zero attack won’t attack and a unit with zero defense won’t be able to defend itself by trying to avoid or deflect oncoming attacks. Also, note that in my examples units have around 10-50 attack and defense, but the common values is completely up to the user as determining attack results is done by comparison of the two numbers. For example, a 5000 attack vs 1000 defense is the same as a 5 attack against a 1 defense. When a unit attacks another unit the attack and defense values are modified by factors such as charge bonus (for attack if applicable) and morale bonuses and compared to determine the attack result (Miss, Graze, Hit, or Critical Hit). Melee attacks use melee attack and melee defense, and ranged attacks used ranged attack and ranged defense.
Damage (Melee or Ranged) – Should be a whole number greater than or equal to zero, this stat represents the maximum amount of HP loss an opponent will take from an attack by this unit. A value of zero represents no ability to inflict damage.
Rate (Melee or Ranged) – This should be a number greater than zero, and represents how many melee or ranged attacks the unit can perform in a second. For example a value of 0.5 represents an attack every 2 seconds where a value of 2 represents 2 attacks per second.
Range – Represents the maximum range of the unit’s ranged attacks in yards.
Ammo – Represents how many ‘shots’ a unit can perform with their ranged weapon. Each attack depletes one ammo, and when all ammo is depleted the unit will no longer be able to use its ranged attack.
SQUAD VARIABLES (As seen on the Excel Workbook – Squads Sheet)
Squad – The name of your squad, this is the name that will appear in the information box for the squad during the simulation. It’s recommended to limit the name to a maximum of 20 characters for best display. Also note that when creating squads in the excel workbook, they will be created and displayed in the same order that they are listed in the Squads worksheet. So if you have more than six squads in the blue army for example, the simulator will only show the top six surviving squads.
Side – Must be either Red or Blue, this variable indicates which army the squad belongs too and will determine who their allies and enemies are.
Unit ID – Must be a unit ID from the Units worksheet or a value of zero if there are no units in the squad.
Leader ID – Must be an ID from the Units worksheet or a value of zero if there is no leader for the squad.
Unit Count – The total number of units in the squad, must be a whole number greater than or equal to zero. During the simulation this number, plus 1 if the squad has a leader, will be the troop count displayed at the start of the battle.
Unit Morale – The starting morale of the unit, must be a real number. Morale hasn’t been fully implemented yet and currently only influences Attack and Defense values for both Melee and Ranged attacks, it will eventually increase or decrease based on events during the battle and may affect other things such as the chance that the unit flees battle. A Morale of zero is a basic or ‘normal’ morale and can increase or decrease to include both positive and negative real numbers. The more positive morale is the better the unit will perform while a more negative morale will have much worse consequences.
Leader Position – Can be one of three values: 1, 0, or -1. A one indicates that the leader marches in front of the units in the squad, while a -1 indicates that the leader marches behind all of the units and a 0 indicates that a leader marches in the middle of their units. The closer the leader is to the front of the squad, the more likely they are to engage in melee combat while the closer they are to the back of the squad the less likely they are to engage in melee combat. Position has less effect on ranged attacks.
X / Y Position – The position of the squad on the battlefield at the start of the battle with x=0, y=0 being the top left of the battlefield and x=420, y=275 being the bottom right of the battlefield, and x being the horizontal coordinate and y being the vertical. (x must be a real number between 0 and 420, and y a real number between 0 and 275). The units are yards, so x=50, y=60 represents a squad that starts 50 yards to the right of the top left corner and 60 yards down.
SETTINGS VARIABLES (As seen on the Excel Workbook – Settings Sheet)
Disbanding – Either 1 or 0. A value of zero indicates that all units will fight to the death of every last man. A value of one indicates that units may flee from combat based on their morale, bravery stat and other factors. DISBANDING has not yet been implemented into the simulation.
Game Speed – Speed at which the simulation occurs, must be a real number greater than or equal to 1. A value of 3 for example would indicate that 3 seconds in the simulation is 1 actual second, or the simulation occurs at 1/3 the speed.
Charge Cost – The cost per second of charging, must be a real number greater than or equal to zero. Though keep in mind a value of zero would make it so units can charge as often as they like without ever expending stamina to do so.
Charge Speed – The multiplier to a unit’s speed value when they are charging. It makes most sense for this variable to be a real number greater than 1.
Standard Size – This variable will determine the size of the blocks which represent each squad. A block will range in size from 0.25 x 0.25 units up to 4 x 4 units, with a squad of X units being represented by a 1 x 1 block where X is the value assigned to Standard Size. Look at the examples at the following link: https://www.youtube.com/watch?v=RnlIwiDKpOM for more on this. In this first battle standard size was 20 and in the second it was 500.
Blue Army Name and Red Army Name – Here you can define the names that will appear for each army, the Blue Army and Red Army respectively. It is recommended to keep the names to a 40 character limit.
Leave any questions or ideas below or on any of my other Blogs or YouTube videos and thanks for your interest in my WarSim project!