Hi, i don't know if it just me but is there something wrong with the knockback in script?
Even if i set knockback to default number most explosive gun will ragdoll me so far and one shot me when i'm collision with object ( impact dmg dead )
It happen with pretty much every gun that you can hit yourself with aoe Scorcher, plasma punisher, autocannon, eruptor, Grenade Pistol, Stun grenade ( Which is weird i don't even set anything for stun grenade but after remove stun grenade ID the knockback is gone )
{
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 'F6'
#define HOTKEY_INCLUDE_DAMAGE 'F7'
#define HOTKEY_GOD_SHOT VK_CONTROL
#define UNKNOWN_DAMAGE_MULTIPLIER 0.75f
CheatDamageInfo g_damage_table[500] = {
// 1. damage | 2. armor dmg | 3-7 penetr 1-4 | 8. demolit | 9. 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, 200, 200, 5, 5, 5, 5, -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, 15, 4, 4, 4, 4, 40, -9, -10, 2.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, 20, 4, 4, 4, 4, 40, -9, -10, 2.0f, "01 Assault rifle", "AR-23C Liberator Concussive", "065 015 | 02 02 02 02 | 10 | 35 100 | 0 0 0 | 0 0"},
{ 48, -2, 20, 4, 4, 4, 4, 40, -9, -10, 2.0f, "01 Assault rifle", "AR-23P Liberator Penetrator", "045 015 | 03 03 03 00 | 10 | 10 10 | 0 0 0 | 0 0"},
{ 65, -2, 20, 4, 4, 4, 4, 40, -9, -10, 2.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, 20, 4, 4, 4, 4, 40, -9, -10, 2.0f, "02 Marksman rifle", "R-63 Diligence", "125 013 | 02 02 02 00 | 10 | 15 14 | 0 0 0 | 0 0"},
{ 74, -2, 20, 4, 4, 4, 4, 40, -9, -10, 2.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, 15, 4, 4, 4, 4, 40, -9, -10, 2.0f, "03 Submachine gun", "MP-98 Knight", "050 005 | 02 02 02 00 | 10 | 10 4 | 0 0 0 | 0 0"},
{ 34, -2, 15, 4, 4, 4, 4, 40, -9, -10, 2.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, 15, 4, 4, 4, 4, 40, -9, -10, 2.0f, "03 Submachine gun", "SMG-72 Pummeler", "065 007 | 02 02 02 00 | 10 | 15 5 | 0 34 2 | 0 0"},
{102, -2, 18, 4, 4, 4, 4, 40, -9, -10, 2.5f, "04 Shotgun", "SG-225 Breaker", "030 006 | 02 02 02 00 | 10 | 10 10 | 0 0 0 | 0 0"},
{103, -2, 18, 4, 4, 4, 4, 40, -9, -10, 2.5f, "04 Shotgun", "SG-225BB Breaker Bugbiter", "045 009 | 02 02 02 00 | 10 | 15 15 | 0 0 0 | 0 0"},
{104, -2, 18, 4, 4, 4, 4, 40, -9, -10, 2.5f, "04 Shotgun", "SG-225NS Breaker Nailspitter", "020 004 | 03 03 03 00 | 10 | 10 10 | 0 0 0 | 0 0"},
{101, -2, 18, 4, 4, 4, 4, 40, -9, -10, 2.5f, "04 Shotgun", "SG-225SP Breaker Spray&Pray", "012 004 | 02 02 02 00 | 10 | 3 1 | 0 0 0 | 0 0"},
{105, -2, 20, 4, 4, 4, 4, 40, -9, -10, 2.5f, "04 Shotgun", "SG-255IE Breaker Incendiary", "020 010 | 02 02 02 00 | 10 | 10 10 | 1 6 100 | 0 0"},
{ 88, -2, 18, 4, 4, 4, 4, 40, -9, -10, 2.5f, "04 Shotgun", "SG-8 Punisher", "045 012 | 02 02 02 00 | 10 | 35 30 | 0 0 0 | 0 0"},
{ 99, -2, 150, 4, 4, 4, 4, 40, -9, -10, 2.5f, "04 Shotgun", "SG-8S Slugger", "250 075 | 03 03 03 00 | 10 | 20 35 | 0 0 0 | 0 0"},
{117, -2, 70, 4, 4, 4, 4, 40, -9, -10, 3.0f, "04 Shotgun", "Blitzer", "050 035 | 03 03 03 00 | 10 | 30 25 | 2 0 0 | 0 0"},
{124, -2, 100, 4, 4, 4, 4, 40, -9, -10, 2.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, 4, 4, 4, 40, -9, -10, 2.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, 4, 4, 4, 40, -9, -10, 2.0f, "05 Explosive", "JAR-5 Dominator", "275 090 | 03 03 03 00 | 10 | 35 15 | 0 0 0 | 0 0"},
{ 80, -2, -3, 4, 4, 4, 4, 40, -9, -10, 2.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, 4, 4, 4, 40, -9, -10, 2.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, 15, 4, 4, 4, 4, 40, -9, -10, 2.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, 4, 4, 4, 40, -9, -10, 2.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, 4, 4, 4, -8, -9, -10, 2.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, 4, 4, 4, -8, -9, -10, 2.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, 4, 4, 4, -8, -9, -10, 2.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, 4, 4, 4, -8, -9, -10, 2.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, 5, 5, 5, 5, -8, -9, -10, 2.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, 5, 5, 5, 5, -8, -9, -10, 2.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, 40, 4, 4, 4, 4, 40, -9, -10, 2.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, 25, 4, 4, 4, 4, 40, -9, -10, 2.0f, "07 Pistol", "P-113 Verdict", "125 012 | 02 02 02 00 | 10 | 12 10 | 0 0 0 | 0 0"},
{ 25, -2, 15, 4, 4, 4, 4, 40, -9, -10, 2.0f, "07 Pistol", "P-19 Redeemer", "060 005 | 02 02 02 00 | 10 | 10 4 | 0 0 0 | 0 0"},
{ 27, -2, 30, 4, 4, 4, 4, 40, -9, -10, 2.0f, "07 Pistol", "P-2 Peacemaker", "075 015 | 02 02 02 00 | 10 | 10 4 | 0 0 0 | 0 0"},
{ 44, -2, 50, 4, 4, 4, 4, 40, -9, -10, 2.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, 2.5f, "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, 2.5f, "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, 2.5f, "08 Grenade Standard", "G-6 Frag part 1", "250 250 | 03 00 00 00 | 20 | 25 40 | 0 0 0 | 0 0"},
{111, -2, 20, 4, 4, 4, -7, -8, -9, -10, 2.5f, "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, 2.5f, "09 Grenade Special", "G-123 Thermite", "100 100 | 07 00 00 00 | 30 | 20 40 | 0 0 0 | 0 0"},
{122, -2, -3, 6, 6, 6, 6, 40, -9, -10, 2.0f, "10 Stratagem weapon", "Antimaterial Rifle", "450 135 | 04 04 04 00 | 20 | 20 25 | 0 0 0 | 0 0"},
{115, -2, 80, -4, -5, -6, -7, -8, -9, -10, 2.5f, "10 Stratagem weapon", "ARC3 Thrower", "250 050 | 07 07 07 00 | 20 | 35 10 | 2 0 0 | 0 0"},
{127, -2, -3, 6, 6, 6, 6, -8, -9, -10, 2.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, 6, 6, 6, 6, -8, -9, -10, 2.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, 6, 6, 6, 6, -8, -9, -10, 2.0f, "10 Stratagem weapon", "Break action shotgun", "065 013 | 02 02 02 00 | 10 | 20 20 | 0 0 0 | 0 0"},
{145, -2, -3, 6, 6, 6, 6, -8, -9, -10, 2.0f, "10 Stratagem weapon", "Commando", "500 500 | 06 05 03 00 | 40 | 50 25 | 0 0 0 | 0 0"},
{135, -2, -3, 6, 6, 6, 6, -8, -9, -10, 2.5f, "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, 6, 6, 6, 6, -8, -9, -10, 2.5f, "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, 6, 6, 6, 6, -8, -9, -10, 2.5f, "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, 5, 5, 5, 5, -8, -9, -10, 2.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, 5, 5, 5, 5, -8, -9, -10, 2.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, 5, 5, 5, 5, -8, -9, -10, 2.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, 5, 5, 5, 5, -8, -9, -10, 2.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, 4, 6, 4, 4, 4, 4, 40, -9, -10, 2.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, 10, -4, -5, -6, -7, -8, -9, -10, 2.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, 2.0f, "10 Stratagem weapon", "Grenade Launcher", "005 000 | 02 01 00 00 | 10 | 40 10 | 0 0 0 | 0 0"},
{121, -2, -3, 6, 6, 6, 6, 40, -9, -10, 2.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, 2.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, 2.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, 6, 6, 6, 6, 40, -9, -10, 2.5f, "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, 2.5f, "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, 2.5f, "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, 2.5f, "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, 2.5f, "10 Stratagem weapon", "Recoiless Rifle part 2 explosion", "150 150 | 03 00 00 00 | 30 | 50 40 | 0 0 0 | 0 0"},
//
{ 22, -2, 130, 6, 6, 6, 6, 40, -9, -10, 2.0f, "10 Stratagem weapon", "RS-422 Railgun", "600 060 | 05 05 05 05 | 10 | 35 15 | 0 0 0 | 0 0"},
{ 23, -2, 150, -4, -5, -6, -7, 40, -9, -10, 2.0f, "10 Stratagem weapon", "RS-422 Railgun Unsafe", "600 060 | 05 05 05 05 | 10 | 35 15 | 0 0 0 | 0 0"},
{130, -2, -3, -4, -5, -6, -7, -8, -9, -10, 2.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, 4, 4, 4, -8, -9, -10, 2.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, 2.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, 2.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, 2.5f, "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, 2.5f, "12 Stratagem Orbital", "500kg bomb2 explosion", "1200 1200 | 06 00 00 00 | 50 | 100 40 | 0 0 0 | 0 0"},
{152, -2, -3, 6, 6, 6, 6, -8, -9, -10, 2.5f, "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, 6, 6, 6, 6, -8, -9, -10, 2.5f, "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, 6, -5, -6, -7, -8, -9, -10, 2.5f, "12 Stratagem Orbital", "Eagle Airstrike part 2", "800 800 | 05 00 00 00 | 40 | 50 40 | 0 0 0 | 0 0"},
{142, -2, -3, 6, 6, 6, -7, -8, -9, -10, 2.5f, "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, 5, -5, -6, -7, -8, -9, -10, 2.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, 2.5f, "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, 2.5f, "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, 4, 4, 4, -8, -9, -10, 2.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, 3.0f, "12 Stratagem Orbital", "Orbital gas strike", "300 300 | 07 07 06 00 | 50 | 60 15 | 0 0 0 | 0 0"},
{321, -2, -3, -4, -5, -6, -7, -8, -9, -10, 4.0f, "12 Stratagem Orbital", "Orbital gas strike DoT", "300 300 | 07 07 06 00 | 50 | 60 15 | 0 0 0 | 0 0"},
{309, -2, -3, -4, -5, -6, -7, -8, -9, -10, 1.5f, "12 Stratagem Orbital", "Fire DoT", "300 300 | 07 07 06 00 | 50 | 60 15 | 0 0 0 | 0 0"},
{305, 50, 40, -4, -5, -6, -7, -8, -9, -10, 2.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, 2.5f, "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, 2.5f, "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, 2.5f, "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, 2.5f, "12 Stratagem Orbital", "Orbital railcannon strike2", "500 500 | 06 00 00 00 | 50 | 30 50 | 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.id == 0) {
continue;
}
if (game_damage->id == g_damage_table.id) {
user_table_entry = &g_damage_table;
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]