View Single Post
Unread 16 May 2003, 14:56   #5
Tactitus
Klaatu barada nikto
 
Tactitus's Avatar
 
Join Date: Mar 2000
Location: St. Paul, Minnesota
Posts: 3,237
Tactitus spreads love and joy to the forum in the same way Jesus wouldTactitus spreads love and joy to the forum in the same way Jesus wouldTactitus spreads love and joy to the forum in the same way Jesus wouldTactitus spreads love and joy to the forum in the same way Jesus wouldTactitus spreads love and joy to the forum in the same way Jesus wouldTactitus spreads love and joy to the forum in the same way Jesus wouldTactitus spreads love and joy to the forum in the same way Jesus wouldTactitus spreads love and joy to the forum in the same way Jesus wouldTactitus spreads love and joy to the forum in the same way Jesus wouldTactitus spreads love and joy to the forum in the same way Jesus wouldTactitus spreads love and joy to the forum in the same way Jesus would
Exclamation Re: A Request for Help...

Quote:
Originally posted by Ultimate Newbie
hiyas

I have finally decided to bite the bullet and design some unit matricies for my ship stats (most recent version that is uploaded is at: http://home.iprimus.com.au/rourkek/Production46.html ).

As i am simply a formula junkie and not a mathmatician (i am actually failing my maths at school, though i am getting A's & B's in all my other subjects... go figure :\) Would it be possible for somone / many people to give the following formulae:

1) A Formula that displays how many resources of attacker it takes to kill 1 resource of defender using conventional weapons.
Let wts be the weapon targeting speed of the attacking unit.
Let agility be the agility of the defending unit.
Let armor be the defending unit's armor.
Let power be the gun power of the attacking unit.
Let hitprob be the probability of an attacking shot hitting the defending unit.
Let hts2kll be the number of successful shots required to kill the defending unit (on average).
Let shts2kl be the total number of shots (counting hits and misses) to kill the defending unit (on average).
Let ships be the total number of ships required to kill the defending unit (on average).

Code:
hitprob = (25.0 + wts - agility) / 100.0
hts2kll = ceil(armor / power)
shts2kl = ceil(hts2kll / hitprob);
ships   = shts2kl / guns;

Note: the ceil function takes the ceiling of a number; that is, the smallest integer greater than or equal to the number.
This gives you how many attacking ship(s) to kill 1 defending ship, on average (e.g., 1.75 attacking ships to kill 1 defending ship).

From there, you can calculate costs. If you want the cost to kill 1 ship, then multiply ships by their cost (e.g., 1.75 ships times 4000 resources yields 7000 resources per kill). If you want to normalize by resources, then divide that by the cost of the defending ship (e.g., if each defending ship costs 2000 resources then 7000/2000 = 3.5 attacking resources required to kill 1 defending resource).
Quote:
2) A Formula that displays how many resources of attacker it takes to kill 1 resource of defender using EMP weapons.
I presume you mean freeze? EMP is much easier:

Let empr be the EMP resistance of the defending ship.
Let guns be the number of EMP guns on the attacking ship.
Code:
ships = (100.0 / (100.0 - empr)) / guns
This gives you the number of ships to freeze 1 defending ship, on average (typically, this will be less than 1--e.g., 0.4 ships needed to freeze 1 ship). From there, proceed as above.

You can see some coded examples (in C) in my unit table generator:

http://www.geocities.com/Tactitus2000/PA/tables.c
__________________
The Ottawa Citizen and Southam News wish to apologize for our apology to Mark Steyn, published Oct. 22. In correcting the incorrect statements about Mr. Steyn published Oct. 15, we incorrectly published the incorrect correction. We accept and regret that our original regrets were unacceptable and we apologize to Mr. Steyn for any distress caused by our previous apology.
Tactitus is offline   Reply With Quote