# ASO API Commands ## ASO `/root/ASO` (Full 2.3.2 / Lite 2.3.2, same interface) ```gdscript var aso = get_node_or_null("/root/ASO") ``` Version ```gdscript aso.aso_api_version() # int, 4 aso.detection_api_version() # int, 1 aso.is_lite_version() # bool aso.get_mod_version() # String, "2.3.2" ``` Detection provider ```gdscript aso.register_detection_provider(obj) # bool, last registration wins aso.unregister_detection_provider(obj) aso.has_detection_provider() # bool ``` Implement on your obj (all optional; return true = detected / false = not / null = defer to ASO): ```gdscript func aso_player_visible(ai) func aso_player_heard(ai) func aso_player_fire_detected(ai) func aso_detection_fill_factor(ai) # float >= 0.0, meter fill multiplier, Full only func before_player_detection(ai, delta) # optional pre-compute before channel queries, once per AI per frame max, delta = accumulated sensorTimer before reset, return ignored ``` Queries ```gdscript aso.get_ai_awareness(ai) # Dictionary, 18 keys aso.is_ai_in_combat(ai) # bool aso.get_detection_meter(ai) # float 0-100 aso.get_ai_faction(ai) # String aso.is_ai_elite(ai) # bool aso.get_ai_squad_id(ai) # String, always "" in Lite aso.is_ai_friendly_to_player(ai) # bool aso.get_ai_ifc_target(ai) # Node or null, AI-vs-AI target aso.is_ai_in_faction_combat(ai) # bool aso.get_ai_tactical_phase(ai) # "coverfire:firing/moving" "fallback:healing/moving" "", always "" in Lite aso.is_ai_suppressing(ai) # bool aso.is_ai_recruited(ai) # bool aso.was_last_shot_blocked(ai) # bool, armor block aso.get_ai_state_snapshot(ai) # Dictionary, deep copy of full internal state ``` awareness keys: `detection_meter player_detected in_combat has_seen_player suppressing lost_player_timer reaction_ready provoked player_visible fire_detected state faction is_elite squad_id in_ifc_mode tactical_phase recruited last_shot_blocked` Control ```gdscript aso.set_detection_meter(ai, value) # float, clamped 0-100 aso.set_ai_provoked(ai, provoked) # bool aso.set_ai_suppressing(ai, on) # bool aso.set_ai_faction(ai, faction) # String aso.alert_ai_to_position(ai, position) # Vector3, sets LKL and wakes passive AI aso.force_player_detected(ai) # instant full awareness aso.calm_ai(ai) # full awareness reset aso.kill_ai(ai, direction = Vector3.UP, force = 1.0) aso.recruit_ai(ai) # bool, companion recruit aso.unrecruit_ai(ai) ``` Global ```gdscript aso.get_active_ai_agents() # Array aso.count_active_ai_agents() # int aso.get_squad_members(squad_id) # Array, always [] in Lite aso.get_recruited_ais() # Array aso.get_available_factions() # Array aso.get_spawn_session_limit() # int aso.spawn_faction_ai(faction, position) # Node or null aso.spawn_boss(position) # Node or null ``` Signals ```gdscript aso.aso_ai_activated.connect(func(ai): pass) aso.aso_ai_combat_started.connect(func(ai): pass) aso.aso_ai_combat_ended.connect(func(ai): pass) aso.aso_ai_ifc_started.connect(func(ai): pass) aso.aso_ai_ifc_ended.connect(func(ai): pass) aso.aso_ai_death.connect(func(ai): pass) aso.aso_squad_wiped.connect(func(): pass) # emitted by Full only ```