Use the native health update identified in PR #10 to report enemy mini-base damage and destruction. Preserve fractional personal score across hits and use the selected mode to gate both the HUD reward and settlement. Verified server and launcher types, MSVC compilation, Quirrel bytecode, and patch resolution on 2.61.0.37, 2.61.0.58, and 2.61.0.60. In-game acceptance is pending. Co-authored-by: duduyagame <[email protected]>
60 lines
2.5 KiB
JSON
60 lines
2.5 KiB
JSON
// Score enemy mini-base damage and destruction in LocalMP Air Arcade.
|
|
// The local service cannot see the offender or the health actually lost. The engine has both at the damage update.
|
|
{
|
|
"module": "local_mp_zones",
|
|
"features": ["K-Kill, assist and capture scoring", "K-Scoreboard"],
|
|
"requires": ["local_mp_kills", "local_mp_players"],
|
|
"sites": {
|
|
// Damage application and EventOnBombingZoneDamaged. Verified at .37 0x11ad500,
|
|
// .58 0x11b20f0 and .60 0x11b1f90. Match the entry through the native host check.
|
|
"apply_zone_damage": {
|
|
"variants": [{
|
|
"written_for": "2.61.0.37",
|
|
"locate": {
|
|
"method": "signature",
|
|
"pattern": "41 56 56 57 53 48 81 ec 68 01 00 00 44 0f 29 8c 24 50 01 00 00 44 0f 29 84 24 40 01 00 00 0f 29 bc 24 30 01 00 00 0f 29 b4 24 20 01 00 00 48 89 d7 48 89 ce 48 8b 05 ?? ?? ?? ?? 48 85 c0 74 ?? 80 78 ?? 01"
|
|
}
|
|
}]
|
|
},
|
|
// Read current HP before subtracting XMM2 and maximum HP from the upper clamp.
|
|
"zone_damage_health": {
|
|
"variants": [{
|
|
"written_for": "2.61.0.37",
|
|
"locate": {
|
|
"method": "within", "in": "apply_zone_damage",
|
|
"pattern": "0f 28 fb f3 0f 10 b6 ?? ?? ?? ?? 44 0f 28 c6 44 0f 28 ca f3 44 0f 5c c2 f3 44 0f 5f c0 f3 44 0f 5d 86 ?? ?? ?? ?? f3 44 0f 11 86",
|
|
"captures": {
|
|
"health": { "offset": 7, "type": "u32" },
|
|
"max_health": { "offset": 34, "type": "u32" }
|
|
}
|
|
}
|
|
}]
|
|
},
|
|
// The call after the HP write forwards the zone's one-byte team and actual damage.
|
|
"zone_damage_team": {
|
|
"variants": [{
|
|
"written_for": "2.61.0.37",
|
|
"locate": {
|
|
"method": "within", "in": "apply_zone_damage",
|
|
"pattern": "48 8d 8e ?? ?? ?? ?? f3 0f 59 c7 f3 0f 5c b6 ?? ?? ?? ?? 4c 8d 86 ?? ?? ?? ?? 0f b6 56 ?? f3 0f 11 44 24 20 0f 28 de e8",
|
|
"captures": { "team": { "offset": 29, "type": "u8" } }
|
|
}
|
|
}]
|
|
},
|
|
// The destruction branch reads a flag and forwards it as the airfield discriminator.
|
|
"zone_damage_airfield": {
|
|
"variants": [{
|
|
"written_for": "2.61.0.37",
|
|
"locate": {
|
|
"method": "within", "in": "apply_zone_damage",
|
|
"pattern": "48 8d 8e ?? ?? ?? ?? 0f b7 86 ?? ?? ?? ?? 83 e0 ?? c1 e8 02 f3 0f 10 86 ?? ?? ?? ??",
|
|
"captures": {
|
|
"flags": { "offset": 10, "type": "u32" },
|
|
"airfield_mask": { "offset": 16, "type": "u8" }
|
|
}
|
|
}
|
|
}]
|
|
}
|
|
}
|
|
}
|