Update to the latest ESS, to get the update to class and character level separation.

This commit is contained in:
Relintai 2020-02-20 12:21:31 +01:00
parent 882a0ef6de
commit 5185e97d65
7 changed files with 67 additions and 57 deletions

2
HEADS
View File

@ -1 +1 @@
{"engine": {"3.2": "eb22bcead7f643f9099ddab3307521520e1143db", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "a08917370cdef0884042bdb49fb80ece0b2e76ec"}, "entity_spell_system": {"master": "a2d4df0c89dc398756630a12f8ea5ac823cef680"}, "ui_extensions": {"master": "38acc650db260a831dc26ca96fe9d9a087230bdc"}, "voxelman": {"master": "509d45a66281c87e3136ea7252e062208fc64555"}, "texture_packer": {"master": "b17c174906f84de93d84aa60d010ffe603efaa28"}, "fastnoise": {"master": "41b7ea05a1f7aa2b8ecddaa1fd739e64d6970f7e"}, "mesh_data_resource": {"master": "4bda19b12be2c2a79a6121de6d22e48f3934e726"}, "procedural_animations": {"master": "00f6c128bd0e9799b7f7f86e118ed68277fbe27d"}, "fast_quadratic_mesh_simplifier": {"master": "898d3a212c41d14bc5cc0262c82ad30049ddd45b"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "prop_tool": {"master": "df438053ebc900966f8f842fc65f0264f1271d49"}} {"engine": {"3.2": "1bc1939c63e07c6a03dbb258d765e0f450559706", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "a08917370cdef0884042bdb49fb80ece0b2e76ec"}, "entity_spell_system": {"master": "581127cde57c5c019f58be787d300308f18e08d4"}, "ui_extensions": {"master": "38acc650db260a831dc26ca96fe9d9a087230bdc"}, "voxelman": {"master": "509d45a66281c87e3136ea7252e062208fc64555"}, "texture_packer": {"master": "b17c174906f84de93d84aa60d010ffe603efaa28"}, "fastnoise": {"master": "41b7ea05a1f7aa2b8ecddaa1fd739e64d6970f7e"}, "mesh_data_resource": {"master": "4bda19b12be2c2a79a6121de6d22e48f3934e726"}, "procedural_animations": {"master": "00f6c128bd0e9799b7f7f86e118ed68277fbe27d"}, "fast_quadratic_mesh_simplifier": {"master": "898d3a212c41d14bc5cc0262c82ad30049ddd45b"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "prop_tool": {"master": "df438053ebc900966f8f842fc65f0264f1271d49"}}

View File

@ -121,8 +121,10 @@ func spawn_player_for_menu(class_id : int, name : String, parent : Node) -> Enti
createinfo.class_id = class_id createinfo.class_id = class_id
createinfo.entity_data = cls createinfo.entity_data = cls
createinfo.player_name = name createinfo.player_name = name
createinfo.level = level createinfo.character_level = 1
createinfo.xp = class_profile.xp createinfo.class_level = level
createinfo.character_xp = 0
createinfo.class_xp = class_profile.xp
createinfo.entity_controller = EntityEnums.ENITIY_CONTROLLER_PLAYER createinfo.entity_controller = EntityEnums.ENITIY_CONTROLLER_PLAYER
createinfo.entity_player_type = EntityEnums.ENTITY_PLAYER_TYPE_DISPLAY createinfo.entity_player_type = EntityEnums.ENTITY_PLAYER_TYPE_DISPLAY
createinfo.networked = false createinfo.networked = false
@ -164,8 +166,10 @@ func spawn_networked_player(class_id : int, position : Vector3, name : String,
createinfo.class_id = class_id createinfo.class_id = class_id
createinfo.entity_data = cls createinfo.entity_data = cls
createinfo.player_name = name createinfo.player_name = name
createinfo.level = level createinfo.character_level = 1
createinfo.xp = class_profile.xp createinfo.class_level = level
createinfo.character_xp = 0
createinfo.class_xp = class_profile.xp
createinfo.entity_controller = EntityEnums.ENITIY_CONTROLLER_PLAYER createinfo.entity_controller = EntityEnums.ENITIY_CONTROLLER_PLAYER
createinfo.entity_player_type = EntityEnums.ENTITY_PLAYER_TYPE_NETWORKED createinfo.entity_player_type = EntityEnums.ENTITY_PLAYER_TYPE_NETWORKED
createinfo.network_owner = sid createinfo.network_owner = sid
@ -192,8 +196,10 @@ func spawn_player(class_id : int, position : Vector3, name : String, node_name
createinfo.class_id = class_id createinfo.class_id = class_id
createinfo.entity_data = cls createinfo.entity_data = cls
createinfo.player_name = name createinfo.player_name = name
createinfo.level = level createinfo.character_level = 1
createinfo.xp = class_profile.xp createinfo.class_level = level
createinfo.character_xp = 0
createinfo.class_xp = class_profile.xp
createinfo.entity_controller = EntityEnums.ENITIY_CONTROLLER_PLAYER createinfo.entity_controller = EntityEnums.ENITIY_CONTROLLER_PLAYER
createinfo.entity_player_type = EntityEnums.ENTITY_PLAYER_TYPE_PLAYER createinfo.entity_player_type = EntityEnums.ENTITY_PLAYER_TYPE_PLAYER
createinfo.network_owner = network_owner createinfo.network_owner = network_owner
@ -215,7 +221,8 @@ func spawn_mob(class_id : int, level : int, position : Vector3) -> void:
createinfo.class_id = class_id createinfo.class_id = class_id
createinfo.entity_data = cls createinfo.entity_data = cls
createinfo.player_name = "Mob" createinfo.player_name = "Mob"
createinfo.level = level createinfo.character_level = level
createinfo.class_level = level
createinfo.entity_controller = EntityEnums.ENITIY_CONTROLLER_AI createinfo.entity_controller = EntityEnums.ENITIY_CONTROLLER_AI
createinfo.entity_player_type = EntityEnums.ENTITY_PLAYER_TYPE_AI createinfo.entity_player_type = EntityEnums.ENTITY_PLAYER_TYPE_AI
createinfo.transform.origin = position createinfo.transform.origin = position

View File

@ -1,22 +1,31 @@
[gd_resource type="XPData" format=2] [gd_resource type="XPData" format=2]
[resource] [resource]
level_2 = 600 character_level_1 = 22
level_3 = 1000 character_level_2 = 34
level_4 = 1000 character_level_3 = 43
level_5 = 1000 character_level_4 = 4345
level_6 = 1000 character_level_5 = 554
level_7 = 1000 character_level_6 = 545
level_8 = 1000 character_level_7 = 45
level_9 = 1000 character_level_8 = 45
level_10 = 1000 character_level_9 = 4
level_11 = 1000 character_level_10 = 45
level_12 = 1000 character_level_11 = 54
level_13 = 1000 character_level_12 = 56
level_14 = 1000 character_level_13 = 56
level_15 = 1000 character_level_14 = 56
level_16 = 1000 class_level_1 = 355
level_17 = 1000 class_level_2 = 5
level_18 = 1000 class_level_3 = 5
level_19 = 1000 class_level_4 = 5
level_20 = 1000 class_level_5 = 5555
class_level_6 = 555
class_level_7 = 555
class_level_8 = 55
class_level_9 = 55
class_level_10 = 5
class_level_11 = 5
class_level_12 = 5
class_level_13 = 5
class_level_14 = 55

View File

@ -223,7 +223,7 @@ func _son_death():
dead = true dead = true
var ldiff : float = slevel - starget.slevel + 10.0 var ldiff : float = scharacter_level - starget.scharacter_level + 10.0
if ldiff < 0: if ldiff < 0:
ldiff = 0 ldiff = 0
@ -233,7 +233,7 @@ func _son_death():
ldiff /= 10.0 ldiff /= 10.0
starget.adds_xp(int(5.0 * slevel * ldiff)) starget.adds_xp(int(5.0 * scharacter_level * ldiff))
starget = null starget = null
@ -273,17 +273,25 @@ func set_max_visible_distance(var value : float) -> void:
# sentity_name = sentity_data.text_name # sentity_name = sentity_data.text_name
func _son_xp_gained(value : int) -> void: func _son_xp_gained(value : int) -> void:
if not EntityDataManager.get_xp_data().can_level_up(gets_level()): if not EntityDataManager.get_xp_data().can_character_level_up(gets_character_level()):
return return
var xpr : int = EntityDataManager.get_xp_data().get_xp(gets_level()); var xpr : int = EntityDataManager.get_xp_data().get_character_xp(gets_character_level());
if xpr <= sxp: if xpr <= scharacter_xp:
scharacter_levelup(1) scharacter_levelup(1)
sxp = 0 scharacter_xp = 0
func _son_level_up(value: int) -> void: func _son_class_level_up(value: int):
if sentity_data == null: ._son_class_level_up(value)
refresh_spells(value)
func _son_character_level_up(value: int) -> void:
._son_character_level_up(value)
refresh_spells(value)
func refresh_spells(value: int):
if gets_free_spell_points() == 0 and gets_free_talent_points() == 0:
return return
var ecd : EntityClassData = sentity_data.entity_class_data var ecd : EntityClassData = sentity_data.entity_class_data
@ -291,20 +299,6 @@ func _son_level_up(value: int) -> void:
if ecd == null: if ecd == null:
return return
sfree_spell_points += ecd.spell_points_per_level * value
sfree_talent_points += value
for i in range(Stat.MAIN_STAT_ID_COUNT):
var st : int = sentity_data.entity_class_data.get_stat_data().get_level_stat_data().get_stat_diff(i, slevel - value, slevel)
var statid : int = i + Stat.MAIN_STAT_ID_START
var stat : Stat = get_stat_int(statid)
var sm : StatModifier = stat.get_modifier(0)
sm.base_mod += st
var arr : Array = Array() var arr : Array = Array()
for i in range(ecd.get_num_spells()): for i in range(ecd.get_num_spells()):

View File

@ -90,7 +90,7 @@ func refresh():
centry.group = character_button_group centry.group = character_button_group
centry.connect("pressed", self, "character_selection_changed") centry.connect("pressed", self, "character_selection_changed")
centry.setup(file_name, display.sentity_name, "", display.slevel, display) centry.setup(file_name, display.sentity_name, "", display.scharacter_level, display)
if first_entry == null: if first_entry == null:
first_entry = centry first_entry = centry

View File

@ -26,7 +26,7 @@ func _handle_aura_damage(aura_data : AuraData, damage_info : SpellDamageInfo) ->
randomize() randomize()
damage_info.damage = damage_min + (randi() % (damage_max - damage_min)) damage_info.damage = damage_min + (randi() % (damage_max - damage_min))
damage_info.damage *= damage_info.dealer.gets_level() / float(EntityEnums.MAX_CHARACTER_LEVEL) damage_info.damage *= damage_info.dealer.scharacter_level / float(EntityEnums.MAX_CHARACTER_LEVEL)
damage_info.damage_source_type = aura_data.aura.damage_type damage_info.damage_source_type = aura_data.aura.damage_type
if (is_instance_valid(damage_info.dealer)): if (is_instance_valid(damage_info.dealer)):
@ -36,7 +36,7 @@ func _handle_aura_heal(aura_data : AuraData, shi : SpellHealInfo) -> void:
randomize() randomize()
shi.heal = heal_min + (randi() % (heal_max - heal_min)) shi.heal = heal_min + (randi() % (heal_max - heal_min))
shi.damage *= shi.dealer.gets_level() / float(EntityEnums.MAX_CHARACTER_LEVEL) shi.damage *= shi.dealer.scharacter_level / float(EntityEnums.MAX_CHARACTER_LEVEL)
shi.heal_source_type = aura_data.aura.aura_type shi.heal_source_type = aura_data.aura.aura_type
shi.dealer.sdeal_heal_to(shi) shi.dealer.sdeal_heal_to(shi)

View File

@ -68,7 +68,7 @@ func set_player(p_player: Entity) -> void:
health.connect("c_changed", self, "_on_player_health_changed") health.connect("c_changed", self, "_on_player_health_changed")
_name_text.text = _player.centity_name _name_text.text = _player.centity_name
_level_text.text = str(_player.clevel) _level_text.text = str(_player.ccharacter_level)
clevel_changed(_player, 0) clevel_changed(_player, 0)
con_xp_gained(_player, 0) con_xp_gained(_player, 0)
@ -93,13 +93,13 @@ func cname_changed(entity: Entity) -> void:
_name_text.text = _player.centity_name _name_text.text = _player.centity_name
func clevel_changed(entity: Entity, value : int) -> void: func clevel_changed(entity: Entity, value : int) -> void:
_level_text.text = str(_player.clevel) _level_text.text = str(_player.ccharacter_level)
_xp_range.min_value = 0 _xp_range.min_value = 0
_xp_range.max_value = EntityDataManager.get_xp_data().get_xp(_player.clevel) _xp_range.max_value = EntityDataManager.get_xp_data().get_character_xp(_player.ccharacter_level)
func con_xp_gained(entity: Entity, val: int) -> void: func con_xp_gained(entity: Entity, val: int) -> void:
_xp_range.value = _player.cxp _xp_range.value = _player.ccharacter_xp
func centity_data_changed(data: EntityData) -> void: func centity_data_changed(data: EntityData) -> void:
var health = _player.get_health() var health = _player.get_health()