Details in combat die roll

Share scenarios and mods with other players here.
Post Reply
User avatar
Uxbridge
Posts: 1514
Joined: Sun Feb 08, 2004 6:16 pm
Location: Uppsala, Sweden

Details in combat die roll

Post by Uxbridge »

Anraz, Bleck!

In combat resolution, the defender rolls first ( A ) and get a percentage loss. Then the attacker rolls ( B ) and take his loss based on the roll and the defender's loss. Right?

My question now: is the attacker's loss based on the actual loss of the defender ( A ), or is it based on the loss the defender should have suffered if he rolled the same die as the attacker ( B )?

What I like to know is whether the attacker's loss is really connected to the defender's loss? As an example: if the attacker rolls a six, does the system check on the defender's result as if the defender had also rolled six, regardless of the defender's actual roll?

Hope I have made myself clear; this was not so easy to formulate in a comprehensive way. [8|]
User avatar
Bleck
Posts: 741
Joined: Sun Mar 08, 2009 1:35 pm
Location: Poland
Contact:

RE: Details in combat die roll

Post by Bleck »

My English isn't very good, so I will write it in pseudo-code, hope you will understand [;)]


column = attackerStrength / defenderStrength; // with clipping to range 1 to 7

defenderDice = Random(1, 6);
defenderLossFactor = DefenderLossFromCRT[defenderDice][column]; // % of strength to loss
....
defenderStrengthPointsLoss = defenderLossFactor * defenderMaxStrength;


attackerDice = Random(1, 6);
attackerLossFactor = AttackerLossFromCRT[attackerDice][column]; // loss factor in relation to defender loss
attackerLossFactor = attackerLossFactor * (LowestOf(100, defenderEffectiveness) / 100); // modifying attacker loss using defenders effectiveness
attackerStrengthPointsLoss = attackerLossFactor * defenderStrengthPointsLoss

then those values are multiplied with units possible max strength, current base strength etc. but I think that this is what you was asking for. Attacker's loss is based on the actual loss of the defender.
Wastelands Interactive member (Programmer)
User avatar
Uxbridge
Posts: 1514
Joined: Sun Feb 08, 2004 6:16 pm
Location: Uppsala, Sweden

RE: Details in combat die roll

Post by Uxbridge »

If your English is a bit rusty, that's nothing compared to my limitations in mathematics. I think I get it, but can't be sure.

So the attacker's loss is based on the defender's actual loss? This is good. But this gave birth to a new question. This line: defenderStrengthPointsLoss = defenderLossFactor * defenderMaxStrength seem to suggest that the defender's loss is a hypothetical one.

Statement:

( A ) If the defender has 100 % and takes a 70 % loss, he will lose 70 %, having 30 % left.
( B ) If the defender has 10 % and takes a 70 % loss, he can't lose more than 10 %, so he is gone and the remaining 60 % called for is simply lost.

Are these two statements true? If so, let's turn to the attacker.

A is fine, but let's look at B. Suppose that the attacker had 50 % at the beginning and was called upon to take a 200 % loss. Would he then take 200 % out of the actual defender's loss of 10 % (i.e. 20 % lost and 30 % remaining), or would it be 200 % out of the hypothetical 70 %, leading to a loss of 140 % and the attacker's annihilation?

Pardon for asking these weird questions, but with the die roll result of six back in the game after latest hotfix, I have noticed that the attacker sometimes evaporates (in my CRT, not the original one) and I'm trying to trace the source of that.
User avatar
Uxbridge
Posts: 1514
Joined: Sun Feb 08, 2004 6:16 pm
Location: Uppsala, Sweden

RE: Details in combat die roll

Post by Uxbridge »

Bump! [:)]
User avatar
Bleck
Posts: 741
Joined: Sun Mar 08, 2009 1:35 pm
Location: Poland
Contact:

RE: Details in combat die roll

Post by Bleck »

B is not true... before
defenderStrengthPointsLoss = defenderLossFactor * defenderMaxStrength;
there is
...
This means that there are some calculations too. To be specific, one of line says:

defenderLossFactor = defenderLossFactor * defenderCurrentStrengthPercentage
where ddefenderCurrentStrengthPercentage is a percentage of defenderMaxStrength so that
defenderCurrentStrengthPoints = defenderCurrentStrengthPercentage * defenderMaxStrength

So line:
defenderStrengthPointsLoss = defenderLossFactor * defenderMaxStrength
can be in fact written as:
defenderStrengthPointsLoss = defenderLossFactor * defenderCurrentStrengthPoints
Wastelands Interactive member (Programmer)
User avatar
Uxbridge
Posts: 1514
Joined: Sun Feb 08, 2004 6:16 pm
Location: Uppsala, Sweden

RE: Details in combat die roll

Post by Uxbridge »

Now, that sounds good. Then I don't have to do anything more with the CRT. Thank you.
Post Reply

Return to “Scenarios and Mods”