Updated gir's damage script to work as ZoDDel's. Still not tested tho
Code: Select all
{ Game : helldivers2.exe
Version:
Date : 2024-04-07
Author : ZoDDeL
This script does blah blah blah
}
[ENABLE]
aobscanmodule(damageMulti,game.dll,66 0F 6E 59 04 66 0F 6E 49 08 0F 5B C9 0F 5B DB) // should be unique
registersymbol(damageMulti)
registersymbol(enemydmg_multiplier)
alloc(dmg_newmem,$2000)
label(dmg_code)
label(dmg_return)
dmg_newmem:
cmp [rcx+04],#0 // skip any 0 dmg weapons like smoke or unknown shit
je dmg_code
// whitelisted weapons that get super damage
cmp [rcx+00], #9 // Projectile_Flamethrower FLAM-40 part 1
je dmg_Super
cmp [rcx+00], #14 // Projectile_Grenade_40mm_HE GL-21 part 1 projectile / mortar shell (turret)
je dmg_Super
cmp [rcx+00], #23 // Projectile_Laser_Long LAS-16 Sickle
je dmg_Super
cmp [rcx+00], #24 // Projectile_Plasma_Bolt SG-8P Punisher Plasma (1) / PLAS-1 Scorcher
je dmg_Super
cmp [rcx+00], #25 // Projectile_Plasma_Rifle_Charge PLAS-101 Purifier Impact
je dmg_Super
cmp [rcx+00], #26 // Projectile_Plasma_Bolt_Charge
je dmg_Super
cmp [rcx+00], #27 // Projectile_Railgun RS-422 railgun
je dmg_Super
cmp [rcx+00], #30 // Projectile_Pistol_9x20mm_fmj P-19 Redeemer
je dmg_Super
cmp [rcx+00], #31 // Projectile_Pistol_9x20mm_smj MP-98 Knight
je dmg_Super
cmp [rcx+00], #32 // Projectile_Pistol_9x20mm_hp P-2 Peacemaker
je dmg_Super
cmp [rcx+00], #39 // Projectile_Pistol_12x25mm_fmj SMG-37 Defender
je dmg_Super
cmp [rcx+00], #46 // Projectile_Pistol_12x25mm_stun SMG-72 Pummeler
je dmg_Super
cmp [rcx+00], #47 // Projectile_Pistol_Magnum P-113 Verdict
je dmg_Super
cmp [rcx+00], #49 // Projectile_Pistol_13x40mm_fmj P-4 Senator
je dmg_Super
cmp [rcx+00], #53 // Projectile_Rifle_5p5x50mm_ap AR-23P Liberator Penetrator
je dmg_Super
cmp [rcx+00], #55 // Projectile_Rifle_5p5x50mm_exp AR-23C Liberator Concussive
je dmg_Super
cmp [rcx+00], #56 // Projectile_Rifle_5p5x50mm_fmj AR-23 Liberator / AR-22C Patriot / AR-48 Truth Whisperer / M-105 Stalwart / AR-61 Tenderizer / Guard Dog
je dmg_Super
cmp [rcx+00], #70 // Projectile_Rifle_8x60mm_fmj MG-43 / EXO-45 Gatling / Gatling Turret / BR-14 Adjudicator / AR-L20 Jus
je dmg_Super
cmp [rcx+00], #77 // Projectile_Rifle_Rico AR-61 Tenderizer
je dmg_Super
cmp [rcx+00], #80 // Projectile_Rifle_9x70mm_fmj R-63 Diligence
je dmg_Super
cmp [rcx+00], #81 // Projectile_Rifle_9x70mm_hv R-63CS Diligence Counter Sniper
je dmg_Super
cmp [rcx+00], #87 // Projectile_Rocket_15x100mm_exp R-36 Eruptor 1
je dmg_Super
cmp [rcx+00], #91 // Projectile_Rocket_15x100mm_std JAR-5 Dominator
je dmg_Super
cmp [rcx+00], #96 // Projectile_Shotgun_10g_buc SG-8 Punisher / SG-22 Bushwack
je dmg_Super
cmp [rcx+00], #97 // Projectile_Shotgun_Dragon_10g_flm SG-451 Cookout
je dmg_Super
cmp [rcx+00], #108 // Projectile_Shotgun_10g_slug SG-8S Slugger
je dmg_Super
cmp [rcx+00], #110 // Projectile_Shotgun_12g_bir SG-225SP Breaker Spray&Pray
je dmg_Super
cmp [rcx+00], #111 // Projectile_Shotgun_12g_buc SG-225 Breaker
je dmg_Super
cmp [rcx+00], #112 // Projectile_Shotgun_12g_bug SG-225BB Breaker BugBiter
je dmg_Super
cmp [rcx+00], #113 // Projectile_Shotgun_12g_fle SG-225NS Breaker Nailspitter
je dmg_Super
cmp [rcx+00], #114 // Projectile_Shotgun_12g_flm SG-225IE Breaker Incendiary
je dmg_Super
cmp [rcx+00], #124 // Projectile_Arc_Thrower ARC-3 Arc Thrower
je dmg_Super
cmp [rcx+00], #125 // Projectile_Arc_Thrower_Mk2
je dmg_Super
cmp [rcx+00], #126 // Projectile_Arc_Shotgun ARC-12 Blitzer
je dmg_Super
cmp [rcx+00], #129 // Projectile_Rifle_12p5x100mm_fmj HMG Emplacement
je dmg_Super
cmp [rcx+00], #130 // Projectile_Rifle_12p5x100mm_bchp MG-206 HMG
je dmg_Super
cmp [rcx+00], #131 // Projectile_Rifle_12p5x100mm_eit anti material rifle
je dmg_Super
cmp [rcx+00], #133 // Projectile_Crossbow_Bolt CB-9 explosive crossbow 1
je dmg_Super
cmp [rcx+00], #134 // Explosion_Crossbow_Bolt CB-9 explosive crossbow 2
je dmg_Super
cmp [rcx+00], #136 // Projectile_Cannon_20mm_APHET autocannon part 1
je dmg_Super
cmp [rcx+00], #137 // Projectile_Cannon_20mm_HVAPT
je dmg_Super
cmp [rcx+00], #138 // Projectile_Cannon_30mm_APHE emancipator exo gun part 1
je dmg_Super
cmp [rcx+00], #143 // Projectile_Grenade_40mm_HEAT GP-31 grenade pistol part 1 (part 2 = gren launcher explo)
je dmg_Super
cmp [rcx+00], #144 // Projectile_Grenade_75mm_HEAT EAT-17 part 1
je dmg_Super
cmp [rcx+00], #145 // Projectile_Grenade_85mm_HEAT recoil-less rifle part 1 shell
je dmg_Super
cmp [rcx+00], #146 // Projectile_Grenade_85mm_HEAT_MK2
je dmg_Super
cmp [rcx+00], #154 // Projectile_Missile_66mm MLS-4X Commando part 1 shell
je dmg_Super
cmp [rcx+00], #155 // Projectile_Missile_66mm_MK2
je dmg_Super
cmp [rcx+00], #156 // Projectile_Missile_Combat_Walker EXO-45 rocket part 1
je dmg_Super
cmp [rcx+00], #157 // Projectile_Missile_Combat_Walker_MK2
je dmg_Super
cmp [rcx+00], #158 // Projectile_Missile_Faf FAF-14 Spear 1 shell
je dmg_Super
cmp [rcx+00], #194 // Explosion_Projectile_PlasmaBolt_Small
je dmg_Super
cmp [rcx+00], #195 // Explosion_Projectile_PlasmaBolt_Medium PLAS-1 Scorcher explosion
je dmg_Super
cmp [rcx+00], #196 // Explosion_Projectile_PlasmaBolt_Medium_Volatile
je dmg_Super
cmp [rcx+00], #197 // Explosion_Projectile_PlasmaBolt_Large SG-8P Punisher Plasma explosion
je dmg_Super
cmp [rcx+00], #198 // Explosion_Plasma_Rifle_Charge PLAS-101 Purifier Explosion
je dmg_Super
cmp [rcx+00], #199 // Explosion_Plasma_Cone
je dmg_Super
cmp [rcx+00], #216 // Explosion_HandGrenade_Frag_Cluster RL-77 airburst (ground???)
je dmg_Super
cmp [rcx+00], #223 // Explosion_RailgunOvercharge
je dmg_Super
cmp [rcx+00], #219 // Explosion_Projectile_Cannon_20mm_Flak R-36 Eruptor 3
je dmg_Super
cmp [rcx+00], #230 // Explosion_Projectile_Cannon_20mm_HE autocannon part 2 explosion
je dmg_Super
cmp [rcx+00], #231 // Explosion_Projectile_Cannon_20mm_APHET emancipator exo gun part 2
je dmg_Super
cmp [rcx+00], #235 // Explosion_Projectile_Grenade_40mm_HE GL-21 / GP-31 grenade pistol explosion
je dmg_Super
cmp [rcx+00], #239 // Explosion_Projectile_Grenade_85mm_DirectHit RL-77 airburst (rocket)
je dmg_Super
cmp [rcx+00], #240 // Explosion_Projectile_Grenade_85mm_HEAT recoil-less rifle part 2 explosion
je dmg_Super
cmp [rcx+00], #241 // Explosion_Projectile_Grenade_75mm_HEAT EAT-17 part 3
je dmg_Super
cmp [rcx+00], #242 // Projectile_Laser_Pulse LAS-99 quasar part 1
je dmg_Super
cmp [rcx+00], #243 // Explosion_Laser_Pulse LAS-99 quasar part 2
je dmg_Super
cmp [rcx+00], #247 // Explosion_Projectile_Missile_66mm MLS-4X Commando part 2 explosion
je dmg_Super
cmp [rcx+00], #248 // Explosion_Projectile_Missile_66mm_MK2
je dmg_Super
cmp [rcx+00], #249 // Explosion_Projectile_Missile_CombatWalker EXO-45 rocket part 2
je dmg_Super
cmp [rcx+00], #250 // Explosion_Projectile_Missile_CombatWalker_MK2
je dmg_Super
cmp [rcx+00], #251 // Explosion_Projectile_Missile_Faf FAF-14 Spear 2 explosion
je dmg_Super
cmp [rcx+00], #252 // Explosion_Projectile_Missile_Faf_MK2
je dmg_Super
cmp [rcx+00], #253 // Explosion_Projectile_Missile_Stinger
je dmg_Super
cmp [rcx+00], #318 // DPS_BeamSmall LAS-7 Dagger
je dmg_Super
cmp [rcx+00], #319 // DPS_BeamMedium LAS-5 Scythe
je dmg_Super
cmp [rcx+00], #324 // DPS_BeamLarge LAS-98
je dmg_Super
cmp [rcx+00], #404 // Impact_Throwing_Knife K-2 Throwing Knife
je dmg_Super
// these weapons stay default
cmp [rcx+00], #120 // Projectile_Shrapnel G-6 Frag part 2
je dmg_Stratagem
cmp [rcx+00], #121 // Projectile_Shrapnel_High_Velocity Orbital airburst impact
je dmg_Stratagem
cmp [rcx+00], #122 // Projectile_StratagemLauncher
je dmg_Stratagem
cmp [rcx+00], #135 // Projectile_Tesla_Turret tesla tower
je dmg_Stratagem
cmp [rcx+00], #139 // Projectile_Cannon_40mm_APHE Autocannon Sentry impact
je dmg_Stratagem
cmp [rcx+00], #140 // Projectile_Cannon_40mm_Flak
je dmg_Stratagem
cmp [rcx+00], #141 // Projectile_Cannon_Eagle_23mm Eagle strafing run impact
je dmg_Stratagem
cmp [rcx+00], #149 // Projectile_Rocket_70mm rocket sentry turret 1
je dmg_Stratagem
cmp [rcx+00], #151 // Projectile_Bomb_100kg Eagle airstrike impact
je dmg_Stratagem
cmp [rcx+00], #161 // Projectile_Rocket_110mm Eagle 110MM rocket pods impact
je dmg_Stratagem
cmp [rcx+00], #163 // Projectile_Bomb_500kg 500KG bomb impact
je dmg_Stratagem
cmp [rcx+00], #167 // Projectile_Orbital_Cannon_110mm Orbital gas canister impact
je dmg_Stratagem
cmp [rcx+00], #168 // Projectile_Orbital_Cannon_120mm_HE Orbital 120MM HE barrage impact
je dmg_Stratagem
cmp [rcx+00], #169 // Projectile_Orbital_Cannon_380MM_HE Orbital 380MM HE barrage/precison strike/walking impact
je dmg_Stratagem
cmp [rcx+00], #170 // Projectile_Orbital_Napalm
je dmg_Stratagem
cmp [rcx+00], #171 // Explosion_Orbital_Napalm
je dmg_Stratagem
cmp [rcx+00], #172 // Projectile_Orbital_Railcannon Orbital railcannon impact
je dmg_Stratagem
cmp [rcx+00], #173 // Projectile_Orbital_Stunround
je dmg_Stratagem
cmp [rcx+00], #180 // Explosion_HandGrenade_Flash
je dmg_Stratagem
cmp [rcx+00], #181 // Explosion_Projectile_Grenade_40mm_Stun
je dmg_Stratagem
cmp [rcx+00], #182 // Explosion_Projectile_Snowball
je dmg_Stratagem
cmp [rcx+00], #209 // Explosion_Prop_Barrel
je dmg_Stratagem
cmp [rcx+00], #211 // Explosion_Building_Small
je dmg_Stratagem
cmp [rcx+00], #212 // Explosion_Building_Medium
je dmg_Stratagem
cmp [rcx+00], #213 // Explosion_Building_Large
je dmg_Stratagem
cmp [rcx+00], #214 // Explosion_Building_Huge
je dmg_Stratagem
cmp [rcx+00], #215 // Explosion_HandGrenade_Frag G-6 Frag part 1
je dmg_Stratagem
cmp [rcx+00], #217 // Explosion_HandGrenade_Incendiary G-10 Incendiary/incendiary mines (explosion)
je dmg_Stratagem
cmp [rcx+00], #218 // Explosion_HandGrenade_Thermite G-123 Thermite (explosion)
je dmg_Stratagem
cmp [rcx+00], #228 // Explosion_HandGrenade_HighExplosive G-12 High Explosive / G-16 Impact
je dmg_Stratagem
cmp [rcx+00], #229 // Explosion_Projectile_Cannon_Eagle_23mm Eagle strafing run pods
je dmg_Stratagem
cmp [rcx+00], #232 // Explosion_Projectile_Cannon_30mm_APHE
je dmg_Stratagem
cmp [rcx+00], #233 // Explosion_Projectile_Cannon_40mm_Flak
je dmg_Stratagem
cmp [rcx+00], #234 // Explosion_Projectile_Cannon_40mm_APHE Autocannon sentry explosion
je dmg_Stratagem
cmp [rcx+00], #236 // Explosion_Projectile_Grenade_40mm_APHE
je dmg_Stratagem
cmp [rcx+00], #237 // Explosion_Projectile_Grenade_40mm_ProximityCone
je dmg_Stratagem
cmp [rcx+00], #238 // Explosion_Projectile_Grenade_Mortar_40mm_HE mortar turred explosion
je dmg_Stratagem
cmp [rcx+00], #244 // Explosion_Projectile_OrbitalShot Eagle Clusterbomb pods
je dmg_Stratagem
cmp [rcx+00], #245 // Explosion_Projectile_OrbitalShot_MK2
je dmg_Stratagem
cmp [rcx+00], #246 // Explosion_Projectile_EagleBomb_Napalm Napalm SEAF impact
je dmg_Stratagem
cmp [rcx+00], #254 // Explosion_Projectile_Rocket_70mm rocket sentry turret 2
je dmg_Stratagem
cmp [rcx+00], #255 // Explosion_Projectile_Rocket_70mm_HE
je dmg_Stratagem
cmp [rcx+00], #256 // Explosion_Projectile_Rocket_110mm Eagle 110MM rocket pods
je dmg_Stratagem
cmp [rcx+00], #258 // Explosion_ContactMine anti personnel mines
je dmg_Stratagem
cmp [rcx+00], #259 // Explosion_ContactMine_Incendiary
je dmg_Stratagem
cmp [rcx+00], #260 // Explosion_AntiTankMine anti tank mines
je dmg_Stratagem
cmp [rcx+00], #268 // Explosion_Projectile_EagleBomb_Impact Eagle Airstrike Impact
je dmg_Stratagem
cmp [rcx+00], #269 // Explosion_Projectile_EagleBomb_100kg Eagle Airstrike
je dmg_Stratagem
cmp [rcx+00], #270 // Explosion_Projectile_EagleBomb_100kg_MK3
je dmg_Stratagem
cmp [rcx+00], #271 // Explosion_Projectile_EagleMissile
je dmg_Stratagem
cmp [rcx+00], #273 // Explosion_HellpodImpact Hellpod impact damage
je dmg_Stratagem
cmp [rcx+00], #274 // Explosion_HellpodImpact_FieryDrop
je dmg_Stratagem
cmp [rcx+00], #275 // Explosion_HellpodExplosion
je dmg_Stratagem
cmp [rcx+00], #276 // Explosion_Vehicle_CyborgHugeDeath
je dmg_Stratagem
cmp [rcx+00], #278 // Explosion_Vehicle_DropshipCrash
je dmg_Stratagem
cmp [rcx+00], #283 // Explosion_Projectile_Railcannon Orbital railcannon explosion
je dmg_Stratagem
cmp [rcx+00], #284 // Explosion_Projectile_OrbitalBarrage Orbital 380MM HE barrage/walking explosion
je dmg_Stratagem
cmp [rcx+00], #285 // Explosion_Projectile_OrbitalStrike Orbital 120MM HE barrage
je dmg_Stratagem
cmp [rcx+00], #286 // Explosion_Projectile_OrbitalGas
je dmg_Stratagem
cmp [rcx+00], #288 // Explosion_Projectile_OrbitalShell
je dmg_Stratagem
cmp [rcx+00], #291 // Explosion_Projectile_EagleBomb_500kg High-yield SEAF explosion/500KG Bomb Explosion
je dmg_Stratagem
cmp [rcx+00], #302 // Explosion_EscapePodCrash
je dmg_Stratagem
cmp [rcx+00], #305 // Explosion_Hellbomb Hellbomb / SEAF Mini-Nuke
je dmg_Stratagem
cmp [rcx+00], #306 // Explosion_BugDrill
je dmg_Stratagem
cmp [rcx+00], #307 // Explosion_ICBM_explode
je dmg_Stratagem
cmp [rcx+00], #320 // DPS_BeamMediumDrone AX/LAS-5 "Guard Dog" Rover
je dmg_Stratagem
cmp [rcx+00], #327 // DPS_BeamHuge Orbital Laser
je dmg_Stratagem
cmp [rcx+00], #328 // DPS_BeamHuge_Upgrade Orbital Laser
je dmg_Stratagem
cmp [rcx+00], #331 // DPS_Fire Napalm SEAF burn
je dmg_Stratagem
cmp [rcx+00], #332 // DPS_Thermite G-123 Thermite (burn)
je dmg_Stratagem
cmp [rcx+00], #342 // DPS_Gas Orbital Gas
je dmg_Stratagem
cmp [rcx+00], #347 // Ability_Avatar_Melee Melee
je dmg_Stratagem
cmp [rcx+00], #348 // Ability_Avatar_Melee_Booster_Muscle_Enhancement Melee
je dmg_Stratagem
cmp [rcx+00], #349 // Ability_Avatar_Melee_Bayonet Melee
je dmg_Stratagem
cmp [rcx+00], #398 // Ability_SuperEarth_Soldier_Shove Melee
je dmg_Stratagem
jmp dmg_Enemy
dmg_Super:
//mov [rcx+04],#4000 // writes m_max_damage
//mov [rcx+08],#4000 // writes m_min_damage
//mov [rcx+0C],#10 // writes m_penetration_no_angle
//mov [rcx+10],#10 // writes m_penetration_angle
//mov [rcx+14],#10 // writes m_penetration_3
//mov [rcx+18],#10 // writes m_penetration_4
//mov [rcx+1C],#50 // writes m_demolition
//mov [rcx+20],#100 // writes m_pushback
//mov [rcx+24],#100 // writes m_unk1 value.
//jmp dmg_code
movd xmm3,[rcx+04]
movd xmm1,[rcx+08]
cvtdq2ps xmm1,xmm1
cvtdq2ps xmm3,xmm3
mulss xmm3, [dmg_multiplier] // multiplies value with dmg_multiplier
mulss xmm1, [dmg_multiplier] // multiplies value with admg_multiplier
//jmp dmg_check
jmp dmg_return
dmg_Stratagem:
movd xmm3,[rcx+04]
movd xmm1,[rcx+08]
cvtdq2ps xmm1,xmm1
cvtdq2ps xmm3,xmm3
mulss xmm3, [dmgStratagem_multiplier] // multiplies value with dmg_multiplier
mulss xmm1, [dmgStratagem_multiplier] // multiplies value with admg_multiplier
jmp dmg_return
//dmg_Pump:
//mov [rcx+04],#320 // writes m_max_damage
//mov [rcx+08],#32 // writes m_min_damage
//mov [rcx+0C],#10 // writes m_penetration_no_angle
//mov [rcx+10],#10 // writes m_penetration_angle
//mov [rcx+14],#10 // writes m_penetration_3
//mov [rcx+18],#10 // writes m_penetration_4
//jmp dmg_code
//dmg_check:
// comiss xmm3, [dmg_limit] // checks if dmg after multiplier is above dmg_limit
// ja short dmg_cap
// comiss xmm1, [dmg_limit] // checks if admg after multiplier is above dmg_limit
// ja short dmg_cap
// jmp dmg_return
//
//dmg_cap:
// movss xmm3, [dmg_limit] // writes dmg_limit value
// movss xmm1, [dmg_limit] // writes dmg_limit value
// jmp dmg_return
dmg_Enemy:
mov [rcx+0C],#0 // writes m_penetration_no_angle
mov [rcx+10],#0 // writes m_penetration_angle
mov [rcx+14],#0 // writes m_penetration_3
mov [rcx+18],#0 // writes m_penetration_4
// mov [rcx+1C],#0 // writes m_demolition //Removed because it makes bugs get stuck in their attack animation if they encounter a wall.
mov [rcx+20],#0 // writes m_pushback
// mov [rcx+24],#100 // writes m_unk1 value.
movd xmm3,[rcx+04]
movd xmm1,[rcx+08]
cvtdq2ps xmm1,xmm1
cvtdq2ps xmm3,xmm3
mulss xmm3, [enemydmg_multiplier]
mulss xmm1, [enemydmg_multiplier]
jmp dmg_return
dmg_code:
movd xmm3,[rcx+04]
movd xmm1,[rcx+08]
cvtdq2ps xmm1,xmm1
cvtdq2ps xmm3,xmm3
jmp dmg_return
dmg_multiplier:
dd (float)1.3 // Weapons dmg, edit this for times x base damage (1 is default)
dmgStratagem_multiplier:
dd (float)1.1 // Stratagem dmg, edit this for times x base damage (1 is default)
dmgStratagemSmall_multiplier:
dd (float)1.1 // Other Stratagem dmg, edit this for times x base damage (1 is default)
enemydmg_multiplier:
dd (float)0.85 // enemy dmg, edit this for times x enemy damage (1 is default)
//dmg_limit:
//dd (float)7000 // limit the super damage to prevent creating weapons that would outdamage inf health
damageMulti:
jmp far dmg_newmem
nop 2
dmg_return:
[DISABLE]
damageMulti:
db 66 0F 6E 59 04 66 0F 6E 49 08 0F 5B C9 0F 5B DB
dealloc(dmg_newmem)
dealloc(dmg_multiplier)
dealloc(dmgStratagem_multiplier)
dealloc(dmgStratagemSmall_multiplier)
dealloc(enemydmg_multiplier)
dealloc(dmg_limit)
unregistersymbol(damageMulti)
unregistersymbol(enemydmg_multiplier)