Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411507 Posts in 69374 Topics- by 58429 Members - Latest Member: Alternalo

April 26, 2024, 12:22:41 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperDesignHow should armoured units and armour piecing weapons interact?
Pages: [1]
Print
Author Topic: How should armoured units and armour piecing weapons interact?  (Read 745 times)
Kerndog73
Level 0
**



View Profile
« on: April 17, 2018, 11:26:18 PM »

I'm creating a tower defence game.

The towers have damage and armour piecing. The units have health and armour. What I would like to know is how these properties should interact to create fun and fair gameplay.

My initial thoughts were that armour piecing should be the percent of damage that is dealt to health with the rest of the damage being dealt to armour. If there is no armour then all of the damage is dealt to health.

Code:
healthDamage = damage * armourPiecing
armourDamage = damage * (1 - armourPiecing)
leftoverDamage = max(0, armourDamage - armour)
healthChange = -leftoverDamage - healthDamage
armourChange = leftoverDamage - armourDamage

Is this a good way of modelling armour? I'd really like something that is easy to describe to the player and something that is fair. I want the player to make decisions based on the armour piecing of the towers and the armour of the units.

I'd really like someone else's opinion on this.
« Last Edit: April 17, 2018, 11:44:35 PM by Kerndog73 » Logged
CodeLobe
Level 0
***


Decide to Act Sensibly


View Profile WWW
« Reply #1 on: April 20, 2018, 11:49:14 AM »

Well, you didn't give me input ranges for your stats or the armorPiercing var, so I'm assuming a health potion is simply negative damage and a Hi Potion has a armor piercing damage below -10?  Does your piercing stat range from 0 to 1 as a float or are we talking integers here.  Sorry, when you post stat mechanics you really need to provide ranges, or at least examples of the calculation for a few units. 

Health damage, IMO is the sum of overall damage.  Piercing would be different from generic damage as it would eliminate some of the protection provided by the armor and the armor would absorb part of the piercing damage.  Consider the armor as a "unit" that can take damage and any damage it does not fully absorb is passed on to the thing being shielded.  Armor piercing does less damage to the armor and thus passes through to the unit it's protecting.

Let's say you have a wooden shield and I blast it with a shotgun from 60ft (20m) it's going to absorb pretty much all of that blast (unless pellets miss the shield) and maybe you'll get a sore or stunned arm due to the pressure (blunt trauma) of the impact, but the pellets probably will probably not pierce the shield (unless I've got a slug loaded, or really big balls).  The end result should be light damage or perhaps just a stun if your constitution (physical fortitude) is high enough to shake off the blow to your shield, i.e., your shield took some damage to its armor and you suffered mild blunt force. 

Now consider if I shoot your wooden shield with a single 9mm AP round from 30ft (10m).  So long as I don't miss my target that bullet is most likely going through the wooden (or thin metal) shield and striking you.  The armor will only lessen the health damage slightly.  Imagine you were almost dead, at 1 health unit, and you had a brand spanking new wooden shield, dragged a piece of plywood over you.  Even though the shield is still relatively undamaged, you are dead as a doornail now that the 9mm AP round hit you.  (in reality, you'd have a larger chance of dying being stabbed by a kitchen knife than that 9mm, since most bullets kill by making you bleed, and knifes are better at that... lookup some FBI injury/fatality stats and see.)

When all else fails, go read some paper and dice role playing games.  We've been modeling damage with dice for many decades now, longer than you've probably been alive.  So, don't be ashamed to go read how the masters made it work simply enough for humans to calculate damage on the fly.

Dungeons & Dragons uses a hit/miss system with Armor Class & THACO stat (To Hit Armor Class Zero).  The Armor Class and THACO are combined and a D20 is rolled to see if an attack hits.  This means if something is armored enough you just don't hit them.  IMO, too simplistic for my tastes and doesn't pass the smell test above.  Replace Shotgun with barrage of rocks from slings and 9mm with steel tipped arrow fired from a high powered crossbow at close range.  Because it's a fantasy setting without many high velocity bullets that can pierce armor their system usually works because an arrow is usually going to be deflected or embedded in even a shitty wooden shield if the armor takes the blow.  But, IMO, D&D fails when you add rifles, tanks, or orbital ion canons...

Shadowrun has a somewhat controversial damage system, but I like it.  Rifts (not the video game, the Palladium game) has a good general purpose damage system since portals open to worlds in the past and future and other dimensions, so you can have a Mage & Barbarian from D&D pop in right next to kids piloting Giant Mecha power armor suits, and Rifts can handle that (provided you follow the conversion charts).  Gurps is even more general purpose.  Some of my favorite systems are very simple and from niche games. Many PDFs can be found online if you [redacted].

(we actually used to play HōL: Human Occupied Landfill back in the day, it was great fun if your troop had a good sense of humor, but won't help you much in the way of damage systems, but might expand your creative potential, so I'm mentioning it here since it spits in the eye of most "conventional" RPGs [and damage systems]).

I'm going to asume armourPiercing is Zero to One (since it kind of makes sense from your code).  This seems OK-ish, but consider the capability where the armor absorbs all damage AND the unit takes some damage of another type.  Armor can be seen as a "damage converter"...  Converting shotgun blasts into blunt trauma, or reducing piercing damage.

In other words, you can have a Rock Paper Scissors style setup with different types of armor, speed of movement & attack, etc. stats.  A look up table of different kinds of damage types is frequently used in more complex systems.

Of course these are all just suggestions to get you thinking around corners of the box.  The real answer is to play test it and see (this is always the answer to questions such as these).   
Logged
Kerndog73
Level 0
**



View Profile
« Reply #2 on: April 20, 2018, 07:28:42 PM »

Thanks for the advice CodeLobe! Smiley

That really got me thinking about armour. I think I'll test a few of your suggestions and see what works best.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic