HELLDIVERS 2

Upload your cheat tables here (No requests)
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 »

Exemplify1524 wrote:
Sun May 12, 2024 10:49 pm
Modified ZoDDels Instant complete scripts.
im into the hotkey stuff but it makes no sense to split up mission complete opcodes.
both read on one specific address on all missions. there is no filter to separete missions yet.
in fact one of the opcodes would be enough to do the writes on +18 and +38.
but i decided to use both opcodes in case something in the array of addresses/values change.
its some kind of a failsafe.

when you complete a mission (the normal way) these 2 addresses got the value 1 (+18) and 2 (+38) written.
opcode A reads all missions on the addresses with value 1 (or 0 if not completed yet) the opcode B does the same for the address with value 2 (or 0 if n ot completed yet).

maybe easier to understand with this screenshot:
Image
blue is mission blip for map (seen / not seen 1 or 0 cant remember what was what because its opposite to another map icon)
yellow is beginning of an array (R10 / R15)
green is the upcounting number for every mission (main + side)
the left column reds are opcode A (1 means complete) the right column reds are opcode B (2 means complete)
memory view is in 4byte decimal.



currently i did not found a good way to check what is main and what is side mission.
with upcounting number starting with 0 up to 9 or whatever the maximum all main + side mission on a planet ís.
problem is some planets only have 1 main + 0 side or 1 main + 3-4 side or 3-4 main + 5 side.
so if i filter for number 0-3 all main mission should get hit while on some planets 1 main + 3 side missions get hit...
another option might be to gather all mission ID's (if they exists, dont know, did not looked much into)


tldr:
splitting missionA and missionB opcode(like with your hotkeys) makes no sense. both are for all (currently active) missions.
maybe in the future there might be a way to do that proper.



gir489 wrote:
Mon May 13, 2024 2:48 am
ZoDDeL wrote:
Sat May 11, 2024 11:47 am
Actually made decent changes.
Nice work! BTW: cfemen and I have been taking apart that damage function and we have noticed several things:

A lot of weapons are misidentified or just flat-out wrong. We corrected them here:
You can use the OnClick Armory Weapon Editor to find out the primary/secondary/grenades ID very easily by clicking them in the armory, and then reading what's at +0. Off the top of my head, I remember P-19 Redeemer being wrong, and a bunch others, but I can't remember. However, we haven't found a way to easily discover the IDs of the strategem weapons, and they are the most abundent.

We tried several heuristical ways to determine if the incoming callee is a robot/bug or a player, but we found nothing... It seems the Weapon ID method really is the best way to do it, but a major pain in the fucking ass, because they change every update. They should be coming from generated_weapon_customization_settings.dl_bin, but it's encrypted now, which we know how to decrypt, but not necessarily how to read... Basically, it's the same thing at game.dll+1DF33F0 which is an array read by the function you're hooking. If one of the parameters +36 has an index, it loads from there the weapon structure. otherwise, it loads game.dll+1DF3FD0 which is your "skip any 0 dmg weapons like smoke or unknown shit" scenario you've discovered.
what dou you mean with "A lot of weapons are misidentified or just flat-out wrong" ?
you only changed the ID for peacemaker / redeemer and added
#42 // P-113 Verdict ( new warbond? )
#73 // R-63 Diligence
#41 // SMG-72 Pummeler ( new warbond? )

thats 4 (i dont have the new warbond so i cannot check for the weapon ID's / R-63 isnt very appealing so... call me lazy)
but you are somewhat right with the redeemer / peacemaker
some patches before they had the same weapon ID. not anymore.
redeemer is still 25 (like in my script)
peacemaker is 27 (like what you changed)

so i guess i have to recheck some weapons that have/had the same ID like the assault rifles.
i already do check the most popular/usefull weapons on every patch but not all so it
could be true that some where changed without me noticing.

and yes its annyoing that they change the ID's now and then(mostly at balancing).
its time eating to check them all over (i dont trust other sources in this case and never add any ID's somebody posts)

original i started with the weapon armory but i dont liked the requirement to access the armory first to modify weapon stats
and there you wont get the extra effect ID's like explosions, shrapnel, burn etc.


anyway, are we fine now? no more hating? ;)

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

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:
Sun May 12, 2024 10:38 pm
mrnipperz wrote:
Sun May 12, 2024 8:41 pm
id love to add extra melee dmg to zoddels superdmg table. i have one with extra melee but i like his with the the destruction of objects added to it now..
Try new modified version of ZoDDel's super damage script.
Spoiler

Code: Select all

{
Author ZoDDel
Mod by Anton
}

{$c}
float ext_damage_mult = 1.0f;
typedef struct {
  int id; // 1
  int d1; // 2 normal_value;
  int d2; // 3 armor_value;
  int p1; // 4 p1;
  int p2; // 5 p2;
  int p3; // 6 p3;
  int p4; // 7 p4;
  int demolition; // 8
  int knockback1; // 9
  int knockback2; // 10
  int decal_type; // 11
  int decal_size; // 12
  float decal_duration; // 13
  int u7; // 14
  int u8; // 15
} GameDamageInfo;
typedef struct {
   int id; // 1
   int d1; // -2
   int d2; // -3
   int p1; // -4
   int p2; // -5
   int p3; // -6
   int p4; // -7
   int demolition; // -8
   int knockback1; // -9
   int knockback2; // -10
   float damage_mult; // -1 is default
   char *p_weapon_type;
   char *p_damage_name;
   char *p_base_stats_string;
   char hide_output;
   char is_unknown;
   GameDamageInfo game_damage_backup;
} CheatDamageInfo;


// YOU CAN CHANGE SECTION START
#define HOTKEY_EXCLUDE_DAMAGE 'U'
#define HOTKEY_INCLUDE_DAMAGE 'I'
#define HOTKEY_GOD_SHOT VK_CONTROL
#define UNKNOWN_DAMAGE_MULTIPLIER 0.5f
CheatDamageInfo g_damage_table[500] = {
// damage | penetr |demolit | knock | unk | unk
// -2  -3   -4 -5 -6 -7   -8   -9-10  -11-12-13
//050 005 | 01 00 00 00 | 10 | 25 30 |  0  0  0 | 0 0"
{326,	-2,	-3, -4, -5,	-6,	-7,	-8,	-9,	-10,	1.0f, "00 Melee", "Helldiver melee", "050 005 | 01 00 00 00 | 10 | 25 30 | 0 0 0 | 0 0"},
{ 51,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "01 Assault rifle", "AR-22C Patriot / AR-23 Liberator / AR-48 Truth Whisperer / AR-61 Tenderizer / Stalwart / AX/AR-23 Guard Dog (w Liberator AR)", "060 006 | 02 02 02 00 | 10 | 10 10 | 0 0 0 | 0 0"},
{ 50,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "01 Assault rifle", "AR-23C Liberator Concussive", "065 015 | 02 02 02 02 | 10 | 35 100 | 0 0 0 | 0 0"},
{ 48,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "01 Assault rifle", "AR-23P Liberator Penetrator", "045 015 | 03 03 03 00 | 10 | 10 10 | 0 0 0 | 0 0"},
// my
{ 65,	-2,	-3,	-4,	-5,	-6,	-7,	30,	50,  40, 	1.0f, "02 Marksman rifle", "AR-20L Justice / BR-14 Adjudicator / Machine Gun / Gatling Sentry / Machine Gun Sentry", "080 008 | 03 03 03 01 | 10 | 15 12 | 0 0 0 | 0 0"},
{ 73,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "02 Marksman rifle", "R-63 Diligence", "125 013 | 02 02 02 00 | 10 | 15 14 | 0 0 0 | 0 0"},
{ 74,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "02 Marksman rifle", "R-63CS Diligence Counter Sniper", "140 014 | 03 03 03 00 | 10 | 15 14 | 0 0 0 | 0 0"},
{ 26,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "03 Submachine gun", "MP-98 Knight", "050 005 | 02 02 02 00 | 10 | 10 4 | 0 0 0 | 0 0"},
{ 34,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "03 Submachine gun", "SG-8S / SMG-37 Defender", "070 007 | 02 02 02 00 | 10 | 10 5 | 0 0 0 | 0 0"},
{ 41,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "03 Submachine gun", "SMG-72 Pummeler", "065 007 | 02 02 02 00 | 10 | 15 5 | 0 34 2 | 0 0"},
{102,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "04 Shotgun", "SG-225 Breaker", "030 006 | 02 02 02 00 | 10 | 10 10 | 0 0 0 | 0 0"},
{103,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "04 Shotgun", "SG-225BB Breaker Bugbiter", "045 009 | 02 02 02 00 | 10 | 15 15 | 0 0 0 | 0 0"},
{104,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "04 Shotgun", "SG-225NS Breaker Nailspitter", "020 004 | 03 03 03 00 | 10 | 10 10 | 0 0 0 | 0 0"},
{101,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "04 Shotgun", "SG-225SP Breaker Spray&Pray", "012 004 | 02 02 02 00 | 10 | 3 1 | 0 0 0 | 0 0"},
{105,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "04 Shotgun", "SG-255IE Breaker Incendiary", "020 010 | 02 02 02 00 | 10 | 10 10 | 1 6 100 | 0 0"},
{ 88,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "04 Shotgun", "SG-8 Punisher", "045 012 | 02 02 02 00 | 10 | 35 30 | 0 0 0 | 0 0"},
{ 99,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "04 Shotgun", "SG-8S Slugger", "250 075 | 03 03 03 00 | 10 | 20 35 | 0 0 0 | 0 0"},
{117,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "04 Shotgun", "SMG-37 Defender", "050 035 | 03 03 03 00 | 10 | 30 25 | 2 0 0 | 0 0"},
{124,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "05 Explosive", "CB-9 Exploding Crossbow part 1 (impact)", "270 050 | 03 03 03 00 | 0 | 30 10 | 0 0 0 | 0 0"},
{125,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "05 Explosive", "CB-9 Exploding Crossbow part 2 (explosion)", "150 150 | 02 02 02 00 | 15 | 25 10 | 0 0 0 | 0 0"},
{ 84,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "05 Explosive", "JAR-5 Dominator", "275 090 | 03 03 03 00 | 10 | 35 15 | 0 0 0 | 0 0"},
{ 80,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "05 Explosive", "R-36 Eruptor p1 (direct shell impact)", "230 115 | 03 03 03 00 | 30 | 35 20 | 0 0 0 | 0 0"},
{205,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "05 Explosive", "R-36 Eruptor p2 (sub-shell enemy hits)", "150 150 | 03 00 00 00 | 20 | 25 40 | 0 0 0 | 0 0"},
{ 19,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "06 Energy-based", "LAS-16 Sickle", "055 005 | 02 02 02 00 | 10 | 10 10 | 0 0 0 | 0 0"},
{297,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "06 Energy-based", "LAS-5 Scythe", "350 070 | 02 02 02 00 | 10 | 0 0 | 0 6 0 | 0 0"},
{ 20,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "06 Energy-based", "PLAS-1 Scorcher p1 / PLAS-101 Purifier (Part 1) / SG-8P Punisher Plasma part 1 impact of projectile", "100 050 | 02 02 02 00 | 10 | 20 10 | 0 0 0 | 0 0"},
{184,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "06 Energy-based", "PLAS-1 Scorcher p2 (Plasma Damage)", "100 100 | 03 00 00 00 | 10 | 10 7 | 0 0 0 | 0 0"},
{ 21,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "06 Energy-based", "PLAS-101 Purifier", "250 100 | 03 03 03 00 | 10 | 20 10 | 0 0 0 | 0 0"},
{186,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "06 Energy-based", "PLAS-101 Purifier (Part 2) / SG-8P Punisher Plasma part 2 explosion", "150 150 | 03 03 03 00 | 10 | 35 30 | 0 0 0 | 0 0"},
{134,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "07 Pistol", "GP-31 Grenade Pistol part1 shell", "250 250 | 03 03 03 00 | 30 | 40 10 | 0 0 0 | 0 0"},
{220,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "07 Pistol", "GP-31 Grenade Pistol part2 explosion / GL-21 Grenade launcher part 2 explosion", "350 350 | 03 00 00 00 | 30 | 25 40 | 0 0 0 | 0 0"},
{296,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "07 Pistol", "LAS-7 Dagger (continuous laser pistol)", "200 020 | 02 02 02 00 | 10 | 0 0 | 0 6 0 | 0 0"},
{ 42,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "07 Pistol", "P-113 Verdict", "125 012 | 02 02 02 00 | 10 | 12 10 | 0 0 0 | 0 0"},
{ 25,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "07 Pistol", "P-19 Redeemer", "060 005 | 02 02 02 00 | 10 | 10 4 | 0 0 0 | 0 0"},
{ 27,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "07 Pistol", "P-2 Peacemaker", "075 015 | 02 02 02 00 | 10 | 10 4 | 0 0 0 | 0 0"},
{ 44,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "07 Pistol", "P-4 Senator", "175 035 | 03 03 03 00 | 10 | 20 10 | 0 0 0 | 0 0"},
{203,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "08 Grenade Standard", "G-10 Incendiary / G-13 Incendiary impact / Incendary Impact / Incendary Impact", "150 150 | 03 00 00 00 | 30 | 20 15 | 1 6 100 | 0 0"},
{213,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "08 Grenade Standard", "G-12 High Explosive / G-16 Impact", "400 400 | 04 00 00 00 | 30 | 30 40 | 0 0 0 | 0 0"},
{201,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "08 Grenade Standard", "G-6 Frag part 1", "250 250 | 03 00 00 00 | 20 | 25 40 | 0 0 0 | 0 0"},
{111,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "08 Grenade Standard", "G-6 Frag part 2", "080 008 | 02 02 02 00 | 10 | 10 20 | 0 0 0 | 0 0"},
{204,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "09 Grenade Special", "G-123 Thermite", "100 100 | 07 00 00 00 | 30 | 20 40 | 0 0 0 | 0 0"},
{169,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "09 Grenade Special", "G-23 Stun", "000 000 | 06 00 00 00 | 0 | 0 0 | 0 35 25 | 0 0"},
{122,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "Antimaterial Rifle", "450 135 | 04 04 04 00 | 20 | 20 25 | 0 0 0 | 0 0"},
{115,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "ARC3 Thrower", "250 050 | 07 07 07 00 | 20 | 35 10 | 2 0 0 | 0 0"},
{127,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "Autocannon (part 1/2)", "260 260 | 04 04 04 00 | 30 | 30 20 | 0 0 0 | 0 0"},
{216,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "Autocannon (part 2/2)", "150 150 | 03 00 00 00 | 30 | 40 40 | 0 0 0 | 0 0"},
{ 93,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "Break action shotgun", "065 013 | 02 02 02 00 | 10 | 20 20 | 0 0 0 | 0 0"},
{145,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "Commando", "500 500 | 06 05 03 00 | 40 | 50 25 | 0 0 0 | 0 0"},
{135,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "EAT-17 Expendable Anti-Tank part 1", "650 650 | 06 06 06 03 | 30 | 50 25 | 0 0 0 | 0 0"},
{189,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "EAT-17 Expendable Anti-Tank part 2", "015 015 | 03 00 00 00 | 10 | 30 15 | 0 0 0 | 0 0"},
{226,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "EAT-17 Expendable Anti-Tank part 3", "150 150 | 03 00 00 00 | 30 | 60 40 | 0 0 0 | 0 0"},
{129,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "EXO-45 Emancipator gun part 1", "300 060 | 05 05 05 00 | 30 | 30 10 | 0 0 0 | 0 0"},
{217,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "EXO-45 Emancipator gun part 2", "150 150 | 03 00 00 00 | 30 | 40 40 | 0 0 0 | 0 0"},
{147,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "EXO-45 Emancipator rocket part 1", "400 400 | 06 06 04 00 | 30 | 40 25 | 0 0 0 | 0 0"},
{234,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "EXO-45 Emancipator rocket part 2", "400 400 | 03 00 00 00 | 30 | 60 70 | 0 0 0 | 0 0"},
{  9,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "FLAM-40 Flamethrower part 1", "003 003 | 03 03 03 00 | 10 | 5 5 | 1 6 10 | 0 0"},
{ 10,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "GL-21 Grenade launcher part 1 / Mortar Sentry shoot (not shell)", "020 002 | 00 00 00 00 | 10 | 40 10 | 0 0 0 | 0 0"},
{ 11,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "Grenade Launcher", "005 000 | 02 01 00 00 | 10 | 40 10 | 0 0 0 | 0 0"},
{121,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "Heavy Machinegun", "100 035 | 04 04 04 00 | 15 | 15 20 | 0 0 0 | 0 0"},
{149,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "Javelin rocket part 1", "1000 1000 | 08 07 06 00 | 40 | 50 25 | 0 0 0 | 0 0"},
{236,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "Javelin rocket part 2", "200 200 | 05 00 00 00 | 30 | 60 70 | 0 0 0 | 0 0"},
{302,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "LAS-98 Laser Cannon", "350 200 | 04 04 04 04 | 20 | 0 0 | 0 6 0 | 0 0"},
{227,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "Quasar Cannon part 1", "650 650 | 06 06 06 03 | 30 | 50 40 | 0 0 0 | 0 0"},
{228,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "Quasar Cannon part 2", "150 150 | 03 00 00 00 | 30 | 50 40 | 0 0 0 | 0 0"},
{136,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "Recoiless Rifle part 1 shell", "650 650 | 06 06 06 03 | 30 | 50 25 | 0 0 0 | 0 0"},
{225,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "10 Stratagem weapon", "Recoiless Rifle part 2 explosion", "150 150 | 03 00 00 00 | 30 | 50 40 | 0 0 0 | 0 0"},
//
{ 22,	-2,	240	-4,	-5,	-6,	-7,	30,	50,	 30,	1.0f, "10 Stratagem weapon", "RS-422 Railgun", "600 060 | 05 05 05 05 | 10 | 35 15 | 0 0 0 | 0 0"},
{130,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "11 Stratagem Sentry", "Autocannon Sentry / Pelican evacuation ship part 1", "300 300 | 05 05 05 00 | 30 | 40 10 | 0 0 0 | 0 0"},
{298,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "11 Stratagem Sentry", "AX/LAS-5 Guard Dog Rover (w Laser Rifle)", "200 040 | 02 02 02 00 | 10 | 0 0 | 0 6 0 | 0 0"},
{271,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "11 Stratagem Sentry", "EMS Mortar Sentry - shell impact", "000 000 | 04 00 00 00 | 30 | 10 40 | 0 0 0 | 0 0"},
{243,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "11 Stratagem Sentry", "MD-6 Anti-Personnel Minefield", "200 200 | 03 00 00 00 | 30 | 30 30 | 0 0 0 | 0 0"},
{223,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "11 Stratagem Sentry", "Mortar Sentry shell", "400 400 | 03 00 00 00 | 30 | 35 40 | 0 0 0 | 0 0"},
{126,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "11 Stratagem Sentry", "Tesla Tower", "600 600 | 04 04 04 00 | 20 | 20 10 | 2 0 0 | 0 0"},
{245,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "12 Stratagem Defensive", "AntiTank mine", "1000 1000 | 05 05 05 00 | 30 | 30 40 | 0 0 0 | 0 0"},
{113,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "12 Stratagem Defensive", "MD-I4 Incendiary mines", ""},
{154,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "12 Stratagem Orbital", "500kg bomb1 shell", "1400 1400 | 07 07 07 00 | 50 | 20 15 | 0 0 0 | 0 0"},
{273,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "12 Stratagem Orbital", "500kg bomb2 explosion", "1200 1200 | 06 00 00 00 | 50 | 100 40 | 0 0 0 | 0 0"},
{152,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "12 Stratagem Orbital", "Eagle 110mm rocket pods part 1", "600 600 | 05 05 05 00 | 40 | 20 15 | 0 0 0 | 0 0"},
{241,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "12 Stratagem Orbital", "Eagle 110mm rocket pods part 2", "200 200 | 05 00 00 00 | 30 | 30 40 | 0 0 0 | 0 0"},
{254,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "12 Stratagem Orbital", "Eagle Airstrike part 2", "800 800 | 05 00 00 00 | 40 | 50 40 | 0 0 0 | 0 0"},
{142,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "12 Stratagem Orbital", "Eagle Aistrike shell / Eagle Napalm Strike shell", "500 500 | 05 05 05 00 | 40 | 20 15 | 0 0 0 | 0 0"},
{229,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "12 Stratagem Orbital", "Eagle cluster bomb / Orbital airburst strike p2", "350 350 | 03 00 00 00 | 30 | 50 40 | 0 0 0 | 0 0"},
{159,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "12 Stratagem Orbital", "Orbital 120MM HE barrage p1", "300 300 | 07 07 06 00 | 50 | 20 20 | 0 0 0 | 0 0"},
{268,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "12 Stratagem Orbital", "Orbital 120MM HE barrage p2", "750 750 | 05 00 00 00 | 50 | 70 40 | 0 0 0 | 0 0"},
{112,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "12 Stratagem Orbital", "Orbital airburst strike p1", "300 150 | 03 03 03 00 | 10 | 10 20 | 0 0 0 | 0 0"},
{158,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "12 Stratagem Orbital", "Orbital gas strike", "300 300 | 07 07 06 00 | 50 | 60 15 | 0 0 0 | 0 0"},
{305,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "12 Stratagem Orbital", "Orbital laser", "030 015 | 06 06 06 00 | 50 | 30 30 | 0 6 1 | 0 0"},
{160,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "12 Stratagem Orbital", "Orbital precision strike1 / Traitor player orbital atata 1", "450 450 | 08 07 06 00 | 50 | 20 20 | 0 0 0 | 0 0"},
{267,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "12 Stratagem Orbital", "Orbital precision strike2 / Traitor player orbital atata 2", "1000 1000 | 06 00 00 00 | 50 | 70 60 | 0 0 0 | 0 0"},
{161,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "12 Stratagem Orbital", "Orbital railcannon strike1", "2000 2000 | 10 09 08 00 | 50 | 60 35 | 0 0 0 | 0 0"},
{266,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "12 Stratagem Orbital", "Orbital railcannon strike2", "500 500 | 06 00 00 00 | 50 | 30 50 | 0 0 0 | 0 0"},
{196,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "15 Environment", "Barrel explosion", "300 300 | 03 00 00 00 | 30 | 20 40 | 1 6 10 | 0 0"},
{337,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "15 Environment", "Big smoke? On automaton map", "001 001 | 07 00 00 00 | 41 | 40 35 | 0 0 0 | 0 0"},
{309,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "15 Environment", "Burning", "050 025 | 04 04 04 00 | 0 | 0 0 | 1 0 0 | 0 0"},
{280,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "15 Environment", "Explosion", "200 200 | 03 00 00 00 | 50 | 50 40 | 0 0 0 | 0 0"},
{287,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "15 Environment", "Fall damage", "4000 4000 | 10 00 00 00 | 60 | 50 100 | 0 0 0 | 0 0"},
{294,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "15 Environment", "Green flower exploded slow effect", "015 015 | 03 00 00 00 | 0 | 15 15 | 0 46 75 | 35 50"},
{258,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "15 Environment", "Orbital capsula impact damage", "150 150 | 10 00 00 00 | 40 | 80 40 | 0 0 0 | 0 0"},
{219,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "15 Environment", "Pelican evacuation ship part 2", "150 150 | 03 00 00 00 | 30 | 40 40 | 0 0 0 | 0 0"},
{192,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "15 Environment", "Terminid yellow ground spore 1", "000 000 | 06 00 00 00 | 10 | 20 40 | 3 10 100 | 0 0"},
{311,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "15 Environment", "Terminid yellow ground spore 2 / Terminid Bug melee damage / Terminid Hunter attack 1", "003 000 | 01 01 01 00 | 0 | 0 0 | 3 0 0 | 0 0"},
{360,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Automatons", "Automaton Berserker melee", "050 050 | 03 00 00 00 | 20 | 20 15 | 0 0 0 | 0 0"},
{354,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Automatons", "Automaton Commissar (red shoulders) melee", "030 015 | 03 00 00 00 | 10 | 10 10 | 0 0 0 | 0 0"},
{  5,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Automatons", "Automaton damage", "040 020 | 02 02 02 00 | 10 | 5 5 | 1 6 50 | 0 0"},
{324,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Automatons", "Automaton distance damage (some1) / Automaton Hulk Scorcher (Gromila) Self flame?", "001 001 | 09 09 09 09 | 0 | 0 0 | 4 0 0 | 0 0"},
{  6,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Automatons", "Automaton distance damage (some2) / Automaton Gunship rocket blast", "075 050 | 06 05 04 00 | 20 | 50 25 | 0 0 0 | 0 0"},
{261,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Automatons", "Automaton Drop/Gun-ship fall on somethink", "100 100 | 03 00 00 00 | 40 | 50 40 | 0 0 0 | 0 0"},
{265,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Automatons", "Automaton grenade", "200 200 | 03 00 00 00 | 30 | 50 40 | 0 0 0 | 0 0"},
{119,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Automatons", "Automaton Gunship blaster / Automaton Hulk Scorcher right hand blaster / Automatons SHREDDER TANK 1 blaster shells", "055 005 | 03 03 03 00 | 20 | 20 15 | 0 0 0 | 0 0"},
{257,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Automatons", "Automaton Gunship rocket / Automaton rocket / Automaton Rocket devastator (rocket launchers on shoulders)", "060 060 | 03 00 00 00 | 30 | 30 40 | 0 0 0 | 0 0"},
{  7,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Automatons", "Automaton hand blaster", "030 003 | 02 02 01 00 | 10 | 10 15 | 0 0 0 | 0 0"},
{356,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Automatons", "Automaton Hulk Scorcher melee", "150 150 | 05 00 00 00 | 30 | 40 35 | 0 0 0 | 0 0"},
{353,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Automatons", "Automaton Maradeur melee / Automaton Rocket rider melee", "010 005 | 01 00 00 00 | 10 | 10 10 | 0 0 0 | 0 0"},
{206,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Automatons", "Automaton unknown", "100 100 | 03 00 00 00 | 20 | 50 40 | 0 0 0 | 0 0"},
{239,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Automatons", "Automaton unknown", "150 150 | 05 00 00 00 | 30 | 30 40 | 0 0 0 | 0 0"},
{281,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Automatons", "Automaton unknown", "300 300 | 03 00 00 00 | 50 | 50 40 | 0 0 0 | 0 0"},
{246,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Automatons", "Automatons ground red mine", "300 300 | 03 00 00 00 | 30 | 30 40 | 0 0 0 | 0 0"},
{322,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Automatons", "Automatons SHREDDER TANK 2 continuous scan", "075 075 | 06 06 06 00 | 0 | 0 0 | 5 0 0 | 0 0"},
{358,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Automatons", "Automatons SHREDDER TANK 3 rare", "200 200 | 04 00 00 00 | 40 | 40 40 | 0 0 0 | 0 0"},
{176,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Terminids", "Terminid Bile Titan bile1", "050 050 | 06 00 00 00 | 0 | 0 0 | 3 10 100 | 0 0"},
{  2,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Terminids", "Terminid Bile Titan bile2", "050 050 | 05 05 05 00 | 0 | 20 10 | 0 0 0 | 0 0"},
{351,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Terminids", "Terminid Bile Titan Stomp (impact)", "3000 3000 | 10 00 00 00 | 40 | 60 10 | 0 0 0 | 0 0"},
{342,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Terminids", "Terminid Brood commander melee attack / Terminid Hive Guard melee attack / Terminid Hunter swipes / Terminid Warrior melee attack", "040 040 | 02 00 00 00 | 20 | 20 10 | 0 0 0 | 0 0"},
{  1,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Terminids", "Terminid Bug Bile spew", "032 032 | 04 04 04 00 | 0 | 20 10 | 0 0 0 | 0 0"},
{335,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Terminids", "Terminid Charger Rush", "350 350 | 07 00 00 00 | 40 | 50 50 | 0 0 0 | 0 0"},
{292,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Terminids", "Terminid Ground spores if shoot then blow&throw away", "005 005 | 03 00 00 00 | 20 | 55 55 | 0 35 25 | 0 0"},
{338,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Terminids", "Terminid Hunter attack 2", "030 015 | 02 00 00 00 | 10 | 10 10 | 0 0 0 | 0 0"},
{  3,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Terminids", "Terminid Nursing spewer bile", "032 032 | 04 04 04 00 | 10 | 20 10 | 0 0 0 | 0 0"},
{345,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Terminids", "Terminid Scavenger melee attack", "030 015 | 02 00 00 00 | 10 | 10 5 | 0 0 0 | 0 0"},
{332,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Terminids", "Terminid some bug melee 1", "000 000 | 07 00 00 00 | 40 | 0 0 | 0 0 0 | 0 0"},
{336,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Terminids", "Terminid some bug melee 2", "030 030 | 07 00 00 00 | 41 | 40 35 | 0 0 0 | 0 0"},
{348,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Terminids", "Terminid Stalker attack", "040 040 | 03 00 00 00 | 20 | 20 15 | 0 0 0 | 0 0"},
{349,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Terminids", "Terminid Stalker throw away attack", "035 035 | 02 00 00 00 | 0 | 35 45 | 0 0 0 | 0 0"},
{340,	-2,	-3,	-4,	-5,	-6,	-7,	-8,	-9,	-10,	1.0f, "Enemy Terminids", "Terminod Stalker melee", "035 003 | 01 00 00 00 | 15 | 20 10 | 0 0 0 | 0 0"}
};
// YOU CAN CHANGE SECTION END

#define NO_OLDNAMES
#include <stddef.h>
#include <windows.h>
#include <string.h>

extern __cdecl int sprintf(char *, char *, ...);
extern __cdecl void OutputDebugStringA(const char* lpOutputString);
char g_debug_string[400];
short GetAsyncKeyState(int);


// how much records in table.  unknown damages, detected in game will be recorded above
int g_damage_table_records = 150;
// Include / Exclude global flags
char g_exclude_flag = 1;
char g_include_flag = 0;
//char damage_debug_global = 1;
int knock_value = 10;
{$asm}

[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,$20000)
label(damage_return)

// define global variable
alloc(damage_ratio,4)
registersymbol(damage_ratio)


damage_newmem:
{$ccode base_address=rcx}
extern float damage_ratio;
CheatDamageInfo *user_table_entry = NULL; // current_damage is place where to put address of g_damage_table entry with id equals damage_id
damage_ratio = UNKNOWN_DAMAGE_MULTIPLIER; // Default damage multiplier for damages (unknown) that are not found in g_damage_table. Assuming they are some enemy attacks.

GameDamageInfo *game_damage = (GameDamageInfo*)(base_address);

if (game_damage->id == 0) { goto end_section; }

// Include / Exclude damage_id printing routines
if (GetAsyncKeyState(HOTKEY_EXCLUDE_DAMAGE) & 0x8000) {
   // Exclude mode. While key pressed, all damages that are happening will mark as excluded and will not be printed in OutputDebug section
   g_exclude_flag = 1;
   g_include_flag = 0;
} else {
   g_exclude_flag = 0;
   // Include mode. While key pressed, all damages that happening and was excluded before, including back and will print in OutputDebug section
  if (GetAsyncKeyState(HOTKEY_INCLUDE_DAMAGE) & 0x8000) {
     // include mode
     g_exclude_flag = 0;
     g_include_flag = 1;
  } else {
    g_include_flag = 0;
  }
}

// analyzing if current damage_id is in g_damage_table
for (int i = 0; i < sizeof(g_damage_table) / sizeof(g_damage_table[0]); ++i) {
  if (g_damage_table[i].id == 0) {
    continue;
  }
  if (game_damage->id == g_damage_table[i].id) {
    user_table_entry = &g_damage_table[i];
    break;
  }
}

if (!user_table_entry) {
  // current damage_id is not in user cheat table.
  // Add new record to g_damage_table
  user_table_entry = &g_damage_table[g_damage_table_records++];

  user_table_entry->id = game_damage->id;
  user_table_entry->damage_mult = UNKNOWN_DAMAGE_MULTIPLIER;
  user_table_entry->d1 = game_damage->d1;
  user_table_entry->d2 = game_damage->d2;
  user_table_entry->p1 = game_damage->p1;
  user_table_entry->p2 = game_damage->p2;
  user_table_entry->p3 = game_damage->p3;
  user_table_entry->p4 = game_damage->p4;
  user_table_entry->demolition = game_damage->demolition;
  user_table_entry->knockback1 = game_damage->knockback1;
  user_table_entry->knockback2 = game_damage->knockback2;
  user_table_entry->p_weapon_type = "Added from game, not in user table";
  user_table_entry->p_damage_name = "Added from game, not in user table";
  user_table_entry->p_base_stats_string = "";
  user_table_entry->hide_output = 0;
  user_table_entry->is_unknown = 125; // 125 is a flag, that damage was added to table from game. So it is unknown, and maybe it is enemy or environmental damage

  sprintf(g_debug_string, "Damage: New damage class added to table: id %3d | %d %d | pen1-4: %d %d %d %d | demolition: %d | knock1-2 %d %d | decal size: %d duration x100: %d type: %d",
                      game_damage->id,
                      game_damage->d1,
                      game_damage->d2,
                      game_damage->p1,
                      game_damage->p2,
                      game_damage->p3,
                      game_damage->p4,
                      game_damage->demolition,
                      game_damage->knockback1,
                      game_damage->knockback2,

                      game_damage->decal_size,
                      (int)(game_damage->decal_duration * 100),
                      game_damage->decal_type
                      );
  OutputDebugStringA(g_debug_string);
}

// Error situation. Usually could not happen.
if (!user_table_entry) {
  sprintf(g_debug_string, "Damage: user_table_entry is null. return");
  OutputDebugStringA(g_debug_string);
  goto end_section;
}

// backup game_damage to user_damage
if (user_table_entry->game_damage_backup.id != game_damage->id) {
  sprintf(g_debug_string, "Damage: id %d saved game_damage_backup", game_damage->id);
  OutputDebugStringA(g_debug_string);
   user_table_entry->game_damage_backup = *game_damage;
}
/*
if (!(GetAsyncKeyState(HOTKEY_GOD_SHOT) & 0x8000)) {
   *game_damage = user_table_entry->game_damage_backup;
}
*/


// For damage entry that was specified in g_damage_table, apply damage values from table to game. Because no need to reapply the same values for damages added from game, because they dont have any user specified settings.
if (user_table_entry->is_unknown != 125) {
  // current damage id is in g_damage_table. Set damage values from table
  if (user_table_entry->d1 >= 0) {
    game_damage->d1 = user_table_entry->d1;
  }
  if (user_table_entry->d2 >= 0) {
    game_damage->d2 = user_table_entry->d2;
  }
  if (user_table_entry->p1 >= 0) {
    game_damage->p1 = user_table_entry->p1;
  }
  if (user_table_entry->p2 >= 0) {
    game_damage->p2 = user_table_entry->p2;
  }
  if (user_table_entry->p3 >= 0) {
    game_damage->p3 = user_table_entry->p3;
  }
  if (user_table_entry->p4 >= 0) {
    game_damage->p4 = user_table_entry->p4;
  }
  if (user_table_entry->demolition >= 0) {
    game_damage->demolition = user_table_entry->demolition;
  }
  if (user_table_entry->knockback1 >= 0) {
    game_damage->knockback1 = user_table_entry->knockback1;
  }
  if (user_table_entry->knockback2 >= 0) {
    game_damage->knockback2 = user_table_entry->knockback2;
  }
}

// Detect if it is our output/good damage to enemy or input/bad/enemy/environmental damage to us
char is_input_damage_to_us = 0;
if ((user_table_entry->is_unknown == 125) || strstr(user_table_entry->p_weapon_type, "Enemy") || strstr(user_table_entry->p_weapon_type, "Environment")) {
  is_input_damage_to_us = 1;
} else {
  is_input_damage_to_us = 0;
}

// set damage multiplier (will be used in $asm section later
damage_ratio = user_table_entry->damage_mult;
damage_ratio = damage_ratio * ext_damage_mult;
// if it is damage to us and damage_mult is set to -1 (not set)
if (is_input_damage_to_us) {
   if (user_table_entry->damage_mult == 1.0f) {
      damage_ratio = UNKNOWN_DAMAGE_MULTIPLIER;
   }
}

// Set new fields for Own or Enemy damages
if (is_input_damage_to_us) {
  game_damage->demolition = 0;
  game_damage->knockback1 = 0;
  game_damage->knockback2 = 0;
  game_damage->decal_type = 0;
  game_damage->decal_size = 0;
  game_damage->decal_duration = 0;
  // OutputDebugStringA("Damage: set additional fields for enemy/environmental damage");
} else {
  // set our weapon new damage values
  // is able to dectruct buildings and bug holes
/*
  if (GetAsyncKeyState(HOTKEY_GOD_SHOT) & 0x8000) {
     game_damage->d1 = 7777;
     game_damage->d2 = 7777;
     game_damage->p1 = 10;
     game_damage->p2 = 10;
     game_damage->p3 = 10;
     game_damage->p4 = 10;
     game_damage->demolition = 1000;
     game_damage->knockback1 = 1000;
     game_damage->knockback2 = 1000;
  }
*/
/*
  game_damage->demolition = 10;

  if (GetAsyncKeyState(VK_ADD) & 0x8000) {
    knock_value += 100;
    sprintf(g_debug_string, "Damage: knock for our weapon is: %d", knock_value);
    OutputDebugStringA(g_debug_string);
  }
  if (GetAsyncKeyState(VK_SUBTRACT) & 0x8000) {
    if (knock_value >= 100) {
      knock_value -= 100;
    } else {
      knock_value = 0;
    }
    sprintf(g_debug_string, "Damage: knock values for our weapon is: %d", knock_value);
    OutputDebugStringA(g_debug_string);
  }
  game_damage->decal_type = 3;
  game_damage->decal_size = 800;
  game_damage->decal_duration = 0.5f;
*/
  // knockback2 both. What difference?
  game_damage->knockback1 = 55000;
  game_damage->knockback2 = 55000;
}

// exclude include routine
if (g_exclude_flag) {
  if (!user_table_entry->hide_output) {
    sprintf(g_debug_string, "Damage: Excluded:  id %3d | %d %d | pen: %d %d %d %d | demolition: %d | knock %d %d | decal size: %d duration x100: %d type: %d | mult %d%% | damage_to_us: %d | %s",
                      game_damage->id,
                      game_damage->d1,
                      game_damage->d2,
                      game_damage->p1,
                      game_damage->p2,
                      game_damage->p3,
                      game_damage->p4,
                      game_damage->demolition,
                      game_damage->knockback1,
                      game_damage->knockback2,

                      game_damage->decal_size,
                      (int)(game_damage->decal_duration * 100),
                      game_damage->decal_type,

                      (int)(user_table_entry->damage_mult*100.0f),
                      is_input_damage_to_us,
                      user_table_entry->p_damage_name
                      );
    OutputDebugStringA(g_debug_string);
  }
  user_table_entry->hide_output = 1;
}
if (g_include_flag) {
  if (user_table_entry->hide_output) {
    sprintf(g_debug_string, "Damage: Included: id %3d | %d %d | pen1-4: %d %d %d %d | demolition: %d | knock1-2 %d %d | decal size: %d duration x100: %d type: %d | mult %d%% | damage_to_us: %d | %s",
                      game_damage->id,
                      game_damage->d1,
                      game_damage->d2,
                      game_damage->p1,
                      game_damage->p2,
                      game_damage->p3,
                      game_damage->p4,
                      game_damage->demolition,
                      game_damage->knockback1,
                      game_damage->knockback2,

                      game_damage->decal_size,
                      (int)(game_damage->decal_duration * 100),
                      game_damage->decal_type,

                      (int)(user_table_entry->damage_mult*100.0f),
                      is_input_damage_to_us,
                      user_table_entry->p_damage_name
					  );
    OutputDebugStringA(g_debug_string);
  }
  user_table_entry->hide_output = 0;
}

/*
// if undefined  should work without this
if ((user_table_entry->hide_output != 0) & (user_table_entry->hide_output != 1)) {
   user_table_entry->hide_output = 0;
}
*/

if (!user_table_entry->hide_output) {
   sprintf(g_debug_string, "Damage: OUT: id %3d | %d %d | pen1-4: %d %d %d %d | demolition: %d | knock %d %d | decal size: %d duration x100: %d type: %d | mult %d%% mult ext %d%% | damage_to_us: %d | %s",
                      game_damage->id,
                      game_damage->d1,
                      game_damage->d2,
                      game_damage->p1,
                      game_damage->p2,
                      game_damage->p3,
                      game_damage->p4,
                      game_damage->demolition,
                      game_damage->knockback1,
                      game_damage->knockback2,

                      game_damage->decal_size,
                      (int)(game_damage->decal_duration * 100),
                      game_damage->decal_type,

                      (int)(user_table_entry->damage_mult*100.0f),
                      (int)(ext_damage_mult),
                      is_input_damage_to_us,
                      user_table_entry->p_damage_name
                      );
  OutputDebugStringA(g_debug_string);
}

// OutputDebug section
/*
short res = GetAsyncKeyState('O');
if ((res & 0x8000) & (!(res & 0x0001))) {
  damage_debug_global = !damage_debug_global;
  sprintf(g_debug_string, "Damage debug messages: %d", damage_debug_global);
  OutputDebugStringA(g_debug_string);
}
*/
end_section:
{$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]
I try to copy script into the table but it said Not all code is injectable.

Bai_88
Cheater
Cheater
Posts: 25
Joined: Sat Apr 20, 2024 9:24 am
Reputation: 7

Re: HELLDIVERS 2

Post by Bai_88 »

ZoDDeL wrote:
Fri May 10, 2024 1:48 pm
UPDATE:
re-added no sway (fixed by gir489)
added weapon ID's
strafing run / orbital gatling
orbital gas

added on super damage script:
pushback / stagger
demolition
I am still confused how to use the Demolitions and stagger
is it possible to add super demolitions

is this currently affect all or I can add a specific type of weapons

salsalplz
Cheater
Cheater
Posts: 28
Joined: Fri Feb 07, 2020 7:59 pm
Reputation: 4

Re: HELLDIVERS 2

Post by salsalplz »

Gir489 and ZoDDeL Id like to thank you both for the work you have put into these projects for helldivers, and i hope you both know it is truly appreciate.
Even if some people forget to say thank you to the both of you! in their requests for more features / changes etc. ;)

<3 !

XxDarkus101Xx
Expert Cheater
Expert Cheater
Posts: 101
Joined: Wed Apr 24, 2019 2:12 am
Reputation: 10

Re: HELLDIVERS 2

Post by XxDarkus101Xx »

Can someone tell me where the new updated table is at???

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 »

Bai_88 wrote:
Mon May 13, 2024 10:24 am
ZoDDeL wrote:
Fri May 10, 2024 1:48 pm
UPDATE:
re-added no sway (fixed by gir489)
added weapon ID's
strafing run / orbital gatling
orbital gas

added on super damage script:
pushback / stagger
demolition
I am still confused how to use the Demolitions and stagger
is it possible to add super demolitions

is this currently affect all or I can add a specific type of weapons
all weapons that are whitelisted for super damage also get demolition + pushback/stagger(concussive)
(je dmg_Super)

orbital / eagle stuff is excluded and stay default.
(je dmg_code)

all unknown (mostly enemy attacks and not yet add weapon ID's) get 0 demolition + pushback/stagger(concussive)
(je dmg_Enemy)
which prevents most ragdoll against the player.

you could change the whitelist by changing je dmg_Super(dmg1-2, pen1-4, demo, concussive) with je dmg_code(defaults)
below any weapon.

i also could add more checks or even a segment for each weapon but this would result in a massive bloatup of the script
so i prefer stick to one size fits all :D
its also easier to maintain this way.

XxDarkus101Xx wrote:
Mon May 13, 2024 11:18 am
Can someone tell me where the new updated table is at???
you can either check my signature for a guide how to execute tables proper without an bypass required
and find my easy to use table (scroll down)

also you can just check the first page on this topic for gir489's table.
his table is updated even his mainpost is pretty hard outdated :D

and then we have some code snippets or scripts here and there posted by other users
(you have to check like the laste 5-10 pages)

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

Re: HELLDIVERS 2

Post by Exemplify1524 »

nos4r2 wrote:
Mon May 13, 2024 7:33 am
I try to copy script into the table but it said Not all code is injectable.
What version on Cheat Engine you use? Should be 7.3+ Im using 7.5.

If you have CE7.5, then error 'Not all code is injectable' usually have more information, share it here too, maybe I can help.

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:
Mon May 13, 2024 1:29 pm
nos4r2 wrote:
Mon May 13, 2024 7:33 am
I try to copy script into the table but it said Not all code is injectable.
What version on Cheat Engine you use? Should be 7.3+ Im using 7.5.

If you have CE7.5, then error 'Not all code is injectable' usually have more information, share it here too, maybe I can help.
nvm it did work now when i try again for some reason. :)

duchuy1993
What is cheating?
What is cheating?
Posts: 2
Joined: Tue Apr 02, 2024 11:31 pm
Reputation: 0

Re: HELLDIVERS 2

Post by duchuy1993 »

ZoDDeL wrote:
Mon May 13, 2024 12:09 pm
Bai_88 wrote:
Mon May 13, 2024 10:24 am
ZoDDeL wrote:
Fri May 10, 2024 1:48 pm
UPDATE:
re-added no sway (fixed by gir489)
added weapon ID's
strafing run / orbital gatling
orbital gas

added on super damage script:
pushback / stagger
demolition
I am still confused how to use the Demolitions and stagger
is it possible to add super demolitions

is this currently affect all or I can add a specific type of weapons
all weapons that are whitelisted for super damage also get demolition + pushback/stagger(concussive)
(je dmg_Super)

orbital / eagle stuff is excluded and stay default.
(je dmg_code)

all unknown (mostly enemy attacks and not yet add weapon ID's) get 0 demolition + pushback/stagger(concussive)
(je dmg_Enemy)
which prevents most ragdoll against the player.

you could change the whitelist by changing je dmg_Super(dmg1-2, pen1-4, demo, concussive) with je dmg_code(defaults)
below any weapon.

i also could add more checks or even a segment for each weapon but this would result in a massive bloatup of the script
so i prefer stick to one size fits all :D
its also easier to maintain this way.

XxDarkus101Xx wrote:
Mon May 13, 2024 11:18 am
Can someone tell me where the new updated table is at???
you can either check my signature for a guide how to execute tables proper without an bypass required
and find my easy to use table (scroll down)

also you can just check the first page on this topic for gir489's table.
his table is updated even his mainpost is pretty hard outdated :D

and then we have some code snippets or scripts here and there posted by other users
(you have to check like the laste 5-10 pages)
Hi ZoDDel, thank you for your fantastic work. I went through your table and kinda understand a few things, but where I can modify the penetration factor? figured out the damage multiplier but the penetration multiplier is kinda confusing. Can you tell me where I should look at?

wilsondgonzales
Noobzor
Noobzor
Posts: 11
Joined: Sat Mar 30, 2024 4:02 pm
Reputation: 3

Re: HELLDIVERS 2

Post by wilsondgonzales »

Exemplify1524 wrote:
Sun May 12, 2024 10:49 pm
Modified ZoDDels Instant complete scripts.
Press NUM1 to finish bot hives / bases etc
Press NUM2 to finish all side missions
Press NUM3 to finish main mission
Press NUM0 for instant shuttle
thank you for your work. I prefer your approach. i appreciate it along with everyone else who has contributed to everything (gir489, Zoddel)

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

Re: HELLDIVERS 2

Post by gir489 »

ZoDDeL wrote:
Mon May 13, 2024 4:15 am
anyway, are we fine now? no more hating? ;)
I noticed after a lot of testing (5 hours straight) that say for example I fire a Carl G. rocket at an illegal broadcasting tower, it just deletes the tower from existence. I really like this effect on the Verdict, because I can shoot the alien holes and whatnot. But for the illegal broadcast, I have to basically shoot all the components one by one.

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

Re: HELLDIVERS 2

Post by elamigopaisa »

gir489 wrote:
Mon May 13, 2024 9:27 pm
ZoDDeL wrote:
Mon May 13, 2024 4:15 am
anyway, are we fine now? no more hating? ;)
I noticed after a lot of testing (5 hours straight) that say for example I fire a Carl G. rocket at an illegal broadcasting tower, it just deletes the tower from existence. I really like this effect on the Verdict, because I can shoot the alien holes and whatnot. But for the illegal broadcast, I have to basically shoot all the components one by one.
Would it be possible to add a no slow or have the motivational shocks booster on

Flash
What is cheating?
What is cheating?
Posts: 2
Joined: Mon May 13, 2024 11:11 pm
Reputation: 0

Re: HELLDIVERS 2

Post by Flash »

Does anyone have any hints to where the fire rate values are for weapons ? Seeing if there's a way to do rapid fire mortars.

Or maybe it's a speed setting for projectiles?

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 »

duchuy1993 wrote:
Mon May 13, 2024 7:50 pm
Hi ZoDDel, thank you for your fantastic work. I went through your table and kinda understand a few things, but where I can modify the penetration factor? figured out the damage multiplier but the penetration multiplier is kinda confusing. Can you tell me where I should look at?
i have no multiplier for the penetration because i let directly write to the real pen values (real address)
while for the damage the real dmg value stays untouched and i only set a multiplier to the xmm register.
if i would use a multiplier on the real pen value it would multiply several times you use the weapon (pretty bad).
there might be another opcode that access the pen value similar to the one i use that reads the damage values
(and load them into xmm) but that would increase the script size big time.

anyway, you can change the static pen values here:

Code: Select all

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],#100 // writes demolition value
  mov [rcx+20],#100 // writes pushback / stagger value
just change the 777 to a lower value. usual the weapons have pen value from 0 to 10 and not all weapons use all 4 pen types.
most weapons only use 1,2 or 1,2,3.
777 is just a very high value to stand out. like we use 9999 for inf health (or 7777 for shield)
but maybe its just a final fantasy 7 (lucky 7) spleen :D
you can also just put // infront of mov to exclude a line (if you dont like demolition for example)


gir489 wrote:
Mon May 13, 2024 9:27 pm
I noticed after a lot of testing (5 hours straight) that say for example I fire a Carl G. rocket at an illegal broadcasting tower, it just deletes the tower from existence. I really like this effect on the Verdict, because I can shoot the alien holes and whatnot. But for the illegal broadcast, I have to basically shoot all the components one by one.
yep i had a big smile when i realized that we can get rid of the bug holes with projectile weapons now.
dont you have to access the code terminal to disable the illegal broadcast tower?
i noticed that many small assets just de-spawn while some bigger stuff explodes.
so i did not noticed any flaw like glitching or softlocking but who knows.

with carl gustav you mean eat-17 the 1 shot rocket launcher?
did not tested this but i would expect that the explosion / aoe ID with high demo value should delete any surroundings.
maybe the demo might be an interesting option for some orbital/ eagle stuff to vaporize bot bases.
just thought about orbital gas that melts down all destroyable structures :roll:

btw. 5 hours is tough. i cannot look longer than 1-2 hours into this game...

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

Re: HELLDIVERS 2

Post by gir489 »

ZoDDeL wrote:
Mon May 13, 2024 11:32 pm
yep i had a big smile when i realized that we can get rid of the bug holes with projectile weapons now.
I have no idea WTF you're doing that we weren't doing before, but if I just write the stuff to the weapon container, doesn't work. If I use your script, does work. So we just gave it the fuck-it adjustment.
ZoDDeL wrote:
Mon May 13, 2024 11:32 pm
dont you have to access the code terminal to disable the illegal broadcast tower?
i noticed that many small assets just de-spawn while some bigger stuff explodes.
so i did not noticed any flaw like glitching or softlocking but who knows.
No, if you just normally hit it with any rocket, or a grenade that explodes on impact, it will destory the entire tower instantly. My theory is that the impact is deleting it which then tries to explode, which it can't, so it just does nothing. I'm gonna try having the impact scenario jmp_code and the explode scenario jmp_Super, see what happens. Should have the same affect as before, just working towers, know what I mean?
ZoDDeL wrote:
Mon May 13, 2024 11:32 pm
with carl gustav you mean eat-17 the 1 shot rocket launcher?
The Carl G is what we called it in the service. I think they call it the recoiless in the game or some fucking nonsense. But if you compare the photos with a Carl G, it's clearly a Carl G.

Image
ZoDDeL wrote:
Mon May 13, 2024 11:32 pm
btw. 5 hours is tough. i cannot look longer than 1-2 hours into this game...
Shooting the alien holes is very satisfying.

Post Reply

Who is online

Users browsing this forum: Aesarius, AhrefsBot, bionic, Bloodybone, Cheat Code, Esdeath01, Google Adsense [Bot], izayoixx, l38m, Mr. Seth Marshall, SemrushBot, sinnedomoyap