HELLDIVERS 2

Upload your cheat tables here (No requests)
elamigopaisa
Cheater
Cheater
Posts: 33
Joined: Fri Feb 02, 2024 5:49 pm
Reputation: 2

Re: HELLDIVERS 2

Post by elamigopaisa »

Exemplify1524 wrote:
Tue Apr 30, 2024 10:10 pm
ZoDDeL wrote:
Tue Apr 30, 2024 6:15 pm
I modified your script so it output debug information to DebugView program. It is working.

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
alloc(dmg_newmem,$2000)

label(dmg_code)
label(dmg_return)

dmg_newmem:
  cmp [rcx+04],#0 // any 0 dmg weapons like smoke or unknown shit
  je dmg_code

{$ccode base_address=rcx}
  char debug_string[200];
  extern __cdecl int sprintf(char *, char *, ...);
  extern __cdecl void OutputDebugStringA(const char* lpOutputString);

  int *weapon_id=(int*)(base_address);
  int *weapon_dmg=(int*)(base_address+0x04);
  int *weapon_admg=(int*)(base_address+0x08);
  int *weapon_pen1=(int*)(base_address+0x0C);
  int *weapon_pen2=(int*)(base_address+0x10);
  int *weapon_pen3=(int*)(base_address+0x14);
  int *weapon_pen4=(int*)(base_address+0x18);

  sprintf(debug_string, "HD2 %3d | DMG %3d %3d | PEN %3d %3d %3d %3d", *weapon_id, *weapon_dmg, *weapon_admg, *weapon_pen1, *weapon_pen2, *weapon_pen3, *weapon_pen4);
  OutputDebugStringA(debug_string);

{$asm}

  // whitelisted weapons that get super damage
  cmp [rcx+00],#51 //#48 //#46 // AR-23 Liberator / AR-22C Patriot / AR-48 Truth Whisperer / M-105 Stalwart
  je dmg_Super
  cmp [rcx+00],#25 //#24 //#22 // P-2 Peacemaker / P-19 Redeemer
  je dmg_Super
  cmp [rcx+00],#101 //#97 //#95 // SG-225SP Breaker Spray&Pray (16)
  je dmg_Super
  cmp [rcx+00],#44 //#41 //#39 // P-4 Senator
  je dmg_Super
  cmp [rcx+00],#84 //#80 // JAR-5 Dominator
  je dmg_Super
  cmp [rcx+00],#296 //#291 //#287 // LAS-7 Dagger
  je dmg_Super
  cmp [rcx+00],#297 //#292 //#288 // LAS-5 Scythe
  je dmg_Super
  cmp [rcx+00],#34 //#33 //#31 // SMG-37 Defender
  je dmg_Super
  cmp [rcx+00],#19 //#17 // LAS-16 Sickle
  je dmg_Super
  cmp [rcx+00],#10 //#9 // GL-21 part 1 projectile / mortar shell (turret)
  je dmg_Super
  cmp [rcx+00],#220 //#215 //#212 // GL-21 part 2 explosion
  je dmg_Super
  cmp [rcx+00],#127 //#123 // autocannon part 1 // projectile
  je dmg_Super
  cmp [rcx+00],#216 //#211 // autocannon part 2 // explosion
  je dmg_Super
  cmp [rcx+00],#74 //#70  // R-63CS Diligence Counter SNiper
  je dmg_Super
  cmp [rcx+00],#135 // #131 //#129 // EAT-17 part 1
  je dmg_Super
  //cmp [rcx+00],#184 //#182 // EAT-17 part 2
  //je dmg_Super
  cmp [rcx+00],#226 //#221 //#217 // EAT-17 part 3
  je dmg_Super
  cmp [rcx+00],#136 //#132 // recoil-less rifle part 1 shell
  je dmg_Super
  cmp [rcx+00],#225 //#220 // recoil-less rifle part 2 explosion
  je dmg_Super



  // these weapons stay default
  cmp [rcx+00],#201 //#196 //#194 // G-6 Frag part 1
  je dmg_code
  cmp [rcx+00],#111 //#107 // G-6 Frag part 2
  je dmg_code
  cmp [rcx+00],#213 //#208 //#205 // G-12 High Explosive /  G-16 Impact
  je dmg_code
  cmp [rcx+00],#203 //#198 //#195 // G-10 Incendiary
  je dmg_code

  //500kg bomb
  cmp [rcx+00],#154 //#150 // shell
  je dmg_code
  cmp [rcx+00],#273 //#268 // explosion
  je dmg_code

  //orbital laser
  cmp [rcx+00],#305 //#299
  je dmg_code
  //309 //303 fire ground dmg

  //orbital precision strike
  cmp [rcx+00],#160 //#156
  je dmg_code
  cmp [rcx+00],#267 //#262
  je dmg_code

  //orbital railcannon strike
  cmp [rcx+00],#161 //#157
  je dmg_code
  cmp [rcx+00],#266 //#261
  je dmg_code

  //orbital 120MM HE barrage
  cmp [rcx+00],#159 //#155
  je dmg_code
  cmp [rcx+00],#268 //#263
  je dmg_code


  { // start exclude
  // whitelisted weapons that get super damage
  cmp [rcx+00],#25 //#23 // MP-98 Knight
  je dmg_Super
  cmp [rcx+00],#98 //#96 // SG-225 Breaker (11)
  je dmg_Super
  cmp [rcx+00],#62 //#60 // MG-43 / EXO-45 Gatling / Gatling Turret
  je dmg_Super
  cmp [rcx+00],#111 //#109 // ARC-03
  je dmg_Super
  cmp [rcx+00],#9 //#8 // FLAM-40 part 1
  je dmg_Super
  //cmp [rcx+00],#303 // FLAM-40 part 2 // ground fire shares ID with flame tornados
  //je dmg_Super
  cmp [rcx+00],#296 //#292 // LAS-98
  je dmg_Super
  cmp [rcx+00],#222 //#218 // LAS-99 quasar part 1
  je dmg_Super
  cmp [rcx+00],#223 // LAS-99 quasar part 2
  je dmg_Super
  cmp [rcx+00],#21 //#19 // RS-422 railgun
  je dmg_Super

  cmp [rcx+00],#117 //#115 // MG-206 HMG
  je dmg_Super

  cmp [rcx+00],#143 //#141 // EXO-45 rocket part 1
  je dmg_Super
  cmp [rcx+00],#229 //#225 // EXO-45 rocket part 2
  je dmg_Super
  cmp [rcx+00],#89 // break action shotgun
  je dmg_Super
  cmp [rcx+00],#118 // anti material rifle
  je dmg_Super


  cmp [rcx+00],#145 // javelin rocket part 1
  je dmg_Super
  cmp [rcx+00],#231 // javelin rocket part 2
  je dmg_Super
  cmp [rcx+00],#125 // emancipator exo gun part 1
  je dmg_Super
  cmp [rcx+00],#212 // emancipator exo gun part 2
  je dmg_Super
  cmp [rcx+00],#126 // pelican weapon part 1
  je dmg_Super
  cmp [rcx+00],#214 // pelican weapon part 2
  je dmg_Super

  cmp [rcx+00],#76 // R-36 Eruptor 1
  je dmg_Super
  cmp [rcx+00],#108 // R-36 Eruptor 2
  je dmg_Super
  cmp [rcx+00],#130 // GP-31 grenade pistol
  je dmg_Super
  cmp [rcx+00],#219 // RL-77 airburst (rocket)
  je dmg_Super
  cmp [rcx+00],#196 // RL-77 airburst (cluster)
  je dmg_Super
  cmp [rcx+00],#197 // RL-77 airburst (ground???)
  je dmg_Super
  cmp [rcx+00],#120 // GP-31 explosive crossbow 1
  je dmg_Super
  cmp [rcx+00],#121 // GP-31 explosive crossbow 2
  je dmg_Super
  cmp [rcx+00],#20 //#18 // SG-8P Punisher Plasma (1) / PLAS-1 Scorcher
  je dmg_Super
  cmp [rcx+00],#180 // PLAS-1 Scorcher explosion
  je dmg_Super
  cmp [rcx+00],#182 // SG-8P Punisher Plasma explosion
  je dmg_Super
  cmp [rcx+00],#113 //#111 // ARC-12 Blitzer (5)
  je dmg_Super
  cmp [rcx+00],#101 //#99 // SG-255IE Breaker Incendiary (12)
  je dmg_Super


  // fix me
  //cmp [rcx+00],#43 // AR-23P Liberator Penetrator
  //je dmg_Super
  //cmp [rcx+00],#45 // AR-23C Liberator Concussive
  //je dmg_Super
  //cmp [rcx+00],#82 // SG-8 Punisher (9)
  //je dmg_Super
  //cmp [rcx+00],#93 // SG-8S Slugger (1)
  //je dmg_Super
  //cmp [rcx+00],#97 // SG-225BB Breaker Bugbiter (7)
  //je dmg_Super
  //cmp [rcx+00],#98 // SG-225NS Breaker Nailspitter (11)
  //je dmg_Super


  // these weapons stay default
  //cmp [rcx+00],#163 // G-23 Stun
  //je dmg_code
  cmp [rcx+00],#199 //#196 // G-123 Thermite (explosion)
  je dmg_code
  cmp [rcx+00],#304 // G-123 Thermite (burn)
  je dmg_code









  //orbital 380MM HE barrage identical ID's as precision strike
  //cmp [rcx+00],#156
  //je dmg_code
  //cmp [rcx+00],#262
  //je dmg_code

  //eagle 110mm rocket pods
  cmp [rcx+00],#148
  je dmg_code
  cmp [rcx+00],#236
  je dmg_code

  //mortar turret
  // 10 identical to GL21 bullet
  cmp [rcx+00],#218
  je dmg_code

  //eagle airstrike
  cmp [rcx+00],#138
  je dmg_code
  cmp [rcx+00],#249
  je dmg_code

  //eagle clusterbomb
  cmp [rcx+00],#224
  je dmg_code
  // 10 shell

  //helldiver pot damage
  cmp [rcx+00],#253
  je dmg_code

  //impact fall damage???
  cmp [rcx+00],#282
  je dmg_code
  } // end exclude


  jmp dmg_Enemy


dmg_Super:
  mov [rcx+0C],#10 // penetration 1
  mov [rcx+10],#10 // penetration 2
  mov [rcx+14],#10 // penetration 3
  mov [rcx+18],#10 // penetration 4
  movd xmm3,[rcx+04]
  movd xmm1,[rcx+08]
  cvtdq2ps xmm1,xmm1
  cvtdq2ps xmm3,xmm3
  mulss xmm3, dword ptr [dmg_multiplier]
  mulss xmm1, dword ptr [admg_multiplier]
  jmp dmg_return

dmg_Enemy:
  movd xmm3,[rcx+04]
  movd xmm1,[rcx+08]
  cvtdq2ps xmm1,xmm1
  cvtdq2ps xmm3,xmm3
  mulss xmm3, dword ptr [enemydmg_multiplier]
  mulss xmm1, dword ptr [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

admg_multiplier:
  dd (float)1

enemydmg_multiplier:
  dd (float)0.2


damageMulti:
  jmp far dmg_newmem
  nop 2
dmg_return:



[DISABLE]
I found other damage ids with this DebugView tool and put it into table, so you can add it to your script.
[Link]

also for you on second list I add new column (for ZoDDel) it take data from table and generate for you text:

Code: Select all

"cmp [rcx+00],#5 // Automaton damage
je dmg_code
"
"cmp [rcx+00],#6 // Automaton distance damage (some2) / Automaton Gunship rocket blast
je dmg_code
"
"cmp [rcx+00],#7 // Automaton hand blaster / Unknown event on automaton map
je dmg_code
"
"cmp [rcx+00],#9 // FLAM-40 Flamethrower part 1
je dmg_code
"
"cmp [rcx+00],#10 // GL-21 Grenade launcher part 1 / Mortar Sentry shell
je dmg_code
"
"cmp [rcx+00],#11 // EMS Mortar Sentry / Grenade Launcher / Mortar Sentry 1
je dmg_code
"
"cmp [rcx+00],#19 // LAS-16 Sickle
je dmg_code
"
"cmp [rcx+00],#20 // PLAS-1 Scorcher / SG-8P Punisher Plasma
je dmg_code
"
"cmp [rcx+00],#22 // RS-422 Railgun
je dmg_code
"
it woult be cool if you will use this table
had any luck finding the AMR ID?

How to use this cheat table?
  1. Install Cheat Engine
  2. Double-click the .CT file in order to open it.
  3. Click the PC icon in Cheat Engine in order to select the game process.
  4. Keep the list.
  5. Activate the trainer options by checking boxes or setting values from 0 to 1

Exemplify1524
Cheater
Cheater
Posts: 34
Joined: Tue Apr 30, 2024 8:37 am
Reputation: 18

Re: HELLDIVERS 2

Post by Exemplify1524 »

elamigopaisa wrote:
Wed May 01, 2024 12:26 am
had any luck finding the AMR ID?
try:
122 Antimaterial Rifle

nos4r2
Expert Cheater
Expert Cheater
Posts: 243
Joined: Sun Oct 29, 2017 3:58 am
Reputation: 46

Re: HELLDIVERS 2

Post by nos4r2 »

Exemplify1524 wrote:
Wed May 01, 2024 12:28 am
elamigopaisa wrote:
Wed May 01, 2024 12:26 am
had any luck finding the AMR ID?
try:
122 Antimaterial Rifle
Thx test other id in google sheet seem working just fine, i only test a couple one that i use, you have airburst launcher id? i think this one have 2 or 3 id iirc

elamigopaisa
Cheater
Cheater
Posts: 33
Joined: Fri Feb 02, 2024 5:49 pm
Reputation: 2

Re: HELLDIVERS 2

Post by elamigopaisa »

Exemplify1524 wrote:
Wed May 01, 2024 12:28 am
elamigopaisa wrote:
Wed May 01, 2024 12:26 am
had any luck finding the AMR ID?
try:
122 Antimaterial Rifle
for some reason none of the IDS are working for me, dont know what im doing wrong

Exemplify1524
Cheater
Cheater
Posts: 34
Joined: Tue Apr 30, 2024 8:37 am
Reputation: 18

Re: HELLDIVERS 2

Post by Exemplify1524 »

elamigopaisa wrote:
Wed May 01, 2024 1:31 am
Exemplify1524 wrote:
Wed May 01, 2024 12:28 am
elamigopaisa wrote:
Wed May 01, 2024 12:26 am
had any luck finding the AMR ID?
try:
122 Antimaterial Rifle
for some reason none of the IDS are working for me, dont know what im doing wrong
Right now im testing remake of ZoDDel script. Try this script it is working for me 100%:

Code: Select all

[ENABLE]
aobscanmodule(damage_inject,game.dll,66 0F 6E 59 04 66 0F 6E 49 08 0F 5B C9 0F 5B DB)
alloc(damage_newmem,$10000)
label(damage_return)

//label(damage_change)
//label(damage_and_penetration_change)
//label(damage_no_change)

//alloc(damage_ratio,4)
//registersymbol(damage_ratio)

damage_newmem:
// push rbx //save rbx as it's going to be changed

{$ccode base_address=rcx}
extern __cdecl int sprintf(char *, char *, ...);
extern __cdecl void OutputDebugStringA(const char* lpOutputString);

//extern float damage_ratio;
//extern void damage_change();
//extern void damage_and_penetration_change();
//extern void damage_no_change();

char debug_string[400];
char* weapon_name;
char* damage_type_name;

typedef struct {
   int id;
   int damage_value;
   int armor_damage_value;
   int penetration1_no_angle_value;
   int penetration2_angle_value;
   int penetration3_unknown_value;
   int penetration4_unknown_value;
   char* damage_type_name;
   char* weapon_name;
} Weapon;

int *weapon_id=(int*)(base_address);
int *weapon_dmg=(int*)(base_address+0x04);
int *weapon_admg=(int*)(base_address+0x08);
int *weapon_pen1=(int*)(base_address+0x0C);
int *weapon_pen2=(int*)(base_address+0x10);
int *weapon_pen3=(int*)(base_address+0x14);
int *weapon_pen4=(int*)(base_address+0x18);

Weapon weapons[2] = {
{51, 600, 600, 600, 600, 600, 600, "01 Assault rifle / 01 Assault rifle / 01 Assault rifle / 01 Assault rifle / Stratagem weapon", "AR-22C Patriot / AR-23 Liberator / AR-48 Truth Whisperer / Guard Dog / Stalwart"},
{25, 600, 600, 600, 600, 600, 600, "Pistol / Pistol", "P-19 Redeemer / P-2 Peacemaker"}
};

weapon_name = "unknown damage";
damage_type_name = "unknown type";

// strcpy(weapon_name_list, "");
if (*weapon_id != 0) {
  for (int i = 0; i < sizeof(weapons) / sizeof(weapons[0]); ++i) {
    if (weapons[i].id == 0) {
      continue;
    }
      if (*weapon_id == weapons[i].id) {
         // damage id found in hardcoded table above. We can take know weapon name. Put it to weapon_name
         weapon_name = weapons[i].weapon_name;
         damage_type_name = weapons[i].damage_type_name;
         if (weapons[i].damage_value != -1) {
           *weapon_dmg = weapons[i].damage_value;
         }
         if (weapons[i].armor_damage_value != -1) {
           *weapon_admg = weapons[i].armor_damage_value;
         }
         if (weapons[i].penetration1_no_angle_value != -1) {
           *weapon_pen1 = weapons[i].penetration1_no_angle_value;
         }
         if (weapons[i].penetration2_angle_value != -1) {
           *weapon_pen2 = weapons[i].penetration2_angle_value;
         }
         if (weapons[i].penetration3_unknown_value != -1) {
           *weapon_pen3 = weapons[i].penetration3_unknown_value;
         }
         if (weapons[i].penetration4_unknown_value != -1) {
           *weapon_pen4 = weapons[i].penetration4_unknown_value;
         }
         //strcat(weapon_name_list, " / ");
         //strcat(weapon_name_list, weapons[i].name);
         //sprintf(debug_string, "HD2. ID %d is for %s", *weapon_id, weapon_name);
         //OutputDebugStringA(debug_string);
         break;
      }
  }
}
sprintf(debug_string, "HD2 %3d | DMG %3d %3d | PEN %3d %3d %3d %3d | %s %s", *weapon_id, *weapon_dmg, *weapon_admg, *weapon_pen1, *weapon_pen2, *weapon_pen3, *weapon_pen4, damage_type_name, weapon_name);
OutputDebugStringA(debug_string);

{$asm}
  // standart code start
  movd xmm3,[rcx+04]
  movd xmm1,[rcx+08]
  cvtdq2ps xmm1,xmm1
  cvtdq2ps xmm3,xmm3
  // standart code end
  jmp damage_return

damage_inject:
  jmp far damage_newmem
  nop 2

damage_return:

// ------------------------------------------------------

[DISABLE]
Download this program:
[Link]

Run debug view.

Launch game.
Wait until game.dll module loaded.
Activate script in CE.
Right click script in CE and in menu look upper string. If there is no errors you will see usual menu items with 1st item "delete this record - del". If there is errors there will be some string about error. Put it here on the forum.

After script activated, Close CE.

Select your weapons in game (for testing only these two):
main "AR-22C Patriot / AR-23 Liberator / AR-48 Truth Whisperer / Guard Dog / Stalwart"},
pistol "P-19 Redeemer / P-2 Peacemaker"

Start game. shoot somewho. Look into debug view program. Did you see any damage messages? Like:

[20908] HD2 25 | DMG 600 600 | PEN 600 600 600 600 | Pistol / Pistol P-19 Redeemer / P-2 Peacemaker

loveteayza
Noobzor
Noobzor
Posts: 7
Joined: Thu Apr 22, 2021 12:54 pm
Reputation: 1

Re: HELLDIVERS 2

Post by loveteayza »

Weapon Damage multiplier is not working?
I just delete the gun that i did't use and adjust the penetration to 7777, multiplier to 10 but when i try it seems like it didn't give any penetration and damage for my gun.

elamigopaisa
Cheater
Cheater
Posts: 33
Joined: Fri Feb 02, 2024 5:49 pm
Reputation: 2

Re: HELLDIVERS 2

Post by elamigopaisa »

Exemplify1524 wrote:
Wed May 01, 2024 1:48 am
elamigopaisa wrote:
Wed May 01, 2024 1:31 am
Exemplify1524 wrote:
Wed May 01, 2024 12:28 am

try:
122 Antimaterial Rifle
for some reason none of the IDS are working for me, dont know what im doing wrong
Right now im testing remake of ZoDDel script. Try this script it is working for me 100%:

Code: Select all

[ENABLE]
aobscanmodule(damage_inject,game.dll,66 0F 6E 59 04 66 0F 6E 49 08 0F 5B C9 0F 5B DB)
alloc(damage_newmem,$10000)
label(damage_return)

//label(damage_change)
//label(damage_and_penetration_change)
//label(damage_no_change)

//alloc(damage_ratio,4)
//registersymbol(damage_ratio)

damage_newmem:
// push rbx //save rbx as it's going to be changed

{$ccode base_address=rcx}
extern __cdecl int sprintf(char *, char *, ...);
extern __cdecl void OutputDebugStringA(const char* lpOutputString);

//extern float damage_ratio;
//extern void damage_change();
//extern void damage_and_penetration_change();
//extern void damage_no_change();

char debug_string[400];
char* weapon_name;
char* damage_type_name;

typedef struct {
   int id;
   int damage_value;
   int armor_damage_value;
   int penetration1_no_angle_value;
   int penetration2_angle_value;
   int penetration3_unknown_value;
   int penetration4_unknown_value;
   char* damage_type_name;
   char* weapon_name;
} Weapon;

int *weapon_id=(int*)(base_address);
int *weapon_dmg=(int*)(base_address+0x04);
int *weapon_admg=(int*)(base_address+0x08);
int *weapon_pen1=(int*)(base_address+0x0C);
int *weapon_pen2=(int*)(base_address+0x10);
int *weapon_pen3=(int*)(base_address+0x14);
int *weapon_pen4=(int*)(base_address+0x18);

Weapon weapons[2] = {
{51, 600, 600, 600, 600, 600, 600, "01 Assault rifle / 01 Assault rifle / 01 Assault rifle / 01 Assault rifle / Stratagem weapon", "AR-22C Patriot / AR-23 Liberator / AR-48 Truth Whisperer / Guard Dog / Stalwart"},
{25, 600, 600, 600, 600, 600, 600, "Pistol / Pistol", "P-19 Redeemer / P-2 Peacemaker"}
};

weapon_name = "unknown damage";
damage_type_name = "unknown type";

// strcpy(weapon_name_list, "");
if (*weapon_id != 0) {
  for (int i = 0; i < sizeof(weapons) / sizeof(weapons[0]); ++i) {
    if (weapons[i].id == 0) {
      continue;
    }
      if (*weapon_id == weapons[i].id) {
         // damage id found in hardcoded table above. We can take know weapon name. Put it to weapon_name
         weapon_name = weapons[i].weapon_name;
         damage_type_name = weapons[i].damage_type_name;
         if (weapons[i].damage_value != -1) {
           *weapon_dmg = weapons[i].damage_value;
         }
         if (weapons[i].armor_damage_value != -1) {
           *weapon_admg = weapons[i].armor_damage_value;
         }
         if (weapons[i].penetration1_no_angle_value != -1) {
           *weapon_pen1 = weapons[i].penetration1_no_angle_value;
         }
         if (weapons[i].penetration2_angle_value != -1) {
           *weapon_pen2 = weapons[i].penetration2_angle_value;
         }
         if (weapons[i].penetration3_unknown_value != -1) {
           *weapon_pen3 = weapons[i].penetration3_unknown_value;
         }
         if (weapons[i].penetration4_unknown_value != -1) {
           *weapon_pen4 = weapons[i].penetration4_unknown_value;
         }
         //strcat(weapon_name_list, " / ");
         //strcat(weapon_name_list, weapons[i].name);
         //sprintf(debug_string, "HD2. ID %d is for %s", *weapon_id, weapon_name);
         //OutputDebugStringA(debug_string);
         break;
      }
  }
}
sprintf(debug_string, "HD2 %3d | DMG %3d %3d | PEN %3d %3d %3d %3d | %s %s", *weapon_id, *weapon_dmg, *weapon_admg, *weapon_pen1, *weapon_pen2, *weapon_pen3, *weapon_pen4, damage_type_name, weapon_name);
OutputDebugStringA(debug_string);

{$asm}
  // standart code start
  movd xmm3,[rcx+04]
  movd xmm1,[rcx+08]
  cvtdq2ps xmm1,xmm1
  cvtdq2ps xmm3,xmm3
  // standart code end
  jmp damage_return

damage_inject:
  jmp far damage_newmem
  nop 2

damage_return:

// ------------------------------------------------------

[DISABLE]
Download this program:
[Link]

Run debug view.

Launch game.
Wait until game.dll module loaded.
Activate script in CE.
Right click script in CE and in menu look upper string. If there is no errors you will see usual menu items with 1st item "delete this record - del". If there is errors there will be some string about error. Put it here on the forum.

After script activated, Close CE.

Select your weapons in game (for testing only these two):
main "AR-22C Patriot / AR-23 Liberator / AR-48 Truth Whisperer / Guard Dog / Stalwart"},
pistol "P-19 Redeemer / P-2 Peacemaker"

Start game. shoot somewho. Look into debug view program. Did you see any damage messages? Like:

[20908] HD2 25 | DMG 600 600 | PEN 600 600 600 600 | Pistol / Pistol P-19 Redeemer / P-2 Peacemaker
tried your script and it does work with the weapons you inputted, hopefully it works with the rest of weapons and strategems however is it possible to include the damage reduction from his script

cheatycheater
Novice Cheater
Novice Cheater
Posts: 15
Joined: Thu Jun 04, 2020 5:21 am
Reputation: 3

Re: HELLDIVERS 2

Post by cheatycheater »

While using ZoDDel's latest table, I noticed a couple times while joining a quickplay match that it would show someone else in the leftmost 'hellpod prep' slot, complete with their strategems, and I wasn't able to select anything there. It happened twice for me, but I haven't played much without using the table so maybe it's just the new patch?

Minazuki
What is cheating?
What is cheating?
Posts: 4
Joined: Fri Sep 17, 2021 5:56 am
Reputation: 0

Re: HELLDIVERS 2

Post by Minazuki »

ZoDDeL wrote:
Sat Mar 16, 2024 3:26 am
alternative and simpler guide with slightly different approach with no address input and easier timing.

this guide doesnt make your CE undetected but let you activate scripts and close CE before gameguard notice what happened
so you can cheat without crash / hack detected!
but you cannot use CE to search for stuff or debug the game!!!


follow the text+ picture guide or just watch one of the videos down below
i show the usage at the beginning of each video.

step 1

open CE table and open memory viewer
[Link]


step 2
open the game (my table should hook the game itself if you allow the lua execution and you should allow it!!!)
[Link]


step 3
wait a bit if everything was right you should see the last 2 entries in my table populate with adresses/values (green boxes)
like in this screenshot:
[Link]


now you can hit the checkbox on "all together" to activate it (or individual options above).
then close CE table quick with a click on the X on top right of the CE main window.

THE TABLE
Image
the table is split into 3 sections.
basic scripts and advanced scripts and all in one scripts.
while basic script just search for array of byte pattern and overwrite it (nop or change bytes to jump etc.)
the advanced script do memory allocations, full code with jumps and compares and change values.
the all in one scripts are like presets for alle the scripts in the table.

each section has an "all together" script that bound all features into one (so you dont have to click multiple scripts)
all basic scripts with one star / asterisk * (blue box in screenshot) are put into the alltogether for this section.
all advanced script with two star / asterisk ** (red box in screenshot) are put into the alltogether for this section.
if you activate any single script that is also part of alltogether you cannot activate alltogether anymore!!!

easiest way to just choose one of the AIO scripts (yellow box in screenshot) activate it and close the table.
but better take i look into the scripts before and maybe change values to your needs.



currently whitelisted (damage / armor damage / pentration increased) weapons:
AR-23 Liberator / AR-22C Patriot / AR-48 Truth Whisperer / M-105 Stalwart
P-2 Peacemaker / P-19 Redeemer
SG-225SP Breaker Spray&Pray (16)
P-4 Senator
JAR-5 Dominator
LAS-7 Dagger
LAS-5 Scythe
SMG-37 Defender
LAS-16 Sickle
GL-21
autocannon
R-63CS Diligence Counter SNiper
EAT-17
recoil-less rifle


default weapons(these weapons keep their default values):
G-6 Frag
G-12 High Explosive / G-16 Impact
G-10 Incendiary

//500kg bomb
//orbital laser
//orbital precision strike
//orbital railcannon strike
//orbital 120MM HE barrage

everything else get set down to 0 (enemy attacks, airstrikes, orbital strikes, mines, flame tornados)


showcase instant mission complete + instant extraction timer:




showcase fast rescue mission + instant extraction timer:



older showcase videos



p.s. credits to sunbeam who ignited the idea to check the game.dll
p.p.s basic scripts on my table are manually taken from "version.dll" visual studio builds.
but the script codes (byte arrays etc.) originate from posts here in the forum and on the UC forum.
users like cfemen, gir489 and others.
the most advanced scripts are totally written by me or in parts adapted/improved.
i cut down all scripts to keep the table small and clean.
that including comments, orignal code, credits, registersymbols
The new script make the Game crash everytime I start the mission...

Uberfish
What is cheating?
What is cheating?
Posts: 4
Joined: Wed Apr 24, 2024 3:21 am
Reputation: 0

Re: HELLDIVERS 2

Post by Uberfish »

Is the temp unlock all option not working/are there armors and helmets missing from it? I can't tell if they removed some stuff from the game files or if the script is bugged.
Not a big deal if it is! Just was curious

sinner2469
Cheater
Cheater
Posts: 29
Joined: Fri Apr 23, 2021 10:24 am
Reputation: 1

Re: HELLDIVERS 2

Post by sinner2469 »

Uberfish wrote:
Wed May 01, 2024 6:36 am
Is the temp unlock all option not working/are there armors and helmets missing from it? I can't tell if they removed some stuff from the game files or if the script is bugged.
Not a big deal if it is! Just was curious
would love to know this also if its the cheat not fully working or if arrowhead changed some thing on there end to make this happen

Vitali
What is cheating?
What is cheating?
Posts: 3
Joined: Sat Apr 20, 2024 1:46 am
Reputation: 0

Re: HELLDIVERS 2

Post by Vitali »

gir489 wrote:
Tue Apr 30, 2024 1:33 pm

While I've never asked anyone for a dime, it really does piss me off that people like cuckhappens, this dude, and many others just fucking steal my work and sell it.
I like to donate for things I have no skill at, but am able to enjoy the benefits of. I would love to send you a donation, but you have no link for Paypal or anything. I know you're not asking, but still. I appreciate your time, effort, and talent.

Exemplify1524
Cheater
Cheater
Posts: 34
Joined: Tue Apr 30, 2024 8:37 am
Reputation: 18

Re: HELLDIVERS 2

Post by Exemplify1524 »

elamigopaisa wrote:
Wed May 01, 2024 3:49 am
Exemplify1524 wrote:
Wed May 01, 2024 1:48 am
elamigopaisa wrote:
Wed May 01, 2024 1:31 am


for some reason none of the IDS are working for me, dont know what im doing wrong
Right now im testing remake of ZoDDel script. Try this script it is working for me 100%:

Code: Select all

[ENABLE]
aobscanmodule(damage_inject,game.dll,66 0F 6E 59 04 66 0F 6E 49 08 0F 5B C9 0F 5B DB)
alloc(damage_newmem,$10000)
label(damage_return)

//label(damage_change)
//label(damage_and_penetration_change)
//label(damage_no_change)

//alloc(damage_ratio,4)
//registersymbol(damage_ratio)

damage_newmem:
// push rbx //save rbx as it's going to be changed

{$ccode base_address=rcx}
extern __cdecl int sprintf(char *, char *, ...);
extern __cdecl void OutputDebugStringA(const char* lpOutputString);

//extern float damage_ratio;
//extern void damage_change();
//extern void damage_and_penetration_change();
//extern void damage_no_change();

char debug_string[400];
char* weapon_name;
char* damage_type_name;

typedef struct {
   int id;
   int damage_value;
   int armor_damage_value;
   int penetration1_no_angle_value;
   int penetration2_angle_value;
   int penetration3_unknown_value;
   int penetration4_unknown_value;
   char* damage_type_name;
   char* weapon_name;
} Weapon;

int *weapon_id=(int*)(base_address);
int *weapon_dmg=(int*)(base_address+0x04);
int *weapon_admg=(int*)(base_address+0x08);
int *weapon_pen1=(int*)(base_address+0x0C);
int *weapon_pen2=(int*)(base_address+0x10);
int *weapon_pen3=(int*)(base_address+0x14);
int *weapon_pen4=(int*)(base_address+0x18);

Weapon weapons[2] = {
{51, 600, 600, 600, 600, 600, 600, "01 Assault rifle / 01 Assault rifle / 01 Assault rifle / 01 Assault rifle / Stratagem weapon", "AR-22C Patriot / AR-23 Liberator / AR-48 Truth Whisperer / Guard Dog / Stalwart"},
{25, 600, 600, 600, 600, 600, 600, "Pistol / Pistol", "P-19 Redeemer / P-2 Peacemaker"}
};

weapon_name = "unknown damage";
damage_type_name = "unknown type";

// strcpy(weapon_name_list, "");
if (*weapon_id != 0) {
  for (int i = 0; i < sizeof(weapons) / sizeof(weapons[0]); ++i) {
    if (weapons[i].id == 0) {
      continue;
    }
      if (*weapon_id == weapons[i].id) {
         // damage id found in hardcoded table above. We can take know weapon name. Put it to weapon_name
         weapon_name = weapons[i].weapon_name;
         damage_type_name = weapons[i].damage_type_name;
         if (weapons[i].damage_value != -1) {
           *weapon_dmg = weapons[i].damage_value;
         }
         if (weapons[i].armor_damage_value != -1) {
           *weapon_admg = weapons[i].armor_damage_value;
         }
         if (weapons[i].penetration1_no_angle_value != -1) {
           *weapon_pen1 = weapons[i].penetration1_no_angle_value;
         }
         if (weapons[i].penetration2_angle_value != -1) {
           *weapon_pen2 = weapons[i].penetration2_angle_value;
         }
         if (weapons[i].penetration3_unknown_value != -1) {
           *weapon_pen3 = weapons[i].penetration3_unknown_value;
         }
         if (weapons[i].penetration4_unknown_value != -1) {
           *weapon_pen4 = weapons[i].penetration4_unknown_value;
         }
         //strcat(weapon_name_list, " / ");
         //strcat(weapon_name_list, weapons[i].name);
         //sprintf(debug_string, "HD2. ID %d is for %s", *weapon_id, weapon_name);
         //OutputDebugStringA(debug_string);
         break;
      }
  }
}
sprintf(debug_string, "HD2 %3d | DMG %3d %3d | PEN %3d %3d %3d %3d | %s %s", *weapon_id, *weapon_dmg, *weapon_admg, *weapon_pen1, *weapon_pen2, *weapon_pen3, *weapon_pen4, damage_type_name, weapon_name);
OutputDebugStringA(debug_string);

{$asm}
  // standart code start
  movd xmm3,[rcx+04]
  movd xmm1,[rcx+08]
  cvtdq2ps xmm1,xmm1
  cvtdq2ps xmm3,xmm3
  // standart code end
  jmp damage_return

damage_inject:
  jmp far damage_newmem
  nop 2

damage_return:

// ------------------------------------------------------

[DISABLE]
Download this program:
[Link]

Run debug view.

Launch game.
Wait until game.dll module loaded.
Activate script in CE.
Right click script in CE and in menu look upper string. If there is no errors you will see usual menu items with 1st item "delete this record - del". If there is errors there will be some string about error. Put it here on the forum.

After script activated, Close CE.

Select your weapons in game (for testing only these two):
main "AR-22C Patriot / AR-23 Liberator / AR-48 Truth Whisperer / Guard Dog / Stalwart"},
pistol "P-19 Redeemer / P-2 Peacemaker"

Start game. shoot somewho. Look into debug view program. Did you see any damage messages? Like:

[20908] HD2 25 | DMG 600 600 | PEN 600 600 600 600 | Pistol / Pistol P-19 Redeemer / P-2 Peacemaker
tried your script and it does work with the weapons you inputted, hopefully it works with the rest of weapons and strategems however is it possible to include the damage reduction from his script
Yes you can add weapons you want in this block

Weapon weapons[2] = {
{51, 600, 600, 600, 600, 600, 600, "01 Assault rifle / 01 Assault rifle / 01 Assault rifle / 01 Assault rifle / Stratagem weapon", "AR-22C Patriot / AR-23 Liberator / AR-48 Truth Whisperer / Guard Dog / Stalwart"},
{25, 600, 600, 600, 600, 600, 600, "Pistol / Pistol", "P-19 Redeemer / P-2 Peacemaker"}
};

The structure of records are this:
struct {
int id;
int damage_value;
int armor_damage_value;
int penetration1_no_angle_value;
int penetration2_angle_value;
int penetration3_unknown_value;
int penetration4_unknown_value;
char* damage_type_name;
char* weapon_name;

So latest 2 strings:
, "01 Assault rifle / 01 Assault rifle / 01 Assault rifle / 01 Assault rifle / Stratagem weapon", "AR-22C Patriot / AR-23 Liberator / AR-48 Truth Whisperer / Guard Dog / Stalwart"}
Is only for debugging purposes.yoy can dpecify empty strings loke "", ""}
Main part when you will add new damage ids to table is

{51, 600, 600, 600, 600, 600, 600

51 is id you want to modify
Other 6 values are damages for this id

int damage_value;
int armor_damage_value;
int penetration1_no_angle_value;
int penetration2_angle_value;
int penetration3_unknown_value;
int penetration4_unknown_value;

If you want reduce damage yoy can specify 1 or 0 for all 6 values.


So for example to add amat rifle you change like that

Weapon weapons[3] = {
{51, 600, 600, 600, 600, 600, 600, "01 Assault rifle / 01 Assault rifle / 01 Assault rifle / 01 Assault rifle / Stratagem weapon", "AR-22C Patriot / AR-23 Liberator / AR-48 Truth Whisperer / Guard Dog / Stalwart"},
{25, 600, 600, 600, 600, 600, 600, "Pistol / Pistol", "P-19 Redeemer / P-2 Peacemaker"},

{122, 60, 60, 60, 0, 0, 0, "my sniper armory", "My amat rifle"}

};


To reduce

icysnow
Noobzor
Noobzor
Posts: 7
Joined: Tue May 12, 2020 4:38 pm
Reputation: 0

Re: HELLDIVERS 2

Post by icysnow »

Minazuki wrote:
Wed May 01, 2024 5:38 am
ZoDDeL wrote:
Sat Mar 16, 2024 3:26 am
alternative and simpler guide with slightly different approach with no address input and easier timing.

this guide doesnt make your CE undetected but let you activate scripts and close CE before gameguard notice what happened
so you can cheat without crash / hack detected!
but you cannot use CE to search for stuff or debug the game!!!


follow the text+ picture guide or just watch one of the videos down below
i show the usage at the beginning of each video.

step 1

open CE table and open memory viewer
[Link]


step 2
open the game (my table should hook the game itself if you allow the lua execution and you should allow it!!!)
[Link]


step 3
wait a bit if everything was right you should see the last 2 entries in my table populate with adresses/values (green boxes)
like in this screenshot:
[Link]


now you can hit the checkbox on "all together" to activate it (or individual options above).
then close CE table quick with a click on the X on top right of the CE main window.

THE TABLE
Image
the table is split into 3 sections.
basic scripts and advanced scripts and all in one scripts.
while basic script just search for array of byte pattern and overwrite it (nop or change bytes to jump etc.)
the advanced script do memory allocations, full code with jumps and compares and change values.
the all in one scripts are like presets for alle the scripts in the table.

each section has an "all together" script that bound all features into one (so you dont have to click multiple scripts)
all basic scripts with one star / asterisk * (blue box in screenshot) are put into the alltogether for this section.
all advanced script with two star / asterisk ** (red box in screenshot) are put into the alltogether for this section.
if you activate any single script that is also part of alltogether you cannot activate alltogether anymore!!!

easiest way to just choose one of the AIO scripts (yellow box in screenshot) activate it and close the table.
but better take i look into the scripts before and maybe change values to your needs.



currently whitelisted (damage / armor damage / pentration increased) weapons:
AR-23 Liberator / AR-22C Patriot / AR-48 Truth Whisperer / M-105 Stalwart
P-2 Peacemaker / P-19 Redeemer
SG-225SP Breaker Spray&Pray (16)
P-4 Senator
JAR-5 Dominator
LAS-7 Dagger
LAS-5 Scythe
SMG-37 Defender
LAS-16 Sickle
GL-21
autocannon
R-63CS Diligence Counter SNiper
EAT-17
recoil-less rifle


default weapons(these weapons keep their default values):
G-6 Frag
G-12 High Explosive / G-16 Impact
G-10 Incendiary

//500kg bomb
//orbital laser
//orbital precision strike
//orbital railcannon strike
//orbital 120MM HE barrage

everything else get set down to 0 (enemy attacks, airstrikes, orbital strikes, mines, flame tornados)


showcase instant mission complete + instant extraction timer:




showcase fast rescue mission + instant extraction timer:



older showcase videos



p.s. credits to sunbeam who ignited the idea to check the game.dll
p.p.s basic scripts on my table are manually taken from "version.dll" visual studio builds.
but the script codes (byte arrays etc.) originate from posts here in the forum and on the UC forum.
users like cfemen, gir489 and others.
the most advanced scripts are totally written by me or in parts adapted/improved.
i cut down all scripts to keep the table small and clean.
that including comments, orignal code, credits, registersymbols
The new script make the Game crash everytime I start the mission...
It only crashes if you use it on planets with newly issued MOs and instant complete all missions. It works on other planets

Exemplify1524
Cheater
Cheater
Posts: 34
Joined: Tue Apr 30, 2024 8:37 am
Reputation: 18

Re: HELLDIVERS 2

Post by Exemplify1524 »

latest and full version of modified ZoDDels damage script rewritten in ccode to more usability and changebility. good to use with table [Link]

main part is
// default damage multiplier for all damages.
damage_ratio = 0.2f;

and the weapons table
{51, 100.0f, -1, -1, 100, 100, 100, 100, "AR-22C Patriot / AR-23 Liberator / AR-48 Truth Whisperer / Guard Dog / Stalwart"},

51 is ID
100.0f is damage and armor damage multiplier (damage * multiplier)
-1 is damage (-1 for not change, for example to only multiply default value)
-1 is armor damage
100 is penetration1 at no angle is set to 100 (you can use -1 to not change)
100 is penetration2 with angle is set to 100 (you can use -1 to not change)
100 is penetration3 unknown is set to 100 (you can use -1 to not change)
100 is penetration4 unknown is set to 100 (you can use -1 to not change)

also damage monitoring with miscosoft DebugView tool is working.

Code: Select all

[ENABLE]
aobscanmodule(damage_inject,game.dll,66 0F 6E 59 04 66 0F 6E 49 08 0F 5B C9 0F 5B DB)
alloc(damage_newmem,$10000)
label(damage_return)

//label(damage_change)
//label(damage_and_penetration_change)
//label(damage_no_change)
//label(damage_multiplier)


alloc(damage_ratio,4)
registersymbol(damage_ratio)


damage_newmem:
// push rbx //save rbx as it's going to be changed

{$ccode base_address=rcx jmpaddress=rbx}
extern __cdecl int sprintf(char *, char *, ...);
extern __cdecl void OutputDebugStringA(const char* lpOutputString);

extern float damage_ratio;

//extern void damage_change();
//extern void damage_and_penetration_change();
//extern void damage_no_change();

char debug_string[400];
char* weapon_name;
//float unknown_damage_mult = 0.2f;
//bool damage_is_unknown;
// char* damage_type_name;

typedef struct {
   int id;
   float damage_mult;
   int damage_value;
   int armor_damage_value;
   int penetration1_no_angle_value;
   int penetration2_angle_value;
   int penetration3_unknown_value;
   int penetration4_unknown_value;
   char* weapon_name;
} Weapon;

int *weapon_id=(int*)(base_address);
int *weapon_dmg=(int*)(base_address+0x04);
int *weapon_admg=(int*)(base_address+0x08);
int *weapon_pen1=(int*)(base_address+0x0C);
int *weapon_pen2=(int*)(base_address+0x10);
int *weapon_pen3=(int*)(base_address+0x14);
int *weapon_pen4=(int*)(base_address+0x18);

Weapon weapons[76] = {
{326,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Helldiver melee"},
{50,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"AR-23C Liberator Concussive"},
{48,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"AR-23P Liberator Penetrator"},
{51,	100.0f,	-1,	-1,	100,	100,	100,	100,	"AR-22C Patriot / AR-23 Liberator / AR-48 Truth Whisperer / Guard Dog / Stalwart"},
{73,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"R-63 Diligence"},
{74,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"R-63CS Diligence Counter Sniper"},
{65,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"AR-20L Justice / BR-14 Adjudicator / Machine Gun / Gatling/Machine Gun Sentry"},
{26,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"MP-98 Knight"},
{34,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"SG-8S / SMG-37 Defender"},
{117,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"ARC-12 Blitzer"},
{93,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Break action shotgun"},
{102,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"SG-225 Breaker"},
{103,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"SG-225BB Breaker Bugbiter"},
{104,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"SG-225NS Breaker Nailspitter"},
{101,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"SG-225SP Breaker Spray&Pray"},
{105,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"SG-255IE Breaker Incendiary"},
{88,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"SG-8 Punisher"},
{99,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"SG-8S Slugger"},
{124,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"CB-9 Exploding Crossbow"},
{84,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"JAR-5 Dominator"},
{80,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"R-36 Eruptor"},
{19,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"LAS-16 Sickle"},
{297,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"LAS-5 Scythe"},
{20,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"PLAS-1 Scorcher / SG-8P Punisher Plasma"},
{134,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"GP-31 Grenade Pistol"},
{296,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"LAS-7 Dagger"},
{44,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"P-4 Senator"},
{25,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"P-19 Redeemer / P-2 Peacemaker"},
{203,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"G-10 Incendiary"},
{201,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"G-6 Frag part 1"},
{201,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"G-6 Frag part 1"},
{111,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"G-6 Frag part 2"},
{213,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"G-12 High Explosive / G-16 Impact"},
{204,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"G-123 Thermite"},
{122,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Antimaterial Rifle"},
{115,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"ARC3 Thrower"},
{127,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Autocannon (part 1/2)"},
{216,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Autocannon (part 2/2)"},
{145,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Commando"},
{135,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"EAT-17 Expendable Anti-Tank part 1"},
{189,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"EAT-17 Expendable Anti-Tank part 2"},
{226,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"EAT-17 Expendable Anti-Tank part 3"},
{129,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"EXO-45 Emancipator gun part 1"},
{217,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"EXO-45 Emancipator gun part 2"},
{147,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"EXO-45 Emancipator rocket part 1"},
{234,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"EXO-45 Emancipator rocket part 2"},
{9,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"FLAM-40 Flamethrower part 1"},
{220,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"GL-21 Grenade launcher part 2 explosion"},
{121,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Heavy Machinegun"},
{149,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Javelin rocket part 1"},
{236,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Javelin rocket part 2"},
{302,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"LAS-98 Laser Cannon"},
{227,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Quasar Cannon part 1"},
{228,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Quasar Cannon part 2"},
{280,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Quasar Cannon part 3 (???)"},
{136,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Recoiless Rifle part 1 shell"},
{225,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Recoiless Rifle part 2 explosion"},
{22,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"RS-422 Railgun"},
{10,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"GL-21 Grenade launcher part 1 / Mortar Sentry shell"},
{11,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Grenade Launcher / EMS Mortar Sentry / Mortar Sentry 1"},
{223,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Mortar Sentry 2"},
{126,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Tesla Tower"},
{241,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"AntiPersonal MineField / Eagle 110mm rocket pods part 2"},
{154,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"500kg bomb1 shell"},
{273,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"500kg bomb2 explosion"},
{152,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Eagle 110mm rocket pods part 1"},
{142,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Eagle airstrike part 1"},
{254,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Eagle airstrike part 2"},
{229,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Eagle cluster bomb"},
{159,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Orbital 120MM HE barrage1"},
{268,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Orbital 120MM HE barrage2"},
{305,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Orbital laser"},
{160,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Orbital precision strike1"},
{267,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Orbital precision strike2"},
{161,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Orbital railcannon strike1"},
{266,	1.0f,	-1,	-1,	-1,	-1,	-1,	-1,	"Orbital railcannon strike2"}
};


// damage_type_name = "unknown type";

// strcpy(weapon_name_list, "");

// default damage multiplier for all damages.
damage_ratio = 0.2f;

if (*weapon_id != 0) {
  // set default values. May change during analyzing table later.
  weapon_name = "unknown damage";
  //damage_is_unknown = true;

  // analyzing if we have damage_id  in table
  for (int i = 0; i < sizeof(weapons) / sizeof(weapons[0]); ++i) {
    if (weapons[i].id == 0) {
      continue;
    }

    if (*weapon_id == weapons[i].id) {
       // damage_is_unknown = false; // we have this damage_id in table. So set flag 'damage_is_unknown' to false, with this we will not apply unknown_damage debuffer to this damage latter

       weapon_name = weapons[i].weapon_name;  // is only for debugging. Used only in sprintf and OutputDebugString latter

       // damage_type_name = weapons[i].damage_type_name;

       if (weapons[i].damage_value != -1) {
         *weapon_dmg = weapons[i].damage_value;
       }
       if (weapons[i].armor_damage_value != -1) {
         *weapon_admg = weapons[i].armor_damage_value;
       }
       if (weapons[i].penetration1_no_angle_value != -1) {
         *weapon_pen1 = weapons[i].penetration1_no_angle_value;
       }
       if (weapons[i].penetration2_angle_value != -1) {
         *weapon_pen2 = weapons[i].penetration2_angle_value;
       }
       if (weapons[i].penetration3_unknown_value != -1) {
         *weapon_pen3 = weapons[i].penetration3_unknown_value;
       }
       if (weapons[i].penetration4_unknown_value != -1) {
         *weapon_pen4 = weapons[i].penetration4_unknown_value;
       }

       // apply damage multiplier
       damage_ratio = weapons[i].damage_mult;

       //strcat(weapon_name_list, " / ");
       //strcat(weapon_name_list, weapons[i].name);
       //sprintf(debug_string, "HD2. ID %d is for %s", *weapon_id, weapon_name);
       //OutputDebugStringA(debug_string);
       break;
    }
  }

  // If damage_id was not found in table. Then assume it is some enemy or environmental damage.  Apply 'unknown_damage_mult' to it (reduce)
  /*
  if (damage_is_unknown) {
     *weapon_dmg = (int)((float)*weapon_dmg * unknown_damage_mult);
     *weapon_admg = (int)((float)*weapon_admg * unknown_damage_mult);
     *weapon_pen1 = (int)((float)*weapon_pen1 * unknown_damage_mult);
     *weapon_pen2 = (int)((float)*weapon_pen2 * unknown_damage_mult);
     *weapon_pen3 = (int)((float)*weapon_pen3 * unknown_damage_mult);
     *weapon_pen4 = (int)((float)*weapon_pen4 * unknown_damage_mult);
  }*/

  sprintf(debug_string, "HD2 %3d | DMG %3d %3d | PEN %3d %3d %3d %3d | %s", *weapon_id, *weapon_dmg, *weapon_admg, *weapon_pen1, *weapon_pen2, *weapon_pen3, *weapon_pen4, weapon_name);
  OutputDebugStringA(debug_string);
} // weapon_id != 0



{$asm}
  // standart code start
  movd xmm3,[rcx+04]
  movd xmm1,[rcx+08]
  cvtdq2ps xmm1,xmm1
  cvtdq2ps xmm3,xmm3
  // standart code end
  // damage_ratio part
  mulss xmm3, dword ptr [damage_ratio]
  mulss xmm1, dword ptr [damage_ratio]
  jmp damage_return

damage_inject:
  jmp far damage_newmem
  nop 2

damage_return:

// ------------------------------------------------------

[DISABLE]

Post Reply

Who is online

Users browsing this forum: Bing [Bot], bsab80, explosivo, Google Adsense [Bot], heir, Mr. Seth Marshall, oracular, SemrushBot