一.骑砍单机模式下AI控制
骑砍战团中野外战斗,训练场中小兵和地方小兵的行为统称为场景AI.
骑砍大地图中敌军追踪和遭遇追击统称为大地图AI.
二.骑砍场景AI
骑砍引擎通过header_mission_templates,py定制AI常量控制小兵位置,动作和朝向.可实现自定义阵型和攻击动作。
# Agent AI Simple Behaviors
aisb_hold = 0
aisb_go_to_pos = 1
aisb_mount = 2
aisb_dismount = 3
aisb_melee = 4
aisb_ranged = 5
aisb_ranged_horseback = 6
aisb_charge_horseback = 7
aisb_maneuver_horseback = 8
aisb_flock = 9
aisb_race = 10
aisb_patrol = 11
aisb_no_enemies = 12
aisb_horse_hold = 13
aisb_horse_run_away = 14#设置攻击动作
agent_set_attack_action = 1745 # (agent_set_attack_action, <agent_id>, <direction_value>, <action_value>),
#设置格挡动作
agent_set_defend_action = 1746 # (agent_set_defend_action, <agent_id>, <value>, <duration-in-1/1000-seconds>),
#控制小兵阵型和位置
agent_set_scripted_destination = 1730 # (agent_set_scripted_destination, <agent_id>, <position>, [auto_set_z_to_ground_level], [no_rethink]),
#控制小兵AI强度
agent_ai_set_aggressiveness = 1753 # (agent_ai_set_aggressiveness, <agent_id>, <value>),
三.骑砍大地图AI
骑砍引擎通过header_parties.py定制AI常量控制城镇和军团状态,实现大地图军团的追踪和攻击。可实现大地图护卫队(乱舞水浒功能),军团阵型等功能
ai_bhvr_hold = 0 中立
ai_bhvr_travel_to_party = 1
ai_bhvr_patrol_location = 2
ai_bhvr_patrol_party = 3
ai_bhvr_track_party = 4
ai_bhvr_attack_party = 4
ai_bhvr_avoid_party = 5
ai_bhvr_travel_to_point = 6 前往某个位置
ai_bhvr_negotiate_party = 7
ai_bhvr_in_town = 8 围城
ai_bhvr_travel_to_ship = 9
ai_bhvr_escort_party = 10
ai_bhvr_driven_by_party = 11party_set_marshall = 1604 # (party_set_marshall, <party_id>, <value>),
party_set_flags = 1603 # (party_set_flags, <party_id>, <flag>, <clear_or_set>),
party_set_aggressiveness = 1606 # (party_set_aggressiveness, <party_id>, <number>),
party_set_courage = 1607 # (party_set_courage, <party_id>, <number>),
party_set_ai_initiative = 1639 # (party_set_ai_initiative, <party_id>, <value>),
party_set_ai_behavior = 1640 # (party_set_ai_behavior, <party_id>, <ai_bhvr>),
party_set_ai_object = 1641 # (party_set_ai_object, <party_id>, <object_party_id>),
party_set_ai_target_position = 1642 # (party_set_ai_target_position, <party_id>, <position>),
party_set_ai_patrol_radius = 1643 # (party_set_ai_patrol_radius, <party_id>, <radius_in_km>),
party_ignore_player = 1644 # (party_ignore_player, <party_id>, <duration_in_hours>),
party_set_bandit_attraction = 1645 # (party_set_bandit_attraction, <party_id>, <attaraction>),