debug: OMNI-CONFIRM probe (did the server actually create each outgoing skull tag?) + OMNI-GATE trace (which readiness sub-check closed and skull state) — netgunner selection proven fine (best 29x skull passes, prio 5), ping loss is between send and accept

This commit is contained in:
2026-10-03 18:08:32 -04:00
parent afb458e2c2
commit 28c653428d
2 changed files with 47 additions and 1 deletions
+13 -1
View File
@@ -477,7 +477,16 @@ local function is_tag_valid(tag_name)
elseif tag_name == TAG_NAMES.ENEMY_TAG then
return context.class_name ~= "veteran" or not context.has_focus_target
elseif tag_name == TAG_NAMES.SERVO_SKULL_TAG then
return context.class_name == "cryptic" and context.has_servo_skull and mod:is_servo_skull_ready_to_shoot() and (is_training_grounds() or can_noospheric_command_boost())
local tg = is_training_grounds()
local state_ok = mod:is_servo_skull_ready_to_shoot()
local charge_ok = tg or can_noospheric_command_boost()
if not (state_ok and charge_ok) and mod_settings.debug_mode then
mod.omni_gate_diag_counter = (mod.omni_gate_diag_counter or 0) + 1
if mod.omni_gate_diag_counter % 15 == 1 then
mod:diag(string.format("OMNI-GATE closed counter=%d state=%s state_ok=%s charge_ok=%s", mod.omni_gate_diag_counter, mod:debug_servo_skull_state(), tostring(state_ok), tostring(charge_ok)))
end
end
return context.class_name == "cryptic" and context.has_servo_skull and state_ok and charge_ok
end
return false
end
@@ -539,6 +548,9 @@ local function auto_mark_by_tag(tag_name, t, fixed_frame)
mod:set_auto_mark(TAG_NAMES.ENEMY_TAG, target_unit, target_tag)
else
mod:set_auto_mark(tag_name, target_unit, target_tag)
if tag_name == TAG_NAMES.SERVO_SKULL_TAG and mod.arm_skull_mark_check then
mod:arm_skull_mark_check(target_unit)
end
end
return true
end
@@ -223,6 +223,29 @@ function mod:is_servo_skull_ready_to_shoot()
return state == servo_skull_states.following or state == servo_skull_states.following_shooting or state == servo_skull_states.following_shooting_ability
end
function mod:debug_servo_skull_state()
local companion_spawner_extension = context.companion_spawner_extension
local companion_unit = companion_spawner_extension and companion_spawner_extension:spawned_unit_lookup(special_rules.cryptic_servo_skull_hack)
if not companion_unit then
return "no_unit"
end
local game_session = Managers.state.game_session:game_session()
local game_object_id = Managers.state.unit_spawner:game_object_id(companion_unit)
return tostring(get_game_object_field(game_session, game_object_id, "state"))
end
local skull_mark_check = nil
function mod:arm_skull_mark_check(unit)
if not mod_settings.debug_mode or not unit then
return
end
local unit_data_extension = ScriptUnit_extension(unit, "unit_data_system")
local breed = unit_data_extension and unit_data_extension._breed
skull_mark_check = { unit = unit, ttl = 0.6, n = breed and breed.name or "?" }
end
function mod:is_noospheric_command_boost_breed_valid(target_unit)
local unit_data_extension = ScriptUnit_extension(target_unit, "unit_data_system")
local breed_data = unit_data_extension and unit_data_extension._breed
@@ -368,6 +391,17 @@ end
local hack_interval = 0
local hack_check = nil
function mod:auto_hack(dt, t, fixed_frame)
if skull_mark_check then
skull_mark_check.ttl = skull_mark_check.ttl - dt
if skull_mark_check.ttl <= 0 then
local smart_tag_system = context.smart_tag_system
local tag = smart_tag_system and smart_tag_system:unit_tag(skull_mark_check.unit)
local accepted = tag and tag._template and tag._template.name == TAG_NAMES.SERVO_SKULL_TAG
mod:diag(string.format("OMNI-CONFIRM skull-mark %s accepted=%s alive=%s state=%s", skull_mark_check.n, tostring(accepted == true), tostring(HEALTH_ALIVE[skull_mark_check.unit] == true), mod:debug_servo_skull_state()))
skull_mark_check = nil
end
end
if not mod_settings.auto_hack or (mod_settings.disable_auto_hack_for_noospheric_command and context.has_noospheric_command) or context.class_name ~= "cryptic" or not context.has_servo_skull then
return
end