diff --git a/reframework/autorun/MHR_Overlay.lua b/reframework/autorun/MHR_Overlay.lua index 226579e..646c2a2 100644 --- a/reframework/autorun/MHR_Overlay.lua +++ b/reframework/autorun/MHR_Overlay.lua @@ -11,7 +11,7 @@ local language = require("MHR_Overlay.Misc.language"); local table_helpers = require("MHR_Overlay.Misc.table_helpers"); local part_names = require("MHR_Overlay.Misc.part_names"); -local ailments = require("MHR_Overlay.Monsters.ailments"); + local player = require("MHR_Overlay.Damage_Meter.player"); local damage_hook = require("MHR_Overlay.Damage_Meter.damage_hook"); @@ -22,6 +22,8 @@ local body_part = require("MHR_Overlay.Monsters.body_part"); local large_monster = require("MHR_Overlay.Monsters.large_monster"); local monster_hook = require("MHR_Overlay.Monsters.monster_hook"); local small_monster = require("MHR_Overlay.Monsters.small_monster"); +local ailments = require("MHR_Overlay.Monsters.ailments"); +local ailment_hook = require("MHR_Overlay.Monsters.ailment_hook"); local damage_meter_UI = require("MHR_Overlay.UI.Modules.damage_meter_UI"); local large_monster_UI = require("MHR_Overlay.UI.Modules.large_monster_UI"); @@ -67,7 +69,7 @@ ailments.init_module(); large_monster.init_module(); monster_hook.init_module(); small_monster.init_module(); - +ailment_hook.init_module(); customization_menu.init_module(); body_part_UI_entity.init_module(); @@ -105,8 +107,8 @@ re.on_frame(function() end); re.on_frame(function() - draw.text("xy: " .. tostring(xy), 551, 11, 0xFF000000); - draw.text("xy: " .. tostring(xy), 550, 10, 0xFFFFFFFF); + --draw.text("xy: " .. tostring(xy), 551, 11, 0xFF000000); + --draw.text("xy: " .. tostring(xy), 550, 10, 0xFFFFFFFF); end); -- #endregion --------------------------RE_IMGUI--------------------------- diff --git a/reframework/autorun/MHR_Overlay/Damage_Meter/damage_hook.lua b/reframework/autorun/MHR_Overlay/Damage_Meter/damage_hook.lua index 5d86ab1..9fb9371 100644 --- a/reframework/autorun/MHR_Overlay/Damage_Meter/damage_hook.lua +++ b/reframework/autorun/MHR_Overlay/Damage_Meter/damage_hook.lua @@ -49,7 +49,7 @@ function damage_hook.update_damage(args) return; end - local enemy_calc_damage_info = sdk.to_managed_object(args[3]); -- snow.hit.EnemyCalcDamageInfo.AfterCalcInfo_DamageSide + local enemy_calc_damage_info = sdk.to_managed_object(args[3]); -- snow.hit.EnemyCalcDamageInfo.AfterCalcInfo_DamageSide -- snow.hit.DamageFlowInfoBase calcDamageResult? local attacker_id = get_attacker_id_method:call(enemy_calc_damage_info); local attacker_type = get_damage_attacker_type_method:call(enemy_calc_damage_info); local is_marionette_attack = is_marionette_attack_method:call(enemy_calc_damage_info) diff --git a/reframework/autorun/MHR_Overlay/Endemic_Life/env_creature.lua b/reframework/autorun/MHR_Overlay/Endemic_Life/env_creature.lua index a3095a9..5162056 100644 --- a/reframework/autorun/MHR_Overlay/Endemic_Life/env_creature.lua +++ b/reframework/autorun/MHR_Overlay/Endemic_Life/env_creature.lua @@ -44,6 +44,8 @@ local creature_is_inactive_field = environment_creature_base_type_def:get_field( local message_manager_type_def = sdk.find_type_definition("snow.gui.MessageManager"); local get_env_creature_name_message_method = message_manager_type_def:get_method("getEnvCreatureNameMessage"); +local get_pos_method = environment_creature_base_type_def:get_method("get_Pos"); + function env_creature.init(creature, REcreature) local creature_type = creature_type_field:get_data(REcreature); if creature_type == nil then @@ -64,17 +66,23 @@ function env_creature.init_UI(creature) creature.name_label.offset.y = creature.name_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier; end -local get_game_object_method = sdk.find_type_definition("via.Component"):get_method("get_GameObject"); -local get_transform_method = sdk.find_type_definition("via.GameObject"):get_method("get_Transform"); -local get_position_method = sdk.find_type_definition("via.Transform"):get_method("get_Position"); +--local get_game_object_method = sdk.find_type_definition("via.Component"):get_method("get_GameObject"); +--local get_transform_method = sdk.find_type_definition("via.GameObject"):get_method("get_Transform"); +--local get_position_method = sdk.find_type_definition("via.Transform"):get_method("get_Position"); function env_creature.update(REcreature) - if REcreature == nil then + if not config.current_config.endemic_life_UI.enabled then return; end local creature = env_creature.get_creature(REcreature); + local position = get_pos_method:call(REcreature); + if position ~= nil then + creature.position = position; + end + + --[[ if creature.game_object == nil then creature.game_object = get_game_object_method:call(REcreature); @@ -99,11 +107,13 @@ function env_creature.update(REcreature) end creature.position = position; + --]] local is_inactive = creature_is_inactive_field:get_data(REcreature); if is_inactive ~= nil then creature.is_inactive = is_inactive; end + end function env_creature.draw(creature, position_on_screen, opacity_scale) diff --git a/reframework/autorun/MHR_Overlay/Endemic_Life/env_creature_hook.lua b/reframework/autorun/MHR_Overlay/Endemic_Life/env_creature_hook.lua index 1bf8c8e..c0ff607 100644 --- a/reframework/autorun/MHR_Overlay/Endemic_Life/env_creature_hook.lua +++ b/reframework/autorun/MHR_Overlay/Endemic_Life/env_creature_hook.lua @@ -1,6 +1,7 @@ local env_creature_hook = {}; local env_creature; local config; +local time; local environment_creature_base_type_def = sdk.find_type_definition("snow.envCreature.EnvironmentCreatureBase"); local environment_creature_base_update_method = environment_creature_base_type_def:get_method("update"); @@ -21,6 +22,7 @@ end function env_creature_hook.init_module() config = require("MHR_Overlay.Misc.config"); env_creature = require("MHR_Overlay.Endemic_Life.env_creature"); + time = require("MHR_Overlay.Game_Handler.time"); end return env_creature_hook; \ No newline at end of file diff --git a/reframework/autorun/MHR_Overlay/Game_Handler/quest_status.lua b/reframework/autorun/MHR_Overlay/Game_Handler/quest_status.lua index 7fc5517..213efc9 100644 --- a/reframework/autorun/MHR_Overlay/Game_Handler/quest_status.lua +++ b/reframework/autorun/MHR_Overlay/Game_Handler/quest_status.lua @@ -14,10 +14,15 @@ quest_status.update_is_result_screen = false; local quest_manager_type_definition = sdk.find_type_definition("snow.QuestManager"); local on_changed_game_status = quest_manager_type_definition:get_method("onChangedGameStatus"); +local get_status_method = quest_manager_type_definition:get_method("getStatus"); +local is_result_demo_play_start_method = quest_manager_type_definition:get_method("isResultDemoPlayStart"); local village_area_manager_type_def = sdk.find_type_definition("snow.VillageAreaManager"); local check_current_area_training_area_method = village_area_manager_type_def:get_method("checkCurrentArea_TrainingArea"); +local lobby_manager_type_definition = sdk.find_type_definition("snow.LobbyManager"); +local is_quest_online_method = lobby_manager_type_definition:get_method("IsQuestOnline"); + sdk.hook(on_changed_game_status, function(args) pcall(quest_status.update(args)); end, function(retval) @@ -47,7 +52,7 @@ function quest_status.init() return; end - local new_quest_status = singletons.quest_manager:call("getStatus"); + local new_quest_status = get_status_method:call(singletons.quest_manager); if new_quest_status == nil then customization_menu.status = "No quest status"; return; @@ -64,7 +69,7 @@ function quest_status.update_is_online() return; end - local is_quest_online = singletons.lobby_manager:call("IsQuestOnline"); + local is_quest_online = is_quest_online_method:call(singletons.lobby_manager); if is_quest_online == nil then return; end @@ -100,7 +105,7 @@ function quest_status.update_is_result_screen() return; end - local is_result_demo_play_start = singletons.quest_manager:call("isResultDemoPlayStart"); + local is_result_demo_play_start = is_result_demo_play_start_method:call(singletons.quest_manager); if is_result_demo_play_start == nil then return; end diff --git a/reframework/autorun/MHR_Overlay/Misc/config.lua b/reframework/autorun/MHR_Overlay/Misc/config.lua index f6bee99..7295a58 100644 --- a/reframework/autorun/MHR_Overlay/Misc/config.lua +++ b/reframework/autorun/MHR_Overlay/Misc/config.lua @@ -2677,7 +2677,7 @@ function config.init() }, endemic_life_UI = { - enabled = true, + enabled = false, settings = { hide_inactive_creatures = true, diff --git a/reframework/autorun/MHR_Overlay/Misc/language.lua b/reframework/autorun/MHR_Overlay/Misc/language.lua index fb4fa72..30ed52b 100644 --- a/reframework/autorun/MHR_Overlay/Misc/language.lua +++ b/reframework/autorun/MHR_Overlay/Misc/language.lua @@ -65,7 +65,7 @@ language.default_language = { poison = "Poison", blast = "Blast", exhaust ="Exhaust", - mount = "Mount", + ride = "Wyvern Riding", waterblight = "Waterblight", fireblight = "Fireblight", iceblight = "Iceblight", diff --git a/reframework/autorun/MHR_Overlay/Monsters/ailment_hook.lua b/reframework/autorun/MHR_Overlay/Monsters/ailment_hook.lua new file mode 100644 index 0000000..d5bab11 --- /dev/null +++ b/reframework/autorun/MHR_Overlay/Monsters/ailment_hook.lua @@ -0,0 +1,96 @@ +local ailment_hook = {}; +local small_monster; +local large_monster; +local config; +local ailments; +local table_helpers; + +local enemy_poison_damage_param_type_def = sdk.find_type_definition("snow.enemy.EnemyPoisonDamageParam"); +local on_poison_activate_proc_method = enemy_poison_damage_param_type_def:get_method("onActivateProc"); + +local enemy_condition_damage_param_base_type_def = sdk.find_type_definition("snow.enemy.EnemyConditionDamageParamBase"); +local get_enemy_method = enemy_condition_damage_param_base_type_def:get_method("get_Em"); + +local enemy_character_base_type_def = sdk.find_type_definition("snow.enemy.EnemyCharacterBase"); +local damage_param_field = enemy_character_base_type_def:get_field("k__BackingField"); +local is_boss_enemy_method = enemy_character_base_type_def:get_method("get_isBossEnemy"); + +local enemy_damage_param_type_def = sdk.find_type_definition("snow.enemy.EnemyDamageParam"); +local stock_damage_method = enemy_damage_param_type_def:get_method("stockDamage"); +local poison_param_field = enemy_damage_param_type_def:get_field("_PoisonParam"); +local blast_param_field = enemy_damage_param_type_def:get_field("_BlastParam"); + +sdk.hook(stock_damage_method, function(args) + pcall(ailment_hook.stock_damage); +end, function(retval) + return retval; +end); + +sdk.hook(on_poison_activate_proc_method, function(args) + pcall(ailment_hook.poison_proc, sdk.to_managed_object(args[2])); +end, function(retval) + return retval; +end); + +function ailment_hook.poison_proc(poison_param) + if poison_param == nil then + return; + end + + local enemy = get_enemy_method:call(poison_param); + if enemy == nil then + return; + end + + local is_large = is_boss_enemy_method:call(enemy); + if is_large == nil then + return; + end + + local monster; + if is_large then + monster = large_monster.get_monster(enemy); + else + monster = small_monster.get_monster(enemy); + end + + ailments.calculate_ailment_contribution(monster, ailments.poison_id); +end + +function ailment_hook.stock_damage() + for enemy, monster in pairs(large_monster.list) do + local damage_param = damage_param_field:get_data(enemy); + if damage_param == nil then + goto continue; + end + + local poison_param = poison_param_field:get_data(damage_param); + local blast_param = blast_param_field:get_data(damage_param); + + ailments.update_poison_blast(monster, poison_param, blast_param); + ::continue:: + end + + for enemy, monster in pairs(small_monster.list) do + local damage_param = damage_param_field:get_data(enemy); + if damage_param == nil then + goto continue; + end + + local poison_param = poison_param_field:get_data(damage_param); + local blast_param = blast_param_field:get_data(damage_param); + + ailments.update_poison_blast(monster, poison_param, blast_param); + ::continue:: + end +end + +function ailment_hook.init_module() + small_monster = require("MHR_Overlay.Monsters.small_monster"); + large_monster = require("MHR_Overlay.Monsters.large_monster"); + config = require("MHR_Overlay.Misc.config"); + ailments = require("MHR_Overlay.Monsters.ailments"); + table_helpers = require("MHR_Overlay.Misc.table_helpers"); +end + +return ailment_hook; \ No newline at end of file diff --git a/reframework/autorun/MHR_Overlay/Monsters/ailments.lua b/reframework/autorun/MHR_Overlay/Monsters/ailments.lua index ec368e5..82675b9 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/ailments.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/ailments.lua @@ -33,7 +33,7 @@ ailments.flash_id = 3; ailments.poison_id = 4; ailments.blast_id = 5; ailments.exhaust_id = 6; -ailments.mount_id = 7; +ailments.ride_id = 7; ailments.water_id = 8; ailments.fire_id = 9; ailments.ice_id = 10; @@ -83,8 +83,8 @@ function ailments.new(_ailments, ailment_id) _ailments[ailment_id].name = language.current_language.ailments.blast; elseif ailment_id == ailments.exhaust_id then _ailments[ailment_id].name = language.current_language.ailments.exhaust; - elseif ailment_id == ailments.mount_id then - _ailments[ailment_id].name = language.current_language.ailments.mount; + elseif ailment_id == ailments.ride_id then + _ailments[ailment_id].name = language.current_language.ailments.ride; elseif ailment_id == ailments.water_id then _ailments[ailment_id].name = language.current_language.ailments.waterblight; elseif ailment_id == ailments.fire_id then @@ -122,7 +122,7 @@ function ailments.init_ailments() ailments.new(_ailments, ailments.poison_id); ailments.new(_ailments, ailments.blast_id); ailments.new(_ailments, ailments.exhaust_id); - ailments.new(_ailments, ailments.mount_id); + ailments.new(_ailments, ailments.ride_id); ailments.new(_ailments, ailments.water_id); ailments.new(_ailments, ailments.fire_id); ailments.new(_ailments, ailments.ice_id); @@ -261,7 +261,6 @@ function ailments.update_ailments(enemy, monster) if duration ~= nil and not monster.ailments[id].is_active then if duration ~= monster.ailments[id].duration then - xy = tostring(monster.ailments[id].is_active) .. " " .. tostring(monster.ailments[id].duration) .. " -> " .. tostring(duration); ailments.update_last_change_time(monster, id); end @@ -303,54 +302,33 @@ function ailments.update_last_change_time(monster, id) end -- Code by coavins -function ailments.update_poison_blast(enemy, is_large) - if enemy == nil then +function ailments.update_poison_blast(monster, poison_param, blast_param) + if monster == nil then return; end - local monster; - if is_large then - monster = large_monster.get_monster(enemy); - else - monster = small_monster.get_monster(enemy); - end - - local damage_param = damage_param_field:get_data(enemy); - if damage_param ~= nil then - - local poison_param = poison_param_field:get_data(damage_param); - if poison_param ~= nil then - -- if applied, then calculate share for poison - local activate_count = get_activate_count_method:call(poison_param):get_element(0):get_field("mValue"); - - if activate_count > monster.ailments[ailments.poison_id].activate_count then - monster.ailments[ailments.poison_id].activate_count = activate_count; - ailments.calculate_ailment_contribution(monster, ailments.poison_id); - end - - -- if poison tick, apply damage + if poison_param ~= nil then + --if poison tick, apply damage + local is_damage = poison_get_is_damage_method:call(poison_param); + if is_damage then local poison_damage = poison_damage_field:get_data(poison_param); - local is_damage = poison_get_is_damage_method:call(poison_param); - - if is_damage then - ailments.apply_ailment_damage(monster, ailments.poison_id, poison_damage); - end + + ailments.apply_ailment_damage(monster, ailments.poison_id, poison_damage); end + end - local blast_param = blast_param_field:get_data(damage_param); - if blast_param ~= nil then - -- if applied, then calculate share for blast and apply damage - local activate_count = get_activate_count_method:call(blast_param):get_element(0):get_field("mValue"); + if blast_param ~= nil then + -- if applied, then calculate share for blast and apply damage + local activate_count = get_activate_count_method:call(blast_param):get_element(0):get_field("mValue"); - if activate_count > monster.ailments[ailments.blast_id].activate_count then - monster.ailments[ailments.blast_id].activate_count = activate_count; - ailments.calculate_ailment_contribution(monster, ailments.blast_id); + if activate_count > monster.ailments[ailments.blast_id].activate_count then + monster.ailments[ailments.blast_id].activate_count = activate_count; + ailments.calculate_ailment_contribution(monster, ailments.blast_id); - local blast_damage = blast_damage_method:call(blast_param); - local blast_adjust_rate = blast_adjust_rate_method:call(blast_param); - - ailments.apply_ailment_damage(monster, ailments.blast_id, blast_damage * blast_adjust_rate); - end + local blast_damage = blast_damage_method:call(blast_param); + local blast_adjust_rate = blast_adjust_rate_method:call(blast_param); + + ailments.apply_ailment_damage(monster, ailments.blast_id, blast_damage * blast_adjust_rate); end end end diff --git a/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua b/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua index 27df30c..5e8a644 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua @@ -35,6 +35,7 @@ function large_monster.new(enemy) monster.capture_percentage = 0; monster.dead_or_captured = false; + monster.is_disp_icon_mini_map = true; monster.stamina = 0; monster.max_stamina = 1000; @@ -323,6 +324,7 @@ local physical_param_field = enemy_character_base_type_def:get_field("k__BackingField"); local anger_param_field = enemy_character_base_type_def:get_field("k__BackingField"); local check_die_method = enemy_character_base_type_def:get_method("checkDie"); +local is_disp_icon_mini_map_method = enemy_character_base_type_def:get_method("isDispIconMiniMap"); local physical_param_type = physical_param_field:get_type(); local get_vital_method = physical_param_type:get_method("getVital"); @@ -351,15 +353,15 @@ local mario_param_type = mario_param_field:get_type(); local get_is_marionette_method = mario_param_type:get_method("get_IsMarionette"); local get_mario_player_index_method = mario_param_type:get_method("get_MarioPlayerIndex"); -local get_game_object_method = sdk.find_type_definition("via.Component"):get_method("get_GameObject"); -local get_transform_method = sdk.find_type_definition("via.GameObject"):get_method("get_Transform"); -local get_position_method = sdk.find_type_definition("via.Transform"):get_method("get_Position"); +local get_pos_field = enemy_character_base_type_def:get_method("get_Pos"); + +--local get_game_object_method = sdk.find_type_definition("via.Component"):get_method("get_GameObject"); +--local get_transform_method = sdk.find_type_definition("via.GameObject"):get_method("get_Transform"); +--local get_position_method = sdk.find_type_definition("via.Transform"):get_method("get_Position"); function large_monster.update_position(enemy) - if not config.current_config.large_monster_UI.dynamic.enabled - and not config.current_config.large_monster_UI.static.enabled - and not config.current_config.large_monster_UI.highlighted.enabled then + if not config.current_config.large_monster_UI.dynamic.enabled then return; end @@ -368,6 +370,13 @@ function large_monster.update_position(enemy) return; end + local position = get_pos_field:call(enemy); + if position ~= nil then + monster.position = position; + end + + --[[ + -- cac -- cache off the game object and transform -- as these are pretty much guaranteed to stay constant -- as long as the enemy is alive @@ -395,7 +404,7 @@ function large_monster.update_position(enemy) if position ~= nil then monster.position = position; - end + end--]] end -- Code by coavins @@ -444,11 +453,8 @@ function large_monster.update(enemy) local health = get_current_method:call(vital_param); local max_health = get_max_method:call(vital_param); local capture_health = get_capture_hp_vital_method:call(physical_param); - local dead_or_captured = check_die_method:call(enemy); - if dead_or_captured == nil then - return; - end + local is_disp_icon_mini_map = is_disp_icon_mini_map_method:call(enemy); local stamina_param = stamina_param_field:get_data(enemy) if stamina_param == nil then @@ -567,6 +573,9 @@ function large_monster.update(enemy) if dead_or_captured ~= nil then monster.dead_or_captured = dead_or_captured; end + if is_disp_icon_mini_map ~= nil then + monster.is_disp_icon_mini_map = is_disp_icon_mini_map; + end if stamina ~= nil then monster.stamina = stamina; @@ -833,6 +842,8 @@ function large_monster.draw_highlighted(monster, position_on_screen, opacity_sca local last_part_position_on_screen = body_part.draw_highlighted(monster, parts_position_on_screen, opacity_scale); + + if config.current_config.large_monster_UI.highlighted.ailments.settings.offset_is_relative_to_parts then if last_part_position_on_screen ~= nil then ailments_position_on_screen = { diff --git a/reframework/autorun/MHR_Overlay/Monsters/monster_hook.lua b/reframework/autorun/MHR_Overlay/Monsters/monster_hook.lua index f05ecf7..6a5fc3d 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/monster_hook.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/monster_hook.lua @@ -7,7 +7,7 @@ local ailments; local enemy_character_base_type_def = sdk.find_type_definition("snow.enemy.EnemyCharacterBase"); local enemy_character_base_update_method = enemy_character_base_type_def:get_method("update"); -local is_boss_enemy_method = sdk.find_type_definition("snow.enemy.EnemyCharacterBase"):get_method("get_isBossEnemy"); +local is_boss_enemy_method = enemy_character_base_type_def:get_method("get_isBossEnemy"); sdk.hook(enemy_character_base_update_method, function(args) pcall(monster_hook.update_monster, sdk.to_managed_object(args[2])); @@ -68,8 +68,6 @@ function monster_hook.update_monster(enemy) return; end - ailments.update_poison_blast(enemy, is_large); - if is_large then monster_hook.update_large_monster(enemy); else diff --git a/reframework/autorun/MHR_Overlay/Monsters/small_monster.lua b/reframework/autorun/MHR_Overlay/Monsters/small_monster.lua index df1bcdb..0fc89e3 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/small_monster.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/small_monster.lua @@ -118,26 +118,34 @@ local physical_param_type = physical_param_field:get_type(); local get_vital_method = physical_param_type:get_method("getVital"); local get_capture_hp_vital_method = physical_param_type:get_method("get_CaptureHpVital"); -local vital_param_type = get_vital_method:get_return_type(); -local get_current_method = vital_param_type:get_method("get_Current"); -local get_max_method = vital_param_type:get_method("get_Max"); +local get_hp_vital_method = enemy_character_base_type_def:get_method("getHpVital"); +local get_hp_max_vital_method = enemy_character_base_type_def:get_method("getHpMaxVital"); + local stamina_param_type = stamina_param_field:get_type(); local get_stamina_method = stamina_param_type:get_method("getStamina"); local get_max_stamina_method = stamina_param_type:get_method("getMaxStamina"); -local get_gameobject_method = sdk.find_type_definition("via.Component"):get_method("get_GameObject"); -local get_transform_method = sdk.find_type_definition("via.GameObject"):get_method("get_Transform"); -local get_position_method = sdk.find_type_definition("via.Transform"):get_method("get_Position"); +local get_pos_field = enemy_character_base_type_def:get_method("get_Pos"); + +--local get_gameobject_method = sdk.find_type_definition("via.Component"):get_method("get_GameObject"); +--local get_transform_method = sdk.find_type_definition("via.GameObject"):get_method("get_Transform"); +--local get_position_method = sdk.find_type_definition("via.Transform"):get_method("get_Position"); function small_monster.update_position(enemy) - if not config.current_config.small_monster_UI.enabled then + if not config.current_config.small_monster_UI.enabled or not config.current_config.small_monster_UI.dynamic_positioning.enabled then return; end local monster = small_monster.get_monster(enemy); if not monster then return end + local position = get_pos_field:call(enemy); + if position ~= nil then + monster.position = position; + end + + --[[ -- cache off the game object and transform -- as these are pretty much guaranteed to stay constant -- as long as the enemy is alive @@ -166,6 +174,7 @@ function small_monster.update_position(enemy) if position ~= nil then monster.position = position; end + --]] end function small_monster.update(enemy) @@ -201,20 +210,18 @@ function small_monster.update(enemy) return; end - local health = get_current_method:call(vital_param) - local max_health = get_max_method:call(vital_param) - local capture_health = get_capture_hp_vital_method:call(physical_param) + local health = get_hp_vital_method:call(enemy); + local max_health = get_hp_max_vital_method:call(enemy); + local capture_health = get_capture_hp_vital_method:call(physical_param); - local stamina = get_stamina_method:call(stamina_param) - local max_stamina = get_max_stamina_method:call(stamina_param) + local stamina = get_stamina_method:call(stamina_param); + local max_stamina = get_max_stamina_method:call(stamina_param); local dead_or_captured = check_die_method:call(enemy); if dead_or_captured == nil then return; end - small_monster.update_position(enemy) - local monster = small_monster.get_monster(enemy); if health ~= nil then @@ -255,7 +262,7 @@ function small_monster.update(enemy) end end - ailments.update_ailments(enemy, monster) + ailments.update_ailments(enemy, monster); end function small_monster.draw(monster, position_on_screen, opacity_scale) diff --git a/reframework/autorun/MHR_Overlay/UI/Modules/large_monster_UI.lua b/reframework/autorun/MHR_Overlay/UI/Modules/large_monster_UI.lua index 10d5e5e..430b67e 100644 --- a/reframework/autorun/MHR_Overlay/UI/Modules/large_monster_UI.lua +++ b/reframework/autorun/MHR_Overlay/UI/Modules/large_monster_UI.lua @@ -62,7 +62,7 @@ function large_monster_UI.draw(dynamic_enabled, static_enabled, highlighted_enab goto continue; end - if monster.dead_or_captured then + if monster.dead_or_captured or not monster.is_disp_icon_mini_map then monster_id_shift = monster_id_shift + 1; elseif i == highlighted_id + monster_id_shift then highlighted_monster = monster; diff --git a/reframework/data/MHR Overlay/languages/en-us.json b/reframework/data/MHR Overlay/languages/en-us.json index 32bdd93..14ada8b 100644 --- a/reframework/data/MHR Overlay/languages/en-us.json +++ b/reframework/data/MHR Overlay/languages/en-us.json @@ -19,10 +19,10 @@ "fireblight": "Fireblight", "flash": "Flash", "iceblight": "Iceblight", - "mount": "Mount", "paralysis": "Paralysis", "poison": "Poison", "quick_sand": "Quick Sand", + "ride": "Wyvern Riding", "shock_otomo_trap": "Shock Otomo Trap", "shock_trap": "Shock Trap", "sleep": "Sleep", diff --git a/reframework/data/MHR Overlay/languages/ko-kr.json b/reframework/data/MHR Overlay/languages/ko-kr.json index ef8231e..abc4684 100644 --- a/reframework/data/MHR Overlay/languages/ko-kr.json +++ b/reframework/data/MHR Overlay/languages/ko-kr.json @@ -19,10 +19,10 @@ "fireblight": "Fireblight", "flash": "Flash", "iceblight": "Iceblight", - "mount": "Mount", "paralysis": "Paralysis", "poison": "Poison", "quick_sand": "Quick Sand", + "ride": "Wyvern Riding", "shock_otomo_trap": "Shock Otomo Trap", "shock_trap": "Shock Trap", "sleep": "Sleep", @@ -80,8 +80,6 @@ "first": "처음", "first_hit": "첫 공격", "flinch_count": "경직 횟수", - "font": "글꼴", - "font_notice": "글꼴 설정 변경시 스크립트 리로드가 필수입니다!", "foreground": "전경색", "global_position_modifier": "전역 위치 배율", "global_scale_modifier": "전역 크기 배율", @@ -103,7 +101,6 @@ "highlighted": "타겟 몬스터 표시", "highlighted_bar": "타겟 몬스터 막대", "highlighted_damage_bar": "타겟 몬스터 대미지 막대", - "higlighted_bar": "타겟 몬스터 막대", "horizontal": "가로", "hotkeys": "단축키", "hunter_rank": "헌터 랭크", diff --git a/reframework/data/MHR Overlay/languages/ru-ru.json b/reframework/data/MHR Overlay/languages/ru-ru.json index 7964b09..a6db073 100644 --- a/reframework/data/MHR Overlay/languages/ru-ru.json +++ b/reframework/data/MHR Overlay/languages/ru-ru.json @@ -1,7 +1,7 @@ { "UI": { "HP": "ОЗ:", - "buildup": "Buildup", + "buildup": "Накопление", "gold": "Золото", "mini": "Мини", "player": "Игрок", @@ -11,53 +11,52 @@ "total_damage": "Общий урон" }, "ailments": { - "blast": "Blast", - "dung_bomb": "Dung Bomb", - "exhaust": "Exhaust", - "fall_otomo_trap": "Fall Otomo Trap", - "fall_trap": "Fall Trap", - "fireblight": "Fireblight", + "blast": "Взрыв", + "dung_bomb": "Навозная бомба", + "exhaust": "Истощение", + "fall_otomo_trap": "Волчья яма спутника", + "fall_trap": "Волчья яма", + "fireblight": "Огненная порча", "flash": "Flash", - "iceblight": "Iceblight", - "mount": "Mount", - "paralysis": "Paralysis", - "poison": "Poison", - "quick_sand": "Quick Sand", - "shock_otomo_trap": "Shock Otomo Trap", - "shock_trap": "Shock Trap", - "sleep": "Sleep", - "steel_fang": "Steel Fang", - "stun": "Stun", - "thunderblight": "Thunderblight", - "tranq_bomb": "Tranq Bomb", - "waterblight": "Waterblight" + "iceblight": "Ледяная порча", + "paralysis": "Паралич", + "poison": "Отравление", + "quick_sand": "Зыбучий песок", + "ride": "Езда на виверне", + "shock_otomo_trap": "Шоковая ловушка спутника", + "shock_trap": "Шоковая ловушка", + "sleep": "Сон", + "steel_fang": "Стальной клык", + "stun": "Оглушение", + "thunderblight": "Грозовая порча", + "tranq_bomb": "Снотворная порча", + "waterblight": "Водяная порча" }, "customization_menu": { "UI_font": "Шрифт интерфейса", "UI_font_notice": "Любые изменения шрифта требуют перезагрузку скрипта!", - "activation_count": "Activation Count", - "ailment_name": "Ailment Name", - "ailment_name_label": "Ailment Name Label", - "ailments": "Ailments", + "activation_count": "Кол-во активаций", + "ailment_name": "Название аномального статуса", + "ailment_name_label": "Метка названия аномального статуса", + "ailments": "Аномальные статусы", "all_UI": "Весь интерфейс", "anchor": "Привязка", "assign_new_key": "Привязать клавишу", "background": "Фон", "bar": "Шкала", - "blast": "Blast", - "blast_damage": "Blast Damage", + "blast_damage": "Урон от взрыва", "body_parts": "Части тела", "bold": "Жирный", "bomb_damage": "Урон от бомб", "bottom_left": "Левый нижний угол", "bottom_right": "Правй нижний угол", "break_count": "Счётчик повреждений", - "buildup": "Buildup", - "buildup_percentage": "Buildup Percentage", + "buildup": "Накопление", + "buildup_percentage": "Процент накопления", "capture_line": "Линия здоровья захвата", "color": "Цвет", "colors": "Цвета", - "creature_name_label": "Creature Name Label", + "creature_name_label": "Метка имени существа", "crown": "Корона", "crown_thresholds": "Лимиты корон", "damage": "Урон", @@ -70,23 +69,16 @@ "dps": "Урон в секунду", "dps_label": "Метка урона в секунду", "dps_mode": "Режим урона в секунду", - "dung_bomb": "Dung Bomb", "during_quest": "Во время квеста", "dynamic_positioning": "Динамическое позиционирование", "dynamically_positioned": "Рассположенный динамично", "enable_for": "Показывать для", "enabled": "Включить", - "endemic_life_UI": "Endemic Life UI", - "exhaust": "Exhaust", - "fall_otomo_trap": "Fall Otomo Trap", - "fall_trap": "Fall Trap", + "endemic_life_UI": "Интерфейс местной живности", "family": "Семейство", "fight_time": "Время в бою", - "fire": "Fire", - "fireblight": "Fireblight", "first": "Первый", "first_hit": "Первый удар", - "flash": "Flash", "flinch_count": "Кол-во повреждений", "foreground": "Передний план", "global_position_modifier": "Глобальный модификатор расположения", @@ -95,13 +87,13 @@ "health": "Здоровье", "health_percentage": "Здоровье в процентах", "height": "Высота", - "hide_ailments_with_zero_buildup": "Hide Ailments with 0 Buildup", - "hide_all_active_ailments": "Hide All Active Ailments", - "hide_all_inactive_ailments": "Hide All Inactive Ailments", + "hide_ailments_with_zero_buildup": "Скрыть аномальный статус, если накопление равно 0", + "hide_all_active_ailments": "Скрыть все активные аномальные статусы", + "hide_all_inactive_ailments": "Скрыть все неактивные аномальные статусы", "hide_dead_or_captured": "Скрыть мёртвых и захваченных монстров", - "hide_disabled_ailments": "Hide Disabled Ailments", - "hide_inactive_ailments_with_no_buildup_support": "Hide Inactive Ailments with no Buildup Support", - "hide_inactive_creatures": "Hide Inactive Creatures", + "hide_disabled_ailments": "Скрыть отключенные аномальные статусы", + "hide_inactive_ailments_with_no_buildup_support": "Скрыть неактивные аномальные статусы без поддержки накопления", + "hide_inactive_creatures": "Скрыть неактивных существ", "hide_module_if_total_damage_is_zero": "Скрыть модуль, если общий урон равен 0", "hide_player_if_player_damage_is_zero": "Скрыть игрока, если его урон равен 0", "hide_total_if_total_damage_is_zero": "Скрыть общий урон, если он равен 0", @@ -113,8 +105,6 @@ "hotkeys": "Горячие клавиши", "hunter_rank": "Ранг охотника", "hunter_rank_label": "Метка ранга охотника", - "ice": "Ice", - "iceblight": "Iceblight", "include": "Элементы", "installation_damage": "Урон от установок", "italic": "Курсив", @@ -132,24 +122,22 @@ "me": "Я", "menu_font": "Шрифт меню", "mod_name": "MHR Overlay", - "modifiers": "Modifiers", + "modifiers": "Модификаторы", "module_visibility_on_different_screens": "Видимость модулей на разных экранах", "modules": "Модули", "monster_can_be_captured": "Монстр может быть схвачен", "monster_damage": "Урон от монстров", "monster_name": "Имя монстра", "monster_name_label": "Метка имени монстра", - "mount": "Mount", "my_damage_bar_location": "Позиция моей шкалы урона", "none": "Нет", "normal": "Обычный", "offset": "Сдвиг", - "offset_is_relative_to_parts": "Offset is Relative to Parts", + "offset_is_relative_to_parts": "Сдвиг относителен к частям тела", "opacity_falloff": "Увеличение прозрачности от расстояния", "orientation": "Ориентация", "other_players": "Другие игроки", "otomo_damage": "Урон от отомо", - "paralysis": "Paralysis", "part_name": "Имя части тела", "part_name_label": "Метка имени части тела", "percentage_label": "Метка процентов", @@ -158,25 +146,20 @@ "player_id": "ИД игрока", "player_name": "Имя игрока", "player_name_label": "Метка имени игрока", - "poison": "Poison", - "poison_damage": "Poison Damage", + "poison_damage": "Урон от отравления", "position": "Расположение", "press_any_key": "Нажмите любую клавишу...", "prioritize_large_monsters": "Большие монстры в приоритете", "quest_result_screen": "Экран результатов квеста", "quest_time": "Время квеста", - "quick_sand": "Quick Sand", "rage": "Ярость", - "relative_offset": "Relative Offset", + "relative_offset": "Относительный сдвиг", "render_highlighted_monster": "Показывать помеченного монстра", "render_not_highlighted_monsters": "Показывать непомеченных монстров", "reversed_order": "Обратный порядок", "settings": "Настройки", "shadow": "Тень", - "shock_otomo_trap": "Shock Otomo Trap", - "shock_trap": "Shock Trap", "size": "Размер", - "sleep": "Sleep", "small_monster_UI": "Интерфейс малых монстров", "small_monsters": "Малые монстры", "sorting": "Сортировка", @@ -188,14 +171,10 @@ "static_spacing": "Статичное расстояние между элементами", "statically_positioned": "Рассположенный статично", "status": "Статус", - "steel_fang": "Steel Fang", - "stun": "Stun", "text_label": "Текстовая метка", - "thunder": "Thunder", - "thunderblight": "Thunderblight", "time_UI": "Интерфейс времени", "time_label": "Метка времени", - "time_limit": "Time Limit", + "time_limit": "Ограничение по времени", "timer_label": "Метка таймера", "top_damage": "Наибольший урон", "top_dps": "Наибольший урон в секунду", @@ -210,14 +189,11 @@ "tracked_damage_types": "Отслеживаемые типы урона", "tracked_monster_types": "Отслеживаемые типы монстров", "training_area": "Тренировочная зона", - "tranq_bomb": "Tranq Bomb", "type": "Тип", "value_label": "Метка значений", "vertical": "Вертикально", "viewport_offset": "Сдвиг в экранном пространстве", "visible": "Включить", - "water": "Water", - "waterblight": "Waterblight", "width": "Ширина", "word_player": "Слово \"Игрок\"", "world_offset": "Сдвиг в игровом пространстве", diff --git a/reframework/data/MHR Overlay/languages/zh-tw.json b/reframework/data/MHR Overlay/languages/zh-tw.json index 6fe78f1..b489c8e 100644 --- a/reframework/data/MHR Overlay/languages/zh-tw.json +++ b/reframework/data/MHR Overlay/languages/zh-tw.json @@ -1,7 +1,7 @@ { "UI": { "HP": "生命:", - "buildup": "Buildup", + "buildup": "Buildup:", "gold": "金冠", "mini": "小型", "player": "玩家", @@ -19,10 +19,10 @@ "fireblight": "Fireblight", "flash": "Flash", "iceblight": "Iceblight", - "mount": "Mount", "paralysis": "Paralysis", "poison": "Poison", "quick_sand": "Quick Sand", + "ride": "Wyvern Riding", "shock_otomo_trap": "Shock Otomo Trap", "shock_trap": "Shock Trap", "sleep": "Sleep", @@ -44,7 +44,6 @@ "assign_new_key": "Assign new key", "background": "圖形化顯示條的背景底色", "bar": "圖形化顯示條", - "blast": "Blast", "blast_damage": "Blast Damage", "body_parts": "身體部位", "bold": "粗體", @@ -70,33 +69,25 @@ "dps": "DPS", "dps_label": "DPS Label", "dps_mode": "DPS Mode", - "dung_bomb": "Dung Bomb", "during_quest": "任務中", "dynamic_positioning": "浮動的資訊位置", "dynamically_positioned": "浮動的魔物資訊", "enable_for": "Enable for", - "enable_on": "Enable on", "enabled": "可見", "endemic_life_UI": "Endemic Life UI", - "exhaust": "Exhaust", - "fall_otomo_trap": "Fall Otomo Trap", - "fall_trap": "Fall Trap", "family": "字體", "fight_time": "Fight Time", - "fire": "Fire", - "fireblight": "Fireblight", "first": "第一", "first_hit": "First Hit", - "flash": "Flash", "flinch_count": "Flinch Count", "foreground": "圖形化顯示條的底色", "global_position_modifier": "Global Position Modifier", - "global_scale_modifier": "Global Scale", + "global_scale_modifier": "Global Scale Modifier", "global_settings": "全域設定", "health": "生命", "health_percentage": "生命百分比", "height": "高度", - "hide_ailments_with_zero_buildup": "Hide Ailments with 0 Buildup", + "hide_ailments_with_zero_buildup": "Hide Ailments when Buildup is 0", "hide_all_active_ailments": "Hide All Active Ailments", "hide_all_inactive_ailments": "Hide All Inactive Ailments", "hide_dead_or_captured": "隱藏死亡或被捕獲的魔物", @@ -114,8 +105,6 @@ "hotkeys": "Hotkeys", "hunter_rank": "獵人等級", "hunter_rank_label": "Hunter Rank Label", - "ice": "Ice", - "iceblight": "Iceblight", "include": "細部資訊調整", "installation_damage": "設備傷害", "italic": "斜體", @@ -140,7 +129,6 @@ "monster_damage": "魔物傷害", "monster_name": "魔物名稱", "monster_name_label": "魔物名稱", - "mount": "Mount", "my_damage_bar_location": "我的傷害條", "none": "空", "normal": "正常", @@ -150,7 +138,6 @@ "orientation": "對齊方式", "other_players": "其他玩家", "otomo_damage": "隨從傷害", - "paralysis": "Paralysis", "part_name": "部位名稱", "part_name_label": "部位名稱", "percentage_label": "百分比", @@ -159,14 +146,12 @@ "player_id": "玩家ID", "player_name": "玩家名稱", "player_name_label": "玩家名稱", - "poison": "Poison", "poison_damage": "Poison Damage", "position": "位置", "press_any_key": "Press any key...", "prioritize_large_monsters": "大型魔物優先", "quest_result_screen": "Quest Result Screen", "quest_time": "Quest Time", - "quick_sand": "Quick Sand", "rage": "憤怒度", "relative_offset": "Relative Offset", "render_highlighted_monster": "Render Highlighted Monster", @@ -174,10 +159,7 @@ "reversed_order": "逆向排序", "settings": "設定", "shadow": "陰影", - "shock_otomo_trap": "Shock Otomo Trap", - "shock_trap": "Shock Trap", "size": "大小", - "sleep": "Sleep", "small_monster_UI": "小型魔物 UI", "small_monsters": "小型魔物群", "sorting": "排序方式", @@ -189,14 +171,10 @@ "static_spacing": "固定魔物資訊的間距", "statically_positioned": "固定的魔物資訊", "status": "狀態", - "steel_fang": "Steel Fang", - "stun": "Stun", "text_label": "文字", - "thunder": "Thunder", - "thunderblight": "Thunderblight", "time_UI": "時間 UI", "time_label": "時間", - "time_limit": "Time Limit", + "time_limit": "Time Limit (seconds)", "timer_label": "計時器", "top_damage": "最高傷害", "top_dps": "Top DPS", @@ -211,15 +189,11 @@ "tracked_damage_types": "追蹤的傷害類型", "tracked_monster_types": "追蹤的魔物類型", "training_area": "訓練場", - "tranq_bomb": "Tranq Bomb", "type": "類型", "value_label": "數字", "vertical": "垂直", "viewport_offset": "視窗的位置", "visible": "可見", - "visible_on": "Visible on", - "water": "Water", - "waterblight": "Waterblight", "width": "寬度", "word_player": "名稱 \"玩家\"", "world_offset": "地圖中的位置", diff --git a/reframework/fonts/NotoSans-Bold.ttf b/reframework/fonts/NotoSans-Bold.ttf new file mode 100644 index 0000000..b6c6f6b Binary files /dev/null and b/reframework/fonts/NotoSans-Bold.ttf differ diff --git a/reframework/fonts/NotoSansHK-Bold.otf b/reframework/fonts/NotoSansHK-Bold.otf new file mode 100644 index 0000000..31c38b9 Binary files /dev/null and b/reframework/fonts/NotoSansHK-Bold.otf differ diff --git a/reframework/fonts/NotoSansJP-Bold.otf b/reframework/fonts/NotoSansJP-Bold.otf new file mode 100644 index 0000000..e5b538d Binary files /dev/null and b/reframework/fonts/NotoSansJP-Bold.otf differ diff --git a/reframework/fonts/NotoSansKR-Bold.otf b/reframework/fonts/NotoSansKR-Bold.otf new file mode 100644 index 0000000..be388bf Binary files /dev/null and b/reframework/fonts/NotoSansKR-Bold.otf differ diff --git a/reframework/fonts/NotoSansSC-Bold.otf b/reframework/fonts/NotoSansSC-Bold.otf new file mode 100644 index 0000000..172eb67 Binary files /dev/null and b/reframework/fonts/NotoSansSC-Bold.otf differ diff --git a/reframework/fonts/NotoSansTC-Bold.otf b/reframework/fonts/NotoSansTC-Bold.otf new file mode 100644 index 0000000..6f0c8be Binary files /dev/null and b/reframework/fonts/NotoSansTC-Bold.otf differ diff --git a/reframework/fonts/unifont_jp-14.0.01.ttf b/reframework/fonts/unifont_jp-14.0.01.ttf new file mode 100644 index 0000000..446a790 Binary files /dev/null and b/reframework/fonts/unifont_jp-14.0.01.ttf differ