353 lines
15 KiB
Plaintext
353 lines
15 KiB
Plaintext
[gd_scene load_steps=29 format=2]
|
|
|
|
[ext_resource path="res://scenes/maps/dungeon.tscn" type="PackedScene" id=1]
|
|
[ext_resource path="res://scenes/main.gd" type="Script" id=2]
|
|
[ext_resource path="res://scenes/meta-ai.gd" type="Script" id=3]
|
|
[ext_resource path="res://ai/behavior_tree.gd" type="Script" id=4]
|
|
[ext_resource path="res://ai/blackboard.gd" type="Script" id=5]
|
|
[ext_resource path="res://ai/sequence.gd" type="Script" id=6]
|
|
[ext_resource path="res://ai/can_throw.gd" type="Script" id=7]
|
|
[ext_resource path="res://ai/throw_weapon.gd" type="Script" id=8]
|
|
[ext_resource path="res://ai/set_action.gd" type="Script" id=9]
|
|
[ext_resource path="res://ai/selector.gd" type="Script" id=10]
|
|
[ext_resource path="res://ai/unstuck.gd" type="Script" id=11]
|
|
[ext_resource path="res://ai/parallel.gd" type="Script" id=12]
|
|
[ext_resource path="res://ai/is_action.gd" type="Script" id=13]
|
|
[ext_resource path="res://ai/set_dst_from_group.gd" type="Script" id=14]
|
|
[ext_resource path="res://ai/build_path.gd" type="Script" id=15]
|
|
[ext_resource path="res://ai/valid_path.gd" type="Script" id=16]
|
|
[ext_resource path="res://ai/fetch_path_point.gd" type="Script" id=17]
|
|
[ext_resource path="res://ai/has_arrived.gd" type="Script" id=18]
|
|
[ext_resource path="res://ai/look_at_path.gd" type="Script" id=19]
|
|
[ext_resource path="res://ai/walk.gd" type="Script" id=20]
|
|
[ext_resource path="res://ai/stop.gd" type="Script" id=21]
|
|
[ext_resource path="res://ai/is_free.gd" type="Script" id=22]
|
|
[ext_resource path="res://ai/wash_floor.gd" type="Script" id=23]
|
|
[ext_resource path="res://ui/bars.gd" type="Script" id=24]
|
|
[ext_resource path="res://ai/give_up.gd" type="Script" id=25]
|
|
[ext_resource path="res://ai/can_grab.gd" type="Script" id=26]
|
|
[ext_resource path="res://ai/grab.gd" type="Script" id=27]
|
|
[ext_resource path="res://ai/spawn_smart_obj.gd" type="Script" id=28]
|
|
|
|
[node name="main" type="Spatial"]
|
|
script = ExtResource( 2 )
|
|
|
|
[node name="meta-ai" type="Node" parent="."]
|
|
script = ExtResource( 3 )
|
|
|
|
[node name="behavior_tree" type="Node" parent="meta-ai"]
|
|
script = ExtResource( 4 )
|
|
|
|
[node name="BTParallel" type="Node" parent="meta-ai/behavior_tree"]
|
|
script = ExtResource( 12 )
|
|
|
|
[node name="BTSequence" type="Node" parent="meta-ai/behavior_tree/BTParallel"]
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="BTIsFree" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence"]
|
|
script = ExtResource( 22 )
|
|
|
|
[node name="BTSelector" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence"]
|
|
script = ExtResource( 10 )
|
|
|
|
[node name="BTSetAction" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence/BTSelector"]
|
|
script = ExtResource( 9 )
|
|
min_distance = 12.0
|
|
|
|
[node name="BTSequence2" type="Node" parent="meta-ai/behavior_tree/BTParallel"]
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="BTIsFree" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2"]
|
|
script = ExtResource( 22 )
|
|
|
|
[node name="BTSelector2" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2"]
|
|
script = ExtResource( 10 )
|
|
|
|
[node name="BTSequence" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2"]
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="BTIsPathValid" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTSequence"]
|
|
script = ExtResource( 16 )
|
|
|
|
[node name="BTFetchPathPoint" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTSequence"]
|
|
script = ExtResource( 17 )
|
|
|
|
[node name="BTSelector" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTSequence"]
|
|
script = ExtResource( 10 )
|
|
|
|
[node name="BTSequence" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTSequence/BTSelector"]
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="BTHasArrived" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTSequence/BTSelector/BTSequence"]
|
|
script = ExtResource( 18 )
|
|
|
|
[node name="BTStop" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTSequence/BTSelector/BTSequence"]
|
|
script = ExtResource( 21 )
|
|
|
|
[node name="BTSequence2" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTSequence/BTSelector"]
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="BTLookAtPath" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTSequence/BTSelector/BTSequence2"]
|
|
script = ExtResource( 19 )
|
|
|
|
[node name="BTWalk" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTSequence/BTSelector/BTSequence2"]
|
|
script = ExtResource( 20 )
|
|
|
|
[node name="BTParallel" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2"]
|
|
script = ExtResource( 12 )
|
|
|
|
[node name="Seq_find_weapon" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel"]
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="BTIsAction" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_find_weapon"]
|
|
script = ExtResource( 13 )
|
|
action = "find_weapon"
|
|
|
|
[node name="BTSetDestinationGroup" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_find_weapon"]
|
|
script = ExtResource( 14 )
|
|
dst_group = "weapons"
|
|
|
|
[node name="BTBuildPath" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_find_weapon"]
|
|
script = ExtResource( 15 )
|
|
|
|
[node name="Seq_hide" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel"]
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="BTIsAction" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_hide"]
|
|
script = ExtResource( 13 )
|
|
action = "hide"
|
|
|
|
[node name="BTSetDestinationGroup" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_hide"]
|
|
script = ExtResource( 14 )
|
|
dst_group = "hide_spot"
|
|
|
|
[node name="BTBuildPath" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_hide"]
|
|
script = ExtResource( 15 )
|
|
|
|
[node name="Seq_attack" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel"]
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="BTIsAction" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_attack"]
|
|
script = ExtResource( 13 )
|
|
|
|
[node name="BTSetDestinationGroup" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_attack"]
|
|
script = ExtResource( 14 )
|
|
dst_group = "_enemy"
|
|
|
|
[node name="BTBuildPath" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_attack"]
|
|
script = ExtResource( 15 )
|
|
|
|
[node name="Seq_run_away" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel"]
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="BTIsAction" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_run_away"]
|
|
script = ExtResource( 13 )
|
|
action = "run_away"
|
|
|
|
[node name="BTSetDestinationGroup" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_run_away"]
|
|
script = ExtResource( 14 )
|
|
dst_group = "_away"
|
|
|
|
[node name="BTBuildPath" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_run_away"]
|
|
script = ExtResource( 15 )
|
|
|
|
[node name="Seq_unstuck" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel"]
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="BTIsAction" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_unstuck"]
|
|
script = ExtResource( 13 )
|
|
action = "unstuck"
|
|
|
|
[node name="BTUnstuck" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_unstuck"]
|
|
script = ExtResource( 11 )
|
|
|
|
[node name="Seq_wash_floor" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel"]
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="BTIsAction" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_wash_floor"]
|
|
script = ExtResource( 13 )
|
|
action = "wash_floor"
|
|
|
|
[node name="BTWashFloor" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_wash_floor"]
|
|
script = ExtResource( 23 )
|
|
|
|
[node name="Seq_give_up" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel"]
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="BTIsAction" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_give_up"]
|
|
script = ExtResource( 13 )
|
|
action = "give_up"
|
|
|
|
[node name="BTGiveUp" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_give_up"]
|
|
script = ExtResource( 25 )
|
|
|
|
[node name="Seq_patrol" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel"]
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="BTIsAction" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_patrol"]
|
|
script = ExtResource( 13 )
|
|
action = "patrol"
|
|
|
|
[node name="BTSetDestinationGroup" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_patrol"]
|
|
script = ExtResource( 14 )
|
|
dst_group = "_patrol"
|
|
|
|
[node name="BTBuildPath" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_patrol"]
|
|
script = ExtResource( 15 )
|
|
|
|
[node name="Seq_shoot" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel"]
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="BTCanThrow" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_shoot"]
|
|
script = ExtResource( 7 )
|
|
|
|
[node name="BTThrowWeapon" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_shoot"]
|
|
script = ExtResource( 8 )
|
|
|
|
[node name="Seq_grab" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel"]
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="BTCanGrab" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_grab"]
|
|
script = ExtResource( 26 )
|
|
|
|
[node name="BTGrab" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_grab"]
|
|
script = ExtResource( 27 )
|
|
|
|
[node name="Seq_deliver_captuve" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel"]
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="BTIsAction" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_deliver_captuve"]
|
|
script = ExtResource( 13 )
|
|
action = "deliver_captive"
|
|
|
|
[node name="BTSetDestinationGroup" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_deliver_captuve"]
|
|
script = ExtResource( 14 )
|
|
dst_group = "jail_door"
|
|
|
|
[node name="BTBuildPath" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_deliver_captuve"]
|
|
script = ExtResource( 15 )
|
|
|
|
[node name="Seq_forcing" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel"]
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="BTIsAction" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_forcing"]
|
|
script = ExtResource( 13 )
|
|
action = "forcing"
|
|
|
|
[node name="BTSelector" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_forcing"]
|
|
script = ExtResource( 10 )
|
|
|
|
[node name="BTSpawnSmartObj" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_forcing/BTSelector"]
|
|
script = ExtResource( 28 )
|
|
animation_script = "stage main
|
|
init:
|
|
first:
|
|
travel parameters/main/playback SmartObject
|
|
travel parameters/main/SmartObject/playback bed
|
|
travel parameters/main/SmartObject/bed/playback beating_m
|
|
mod_stat agression -100.0
|
|
second:
|
|
travel parameters/main/playback SmartObject
|
|
travel parameters/main/SmartObject/playback bed
|
|
travel parameters/main/SmartObject/bed/playback beating
|
|
mod_stat health -100.0
|
|
next_stage forcing1
|
|
next_cond cond_stat_lessthan first agression 10.0
|
|
exit_cond cond_stat_lessthan second health 1.0
|
|
stage forcing1
|
|
first:
|
|
travel parameters/main/playback SmartObject
|
|
travel parameters/main/SmartObject/playback bed
|
|
travel parameters/main/SmartObject/bed/playback forcing_m
|
|
mod_stat stamina -100.0
|
|
mod_stat health 100.0
|
|
second:
|
|
travel parameters/main/playback SmartObject
|
|
travel parameters/main/SmartObject/playback bed
|
|
travel parameters/main/SmartObject/bed/playback forcing
|
|
mod_stat stamina -100.0
|
|
next_stage forcing2
|
|
next_cond cond_stat_lessthan first stamina 100.0
|
|
exit_cond cond_stat_lessthan second health 1.0
|
|
stage forcing2
|
|
first:
|
|
travel parameters/main/playback SmartObject
|
|
travel parameters/main/SmartObject/playback bed
|
|
travel parameters/main/SmartObject/bed/playback forcing_s1_m
|
|
mod_stat stamina -100.0
|
|
mod_stat health 10.0
|
|
second:
|
|
travel parameters/main/playback SmartObject
|
|
travel parameters/main/SmartObject/playback bed
|
|
travel parameters/main/SmartObject/bed/playback forcing_s1
|
|
mod_stat stamina -100.0
|
|
next_cond cond_stat_morethan first health 1000.0
|
|
exit_cond cond_stat_lessthan second health 1.0
|
|
next_stage main
|
|
"
|
|
|
|
[node name="BTSequence" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_forcing/BTSelector"]
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="BTSetDestinationGroup" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_forcing/BTSelector/BTSequence"]
|
|
script = ExtResource( 14 )
|
|
dst_group = "female"
|
|
|
|
[node name="BTBuildPath" type="Node" parent="meta-ai/behavior_tree/BTParallel/BTSequence2/BTSelector2/BTParallel/Seq_forcing/BTSelector/BTSequence"]
|
|
script = ExtResource( 15 )
|
|
|
|
[node name="blackboard" type="Node" parent="meta-ai"]
|
|
script = ExtResource( 5 )
|
|
|
|
[node name="cam_target" type="Spatial" parent="."]
|
|
|
|
[node name="cam_rot" type="Spatial" parent="cam_target"]
|
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.05, 1.2, 0.2 )
|
|
|
|
[node name="offset" type="Spatial" parent="cam_target/cam_rot"]
|
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.1, -0.2, 0.4 )
|
|
|
|
[node name="Camera" type="ClippedCamera" parent="cam_target/cam_rot/offset"]
|
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0 )
|
|
margin = 0.06
|
|
|
|
[node name="OmniLight" type="OmniLight" parent="cam_target/cam_rot/offset/Camera"]
|
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, 0.5 )
|
|
|
|
[node name="Panel" type="Panel" parent="."]
|
|
anchor_right = 1.0
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|
|
|
|
[node name="h" type="HBoxContainer" parent="Panel"]
|
|
margin_right = 40.0
|
|
margin_bottom = 40.0
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|
|
|
|
[node name="bars" type="VBoxContainer" parent="Panel/h"]
|
|
margin_right = 150.0
|
|
margin_bottom = 84.0
|
|
size_flags_horizontal = 3
|
|
size_flags_vertical = 3
|
|
script = ExtResource( 24 )
|
|
|
|
[node name="health" type="ProgressBar" parent="Panel/h/bars"]
|
|
margin_right = 150.0
|
|
margin_bottom = 40.0
|
|
rect_min_size = Vector2( 150, 40 )
|
|
size_flags_horizontal = 3
|
|
size_flags_vertical = 3
|
|
|
|
[node name="stamina" type="ProgressBar" parent="Panel/h/bars"]
|
|
margin_top = 44.0
|
|
margin_right = 150.0
|
|
margin_bottom = 84.0
|
|
rect_min_size = Vector2( 150, 40 )
|
|
size_flags_horizontal = 3
|
|
size_flags_vertical = 3
|
|
|
|
[node name="dungeon" parent="." instance=ExtResource( 1 )]
|