I think problem is not only in the weapons id. Because I modified ZoDDel's script to actually show all damage IDs happens in game to DebugView using OutputDebugStringA function.
And it is not working after update.
So the problem is the main injection point for aobscanmodule changed from "66 0F 6E 59 04 66 0F 6E 49 08 0F 5B C9 0F 5B DB" to somethink else.
If this bytes not found, it means they changed weapon damage code. Who can find new?
Then with OutputDebugStringA we can help find any new IDs... this is routine task.
Need smart guy who will do the main job and find new damage calculation commands to inject.
And here is modified by me ZoDDels damage multiply code that show all damage ids happens on map. For previous update. Not working now.
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,$2000)
label(damage_return)
label(damage_change)
label(damage_and_penetration_change)
label(damage_no_change)
alloc(damage_ratio,4)
registersymbol(damage_ratio)
damage_newmem:
// cmp DWORD PTR [RCX], 0
// je damage_no_change
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[200];
char* weapon_name;
char weapon_name_list[400] = "";
float d_ratio_float;
int d_ratio_int;
typedef struct {
int id;
char* name;
int damage;
} 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[107] = {
{5, "Automaton damage"},
{6, "Automaton distance damage (some2) / Automaton Gunship rocket blast"},
{7, "Automaton hand blaster / Unknown event on automaton map"},
{9, "FLAM-40 Flamethrower part 1"},
{10, "GL-21 Grenade launcher part 1 / Mortar Sentry shell"},
{11, "EMS Mortar Sentry / Grenade Launcher / Mortar Sentry 1"},
{18, "PLAS-1 Scorcher (old) / SG-8P Punisher Plasma (old)"},
{19, "LAS-16 Sickle"},
{20, "PLAS-1 Scorcher / SG-8P Punisher Plasma"},
{20, "PLAS-1 Scorcher / SG-8P Punisher Plasma"},
{21, "RS-422 Railgun"},
{24, "P-19 Redeemer / P-2 Peacemaker"},
{25, "MP-98 Knight"},
{33, "SG-8S / SMG-37 Defender"},
{38, "Laser Cannon"},
{41, "P-4 Senator"},
{43, "AR-23P Liberator Penetrator need fix"},
{45, "AR-23C Liberator Concussive need fix / AR-23P Liberator Penetrator"},
{47, "AR-23C Liberator Concussive"},
{48, "AR-22C Patriot / AR-23 Liberator / AR-48 Truth Whisperer / Guard Dog / Stalwart"},
{62, "AR-20L Justice / BR-14 Adjudicator / Gatling/Machine Gun Sentry / Machine Gun"},
{69, "R-63 Diligence"},
{70, "R-63CS Diligence Counter Sniper"},
{76, "R-36 Eruptor"},
{80, "JAR-5 Dominator"},
{84, "SG-8 Punisher"},
{89, "Break action shotgun"},
{95, "SG-8S Slugger"},
{97, "SG-225SP Breaker Spray&Pray"},
{98, "SG-225 Breaker"},
{99, "SG-225BB Breaker Bugbiter"},
{100, "SG-225NS Breaker Nailspitter"},
{101, "SG-255IE Breaker Incendiary"},
{107, "G-6 Frag part 2"},
{111, "ARC3 Thrower"},
{113, "ARC-12 Blitzer"},
{115, "Automaton Gunship blaster / Automaton Hulk Scorcher right hand blaster"},
{117, "Heavy Machinegun"},
{118, "Antimaterial Rifle"},
{120, "CB-9 Exploding Crossbow"},
{122, "Tesla Tower"},
{123, "Autocannon (part 1/2)"},
{125, "EXO-45 Emancipator gun part 1"},
{126, "Autocannon Sentry / Pelican part 1"},
{130, "GP-31 Grenade Pistol"},
{131, "EAT-17 part 1"},
{132, "Recoiless Rifle part 1"},
{138, "Eagle airstrike part 1"},
{141, "Commando"},
{143, "EXO-45 Emancipator rocket part 1"},
{145, "Javelin rocket part 1"},
{148, "Eagle 110mm rocket pods part 1"},
{150, "500kg bomb1"},
{155, "Orbital 120MM HE barrage1"},
{156, "Orbital precision strike1"},
{157, "Orbital railcannon strike1"},
{163, "G-23 Stun (old)"},
{165, "G-23 Stun"},
{184, "EAT-17 part 2"},
{191, "Barrel explosion"},
{194, "G-6 Frag (old?)"},
{195, "G-10 Incendiary (old)"},
{196, "G-123 Thermite (old?) / G-6 Frag part 1"},
{197, "G-10 Incendiary"},
{198, "G-10 Incendiary"},
{199, "G-123 Thermite"},
{205, "G-12 High Explosive (old?) / G-16 Impact (old?)"},
{207, "G-16 Impact / Quasar Cannon impact?"},
{208, "G-12 High Explosive / G-16 Impact"},
{209, "G-12 High Explosive"},
{211, "Autocannon (part 2/2)"},
{212, "EXO-45 Emancipator gun part 2"},
{214, "Pelican part 2"},
{215, "GL-21 Grenade launcher part 2"},
{218, "Mortar Sentry 2"},
{220, "Recoiless Rifle part 2"},
{221, "EAT-17 part 3"},
{222, "Quasar Cannon part 1"},
{223, "Quasar Cannon part 2"},
{224, "Eagle clusterbomb"},
{229, "EXO-45 Emancipator rocket part 2"},
{231, "Javelin rocket part 2"},
{236, "AntiPersonal MineField / Eagle 110mm rocket pods part 2"},
{249, "Eagle airstrike part 2"},
{252, "Automaton Gunship rocket / Automaton rocket / Automaton Rocket devastator (rocket launchers on shoulders)"},
{253, "Helldiver pot damage"},
{260, "Automaton grenade"},
{261, "Orbital railcannon strike2"},
{262, "Orbital precision strike2"},
{263, "Orbital 120MM HE barrage2"},
{268, "500kg bomb2"},
{275, "Quasar Cannon part 3 (???)"},
{282, "Fall damage"},
{291, "LAS-7 Dagger"},
{292, "LAS-5 Scythe"},
{296, "LAS-98"},
{299, "Orbital laser"},
{303, "FLAM-40 Flamethrower part 2 / Flame barrel / Flame tornado"},
{318, "Automaton distance damage (some1) / Hulk Scorcher (Gromila) Self flame?"},
{320, "Helldiver melee"},
{331, "Big smoke? On automaton map"},
{347, "Automaton Maradeur melee / Automaton Rocket rider melee"},
{347, "Automaton Maradeur melee / Automaton Rocket rider melee"},
{348, "Automaton Commissar (red shoulders) melee"},
{350, "Automaton Hulk Scorcher melee"},
{354, "Automaton Berserker melee"},
{355, "Unknown event on automaton map"}
};
weapon_name = "";
// strcpy(weapon_name_list, "");
for (int i = 0; i < sizeof(weapons) / sizeof(weapons[0]); ++i) {
if (*weapon_id == weapons[i].id) {
weapon_name = weapons[i].name;
//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;
}
}
jmpaddress = damage_and_penetration_change;
switch (*weapon_id) {
case 62: // "AR-20L Justice / BR-14 Adjudicator / Gatling/Machine Gun Sentry / Machine Gun"
damage_ratio = 4.0f; break;
case 69: // "R-63 Diligence"
case 70: // "R-63CS Diligence Counter Sniper"
damage_ratio = 10.0f; break;
case 21: // RS-422 Railgun
damage_ratio = 10.0f; break;
case 33: // SG-8S / SMG-37 Defender
damage_ratio = 10.0f; break;
case 291: // LAS-7 Dagger
case 292: // LAS-5 Scythe
case 296: // LAS-98
case 24: // P-19 Redeemer / P-2 Peacemaker
damage_ratio = 5.0f; break;
case 10: // GL-21 Grenade launcher part 1 / Mortar Sentry shell
case 215: // GL-21 Grenade launcher part 2
case 38: // Laser Cannon
case 48: // AR-22C Patriot / AR-23 Liberator / AR-48 Truth Whisperer / Guard Dog / Stalwart
case 222: // Quasar Cannon part 1
case 223: // Quasar Cannon part 2
damage_ratio = 150.0f;
break;
case 0:
jmpaddress=damage_no_change;
break;
default:
damage_ratio = 0.2f;
jmpaddress=damage_change;
}
if (*weapon_id != 0) {
// base_address:%#9p base_address,
//d_ratio_int = (int)damage_ratio;
// d_ratio_float = (float)damage_ratio;
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);
}
{$asm}
jmp rbx
damage_and_penetration_change:
pop rbx // restore rbx
mov [rcx+0C],#7777 // penetration 1
mov [rcx+10],#7777 // penetration 2
mov [rcx+14],#7777 // penetration 3
mov [rcx+18],#7777 // penetration 4
movd xmm3,[rcx+04]
movd xmm1,[rcx+08]
cvtdq2ps xmm1,xmm1
cvtdq2ps xmm3,xmm3
mulss xmm3, dword ptr [damage_ratio]
mulss xmm1, dword ptr [damage_ratio]
jmp damage_return
damage_change:
pop rbx // restore rbx
movd xmm3,[rcx+04]
movd xmm1,[rcx+08]
cvtdq2ps xmm1,xmm1
cvtdq2ps xmm3,xmm3
mulss xmm3, dword ptr [damage_ratio]
mulss xmm1, dword ptr [damage_ratio]
jmp damage_return
damage_no_change:
pop rbx // restore rbx
// No change to other weapon_ids
movd xmm3,[rcx+04]
movd xmm1,[rcx+08]
cvtdq2ps xmm1,xmm1
cvtdq2ps xmm3,xmm3
jmp damage_return
damage_inject:
jmp far damage_newmem
nop 2
damage_return:
// ------------------------------------------------------
[DISABLE]