Files
BT411/scratchpad/night12/scorekill.sh
T
Joe DiPrimaandClaude Fable 5 91bd28669e #45/#134 authentic score/death report tail -- replaces the scoring stand-ins
Reconstructs the dark-gap tail of Mech::TakeDamageMessageHandler
(@0x4a02f4-0x4a0890, raw disasm): the three id-0x16 score reports (kill to
the shooter's player / type-0 wire-fidelity / received to the victim's
player) and the BT 0x38-byte VehicleDeadMessage extension {killed-by player,
kill zone} dispatched from the death tail.  Retires BTPostDamageScore /
BTPostKillScore and the per-hit inflicted credit (never existed in 1995:
@0x4c0200 is bound in no handler-table entry -- byte-scan receipt in
decomp-reference).  Suicides now dispatch and the handler negates the award
(the #134 panic penalty).  Collision divert falls through to the death tail
per @0x4a0375 (wall deaths respawn + blast; no score).  ScoreMessage fields
renamed to decoded truth (vitalHit/zoneIndex/subsysID) + wire asserts;
console VTVDamaged points_transfered corrected (Round(award), not Now()).

Benches: scorekill.sh cross-node kill (kills=1 award=4.88, killedBy=2:1
zone=3, single death cycle), scoreself.sh suicide (type=2 award=-39.00
kills=0), deathblast2.sh re-verified (72 bursts at ~9u).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 18:36:58 -05:00

58 lines
2.1 KiB
Bash

#!/usr/bin/env bash
# #45/#134 AUTHENTIC SCORE SENDER verify, bench 1: CROSS-NODE KILL.
# A (madcat, shooter, node 1501) zone-walk-hammers ONLY dz_ldleg on B (loki,
# spinner target, node 1601) at 90u until the vital leg dies -> B dies.
# PASS:
# B log (victim master): DMG rows; DEAD_NOTIFY link!=0; "[death]
# VehicleDead(-1) ... killedBy=<A player>"; "[score] *** KILL report ***";
# death cycle START (respawn un-regressed).
# A log (killer): matchlog SCORE type=2 award>0 kills=1 (rerouted credit);
# per-hit type-0 Verify prints prove the wire-fidelity block B.
set -x
. /c/git/bt411/scratchpad/night6/bench_common.sh
cd /c/git/bt411/content || exit 1
bt_assert_player_env
taskkill //F //IM btl4.exe > /dev/null 2>&1
sleep 2
rm -f sk_a.log sk_b.log sk_relay.log matchlog_*.txt
bt_expert_egg MP.EGG SK.EGG
sed -i "s/^map=.*/map=grass/; s/^time=.*/time=day/" SK.EGG
python - << 'EOF'
lines = open('SK.EGG').read().splitlines(True)
n = 0
for i, l in enumerate(lines):
if l.startswith('vehicle='):
n += 1
lines[i] = 'vehicle=madcat\n' if n == 1 else 'vehicle=loki\n'
open('SK.EGG', 'w').writelines(lines)
print('vehicles set:', n)
EOF
(
export BT_DMG_LOG=1 BT_DEATH_LOG=1 BT_MP_LOG=1
export BT_MATCHLOG=1 BT_SCORE_LOG=1
bt_launch sk_b.log SK.EGG 0x0C -net 1601
)
sleep 2
(
export BT_ZONE_WALK=8 BT_WALK_ZONES=dz_ldleg
export BT_GOTO=enemy BT_GOTO_STOP=90 BT_KEY_NOFOCUS=1
export BT_DMG_LOG=1 BT_DEATH_LOG=1 BT_MP_LOG=1 BT_MATCHLOG=1 BT_SCORE_LOG=1
bt_launch sk_a.log SK.EGG 0x03 -net 1501
)
sleep 5
python ../tools/btconsole.py SK.EGG 127.0.0.1:1501 127.0.0.1:1601 > sk_relay.log 2>&1 &
RELAY=$!
sleep 340
kill $RELAY 2>/dev/null
taskkill //F //IM btl4.exe > /dev/null 2>&1
sleep 3
echo "=== B (victim) death + notify + kill report sent:"
grep -aE "DEAD_NOTIFY|VehicleDead|KILL report|death cycle START" sk_b.log | head -8
echo "=== B matchlog SCORE lines:"
grep -a "SCORE" matchlog_*.txt 2>/dev/null | tail -6
echo "=== A (killer) score handler receipts:"
grep -aE "\[score\]|ScoreMessageHandler" sk_a.log | head -8
echo "=== A kill credit (matchlog):"
grep -a "type=2" matchlog_*.txt 2>/dev/null | tail -3