How does combat work?

4X strategy game from Proxy Studios

Moderators: Pandora Moderators, Slitherine Core

Post Reply
Stalker0
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 38
Joined: Sun May 04, 2014 11:40 pm

How does combat work?

Post by Stalker0 » Thu May 29, 2014 12:23 am

I think I understand the high levels of combat, but I am looking for the nitty gritty details. How is damage calculated, how does that damage adjust health (and subsequent strength), how are win rates determined, etc

Zak0r
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 188
Joined: Sat Jan 25, 2014 1:21 pm

Re: How does combat work?

Post by Zak0r » Sat May 31, 2014 8:47 am

1. You have a base unit strength: unit type + armor + strength bonus or malus from weapon + (attack or defensive mod) + experience lvl + (faction bonus for empire 25%) + tech bonuses (e.g. aspidoch tech, telepathy etc.)

2. It get's modified by terrain (forest, mountain 25% for infantry (additional 25% if you have implemented guerilla warfare), -25% for mech units; plains 25% for mech units, -25% for infantry; 25% for aircraft when attacking units on plains; infantry gets 25% in city defense; also city defense from buildings - only counts when defending!)

3. It get's modified by flanking bonus (25% simple flanking - two units flanking with at least 1 space between them, 50% surrounded flanking - 3 units flanking, like the radioactive warning sign; the defender can have the bonus too!)

4. When attacking, each involved unit get's the bonus or malus from the tile it is currently on (+ aircraft attacking plains bonus) and the strength is calculated. Also don't forget the faction bonus for attacking (divine ascension) or the 25% malus (terra salvum)

5. Also the weapon types and the unit types come into play. Depending on them the involved units can get a bonus or a malus. There are biological units, mechanical units and both small or big units from both types, so you can have small bio, big bio, small mech and big mech units. There are weapons that are good against one or sometimes two types (+25%, or 50% e.g. cannon against big mech units yields 50% - 25% for mech and 25% for big) and obviously have a malus against others. Lasers and artillery are alround weapons.

(From here on my post is based more experience than actually knowing the code for sure, maybe the developers can confirm or correct)

6. The strenght of both units is set against each other. The stronger unit wins and the loser dies.

7.The winner get's damaged for the amount of strenght the loser has had in that battle modified by point 8.(?).

8. There is a random element, let's call it luck in battle. I have not tested it thorougly but my experience says it is something like +-25% strength

9. The winner can also die if the battle was very close and he has no preemptive strike computer mod. This can happen when the calculated expected damage (from the mouseover information) is between 75% and 100%. My guess is that this is the random element of up to 25% battle luck in each direction that gets counted in after the winner was already determined by calculating points 1.-5.

SephiRok
Proxy Studios
Proxy Studios
Posts: 1024
Joined: Thu Jul 19, 2012 10:19 am
Contact:

Re: How does combat work?

Post by SephiRok » Sat May 31, 2014 11:54 am

Zak0r is correct. Additionally the modifiers he mentioned are additive.

The random factor is indeed +-25% to the attacker's resulting power for the battle after all other modifiers are added. This one is multiplicative.

The winner (any unit at any time) dies if his base power (the one above the unit on the map) goes below 0.1.

Here are the gritty details: http://privatepaste.com/65f93e25ac
Rok Breulj
Designer and Programmer
Proxy Studios

Zak0r
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 188
Joined: Sat Jan 25, 2014 1:21 pm

Re: How does combat work?

Post by Zak0r » Sat May 31, 2014 1:08 pm

yay, now I'm a little bit proud. :mrgreen:

Stalker0
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 38
Joined: Sun May 04, 2014 11:40 pm

Re: How does combat work?

Post by Stalker0 » Sat May 31, 2014 3:37 pm

Ok, everything Zakor says tracks with what I thought, I didn't know what the random factor was though, great to know!

I wanted to check an example to ensure I am on the right page.

1) I have a 4 strength unit with a +50% bonus for factors vs a strength 2 unit (no bonuses).

So the combat is 4*(1+.5) = 6 vs 2. We will say the random modifier was right on the money. The defender takes 6 damage (and dies). The attacker took 2 damage, resulting in 4 strength remaining.

2) The attacker then loses his +50% bonus as he moves elsewhere, so his strength is now 4 / (1.5) = 2.6667


Is that right?

SephiRok
Proxy Studios
Proxy Studios
Posts: 1024
Joined: Thu Jul 19, 2012 10:19 am
Contact:

Re: How does combat work?

Post by SephiRok » Sat May 31, 2014 3:48 pm

Correct!
Rok Breulj
Designer and Programmer
Proxy Studios

Post Reply

Return to “Pandora - First Contact”