Wednesday, January 25, 2012

Battle Academy: Modding in some tooltips

I think my biggest complaint about Battle Academy is the lack of transparency reguarding how combat works. There are many aspects where the player gets an idea that they matter, but there is no feedback to let the user know how much (such as how distance from the target affects damage). Attack a soft target and the tool tip displays a number for the effective damage. Well , what does that number mean and how is it used? No idea, until some of the helpful forum members answered some questions and pointed me in the right direction of the scripts. I then discovered there are many factors that go into calculating the damage and I decided to add them into the tool tip that appears when initiating combat. This is what it looks like:

Much of the data used for the calculation comes from the Squads.xls or the Squads.csv file (not sure which is used). This is how the potential damage is calculated for this attack.
  1. Each unit has a range of damage that it can cause when attacking a soft target (see HE Damage Range).
  2. The distance is the number of tiles the attacker is from the target.
  3. The distance is used to get the accuracy of the attacker at that range. Each unit is rated for accuracy at 1 tile, 2 tiles, 3 to 4 tiles, 5 to 6 tiles, and 7+ tiles, along with their max range.
  4. If the attacker was moving (without using the hunt command) a penalty is applied to the accuracy. This movement penalty is also stored in the squads data file.
  5. The defender can reduce damage taken based on the terrain he is in. Each type of terrain is given a cover rating that specifies what percentage of the damage is taken. This is affected by whether the target unit was moving or stationary.
  6. Units can be given a penalty if they are the target of an HE attack. It looks like infantry does not get this penalty.
The damage % used after modifiers displays what percentage of the damage will be used for the final damage of the attack. In this case, if the unmodified damage was 60, the defender would only take 7% of that damage. That is a pretty big reduction, with an end result of 4. Now how is the 4 used? That is a good question and can also be found in the scripts. Basically it is the percent chance to kill the first man in the target unit. The second man gets half this chance and so on until each man in the target unit is checked. There are other factors I haven't covered, but that is the general gist of it.

I decided to add a tool tip for terrain cover too. Did you know that the terrain has different cover values for if the occupying unit is moving or not moving? The default tool tip shows an average of the two values. This example shows these values.

It is a shame that the designers crafted such an elaborate system and keep the players blind to its sophistication. Yes, Battle Academy tries to bring non-hardcore players into the fold, but I think the lack of information presented by the UI and documentation actually makes the game more confusing.

Edit: 1/31/2012----The modded files were added to the Matrix forums at: Tooltip mod files


  1. Nice work, Rob. Any chance you could make the tooltip available for others to use as a mod? I know I, for one, would appreciate and enjoy it!

    1. Hi, thanks. I will try to post the modified files either here and / or at the Slitherine site in the near future. Once I do I'll update the end of this article with their location.

      I was hesitant to do so since if a user puts in in the main script folder it will make their game incompatible for multiplayer. Since I don't play multiplayer this isn't an issue for me. The other option is to make a copy of the campaign you want to play and put the script files within that campaign, so it doesn't effect the entire game. That can be tedious is you have many campaigns to want to play.

    2. Hi,
      The files were posted on the Matrix forums. Please see link at bottom of article for link to forum post. Hope you find the files useful.