diff --git a/addons/terrain_3d/editor.gd.uid b/addons/terrain_3d/editor.gd.uid new file mode 100644 index 0000000..fec3d7a --- /dev/null +++ b/addons/terrain_3d/editor.gd.uid @@ -0,0 +1 @@ +uid://cu503s5kvphtn diff --git a/addons/terrain_3d/extras/import_sgt.gd.uid b/addons/terrain_3d/extras/import_sgt.gd.uid new file mode 100644 index 0000000..e526590 --- /dev/null +++ b/addons/terrain_3d/extras/import_sgt.gd.uid @@ -0,0 +1 @@ +uid://dssclgt0trckq diff --git a/addons/terrain_3d/extras/minimum.gdshader.uid b/addons/terrain_3d/extras/minimum.gdshader.uid new file mode 100644 index 0000000..34c86f8 --- /dev/null +++ b/addons/terrain_3d/extras/minimum.gdshader.uid @@ -0,0 +1 @@ +uid://x8gxk55qi2vm diff --git a/addons/terrain_3d/extras/project_on_terrain3d.gd.uid b/addons/terrain_3d/extras/project_on_terrain3d.gd.uid new file mode 100644 index 0000000..0a02983 --- /dev/null +++ b/addons/terrain_3d/extras/project_on_terrain3d.gd.uid @@ -0,0 +1 @@ +uid://bk8d6dgefns5c diff --git a/addons/terrain_3d/src/asset_dock.gd.uid b/addons/terrain_3d/src/asset_dock.gd.uid new file mode 100644 index 0000000..4a76d7c --- /dev/null +++ b/addons/terrain_3d/src/asset_dock.gd.uid @@ -0,0 +1 @@ +uid://535c636rweiv diff --git a/addons/terrain_3d/src/bake_lod_dialog.gd.uid b/addons/terrain_3d/src/bake_lod_dialog.gd.uid new file mode 100644 index 0000000..46ec31f --- /dev/null +++ b/addons/terrain_3d/src/bake_lod_dialog.gd.uid @@ -0,0 +1 @@ +uid://d1qj50s4fhf0f diff --git a/addons/terrain_3d/src/baker.gd.uid b/addons/terrain_3d/src/baker.gd.uid new file mode 100644 index 0000000..82c4198 --- /dev/null +++ b/addons/terrain_3d/src/baker.gd.uid @@ -0,0 +1 @@ +uid://cocyc4cxaeye6 diff --git a/addons/terrain_3d/src/channel_packer.gd.uid b/addons/terrain_3d/src/channel_packer.gd.uid new file mode 100644 index 0000000..02cd847 --- /dev/null +++ b/addons/terrain_3d/src/channel_packer.gd.uid @@ -0,0 +1 @@ +uid://swcqgichcq85 diff --git a/addons/terrain_3d/src/gradient_operation_builder.gd.uid b/addons/terrain_3d/src/gradient_operation_builder.gd.uid new file mode 100644 index 0000000..a48ab30 --- /dev/null +++ b/addons/terrain_3d/src/gradient_operation_builder.gd.uid @@ -0,0 +1 @@ +uid://bvh0rjck0ice0 diff --git a/addons/terrain_3d/src/multi_picker.gd.uid b/addons/terrain_3d/src/multi_picker.gd.uid new file mode 100644 index 0000000..a2f11d1 --- /dev/null +++ b/addons/terrain_3d/src/multi_picker.gd.uid @@ -0,0 +1 @@ +uid://cjg3b55r57h8x diff --git a/addons/terrain_3d/src/operation_builder.gd.uid b/addons/terrain_3d/src/operation_builder.gd.uid new file mode 100644 index 0000000..5f7cf12 --- /dev/null +++ b/addons/terrain_3d/src/operation_builder.gd.uid @@ -0,0 +1 @@ +uid://dx2qyuyr5kh87 diff --git a/addons/terrain_3d/src/region_gizmo.gd.uid b/addons/terrain_3d/src/region_gizmo.gd.uid new file mode 100644 index 0000000..609b14d --- /dev/null +++ b/addons/terrain_3d/src/region_gizmo.gd.uid @@ -0,0 +1 @@ +uid://b842l1cbmh6eq diff --git a/addons/terrain_3d/src/terrain_tools.gd.uid b/addons/terrain_3d/src/terrain_tools.gd.uid new file mode 100644 index 0000000..2028e25 --- /dev/null +++ b/addons/terrain_3d/src/terrain_tools.gd.uid @@ -0,0 +1 @@ +uid://b77cgiqv8xfls diff --git a/addons/terrain_3d/src/tool_settings.gd.uid b/addons/terrain_3d/src/tool_settings.gd.uid new file mode 100644 index 0000000..352b4e1 --- /dev/null +++ b/addons/terrain_3d/src/tool_settings.gd.uid @@ -0,0 +1 @@ +uid://c73auggirriq2 diff --git a/addons/terrain_3d/src/toolbar.gd.uid b/addons/terrain_3d/src/toolbar.gd.uid new file mode 100644 index 0000000..b3c4e5b --- /dev/null +++ b/addons/terrain_3d/src/toolbar.gd.uid @@ -0,0 +1 @@ +uid://0q7qc73wagwl diff --git a/addons/terrain_3d/src/ui.gd.uid b/addons/terrain_3d/src/ui.gd.uid new file mode 100644 index 0000000..d026e97 --- /dev/null +++ b/addons/terrain_3d/src/ui.gd.uid @@ -0,0 +1 @@ +uid://dnk5q6wyaldnh diff --git a/addons/terrain_3d/terrain.gdextension.uid b/addons/terrain_3d/terrain.gdextension.uid new file mode 100644 index 0000000..85cbc2a --- /dev/null +++ b/addons/terrain_3d/terrain.gdextension.uid @@ -0,0 +1 @@ +uid://bexpbdpoj1nh3 diff --git a/addons/terrain_3d/tools/importer.gd.uid b/addons/terrain_3d/tools/importer.gd.uid new file mode 100644 index 0000000..42f0c2d --- /dev/null +++ b/addons/terrain_3d/tools/importer.gd.uid @@ -0,0 +1 @@ +uid://b74q81dau8dw2 diff --git a/addons/terrain_3d/utils/terrain_3d_objects.gd.uid b/addons/terrain_3d/utils/terrain_3d_objects.gd.uid new file mode 100644 index 0000000..aa70685 --- /dev/null +++ b/addons/terrain_3d/utils/terrain_3d_objects.gd.uid @@ -0,0 +1 @@ +uid://h0poxvm31dch diff --git a/addons/terrain_3d/utils/transform_changed_notifier.gd.uid b/addons/terrain_3d/utils/transform_changed_notifier.gd.uid new file mode 100644 index 0000000..b0befdf --- /dev/null +++ b/addons/terrain_3d/utils/transform_changed_notifier.gd.uid @@ -0,0 +1 @@ +uid://wrvu3mdm0ss0 diff --git a/assets/models/gobot/gobot_skin.gd.uid b/assets/models/gobot/gobot_skin.gd.uid new file mode 100644 index 0000000..117d18c --- /dev/null +++ b/assets/models/gobot/gobot_skin.gd.uid @@ -0,0 +1 @@ +uid://bo1070g3b1e0b diff --git a/assets/models/round_bat/round_bat_skin.gd.uid b/assets/models/round_bat/round_bat_skin.gd.uid new file mode 100644 index 0000000..5a829ce --- /dev/null +++ b/assets/models/round_bat/round_bat_skin.gd.uid @@ -0,0 +1 @@ +uid://d22hcg66s8hxu diff --git a/entities/healing_station/healing_station.gd.uid b/entities/healing_station/healing_station.gd.uid new file mode 100644 index 0000000..c3aada9 --- /dev/null +++ b/entities/healing_station/healing_station.gd.uid @@ -0,0 +1 @@ +uid://clkrhqgx1qviq diff --git a/entities/monster/monster.gd.uid b/entities/monster/monster.gd.uid new file mode 100644 index 0000000..bd6f745 --- /dev/null +++ b/entities/monster/monster.gd.uid @@ -0,0 +1 @@ +uid://bx1hupx44tdsd diff --git a/entities/monster_spawnpoint/monster_spawnpoint.gd.uid b/entities/monster_spawnpoint/monster_spawnpoint.gd.uid new file mode 100644 index 0000000..65c8e94 --- /dev/null +++ b/entities/monster_spawnpoint/monster_spawnpoint.gd.uid @@ -0,0 +1 @@ +uid://db7inrm6xdmc5 diff --git a/entities/monster_spawnpoint/monster_spawnpoint_probability.gd.uid b/entities/monster_spawnpoint/monster_spawnpoint_probability.gd.uid new file mode 100644 index 0000000..b1da46d --- /dev/null +++ b/entities/monster_spawnpoint/monster_spawnpoint_probability.gd.uid @@ -0,0 +1 @@ +uid://b44bktvws5v3s diff --git a/entities/player/player.gd b/entities/player/player.gd index e4370c6..930259c 100644 --- a/entities/player/player.gd +++ b/entities/player/player.gd @@ -153,17 +153,22 @@ func handle_battle() -> void: UI.battle_ui.set_message("You won!") await get_tree().create_timer(2.0).timeout + + var gained_xp: int = player_monster.data.calculate_gained_xp(enemy.data) + player_monster.data.add_xp(gained_xp) + UI.battle_ui.set_message("%s gained %s XP!" % [player_monster.data.name, str(gained_xp)]) + print("You gained %s xp!" % str(gained_xp)) + await get_tree().create_timer(2.0).timeout + # End the battle and reset some states # TODO: Maybe add a cooldown of 1.5s after the battle ended - battle_state = Enums.BattleState.NOT_IN_BATTLE - enemy.queue_free() player_monster.queue_free() + enemy.queue_free() + UI.ingame_menu.update() UI.show_battle_ui(false) UI.show_ingame_controls(true) - var gained_xp: int = player_monster.data.calculate_gained_xp(enemy.data) - player_monster.data.add_xp(gained_xp) - print("You gained %s xp!" % str(gained_xp)) + battle_state = Enums.BattleState.NOT_IN_BATTLE Enums.BattleState.LOSE: SoundManager.play_sound_effect("Lost Battle") diff --git a/entities/player/player.gd.uid b/entities/player/player.gd.uid new file mode 100644 index 0000000..58ec653 --- /dev/null +++ b/entities/player/player.gd.uid @@ -0,0 +1 @@ +uid://be00fdjdehq03 diff --git a/game.gd b/game.gd index 4f64ec4..e273b09 100644 --- a/game.gd +++ b/game.gd @@ -37,7 +37,8 @@ func start_new_game() -> void: # Give the player a monster var monster: MonsterData = MonsterData.new() - monster.set_values("debuggy", { "current_health": 12 }, 5) + monster.set_values("debuggy", {}, 5) + monster.heal(999) SaveManager.current_save.party.push_back(monster) # Update the UI once diff --git a/game.gd.uid b/game.gd.uid new file mode 100644 index 0000000..5f3dd23 --- /dev/null +++ b/game.gd.uid @@ -0,0 +1 @@ +uid://dd1wbhas5qlmi diff --git a/game.tscn b/game.tscn index 039f4be..8e5dcc2 100644 --- a/game.tscn +++ b/game.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=4 format=3 uid="uid://cswuap81n7t3f"] -[ext_resource type="Script" path="res://game.gd" id="1_mfbtr"] +[ext_resource type="Script" uid="uid://dd1wbhas5qlmi" path="res://game.gd" id="1_mfbtr"] [ext_resource type="PackedScene" uid="uid://cavbs8gurvpfh" path="res://worlds/terrain1/terrain1.tscn" id="2_luexm"] -[ext_resource type="Script" path="res://globals/colors.gd" id="3_0x6i2"] +[ext_resource type="Script" uid="uid://bf0efu0g7cnwh" path="res://globals/colors.gd" id="3_0x6i2"] [node name="Game" type="Node3D"] script = ExtResource("1_mfbtr") diff --git a/globals/SoundFile.gd.uid b/globals/SoundFile.gd.uid new file mode 100644 index 0000000..d098361 --- /dev/null +++ b/globals/SoundFile.gd.uid @@ -0,0 +1 @@ +uid://pctv6qasg6aa diff --git a/globals/colors.gd.uid b/globals/colors.gd.uid new file mode 100644 index 0000000..c3e56a4 --- /dev/null +++ b/globals/colors.gd.uid @@ -0,0 +1 @@ +uid://bf0efu0g7cnwh diff --git a/globals/enums.gd.uid b/globals/enums.gd.uid new file mode 100644 index 0000000..d89fc6a --- /dev/null +++ b/globals/enums.gd.uid @@ -0,0 +1 @@ +uid://dj52nei2vwnuk diff --git a/globals/scene_manager.gd.uid b/globals/scene_manager.gd.uid new file mode 100644 index 0000000..7dfb703 --- /dev/null +++ b/globals/scene_manager.gd.uid @@ -0,0 +1 @@ +uid://t62dxmfb12pl diff --git a/globals/sound_manager.gd.uid b/globals/sound_manager.gd.uid new file mode 100644 index 0000000..a5131ed --- /dev/null +++ b/globals/sound_manager.gd.uid @@ -0,0 +1 @@ +uid://b36pfmvb37tcx diff --git a/globals/utils.gd b/globals/utils.gd index c5093d9..324f41e 100644 --- a/globals/utils.gd +++ b/globals/utils.gd @@ -16,3 +16,8 @@ func load_base_monster_data(p_unique_id: String) -> MonsterData: else: printerr("Monster.gd: No monster with the ID %s found" % p_unique_id) return null + +func heal_all() -> void: + for monster: MonsterData in SaveManager.current_save.party: + print("Healed %s" % monster.name) + monster.heal(9999) diff --git a/globals/utils.gd.uid b/globals/utils.gd.uid new file mode 100644 index 0000000..6b275da --- /dev/null +++ b/globals/utils.gd.uid @@ -0,0 +1 @@ +uid://x5ktjel1bpd0 diff --git a/project.godot b/project.godot index d874c74..96607e8 100644 --- a/project.godot +++ b/project.godot @@ -12,7 +12,7 @@ config_version=5 config/name="monsterfangen" run/main_scene="res://game.tscn" -config/features=PackedStringArray("4.3", "Mobile") +config/features=PackedStringArray("4.4", "Mobile") boot_splash/image="res://assets/logo/logo.png" config/icon="res://assets/logo/logo.png" @@ -64,22 +64,22 @@ theme/custom="res://theme/basic_theme.tres" joystick_right_right={ "deadzone": 0.0, -"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":2,"axis_value":1.0,"script":null) +"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-3,"axis":2,"axis_value":1.0,"script":null) ] } joystick_right_left={ "deadzone": 0.0, -"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":2,"axis_value":-1.0,"script":null) +"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-3,"axis":2,"axis_value":-1.0,"script":null) ] } joystick_right_up={ "deadzone": 0.0, -"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":-1.0,"script":null) +"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-3,"axis":3,"axis_value":-1.0,"script":null) ] } joystick_right_down={ "deadzone": 0.0, -"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":1.0,"script":null) +"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-3,"axis":3,"axis_value":1.0,"script":null) ] } diff --git a/resources/asset_info.gd.uid b/resources/asset_info.gd.uid new file mode 100644 index 0000000..ad35e4d --- /dev/null +++ b/resources/asset_info.gd.uid @@ -0,0 +1 @@ +uid://b7oqmdlfu5k6h diff --git a/resources/monster_data.gd b/resources/monster_data.gd index 87c1e2a..6e16e6e 100644 --- a/resources/monster_data.gd +++ b/resources/monster_data.gd @@ -68,23 +68,47 @@ func set_values(p_unique_id : String = "", current_values: Dictionary = {}, p_le ## This sets the monster to the specified level func set_level(p_level: int) -> void: self.level = p_level + #print("old: %s/%s" % [self.current_health, self.health]) update() + #print("new: %s/%s" % [self.current_health, self.health]) # Updates the values according to the current level of the monster -func update() -> void: +func update() -> void: + + # INFO: the "current" values like the current_health should keep the percentage ratio + # of the new and increased values like max_health + var health_ratio: float = float(current_health) / float(self.health) + #print("Ratio is %s" % str(health_ratio)) + + var new_current_health_value: int = round( float(self.health) * health_ratio ) + #print(new_current_health_value) + + if new_current_health_value > self.current_health: + self.current_health = new_current_health_value + self.attack = int((((base_attack * 2.0) * level ) / 100) + (level + 5)) self.health = int((((base_health * 2.0) * level ) / 100) + (level + 5)) self.defense = int((((base_defense * 2.0) * level ) / 100) + (level + 5)) self.tempo = int((((base_tempo * 2.0) * level ) / 100) + (level + 5)) - self.xp_for_levelup = int(pow(level + 1, 3)) + + # This is the default growth rate formula: n^3 + # It calculates the total cumulative xp needed to reach level n + # To determine the XP needed for levelup, subtract the needed absolute xp + # for the current level from the next level + self.xp_for_levelup = int( (pow(level + 1, 3) - pow(level, 3)) ) func level_up() -> void: + print("monster_data.gd: %s leveled up!" % self.name) set_level(level + 1) + + # reset the gained XP + self.xp = 0 + emit_signal("on_level_up") func calculate_gained_xp(enemy_data: MonsterData) -> int: var calculated_xp: int = 0 - calculated_xp = int( (enemy_data.base_xp * enemy_data.level / 5.0) * ( float(enemy_data.level) / float(level) ) ) + calculated_xp = 1 + int( (enemy_data.base_xp * enemy_data.level / 5.0) * ( float(enemy_data.level) / float(level) ) ) return calculated_xp func add_xp(amount: int = 0) -> void: diff --git a/resources/monster_data.gd.uid b/resources/monster_data.gd.uid new file mode 100644 index 0000000..d6c0beb --- /dev/null +++ b/resources/monster_data.gd.uid @@ -0,0 +1 @@ +uid://c37crtp1pdt42 diff --git a/resources/monster_type.gd.uid b/resources/monster_type.gd.uid new file mode 100644 index 0000000..c065f50 --- /dev/null +++ b/resources/monster_type.gd.uid @@ -0,0 +1 @@ +uid://cxuxtevirvn7j diff --git a/resources/monsters/debuggy.tres b/resources/monsters/debuggy.tres index 9b51873..22eef3f 100644 --- a/resources/monsters/debuggy.tres +++ b/resources/monsters/debuggy.tres @@ -1,6 +1,6 @@ [gd_resource type="Resource" script_class="MonsterData" load_steps=4 format=3 uid="uid://0xqaef8uftnv"] -[ext_resource type="Script" path="res://resources/monster_data.gd" id="1_2n3ph"] +[ext_resource type="Script" uid="uid://c37crtp1pdt42" path="res://resources/monster_data.gd" id="1_2n3ph"] [ext_resource type="PackedScene" uid="uid://h2we7rb772hy" path="res://assets/models/round_bat/model/bat.glb" id="1_dsg0f"] [ext_resource type="Texture2D" uid="uid://b6ylra30qxf30" path="res://assets/logo/logo.png" id="2_a4t2w"] @@ -13,17 +13,17 @@ thumbnail = ExtResource("2_a4t2w") model = ExtResource("1_dsg0f") primary_type = 5 secondary_type = 17 -base_attack = 10 -base_health = 20 -base_defense = 30 -base_tempo = 40 -base_xp = 3 +base_attack = 45 +base_health = 40 +base_defense = 40 +base_tempo = 56 +base_xp = 55 attack = 1 current_health = 1 health = 1 defense = 1 tempo = 1 level = 1 -xp = 1 +xp = 0 nickname = "" xp_for_levelup = 1 diff --git a/resources/save_game/save_game.gd.uid b/resources/save_game/save_game.gd.uid new file mode 100644 index 0000000..0cfa550 --- /dev/null +++ b/resources/save_game/save_game.gd.uid @@ -0,0 +1 @@ +uid://co1n2rldtc1d1 diff --git a/resources/save_game/save_manager.gd.uid b/resources/save_game/save_manager.gd.uid new file mode 100644 index 0000000..d8ebf7d --- /dev/null +++ b/resources/save_game/save_manager.gd.uid @@ -0,0 +1 @@ +uid://fu02qhhn4vh8 diff --git a/resources/save_game/saved_data.gd.uid b/resources/save_game/saved_data.gd.uid new file mode 100644 index 0000000..a8c92b6 --- /dev/null +++ b/resources/save_game/saved_data.gd.uid @@ -0,0 +1 @@ +uid://tosto05trpfl diff --git a/shaders/blur.gdshader.uid b/shaders/blur.gdshader.uid new file mode 100644 index 0000000..82a2d96 --- /dev/null +++ b/shaders/blur.gdshader.uid @@ -0,0 +1 @@ +uid://b0djbt0yqc6st diff --git a/ui/battle_ui/battle_ui.gd.uid b/ui/battle_ui/battle_ui.gd.uid new file mode 100644 index 0000000..9027a3b --- /dev/null +++ b/ui/battle_ui/battle_ui.gd.uid @@ -0,0 +1 @@ +uid://cgg3sy2qd5352 diff --git a/ui/ingame_controls/camera_controls.gd.uid b/ui/ingame_controls/camera_controls.gd.uid new file mode 100644 index 0000000..1da1574 --- /dev/null +++ b/ui/ingame_controls/camera_controls.gd.uid @@ -0,0 +1 @@ +uid://cp2jtkql0gaci diff --git a/ui/ingame_controls/ingame_controls.gd.uid b/ui/ingame_controls/ingame_controls.gd.uid new file mode 100644 index 0000000..04776a2 --- /dev/null +++ b/ui/ingame_controls/ingame_controls.gd.uid @@ -0,0 +1 @@ +uid://dylk55426bidt diff --git a/ui/ingame_controls/joystick.gd.uid b/ui/ingame_controls/joystick.gd.uid new file mode 100644 index 0000000..ca99a71 --- /dev/null +++ b/ui/ingame_controls/joystick.gd.uid @@ -0,0 +1 @@ +uid://cuik3h7xk1ung diff --git a/ui/ingame_menu/ingame_menu.gd b/ui/ingame_menu/ingame_menu.gd index c2e6109..6f7c579 100644 --- a/ui/ingame_menu/ingame_menu.gd +++ b/ui/ingame_menu/ingame_menu.gd @@ -5,6 +5,9 @@ class_name MonsterList @onready var monster_list_entry: PackedScene = preload("res://ui/ingame_menu/party_list_entry.tscn") func _ready() -> void: + # INFO: Add debug heal function for the "Party" button + %PartyButton.pressed.connect(debug_heal) + visible = false for i: int in range(6): var entry: Node = monster_list_entry.instantiate() @@ -14,12 +17,20 @@ func _on_close_button_pressed() -> void: visible = false func update() -> void: - for i: int in SaveManager.current_save.party.size(): - var monster: MonsterData = SaveManager.current_save.party[i] + for i: int in range(6): var entry: Node = monster_list_entry_container.get_child(i) - entry.update(monster) + + if SaveManager.current_save.party.size() >= i+1: + var monster: MonsterData = SaveManager.current_save.party[i] + entry.update(monster) + else: + entry.hide_entry() func _update_player_info() -> void: #%PlayerName.text = pass + +func debug_heal() -> void: + Utils.heal_all() + UI.ingame_menu.update() diff --git a/ui/ingame_menu/ingame_menu.gd.uid b/ui/ingame_menu/ingame_menu.gd.uid new file mode 100644 index 0000000..bda6c07 --- /dev/null +++ b/ui/ingame_menu/ingame_menu.gd.uid @@ -0,0 +1 @@ +uid://dlgvxqnux5b76 diff --git a/ui/ingame_menu/ingame_menu.tscn b/ui/ingame_menu/ingame_menu.tscn index 62e5202..8884325 100644 --- a/ui/ingame_menu/ingame_menu.tscn +++ b/ui/ingame_menu/ingame_menu.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=4 format=3 uid="uid://bbvbnrcjatkrb"] -[ext_resource type="Script" path="res://ui/ingame_menu/ingame_menu.gd" id="1_beinb"] +[ext_resource type="Script" uid="uid://dlgvxqnux5b76" path="res://ui/ingame_menu/ingame_menu.gd" id="1_beinb"] [ext_resource type="Texture2D" uid="uid://bhh31i3wgww43" path="res://assets/textures/Game Icons/Vector/2x/singleplayer.png" id="2_c2ia0"] [ext_resource type="Texture2D" uid="uid://cxry7h4q17lir" path="res://assets/textures/Game Icons/Vector/2x/star.png" id="3_oo4iu"] @@ -33,9 +33,9 @@ layout_mode = 2 [node name="PlayerInfo" type="MarginContainer" parent="MarginContainer/PanelContainer/VBoxContainer"] layout_mode = 2 -theme_override_constants/margin_left = 40 -theme_override_constants/margin_top = 30 -theme_override_constants/margin_right = 40 +theme_override_constants/margin_left = 10 +theme_override_constants/margin_top = 10 +theme_override_constants/margin_right = 10 [node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/PanelContainer/VBoxContainer/PlayerInfo"] layout_mode = 2 @@ -51,14 +51,14 @@ unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 theme_override_colors/font_color = Color(0, 0, 0, 1) -text = "PLAYER_NAME" +text = "Max" vertical_alignment = 1 [node name="MoneyValue" type="Label" parent="MarginContainer/PanelContainer/VBoxContainer/PlayerInfo/HBoxContainer"] unique_name_in_owner = true layout_mode = 2 theme_override_colors/font_color = Color(0, 0, 0, 1) -text = "1.000.000" +text = "23.451" vertical_alignment = 1 [node name="CurrencyIcon" type="TextureRect" parent="MarginContainer/PanelContainer/VBoxContainer/PlayerInfo/HBoxContainer"] @@ -72,15 +72,19 @@ layout_mode = 2 alignment = 1 [node name="PartyButton" type="Button" parent="MarginContainer/PanelContainer/VBoxContainer/HBoxContainer2"] +unique_name_in_owner = true layout_mode = 2 +size_flags_horizontal = 3 text = "Party" [node name="Items" type="Button" parent="MarginContainer/PanelContainer/VBoxContainer/HBoxContainer2"] layout_mode = 2 +size_flags_horizontal = 3 text = "Items" [node name="Player" type="Button" parent="MarginContainer/PanelContainer/VBoxContainer/HBoxContainer2"] layout_mode = 2 +size_flags_horizontal = 3 text = "Player" [node name="MonsterInfoTitle" type="MarginContainer" parent="MarginContainer/PanelContainer/VBoxContainer"] @@ -115,11 +119,10 @@ theme_override_constants/margin_bottom = 32 [node name="CloseButton" type="Button" parent="MarginContainer/PanelContainer/VBoxContainer/CloseButtonContainer"] unique_name_in_owner = true +custom_minimum_size = Vector2(150, 0) layout_mode = 2 size_flags_horizontal = 4 theme_type_variation = &"RedButton" text = "Close" -icon_alignment = 1 -expand_icon = true [connection signal="pressed" from="MarginContainer/PanelContainer/VBoxContainer/CloseButtonContainer/CloseButton" to="." method="_on_close_button_pressed"] diff --git a/ui/ingame_menu/party_list_entry.gd b/ui/ingame_menu/party_list_entry.gd index f4f11e6..a8cb103 100644 --- a/ui/ingame_menu/party_list_entry.gd +++ b/ui/ingame_menu/party_list_entry.gd @@ -1,11 +1,21 @@ extends PanelContainer class_name PartyListEntry +func _ready() -> void: + $HBoxContainer.modulate.a = 0.0 + +func hide_entry() -> void: + $HBoxContainer.modulate.a = 0.0 + func update(monster: MonsterData) -> void: - %MonsterID.text = str(0) - %MonsterName.text = monster.name - %MonsterLevel.text = "Lvl. %s" % monster.level - %HealthProgressBar.value = monster.current_health - %HealthProgressBar.max_value = monster.health - %ExperienceProgressBar.value = monster.xp - %ExperienceProgressBar.max_value = monster.xp_for_levelup + $HBoxContainer.modulate.a = 1.0 + %MonsterID.text = str(0) + %MonsterName.text = monster.name + %MonsterLevel.text = "Lvl. %s" % monster.level + %HealthProgressBar.value = monster.current_health + %HealthProgressBar.max_value = monster.health + %ExperienceProgressBar.value = monster.xp + %ExperienceProgressBar.max_value = monster.xp_for_levelup + %MonsterATK.text = "ATK: " + str(monster.attack) + %MonsterDEF.text = "DEF: " + str(monster.defense) + %MonsterXP.text = "XP: " + str(monster.xp) + "/" + str(monster.xp_for_levelup) diff --git a/ui/ingame_menu/party_list_entry.gd.uid b/ui/ingame_menu/party_list_entry.gd.uid new file mode 100644 index 0000000..143dd71 --- /dev/null +++ b/ui/ingame_menu/party_list_entry.gd.uid @@ -0,0 +1 @@ +uid://dxa5lmd7juge3 diff --git a/ui/ingame_menu/party_list_entry.tscn b/ui/ingame_menu/party_list_entry.tscn index 0e4e3a7..47e7aca 100644 --- a/ui/ingame_menu/party_list_entry.tscn +++ b/ui/ingame_menu/party_list_entry.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=8 format=3 uid="uid://brp2sljqnkuhe"] -[ext_resource type="Script" path="res://ui/ingame_menu/party_list_entry.gd" id="1_gdhy7"] +[ext_resource type="Script" uid="uid://dxa5lmd7juge3" path="res://ui/ingame_menu/party_list_entry.gd" id="1_gdhy7"] [ext_resource type="Texture2D" uid="uid://b6ylra30qxf30" path="res://assets/logo/logo.png" id="2_rogma"] [ext_resource type="Texture2D" uid="uid://2vxx2waofxpw" path="res://assets/textures/Xbox Series/Vector/xbox_button_menu_outline.svg" id="3_etjt6"] @@ -80,7 +80,6 @@ theme_override_constants/separation = 0 [node name="HealthProgressBar" type="ProgressBar" parent="HBoxContainer/VBoxContainer/ProgressBarContainer"] unique_name_in_owner = true layout_mode = 2 -size_flags_horizontal = 3 size_flags_vertical = 4 theme_override_styles/background = SubResource("StyleBoxFlat_s3mod") theme_override_styles/fill = SubResource("StyleBoxFlat_nb1sm") @@ -90,6 +89,7 @@ show_percentage = false [node name="ExperienceProgressBar" type="ProgressBar" parent="HBoxContainer/VBoxContainer/ProgressBarContainer"] unique_name_in_owner = true +custom_minimum_size = Vector2(0, 5) layout_mode = 2 theme_override_styles/background = SubResource("StyleBoxFlat_fkb5g") theme_override_styles/fill = SubResource("StyleBoxFlat_b4pov") @@ -97,6 +97,24 @@ step = 1.0 rounded = true show_percentage = false +[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/VBoxContainer"] +layout_mode = 2 + +[node name="MonsterATK" type="Label" parent="HBoxContainer/VBoxContainer/HBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "ATK: 0" + +[node name="MonsterDEF" type="Label" parent="HBoxContainer/VBoxContainer/HBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "DEF: 0" + +[node name="MonsterXP" type="Label" parent="HBoxContainer/VBoxContainer/HBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "XP: 0" + [node name="SwapPositionButton" type="Button" parent="HBoxContainer"] unique_name_in_owner = true self_modulate = Color(0, 0, 0, 1) @@ -104,7 +122,7 @@ custom_minimum_size = Vector2(30, 30) layout_mode = 2 size_flags_horizontal = 8 size_flags_vertical = 4 -theme_override_constants/icon_max_width = 32 +theme_override_constants/icon_max_width = 60 icon = ExtResource("3_etjt6") flat = true icon_alignment = 1 diff --git a/ui/license_list/license_entry.gd.uid b/ui/license_list/license_entry.gd.uid new file mode 100644 index 0000000..e6c465b --- /dev/null +++ b/ui/license_list/license_entry.gd.uid @@ -0,0 +1 @@ +uid://de6rsei7l6dv4 diff --git a/ui/main_menu/main_menu.gd b/ui/main_menu/main_menu.gd index 5251757..c0c2203 100644 --- a/ui/main_menu/main_menu.gd +++ b/ui/main_menu/main_menu.gd @@ -56,11 +56,11 @@ func add_license(license_path: String) -> void: if license_path.ends_with(".remap"): license_path = license_path.replace(".remap", "") - print(LICENSE_FOLDER + license_path) + #print(LICENSE_FOLDER + license_path) var asset_info: AssetInfo = ResourceLoader.load(LICENSE_FOLDER + license_path) var new_license_entry: Node = license_entry.instantiate() license_container.add_child(new_license_entry) - print(asset_info) + #print(asset_info) new_license_entry.populate(asset_info) diff --git a/ui/main_menu/main_menu.gd.uid b/ui/main_menu/main_menu.gd.uid new file mode 100644 index 0000000..fe44e46 --- /dev/null +++ b/ui/main_menu/main_menu.gd.uid @@ -0,0 +1 @@ +uid://bgexsev1yslus diff --git a/ui/ui.gd.uid b/ui/ui.gd.uid new file mode 100644 index 0000000..a4bd53c --- /dev/null +++ b/ui/ui.gd.uid @@ -0,0 +1 @@ +uid://bhajdnao0awhr diff --git a/worlds/terrain1/terrain1.tscn b/worlds/terrain1/terrain1.tscn index 63b0d3f..99a9fe7 100644 --- a/worlds/terrain1/terrain1.tscn +++ b/worlds/terrain1/terrain1.tscn @@ -4,7 +4,7 @@ [ext_resource type="Terrain3DMaterial" uid="uid://c6ppgrnektc8g" path="res://worlds/terrain1/terrain1_material.tres" id="2_2cdhe"] [ext_resource type="Terrain3DAssets" uid="uid://bh60t03kfpvux" path="res://worlds/terrain1/terrain1_assets.tres" id="3_5hdjg"] [ext_resource type="PackedScene" uid="uid://dawpmu4vvv3rs" path="res://entities/monster_spawnpoint/monster_spawnpoint.tscn" id="4_l81pf"] -[ext_resource type="Script" path="res://entities/monster_spawnpoint/monster_spawnpoint_probability.gd" id="5_6bskj"] +[ext_resource type="Script" uid="uid://b44bktvws5v3s" path="res://entities/monster_spawnpoint/monster_spawnpoint_probability.gd" id="5_6bskj"] [ext_resource type="Resource" uid="uid://0xqaef8uftnv" path="res://resources/monsters/debuggy.tres" id="6_of6wf"] [ext_resource type="PackedScene" uid="uid://bi7vo3i6wsl2y" path="res://assets/models/environment/stylized_nature_kit_quaternius/plant7diedummekuh.glb" id="7_a22cv"] @@ -46,18 +46,9 @@ collision_mask = 9 [node name="MonsterSpawnpoint" parent="." instance=ExtResource("4_l81pf")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.3621, 0, -15.1762) spawnable_monsters = Array[ExtResource("5_6bskj")]([SubResource("Resource_rgf8x")]) +min_level = 2 +max_level = 5 +ignore_visibility = true -[node name="MonsterSpawnpoint2" parent="." instance=ExtResource("4_l81pf")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14.129, 0, -9.60006) -spawnable_monsters = Array[ExtResource("5_6bskj")]([SubResource("Resource_rgf8x")]) - -[node name="MonsterSpawnpoint3" parent="." instance=ExtResource("4_l81pf")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 37.0513, 4.65929, 13.587) -spawnable_monsters = Array[ExtResource("5_6bskj")]([SubResource("Resource_rgf8x")]) - -[node name="MonsterSpawnpoint4" parent="." instance=ExtResource("4_l81pf")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14.8614, 1.04235, 27.0149) -spawnable_monsters = Array[ExtResource("5_6bskj")]([SubResource("Resource_rgf8x")]) - -[node name="plant7diedummekuh" parent="." instance=ExtResource("7_a22cv")] +[node name="DebugPlant" parent="." instance=ExtResource("7_a22cv")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.02146, 0, 1.29385) diff --git a/worlds/terrain1/terrain1_storage.res b/worlds/terrain1/terrain1_storage.res index bddc3ce..85cc111 100644 Binary files a/worlds/terrain1/terrain1_storage.res and b/worlds/terrain1/terrain1_storage.res differ