updated to 4.4, fixed levelup
This commit is contained in:
parent
ce5d12df95
commit
cd62e12389
64 changed files with 178 additions and 60 deletions
1
addons/terrain_3d/editor.gd.uid
Normal file
1
addons/terrain_3d/editor.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://cu503s5kvphtn
|
||||||
1
addons/terrain_3d/extras/import_sgt.gd.uid
Normal file
1
addons/terrain_3d/extras/import_sgt.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://dssclgt0trckq
|
||||||
1
addons/terrain_3d/extras/minimum.gdshader.uid
Normal file
1
addons/terrain_3d/extras/minimum.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://x8gxk55qi2vm
|
||||||
1
addons/terrain_3d/extras/project_on_terrain3d.gd.uid
Normal file
1
addons/terrain_3d/extras/project_on_terrain3d.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bk8d6dgefns5c
|
||||||
1
addons/terrain_3d/src/asset_dock.gd.uid
Normal file
1
addons/terrain_3d/src/asset_dock.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://535c636rweiv
|
||||||
1
addons/terrain_3d/src/bake_lod_dialog.gd.uid
Normal file
1
addons/terrain_3d/src/bake_lod_dialog.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://d1qj50s4fhf0f
|
||||||
1
addons/terrain_3d/src/baker.gd.uid
Normal file
1
addons/terrain_3d/src/baker.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://cocyc4cxaeye6
|
||||||
1
addons/terrain_3d/src/channel_packer.gd.uid
Normal file
1
addons/terrain_3d/src/channel_packer.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://swcqgichcq85
|
||||||
1
addons/terrain_3d/src/gradient_operation_builder.gd.uid
Normal file
1
addons/terrain_3d/src/gradient_operation_builder.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bvh0rjck0ice0
|
||||||
1
addons/terrain_3d/src/multi_picker.gd.uid
Normal file
1
addons/terrain_3d/src/multi_picker.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://cjg3b55r57h8x
|
||||||
1
addons/terrain_3d/src/operation_builder.gd.uid
Normal file
1
addons/terrain_3d/src/operation_builder.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://dx2qyuyr5kh87
|
||||||
1
addons/terrain_3d/src/region_gizmo.gd.uid
Normal file
1
addons/terrain_3d/src/region_gizmo.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://b842l1cbmh6eq
|
||||||
1
addons/terrain_3d/src/terrain_tools.gd.uid
Normal file
1
addons/terrain_3d/src/terrain_tools.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://b77cgiqv8xfls
|
||||||
1
addons/terrain_3d/src/tool_settings.gd.uid
Normal file
1
addons/terrain_3d/src/tool_settings.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://c73auggirriq2
|
||||||
1
addons/terrain_3d/src/toolbar.gd.uid
Normal file
1
addons/terrain_3d/src/toolbar.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://0q7qc73wagwl
|
||||||
1
addons/terrain_3d/src/ui.gd.uid
Normal file
1
addons/terrain_3d/src/ui.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://dnk5q6wyaldnh
|
||||||
1
addons/terrain_3d/terrain.gdextension.uid
Normal file
1
addons/terrain_3d/terrain.gdextension.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bexpbdpoj1nh3
|
||||||
1
addons/terrain_3d/tools/importer.gd.uid
Normal file
1
addons/terrain_3d/tools/importer.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://b74q81dau8dw2
|
||||||
1
addons/terrain_3d/utils/terrain_3d_objects.gd.uid
Normal file
1
addons/terrain_3d/utils/terrain_3d_objects.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://h0poxvm31dch
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
uid://wrvu3mdm0ss0
|
||||||
1
assets/models/gobot/gobot_skin.gd.uid
Normal file
1
assets/models/gobot/gobot_skin.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bo1070g3b1e0b
|
||||||
1
assets/models/round_bat/round_bat_skin.gd.uid
Normal file
1
assets/models/round_bat/round_bat_skin.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://d22hcg66s8hxu
|
||||||
1
entities/healing_station/healing_station.gd.uid
Normal file
1
entities/healing_station/healing_station.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://clkrhqgx1qviq
|
||||||
1
entities/monster/monster.gd.uid
Normal file
1
entities/monster/monster.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bx1hupx44tdsd
|
||||||
1
entities/monster_spawnpoint/monster_spawnpoint.gd.uid
Normal file
1
entities/monster_spawnpoint/monster_spawnpoint.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://db7inrm6xdmc5
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
uid://b44bktvws5v3s
|
||||||
|
|
@ -153,17 +153,22 @@ func handle_battle() -> void:
|
||||||
UI.battle_ui.set_message("You won!")
|
UI.battle_ui.set_message("You won!")
|
||||||
await get_tree().create_timer(2.0).timeout
|
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
|
# End the battle and reset some states
|
||||||
# TODO: Maybe add a cooldown of 1.5s after the battle ended
|
# 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()
|
player_monster.queue_free()
|
||||||
|
enemy.queue_free()
|
||||||
|
|
||||||
UI.ingame_menu.update()
|
UI.ingame_menu.update()
|
||||||
UI.show_battle_ui(false)
|
UI.show_battle_ui(false)
|
||||||
UI.show_ingame_controls(true)
|
UI.show_ingame_controls(true)
|
||||||
var gained_xp: int = player_monster.data.calculate_gained_xp(enemy.data)
|
battle_state = Enums.BattleState.NOT_IN_BATTLE
|
||||||
player_monster.data.add_xp(gained_xp)
|
|
||||||
print("You gained %s xp!" % str(gained_xp))
|
|
||||||
|
|
||||||
Enums.BattleState.LOSE:
|
Enums.BattleState.LOSE:
|
||||||
SoundManager.play_sound_effect("Lost Battle")
|
SoundManager.play_sound_effect("Lost Battle")
|
||||||
|
|
|
||||||
1
entities/player/player.gd.uid
Normal file
1
entities/player/player.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://be00fdjdehq03
|
||||||
3
game.gd
3
game.gd
|
|
@ -37,7 +37,8 @@ func start_new_game() -> void:
|
||||||
|
|
||||||
# Give the player a monster
|
# Give the player a monster
|
||||||
var monster: MonsterData = MonsterData.new()
|
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)
|
SaveManager.current_save.party.push_back(monster)
|
||||||
|
|
||||||
# Update the UI once
|
# Update the UI once
|
||||||
|
|
|
||||||
1
game.gd.uid
Normal file
1
game.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://dd1wbhas5qlmi
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
[gd_scene load_steps=4 format=3 uid="uid://cswuap81n7t3f"]
|
[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="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"]
|
[node name="Game" type="Node3D"]
|
||||||
script = ExtResource("1_mfbtr")
|
script = ExtResource("1_mfbtr")
|
||||||
|
|
|
||||||
1
globals/SoundFile.gd.uid
Normal file
1
globals/SoundFile.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://pctv6qasg6aa
|
||||||
1
globals/colors.gd.uid
Normal file
1
globals/colors.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bf0efu0g7cnwh
|
||||||
1
globals/enums.gd.uid
Normal file
1
globals/enums.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://dj52nei2vwnuk
|
||||||
1
globals/scene_manager.gd.uid
Normal file
1
globals/scene_manager.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://t62dxmfb12pl
|
||||||
1
globals/sound_manager.gd.uid
Normal file
1
globals/sound_manager.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://b36pfmvb37tcx
|
||||||
|
|
@ -16,3 +16,8 @@ func load_base_monster_data(p_unique_id: String) -> MonsterData:
|
||||||
else:
|
else:
|
||||||
printerr("Monster.gd: No monster with the ID %s found" % p_unique_id)
|
printerr("Monster.gd: No monster with the ID %s found" % p_unique_id)
|
||||||
return null
|
return null
|
||||||
|
|
||||||
|
func heal_all() -> void:
|
||||||
|
for monster: MonsterData in SaveManager.current_save.party:
|
||||||
|
print("Healed %s" % monster.name)
|
||||||
|
monster.heal(9999)
|
||||||
|
|
|
||||||
1
globals/utils.gd.uid
Normal file
1
globals/utils.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://x5ktjel1bpd0
|
||||||
|
|
@ -12,7 +12,7 @@ config_version=5
|
||||||
|
|
||||||
config/name="monsterfangen"
|
config/name="monsterfangen"
|
||||||
run/main_scene="res://game.tscn"
|
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"
|
boot_splash/image="res://assets/logo/logo.png"
|
||||||
config/icon="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={
|
joystick_right_right={
|
||||||
"deadzone": 0.0,
|
"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={
|
joystick_right_left={
|
||||||
"deadzone": 0.0,
|
"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={
|
joystick_right_up={
|
||||||
"deadzone": 0.0,
|
"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={
|
joystick_right_down={
|
||||||
"deadzone": 0.0,
|
"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)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
1
resources/asset_info.gd.uid
Normal file
1
resources/asset_info.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://b7oqmdlfu5k6h
|
||||||
|
|
@ -68,23 +68,47 @@ func set_values(p_unique_id : String = "", current_values: Dictionary = {}, p_le
|
||||||
## This sets the monster to the specified level
|
## This sets the monster to the specified level
|
||||||
func set_level(p_level: int) -> void:
|
func set_level(p_level: int) -> void:
|
||||||
self.level = p_level
|
self.level = p_level
|
||||||
|
#print("old: %s/%s" % [self.current_health, self.health])
|
||||||
update()
|
update()
|
||||||
|
#print("new: %s/%s" % [self.current_health, self.health])
|
||||||
|
|
||||||
# Updates the values according to the current level of the monster
|
# 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.attack = int((((base_attack * 2.0) * level ) / 100) + (level + 5))
|
||||||
self.health = int((((base_health * 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.defense = int((((base_defense * 2.0) * level ) / 100) + (level + 5))
|
||||||
self.tempo = int((((base_tempo * 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:
|
func level_up() -> void:
|
||||||
|
print("monster_data.gd: %s leveled up!" % self.name)
|
||||||
set_level(level + 1)
|
set_level(level + 1)
|
||||||
|
|
||||||
|
# reset the gained XP
|
||||||
|
self.xp = 0
|
||||||
|
|
||||||
emit_signal("on_level_up")
|
emit_signal("on_level_up")
|
||||||
|
|
||||||
func calculate_gained_xp(enemy_data: MonsterData) -> int:
|
func calculate_gained_xp(enemy_data: MonsterData) -> int:
|
||||||
var calculated_xp: int = 0
|
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
|
return calculated_xp
|
||||||
|
|
||||||
func add_xp(amount: int = 0) -> void:
|
func add_xp(amount: int = 0) -> void:
|
||||||
|
|
|
||||||
1
resources/monster_data.gd.uid
Normal file
1
resources/monster_data.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://c37crtp1pdt42
|
||||||
1
resources/monster_type.gd.uid
Normal file
1
resources/monster_type.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://cxuxtevirvn7j
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[gd_resource type="Resource" script_class="MonsterData" load_steps=4 format=3 uid="uid://0xqaef8uftnv"]
|
[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="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"]
|
[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")
|
model = ExtResource("1_dsg0f")
|
||||||
primary_type = 5
|
primary_type = 5
|
||||||
secondary_type = 17
|
secondary_type = 17
|
||||||
base_attack = 10
|
base_attack = 45
|
||||||
base_health = 20
|
base_health = 40
|
||||||
base_defense = 30
|
base_defense = 40
|
||||||
base_tempo = 40
|
base_tempo = 56
|
||||||
base_xp = 3
|
base_xp = 55
|
||||||
attack = 1
|
attack = 1
|
||||||
current_health = 1
|
current_health = 1
|
||||||
health = 1
|
health = 1
|
||||||
defense = 1
|
defense = 1
|
||||||
tempo = 1
|
tempo = 1
|
||||||
level = 1
|
level = 1
|
||||||
xp = 1
|
xp = 0
|
||||||
nickname = ""
|
nickname = ""
|
||||||
xp_for_levelup = 1
|
xp_for_levelup = 1
|
||||||
|
|
|
||||||
1
resources/save_game/save_game.gd.uid
Normal file
1
resources/save_game/save_game.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://co1n2rldtc1d1
|
||||||
1
resources/save_game/save_manager.gd.uid
Normal file
1
resources/save_game/save_manager.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://fu02qhhn4vh8
|
||||||
1
resources/save_game/saved_data.gd.uid
Normal file
1
resources/save_game/saved_data.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://tosto05trpfl
|
||||||
1
shaders/blur.gdshader.uid
Normal file
1
shaders/blur.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://b0djbt0yqc6st
|
||||||
1
ui/battle_ui/battle_ui.gd.uid
Normal file
1
ui/battle_ui/battle_ui.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://cgg3sy2qd5352
|
||||||
1
ui/ingame_controls/camera_controls.gd.uid
Normal file
1
ui/ingame_controls/camera_controls.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://cp2jtkql0gaci
|
||||||
1
ui/ingame_controls/ingame_controls.gd.uid
Normal file
1
ui/ingame_controls/ingame_controls.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://dylk55426bidt
|
||||||
1
ui/ingame_controls/joystick.gd.uid
Normal file
1
ui/ingame_controls/joystick.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://cuik3h7xk1ung
|
||||||
|
|
@ -5,6 +5,9 @@ class_name MonsterList
|
||||||
@onready var monster_list_entry: PackedScene = preload("res://ui/ingame_menu/party_list_entry.tscn")
|
@onready var monster_list_entry: PackedScene = preload("res://ui/ingame_menu/party_list_entry.tscn")
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
# INFO: Add debug heal function for the "Party" button
|
||||||
|
%PartyButton.pressed.connect(debug_heal)
|
||||||
|
|
||||||
visible = false
|
visible = false
|
||||||
for i: int in range(6):
|
for i: int in range(6):
|
||||||
var entry: Node = monster_list_entry.instantiate()
|
var entry: Node = monster_list_entry.instantiate()
|
||||||
|
|
@ -14,12 +17,20 @@ func _on_close_button_pressed() -> void:
|
||||||
visible = false
|
visible = false
|
||||||
|
|
||||||
func update() -> void:
|
func update() -> void:
|
||||||
for i: int in SaveManager.current_save.party.size():
|
for i: int in range(6):
|
||||||
var monster: MonsterData = SaveManager.current_save.party[i]
|
|
||||||
var entry: Node = monster_list_entry_container.get_child(i)
|
var entry: Node = monster_list_entry_container.get_child(i)
|
||||||
|
|
||||||
|
if SaveManager.current_save.party.size() >= i+1:
|
||||||
|
var monster: MonsterData = SaveManager.current_save.party[i]
|
||||||
entry.update(monster)
|
entry.update(monster)
|
||||||
|
else:
|
||||||
|
entry.hide_entry()
|
||||||
|
|
||||||
|
|
||||||
func _update_player_info() -> void:
|
func _update_player_info() -> void:
|
||||||
#%PlayerName.text =
|
#%PlayerName.text =
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
func debug_heal() -> void:
|
||||||
|
Utils.heal_all()
|
||||||
|
UI.ingame_menu.update()
|
||||||
|
|
|
||||||
1
ui/ingame_menu/ingame_menu.gd.uid
Normal file
1
ui/ingame_menu/ingame_menu.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://dlgvxqnux5b76
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[gd_scene load_steps=4 format=3 uid="uid://bbvbnrcjatkrb"]
|
[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://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"]
|
[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"]
|
[node name="PlayerInfo" type="MarginContainer" parent="MarginContainer/PanelContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/margin_left = 40
|
theme_override_constants/margin_left = 10
|
||||||
theme_override_constants/margin_top = 30
|
theme_override_constants/margin_top = 10
|
||||||
theme_override_constants/margin_right = 40
|
theme_override_constants/margin_right = 10
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/PanelContainer/VBoxContainer/PlayerInfo"]
|
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/PanelContainer/VBoxContainer/PlayerInfo"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
@ -51,14 +51,14 @@ unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||||
text = "PLAYER_NAME"
|
text = "Max"
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="MoneyValue" type="Label" parent="MarginContainer/PanelContainer/VBoxContainer/PlayerInfo/HBoxContainer"]
|
[node name="MoneyValue" type="Label" parent="MarginContainer/PanelContainer/VBoxContainer/PlayerInfo/HBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||||
text = "1.000.000"
|
text = "23.451"
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="CurrencyIcon" type="TextureRect" parent="MarginContainer/PanelContainer/VBoxContainer/PlayerInfo/HBoxContainer"]
|
[node name="CurrencyIcon" type="TextureRect" parent="MarginContainer/PanelContainer/VBoxContainer/PlayerInfo/HBoxContainer"]
|
||||||
|
|
@ -72,15 +72,19 @@ layout_mode = 2
|
||||||
alignment = 1
|
alignment = 1
|
||||||
|
|
||||||
[node name="PartyButton" type="Button" parent="MarginContainer/PanelContainer/VBoxContainer/HBoxContainer2"]
|
[node name="PartyButton" type="Button" parent="MarginContainer/PanelContainer/VBoxContainer/HBoxContainer2"]
|
||||||
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
text = "Party"
|
text = "Party"
|
||||||
|
|
||||||
[node name="Items" type="Button" parent="MarginContainer/PanelContainer/VBoxContainer/HBoxContainer2"]
|
[node name="Items" type="Button" parent="MarginContainer/PanelContainer/VBoxContainer/HBoxContainer2"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
text = "Items"
|
text = "Items"
|
||||||
|
|
||||||
[node name="Player" type="Button" parent="MarginContainer/PanelContainer/VBoxContainer/HBoxContainer2"]
|
[node name="Player" type="Button" parent="MarginContainer/PanelContainer/VBoxContainer/HBoxContainer2"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
text = "Player"
|
text = "Player"
|
||||||
|
|
||||||
[node name="MonsterInfoTitle" type="MarginContainer" parent="MarginContainer/PanelContainer/VBoxContainer"]
|
[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"]
|
[node name="CloseButton" type="Button" parent="MarginContainer/PanelContainer/VBoxContainer/CloseButtonContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(150, 0)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 4
|
size_flags_horizontal = 4
|
||||||
theme_type_variation = &"RedButton"
|
theme_type_variation = &"RedButton"
|
||||||
text = "Close"
|
text = "Close"
|
||||||
icon_alignment = 1
|
|
||||||
expand_icon = true
|
|
||||||
|
|
||||||
[connection signal="pressed" from="MarginContainer/PanelContainer/VBoxContainer/CloseButtonContainer/CloseButton" to="." method="_on_close_button_pressed"]
|
[connection signal="pressed" from="MarginContainer/PanelContainer/VBoxContainer/CloseButtonContainer/CloseButton" to="." method="_on_close_button_pressed"]
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,14 @@
|
||||||
extends PanelContainer
|
extends PanelContainer
|
||||||
class_name PartyListEntry
|
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:
|
func update(monster: MonsterData) -> void:
|
||||||
|
$HBoxContainer.modulate.a = 1.0
|
||||||
%MonsterID.text = str(0)
|
%MonsterID.text = str(0)
|
||||||
%MonsterName.text = monster.name
|
%MonsterName.text = monster.name
|
||||||
%MonsterLevel.text = "Lvl. %s" % monster.level
|
%MonsterLevel.text = "Lvl. %s" % monster.level
|
||||||
|
|
@ -9,3 +16,6 @@ func update(monster: MonsterData) -> void:
|
||||||
%HealthProgressBar.max_value = monster.health
|
%HealthProgressBar.max_value = monster.health
|
||||||
%ExperienceProgressBar.value = monster.xp
|
%ExperienceProgressBar.value = monster.xp
|
||||||
%ExperienceProgressBar.max_value = monster.xp_for_levelup
|
%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)
|
||||||
|
|
|
||||||
1
ui/ingame_menu/party_list_entry.gd.uid
Normal file
1
ui/ingame_menu/party_list_entry.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://dxa5lmd7juge3
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[gd_scene load_steps=8 format=3 uid="uid://brp2sljqnkuhe"]
|
[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://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"]
|
[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"]
|
[node name="HealthProgressBar" type="ProgressBar" parent="HBoxContainer/VBoxContainer/ProgressBarContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
theme_override_styles/background = SubResource("StyleBoxFlat_s3mod")
|
theme_override_styles/background = SubResource("StyleBoxFlat_s3mod")
|
||||||
theme_override_styles/fill = SubResource("StyleBoxFlat_nb1sm")
|
theme_override_styles/fill = SubResource("StyleBoxFlat_nb1sm")
|
||||||
|
|
@ -90,6 +89,7 @@ show_percentage = false
|
||||||
|
|
||||||
[node name="ExperienceProgressBar" type="ProgressBar" parent="HBoxContainer/VBoxContainer/ProgressBarContainer"]
|
[node name="ExperienceProgressBar" type="ProgressBar" parent="HBoxContainer/VBoxContainer/ProgressBarContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 5)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_styles/background = SubResource("StyleBoxFlat_fkb5g")
|
theme_override_styles/background = SubResource("StyleBoxFlat_fkb5g")
|
||||||
theme_override_styles/fill = SubResource("StyleBoxFlat_b4pov")
|
theme_override_styles/fill = SubResource("StyleBoxFlat_b4pov")
|
||||||
|
|
@ -97,6 +97,24 @@ step = 1.0
|
||||||
rounded = true
|
rounded = true
|
||||||
show_percentage = false
|
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"]
|
[node name="SwapPositionButton" type="Button" parent="HBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
self_modulate = Color(0, 0, 0, 1)
|
self_modulate = Color(0, 0, 0, 1)
|
||||||
|
|
@ -104,7 +122,7 @@ custom_minimum_size = Vector2(30, 30)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 8
|
size_flags_horizontal = 8
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
theme_override_constants/icon_max_width = 32
|
theme_override_constants/icon_max_width = 60
|
||||||
icon = ExtResource("3_etjt6")
|
icon = ExtResource("3_etjt6")
|
||||||
flat = true
|
flat = true
|
||||||
icon_alignment = 1
|
icon_alignment = 1
|
||||||
|
|
|
||||||
1
ui/license_list/license_entry.gd.uid
Normal file
1
ui/license_list/license_entry.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://de6rsei7l6dv4
|
||||||
|
|
@ -56,11 +56,11 @@ func add_license(license_path: String) -> void:
|
||||||
if license_path.ends_with(".remap"):
|
if license_path.ends_with(".remap"):
|
||||||
license_path = license_path.replace(".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 asset_info: AssetInfo = ResourceLoader.load(LICENSE_FOLDER + license_path)
|
||||||
var new_license_entry: Node = license_entry.instantiate()
|
var new_license_entry: Node = license_entry.instantiate()
|
||||||
license_container.add_child(new_license_entry)
|
license_container.add_child(new_license_entry)
|
||||||
print(asset_info)
|
#print(asset_info)
|
||||||
new_license_entry.populate(asset_info)
|
new_license_entry.populate(asset_info)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
1
ui/main_menu/main_menu.gd.uid
Normal file
1
ui/main_menu/main_menu.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bgexsev1yslus
|
||||||
1
ui/ui.gd.uid
Normal file
1
ui/ui.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bhajdnao0awhr
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
[ext_resource type="Terrain3DMaterial" uid="uid://c6ppgrnektc8g" path="res://worlds/terrain1/terrain1_material.tres" id="2_2cdhe"]
|
[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="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="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="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"]
|
[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")]
|
[node name="MonsterSpawnpoint" parent="." instance=ExtResource("4_l81pf")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.3621, 0, -15.1762)
|
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")])
|
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")]
|
[node name="DebugPlant" parent="." instance=ExtResource("7_a22cv")]
|
||||||
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")]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.02146, 0, 1.29385)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.02146, 0, 1.29385)
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue