A good way of messure weapons against one another?

Started by Evul, July 13, 2014, 09:07:12 AM

Previous topic - Next topic

Evul

Hi I am trying to figure out a good way measure weapons and get a value were you can determine; is this weapon good or not.

The old system DPS (damage per second) were good but lacked some features. So I trying to make up a new system and need some help with this nice new mathematic equation.

One idea first of is combined all the accuracy values to one average value.
Then take in cussideration amount off bullets, time between bullets, damage per bullet, time between each burst, the average accuracy and last the bullet speed.

I will have a formula template in a tick I think.

Evul

warmupTicks + cooldownTicks = delayTime
accuracyTouch + accuracyShort + accuracyMedium + accuracyLong = averageAccuracy

(Damage * burstShotCount) / ticksBetweenBurstShots = damagePerBulletTime

range

This is what I'm working with so far.

erdrik

Im pretty new here so Im not sure if this has been answered before, but:

What ranges(numerically) do the four accuracy variables represent?
Are they a fixed range or are they percentages of the weapons max range?
I ask because if they are fixed it would be possible to have a weapon that has a max range that doesn't
include one or more of the longer accuracy variables.
(or a min range that pushes into one or more of the shorter accuracy variables, in the case of artillery)
Which could skew the DPS calculation if that accuracy variable isn't set to 0/not included in the calculation.

Evul

The range number represent:
4+, 15+, 30+ and 50+ squares.
The max range is set in the gun file at the range parameter. so it can be 0 to infinite.

Here is how the weapon code looks like had it easy at hand :P:
<?xml version="1.0" encoding="utf-8" ?>
<ThingDefs>

<!--
PROJECT ARMORY WEAPON

CODE AUTHOR: Evul
TEXTURE MAKER: Evul

USER LICENSE:
All weapons texture and code may be altered to the users
liking to fit the world the user wants to create.
You may add or remove weapons of your downloaded
Project Armory Pack to further more customize your world.
You are also allowed to publish Project Armory weapons
in your own modpack or mod. The only thing we ask for
is that you link to our forum page so people that like
the weapons can download more of them.
-->

<ThingDef Name="BaseGun" Abstract="True">
<category>Item</category>
<eType>Equipment</eType>
<thingClass>Equipment</thingClass>
<label>Gun</label>
<equipmentType>Primary</equipmentType>
<isGun>True</isGun>
<pathCost>10</pathCost>
<useStandardHealth>True</useStandardHealth>
<selectable>True</selectable>
<maxHealth>100</maxHealth>
<altitudeLayer>Item</altitudeLayer>
<alwaysHaulable>True</alwaysHaulable>
<tickerType>Never</tickerType>
<techLevel>Midworld</techLevel>
<storeCategories>
<li>Weapons</li>
</storeCategories>
<weaponTags>
<li>Gun</li>
</weaponTags>
<comps>
<li>
<compClass>CompForbiddable</compClass>
</li>
</comps>
<verb>
<category>Nonnative</category>
<verbClass>Verb_Shoot</verbClass>
<cooldownTicks>40</cooldownTicks>
<label>VerbGun</label>
<description>Fire a bullet.</description>
<hasStandardCommand>true</hasStandardCommand>
<targetParams>
<canTargetPawns>true</canTargetPawns>
<canTargetBuildings>true</canTargetBuildings>
<worldObjectTargetsMustBeAutoAttackable>true</worldObjectTargetsMustBeAutoAttackable>
</targetParams>
<canMiss>true</canMiss>
</verb>
</ThingDef>

<ThingDef Name="BaseBullet" Abstract="True">
<category>Projectile</category>
<tickerType>Normal</tickerType>
<altitudeLayer>Projectile</altitudeLayer>
<thingClass>Bullet</thingClass>
<label>Bullet</label>
<useStandardHealth>False</useStandardHealth>
<neverMultiSelect>True</neverMultiSelect>
<baseMaterialType>Transparent</baseMaterialType>
</ThingDef>

<!-- ============================================================== -->

<ThingDef ParentName="BaseBullet">
<defName>Bullet_AK47C</defName>
<label>7,62x39mm M43/M67</label>
<texturePath>Things/Projectile/Bullet_Big</texturePath>
<projectile>
<damageDef>Bullet</damageDef>
<DamageAmountBase>8</DamageAmountBase>
<Speed>70</Speed>
</projectile>
</ThingDef>

<ThingDef ParentName="BaseGun">
<defName>Gun_AK47_wea</defName>
<label>AK-47</label>
<description> The AK-47 is a selective-fire, gas-operated 7.62�39mm assault rifle, first developed in the Soviet Union by Mikhail Kalashnikov. It is officially known as Avtomat Kalashnikova (Russian: Автомат Калашникова).</description>
<texturePath>Things/Item/PAEquipment/Gun_AK47</texturePath>
<soundInteract>InteractRifle</soundInteract>
<tradersCarry>True</tradersCarry>
<basePrice>120</basePrice>
<verb>
<projectileDef>Bullet_AK47C</projectileDef>
<warmupTicks>110</warmupTicks>
<range>32</range>
<accuracyTouch>0.95</accuracyTouch>
<accuracyShort>0.83</accuracyShort>
<accuracyMedium>0.68</accuracyMedium>
<accuracyLong>0.53</accuracyLong>
<burstShotCount>3</burstShotCount>
<ticksBetweenBurstShots>8</ticksBetweenBurstShots>
<fireSound>ShotM16Rifle</fireSound>
</verb>
</ThingDef>
</ThingDefs>


The values that is important is in making a weapon estimation:
warmupTicks, cooldownTicks accuracyTouch, accuracyShort, accuracyMedium, accuracyLong, Damage, burstShotCount, ticksBetweenBurstShots and range.

DPS use this formula:
DPS = ( Damage * bullets_per _burst ) / aim_time
aim_time = warmupTicks / 60 seconds

But DPS does not take in consideration bullet speed and accuracy.

EDIT: DPS does not work on hand grenades and mortars cause they have explosion damage.

mrofa

DPS dont take accuracy in accout at all so you shouldnt be bothered by it.
As for bullet speed just get normal dps*bullet speed.
Explosion do 65 dmg to unarmored target like muffalo :D
So you can count that in your dps.
Thats the dmg info from explode class.
if (this.dinfo.Def == DamageTypeDefOf.Bomb)
{
this.dinfo = new DamageInfo(DamageTypeDefOf.Bomb, 65, this.dinfo.Instigator);
}
if (this.dinfo.Def == DamageTypeDefOf.Flame)
{
this.dinfo = new DamageInfo(DamageTypeDefOf.Flame, 10, this.dinfo.Instigator);
}
if (this.dinfo.Def == DamageTypeDefOf.Stun)
{
this.dinfo = new DamageInfo(DamageTypeDefOf.Stun, 35, this.dinfo.Instigator);
All i do is clutter all around.

Gabriel_Braun

#5
DPS/Mean accuracy as bullet speed is not relevant to damage calculations as Tynan stated when he answered my request for actual damage calculations...   hang on and I'll link his reply here


Edit-  Here's the full thread dude:  http://ludeon.com/forums/index.php?topic=4547.0

mrofa

Hmm you might be right.
So here is my suggestion:
DPS = ((Damage * bullets_per_burst) /(ticksBetweenBurstShots/60))/(warmup_tick/60)

All i do is clutter all around.

RawCode

best method to test DPS is emulation of attack inside test container.

you fetch type of gun, and execute it's "fire" method inside testing conditions and measure damage and other stuff.

this can be usefull to get "real" results, like how much damage gun x in hands of zero pawn will deal over 60 seconds at 20 distance.

then you can compare your methods to "real" result - tweak or change them to follow rules.

Evul

Processing... Have not forgotten this thread....