diff --git a/godot/Game.gd b/godot/Game.gd index f7a679c5910c60c1d2992a48c21dc7d662370708..3bead7dc933c7bd230cf367d1f2f73d066c08088 100644 --- a/godot/Game.gd +++ b/godot/Game.gd @@ -13,6 +13,7 @@ onready var local_map = $LocalMap onready var party = $Party as Party onready var music_player = $MusicPlayer onready var game_over_interface : = $GameOverInterface +onready var quest_system : = $QuestSystem var transitioning = false var combat_arena : CombatArena @@ -20,6 +21,7 @@ var combat_arena : CombatArena func _ready(): local_map.visible = true local_map.spawn_party(party) + local_map.quest_system = quest_system func enter_battle(formation: Formation): """ @@ -28,7 +30,6 @@ func enter_battle(formation: Formation): if transitioning: return - emit_signal("combat_started") music_player.play_battle_theme() transitioning = true yield(transition.fade_to_color(), "completed") @@ -41,6 +42,7 @@ func enter_battle(formation: Formation): yield(transition.fade_from_color(), "completed") transitioning = false combat_arena.battle_start() + emit_signal("combat_started") # Get data from the battlers after the battle ended, # Then copy into the Party node to save earned experience, diff --git a/godot/Game.tscn b/godot/Game.tscn index fdb7bc368a4fe8fec0bcf0dcf98856011e7169a7..f903ffc04394cd164e369115c2468310c2f6f020 100644 --- a/godot/Game.tscn +++ b/godot/Game.tscn @@ -1,12 +1,13 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=9 format=2] [ext_resource path="res://Game.gd" type="Script" id=1] [ext_resource path="res://party/Party.tscn" type="PackedScene" id=2] [ext_resource path="res://local_map/LocalMap.tscn" type="PackedScene" id=3] -[ext_resource path="res://assets/shaders/TransitionColor.tscn" type="PackedScene" id=4] -[ext_resource path="res://interface/game_over/GameOverInterface.tscn" type="PackedScene" id=5] -[ext_resource path="res://assets/audio/bgm/battle_theme.ogg" type="AudioStream" id=6] -[ext_resource path="res://core/MusicPlayer.gd" type="Script" id=7] +[ext_resource path="res://quest_system/QuestSystem.tscn" type="PackedScene" id=4] +[ext_resource path="res://assets/shaders/TransitionColor.tscn" type="PackedScene" id=5] +[ext_resource path="res://interface/game_over/GameOverInterface.tscn" type="PackedScene" id=6] +[ext_resource path="res://assets/audio/bgm/battle_theme.ogg" type="AudioStream" id=7] +[ext_resource path="res://core/MusicPlayer.gd" type="Script" id=8] [node name="Game" type="Node"] script = ExtResource( 1 ) @@ -16,19 +17,23 @@ visible = false [node name="LocalMap" parent="." instance=ExtResource( 3 )] +[node name="QuestSystem" parent="." instance=ExtResource( 4 )] + [node name="Overlays" type="CanvasLayer" parent="."] +editor/display_folded = true -[node name="TransitionColor" parent="Overlays" instance=ExtResource( 4 )] +[node name="TransitionColor" parent="Overlays" instance=ExtResource( 5 )] mouse_filter = 2 -[node name="GameOverInterface" parent="." instance=ExtResource( 5 )] +[node name="GameOverInterface" parent="." instance=ExtResource( 6 )] layer = 0 [node name="MusicPlayer" type="AudioStreamPlayer" parent="."] -stream = ExtResource( 6 ) +stream = ExtResource( 7 ) bus = "Music" -script = ExtResource( 7 ) +script = ExtResource( 8 ) [connection signal="combat_finished" from="." to="LocalMap" method="_on_Game_combat_finished"] +[connection signal="combat_started" from="." to="QuestSystem" method="_on_Game_combat_started"] [connection signal="enemies_encountered" from="LocalMap" to="." method="enter_battle"] [connection signal="restart_requested" from="GameOverInterface" to="." method="_on_GameOverInterface_restart_requested"] diff --git a/godot/combat/battlers/Battler.gd b/godot/combat/battlers/Battler.gd index fa13c558ea38b667199d3c57d21083e487b60e61..bcf8798bd7077e91d75f184087a9ac95514385ec 100644 --- a/godot/combat/battlers/Battler.gd +++ b/godot/combat/battlers/Battler.gd @@ -7,6 +7,8 @@ extends Position2D class_name Battler +signal died(battler) + export var TARGET_OFFSET_DISTANCE : float = 120.0 export var stats : Resource @@ -60,6 +62,7 @@ func take_damage(hit): func _on_health_depleted(): selectable = false yield(skin.play_death(), "completed") + emit_signal("died", self) func appear(): var offset_direction = 1.0 if party_member else -1.0 diff --git a/godot/combat/battlers/enemies/porcupine/PorcupineBattler.tscn b/godot/combat/battlers/enemies/porcupine/PorcupineBattler.tscn index fb9a4f7a625617b284432b85d94d3b07fb289b26..c9baa299017e5e1b389f42e1418f2ca72dce69ff 100644 --- a/godot/combat/battlers/enemies/porcupine/PorcupineBattler.tscn +++ b/godot/combat/battlers/enemies/porcupine/PorcupineBattler.tscn @@ -5,7 +5,9 @@ [ext_resource path="res://animation/PorcupineAnim.tscn" type="PackedScene" id=3] [ext_resource path="res://combat/battlers/ai/RandomAI.gd" type="Script" id=4] -[node name="Porcupine" instance=ExtResource( 1 )] +[node name="Porcupine" groups=[ +"enemies", +] instance=ExtResource( 1 )] stats = ExtResource( 2 ) [node name="PorcupineAnim" parent="Skin" index="2" instance=ExtResource( 3 )] diff --git a/godot/dialogue/data/quest_dialogue_test.json b/godot/dialogue/data/quest_dialogue_test.json new file mode 100644 index 0000000000000000000000000000000000000000..c15c460bcb87de1916aa9f3d02ee797f404f31a5 --- /dev/null +++ b/godot/dialogue/data/quest_dialogue_test.json @@ -0,0 +1,4 @@ +{ + "001" : {"name":"Robi", "expression": "neutral", "text":"Completing quests is fun." }, + "002" : {"name":"Godette", "expression": "neutral", "text":"We should do this more often!" }, +} diff --git a/godot/dialogue/data/quest_giver_conversation.json b/godot/dialogue/data/quest_giver_conversation.json new file mode 100644 index 0000000000000000000000000000000000000000..5fcf18c77f76f7911208aa51fcb43fe1bff2b0f3 --- /dev/null +++ b/godot/dialogue/data/quest_giver_conversation.json @@ -0,0 +1,5 @@ +{ + "001" : {"name":"Godette", "expression": "neutral", "text":"We are adventurers, right?." }, + "002" : {"name":"Robi", "expression": "neutral", "text":"I guess so, why?" }, + "003" : {"name":"Godette", "expression": "neutral", "text":"Let's go on a quest!" } +} diff --git a/godot/local_map/LocalMap.gd b/godot/local_map/LocalMap.gd index 8b97e6186b59ec594486a2f8af746c56aa9404ae..d97b405a191578f76da19505a72249ad8ee41c17 100644 --- a/godot/local_map/LocalMap.gd +++ b/godot/local_map/LocalMap.gd @@ -13,6 +13,8 @@ signal dialogue_finished() onready var dialogue_box = $MapInterface/DialogueBox onready var grid = $GameBoard +var quest_system + func _ready() -> void: assert dialogue_box for action in get_tree().get_nodes_in_group("map_action"): diff --git a/godot/local_map/LocalMap.tscn b/godot/local_map/LocalMap.tscn index ddf731a3f8ad17c3be69e198e5e251111e47b14d..b750f1f3d038c7b83a182078e80b2b2335d6a965 100644 --- a/godot/local_map/LocalMap.tscn +++ b/godot/local_map/LocalMap.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=15 format=2] +[gd_scene load_steps=17 format=2] [ext_resource path="res://local_map/LocalMap.gd" type="Script" id=1] [ext_resource path="res://assets/tilesets/grasslands.tres" type="TileSet" id=2] @@ -11,8 +11,9 @@ [ext_resource path="res://local_map/pawns/actions/StartCombatAction.tscn" type="PackedScene" id=9] [ext_resource path="res://combat/battlers/formations/PorcupineFormation001.tscn" type="PackedScene" id=10] [ext_resource path="res://local_map/pawns/actions/DialogueAction.tscn" type="PackedScene" id=11] -[ext_resource path="res://interface/gui/DialogueBox.tscn" type="PackedScene" id=12] - +[ext_resource path="res://local_map/pawns/unique_pawns/QuestGiver.tscn" type="PackedScene" id=12] +[ext_resource path="res://local_map/pawns/unique_pawns/QuestDialogueTest.tscn" type="PackedScene" id=13] +[ext_resource path="res://interface/gui/DialogueBox.tscn" type="PackedScene" id=14] [sub_resource type="RectangleShape2D" id=1] @@ -48,6 +49,7 @@ script = ExtResource( 6 ) party_scene = ExtResource( 7 ) [node name="EncounterPawn" parent="GameBoard/Pawns" instance=ExtResource( 8 )] +editor/display_folded = true position = Vector2( 440, 600 ) facing = { "down": false, @@ -63,6 +65,7 @@ shape = SubResource( 1 ) formation = ExtResource( 10 ) [node name="DialoguePawn" parent="GameBoard/Pawns" instance=ExtResource( 8 )] +editor/display_folded = true position = Vector2( 360, 360 ) facing = { "down": false, @@ -78,6 +81,7 @@ shape = SubResource( 2 ) dialogue_file_path = "res://dialogue/data/test_conversation.json" [node name="DialogueCombatPawn" parent="GameBoard/Pawns" instance=ExtResource( 8 )] +editor/display_folded = true position = Vector2( 1160, 600 ) facing = { "down": true, @@ -92,11 +96,29 @@ dialogue_file_path = "res://dialogue/data/test_conversation.json" [node name="StartCombat" parent="GameBoard/Pawns/DialogueCombatPawn/Actions" index="1" instance=ExtResource( 9 )] formation = ExtResource( 10 ) +[node name="QuestGiver" parent="GameBoard/Pawns" instance=ExtResource( 12 )] +position = Vector2( 1040, 150 ) +facing = { +"down": true, +"left": true, +"right": true, +"up": true +} + +[node name="QuestDialogueTest" parent="GameBoard/Pawns" instance=ExtResource( 13 )] +position = Vector2( 1310, 440 ) +facing = { +"down": true, +"left": true, +"right": true, +"up": true +} + [node name="MapInterface" type="CanvasLayer" parent="."] pause_mode = 2 layer = 100 -[node name="DialogueBox" parent="MapInterface" instance=ExtResource( 12 )] +[node name="DialogueBox" parent="MapInterface" instance=ExtResource( 14 )] visible = false diff --git a/godot/local_map/pawns/PawnInteractive.gd b/godot/local_map/pawns/PawnInteractive.gd index fd98b6808cdc393b89168eb34dadc29a07eeea8b..06dc84654157c459798af7a111834c3f39a00fd3 100644 --- a/godot/local_map/pawns/PawnInteractive.gd +++ b/godot/local_map/pawns/PawnInteractive.gd @@ -8,6 +8,8 @@ look direction or using an Area2D extends PawnActor class_name PawnInteractive +signal interaction_finished(pawn) + onready var raycasts : = $Raycasts as Node2D onready var dialogue_balloon : = $DialogueBalloon as Sprite @@ -87,6 +89,7 @@ func start_interaction() -> void: for action in actions: action.interact() yield(action, "finished") + emit_signal("interaction_finished", self) if vanish_on_interaction: queue_free() get_tree().paused = false diff --git a/godot/local_map/pawns/PawnInteractive.tscn b/godot/local_map/pawns/PawnInteractive.tscn index 72b04fe6c6594cc91a27df0dc78a63b9060d3828..106f3bf67ddf5a3c5a814bdb8d8c91935828a520 100644 --- a/godot/local_map/pawns/PawnInteractive.tscn +++ b/godot/local_map/pawns/PawnInteractive.tscn @@ -8,7 +8,9 @@ extents = Vector2( 30, 30 ) -[node name="InteractivePawn" type="Area2D"] +[node name="InteractivePawn" type="Area2D" groups=[ +"interactive_pawns", +]] pause_mode = 2 collision_layer = 4 collision_mask = 2 diff --git a/godot/local_map/pawns/actions/GiveQuestAction.gd b/godot/local_map/pawns/actions/GiveQuestAction.gd new file mode 100644 index 0000000000000000000000000000000000000000..e2ad6f6f443ffaaca0e274cb59dc9713d6eb0b1c --- /dev/null +++ b/godot/local_map/pawns/actions/GiveQuestAction.gd @@ -0,0 +1,11 @@ +extends MapAction +class_name GiveQuestAction + +export var quest : PackedScene + +func interact() -> void: + get_tree().paused = false + var quest_instance = quest.instance() + if not local_map.quest_system.has_quest(quest_instance): + local_map.quest_system.add_quest(quest_instance) + emit_signal("finished") diff --git a/godot/local_map/pawns/actions/GiveQuestAction.tscn b/godot/local_map/pawns/actions/GiveQuestAction.tscn new file mode 100644 index 0000000000000000000000000000000000000000..3e117d0eccb474553548331c39c1a8e2c8616091 --- /dev/null +++ b/godot/local_map/pawns/actions/GiveQuestAction.tscn @@ -0,0 +1,7 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://local_map/pawns/actions/GiveQuestAction.gd" type="Script" id=1] + +[node name="GiveQuestAction" type="Node"] +script = ExtResource( 1 ) + diff --git a/godot/local_map/pawns/unique_pawns/QuestDialogueTest.tscn b/godot/local_map/pawns/unique_pawns/QuestDialogueTest.tscn new file mode 100644 index 0000000000000000000000000000000000000000..4106b1958755e5ddb9695753058487ca1dd1feb8 --- /dev/null +++ b/godot/local_map/pawns/unique_pawns/QuestDialogueTest.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://local_map/pawns/PawnInteractive.tscn" type="PackedScene" id=1] +[ext_resource path="res://local_map/pawns/actions/DialogueAction.tscn" type="PackedScene" id=2] + +[node name="QuestDialogueTest" instance=ExtResource( 1 )] + +[node name="Dialogue" parent="Actions" index="0" instance=ExtResource( 2 )] +dialogue_file_path = "res://dialogue/data/quest_dialogue_test.json" + diff --git a/godot/local_map/pawns/unique_pawns/QuestGiver.tscn b/godot/local_map/pawns/unique_pawns/QuestGiver.tscn new file mode 100644 index 0000000000000000000000000000000000000000..9c67c22834799d6d51e822d657b87dc01721d5fb --- /dev/null +++ b/godot/local_map/pawns/unique_pawns/QuestGiver.tscn @@ -0,0 +1,21 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://local_map/pawns/PawnInteractive.tscn" type="PackedScene" id=1] +[ext_resource path="res://local_map/pawns/actions/DialogueAction.tscn" type="PackedScene" id=2] +[ext_resource path="res://local_map/pawns/actions/GiveQuestAction.tscn" type="PackedScene" id=3] +[ext_resource path="res://quest_system/quests/TestQuest.tscn" type="PackedScene" id=4] + +[node name="QuestGiver" instance=ExtResource( 1 )] +facing = { +"down": true, +"left": true, +"right": true, +"up": true +} + +[node name="Dialogue" parent="Actions" index="0" instance=ExtResource( 2 )] +dialogue_file_path = "res://dialogue/data/quest_giver_conversation.json" + +[node name="GiveQuestAction" parent="Actions" index="1" instance=ExtResource( 3 )] +quest = ExtResource( 4 ) + diff --git a/godot/project.godot b/godot/project.godot index ed43c287e2de7f35a2747fd8b6599e08295db532..1f9f3e0303d38618e14e42e2d9e6f05d1339c45a 100644 --- a/godot/project.godot +++ b/godot/project.godot @@ -89,6 +89,11 @@ _global_script_classes=[ { "language": "GDScript", "path": "res://interface/game_over/GameOverInterface.gd" }, { +"base": "Node", +"class": "GiveQuestAction", +"language": "GDScript", +"path": "res://local_map/pawns/actions/GiveQuestAction.gd" +}, { "base": "Resource", "class": "GrowthStats", "language": "GDScript", @@ -179,6 +184,31 @@ _global_script_classes=[ { "language": "GDScript", "path": "res://local_map/pawns/PawnLeader.gd" }, { +"base": "Node", +"class": "Quest", +"language": "GDScript", +"path": "res://quest_system/quests/Quest.gd" +}, { +"base": "Node", +"class": "QuestInteractObjective", +"language": "GDScript", +"path": "res://quest_system/quests/QuestInteractObjective.gd" +}, { +"base": "Node", +"class": "QuestObjective", +"language": "GDScript", +"path": "res://quest_system/QuestObjective.gd" +}, { +"base": "Node", +"class": "QuestSlayObjective", +"language": "GDScript", +"path": "res://quest_system/quests/QuestSlayObjective.gd" +}, { +"base": "Node", +"class": "QuestSystem", +"language": "GDScript", +"path": "res://quest_system/QuestSystem.gd" +}, { "base": "Node2D", "class": "RectExtents", "language": "GDScript", @@ -226,6 +256,7 @@ _global_script_class_icons={ "Formation": "", "GameBoard": "", "GameOverInterface": "", +"GiveQuestAction": "", "GrowthStats": "", "Hit": "", "Inventory": "", @@ -244,6 +275,11 @@ _global_script_class_icons={ "PawnFollower": "", "PawnInteractive": "", "PawnLeader": "", +"Quest": "", +"QuestInteractObjective": "", +"QuestObjective": "", +"QuestSlayObjective": "", +"QuestSystem": "", "RectExtents": "", "Skill": "", "SkillAction": "", diff --git a/godot/quest_system/QuestObjective.gd b/godot/quest_system/QuestObjective.gd new file mode 100644 index 0000000000000000000000000000000000000000..55f02c3c5ddc8c661888cef5bcee12b18d74f6e6 --- /dev/null +++ b/godot/quest_system/QuestObjective.gd @@ -0,0 +1,10 @@ +extends Node +class_name QuestObjective + +signal objective_finished(objective) + +var finished : bool = false + +func finish() -> void: + emit_signal("objective_finished", self) + finished = true \ No newline at end of file diff --git a/godot/quest_system/QuestSystem.gd b/godot/quest_system/QuestSystem.gd new file mode 100644 index 0000000000000000000000000000000000000000..9c84f2e938a29b88d063841c289e7e52a4d25314 --- /dev/null +++ b/godot/quest_system/QuestSystem.gd @@ -0,0 +1,22 @@ +extends Node +class_name QuestSystem + +var quests = [] + +func add_quest(new_quest) -> void: + add_child(new_quest) + quests.append(new_quest) + new_quest.connect("quest_finished", self, "_on_quest_finished") + +func _on_quest_finished(quest) -> void: + print("Quest finished -> Give rewards") + +func _on_Game_combat_started() -> void: + for quest in quests: + (quest as Quest).notify_slay_objectives() + +func has_quest(other_quest) -> bool: + for quest in quests: + if quest.title == other_quest.title: + return true + return false diff --git a/godot/quest_system/QuestSystem.tscn b/godot/quest_system/QuestSystem.tscn new file mode 100644 index 0000000000000000000000000000000000000000..0892c434dc78afdbae50f3b84960111c98521653 --- /dev/null +++ b/godot/quest_system/QuestSystem.tscn @@ -0,0 +1,7 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://quest_system/QuestSystem.gd" type="Script" id=1] + +[node name="QuestSystem" type="Node"] +script = ExtResource( 1 ) + diff --git a/godot/quest_system/quests/Quest.gd b/godot/quest_system/quests/Quest.gd new file mode 100644 index 0000000000000000000000000000000000000000..725fa4f40a5ed442a38b5589ebdec04740e3875f --- /dev/null +++ b/godot/quest_system/quests/Quest.gd @@ -0,0 +1,30 @@ +extends Node +class_name Quest + +signal quest_finished(quest) + +export var title : String +export var description : String + +var objectives = [] +var finished_objectives = [] + +var active : bool = false + +func _ready() -> void: + active = true + for objective in get_children(): + objectives.append(objective) + objective.connect("objective_finished", self, "_on_objective_finished") + +func _on_objective_finished(objective) -> void: + finished_objectives.append(objective) + if finished_objectives.size() == objectives.size(): + emit_signal("quest_finished", self) + active = false + +func notify_slay_objectives() -> void: + for objective in get_children(): + if not objective is QuestSlayObjective: + continue + (objective as QuestSlayObjective).connect_signals() diff --git a/godot/quest_system/quests/Quest.tscn b/godot/quest_system/quests/Quest.tscn new file mode 100644 index 0000000000000000000000000000000000000000..b1094f787434f3d521384f2213336c3e2034fce8 --- /dev/null +++ b/godot/quest_system/quests/Quest.tscn @@ -0,0 +1,7 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://quest_system/quests/Quest.gd" type="Script" id=1] + +[node name="Quest" type="Node"] +script = ExtResource( 1 ) + diff --git a/godot/quest_system/quests/QuestInteractObjective.gd b/godot/quest_system/quests/QuestInteractObjective.gd new file mode 100644 index 0000000000000000000000000000000000000000..96ff1ea45cd1c98946d9636f883146d7625ceae2 --- /dev/null +++ b/godot/quest_system/quests/QuestInteractObjective.gd @@ -0,0 +1,12 @@ +extends QuestObjective +class_name QuestInteractObjective + +export var interact_with : PackedScene + +func _ready() -> void: + for interactive_pawn in get_tree().get_nodes_in_group("interactive_pawns"): + interactive_pawn.connect("interaction_finished", self, "_on_interaction_finished") + +func _on_interaction_finished(pawn) -> void: + if pawn.filename == interact_with.resource_path and not finished: + finish() diff --git a/godot/quest_system/quests/QuestInteractObjective.tscn b/godot/quest_system/quests/QuestInteractObjective.tscn new file mode 100644 index 0000000000000000000000000000000000000000..2225a00b57f2a1704f010a9a1d136279e67147bf --- /dev/null +++ b/godot/quest_system/quests/QuestInteractObjective.tscn @@ -0,0 +1,8 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://quest_system/quests/QuestObjective.tscn" type="PackedScene" id=1] +[ext_resource path="res://quest_system/quests/QuestInteractObjective.gd" type="Script" id=2] + +[node name="QuestInteractObjective" instance=ExtResource( 1 )] +script = ExtResource( 2 ) + diff --git a/godot/quest_system/quests/QuestObjective.tscn b/godot/quest_system/quests/QuestObjective.tscn new file mode 100644 index 0000000000000000000000000000000000000000..18524d45feb3f2667478bb080d48977b95fe5439 --- /dev/null +++ b/godot/quest_system/quests/QuestObjective.tscn @@ -0,0 +1,7 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://quest_system/QuestObjective.gd" type="Script" id=1] + +[node name="QuestObjective" type="Node"] +script = ExtResource( 1 ) + diff --git a/godot/quest_system/quests/QuestSlayObjective.gd b/godot/quest_system/quests/QuestSlayObjective.gd new file mode 100644 index 0000000000000000000000000000000000000000..4b261751563fa5a055bf680a37b8f86afe8bb1dd --- /dev/null +++ b/godot/quest_system/quests/QuestSlayObjective.gd @@ -0,0 +1,15 @@ +extends QuestObjective +class_name QuestSlayObjective + +export var amount : int +export var battler_to_slay : PackedScene + +func connect_signals() -> void: + for enemy in get_tree().get_nodes_in_group("enemies"): + enemy.connect("died", self, "_on_enemy_died") + +func _on_enemy_died(battler) -> void: + if battler.filename == battler_to_slay.resource_path: + amount -= 1 + if amount == 0 and not finished: + finish() diff --git a/godot/quest_system/quests/QuestSlayObjective.tscn b/godot/quest_system/quests/QuestSlayObjective.tscn new file mode 100644 index 0000000000000000000000000000000000000000..ba6afe1064b3616289279591af3bbdddd1709619 --- /dev/null +++ b/godot/quest_system/quests/QuestSlayObjective.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://quest_system/quests/QuestObjective.tscn" type="PackedScene" id=1] +[ext_resource path="res://quest_system/quests/QuestSlayObjective.gd" type="Script" id=2] + +[node name="QuestSlayObjective" groups=[ +"quest_objectives", +] instance=ExtResource( 1 )] +script = ExtResource( 2 ) + diff --git a/godot/quest_system/quests/TestQuest.tscn b/godot/quest_system/quests/TestQuest.tscn new file mode 100644 index 0000000000000000000000000000000000000000..c296036d0a307bd465d1d1ffadcf6c3244c4cc7e --- /dev/null +++ b/godot/quest_system/quests/TestQuest.tscn @@ -0,0 +1,19 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://quest_system/quests/Quest.tscn" type="PackedScene" id=1] +[ext_resource path="res://quest_system/quests/QuestSlayObjective.tscn" type="PackedScene" id=2] +[ext_resource path="res://combat/battlers/enemies/porcupine/PorcupineBattler.tscn" type="PackedScene" id=3] +[ext_resource path="res://quest_system/quests/QuestInteractObjective.tscn" type="PackedScene" id=4] +[ext_resource path="res://local_map/pawns/unique_pawns/QuestDialogueTest.tscn" type="PackedScene" id=5] + +[node name="TestQuest" index="0" instance=ExtResource( 1 )] +title = "Test Quest" +description = "Just a quest for testing. Good luck!" + +[node name="QuestSlayObjective" parent="." index="0" instance=ExtResource( 2 )] +amount = 3 +battler_to_slay = ExtResource( 3 ) + +[node name="QuestInteractObjective" parent="." index="1" instance=ExtResource( 4 )] +interact_with = ExtResource( 5 ) +