{ config = "scripts/ai/deathmatch/bt_config.kv3" root = { type = "decorator_bot_service" memory_to_expire = [ { key = "ShortTermAttackMemory" time = 0.7 distance = 0 }, { key = "LongTermMemory" time = 10 distance = 500 }, { key = "ShortTermInvestigateMemory" time = 3 distance = 200 } ] child = { type = "decorator_buy_service" output = "ShouldBuy" child = { type = "parallel" children = [ { type = "decorator_repeat" child = { type = "parallel" children = [ // memorize enemies through vision { type = "subtree" file = "scripts/ai/modules/bt_memorize_enemies_vision.kv3" name = "MemorizeEnemiesVision" }, // memorize noises happening right now { type = "subtree" file = "scripts/ai/modules/bt_memorize_noises.kv3" name = "MemorizeNoises" }, // record the nearest memorized event to investigate { type = "subtree" file = "scripts/ai/modules/bt_memorize_nearest_investigation.kv3" name = "MemorizeNearestInvestigation" } ] } }, { type = "decorator_repeat" child = { type = "selector" children = [ // Buy if we have to { type = "condition_is_empty" input = "ShouldBuy" negated = 1 child = { // sequencer: evaluate first to last child, in order type = "sequencer" children = [ { type = "action_wait" wait_time_min = 3 wait_time_max = 3 }, { type = "action_buy" }, { type = "decorator_remove_key" input = "ShouldBuy" } ] } }, // Else: face the damage source if we're taking damage { type = "decorator_sensor" entity_type_filter = "DAMAGE" output = "Damage" priority = 0 child = { type = "condition_is_empty" input = "Damage" negated = 1 child = { type = "action_aim" input = "Damage" acquire_only = 1 } } }, // Else: attack if we see an enemy { type = "subtree" file = "scripts/ai/modules/bt_attack.kv3" name = "Attack" }, { type = "subtree" file = "scripts/ai/modules/bt_heal_if_needed.kv3" name = "HealIfNeeded" }, // Else: investigate the closest memorized event { type = "subtree" file = "scripts/ai/modules/bt_investigate_closest_memorized_event.kv3" name = "InvestigateClosestMemorizedEvent" }, // Else: hunt { // sequencer: evaluate first to last child, in order type = "sequencer" children = [ { type = "action_equip_weapon" weapon = "BEST" }, { type = "decorator_random_int" min = 0 max = 1 output = "BombSiteIndex" child = { type = "action_choose_bomb_site_area" input = "BombSiteIndex" output = "HuntAreas" } }, { type = "action_choose_team_spawn_area" output = "HuntAreas" }, { type = "action_choose_random_waypoint" input = "HuntAreas" output = "TargetHuntArea" }, { type = "action_move_to" destination = "TargetHuntArea" movement_type = "BT_ACTION_MOVETO_RUN" route_type = "BT_ACTION_MOVETO_FASTEST_ROUTE" } ] } ] } } ] } } } }