diff --git a/game/modules/species/Human/models/armature_huf.tscn b/game/modules/species/Human/models/armature_huf.tscn index 51eb00ff..1681bc47 100644 --- a/game/modules/species/Human/models/armature_huf.tscn +++ b/game/modules/species/Human/models/armature_huf.tscn @@ -147,7 +147,7 @@ viss = [ ExtResource( 1 ) ] [node name="armature" parent="." instance=ExtResource( 6 )] [node name="Skeleton" parent="armature/Armature" index="0"] -transform = Transform( 1, 4.60222e-19, -5.72812e-26, -4.60222e-19, 1, 4.16186e-43, 5.72812e-26, -3.90962e-43, 1, 0, -1.17877e-15, 0 ) +transform = Transform( 1, -6.84064e-18, 1.54087e-25, 6.84064e-18, 1, 1.05378e-42, -1.54087e-25, 0, 1, 0, 0, 0 ) bones/0/bound_children = [ NodePath("RootAttachment") ] bones/1/bound_children = [ NodePath("RightHipAttachment"), NodePath("LeftHipAttachment") ] bones/10/bound_children = [ NodePath("RightBackAttachment"), NodePath("LeftBackAttachment") ] @@ -160,29 +160,27 @@ bones/24/bound_children = [ NodePath("RightHandAttachment") ] visible = false [node name="LeftHandAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="1"] -transform = Transform( 0.103219, 0.115618, -0.98789, 0.0565265, -0.992234, -0.11019, -0.993045, -0.0444712, -0.108958, 0.230529, 0.767409, -0.00949661 ) +transform = Transform( 0.102742, 0.121361, -0.987264, 0.0573268, -0.991557, -0.115914, -0.99305, -0.0446887, -0.108835, 0.228346, 0.771445, -0.0102045 ) bone_name = "left_hand" [node name="LeftHandAP" type="Spatial" parent="armature/Armature/Skeleton/LeftHandAttachment"] transform = Transform( -0.0646502, 0.683772, 0.726832, -0.148514, -0.726783, 0.670508, 0.986758, -0.0646467, 0.148575, -0.0226043, 0.107657, 0.0283146 ) script = ExtResource( 2 ) -positions = [ ] [node name="ShieldAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="2"] -transform = Transform( 0.0456361, 0.0936307, 0.994534, -0.0443996, -0.99436, 0.095621, 0.997964, -0.048524, -0.0412299, 0.207995, 1.00672, 0.00218168 ) +transform = Transform( 0.0460429, 0.0993848, 0.993971, -0.0443354, -0.99381, 0.101413, 0.997951, -0.0487388, -0.0413565, 0.204427, 1.01063, 0.00152545 ) bone_name = "left_forearm" [node name="LeftHandShield" type="Spatial" parent="armature/Armature/Skeleton/ShieldAttachment"] transform = Transform( 0.122585, 0.992132, -0.0242311, 0.987746, -0.124342, -0.0941345, -0.0964273, -0.0123912, -0.995239, 0.0157415, 0.108918, 0.0213161 ) [node name="RightHandAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="3"] -transform = Transform( -0.0413363, -0.0342888, -0.998527, -0.126695, -0.991081, 0.0392623, -0.991096, 0.128137, 0.0366369, -0.23272, 0.769221, -0.00725112 ) +transform = Transform( -0.0400954, -0.0242101, -0.998884, -0.127471, -0.991364, 0.0291305, -0.991041, 0.128501, 0.0366712, -0.226341, 0.768569, -0.00640216 ) bone_name = "right_hand" [node name="RightHandAP" type="Spatial" parent="armature/Armature/Skeleton/RightHandAttachment"] transform = Transform( 0.0789363, 0.493983, 0.86583, -0.0571054, -0.864836, 0.498656, 0.995268, -0.0888088, -0.0400836, -0.0131918, 0.0790432, -0.0425565 ) script = ExtResource( 2 ) -positions = [ ] [node name="RootAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="4"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -3.23883e-05, 0, 0.000216131 ) @@ -191,40 +189,38 @@ bone_name = "root" [node name="RootAP" type="Spatial" parent="armature/Armature/Skeleton/RootAttachment"] transform = Transform( 1, 0, 0, 0, -1.62921e-07, 1, 0, -1, -1.62921e-07, 0, 0, 0 ) script = ExtResource( 2 ) -positions = [ ] [node name="NeckAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="5"] -transform = Transform( 0.999956, -0.00928506, -0.00113374, 0.00933786, 0.997187, 0.0730996, 0.000451846, -0.0731132, 0.997323, 0.00115525, 1.31384, 9.13832e-05 ) +transform = Transform( 0.99998, -0.00629028, -0.000312272, 0.00629784, 0.997246, 0.0731527, -0.000148758, -0.0731576, 0.99732, 0.00103962, 1.31823, 5.39597e-05 ) bone_name = "neck" [node name="TorsoAP" type="Spatial" parent="armature/Armature/Skeleton/NeckAttachment"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.04, -0.09 ) script = ExtResource( 2 ) -positions = [ ] [node name="RightHipAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="6"] -transform = Transform( 0.999828, 0.018569, 8.80769e-09, -0.018569, 0.999828, 4.71773e-07, -4.58407e-11, -4.71855e-07, 1, 0.00511778, 0.772338, 0 ) +transform = Transform( 0.999504, 0.0314799, 1.49316e-08, -0.0314799, 0.999504, 4.7162e-07, -7.76685e-11, -4.71856e-07, 1, 0, 0.776724, 0 ) bone_name = "pelvis" [node name="Spatial" type="Spatial" parent="armature/Armature/Skeleton/RightHipAttachment"] transform = Transform( 0.993372, -0.0110498, 0.114411, 0.0109836, 0.999939, 0.00120905, -0.114417, 5.56017e-05, 0.993433, -0.141825, 0.176866, 0.16621 ) [node name="LeftHipAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="7"] -transform = Transform( 0.999828, 0.018569, 8.80769e-09, -0.018569, 0.999828, 4.71773e-07, -4.58407e-11, -4.71855e-07, 1, 0.00511778, 0.772338, 0 ) +transform = Transform( 0.999504, 0.0314799, 1.49316e-08, -0.0314799, 0.999504, 4.7162e-07, -7.76685e-11, -4.71856e-07, 1, 0, 0.776724, 0 ) bone_name = "pelvis" [node name="Spatial" type="Spatial" parent="armature/Armature/Skeleton/LeftHipAttachment"] transform = Transform( 0.99343, -0.00240871, -0.114417, 0.00240855, 0.999997, -0.000139626, 0.114417, -0.00013687, 0.993433, 0.144429, 0.18077, 0.165634 ) [node name="RightBackAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="8"] -transform = Transform( 0.999953, -0.00961525, -0.000323861, 0.00960963, 0.99986, -0.00108821, 0.000334298, 0.00108582, 0.999999, 0.00295904, 1.12627, -0.000112304 ) +transform = Transform( 0.999978, -0.00656778, 0.000273144, 0.00656962, 0.999923, -0.00103998, -0.000266317, 0.00104151, 0.999999, 0.00227172, 1.13064, -0.000141409 ) bone_name = "spine_2" [node name="RightBackAP" type="Spatial" parent="armature/Armature/Skeleton/RightBackAttachment"] transform = Transform( 0.999997, -0.00244424, -0.000479204, 0.00243884, 0.999966, -3.47705e-05, 0.000479292, 3.44458e-05, 1, 0.000560207, -0.00363708, -0.120332 ) [node name="LeftBackAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="9"] -transform = Transform( 0.999953, -0.00961525, -0.000323861, 0.00960963, 0.99986, -0.00108821, 0.000334298, 0.00108582, 0.999999, 0.00295904, 1.12627, -0.000112304 ) +transform = Transform( 0.999978, -0.00656778, 0.000273144, 0.00656962, 0.999923, -0.00103998, -0.000266317, 0.00104151, 0.999999, 0.00227172, 1.13064, -0.000141409 ) bone_name = "spine_2" [node name="LeftBackAP" type="Spatial" parent="armature/Armature/Skeleton/LeftBackAttachment"] diff --git a/game/project.godot b/game/project.godot index 1ee8581a..1ef80c49 100644 --- a/game/project.godot +++ b/game/project.godot @@ -367,12 +367,7 @@ window/size/viewport_scale=100 [ess] -spells/allow_class_spell_learning=true -spells/allow_class_recipe_learning=true -level/use_class_xp=true -level/automatic_class_levelups=true -level/use_global_class_level=true -level/max_character_level=10 +level/max_character_level=60 level/max_class_level=60 data/ess_resource_db_path="res://data/resource_db.tres" data/ess_entity_spawner_path="res://player/bs_entity_spawner.tres" diff --git a/game/scenes/CharacterSelectorMenu.gd b/game/scenes/CharacterSelectorMenu.gd index 29f6893d..50061edf 100644 --- a/game/scenes/CharacterSelectorMenu.gd +++ b/game/scenes/CharacterSelectorMenu.gd @@ -32,6 +32,7 @@ export(NodePath) var renounce_button_path : NodePath export(NodePath) var create_button_path : NodePath export(bool) var automatic_character_load : bool = false +export(bool) var only_one_character : bool = false var container : Node var player_display_container_node : Node @@ -114,24 +115,31 @@ func refresh(): first_entry.pressed = true if first_entry != null: - get_node(container_path).show() + #note that this just disables the create button, and + #will still allow character creation otherwise + if only_one_character: + get_node(create_button_path).hide() + get_node(container_path).show() + get_node(load_button_path).show() - get_node(create_button_path).hide() get_node(renounce_button_path).show() if (automatic_character_load): load_character() else: - get_node(container_path).hide() + if only_one_character: + get_node(create_button_path).show() + get_node(container_path).hide() + get_node(load_button_path).hide() - get_node(create_button_path).show() get_node(renounce_button_path).hide() else: dir.make_dir("user://" + character_folder) - - get_node(container_path).hide() + if only_one_character: + get_node(container_path).hide() + get_node(create_button_path).show() + get_node(load_button_path).hide() - get_node(create_button_path).show() get_node(renounce_button_path).hide() func clear() -> void: @@ -148,22 +156,23 @@ func renounce_character() -> void: if b == null: return - var class_profile : ClassProfile = ProfileManager.getc_player_profile().get_class_profile(b.entity.sentity_data.resource_path) - - var xp_data : XPData = ESS.get_resource_db().get_xp_data() - - if xp_data.can_class_level_up(class_profile.level): - class_profile.xp += b.entity.sclass_xp + if ESS.use_class_xp: + var class_profile : ClassProfile = ProfileManager.getc_player_profile().get_class_profile(b.entity.sentity_data.resource_path) - var xpr : int = xp_data.get_class_xp(class_profile.level) + var xp_data : XPData = ESS.get_resource_db().get_xp_data() - while xp_data.can_class_level_up(class_profile.level) and class_profile.xp >= xpr: - class_profile.level += 1 - class_profile.xp -= xpr + if xp_data.can_class_level_up(class_profile.level): + class_profile.xp += b.entity.sclass_xp - xpr = xp_data.get_class_xp(class_profile.level) + var xpr : int = xp_data.get_class_xp(class_profile.level) - ProfileManager.save() + while xp_data.can_class_level_up(class_profile.level) and class_profile.xp >= xpr: + class_profile.level += 1 + class_profile.xp -= xpr + + xpr = xp_data.get_class_xp(class_profile.level) + + ProfileManager.save() var file_name : String = "user://" + character_folder + "/" + b.file_name diff --git a/game/scenes/Menu.tscn b/game/scenes/Menu.tscn index 3c5b24c4..b1405233 100644 --- a/game/scenes/Menu.tscn +++ b/game/scenes/Menu.tscn @@ -109,13 +109,13 @@ __meta__ = { "_editor_description_": "" } menu_path = NodePath("..") -container_path = NodePath("CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/Container") +container_path = NodePath("CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/ScrollContainer/Container") player_display_container_path = NodePath("../Char/CharacterDisplay") character_button_group = ExtResource( 4 ) character_entry = ExtResource( 2 ) character_folder = "characters" load_button_path = NodePath("CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/Continue") -renounce_button_path = NodePath("CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/Renounce") +renounce_button_path = NodePath("CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/Delete") create_button_path = NodePath("CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/New") [node name="CharacterSelector" type="MarginContainer" parent="CharacterSelectorMenu"] @@ -140,9 +140,9 @@ margin_bottom = 580.0 alignment = 2 [node name="CharacterSelector" type="PanelContainer" parent="CharacterSelectorMenu/CharacterSelector/VBoxContainer"] -margin_top = 450.0 margin_right = 269.0 margin_bottom = 560.0 +size_flags_vertical = 3 __meta__ = { "_edit_use_anchors_": false } @@ -151,34 +151,36 @@ __meta__ = { margin_left = 4.0 margin_top = 4.0 margin_right = 265.0 -margin_bottom = 106.0 +margin_bottom = 556.0 -[node name="Container" type="VBoxContainer" parent="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer"] +[node name="ScrollContainer" type="ScrollContainer" parent="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer"] +margin_right = 261.0 +margin_bottom = 450.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="Container" type="VBoxContainer" parent="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/ScrollContainer"] margin_right = 261.0 size_flags_horizontal = 3 [node name="Continue" type="Button" parent="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer"] -margin_top = 8.0 +margin_top = 458.0 margin_right = 261.0 -margin_bottom = 34.5702 +margin_bottom = 484.57 text = "Continue" -[node name="Renounce" type="Button" parent="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer"] -margin_top = 42.0 -margin_right = 261.0 -margin_bottom = 68.5702 -size_flags_horizontal = 3 -size_flags_vertical = 3 -text = "Renounce" - [node name="New" type="Button" parent="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer"] -margin_top = 76.0 +margin_top = 492.0 margin_right = 261.0 -margin_bottom = 102.57 -size_flags_horizontal = 3 -size_flags_vertical = 3 +margin_bottom = 518.57 text = "New" +[node name="Delete" type="Button" parent="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer"] +margin_top = 526.0 +margin_right = 261.0 +margin_bottom = 552.57 +text = "Delete" + [node name="PlayerDisplays" type="Node" parent="CharacterSelectorMenu"] [node name="CharacterCreationMenu" type="Control" parent="."] @@ -586,8 +588,6 @@ voxel_scale = 1.6 chunk_spawn_range = 1 build_flags = 255 script = ExtResource( 16 ) -meshes = [ ] -editor_generate = false show_loading_screen = false generate_on_ready = true @@ -606,8 +606,8 @@ light_specular = 0.65 shadow_bias = 0.07 script = ExtResource( 19 ) [connection signal="pressed" from="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/Continue" to="CharacterSelectorMenu" method="load_character"] -[connection signal="pressed" from="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/Renounce" to="CharacterSelectorMenu" method="renounce_character"] [connection signal="pressed" from="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/New" to="." method="switch_to_menu" binds= [ 1 ]] +[connection signal="pressed" from="CharacterSelectorMenu/CharacterSelector/VBoxContainer/CharacterSelector/VBoxContainer/Delete" to="CharacterSelectorMenu" method="renounce_character"] [connection signal="pressed" from="CharacterCreationMenu/CharacterSelector2/CharacterSelector/VBoxContainer/PanelContainer/VBoxContainer/Create" to="CharacterCreationMenu" method="create"] [connection signal="pressed" from="CharacterCreationMenu/CharacterSelector2/CharacterSelector/VBoxContainer/PanelContainer/VBoxContainer/Back" to="." method="switch_to_menu" binds= [ 0 ]] [connection signal="pressed" from="ConnectMenu/PanelContainer/VBoxContainer/Button2" to="ConnectMenu" method="hide"]