View Single Post
Unread 6 Dec 2006, 14:58   #19
-Blue Moon-
Hello Tietäjä
 
-Blue Moon-'s Avatar
 
Join Date: Jan 2002
Location: Preston, UK
Posts: 290
-Blue Moon- has a brilliant future-Blue Moon- has a brilliant future-Blue Moon- has a brilliant future-Blue Moon- has a brilliant future-Blue Moon- has a brilliant future-Blue Moon- has a brilliant future-Blue Moon- has a brilliant future-Blue Moon- has a brilliant future-Blue Moon- has a brilliant future-Blue Moon- has a brilliant future-Blue Moon- has a brilliant future
Lightbulb Re: 'Fix' the combat engine its damage distribution

Quote:
Originally Posted by Appocomaster
I thought the point of the differences in prices was that it was easier to flak.
There's three basic ways to allocate damage where there's more than one ship type present in combat:
by relative number of the different ships (which is what it is currently)
by relative value, and by relative armour.

Which would be preferable?
If someone's willing to explain a system that's related to what Sov suggested above, I'm willing to attempt to code it. :-)
Of the three I vote value.
Simply because a ship's value comes from its cost, and the costs are generally a better representation of 'danger'

The following explanation is understandably very confusing and complex -- Appocomaster SHOULD be able to follow it, and if he's interested he knows how to contact me/introduce it.

For the rest of you :

It deals damage to the ships based on their value, but if the damage dealt is greater than the armour available to reduce by, the excess damage is moved to a new variable named 'unused' and this 'unused' potential is used on the next ship etc... going down through every intiative, updating throughout!

-tuxed0



Through a coding perspective:
(in this example all 3 ships are imaginary, all are the same class and target the same target (themselves))

=sum(cumulative armour of ships attacking)
e.g. 1000 ship2(5arm-1dmg-init2)
9000 ship1(2arm-2dmg-init3)
(9000*2 + 1000*5) = 23,000

=sum(cumulative armour of ships defending)
e.g. 1000 ship1(2arm-1dmg-init2)
2000 ship3(3arm-3dmg-init1)
(1000*2 + 2000*3) = 8,000

=sum(individual armour of ships attacking)
e.g. 9000 ship1(2arm-1dmg-init2) = 9000*2 = 18,000
1000 ship2(5arm-2dmg-init3) = 1000*5 = 5,000


=sum(individual armour of ships defending)
e.g. 1000 ship1(2arm-1dmg-init2) = 1000*2 = 2,000
2000 ship3(3arm-6dmg-init1) = 2000*3 = 6,000

(giving...)


Then by initiative...
Init 1
=sum(cumulative damage dealt by attackers)
Attackers init 1 = None

=sum(cumulative damage dealt by defenders)
e.g. Defenders init 1 = Yes (ship3)
2000 x ship3 (6dmg)=2000*6= 12,000

=sum(value attacking per ship at this initiative remaining)
e.g. 9000 ship1(value=2) || 1000 ship2(value=4)
(9000*2 + 1000*4) = 22,000

=sum(value defending per ship at this initiative remaining)
e.g. 1000 ship1(value=2) || 2000 ship3(value=6)
(1000*2 + 2000*6) = 14,000

=percentage per ship of value attacking/defending
Attack:
ship1=18,000/22,000=82%
ship2=4,000/22,000=18%
Defence:
ship1=2,000/14,000=14%
ship3=12,000/14,000=86%

=armor loss = (%age of value this init * defender damage dealt this init)
e.g. No defender is hit

=armor loss if statements= (%age of value this init * defender damage dealt this init)
unused = 0

9,000 x ship1 = 82% || 82% of 12,000 = 9,840 damage dealt
9,000 x ship1 = 9,000 armour
=if damage dealt > armour available
difference = 9,840 - 9,000 = 840 (true)
=true -- if(difference>0) (840) add to 'unused'
e.g. unused = 0 + 840 = 840
ship1=0

=false -- (individual ship1 armour - damage dealt)/ship1 armour stat


1,000 x ship2 = 18% || 18% of 12,000 = 2,160 damage dealt + unused
= 2,160 + 840 = 3,000 damage dealt
unused = unused - 840 (just redistributed) = 0
1,000 x ship2 = 5,000 armour
=if damage dealt > armour available
difference = 3,000 - 5,000 = -2000 (false)
=true -- if(difference>0) (0) add to 'unused'
=false -- (individualship1 armour - damage dealt)/ship1 armour stats
e.g. (5000 - 3000) = 2000
2000 / 5 = 400 remain

Ship Renumerations:
Attack:
Was & Now:
Was: 9,000 ship1 ||| Now: 0
Was: 1,000 ship2 ||| Now: 400

Defence:
Was & Now:
Was: 1,000 ship1 ||| Now: 1,000
Was: 2,000 ship3 ||| Now: 2,000



(continuing per initiative with newest values referred to...)

- tuxed0
__________________
-Blue Moon- aka LordQuashi, Behert, BeherTux, BT, TuxedoMask, tuxed0

R1-2 [VanX] - R3 [Legion] - R4 [Legion/Shogun/FORT] - R5-6 [WP/Shogun/FORT] - R7-8 [VsN] - R9-R9.5 [Seraphim/VsN]- R10-12 [WP] R13 [1up/eXilition] R14 [Orbit/scanner] R15 [eXilition] R16 [Orbit/scanner] R17 [Subh/scanner] R18 [eXilition] R19 [F-Crew/scanner] R20 [Orbit/Destiny/scanner] R21-22 [Orbit/scanner] R23-25 [In-gal-def-ho]
-Blue Moon- is offline   Reply With Quote