Falagor
Stalker
- Joined
- Feb 13, 2008
- Posts
- 2,472
- Location
- Poland
- Society
- NBK Rangers
- Avatar Name
- Falagor Falagor Frostmaster
@edit:
i have the questions answered and i think formula verified .
@/edit:
Hello,
i am currently working on tool that will help calculating economy and dps of weapon setups. Here is snapshot of the app:
It is obviously in alpha stage and i am not yet sure if i will make it for public use.
I am fully aware that on Entropedia.info there is weapon compare tool but it lacks few game mechanincs recently added (mostly connected with buffs from rings/scopes/sight/amps/pills). So it can't show full picture of eco and dps and those new mechanincs can raise up eco a lot (something that is worth underlining if you do not know this yet). And since there is no admin at Entropedia.info i doubt there will be any update there that will include necesery changes.
So back on main topic:
i guess most people know basic formula for calculating eco and dps without using all the fancy extra items.
It looks like this (for maxed weapons):
dps = (max_dmg * 0.75 * 0.9 + max_dmg * 0.02) * (att_per_min / 60)
eco = (max_dmg * 0.75 * 0.9 + max_dmg * 0.02) / (total_cost)
There is no magic in here, right?
Now i have already implemented some calulations for all the necesery mechanincs and will describe the whole formula below - so if you are NOT interested or just do not want to parse all the formulas - just skip it to near the end ...
...
...
...
Ok - if you are still reading then you are the one of the few geeks that ARE interested. My question to you is: if all the mechanics described below are correct or mayby i missed something and the formula is wrong and needs correction.
Here are my main formulas for eco and dps that include all the fancy mechanics (i am pasting part of the code since i asume people who are still reading have some programming knowledge. I am not changing any value names since i may miss one place and not change it there and it will bring a lot of confusion). I did "split" the code on dps and eco counting so it is easier to read and understand whats going on :
Ok so first things first:
- my_settings.Ammount_accuracy, my_settings.Ammount_damage, my_settings.Ammount_economy - this is the number of accuracy/damage/economy enhancer slot used (from 0 to 10).
- weapon_max_dmg, weapon_decay, weapon_amo and amp_max_dmg, amp_decay, amp_amo - i distinguish those two value sets because damage enhancer only increase dmg and cost of the weapon and not the amp. Also amp_max_dmg is limited by weapon_max_dmg so its secondary reason to not merge those two value sets in one.
- buff_crit_rate_actual - this is value taken from the Min(totals and totals_limit) (see picture). So in case totals will exceed 10% (maximum limit for totals in crit rate buff) - then 10% will be taken. In simple words - its actual buff on the critical rate.
- buff_crit_damage_actual and buff_reload_actual - similar meaning to buff_crit_rate_actual but for critical_damage and reload actual buffs acordingly.
At this point we can analyse the dps formula (more simple than eco in my opinion):
In first brakets there is total damage done per one shot on average. It does include the 90% hit rate, 2% base crit rate and of course crit modifications both on crit damage and crit rate.
In snd brakets (after "*") there is scaling the damge calulated on one shot - to damage done per second. So it is scale by nr of attacks per minute with reload buff modification.
Ok this is rather still simple and i think it is correct formula.
Now lets go to the harder part of calculating eco :
First braket is exactly same as before - since it is average damage done per one shot.
Second braket - well its total cost.
This is where i am using the "wierd": pill_avg_cost_per_shot, accu_avg_cost_per_shot, dmg_avg_cost_per_shot, eco_avg_cost_per_shot (along with normal decay, amo and scope/sights per shot costs which are obvious to understand).
So for pills - it is scaled cost per one shot considering you will be shooting 100% time (i know it should be somehting mayby like 90% but thats not important atm). Will remind the code part responsible for this:
So it is based on cost of pill, time on the pill, and attack speed of the weapon (with reaload speed modification).
The idea for scaling enhancers cost to one shot is very similar (but of course based on something else). Code reminder:
So its based on the nr of shots to break one enhancer per shot, amount of enh attached and markup of enhancers (notice that nr of shots to break one enhancer per shot is different for EVERY weapon and is not static value like many people think - of course only way to measure this is by doing like 100k shots with the gun - so its part of the database).
I know that rings will decay in future so i will adjust the app when they do (will look similar to including cost of pill).
So now if you are still reading - my main question is:
Is my thinking logic and calulations on including cost to use pills and enhancers correct?
(side question - if everythign else is ok too )?)
---------------
If you have other comments about my soft (i.e. whats good and whats bad?) or you feel like discusing eco or dps calulations - feel free to do so .
Falagor
i have the questions answered and i think formula verified .
@/edit:
Hello,
i am currently working on tool that will help calculating economy and dps of weapon setups. Here is snapshot of the app:
It is obviously in alpha stage and i am not yet sure if i will make it for public use.
I am fully aware that on Entropedia.info there is weapon compare tool but it lacks few game mechanincs recently added (mostly connected with buffs from rings/scopes/sight/amps/pills). So it can't show full picture of eco and dps and those new mechanincs can raise up eco a lot (something that is worth underlining if you do not know this yet). And since there is no admin at Entropedia.info i doubt there will be any update there that will include necesery changes.
So back on main topic:
i guess most people know basic formula for calculating eco and dps without using all the fancy extra items.
It looks like this (for maxed weapons):
dps = (max_dmg * 0.75 * 0.9 + max_dmg * 0.02) * (att_per_min / 60)
eco = (max_dmg * 0.75 * 0.9 + max_dmg * 0.02) / (total_cost)
There is no magic in here, right?
Now i have already implemented some calulations for all the necesery mechanincs and will describe the whole formula below - so if you are NOT interested or just do not want to parse all the formulas - just skip it to near the end ...
...
...
...
Ok - if you are still reading then you are the one of the few geeks that ARE interested. My question to you is: if all the mechanics described below are correct or mayby i missed something and the formula is wrong and needs correction.
Here are my main formulas for eco and dps that include all the fancy mechanics (i am pasting part of the code since i asume people who are still reading have some programming knowledge. I am not changing any value names since i may miss one place and not change it there and it will bring a lot of confusion). I did "split" the code on dps and eco counting so it is easier to read and understand whats going on :
Code:
weapon_max_dmg = main_dataset.Weapon.FindByName(comboBox_weapon.Text).Max_damage * (1 + 0.1*my_settings.Ammount_damage);
weapon_decay = System.Math.Round(main_dataset.Weapon.FindByName(comboBox_weapon.Text).Decay * (1 + 0.1 * my_settings.Ammount_damage) * (1 - 0.01 * my_settings.Ammount_economy), 5);
weapon_amo = System.Math.Round(main_dataset.Weapon.FindByName(comboBox_weapon.Text).Amo * (1 + 0.1 * my_settings.Ammount_damage) * (1 - 0.01 * my_settings.Ammount_economy), 0);
weapon_attack_per_min = main_dataset.Weapon.FindByName(comboBox_weapon.Text).Attack_per_min;
amp_max_dmg = System.Math.Min(main_dataset.Amp.FindByName(comboBox_amp.Text).Max_damage, main_dataset.Weapon.FindByName(comboBox_weapon.Text).Max_damage / 2);
amp_decay = main_dataset.Amp.FindByName(comboBox_amp.Text).Decay;
amp_amo = main_dataset.Amp.FindByName(comboBox_amp.Text).Amo;
double scope_decay = main_dataset.Scope.FindByName(comboBox_scope.Text).Decay;
double sight1_decay = main_dataset.Sight.FindByName(comboBox_sight1.Text).Decay;
double sight2_decay = main_dataset.Sight.FindByName(comboBox_sight2.Text).Decay;
double pill_avg_cost_per_shot = main_dataset.Pill.FindByName(comboBox_pill.Text).Cost * (60.0 / (main_dataset.Pill.FindByName(comboBox_pill.Text).Time)) /
(weapon_attack_per_min * (1 + buff_reload_actual/100));
double accu_avg_cost_per_shot = (1.0 / main_dataset.Weapon.FindByName(comboBox_weapon.Text).Nr_of_shots_to_break_enh)
* my_settings.Ammount_accuracy * 0.4 * my_settings.Markup_accuracy;
double dmg_avg_cost_per_shot = (1.0 / main_dataset.Weapon.FindByName(comboBox_weapon.Text).Nr_of_shots_to_break_enh)
* my_settings.Ammount_damage * 0.4 * my_settings.Markup_damage;
double eco_avg_cost_per_shot = (1.0 / main_dataset.Weapon.FindByName(comboBox_weapon.Text).Nr_of_shots_to_break_enh)
* my_settings.Ammount_economy * 0.4 * my_settings.Markup_economy;
double eco;
double dps;
dps =
(
(weapon_max_dmg + amp_max_dmg) * 0.75 * 0.9 +
(weapon_max_dmg + amp_max_dmg) * (0.02 + (buff_crit_rate_actual/100) + (0.004*my_settings.Ammount_accuracy)) * (1 + buff_crit_damage_actual/100)
)
* (weapon_attack_per_min * (1 + buff_reload_actual / 100) / 60);
eco =
(
(weapon_max_dmg + amp_max_dmg) * 0.75 * 0.9 +
(weapon_max_dmg + amp_max_dmg) * (0.02 + (buff_crit_rate_actual / 100) + (0.004 * my_settings.Ammount_accuracy)) * (1 + buff_crit_damage_actual / 100)
)
/
(
weapon_decay + (weapon_amo / 100) + amp_decay + (amp_amo / 100) + scope_decay + sight1_decay + sight2_decay + pill_avg_cost_per_shot +
accu_avg_cost_per_shot + dmg_avg_cost_per_shot + eco_avg_cost_per_shot
);
Ok so first things first:
- my_settings.Ammount_accuracy, my_settings.Ammount_damage, my_settings.Ammount_economy - this is the number of accuracy/damage/economy enhancer slot used (from 0 to 10).
- weapon_max_dmg, weapon_decay, weapon_amo and amp_max_dmg, amp_decay, amp_amo - i distinguish those two value sets because damage enhancer only increase dmg and cost of the weapon and not the amp. Also amp_max_dmg is limited by weapon_max_dmg so its secondary reason to not merge those two value sets in one.
- buff_crit_rate_actual - this is value taken from the Min(totals and totals_limit) (see picture). So in case totals will exceed 10% (maximum limit for totals in crit rate buff) - then 10% will be taken. In simple words - its actual buff on the critical rate.
- buff_crit_damage_actual and buff_reload_actual - similar meaning to buff_crit_rate_actual but for critical_damage and reload actual buffs acordingly.
At this point we can analyse the dps formula (more simple than eco in my opinion):
In first brakets there is total damage done per one shot on average. It does include the 90% hit rate, 2% base crit rate and of course crit modifications both on crit damage and crit rate.
In snd brakets (after "*") there is scaling the damge calulated on one shot - to damage done per second. So it is scale by nr of attacks per minute with reload buff modification.
Ok this is rather still simple and i think it is correct formula.
Now lets go to the harder part of calculating eco :
First braket is exactly same as before - since it is average damage done per one shot.
Second braket - well its total cost.
This is where i am using the "wierd": pill_avg_cost_per_shot, accu_avg_cost_per_shot, dmg_avg_cost_per_shot, eco_avg_cost_per_shot (along with normal decay, amo and scope/sights per shot costs which are obvious to understand).
So for pills - it is scaled cost per one shot considering you will be shooting 100% time (i know it should be somehting mayby like 90% but thats not important atm). Will remind the code part responsible for this:
Code:
double pill_avg_cost_per_shot = main_dataset.Pill.FindByName(comboBox_pill.Text).Cost * (60.0 / (main_dataset.Pill.FindByName(comboBox_pill.Text).Time)) /
(weapon_attack_per_min * (1 + buff_reload_actual/100));
The idea for scaling enhancers cost to one shot is very similar (but of course based on something else). Code reminder:
Code:
double accu_avg_cost_per_shot = (1.0 / main_dataset.Weapon.FindByName(comboBox_weapon.Text).Nr_of_shots_to_break_enh)
* my_settings.Ammount_accuracy * 0.4 * my_settings.Markup_accuracy;
I know that rings will decay in future so i will adjust the app when they do (will look similar to including cost of pill).
So now if you are still reading - my main question is:
Is my thinking logic and calulations on including cost to use pills and enhancers correct?
(side question - if everythign else is ok too )?)
---------------
If you have other comments about my soft (i.e. whats good and whats bad?) or you feel like discusing eco or dps calulations - feel free to do so .
Falagor
Last edited: