• Hello and welcome to MSFC. We are a small and close knitted community who specialises in modding the game Star Trek Armada 2 and the Fleet Operations modification, however we have an open field for discussing a number of topics including movies, real life events and everything in-between.

    Being such a close community, we do have some restrictions, including all users required to be registered before being able to post as well as all members requiring to have participated in the community for sometime before being able to download our modding files to name the main ones. This is done for both the protection of our members and to encourage new members to get involved with the community. We also require all new registrations to first be authorised by an Administrator and to also have an active and confirmed email account.

    We have a policy of fairness and a non harassment environment, with the staff quick to act on the rare occasion of when this policy is breached. Feel free to register and join our community.

hitChance and damageBase Formulas

Shadow2Lead

Cadet Freshman
Joined
6 Sep 2019
Messages
4
I am using a slightly modified version of MrVulcan's excellent ODF building Excel spreadsheet to create all the ship and weapon ODFs for my copy of Armada. One of the biggest advantages of doing this is that it allows me to automate building the damageBase and hitChance lines to have individual values for every ship in the game. This allows ships to have "armor" and "evasion" values that get calculated by Excel before building the ODF. As well as creating additional "types" of weapons for the purpose of damage calculations (e.g. a HeavyPhaser type that is not affect by phaser armor.)

Right now I'm doing very simplistic calculations, e.g. for a torpedo:

hitChance = weaponInitialHitChance - targetTorpedoEvasiveValue
dmgBase = weaponDmgBase - targetTorpedoArmorValue

The simplicity has had the virtue of making it relatively easy to catch mistakes in making the Excel spreadsheets, but now I'm trying to brainstorm ideas for what concepts to include in more involved hitChance and damageBase calculations that could make for more interesting rock/paper/scissors/spock balancing. In the spirit of brainstorming I'm throwing everything at the wall, even things which likely won't make it into the mod as its Star Trek (e.g. ECM & ECCM.)

Defender values:
Armor (# reduction from attack of given type)
Phaser
Torpedo
Pulse
Resistance (% reduction from attack of given type)
Phaser
Torpedo
Pulse
Evasion Value (Compared to Accuracy Value to affect hitChance)
Phaser
Torpedo
Pulse
ECM (compared to ECCM to affect hitChance)

Attacker values:
Types of weapon
Phaser
Torpedo
Pulse
Accuracy Value (Compared to Evasion value to affect hitChance)
ECCM (compared to ECM to affect hitChance)

Above are the ideas I've had so far, does anyone have thoughts on what concepts I'm missing that either frequently are or should be in games?

Additionally, does anyone know of any games, computer or board games, which have used a particularly good and sensible formula for calculating hitChance and damage using similar inputs?
 

Archonon

Master Chief Petty Officer of Starfleet
Joined
13 Aug 2016
Messages
539
Age
46
Hello Shadow2Lead,

I don't know how this might factor into your calculations, given that they might just work out as sub-types of the categories you have already established, but I am playing a 4x game called Stellaris and one of their way of gauging weapons vs defense also employs that weapons perform better or worse depending on what type of defense the ships use.

IE. Ships that use shields have a higher resistance to energy weapons (Lasers, plasma, Disruptors, tachyon/neutron torpedoes, etc) but these ships are much more susceptible to kinetic weapons (Mass Drivers, Rail Guns, Autocannons, Flak, Point Defense, Kinetic Artillery, etc). Meanwhile ships that focus on beefing up armor can withstand kinetic weapons but are more susceptible to energy weapons. Ballistic weapons (Missiles, torpedoes) can go through both armor and shields but are slower and can be intercepted by Flak or Point Defense.

Again, I don't know if this will be able to give you any balance ideas, nor how the formulas themselves might be inputted, but I am balancing my own personal A2 mod based around these.
 

Shadow2Lead

Cadet Freshman
Joined
6 Sep 2019
Messages
4
Stellaris is a great game, been a few months since I've given it a go, definitely some relevant concepts. I think flak, like ECM, ends up being a category of evasion within the Armada 2 framework since short of using the nebulas point defense phaser (which is 100% effective so far as I know) the only ways we can effect one ship's DPS against another are hitChance and baseDamage. My dream mod for Armada 2 had always been an honorverse mod with missiles, point defense ecm, etc. While the point defense can mathematically be put in with evasion, it just wouldn't be satisfying.

Like you suggest right now I've got different armor values to match each type of weapon. I'm not sure I'll use them though. At the moment messing around with shotDelay, armor and armor piercing values have given me pretty decent distinctions between different weapons. Hardest thing at the moment looks like it'll be star Trek's frustrating tendency to give everything phasers and torpedos which will make it difficult to have ships feel like they have distinct roles while sticking to coherent rules for how weapons work.

In terms of formulas these are what I'm messing around with at the moment:

hitChance = accuracyValue * (1-evasionValue)
The actual Excel looks like this in a test document (in the actual one it's a bit more cluttered): =IF((ROUND(C7*(1-I7),2))>1,1,ROUND(C7*(1-$I$7),2))

damage = baseDmg * baseDmg/(baseDmg+armor-APValue)
I'm sure there's a cleaner way to work it, but here's the Excel atm: =ROUND((C4*C4/(C4+IF($I$5>=C6,$I$5-C6,0)))-(C4*C4/(C4+IF($I$5>=C6,$I$5-C6,0)))*$I$6,0)

Do you know how damage variance works in terms of if damage = 10 and the dmgVarience = 5 what's the likelihood that damage dealt will be 5, 7, 10, 15, etc? Is the distribution on any sort of curve?
 

Archonon

Master Chief Petty Officer of Starfleet
Joined
13 Aug 2016
Messages
539
Age
46
Hmm, I'm afraid that my general coding skills are rather limited. I have a ballpark sense of what each of those variances does, or at least what they are supposed to do (Cause let's face it, Armada tends to be somewhat wonky in how it systems supposedly work and how they actually work), but what I know of it is very general.

I use Westworld's big book of modding as my baseline guide and many will tell you that modding A2 evolved quite a bit since the publication of that guide. Also, I work with base A2, not Fleet Ops, which is another thing to consider; FO allows for many features that standard A2 doesn't have, and I know the damage and weapons systems is one of them.

I'm sorry I cannot be of greater help, if I find any information related to those variances, I'll post a followup.
 
Top