HELLDIVERS 2

Upload your cheat tables here (No requests)
0CrossTrigger0
Cheater
Cheater
Posts: 48
Joined: Wed May 22, 2024 9:05 am
Reputation: 3

Re: HELLDIVERS 2

Post by 0CrossTrigger0 »

Passer556 wrote:
Wed May 22, 2024 12:47 pm
0CrossTrigger0 wrote:
Wed May 22, 2024 12:30 pm
dmg_Super:
mov [rcx+0C],#777 // writes penetration value 1
mov [rcx+10],#777 // writes penetration value 2
mov [rcx+14],#777 // writes penetration value 3
mov [rcx+18],#777 // writes penetration value 4
mov [rcx+1C],#50 // writes demolition value
mov [rcx+20],#50 // writes pushback / stagger value
If you don't want any "tell" aside from triple damage, just delete this whole thing. Aside from the "dmg_Super:" that is, don't delete that.
Add "//" before mov so the whole line turns blue to disable specific part of script but leave it in the table in case you still want it later.
Full Pennetration would cause impossible shot to happen, like shooting a Charger's head clean off with Peacemaker.
High demo will make your attack destory things it shouldn't, most bullet only have 10 in demo, at 20 can open container door, at 40 can destory Fabber or Bug Hole even if not hit in the weak spot.
Similarly, High Stagger force would ....Stagger enemy when it shouldn't, 50 is same the force as a Recoiless Rifle.
What I did so far is put "//" on everything on the dmg_Enemy, for dmg_Super I put "//" on everything except for mov [rcx+1C],#20 // writes demolition value then set the dmg_multiplier and admg_multiplier both to 10. Do you think it's seamless that way?

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

ikstarven
Novice Cheater
Novice Cheater
Posts: 18
Joined: Sat Feb 24, 2024 6:27 am
Reputation: 2

Re: HELLDIVERS 2

Post by ikstarven »

JKTrigger wrote:
Wed May 22, 2024 8:19 am
Appreciate your work. It's just that if I want to customize the weapon damage, I need to change it on the CE every time I start the game. Is there any way to save the results of my last modification and load them with one click on the next startup? :?
just save the CE table after you did everything lol, if it's about zoddel's editing weapons, that armory on click editor cant be saved tho, it reads stuff after the armory is opened

Passer556
Novice Cheater
Novice Cheater
Posts: 17
Joined: Mon May 22, 2017 12:16 pm
Reputation: 9

Re: HELLDIVERS 2

Post by Passer556 »

0CrossTrigger0 wrote:
Wed May 22, 2024 12:56 pm
What I did so far is put "//" on everything on the dmg_Enemy, for dmg_Super I put "//" on everything except for mov [rcx+1C],#20 // writes demolition value then set the dmg_multiplier and admg_multiplier both to 10. Do you think it's seamless that way?
1/10 the TTK? Uh...maybe? I think with 3 times the damage most mob enemy would already die from 1 or 2 hit into their weak spot. 10 times might even one shot things that are supposed to be tanky.

And obviously don't open containers with your gun when people are watching.

0CrossTrigger0
Cheater
Cheater
Posts: 48
Joined: Wed May 22, 2024 9:05 am
Reputation: 3

Re: HELLDIVERS 2

Post by 0CrossTrigger0 »

Passer556 wrote:
Wed May 22, 2024 1:11 pm
0CrossTrigger0 wrote:
Wed May 22, 2024 12:56 pm
What I did so far is put "//" on everything on the dmg_Enemy, for dmg_Super I put "//" on everything except for mov [rcx+1C],#20 // writes demolition value then set the dmg_multiplier and admg_multiplier both to 10. Do you think it's seamless that way?
1/10 the TTK? Uh...maybe? I think with 3 times the damage most mob enemy would already die from 1 or 2 hit into their weak spot. 10 times might even one shot things that are supposed to be tanky.

And obviously don't open containers with your gun when people are watching.
Ok so for the dmg and admg better set it to like 1.5? Then all the one I applied the "//"is correct? Lastly should I also put the "//" on the demolition?

User avatar
ZoDDeL
Table Makers
Table Makers
Posts: 153
Joined: Mon May 08, 2017 9:37 am
Reputation: 315

Re: HELLDIVERS 2

Post by ZoDDeL »

0CrossTrigger0 wrote:
Wed May 22, 2024 1:39 pm
Passer556 wrote:
Wed May 22, 2024 1:11 pm
0CrossTrigger0 wrote:
Wed May 22, 2024 12:56 pm
What I did so far is put "//" on everything on the dmg_Enemy, for dmg_Super I put "//" on everything except for mov [rcx+1C],#20 // writes demolition value then set the dmg_multiplier and admg_multiplier both to 10. Do you think it's seamless that way?
1/10 the TTK? Uh...maybe? I think with 3 times the damage most mob enemy would already die from 1 or 2 hit into their weak spot. 10 times might even one shot things that are supposed to be tanky.

And obviously don't open containers with your gun when people are watching.
Ok so for the dmg and admg better set it to like 1.5? Then all the one I applied the "//"is correct? Lastly should I also put the "//" on the demolition?
1.5 would be a boost of 50% to original weapon damage. while weak weapons with 60 dmg would go to 90
big weapons that do 600 go to 900.
pretty straight forward.

another approach would be to change from multi to add
under
dmg_Super:

you could change these lines>>>
mulss xmm3, dword ptr [dmg_multiplier]
mulss xmm1, dword ptr [admg_multiplier]

and edit mulss to addss
this way the dmg_multiplier and admg_multiplier values wont multiply the weapon damage but
add to it.
or force static dmg with movss.

as example:

base dmg 60
mulss dmg_multiplier (x20)
= 1200 dmg

base dmg 60
addss dmg_multiplier (200)
= 260 dmg

base dmg 60
movss dmg_multiplier (200)
= 200 dmg

as you can see mulss is linear but way stronger the higher the base dmg is.
addss is very strong for weak weapons but goes weaker for strong weapons.
movss just sets a static value to dmg.


then you have to ask yourself about dmg vs admg
dmg is the plain damage while admg destroys armor/limbs body parts.
admg + high penetration rips of bug and robots parts very quick
if you set pen low a high admg multi doesnt do anything anymore because you just bounce off.
a high pen but low/no admg value does just penetrate through armor and does dmg to bug/bot
but wont rip their body/armor parts off.

so you either exclude the admg line with // infront of that line
or you lower/exclude the penetration lines.

the demolation value is only to destroy objects like buildings, containers(doors) etc.

after changing stuff click on the ok button to apply the changes to the script and then save the table (file > save or save as)
to keep the changes.

0CrossTrigger0
Cheater
Cheater
Posts: 48
Joined: Wed May 22, 2024 9:05 am
Reputation: 3

Re: HELLDIVERS 2

Post by 0CrossTrigger0 »

ZoDDeL wrote:
Wed May 22, 2024 7:22 pm
0CrossTrigger0 wrote:
Wed May 22, 2024 1:39 pm
Passer556 wrote:
Wed May 22, 2024 1:11 pm


1/10 the TTK? Uh...maybe? I think with 3 times the damage most mob enemy would already die from 1 or 2 hit into their weak spot. 10 times might even one shot things that are supposed to be tanky.

And obviously don't open containers with your gun when people are watching.
Ok so for the dmg and admg better set it to like 1.5? Then all the one I applied the "//"is correct? Lastly should I also put the "//" on the demolition?
1.5 would be a boost of 50% to original weapon damage. while weak weapons with 60 dmg would go to 90
big weapons that do 600 go to 900.
pretty straight forward.

another approach would be to change from multi to add
under
dmg_Super:

you could change these lines>>>
mulss xmm3, dword ptr [dmg_multiplier]
mulss xmm1, dword ptr [admg_multiplier]

and edit mulss to addss
this way the dmg_multiplier and admg_multiplier values wont multiply the weapon damage but
add to it.
or force static dmg with movss.

as example:

base dmg 60
mulss dmg_multiplier (x20)
= 1200 dmg

base dmg 60
addss dmg_multiplier (200)
= 260 dmg

base dmg 60
movss dmg_multiplier (200)
= 200 dmg

as you can see mulss is linear but way stronger the higher the base dmg is.
addss is very strong for weak weapons but goes weaker for strong weapons.
movss just sets a static value to dmg.


then you have to ask yourself about dmg vs admg
dmg is the plain damage while admg destroys armor/limbs body parts.
admg + high penetration rips of bug and robots parts very quick
if you set pen low a high admg multi doesnt do anything anymore because you just bounce off.
a high pen but low/no admg value does just penetrate through armor and does dmg to bug/bot
but wont rip their body/armor parts off.

so you either exclude the admg line with // infront of that line
or you lower/exclude the penetration lines.

the demolation value is only to destroy objects like buildings, containers(doors) etc.

after changing stuff click on the ok button to apply the changes to the script and then save the table (file > save or save as)
to keep the changes.
So what would be the best way to approach this? I just really need a little bit of advantage with the damage but not one shooting everything. Once I get home from work I'll apply every instructions you have for the super damage :)

User avatar
gir489
RCE Fanatics
RCE Fanatics
Posts: 801
Joined: Mon May 08, 2017 4:08 am
Reputation: 616

Re: HELLDIVERS 2

Post by gir489 »

For some reason, the damage script's IDs for a lot of the oribtals were wrong, it was quite frustrating when I dropped a railcannon on a bile titan only for him to not even care. I manually logged and updated both tables on the 1st page, so it should be fixed.

Here's a video of a bird.


renarduwu
What is cheating?
What is cheating?
Posts: 4
Joined: Wed May 01, 2024 9:30 pm
Reputation: 1

Re: HELLDIVERS 2

Post by renarduwu »

Can someone fix the overheat script? Ive seem a lot of people asking it here, so pls pls? Or at least fix the magazines not being infinite on the primaries and secondary.

User avatar
gir489
RCE Fanatics
RCE Fanatics
Posts: 801
Joined: Mon May 08, 2017 4:08 am
Reputation: 616

Re: HELLDIVERS 2

Post by gir489 »

renarduwu wrote:
Thu May 23, 2024 5:27 pm
Can someone fix the overheat script? Ive seem a lot of people asking it here, so pls pls? Or at least fix the magazines not being infinite on the primaries and secondary.
IDK what you're talking about, my No Reload script works fine.

phineas
What is cheating?
What is cheating?
Posts: 3
Joined: Fri May 24, 2024 7:42 pm
Reputation: 1

Re: HELLDIVERS 2

Post by phineas »

"overheat" probably means these weapons:
LAS-5 Scythe (Primary)
LAS-7 Dagger (Secondary)
LAS-98 Laser Cannon (Support)
LAS-99 Quasar Cannon (Support)

Thanks for all the great work so far. The game is a lot more fun with these mods.

JKTrigger
Novice Cheater
Novice Cheater
Posts: 16
Joined: Wed May 22, 2024 8:17 am
Reputation: 1

Re: HELLDIVERS 2

Post by JKTrigger »

When I changed the damage script, I commented out "jmp dmg_Enemy" by mistake, causing each enemy to have "super damage". ;)
By the way, what does “ mov [rcx+24],#100 // writes m_unk1 value” mean? Part damage value ratio? Like why does a railgun require so many shoots to break the turret's weak point?

DarkestLite
Novice Cheater
Novice Cheater
Posts: 17
Joined: Tue Mar 26, 2024 3:24 pm
Reputation: 0

Re: HELLDIVERS 2

Post by DarkestLite »

Exemplify1524 wrote:
Tue May 21, 2024 5:08 pm
ZoDDel's (gir489) modified runspeed and sample pickup scripts.

Run script modifications:
Hold space to run 5x fast (added latest ZoDDels update, so this applies to player in ship too, and to mech too). ENEMIES run 5x SLOWER while pressing. (5x can be changed)
Hold righ mouse button to run 1.5x faster (more comfort in aim mode). (should work only for player and mech)
Dont press nothing you run 1.1 faster (can change) (should work for player and mech)

Sample pickup script modifications:
Hold C (crouch) while taking sample and you will get samples you set in script (ex. 50 + 40 + 10).
Hold Q while taking sample and you will get 1 sample (no cheat mode)
Dont hold anythink while taking sample and you will get value you set in script (+10 by default)

Runspeed have global section connected with sample pickup script.

On start game, take 1 sample so samples structure will be detected.
After that select sample you want to edit by pressing NUM7 = common, NUM8 = rare, NUM9 = SUPER
After that press NUM+ or NUM- to edit selected sample value. in realtime (+1 or -1). If hold Ctrl while pressing - or + then you will get +10 or -10 with 1 keypress.

This is useful if you play with players and you already make 100 samples. But one of the player take one more sample and you get >100 in sum.
Then you can simply select for example RARE samples (press NUM8 to select RARE) and decrease this value by pressing NUM-.

Very small amount of time tested, so feedback (working/not working) (somethink is not comfortable or have idea) is appreciated.
Spoiler

Code: Select all

{ Author            : gir489
  Modder: Anton 11.05.2024

  Press HOTKEY to run faster
}
{$c}
// YOU CAN EDIT SECTION START
#define SPEED_MULTIPLIER_DEFAULT_VALUE 1.1f
#define SPEED_MULTIPLIER_AIM_HOTKEY VK_RBUTTON
#define SPEED_MULTIPLIER_AIM_VALUE 1.5f

#define SPEED_MULTIPLIER_HOTKEY VK_SPACE
#define SPEED_MULTIPLIER_VALUE 5.0f
//GLOBAL TEST START
#define SAMPLE_SELECTOR_HOTKEY_COMMON VK_NUMPAD7
#define SAMPLE_SELECTOR_HOTKEY_RARE VK_NUMPAD8
#define SAMPLE_SELECTOR_HOTKEY_SUPER VK_NUMPAD9
// YOU CAN EDIT SECTION END
int SAMPLE_SELECTED = 0;
#define SAMPLE_SELECTOR_INC_HOTKEY VK_ADD
char SAMPLE_SELECTOR_INC_HOTKEY_LAST_STATE = 0;
#define SAMPLE_SELECTOR_DEC_HOTKEY VK_SUBTRACT
char SAMPLE_SELECTOR_DEC_HOTKEY_LAST_STATE = 0;
#define SAMPLE_SELECTOR_MULT_HOTKEY VK_CONTROL
extern int *SAMPLES_COMMON;
extern int *SAMPLES_RARE;
extern int *SAMPLES_SUPER;
//GLOBAL TEST END


#define NO_OLDNAMES
#include <windows.h>
short GetAsyncKeyState(int);
{$asm}

[ENABLE]
aobscanmodule(aob_RunSpeed,game.dll,F3 41 0F 59 56 0C F3 41 0F 59 56 10 0F 28 E2)
registersymbol(aob_RunSpeed)
alloc(newmem_RunSpeed,1024)
label(return_RunSpeed)

newmem_RunSpeed:
{$ccode pawn_base=r14}
//extern struct Samples *g_samples;
// GLOBAL SECTION START
if (GetAsyncKeyState(SAMPLE_SELECTOR_HOTKEY_COMMON) & 0x8000) {
  SAMPLE_SELECTED = 1;
} else if (GetAsyncKeyState(SAMPLE_SELECTOR_HOTKEY_RARE) & 0x8000) {
  SAMPLE_SELECTED = 2;
} else if (GetAsyncKeyState(SAMPLE_SELECTOR_HOTKEY_SUPER) & 0x8000) {
  SAMPLE_SELECTED = 3;
}

int add_value = 0;
if (GetAsyncKeyState(SAMPLE_SELECTOR_INC_HOTKEY) & 0x8000) {
  if (!SAMPLE_SELECTOR_INC_HOTKEY_LAST_STATE) {
    SAMPLE_SELECTOR_INC_HOTKEY_LAST_STATE = 1;
    add_value = 1;

  }
} else {
  SAMPLE_SELECTOR_INC_HOTKEY_LAST_STATE = 0;
}

if (GetAsyncKeyState(SAMPLE_SELECTOR_DEC_HOTKEY) & 0x8000) {
  if (!SAMPLE_SELECTOR_DEC_HOTKEY_LAST_STATE) {
    SAMPLE_SELECTOR_DEC_HOTKEY_LAST_STATE = 1;
    add_value = -1;
  }
} else {
  SAMPLE_SELECTOR_DEC_HOTKEY_LAST_STATE = 0;
}

if ( (SAMPLE_SELECTED > 0) && (add_value != 0)) {
  if (GetAsyncKeyState(SAMPLE_SELECTOR_MULT_HOTKEY) & 0x8000) {
     add_value *= 10;
  }

  if ((SAMPLE_SELECTED == 1) && (SAMPLES_COMMON != NULL)) {
    *SAMPLES_COMMON += add_value;
  }
  if ((SAMPLE_SELECTED == 2) && (SAMPLES_RARE != NULL)) {
    *SAMPLES_RARE += add_value;
  }
  if ((SAMPLE_SELECTED == 3) && (SAMPLES_SUPER != NULL)) {
    *SAMPLES_SUPER += add_value;
  }
}
// GLOBAL SECTION END


extern float runspeed_mult;

float *pawn_type = (float*)(pawn_base + 0x1C);
float *pawn_type2 = (float*)(pawn_base + 0x20);
float *p_speed_mult = (float*)(pawn_base + 0x0C);



float speed_selector = 0;
// 0x8000 currently held down
// 0x0001 key has been pressed since the last call
// 0x8001 currently held down and has been pressed since the last call
if (GetAsyncKeyState(SPEED_MULTIPLIER_AIM_HOTKEY) & 0x8000) {
  speed_selector = SPEED_MULTIPLIER_AIM_VALUE;
}
if (GetAsyncKeyState(SPEED_MULTIPLIER_HOTKEY) & 0x8000) {
  speed_selector = SPEED_MULTIPLIER_VALUE;
}
if (speed_selector == 0) {
  speed_selector = SPEED_MULTIPLIER_DEFAULT_VALUE;
}




if ((*pawn_type == 30.0f) && (*pawn_type2 == 40.0f)) {
   // playership
   *p_speed_mult = SPEED_MULTIPLIER_DEFAULT_VALUE * speed_selector;
} else if ((*pawn_type == 100.0f) && (*pawn_type2 == 100.0f)) {
  // player
  *p_speed_mult = SPEED_MULTIPLIER_DEFAULT_VALUE * speed_selector;
} else if ((*pawn_type == 10.0f) && (*pawn_type2 == 30.0f)) {
  // mech
  *p_speed_mult = SPEED_MULTIPLIER_DEFAULT_VALUE * speed_selector;
} else if ((*pawn_type == 5.0f) && (*pawn_type2 == 50.0f)) {
  // rescue
  *p_speed_mult = 1.0f * speed_selector;
} else {
  // enemy
  *p_speed_mult = 1.0f / speed_selector;
}


{$asm}
// original code start
mulss xmm2,[r14+0C]
mulss xmm2,[r14+10]
movaps xmm4,xmm2
// original code end
jmp return_RunSpeed

aob_RunSpeed:
  jmp far newmem_RunSpeed
  nop
return_RunSpeed:

[DISABLE]
aob_RunSpeed:
  db F3 41 0F 59 56 0C F3 41 0F 59 56 10 0F 28 E2

unregistersymbol(aob_RunSpeed)
dealloc(newmem_RunSpeed)

{
// ORIGINAL CODE - INJECTION POINT: game.dll+54902E

game.dll+548FCA: EB 08                       - jmp game.dll+548FD4
game.dll+548FCC: 41 0F 28 CC                 - movaps xmm1,xmm12
game.dll+548FD0: F3 0F 5D CA                 - minss xmm1,xmm2
game.dll+548FD4: 48 8B 44 24 68              - mov rax,[rsp+68]
game.dll+548FD9: F3 44 0F 10 1D 7A BB A9 00  - movss xmm11,[game.dll+FE4B5C]
game.dll+548FE2: 41 0F 28 C4                 - movaps xmm0,xmm12
game.dll+548FE6: 4C 8B 6C 24 50              - mov r13,[rsp+50]
game.dll+548FEB: F3 0F 5C C1                 - subss xmm0,xmm1
game.dll+548FEF: 4C 8B 7C 24 40              - mov r15,[rsp+40]
game.dll+548FF4: 4C 8B 65 88                 - mov r12,[rbp-78]
game.dll+548FF8: 44 0F 2F D8                 - comiss xmm11,xmm0
game.dll+548FFC: 77 09                       - ja game.dll+549007
game.dll+548FFE: 45 0F 28 DC                 - movaps xmm11,xmm12
game.dll+549002: F3 44 0F 5D D8              - minss xmm11,xmm0
game.dll+549007: F3 41 0F 10 56 04           - movss xmm2,[r14+04]
game.dll+54900D: F3 41 0F 59 16              - mulss xmm2,[r14]
game.dll+549012: F3 41 0F 10 6E 14           - movss xmm5,[r14+14]
game.dll+549018: F2 0F 10 05 90 BA A9 00     - movsd xmm0,[game.dll+FE4AB0]
game.dll+549020: F3 41 0F 59 56 08           - mulss xmm2,[r14+08]
game.dll+549026: F3 0F 10 98 B8 0C 00 00     - movss xmm3,[rax+00000CB8]
// ---------- INJECTING HERE ----------
game.dll+54902E: F3 41 0F 59 56 0C           - mulss xmm2,[r14+0C]
// ---------- DONE INJECTING  ----------
game.dll+549034: F3 41 0F 59 56 10           - mulss xmm2,[r14+10]
game.dll+54903A: 0F 28 E2                    - movaps xmm4,xmm2
game.dll+54903D: F3 0F 5C E5                 - subss xmm4,xmm5
game.dll+549041: 0F 5A CC                    - cvtps2pd xmm1,xmm4
game.dll+549044: 0F 54 0D D5 EF A9 00        - andps xmm1,[game.dll+FE8020]
game.dll+54904B: 66 0F 2F C1                 - comisd xmm0,xmm1
game.dll+54904F: 77 21                       - ja game.dll+549072
game.dll+549051: F3 41 0F 59 DD              - mulss xmm3,xmm13
game.dll+549056: 44 0F 2F C3                 - comiss xmm8,xmm3
game.dll+54905A: 76 06                       - jna game.dll+549062
game.dll+54905C: 41 0F 28 D0                 - movaps xmm2,xmm8
game.dll+549060: EB 08                       - jmp game.dll+54906A
game.dll+549062: 41 0F 28 D4                 - movaps xmm2,xmm12
game.dll+549066: F3 0F 5D D3                 - minss xmm2,xmm3
game.dll+54906A: F3 0F 59 D4                 - mulss xmm2,xmm4
game.dll+54906E: F3 0F 58 D5                 - addss xmm2,xmm5
game.dll+549072: F3 41 0F 11 56 14           - movss [r14+14],xmm2
game.dll+549078: 43 80 BC 3C AD 58 00 00 00  - cmp byte ptr [r12+r15+000058AD],00
game.dll+549081: F3 44 0F 59 DA              - mulss xmm11,xmm2
game.dll+549086: 75 04                       - jne game.dll+54908C
}
Spoiler

Code: Select all

{ Game   : helldivers2.exe
  Version:
  Date   : 2024-04-30
  Author : ZoDDeL
  Mod by : Anton v5
  Tested on: .304 path

  If hold CHEAT_ALL_HOTKEY while taking sample it will override all 3 counters to specified (edit section)
  If take sample and dont hold CHEAT_ALL_HOTKEY you receive HOTKEY_NOT_PRESSED_ADD_VALUE of sample type you taken
  You can edit #define section values below
  For debugging purposes you can open DebugViewPP tool and take some samples. you will receive messages.
}
{$c}
  // YOU CAN EDIT SECTION START
  #define CHEAT_ALL_HOTKEY 'C'   // take sample while holding it and you will get what you set
  // Keep common + rare + super sum below or equal to 100. For example you can specify 50+40+10 = 100
  #define HOTKEY_PRESSED_COMMON_SAMPLE_COUNT_REDEFINE 45
  #define HOTKEY_PRESSED_RARE_SAMPLE_COUNT_REDEFINE 30
  #define HOTKEY_PRESSED_SUPER_SAMPLE_COUNT_REDEFINE 10
  // if hotkey is not pressed and player take sample it will add specified value (game default is 1)
  #define HOTKEY_NOT_PRESSED_ADD_VALUE 10

  #define SECRET_HOTKEY 'Q' // if take sample while holding this, you will receive +1 samples (no cheat mode)
  // YOU CAN EDIT SECTION END

  #define NO_OLDNAMES
  #include <windows.h>
  extern __cdecl int sprintf(char *, char *, ...);
  extern __cdecl void OutputDebugStringA(const char* lpOutputString);
  short GetAsyncKeyState(int);
  char debug_string[400];
  typedef struct {
    int common;
    int rare;
    int super;
  } Samples;
  int *SAMPLES_COMMON;
  int *SAMPLES_RARE;
  int *SAMPLES_SUPER;

void show_bits_sprintf(int *rdx_value, char *buffer) {
  unsigned int mask = 0x80000000; // Маска для старшего бита
  int i;

  for (i = 0; i < 32; ++i) {
    // Проверяем, установлен ли бит
    if (*rdx_value & mask) {
      sprintf(buffer + i, "1");
    } else {
      sprintf(buffer + i, "0");
    }

    mask >>= 1; // Сдвигаем маску на один бит вправо
  }

  sprintf(buffer + 32, "\0"); // Добавляем завершающий нуль-символ
}
{$asm}

[ENABLE]
aobscanmodule(samples_inject,game.dll,48 8D 14 41 48 8B 43 40 4B 8D 0C 89 44 01 7C 90 04) // should be unique
alloc(samples_newmem,$2000)
label(samples_return)

samples_newmem:


  // original code start
  lea rdx,[rcx+rax*2]
  mov rax,[rbx+40]
  lea rcx,[r9+r9*4]
  // add [rax+rdx*4+04],r15d
  // original code end

  /*
  cmp rdx,0
  je samples_common
  cmp rdx,1
  je samples_rare
  cmp rdx,2
  je samples_super
samples_common: // when you pickup common
  mov [rax+rdx*4+04],#49 // common sample
  mov [rax+rdx*4+04+4],#30 // rare sample
  mov [rax+rdx*4+04+8],#20 // super sample
  jmp samples_return

samples_rare: // when you pickup rare
  mov [rax+rdx*4+04-4],#49 // common sample
  mov [rax+rdx*4+04],#30 // rare sample
  mov [rax+rdx*4+04+4],#20 // super sample
  jmp samples_return

samples_super: // when you pickup super
  mov [rax+rdx*4+04-8],#49 // common sample
  mov [rax+rdx*4+04-4],#30 // rare sample
  mov [rax+rdx*4+04],#20 // super sample
  jmp samples_return
  */
{$ccode base1=rax rdx=rdx}
  // calculate base_address of samples structure
  // rdx 0 = base+4
  // rdx 1 = base+4+4-4 = base+4
  // rdx 2 = base+8+4-8 = base+4
  // Samples* samples = (Samples*)(base1 + sample_type*4 + 4 - sample_type*4 );
  short sample_type = rdx % 10; // for common samples can be 0 20 or 60 (zero at the end). Rare 1 or 21.  Super 2 or 22
  short sample_unk = (int)(rdx / 10);
  int *picked_up_sample_counter = (int*)(base1 + rdx*4 + 4);
  //Samples* samples = (Samples*)(base1 + 4);
  Samples* samples = (Samples*)(base1 + rdx*4 + 4 - sample_type*4);
  SAMPLES_COMMON = &samples->common;
  SAMPLES_RARE = &samples->rare;
  SAMPLES_SUPER = &samples->super;

  int samples_count_now = samples->common + samples->rare + samples->super;

  sprintf(debug_string, "Samples: Taken type: %d | counts %d + %d + %d = %d. Unknown value is %d", sample_type, samples->common, samples->rare, samples->super, samples_count_now, sample_unk);
  OutputDebugStringA(debug_string);
  /*
  OutputDebugStringA("Samples: sample_type RDX  bits:");
  show_bits_sprintf(&sample_type, &debug_string);
  OutputDebugStringA(debug_string);
  */
  /*
  OutputDebugStringA("Samples: sample amount r15d bits:");
  show_bits_sprintf(&taken_sample_amount_r15d, &debug_string);
  OutputDebugStringA(debug_string);
  */

  // Already more than maxed out, restore max counts and exit
  if (samples_count_now > 100) {
    samples->common = HOTKEY_PRESSED_COMMON_SAMPLE_COUNT_REDEFINE;
    samples->rare = HOTKEY_PRESSED_RARE_SAMPLE_COUNT_REDEFINE;
    samples->super = HOTKEY_PRESSED_SUPER_SAMPLE_COUNT_REDEFINE;
    sprintf(debug_string, "Samples: count is >100. Restoring to maximum: %d %d %d", samples->common, samples->rare, samples->super);
    OutputDebugStringA(debug_string);
    goto end_section;
  }

  // Max all if hotkey pressed
  if (GetAsyncKeyState(CHEAT_ALL_HOTKEY) & 0x8000) {
    samples->common = HOTKEY_PRESSED_COMMON_SAMPLE_COUNT_REDEFINE;
    samples->rare = HOTKEY_PRESSED_RARE_SAMPLE_COUNT_REDEFINE;
    samples->super = HOTKEY_PRESSED_SUPER_SAMPLE_COUNT_REDEFINE;
    sprintf(debug_string, "Samples: hotkey pressed. Sample counts just set to maximum: %d %d %d", samples->common, samples->rare, samples->super);
    OutputDebugStringA(debug_string);
    goto end_section;
  }

  int value_to_add = 1;
  if (GetAsyncKeyState(SECRET_HOTKEY) & 0x8000) {
    sprintf(debug_string, "Samples: secret hotkey pressed. Samples piclup will be default(1)");
    OutputDebugStringA(debug_string);
  } else {
    value_to_add = HOTKEY_NOT_PRESSED_ADD_VALUE;
    int add_limit = 100 - samples_count_now;
    if (add_limit == 0) {
      sprintf(debug_string, "Samples: limit reached %d. No additional samples will be added", add_limit);
      OutputDebugStringA(debug_string);
    } else if (add_limit < 0) {
      samples->common = 50;
      samples->rare = 40;
      samples->super = 10;
      sprintf(debug_string, "Samples: count is more than allowed: %d. No additional samples will be added. Sample counts are set to maximum: %d %d %d", samples_count_now, samples->common, samples->rare, samples->super);
      OutputDebugStringA(debug_string);
    } else if (value_to_add > add_limit) {
      value_to_add = add_limit;
      sprintf(debug_string, "Samples: too much samples already collected. Add value is clamped to %d/%d", value_to_add, HOTKEY_NOT_PRESSED_ADD_VALUE);
      OutputDebugStringA(debug_string);
    } else {
      sprintf(debug_string, "Samples: will add %d of type %d", value_to_add, sample_type);
      OutputDebugStringA(debug_string);
    }
  }

  *picked_up_sample_counter += value_to_add;
  /*
  if (sample_type == 0) {
     samples->common += value_to_add;
  }
  if (sample_type == 1) {
     samples->rare += value_to_add;
  }
  if (sample_type == 2) {
     samples->super += value_to_add;
  }
  */

  /*
  samples->common += value_to_add+1;
  samples->rare += value_to_add+2;
  samples->super += value_to_add+3;
  */
  /*
  // hardcoded limit guard
  samples_count_now = samples->common + samples->rare + samples->super;
  if (samples_count_now > 100) {
    samples->common = 50;
    samples->rare = 40;
    samples->super = 10;
    sprintf(debug_string, "Samples: Hardcoded guard. Samples SUM is >100: %d. Sample counts are reset to maximum allowed: %d %d %d", samples_count_now, samples->common, samples->rare, samples->super);
    OutputDebugStringA(debug_string);
  }
  */

/*
  // output debug. you can look in DebugViewPP tool https://github.com/CobaltFusion/DebugViewPP
  sprintf(debug_string, "Samples out: common %d | rare %d | super %d", samples->common, samples->rare, samples->super);
  OutputDebugStringA(debug_string);
*/
end_section:
{$asm}
jmp samples_return

samples_inject:
jmp far samples_newmem
nop 3

samples_return:
registersymbol(samples_inject)

[DISABLE]

samples_inject:
  db 48 8D 14 41 48 8B 43 40 4B 8D 0C 89 44 01 7C 90 04

unregistersymbol(samples_inject)
dealloc(samples_newmem)

{
// ORIGINAL CODE - INJECTION POINT: game.dll+608B8F

game.dll+608B68: 41 FF C0        - inc r8d
game.dll+608B6B: 45 3B C1        - cmp r8d,r9d
game.dll+608B6E: 72 E0           - jb game.dll+608B50
game.dll+608B70: B8 FF FF FF FF  - mov eax,FFFFFFFF
game.dll+608B75: 48 8B 74 24 48  - mov rsi,[rsp+48]
game.dll+608B7A: 48 8B 6C 24 40  - mov rbp,[rsp+40]
game.dll+608B7F: 48 8B 7C 24 50  - mov rdi,[rsp+50]
game.dll+608B84: 44 8B C8        - mov r9d,eax
game.dll+608B87: 41 8D 4E FF     - lea ecx,[r14-01]
game.dll+608B8B: 4B 8D 04 89     - lea rax,[r9+r9*4]
// ---------- INJECTING HERE ----------
game.dll+608B8F: 48 8D 14 41     - lea rdx,[rcx+rax*2]
// ---------- DONE INJECTING  ----------
game.dll+608B93: 48 8B 43 40     - mov rax,[rbx+40]
game.dll+608B97: 4B 8D 0C 89     - lea rcx,[r9+r9*4]
game.dll+608B9B: 44 01 7C 90 04  - add [rax+rdx*4+04],r15d
game.dll+608BA0: BA 94 4C 74 92  - mov edx,92744C94
game.dll+608BA5: 48 8B 43 40     - mov rax,[rbx+40]
game.dll+608BA9: 4C 8D 04 C8     - lea r8,[rax+rcx*8]
game.dll+608BAD: 48 8B 43 30     - mov rax,[rbx+30]
game.dll+608BB1: 4A 8B 0C C8     - mov rcx,[rax+r9*8]
game.dll+608BB5: 8B 49 10        - mov ecx,[rcx+10]
game.dll+608BB8: E8 63 13 49 00  - call game.dll+A99F20
}

What parts of this would I use just to have the samples only mod with the NUM features? I used the second section code but NUM buttons didnt do anything.

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

Re: HELLDIVERS 2

Post by Exemplify1524 »

DarkestLite wrote:
Sat May 25, 2024 2:44 am
What parts of this would I use just to have the samples only mod with the NUM features? I used the second section code but NUM buttons didnt do anything.
The script responsible for collecting samples only triggers when you actually pick up a sample. To change the number of samples while playing, we need to modify a game code that's always running. The game code that controls running speed is perfect for this, because it's constantly being checked by the game.
I integrated the hotkeys for editing samples into running speed script. This means the 'sample script' now needs the 'running speed' script to work. As a result, you can use the sample hotkeys even when you aren't actually picking up any samples.

0CrossTrigger0
Cheater
Cheater
Posts: 48
Joined: Wed May 22, 2024 9:05 am
Reputation: 3

Re: HELLDIVERS 2

Post by 0CrossTrigger0 »

ZoDDeL wrote:
Wed May 22, 2024 7:22 pm
0CrossTrigger0 wrote:
Wed May 22, 2024 1:39 pm
Passer556 wrote:
Wed May 22, 2024 1:11 pm


1/10 the TTK? Uh...maybe? I think with 3 times the damage most mob enemy would already die from 1 or 2 hit into their weak spot. 10 times might even one shot things that are supposed to be tanky.

And obviously don't open containers with your gun when people are watching.
Ok so for the dmg and admg better set it to like 1.5? Then all the one I applied the "//"is correct? Lastly should I also put the "//" on the demolition?
1.5 would be a boost of 50% to original weapon damage. while weak weapons with 60 dmg would go to 90
big weapons that do 600 go to 900.
pretty straight forward.

another approach would be to change from multi to add
under
dmg_Super:

you could change these lines>>>
mulss xmm3, dword ptr [dmg_multiplier]
mulss xmm1, dword ptr [admg_multiplier]

and edit mulss to addss
this way the dmg_multiplier and admg_multiplier values wont multiply the weapon damage but
add to it.
or force static dmg with movss.

as example:

base dmg 60
mulss dmg_multiplier (x20)
= 1200 dmg

base dmg 60
addss dmg_multiplier (200)
= 260 dmg

base dmg 60
movss dmg_multiplier (200)
= 200 dmg

as you can see mulss is linear but way stronger the higher the base dmg is.
addss is very strong for weak weapons but goes weaker for strong weapons.
movss just sets a static value to dmg.


then you have to ask yourself about dmg vs admg
dmg is the plain damage while admg destroys armor/limbs body parts.
admg + high penetration rips of bug and robots parts very quick
if you set pen low a high admg multi doesnt do anything anymore because you just bounce off.
a high pen but low/no admg value does just penetrate through armor and does dmg to bug/bot
but wont rip their body/armor parts off.

so you either exclude the admg line with // infront of that line
or you lower/exclude the penetration lines.

the demolation value is only to destroy objects like buildings, containers(doors) etc.

after changing stuff click on the ok button to apply the changes to the script and then save the table (file > save or save as)
to keep the changes.
Follow up question for the penetration for let say heavy armor which one would I need to tweak on the Super Damage? Because there's 4 of them on the Super Damage which I put the "//" on so which one should I have active?

oddity93
Noobzor
Noobzor
Posts: 10
Joined: Wed May 08, 2024 8:58 am
Reputation: 0

Re: HELLDIVERS 2

Post by oddity93 »

if i change "mulss dmg_multiplier 100" to "addss dmg_multiplier 100" it automatically goes from x100 to +100 right? nothing else i need to change? gonna try it myself in like, an hour, but i'll ask it here for others' posterity anyway

Post Reply

Who is online

Users browsing this forum: ctl3d32, Google [Bot], MzK47