damage formula

Nirran

Vault Senior Citizen
Modder
specificaly,how is weapon damage ammo stats and burst handled,is weapon damage multiplied for each burst bullet?found a way to re-write the damage formula using an sfall hookscript,but im not sure if i will be able to get the script to return ammo used,anyway,i already have melee and unarmed weapons written and it is working,need to know how the game handles burst

Nirran
 
Timeslip added a function to return ammo used,anyone know the answer to my OP question?i cant read assembly,what i found looking fior the formula was assembly code,need to take a class on that,anyway i have the groundwork done to re-write the formula,need one that people feel is a good one to use,any takers?

Nirran
 
my soft coded damage formula is complete with Timeslips new function,im sure it could be tweaked,it is included in my Custom Perks mod if anyone would like to play/code,each different part of the normal formula is set as function in this way it should be easy to play around with the formula(assuming you have some knowledge of scripting) if you want to,open gl_damage and go to DamageFormula function,everything needed is included

edit : update - better handling of the Get_Skill function,diffreciates 2 mode weapons that have different skills now

edit : added AP ammo fix,now the resistance and threshold of the target is divided by an ini setting when using ap ammo,default is 4,changed the name of the script to hs_combatdamage(sfall semi hard hook script name)

Nirran
 
Nirran, do you need help with damage formula? I know a lot about burst etc things (thanks to Atom for explanation) and I could help in this damage script :)
 
updated the damage calculations with code cubic2k contributed,the burst damage should be regular values now(before i was simply running for weapon_burst amount,rather then checking each bullet for hitting target,and then calculating the result,much better now)

thank you Cubik2k

Nirran
 
Cubik2k editor is brilliant. I added every Fallout Tactics weapon into the Fallout 2 game to test their potential, it was a breeze using the item editor. As well it teachers you about aspects regarding the game that most people just don’t properly understand. Thanks Cubik2k.

By the way thanks Nirran, you my friend are doing some excellent things for the modding community as well. :clap:
 
Nirran, I propose better determining the AP ammo:

Code:
   /* Armor Piercing Ammo Bonus */ 
//   if (attack_ammo_pid == 30) or (attack_ammo_pid == 33) or (attack_ammo_pid == 36) or (attack_ammo_pid == 37) or (attack_ammo_pid == 362) and (threshold > 0) then 

   if (Get_Ammo_Mod_A/Get_Ammo_Mod_B < 1) and (Get_Ammo_DR_Mod <0) then
      begin
         threshold := threshold / get_sfall_global_int(4264);
      end


Code:
(Get_Ammo_Mod_A/Get_Ammo_Mod_B < 1) and (Get_Ammo_DR_Mod <0)
always means AP ammo in Fallout2



.Pixote. said:
Cubik2k editor is brilliant. I added every Fallout Tactics weapon into the Fallout 2 game to test their potential, it was a breeze using the item editor. As well it teachers you about aspects regarding the game that most people just don’t properly understand. Thanks Cubik2k.

I'm glad you use and like my tool. I try to make it better and I remember about tool for critters.

By the way thanks Nirran, you my friend are doing some excellent things for the modding community as well. :clap:
Probably you do not imagine how much Nirrans things are excellent ;)
Combat parts of engine in script! Awesome! We can modify/tweak combat algorithms now very easy :)

Thanks both to Nirran for his ideas, work and scripts and for Timeslip for her sfall.
 
added that change to determining if the ammo is AP(will test it later,uploaded),thank you both :)

Nirran
 
edit : updated the script with suggestions by Cubik,script is much better now imo,the problem with massive damage on all bursts has been fixed(alogorithim by Cubik)

all damage dividers have been set as an ini setting,seperately(armor bypass,penetrate armor[weapon] etc)

edit : better handling of IntToFloat%(take a whole number and converts it to a 0.1 format,as percent),now handles negative values(used for when ammo damage resistance stat is negative,removed clamps(force value to remain between x and y) on resistance values.

Nirran
 
added weapons drop on crippled arms(and again if the crippled arm is targeted and does damage) ko and head shot criticals

- ideas by Riel88 -

edit : should be noted that tho this script was orginaly intended to be used soley for the purpous of adding new perks,that this script performs its function without the additional perks quite well,all factors have been added to simulate the fo2 damage formula as close as possible,if interested in the script and not the perks,download my custom perks mod and only use hs_tohit(needed for bust attacks,burst uses a global var that is set in hs_tohit) and hs_combatdamage,Cubic2k has been testing this script without the the perks,for more info regarding its functions pm me

edit : forgot you will also need Damage.ini,also found in Custom Perks mod

Nirran
 
Critter facing(directly behind,rear flank,front flank and face to face[attacker position in relation to target])is now an aspect of these scripts,the static bonuses for attacker are ini setting in Damage.ini,can also enable or disable it

affects min/max damage and tohit

Nirran
 
Hi Nirran,

I'm not great at understanding code, but if I wanted to review all source code that affects hs_tohit and hs_combatdamage, which files would I need to review?
 
Glovz said:
Hi Nirran,

I'm not great at understanding code, but if I wanted to review all source code that affects hs_tohit and hs_combatdamage, which files would I need to review?

hs_tohit.ssl*
hs_combatdamage.ssl*

* and includes,they dont have code,they simply "dumb it down"(make it easier to read)

if you only plan to use those 2 scripts,ignore any mention of has_fake_perk(code will ignore it[they return 0 without my perk mods])

concider getting in touch with Cubik2k,or I.M. me,either of us will help you understand it

Nirran
 
Nirran said:
Glovz said:
Hi Nirran,

I'm not great at understanding code, but if I wanted to review all source code that affects hs_tohit and hs_combatdamage, which files would I need to review?

hs_tohit.ssl*
hs_combatdamage.ssl*

* and includes,they dont have code,they simply "dumb it down"(make it easier to read)

if you only plan to use those 2 scripts,ignore any mention of has_fake_perk(code will ignore it[they return 0 without my perk mods])

concider getting in touch with Cubik2k,or I.M. me,either of us will help you understand it

Nirran
How about gl_combatdamage.ssl?
 
that file should not be in any of the zips currently(faulty code in a bat file is to blame,fixed it) and i ran the fixed version and uploaded the result,no not that file,only the 2 i mentioned

Nirran
 
added a distance requierment for facing calculations,changable in the ini
(only affects damage,not tohit)

Nirran
 
Back
Top