48 Commits

Author SHA1 Message Date
GreenComfyTea
40820f98a7 Return missing debug.lua 2023-04-21 12:54:35 +03:00
GreenComfyTea
dd8a6bc2d7 Update README.md 2023-04-21 11:37:51 +03:00
GreenComfyTea
5dbfcb89f4 Update README.md 2023-04-21 11:27:21 +03:00
GreenComfyTea
75a7d8fa8c Update ru-ru 2023-04-21 11:06:37 +03:00
GreenComfyTea
d4e97854c3 Mark Amatsu 7th Part as Unknown 2023-04-21 11:04:55 +03:00
GreenComfyTea
81a803cc7c Dont register global xy debug variable if debug is missing or debug.enabled = false 2023-04-21 10:21:27 +03:00
GreenComfyTea
9b1ff5b264 Utilize this keyword everywhere 2023-04-21 10:19:12 +03:00
GreenComfyTea
94e9e5d18b Merge branch 'main' of https://github.com/GreenComfyTea/MHR-Overlay.git; branch 'main' of https://github.com/GreenComfyTea/MHR-Overlay 2023-04-21 10:13:24 +03:00
GreenComfyTea
96afca0ade Map Risen Shagaru Magala and Amatsu part names 2023-04-21 10:13:14 +03:00
GreenComfyTea
f627a0b19b Merge table_helpers and unicode_helpers into utils 2023-04-21 10:08:07 +03:00
GreenComfyTea
ad2097b380 Merge pull request #63 from sukiqwq/patch-1 2023-04-21 08:55:31 +03:00
RqLiu
a08ecff5d7 Update zh-cn.json 2023-04-20 16:10:05 -04:00
GreenComfyTea
3dcb55e086 Update LICENSE 2023-04-20 10:39:50 +03:00
GreenComfyTea
23df95e30e Merge remote-tracking branch 'origin/main' into main 2023-04-19 11:36:13 +03:00
GreenComfyTea
ba3ec120b2 ; 2023-04-19 11:35:08 +03:00
GreenComfyTea
c8cad67d15 Merge pull request #62 from etnAtker/update-zh-cn-translation
Update zh-cn translation
2023-03-25 09:31:15 +02:00
etnAtker
3090e6bb6a Update zh-cn translation 2023-03-25 12:00:20 +08:00
GreenComfyTea
0a9c8488d6 Add wall hit damage (only host/local) 2023-03-07 11:55:30 +02:00
GreenComfyTea
c2531b77a2 Add option to filter parts based on current state 2023-03-06 13:48:55 +02:00
GreenComfyTea
6a4f4a9dfe Add include options for value/max labels 2023-03-06 13:24:01 +02:00
GreenComfyTea
7346b8d96f Update Korean Localization to v2.4.1 2023-03-01 17:41:02 +02:00
GreenComfyTea
7158c0d367 Uncomment Poison and Stun Ailment Buildup UIs 2023-03-01 16:59:24 +02:00
GreenComfyTea
c145c8a37b Move debug xy 2023-03-01 16:46:29 +02:00
GreenComfyTea
c1464dcc12 Fix poison damage not being accounted due to buildup_share being deep-copied 2023-03-01 16:46:11 +02:00
GreenComfyTea
6723091294 Bump version to 2.4.1 2023-02-07 20:01:42 +02:00
GreenComfyTea
650eba5568 Mapped TU4 Monsters: Velkhana and Risen Valstrax 2023-02-07 20:01:27 +02:00
GreenComfyTea
80b6977e0f Localization fixes 2023-02-07 19:41:50 +02:00
GreenComfyTea
ce250961fe Localization fixes 2023-02-07 19:41:38 +02:00
GreenComfyTea
09d82dea54 Add Buff UI (visuals only/commented out) 2023-02-07 19:41:08 +02:00
GreenComfyTea
c74a93a3b2 Fix "highlighted (targeted)" being used in damage meter 2023-02-06 16:53:13 +02:00
GreenComfyTea
ccd64f534c Cache some methods 2023-02-06 16:43:00 +02:00
GreenComfyTea
60bcd5770d Cache all global variables 2023-02-06 16:31:59 +02:00
GreenComfyTea
9252beba11 pcall each large monster UI individually 2023-02-06 15:58:28 +02:00
GreenComfyTea
9958817989 Fix a bug when autotarget was trying to target dead monster causing all large monster UI to not work 2023-02-06 15:55:57 +02:00
GreenComfyTea
fcf35d817f Potential fix to damage meter showing incorrect players sometimes 2023-02-06 15:26:03 +02:00
GreenComfyTea
b1d84ab739 Move default static large mon. UI from screen edge 2023-02-06 15:25:20 +02:00
GreenComfyTea
82033313ba Merge branch 'main' of https://github.com/GreenComfyTea/MHR-Overlay 2023-02-06 12:47:24 +02:00
GreenComfyTea
23213fcab0 Dont highlight if dps/damage is 0 2023-02-06 12:47:01 +02:00
GreenComfyTea
976abee356 Fix Highlighted Damage UI not being initialized 2023-02-06 12:45:23 +02:00
GreenComfyTea
d8f6e2f9bb Update README.md 2023-01-24 19:11:31 +02:00
GreenComfyTea
a0a4df7b91 fix 2023-01-14 15:17:33 +02:00
GreenComfyTea
667be5793e Hide otomos on screen end when option has been toggled 2023-01-14 15:07:45 +02:00
GreenComfyTea
b321896eeb Fix Total Cart Count 2023-01-14 14:16:50 +02:00
GreenComfyTea
3b94c67071 Fix a bug when my buddy was incorrect when disconnecting from online quest 2023-01-14 13:52:24 +02:00
GreenComfyTea
7b9e376db1 Fix typo 2023-01-14 13:51:25 +02:00
GreenComfyTea
fdab487b7e Language fixes 2023-01-14 13:31:00 +02:00
GreenComfyTea
b9d44a9b67 Change table tostring function to a better one 2023-01-14 13:30:35 +02:00
GreenComfyTea
3513d77714 Added Support for multiple configs
1) Implemented ailment damage for buddies;
2) Bugfixes;
2023-01-14 13:30:09 +02:00
61 changed files with 6377 additions and 3244 deletions

View File

@@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2022 GreenComfyTea Copyright (c) 2023 GreenComfyTea
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@@ -15,7 +15,7 @@ Exposes in-game data about monsters, creatures, players and damage. Draws a high
* **[Troubleshooting](https://github.com/GreenComfyTea/MHR-Overlay/wiki/Troubleshooting)** * **[Troubleshooting](https://github.com/GreenComfyTea/MHR-Overlay/wiki/Troubleshooting)**
# Requirements # Requirements
1. [REFramework](https://www.nexusmods.com/monsterhunterrise/mods/26) (v1.3.6 or above); 1. [REFramework](https://www.nexusmods.com/monsterhunterrise/mods/26) (v1.3.8 or above);
2. [REFramework Direct2D](https://www.nexusmods.com/monsterhunterrise/mods/134) (v0.4.0 or above). 2. [REFramework Direct2D](https://www.nexusmods.com/monsterhunterrise/mods/134) (v0.4.0 or above).
# How to install: # How to install:
@@ -35,7 +35,7 @@ Exposes in-game data about monsters, creatures, players and damage. Draws a high
**neatnet** - Korean translation. **neatnet** - Korean translation.
**s9000008, mcc1** - Traditional Chinese translation. **s9000008, mcc1** - Traditional Chinese translation.
**etnAtker** - Simplified Chinese translation. **etnAtker**, **sukiqwq** - Simplified Chinese translation.
**AKILAND0214** - Japanese translation. **AKILAND0214** - Japanese translation.
*** ***
# Support # Support

View File

@@ -1,4 +1,34 @@
xy = ""; local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
local debug = require("MHR_Overlay.Misc.debug"); local debug = require("MHR_Overlay.Misc.debug");
@@ -10,9 +40,10 @@ local time = require("MHR_Overlay.Game_Handler.time");
local config = require("MHR_Overlay.Misc.config"); local config = require("MHR_Overlay.Misc.config");
local language = require("MHR_Overlay.Misc.language"); local language = require("MHR_Overlay.Misc.language");
local table_helpers = require("MHR_Overlay.Misc.table_helpers");
local unicode_helpers = require("MHR_Overlay.Misc.unicode_helpers");
local part_names = require("MHR_Overlay.Misc.part_names"); local part_names = require("MHR_Overlay.Misc.part_names");
local utils = require("MHR_Overlay.Misc.utils");
--local buffs = require("MHR_Overlay.Buffs.buffs");
local players = require("MHR_Overlay.Damage_Meter.players"); local players = require("MHR_Overlay.Damage_Meter.players");
local non_players = require("MHR_Overlay.Damage_Meter.non_players"); local non_players = require("MHR_Overlay.Damage_Meter.non_players");
@@ -34,6 +65,7 @@ local large_monster_UI = require("MHR_Overlay.UI.Modules.large_monster_UI");
local small_monster_UI = require("MHR_Overlay.UI.Modules.small_monster_UI"); local small_monster_UI = require("MHR_Overlay.UI.Modules.small_monster_UI");
local time_UI = require("MHR_Overlay.UI.Modules.time_UI"); local time_UI = require("MHR_Overlay.UI.Modules.time_UI");
local env_creature_UI = require("MHR_Overlay.UI.Modules.env_creature_UI"); local env_creature_UI = require("MHR_Overlay.UI.Modules.env_creature_UI");
--local buff_UI = require("MHR_Overlay.UI.Modules.buff_UI");
local body_part_UI_entity = require("MHR_Overlay.UI.UI_Entities.body_part_UI_entity"); local body_part_UI_entity = require("MHR_Overlay.UI.UI_Entities.body_part_UI_entity");
local damage_UI_entity = require("MHR_Overlay.UI.UI_Entities.damage_UI_entity"); local damage_UI_entity = require("MHR_Overlay.UI.UI_Entities.damage_UI_entity");
@@ -42,6 +74,7 @@ local stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity"
local rage_UI_entity = require("MHR_Overlay.UI.UI_Entities.rage_UI_entity"); local rage_UI_entity = require("MHR_Overlay.UI.UI_Entities.rage_UI_entity");
local ailment_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_UI_entity"); local ailment_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_UI_entity");
local ailment_buildup_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_buildup_UI_entity"); local ailment_buildup_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_buildup_UI_entity");
--local buff_UI_entity = require("MHR_Overlay.UI.UI_Entities.buff_UI_entity");
local customization_menu = require("MHR_Overlay.UI.customization_menu"); local customization_menu = require("MHR_Overlay.UI.customization_menu");
local label_customization = require("MHR_Overlay.UI.Customizations.label_customization"); local label_customization = require("MHR_Overlay.UI.Customizations.label_customization");
@@ -60,12 +93,15 @@ local large_monster_UI_customization = require("MHR_Overlay.UI.Customizations.la
local drawing = require("MHR_Overlay.UI.drawing"); local drawing = require("MHR_Overlay.UI.drawing");
if debug ~= nil and debug.enabled then
xy = "";
end
------------------------INIT MODULES------------------------- ------------------------INIT MODULES-------------------------
-- #region -- #region
screen.init_module(); screen.init_module();
singletons.init_module(); singletons.init_module();
table_helpers.init_module(); utils.init_module();
unicode_helpers.init_module();
time.init_module(); time.init_module();
language.init_module(); language.init_module();
@@ -79,6 +115,9 @@ rage_UI_entity.init_module();
ailment_UI_entity.init_module(); ailment_UI_entity.init_module();
ailment_buildup_UI_entity.init_module(); ailment_buildup_UI_entity.init_module();
body_part_UI_entity.init_module(); body_part_UI_entity.init_module();
--buff_UI_entity.init_module();
--buffs.init_module();
damage_hook.init_module(); damage_hook.init_module();
players.init_module(); players.init_module();
@@ -119,6 +158,7 @@ large_monster_UI.init_module();
small_monster_UI.init_module(); small_monster_UI.init_module();
time_UI.init_module(); time_UI.init_module();
env_creature_UI.init_module(); env_creature_UI.init_module();
--buff_UI.init_module();
keyboard.init_module(); keyboard.init_module();
@@ -133,7 +173,7 @@ local function draw_modules(module_visibility_config, flow_state_name)
if module_visibility_config.small_monster_UI and config.current_config.small_monster_UI.enabled then if module_visibility_config.small_monster_UI and config.current_config.small_monster_UI.enabled then
local success = pcall(small_monster_UI.draw); local success = pcall(small_monster_UI.draw);
if not success then if not success then
customization_menu.status = string.format("[%s] Small monster drawing function threw an exception", flow_state_name); customization_menu.status = string.format("[%s] Small Monster UI Drawing Function threw an Exception", flow_state_name);
end end
end end
@@ -149,30 +189,37 @@ local function draw_modules(module_visibility_config, flow_state_name)
if dynamic_enabled or static_enabled or highlighted_enabled then if dynamic_enabled or static_enabled or highlighted_enabled then
local success = pcall(large_monster_UI.draw, dynamic_enabled, static_enabled, highlighted_enabled); local success = pcall(large_monster_UI.draw, dynamic_enabled, static_enabled, highlighted_enabled);
if not success then if not success then
customization_menu.status = string.format("[%s] Large Monster drawing function threw an exception", flow_state_name); customization_menu.status = string.format("[%s] Large Monster UI Drawing Function threw an Exception", flow_state_name);
end end
end end
if config.current_config.time_UI.enabled and module_visibility_config.time_UI then if config.current_config.time_UI.enabled and module_visibility_config.time_UI then
local success = pcall(time_UI.draw); local success = pcall(time_UI.draw);
if not success then if not success then
customization_menu.status = string.format("[%s] Time Drawing function threw an exception", flow_state_name); customization_menu.status = string.format("[%s] Time UI Drawing Function threw an Exception", flow_state_name);
end end
end end
if config.current_config.damage_meter_UI.enabled and module_visibility_config.damage_meter_UI then if config.current_config.damage_meter_UI.enabled and module_visibility_config.damage_meter_UI then
local success = pcall(damage_meter_UI.draw); local success = pcall(damage_meter_UI.draw);
if not success then if not success then
customization_menu.status = string.format("[%s] Damage Meter drawing function threw an exception", flow_state_name); customization_menu.status = string.format("[%s] Damage Meter UI Drawing Function threw an Exception", flow_state_name);
end end
end end
if config.current_config.endemic_life_UI.enabled and module_visibility_config.endemic_life_UI then if config.current_config.endemic_life_UI.enabled and module_visibility_config.endemic_life_UI then
local success = pcall(env_creature_UI.draw); local success = pcall(env_creature_UI.draw);
if not success then if not success then
customization_menu.status = string.format("[%s] Endemic Life drawing function threw an exception", flow_state_name); customization_menu.status = string.format("[%s] Endemic Life UI Drawing Function threw an Exception", flow_state_name);
end end
end end
--[[if config.current_config.buff_UI.enabled and module_visibility_config.buff_UI then
local success = truepcall(buff_UI.draw);
if not success then
customization_menu.status = string.format("[%s] Buff UI Drawing Function threw an Exception", flow_state_name);
end
end]]
end end
local function main_loop() local function main_loop()
@@ -196,24 +243,32 @@ local function main_loop()
if dynamic_enabled or static_enabled or highlighted_enabled then if dynamic_enabled or static_enabled or highlighted_enabled then
local success = pcall(large_monster_UI.draw, dynamic_enabled, static_enabled, highlighted_enabled); local success = pcall(large_monster_UI.draw, dynamic_enabled, static_enabled, highlighted_enabled);
if not success then if not success then
customization_menu.status = "[In Training Area] Large monster drawing function threw an exception"; customization_menu.status = "[In Training Area] Large Monster UI Drawing Function threw an Exception";
end end
end end
if config.current_config.damage_meter_UI.enabled and module_visibility_config.damage_meter_UI then if config.current_config.damage_meter_UI.enabled and module_visibility_config.damage_meter_UI then
local success = pcall(damage_meter_UI.draw); local success = pcall(damage_meter_UI.draw);
if not success then if not success then
customization_menu.status = "[In Training Area] Damage meter drawing function threw an exception"; customization_menu.status = "[In Training Area] Damage Meter UI Drawing Function threw an Exception";
end end
end end
if config.current_config.endemic_life_UI.enabled and module_visibility_config.endemic_life_UI then if config.current_config.endemic_life_UI.enabled and module_visibility_config.endemic_life_UI then
local success = pcall(env_creature_UI.draw); local success = pcall(env_creature_UI.draw);
if not success then if not success then
customization_menu.status = "[In Training Area] Endemic life drawing function threw an exception"; customization_menu.status = "[In Training Area] Endemic Life UI Drawing Function threw an Exception";
end end
end end
--[[if config.current_config.buff_UI.enabled and module_visibility_config.buff_UI then
local success = pcall(buff_UI.draw);
if not success then
customization_menu.status = "[In Training Area] Buff UI Drawing Function threw an Exception";
end
end]]
elseif quest_status.flow_state == quest_status.flow_states.CUTSCENE then elseif quest_status.flow_state == quest_status.flow_states.CUTSCENE then
draw_modules(config.current_config.global_settings.module_visibility.cutscene, "Cutscene"); draw_modules(config.current_config.global_settings.module_visibility.cutscene, "Cutscene");
elseif quest_status.flow_state == quest_status.flow_states.LOADING_QUEST then elseif quest_status.flow_state == quest_status.flow_states.LOADING_QUEST then
@@ -282,7 +337,7 @@ end);
-- #endregion -- #endregion
----------------------------D2D------------------------------ ----------------------------D2D------------------------------
if debug.enabled then if debug ~= nil and debug.enabled then
if d2d ~= nil then if d2d ~= nil then
d2d.register(function() d2d.register(function()
end, function() end, function()
@@ -291,8 +346,8 @@ if debug.enabled then
end end
if xy ~= "" then if xy ~= "" then
d2d.text(drawing.font, "xy:\n" .. tostring(xy), 551, 11, 0xFF000000); d2d.text(drawing.font, "xy:\n" .. tostring(xy), 256, 71, 0xFF000000);
d2d.text(drawing.font, "xy:\n" .. tostring(xy), 550, 10, 0xFFFFFFFF); d2d.text(drawing.font, "xy:\n" .. tostring(xy), 255, 70, 0xFFFFFFFF);
end end
end); end);
end end
@@ -303,12 +358,12 @@ if debug.enabled then
end end
if xy ~= "" then if xy ~= "" then
draw.text("xy:\n" .. tostring(xy), 551, 11, 0xFF000000); draw.text("xy:\n" .. tostring(xy), 256, 31, 0xFF000000);
draw.text("xy:\n" .. tostring(xy), 550, 10, 0xFFFFFFFF); draw.text("xy:\n" .. tostring(xy), 255, 30, 0xFFFFFFFF);
end end
end); end);
end end
if imgui.begin_table == nil then if imgui.begin_table == nil then
re.msg(language.current_language.customization_menu.reframework_outdated); re.msg(language.current_language.customization_menu.reframework_outdated);
end end

View File

@@ -0,0 +1,108 @@
local this = {};
local buff_UI_entity;
local config;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
this.list = {};
function this.new(name)
local buff = {};
buff.name = name;
buff.timer = 0;
buff.duration = 0;
buff.is_active = true;
buff.timer_percentage = 0;
buff.minutes_left = 0;
buff.seconds_left = 0;
buff.is_infinite = false;
this.init_UI(buff);
return buff;
end
function this.init_buffs()
this.list = {};
end
function this.init_UI(buff)
local cached_config = config.current_config.buff_UI;
buff.buff_UI = buff_UI_entity.new(cached_config.bar, cached_config.name_label, cached_config.timer_label);
end
function this.draw(buff, buff_UI, position_on_screen, opacity_scale)
buff_UI_entity.draw(buff, buff_UI, position_on_screen, opacity_scale);
end
function this.init_module()
config = require("MHR_Overlay.Misc.config");
buff_UI_entity = require("MHR_Overlay.UI.UI_Entities.buff_UI_entity");
local buff = this.new("Enviroment Damage Negated");
buff.duration = 90;
buff.timer = 65;
buff.timer_percentage = 0.66;
buff.minutes_left = 1;
buff.seconds_left = 5
this.list["Enviroment Damage Negated"] = buff;
local buff = this.new("Sharpness Loss Reduced");
buff.duration = 120;
buff.timer = 70;
buff.timer_percentage = 0.583;
buff.minutes_left = 1;
buff.seconds_left = 10
this.list["Sharpness Loss Reduced"] = buff;
local buff = this.new("Sharpness Loss Reduced 2");
buff.duration = 120;
buff.timer = 70;
buff.timer_percentage = 0.583;
buff.minutes_left = 1;
buff.seconds_left = 10
buff.is_infinite = true;
this.list["Sharpness Loss Reduced 2"] = buff;
end
return this;

View File

@@ -1,12 +1,47 @@
local damage_hook = {}; local this = {};
local quest_status; local quest_status;
local players; local players;
local small_monster; local small_monster;
local large_monster; local large_monster;
local ailments; local ailments;
local table_helpers;
local singletons; local singletons;
local non_players; local non_players;
local utils;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
local wall_hit_damage_queue = {};
local enemy_character_base_type_def = sdk.find_type_definition("snow.enemy.EnemyCharacterBase"); local enemy_character_base_type_def = sdk.find_type_definition("snow.enemy.EnemyCharacterBase");
local enemy_character_base_after_calc_damage_damage_side_method = enemy_character_base_type_def:get_method("afterCalcDamage_DamageSide"); local enemy_character_base_after_calc_damage_damage_side_method = enemy_character_base_type_def:get_method("afterCalcDamage_DamageSide");
@@ -14,6 +49,8 @@ local enemy_character_base_after_calc_damage_damage_side_method = enemy_characte
local is_boss_enemy_method = enemy_character_base_type_def:get_method("get_isBossEnemy"); local is_boss_enemy_method = enemy_character_base_type_def:get_method("get_isBossEnemy");
local check_die_method = enemy_character_base_type_def:get_method("checkDie"); local check_die_method = enemy_character_base_type_def:get_method("checkDie");
local stock_direct_marionette_finish_shoot_hit_parts_damage_method = enemy_character_base_type_def:get_method("stockDirectMarionetteFinishShootHitPartsDamage");
local enemy_calc_damage_info_type_def = sdk.find_type_definition("snow.hit.EnemyCalcDamageInfo.AfterCalcInfo_DamageSide"); local enemy_calc_damage_info_type_def = sdk.find_type_definition("snow.hit.EnemyCalcDamageInfo.AfterCalcInfo_DamageSide");
local get_attacker_id_method = enemy_calc_damage_info_type_def:get_method("get_AttackerID"); local get_attacker_id_method = enemy_calc_damage_info_type_def:get_method("get_AttackerID");
local get_damage_attacker_type_method = enemy_calc_damage_info_type_def:get_method("get_DamageAttackerType"); local get_damage_attacker_type_method = enemy_calc_damage_info_type_def:get_method("get_DamageAttackerType");
@@ -42,11 +79,10 @@ local packet_quest_forfeit_type_def = sdk.find_type_definition("snow.QuestManage
local dead_player_id_field = packet_quest_forfeit_type_def:get_field("_DeadPlIndex"); local dead_player_id_field = packet_quest_forfeit_type_def:get_field("_DeadPlIndex");
local is_from_host_field = packet_quest_forfeit_type_def:get_field("_IsFromQuestHostPacket"); local is_from_host_field = packet_quest_forfeit_type_def:get_field("_IsFromQuestHostPacket");
function damage_hook.get_damage_source_type(damage_source_type_id, is_marionette_attack) function this.get_damage_source_type(damage_source_type_id, is_marionette_attack)
if is_marionette_attack then if is_marionette_attack then
return "wyvern riding"; return "wyvern riding";
elseif damage_source_type_id == 0 or damage_source_type_id == 7 or damage_source_type_id == 11 or elseif damage_source_type_id == 0 or damage_source_type_id == 7 or damage_source_type_id == 11 or damage_source_type_id == 13 then
damage_source_type_id == 13 then
return "player"; return "player";
elseif damage_source_type_id == 1 or damage_source_type_id == 8 then elseif damage_source_type_id == 1 or damage_source_type_id == 8 then
return "bomb"; return "bomb";
@@ -58,15 +94,13 @@ function damage_hook.get_damage_source_type(damage_source_type_id, is_marionette
return "otomo"; return "otomo";
elseif damage_source_type_id >= 25 and damage_source_type_id <= 32 then elseif damage_source_type_id >= 25 and damage_source_type_id <= 32 then
return "endemic life"; return "endemic life";
elseif damage_source_type_id == 34 then
return "other";
end end
return tostring(damage_source_type_id); return "other";
end end
-- snow.hit.EnemyCalcDamageInfo.AfterCalcInfo_DamageSide -- snow.hit.EnemyCalcDamageInfo.AfterCalcInfo_DamageSide
function damage_hook.update_damage(enemy, enemy_calc_damage_info) function this.update_damage(enemy, enemy_calc_damage_info)
local is_large_monster = is_boss_enemy_method:call(enemy); local is_large_monster = is_boss_enemy_method:call(enemy);
if is_large_monster == nil then if is_large_monster == nil then
@@ -94,7 +128,7 @@ function damage_hook.update_damage(enemy, enemy_calc_damage_info)
for enemy, monster in pairs(large_monster.list) do for enemy, monster in pairs(large_monster.list) do
if monster.unique_id == attacker_id then if monster.unique_id == attacker_id then
attacker_id = monster.rider_id; attacker_id = monster.rider_id;
break break;
end end
end end
end end
@@ -150,7 +184,7 @@ function damage_hook.update_damage(enemy, enemy_calc_damage_info)
-- 31 - EcSwampLeech -- 31 - EcSwampLeech
-- 32 - EcPenetrateFish -- 32 - EcPenetrateFish
local damage_source_type = damage_hook.get_damage_source_type(attacker_type, is_marionette_attack); local damage_source_type = this.get_damage_source_type(attacker_type, is_marionette_attack);
local monster; local monster;
if is_large_monster then if is_large_monster then
@@ -159,71 +193,46 @@ function damage_hook.update_damage(enemy, enemy_calc_damage_info)
monster = small_monster.get_monster(enemy); monster = small_monster.get_monster(enemy);
end end
local attacking_player = nil; local player = nil;
local attacking_otomo = nil; local otomo = nil;
if not is_otomo_attack then if not is_otomo_attack then
attacking_player = players.get_player(attacker_id); player = players.get_player(attacker_id);
if attacking_player == nil then if player == nil then
attacking_player = non_players.get_servant(attacker_id); player = non_players.get_servant(attacker_id);
end
local stun_damage = stun_damage_field:get_data(enemy_calc_damage_info);
if attacking_player ~= nil then
ailments.apply_ailment_buildup(monster, attacker_id, ailments.stun_id, stun_damage);
ailments.apply_ailment_buildup(monster, attacker_id, condition_type, condition_damage);
ailments.apply_ailment_buildup(monster, attacker_id, condition_type2, condition_damage2);
ailments.apply_ailment_buildup(monster, attacker_id, condition_type3, condition_damage3);
end end
else else
if attacker_id < 4 then if attacker_id < 4 then
attacking_player = players.get_player(attacker_id); player = players.get_player(attacker_id);
attacking_otomo = non_players.get_otomo(attacker_id); otomo = non_players.get_otomo(attacker_id);
elseif attacker_id == 4 then elseif attacker_id == 4 then
attacking_player = players.myself player = players.myself;
attacking_otomo = non_players.get_otomo(non_players.my_second_otomo_id); otomo = non_players.get_otomo(non_players.my_second_otomo_id);
else else
attacking_player = non_players.get_servant(attacker_id - 1); player = non_players.get_servant(attacker_id - 1);
attacking_otomo = non_players.get_otomo(attacker_id - 1); otomo = non_players.get_otomo(attacker_id - 1);
end end
players.update_damage(attacking_otomo, damage_source_type, is_large_monster, damage_object); players.update_damage(otomo, damage_source_type, is_large_monster, damage_object);
end end
local stun_damage = stun_damage_field:get_data(enemy_calc_damage_info);
ailments.apply_ailment_buildup(monster, player, otomo, ailments.stun_id, stun_damage);
ailments.apply_ailment_buildup(monster, player, otomo, condition_type, condition_damage);
ailments.apply_ailment_buildup(monster, player, otomo, condition_type2, condition_damage2);
ailments.apply_ailment_buildup(monster, player, otomo, condition_type3, condition_damage3);
players.update_damage(players.total, damage_source_type, is_large_monster, damage_object); players.update_damage(players.total, damage_source_type, is_large_monster, damage_object);
players.update_damage(attacking_player, damage_source_type, is_large_monster, damage_object); players.update_damage(player, damage_source_type, is_large_monster, damage_object);
--xy = xy .. "\nPlayer: " .. tostring(attacker_id) ..
--" " .. tostring(attacking_player.name) ..
--" Damage: " .. tostring(damage_object.total_damage) ..
--" Type: (" .. tostring(attacker_type);
--") " ..
--" Condition Damage: " .. tostring(condition_damage) ..
--" Condition Type: (" .. tostring(attacker_type) ..
--") " .. tostring(condition_type);
--if is_otomo_attack then
--xy = xy .. "\nOtomo Master: " .. tostring(attacking_player.id) ..
--" " .. tostring(attacking_player.name) ..
--" Damage: " .. tostring(damage_object.total_damage);
--xy = xy .. "\nOtomo: " .. tostring(attacking_otomo.id) ..
--" " .. tostring(attacking_otomo.name) ..
--" Damage: " .. tostring(damage_object.total_damage);
--end
--if string.len(xy) > 2700 then
-- xy = "";
--end
end end
--function damage_hook.on_mystery_core_break(enemy) --function damage_hook.on_mystery_core_break(enemy)
--end --end
function damage_hook.cart(dead_player_id, flag_cat_skill_insurance) function this.cart(dead_player_id, flag_cat_skill_insurance)
-- flag_cat_skill_insurance = 0 -- flag_cat_skill_insurance = 0
-- flag_cat_skill_insurance = 1 -- flag_cat_skill_insurance = 1
local player = players.list[dead_player_id]; local player = players.list[dead_player_id];
@@ -236,38 +245,101 @@ function damage_hook.cart(dead_player_id, flag_cat_skill_insurance)
quest_status.get_cart_count(); quest_status.get_cart_count();
end end
--function damage_hook.on_get_finish_shoot_wall_hit_damage_rate(enemy, rate, is_part_damage) function this.on_stock_direct_marionette_finish_shoot_hit_parts_damage(enemy, damage_rate, is_endure, is_ignore_multi_rate, category, no)
local monster = large_monster.get_monster(enemy);
--xy = string.format("enemy: %s\nrate: %s\nis_part_damage: %s", tostring(enemy), tostring(rate), tostring(is_part_damage)); local damage = utils.math.round(monster.max_health * damage_rate);
--end
large_monster.update_all_riders();
local attacker_id = monster.rider_id;
table.insert(wall_hit_damage_queue,
{
damage = damage,
is_large = monster.is_large
}
);
if attacker_id == -1 then
return;
end
local get_finish_shoot_wall_hit_damage_rate_method = enemy_character_base_type_def:get_method("stockFinishShootHitDamage"); local player = players.get_player(attacker_id);
if player == nil then
player = non_players.get_servant(attacker_id);
end
function damage_hook.init_module() if player == nil then
return;
end
local damage_source_type = this.get_damage_source_type(0, true);
local is_large_monster = monster.is_large;
local large_monster_damage_object = {};
large_monster_damage_object.total_damage = 0;
large_monster_damage_object.physical_damage = 0;
large_monster_damage_object.elemental_damage = 0;
large_monster_damage_object.ailment_damage = 0;
local small_monster_damage_object = {};
small_monster_damage_object.total_damage = 0;
small_monster_damage_object.physical_damage = 0;
small_monster_damage_object.elemental_damage = 0;
small_monster_damage_object.ailment_damage = 0;
for _, damage_info in ipairs(wall_hit_damage_queue) do
if damage_info.is_large then
large_monster_damage_object.total_damage = large_monster_damage_object.total_damage + damage_info.damage;
large_monster_damage_object.physical_damage = large_monster_damage_object.physical_damage + damage_info.damage;
else
small_monster_damage_object.total_damage = small_monster_damage_object.total_damage + damage_info.damage;
small_monster_damage_object.physical_damage = small_monster_damage_object.physical_damage + damage_info.damage;
end
end
wall_hit_damage_queue = {};
players.update_damage(players.total, damage_source_type, false, small_monster_damage_object);
players.update_damage(player, damage_source_type, false, small_monster_damage_object);
players.update_damage(players.total, damage_source_type, true, large_monster_damage_object);
players.update_damage(player, damage_source_type, true, large_monster_damage_object);
end
function this.init_module()
quest_status = require("MHR_Overlay.Game_Handler.quest_status"); quest_status = require("MHR_Overlay.Game_Handler.quest_status");
players = require("MHR_Overlay.Damage_Meter.players"); players = require("MHR_Overlay.Damage_Meter.players");
small_monster = require("MHR_Overlay.Monsters.small_monster"); small_monster = require("MHR_Overlay.Monsters.small_monster");
large_monster = require("MHR_Overlay.Monsters.large_monster"); large_monster = require("MHR_Overlay.Monsters.large_monster");
ailments = require("MHR_Overlay.Monsters.ailments"); ailments = require("MHR_Overlay.Monsters.ailments");
table_helpers = require("MHR_Overlay.Misc.table_helpers");
singletons = require("MHR_Overlay.Game_Handler.singletons"); singletons = require("MHR_Overlay.Game_Handler.singletons");
non_players = require("MHR_Overlay.Damage_Meter.non_players"); non_players = require("MHR_Overlay.Damage_Meter.non_players");
utils = require("MHR_Overlay.Misc.utils");
--sdk.hook(get_finish_shoot_wall_hit_damage_rate_method, function(args) sdk.hook(stock_direct_marionette_finish_shoot_hit_parts_damage_method, function(args)
-- pcall(damage_hook.on_get_finish_shoot_wall_hit_damage_rate, sdk.to_managed_object(args[2]), sdk.to_float(args[3]), sdk.to_int64(args--[4])); local enemy = sdk.to_managed_object(args[2]);
--end, function(retval) local damage_rate = sdk.to_float(args[3]);
-- return retval; local is_endure = (sdk.to_int64(args[4]) & 1) == 1;
--end); local is_ignore_multi_rate = (sdk.to_int64(args[5]) & 1) == 1;
local category = sdk.to_int64(args[6]); --snow.enemy.EnemyDef.VitalCategory
local no = sdk.to_int64(args[7]);
this.on_stock_direct_marionette_finish_shoot_hit_parts_damage(enemy, damage_rate, is_endure, is_ignore_multi_rate, category, no);
end, function(retval)
return retval;
end);
sdk.hook(enemy_character_base_after_calc_damage_damage_side_method, function(args) sdk.hook(enemy_character_base_after_calc_damage_damage_side_method, function(args)
pcall(damage_hook.update_damage, sdk.to_managed_object(args[2]), sdk.to_managed_object(args[3])); pcall(this.update_damage, sdk.to_managed_object(args[2]), sdk.to_managed_object(args[3]));
end, function(retval) end, function(retval)
return retval; return retval;
end); end);
sdk.hook(quest_forfeit_method, function(args) sdk.hook(quest_forfeit_method, function(args)
pcall(damage_hook.cart, sdk.to_int64(args[3]), (sdk.to_int64(args[4]) & 0xFFFFFFFF)); pcall(this.cart, sdk.to_int64(args[3]), (sdk.to_int64(args[4]) & 0xFFFFFFFF));
end, function(retval) end, function(retval)
return retval; return retval;
end); end);
@@ -279,4 +351,4 @@ function damage_hook.init_module()
--end); --end);
end end
return damage_hook; return this;

View File

@@ -1,6 +1,6 @@
local non_players = {}; local this = {};
local config; local config;
local table_helpers;
local singletons; local singletons;
local customization_menu; local customization_menu;
local damage_UI_entity; local damage_UI_entity;
@@ -8,15 +8,46 @@ local time;
local quest_status; local quest_status;
local drawing; local drawing;
local language; local language;
local unicode_helpers;
local players; local players;
non_players.servant_list = {}; local sdk = sdk;
non_players.otomo_list = {}; local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
non_players.my_second_otomo_id = -1; this.servant_list = {};
this.otomo_list = {};
function non_players.new(id, name, level, type) this.my_second_otomo_id = -1;
function this.new(id, name, level, type)
local non_player = {}; local non_player = {};
non_player.id = id; non_player.id = id;
non_player.name = name; non_player.name = name;
@@ -37,22 +68,22 @@ function non_players.new(id, name, level, type)
non_player.display.elemental_damage = 0; non_player.display.elemental_damage = 0;
non_player.display.ailment_damage = 0; non_player.display.ailment_damage = 0;
non_players.init_UI(non_player); this.init_UI(non_player);
return non_player; return non_player;
end end
function non_players.get_servant(servant_id) function this.get_servant(servant_id)
return non_players.servant_list[servant_id]; return this.servant_list[servant_id];
end end
function non_players.get_otomo(otomo_id) function this.get_otomo(otomo_id)
return non_players.otomo_list[otomo_id]; return this.otomo_list[otomo_id];
end end
function non_players.init() function this.init()
non_players.servant_list = {}; this.servant_list = {};
non_players.otomo_list = {}; this.otomo_list = {};
end end
local servant_manager_type_def = sdk.find_type_definition("snow.ai.ServantManager"); local servant_manager_type_def = sdk.find_type_definition("snow.ai.ServantManager");
@@ -97,7 +128,7 @@ local otomo_info_name_field = otomo_info_type_def:get_field("_Name");
local otomo_info_level_field = otomo_info_type_def:get_field("_Level"); local otomo_info_level_field = otomo_info_type_def:get_field("_Level");
local otomo_info_order_field = otomo_info_type_def:get_field("_Order"); local otomo_info_order_field = otomo_info_type_def:get_field("_Order");
function non_players.update_servant_list() function this.update_servant_list()
local cached_config = config.current_config.damage_meter_UI; local cached_config = config.current_config.damage_meter_UI;
if singletons.servant_manager == nil then if singletons.servant_manager == nil then
@@ -145,40 +176,40 @@ function non_players.update_servant_list()
goto continue; goto continue;
end end
if non_players.servant_list[id] == nil then if this.servant_list[id] == nil then
non_players.servant_list[id] = non_players.new(id, name, 0, players.types.servant); this.servant_list[id] = this.new(id, name, 0, players.types.servant);
end end
if not cached_config.settings.hide_servants then if not cached_config.settings.hide_servants then
table.insert(players.display_list, non_players.servant_list[id]); table.insert(players.display_list, this.servant_list[id]);
end end
::continue:: ::continue::
end end
end end
function non_players.update_otomo_list(is_on_quest, is_online) function this.update_otomo_list(is_on_quest, is_online)
if is_online then if is_online then
if is_on_quest then if is_on_quest then
--non_players.update_my_otomos(); --non_players.update_my_otomos();
non_players.update_otomos(quest_otomo_info_field); this.update_otomos(quest_otomo_info_field);
else else
non_players.update_otomos(otomo_info_field); this.update_otomos(otomo_info_field);
end end
else else
if is_on_quest then if is_on_quest then
non_players.update_my_otomos(); this.update_my_otomos();
non_players.update_servant_otomos(); this.update_servant_otomos();
else else
non_players.update_my_otomos(); this.update_my_otomos();
end end
end end
end end
function non_players.update_my_otomos() function this.update_my_otomos()
local cached_config = config.current_config.damage_meter_UI; local cached_config = config.current_config.damage_meter_UI;
local first_otomo = get_master_otomo_info_method:call(singletons.otomo_manager, 0); local first_otomo = get_master_otomo_info_method:call(singletons.otomo_manager, 0);
@@ -187,12 +218,13 @@ function non_players.update_my_otomos()
if name ~= nil and name ~= "" then if name ~= nil and name ~= "" then
local level = otomo_create_data_level_field:get_data(first_otomo) or 0; local level = otomo_create_data_level_field:get_data(first_otomo) or 0;
if non_players.otomo_list[0] == nil then local myself_id = players.myself.id;
non_players.otomo_list[0] = non_players.new(0, name, level, players.types.my_otomo); if this.otomo_list[myself_id] == nil then
this.otomo_list[myself_id] = this.new(0, name, level, players.types.my_otomo);
end end
if cached_config.settings.show_my_otomos_separately then if cached_config.settings.show_my_otomos_separately then
table.insert(players.display_list, non_players.otomo_list[0]); table.insert(players.display_list, this.otomo_list[myself_id]);
end end
end end
end end
@@ -204,18 +236,18 @@ function non_players.update_my_otomos()
local level = otomo_create_data_level_field:get_data(second_otomo) or 0; local level = otomo_create_data_level_field:get_data(second_otomo) or 0;
-- the secondary otomo is actually the 4th one! -- the secondary otomo is actually the 4th one!
if non_players.otomo_list[non_players.my_second_otomo_id] == nil then if this.otomo_list[this.my_second_otomo_id] == nil then
non_players.otomo_list[non_players.my_second_otomo_id] = non_players.new(non_players.my_second_otomo_id, name, level, players.types.my_otomo); this.otomo_list[this.my_second_otomo_id] = this.new(this.my_second_otomo_id, name, level, players.types.my_otomo);
end end
if cached_config.settings.show_my_otomos_separately then if cached_config.settings.show_my_otomos_separately then
table.insert(players.display_list, non_players.otomo_list[non_players.my_second_otomo_id]); table.insert(players.display_list, this.otomo_list[this.my_second_otomo_id]);
end end
end end
end end
end end
function non_players.update_servant_otomos() function this.update_servant_otomos()
local cached_config = config.current_config.damage_meter_UI; local cached_config = config.current_config.damage_meter_UI;
local servant_otomo_list = get_servant_otomo_list_method:call(singletons.otomo_manager); local servant_otomo_list = get_servant_otomo_list_method:call(singletons.otomo_manager);
@@ -246,14 +278,12 @@ function non_players.update_servant_otomos()
goto continue; goto continue;
end end
--name = unicode_helpers.sub(name, 13); if this.otomo_list[member_id] == nil then
this.otomo_list[member_id] = this.new(member_id, name, level, players.types.servant_otomo);
if non_players.otomo_list[member_id] == nil then
non_players.otomo_list[member_id] = non_players.new(member_id, name, level, players.types.servant_otomo);
end end
if cached_config.settings.show_servant_otomos_separately then if cached_config.settings.show_servant_otomos_separately then
table.insert(players.display_list, non_players.otomo_list[member_id]); table.insert(players.display_list, this.otomo_list[member_id]);
end end
end end
@@ -262,7 +292,7 @@ function non_players.update_servant_otomos()
end end
function non_players.update_otomos(otomo_info_field_) function this.update_otomos(otomo_info_field_)
local cached_config = config.current_config.damage_meter_UI; local cached_config = config.current_config.damage_meter_UI;
if singletons.lobby_manager == nil then if singletons.lobby_manager == nil then
@@ -295,22 +325,22 @@ function non_players.update_otomos(otomo_info_field_)
local level = otomo_info_level_field:get_data(otomo_info) or 0; local level = otomo_info_level_field:get_data(otomo_info) or 0;
local otomo = non_players.otomo_list[id]; local otomo = this.otomo_list[id];
if otomo == nil or (otomo.name ~= name and level ~= otomo.level) or if otomo == nil or (otomo.name ~= name and level ~= otomo.level) or
(otomo.type == players.types.my_otomo and otomo.id ~= players.myself.id) or (otomo.type == players.types.my_otomo and otomo.id ~= players.myself.id) or
(otomo.type ~= players.types.my_otomo and otomo.id == players.myself.id) then (otomo.type ~= players.types.my_otomo and otomo.id == players.myself.id) then
if id == players.myself.id then if id == players.myself.id then
otomo = non_players.new(id, name, level, players.types.my_otomo); otomo = this.new(id, name, level, players.types.my_otomo);
non_players.otomo_list[id] = otomo; this.otomo_list[id] = otomo;
elseif id >= 4 then elseif id >= 4 then
otomo = non_players.new(id, name, level, players.types.servant_otomo); otomo = this.new(id, name, level, players.types.servant_otomo);
non_players.otomo_list[id] = otomo; this.otomo_list[id] = otomo;
else else
otomo = non_players.new(id, name, level, players.types.other_player_otomo); otomo = this.new(id, name, level, players.types.other_player_otomo);
non_players.otomo_list[id] = otomo; this.otomo_list[id] = otomo;
end end
end end
@@ -333,7 +363,7 @@ function non_players.update_otomos(otomo_info_field_)
end end
end end
function non_players.init_UI(non_player) function this.init_UI(non_player)
local cached_config = config.current_config.damage_meter_UI; local cached_config = config.current_config.damage_meter_UI;
if non_player.type == players.types.servant then if non_player.type == players.types.servant then
@@ -347,9 +377,8 @@ function non_players.init_UI(non_player)
end end
end end
function non_players.init_module() function this.init_module()
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
table_helpers = require("MHR_Overlay.Misc.table_helpers");
singletons = require("MHR_Overlay.Game_Handler.singletons"); singletons = require("MHR_Overlay.Game_Handler.singletons");
customization_menu = require("MHR_Overlay.UI.customization_menu"); customization_menu = require("MHR_Overlay.UI.customization_menu");
damage_UI_entity = require("MHR_Overlay.UI.UI_Entities.damage_UI_entity"); damage_UI_entity = require("MHR_Overlay.UI.UI_Entities.damage_UI_entity");
@@ -358,9 +387,8 @@ function non_players.init_module()
drawing = require("MHR_Overlay.UI.drawing"); drawing = require("MHR_Overlay.UI.drawing");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
players = require("MHR_Overlay.Damage_Meter.players"); players = require("MHR_Overlay.Damage_Meter.players");
unicode_helpers = require("MHR_Overlay.Misc.unicode_helpers");
non_players.init(); this.init();
end end
return non_players; return this;

View File

@@ -1,6 +1,6 @@
local players = {}; local this = {};
local config; local config;
local table_helpers;
local singletons; local singletons;
local customization_menu; local customization_menu;
local damage_UI_entity; local damage_UI_entity;
@@ -10,16 +10,48 @@ local drawing;
local language; local language;
local non_players; local non_players;
players.list = {}; local sdk = sdk;
players.myself = nil; local tostring = tostring;
players.myself_position = Vector3f.new(0, 0, 0); local pairs = pairs;
players.total = nil; local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
players.display_list = {}; this.list = {};
this.myself = nil;
this.myself_position = Vector3f.new(0, 0, 0);
this.total = nil;
players.highlighted_damage_UI = nil; this.display_list = {};
players.types = { this.highlighted_damage_UI = nil;
this.types = {
["myself"] = 0, ["myself"] = 0,
["other_player"] = 1, ["other_player"] = 1,
["servant"] = 2, ["servant"] = 2,
@@ -31,7 +63,7 @@ players.types = {
} }
function players.new(id, name, master_rank, hunter_rank, type) function this.new(id, name, master_rank, hunter_rank, type)
local player = {}; local player = {};
player.id = id; player.id = id;
player.name = name; player.name = name;
@@ -46,8 +78,8 @@ function players.new(id, name, master_rank, hunter_rank, type)
player.first_hit_time = -1; player.first_hit_time = -1;
player.dps = 0; player.dps = 0;
player.small_monsters = players.init_damage_sources() player.small_monsters = this.init_damage_sources()
player.large_monsters = players.init_damage_sources(); player.large_monsters = this.init_damage_sources();
player.display = {}; player.display = {};
player.display.total_damage = 0; player.display.total_damage = 0;
@@ -55,12 +87,16 @@ function players.new(id, name, master_rank, hunter_rank, type)
player.display.elemental_damage = 0; player.display.elemental_damage = 0;
player.display.ailment_damage = 0; player.display.ailment_damage = 0;
players.init_UI(player); this.init_UI(player);
if this.highlighted_damage_UI == nil then
this.init_highlighted_UI();
end
return player; return player;
end end
function players.init_damage_sources() function this.init_damage_sources()
local monster_type = {}; local monster_type = {};
monster_type.total_damage = 0; monster_type.total_damage = 0;
@@ -138,11 +174,15 @@ function players.init_damage_sources()
return monster_type; return monster_type;
end end
function players.get_player(player_id) function this.get_player(player_id)
return players.list[player_id]; if player_id == non_players.my_second_otomo_id then
return this.myself;
end
return this.list[player_id];
end end
function players.update_damage(player, damage_source_type, is_large_monster, damage_object) function this.update_damage(player, damage_source_type, is_large_monster, damage_object)
if player == nil then if player == nil then
return; return;
end end
@@ -157,190 +197,206 @@ function players.update_damage(player, damage_source_type, is_large_monster, dam
end end
if damage_source_type == "player" then if damage_source_type == "player" then
players.merge_damage(player_monster_type, damage_object); this.merge_damage(player_monster_type, damage_object);
elseif damage_source_type == "bomb" then elseif damage_source_type == "bomb" then
players.merge_damage(player_monster_type.bombs, damage_object); this.merge_damage(player_monster_type.bombs, damage_object);
elseif damage_source_type == "kunai" then elseif damage_source_type == "kunai" then
players.merge_damage(player_monster_type.kunai, damage_object); this.merge_damage(player_monster_type.kunai, damage_object);
elseif damage_source_type == "installation" then elseif damage_source_type == "installation" then
players.merge_damage(player_monster_type.installations, damage_object); this.merge_damage(player_monster_type.installations, damage_object);
elseif damage_source_type == "otomo" then elseif damage_source_type == "otomo" then
players.merge_damage(player_monster_type.otomo, damage_object); this.merge_damage(player_monster_type.otomo, damage_object);
elseif damage_source_type == "wyvern riding" then elseif damage_source_type == "wyvern riding" then
players.merge_damage(player_monster_type.wyvern_riding, damage_object); this.merge_damage(player_monster_type.wyvern_riding, damage_object);
elseif damage_source_type == "poison" then elseif damage_source_type == "poison" then
players.merge_damage(player_monster_type.poison, damage_object); this.merge_damage(player_monster_type.poison, damage_object);
elseif damage_source_type == "blast" then elseif damage_source_type == "blast" then
players.merge_damage(player_monster_type.blast, damage_object); this.merge_damage(player_monster_type.blast, damage_object);
elseif damage_source_type == "otomo poison" then
this.merge_damage(player_monster_type.otomo_poison, damage_object);
elseif damage_source_type == "otomo blast" then
this.merge_damage(player_monster_type.otomo_blast, damage_object);
elseif damage_source_type == "endemic life" then elseif damage_source_type == "endemic life" then
players.merge_damage(player_monster_type.endemic_life, damage_object); this.merge_damage(player_monster_type.endemic_life, damage_object);
elseif damage_source_type == "other" then elseif damage_source_type == "other" then
players.merge_damage(player_monster_type.other, damage_object); this.merge_damage(player_monster_type.other, damage_object);
else else
players.merge_damage(player_monster_type, damage_object); this.merge_damage(player_monster_type, damage_object);
end end
players.update_display(player); this.update_display(player);
end end
function players.update_display(player) function this.update_display(player)
if player == nil then if player == nil then
return; return;
end end
local cached_config = config.current_config.damage_meter_UI;
player.display.total_damage = 0; player.display.total_damage = 0;
player.display.physical_damage = 0; player.display.physical_damage = 0;
player.display.elemental_damage = 0; player.display.elemental_damage = 0;
player.display.ailment_damage = 0; player.display.ailment_damage = 0;
local cached_config = config.current_config.damage_meter_UI; local monster_types = {};
if cached_config.tracked_monster_types.small_monsters then if cached_config.tracked_monster_types.small_monsters then
if cached_config.tracked_damage_types.player_damage then table.insert(monster_types, player.small_monsters);
players.merge_damage(player.display, player.small_monsters);
end
if cached_config.tracked_damage_types.bomb_damage then
players.merge_damage(player.display, player.small_monsters.bombs);
end
if cached_config.tracked_damage_types.kunai_damage then
players.merge_damage(player.display, player.small_monsters.kunai);
end
if cached_config.tracked_damage_types.installation_damage then
players.merge_damage(player.display, player.small_monsters.installations);
end
if cached_config.tracked_damage_types.otomo_damage then
if player.type == players.types.myself then
if not cached_config.settings.show_my_otomos_separately then
players.merge_damage(player.display, player.small_monsters.otomo);
end
elseif player.type == players.types.other_players then
if not cached_config.settings.show_other_player_otomos_separately then
players.merge_damage(player.display, player.small_monsters.otomo);
end
elseif player.type == players.types.servants then
if not cached_config.settings.show_servant_otomos_separately then
players.merge_damage(player.display, player.small_monsters.otomo);
end
elseif player.type == players.types.my_otomo then
if cached_config.settings.show_my_otomos_separately then
players.merge_damage(player.display, player.small_monsters.otomo);
end
elseif player.type == players.types.other_player_otomo then
if cached_config.settings.show_other_player_otomos_separately then
players.merge_damage(player.display, player.small_monsters.otomo);
end
elseif player.type == players.types.servant_otomo then
if cached_config.settings.show_servant_otomos_separately then
players.merge_damage(player.display, player.small_monsters.otomo);
end
end
end
if cached_config.tracked_damage_types.wyvern_riding_damage then
players.merge_damage(player.display, player.small_monsters.wyvern_riding);
end
if cached_config.tracked_damage_types.poison_damage then
players.merge_damage(player.display, player.small_monsters.poison);
end
if cached_config.tracked_damage_types.blast_damage then
players.merge_damage(player.display, player.small_monsters.blast);
end
if cached_config.tracked_damage_types.endemic_life_damage then
players.merge_damage(player.display, player.small_monsters.endemic_life);
end
if cached_config.tracked_damage_types.other_damage then
players.merge_damage(player.display, player.small_monsters.other);
end
end end
if cached_config.tracked_monster_types.large_monsters then if cached_config.tracked_monster_types.large_monsters then
table.insert(monster_types, player.large_monsters);
end
for _, monster_type in ipairs(monster_types) do
if cached_config.tracked_damage_types.player_damage then if cached_config.tracked_damage_types.player_damage then
players.merge_damage(player.display, player.large_monsters); this.merge_damage(player.display, monster_type);
end end
if cached_config.tracked_damage_types.bomb_damage then if cached_config.tracked_damage_types.bomb_damage then
players.merge_damage(player.display, player.large_monsters.bombs); this.merge_damage(player.display, monster_type.bombs);
end end
if cached_config.tracked_damage_types.kunai_damage then if cached_config.tracked_damage_types.kunai_damage then
players.merge_damage(player.display, player.large_monsters.kunai); this.merge_damage(player.display, monster_type.kunai);
end end
if cached_config.tracked_damage_types.installation_damage then if cached_config.tracked_damage_types.installation_damage then
players.merge_damage(player.display, player.large_monsters.installations); this.merge_damage(player.display, monster_type.installations);
end end
if cached_config.tracked_damage_types.otomo_damage then if cached_config.tracked_damage_types.otomo_damage then
if player.type == players.types.myself then if player.type == this.types.myself then
if not cached_config.settings.show_my_otomos_separately then if not cached_config.settings.show_my_otomos_separately then
players.merge_damage(player.display, player.large_monsters.otomo); this.merge_damage(player.display, monster_type.otomo);
end end
elseif player.type == players.types.other_players then elseif player.type == this.types.other_player then
if not cached_config.settings.show_other_player_otomos_separately then if not cached_config.settings.show_other_player_otomos_separately then
players.merge_damage(player.display, player.large_monsters.otomo); this.merge_damage(player.display, monster_type.otomo);
end end
elseif player.type == players.types.servants then elseif player.type == this.types.servant then
if not cached_config.settings.show_servant_otomos_separately then if not cached_config.settings.show_servant_otomos_separately then
players.merge_damage(player.display, player.large_monsters.otomo); this.merge_damage(player.display, monster_type.otomo);
end end
elseif player.type == players.types.my_otomo then elseif player.type == this.types.my_otomo then
if cached_config.settings.show_my_otomos_separately then if cached_config.settings.show_my_otomos_separately then
players.merge_damage(player.display, player.large_monsters.otomo); this.merge_damage(player.display, monster_type.otomo);
end end
elseif player.type == players.types.other_player_otomo then elseif player.type == this.types.other_player_otomo then
if cached_config.settings.show_other_player_otomos_separately then if cached_config.settings.show_other_player_otomos_separately then
players.merge_damage(player.display, player.large_monsters.otomo); this.merge_damage(player.display, monster_type.otomo);
end end
elseif player.type == players.types.servant_otomo then elseif player.type == this.types.servant_otomo then
if cached_config.settings.show_servant_otomos_separately then if cached_config.settings.show_servant_otomos_separately then
players.merge_damage(player.display, player.large_monsters.otomo); this.merge_damage(player.display, monster_type.otomo);
end end
elseif player.type == this.types.total then
this.merge_damage(player.display, monster_type.otomo);
end end
end end
if cached_config.tracked_damage_types.wyvern_riding_damage then if cached_config.tracked_damage_types.wyvern_riding_damage then
players.merge_damage(player.display, player.large_monsters.wyvern_riding); this.merge_damage(player.display, monster_type.wyvern_riding);
end end
if cached_config.tracked_damage_types.poison_damage then if cached_config.tracked_damage_types.poison_damage then
players.merge_damage(player.display, player.large_monsters.poison); this.merge_damage(player.display, monster_type.poison);
if player.type == this.types.myself then
if not cached_config.settings.show_my_otomos_separately then
this.merge_damage(player.display, monster_type.otomo_poison);
end
elseif player.type == this.types.other_player then
if not cached_config.settings.show_other_player_otomos_separately then
this.merge_damage(player.display, monster_type.otomo_poison);
end
elseif player.type == this.types.servant then
if not cached_config.settings.show_servant_otomos_separately then
this.merge_damage(player.display, monster_type.otomo_poison);
end
elseif player.type == this.types.my_otomo then
if cached_config.settings.show_my_otomos_separately then
this.merge_damage(player.display, monster_type.otomo_poison);
end
elseif player.type == this.types.other_player_otomo then
if cached_config.settings.show_other_player_otomos_separately then
this.merge_damage(player.display, monster_type.otomo_poison);
end
elseif player.type == this.types.servant_otomo then
if cached_config.settings.show_servant_otomos_separately then
this.merge_damage(player.display, monster_type.otomo_poison);
end
elseif player.type == this.types.total then
this.merge_damage(player.display, monster_type.otomo_poison);
end
end end
if cached_config.tracked_damage_types.blast_damage then if cached_config.tracked_damage_types.blast_damage then
players.merge_damage(player.display, player.large_monsters.blast); this.merge_damage(player.display, monster_type.blast);
if player.type == this.types.myself then
if not cached_config.settings.show_my_otomos_separately then
this.merge_damage(player.display, monster_type.otomo_blast);
end
elseif player.type == this.types.other_player then
if not cached_config.settings.show_other_player_otomos_separately then
this.merge_damage(player.display, monster_type.otomo_blast);
end
elseif player.type == this.types.servant then
if not cached_config.settings.show_servant_otomos_separately then
this.merge_damage(player.display, monster_type.otomo_blast);
end
elseif player.type == this.types.my_otomo then
if cached_config.settings.show_my_otomos_separately then
this.merge_damage(player.display, monster_type.otomo_blast);
end
elseif player.type == this.types.other_player_otomo then
if cached_config.settings.show_other_player_otomos_separately then
this.merge_damage(player.display, monster_type.otomo_blast);
end
elseif player.type == this.types.servant_otomo then
if cached_config.settings.show_servant_otomos_separately then
this.merge_damage(player.display, monster_type.otomo_blast);
end
elseif player.type == this.types.total then
this.merge_damage(player.display, monster_type.otomo_blast);
end
end end
if cached_config.tracked_damage_types.endemic_life_damage then if cached_config.tracked_damage_types.endemic_life_damage then
players.merge_damage(player.display, player.large_monsters.endemic_life); this.merge_damage(player.display, monster_type.endemic_life);
end end
if cached_config.tracked_damage_types.other_damage then if cached_config.tracked_damage_types.other_damage then
players.merge_damage(player.display, player.large_monsters.other); this.merge_damage(player.display, monster_type.other);
end end
end end
end end
function players.merge_damage(first, second) function this.merge_damage(first, second)
first.total_damage = first.total_damage + second.total_damage; first.total_damage = first.total_damage + second.total_damage;
first.physical_damage = first.physical_damage + second.physical_damage; first.physical_damage = first.physical_damage + second.physical_damage;
first.elemental_damage = first.elemental_damage + second.elemental_damage; first.elemental_damage = first.elemental_damage + second.elemental_damage;
@@ -349,28 +405,28 @@ function players.merge_damage(first, second)
return first; return first;
end end
function players.update_dps(bypass_freeze) function this.update_dps(bypass_freeze)
local cached_config = config.current_config.damage_meter_UI.settings; local cached_config = config.current_config.damage_meter_UI.settings;
if cached_config.freeze_dps_on_quest_end and quest_status.flow_state >= quest_status.flow_states.KILLCAM and not bypass_freeze then if cached_config.freeze_dps_on_quest_end and quest_status.flow_state >= quest_status.flow_states.KILLCAM and not bypass_freeze then
return; return;
end end
players.total.dps = 0; this.total.dps = 0;
for _, player in pairs(players.list) do for _, player in pairs(this.list) do
players.update_player_dps(player); this.update_player_dps(player);
end end
for _, servant in pairs(non_players.servant_list) do for _, servant in pairs(non_players.servant_list) do
players.update_player_dps(servant); this.update_player_dps(servant);
end end
for _, otomo in pairs(non_players.otomo_list) do for _, otomo in pairs(non_players.otomo_list) do
players.update_player_dps(otomo); this.update_player_dps(otomo);
end end
end end
function players.update_player_dps(player) function this.update_player_dps(player)
local cached_config = config.current_config.damage_meter_UI.settings; local cached_config = config.current_config.damage_meter_UI.settings;
if player.join_time == -1 then if player.join_time == -1 then
@@ -391,54 +447,54 @@ function players.update_player_dps(player)
end end
end end
players.total.dps = players.total.dps + player.dps; this.total.dps = this.total.dps + player.dps;
end end
function players.sort_players() function this.sort_players()
local cached_config = config.current_config.damage_meter_UI; local cached_config = config.current_config.damage_meter_UI;
if cached_config.settings.my_damage_bar_location == "Normal" then if cached_config.settings.my_damage_bar_location == "Normal" then
table.insert(players.display_list, players.myself); table.insert(this.display_list, this.myself);
end end
-- sort here -- sort here
if cached_config.sorting.type == "Normal" then if cached_config.sorting.type == "Normal" then
if cached_config.sorting.reversed_order then if cached_config.sorting.reversed_order then
table.sort(players.display_list, function(left, right) table.sort(this.display_list, function(left, right)
return left.id > right.id; return left.id > right.id;
end); end);
else else
table.sort(players.display_list, function(left, right) table.sort(this.display_list, function(left, right)
return left.id < right.id; return left.id < right.id;
end); end);
end end
elseif cached_config.sorting.type == "DPS" then elseif cached_config.sorting.type == "DPS" then
if cached_config.sorting.reversed_order then if cached_config.sorting.reversed_order then
table.sort(players.display_list, function(left, right) table.sort(this.display_list, function(left, right)
return left.dps < right.dps; return left.dps < right.dps;
end); end);
else else
table.sort(players.display_list, function(left, right) table.sort(this.display_list, function(left, right)
return left.dps > right.dps; return left.dps > right.dps;
end); end);
end end
else else
if cached_config.sorting.reversed_order then if cached_config.sorting.reversed_order then
table.sort(players.display_list, function(left, right) table.sort(this.display_list, function(left, right)
return left.display.total_damage < right.display.total_damage; return left.display.total_damage < right.display.total_damage;
end); end);
else else
table.sort(players.display_list, function(left, right) table.sort(this.display_list, function(left, right)
return left.display.total_damage > right.display.total_damage; return left.display.total_damage > right.display.total_damage;
end); end);
end end
end end
if cached_config.settings.my_damage_bar_location == "First" then if cached_config.settings.my_damage_bar_location == "First" then
table.insert(players.display_list, 1, players.myself); table.insert(this.display_list, 1, this.myself);
elseif cached_config.settings.my_damage_bar_location == "Last" then elseif cached_config.settings.my_damage_bar_location == "Last" then
table.insert(players.display_list, players.myself); table.insert(this.display_list, this.myself);
end end
end end
@@ -448,7 +504,7 @@ local find_master_player_method = player_manager_type_def:get_method("findMaster
local player_base_type_def = sdk.find_type_definition("snow.player.PlayerBase"); local player_base_type_def = sdk.find_type_definition("snow.player.PlayerBase");
local get_pos_field = player_base_type_def:get_method("get_Pos"); local get_pos_field = player_base_type_def:get_method("get_Pos");
function players.update_myself_position() function this.update_myself_position()
if singletons.player_manager == nil then if singletons.player_manager == nil then
customization_menu.status = "No player manager"; customization_menu.status = "No player manager";
return; return;
@@ -462,15 +518,15 @@ function players.update_myself_position()
local position = get_pos_field:call(master_player); local position = get_pos_field:call(master_player);
if position ~= nil then if position ~= nil then
players.myself_position = position; this.myself_position = position;
end end
end end
function players.init() function this.init()
players.list = {}; this.list = {};
players.display_list = {}; this.display_list = {};
players.total = players.new(0, "Total", 0, 0, players.types.total); this.total = this.new(0, "Total", 0, 0, this.types.total);
players.myself = players.new(-1, "Dummy", -1, -1, players.types.myself); this.myself = this.new(-1, "DummyMHROverlay", -1, -1, this.types.myself);
end end
local lobby_manager_type_def = sdk.find_type_definition("snow.LobbyManager"); local lobby_manager_type_def = sdk.find_type_definition("snow.LobbyManager");
@@ -500,15 +556,15 @@ local get_master_rank_method = progress_manager_type_def:get_method("get_MasterR
local get_master_player_id_method = player_manager_type_def:get_method("getMasterPlayerID"); local get_master_player_id_method = player_manager_type_def:get_method("getMasterPlayerID");
function players.update_player_list(is_on_quest) function this.update_player_list(is_on_quest)
if is_on_quest then if is_on_quest then
players.update_player_list_(quest_hunter_info_field); this.update_player_list_(quest_hunter_info_field);
else else
players.update_player_list_(hunter_info_field); this.update_player_list_(hunter_info_field);
end end
end end
function players.update_player_list_(hunter_info_field_) function this.update_player_list_(hunter_info_field_)
local cached_config = config.current_config.damage_meter_UI; local cached_config = config.current_config.damage_meter_UI;
if singletons.lobby_manager == nil then if singletons.lobby_manager == nil then
@@ -542,10 +598,10 @@ function players.update_player_list_(hunter_info_field_)
return; return;
end end
if players.myself == nil or myself_id ~= players.myself.id then if this.myself == nil or myself_id ~= this.myself.id then
players.list[players.myself.id] = nil; this.list[this.myself.id] = nil;
players.myself = players.new(myself_id, myself_player_name, myself_master_rank, myself_hunter_rank, players.types.myself); this.myself = this.new(myself_id, myself_player_name, myself_master_rank, myself_hunter_rank, this.types.myself);
players.list[myself_id] = players.myself; this.list[myself_id] = this.myself;
end end
-- other players -- other players
@@ -562,8 +618,6 @@ function players.update_player_list_(hunter_info_field_)
end end
for i = 0, count - 1 do for i = 0, count - 1 do
local player_info = get_item_method:call(player_info_list, i); local player_info = get_item_method:call(player_info_list, i);
if player_info == nil then if player_info == nil then
goto continue goto continue
@@ -583,54 +637,63 @@ function players.update_player_list_(hunter_info_field_)
goto continue goto continue
end end
local player = players.list[id]; local player = this.list[id];
if player == nil or (player.name ~= name and player.hunter_rank ~= hunter_rank and player.master_rank ~= master_rank) then if player == nil then
if player ~= nil then
if player.name == players.myself.name then if name == this.myself.name then
player = players.new(id, name, master_rank, hunter_rank, players.types.myself); player = this.new(id, name, master_rank, hunter_rank, this.types.myself);
players.myself = player; this.myself = player;
players.list[id] = player; this.list[id] = player;
end
else else
player = players.new(id, name, master_rank, hunter_rank, players.types.other_player); player = this.new(id, name, master_rank, hunter_rank, this.types.other_player);
players.list[id] = player; this.list[id] = player;
end
elseif player.name ~= name or player.hunter_rank ~= hunter_rank or player.master_rank ~= master_rank then
if name == this.myself.name then
player = this.new(id, name, master_rank, hunter_rank, this.types.myself);
this.myself = player;
this.list[id] = player;
else
player = this.new(id, name, master_rank, hunter_rank, this.types.other_player);
this.list[id] = player;
end end
end end
if player ~= players.myself then if player ~= this.myself then
table.insert(players.display_list, player); table.insert(this.display_list, player);
end end
::continue:: ::continue::
end end
end end
function players.init_UI(player) function this.init_UI(player)
local cached_config = config.current_config.damage_meter_UI; local cached_config = config.current_config.damage_meter_UI;
if player.type == players.types.myself then if player.type == this.types.myself then
player.damage_UI = damage_UI_entity.new(cached_config.myself, player.type); player.damage_UI = damage_UI_entity.new(cached_config.myself, player.type);
elseif player.type == players.types.other_player then elseif player.type == this.types.other_player then
player.damage_UI = damage_UI_entity.new(cached_config.other_players, player.type); player.damage_UI = damage_UI_entity.new(cached_config.other_players, player.type);
elseif player.type == players.types.total then elseif player.type == this.types.total then
player.damage_UI = damage_UI_entity.new(cached_config.total, player.type); player.damage_UI = damage_UI_entity.new(cached_config.total, player.type);
end end
end end
function players.init_highlighted_UI() function this.init_highlighted_UI()
local cached_config = config.current_config.damage_meter_UI; local cached_config = config.current_config.damage_meter_UI;
players.highlighted_damage_UI = damage_UI_entity.new(cached_config.highlighted, players.types.highlight); this.highlighted_damage_UI = damage_UI_entity.new(cached_config.highlighted, this.types.highlight);
end end
function players.draw(player, position_on_screen, opacity_scale, top_damage, top_dps) function this.draw(player, position_on_screen, opacity_scale, top_damage, top_dps)
damage_UI_entity.draw(player, position_on_screen, opacity_scale, top_damage, top_dps); damage_UI_entity.draw(player, position_on_screen, opacity_scale, top_damage, top_dps);
end end
function players.init_module() function this.init_module()
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
table_helpers = require("MHR_Overlay.Misc.table_helpers");
singletons = require("MHR_Overlay.Game_Handler.singletons"); singletons = require("MHR_Overlay.Game_Handler.singletons");
customization_menu = require("MHR_Overlay.UI.customization_menu"); customization_menu = require("MHR_Overlay.UI.customization_menu");
damage_UI_entity = require("MHR_Overlay.UI.UI_Entities.damage_UI_entity"); damage_UI_entity = require("MHR_Overlay.UI.UI_Entities.damage_UI_entity");
@@ -640,7 +703,7 @@ function players.init_module()
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
non_players = require("MHR_Overlay.Damage_Meter.non_players"); non_players = require("MHR_Overlay.Damage_Meter.non_players");
players.init(); this.init();
end end
return players; return this;

View File

@@ -1,13 +1,46 @@
local env_creature = {}; local this = {};
local drawing; local drawing;
local customization_menu; local customization_menu;
local singletons; local singletons;
local config; local config;
local table_helpers; local utils;
env_creature.list = {}; local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function env_creature.new(REcreature) this.list = {};
function this.new(REcreature)
local creature = {}; local creature = {};
creature.life = 0; creature.life = 0;
@@ -17,22 +50,22 @@ function env_creature.new(REcreature)
creature.position = Vector3f.new(0, 0, 0); creature.position = Vector3f.new(0, 0, 0);
creature.distance = 0; creature.distance = 0;
env_creature.init(creature, REcreature); this.init(creature, REcreature);
env_creature.init_UI(creature); this.init_UI(creature);
if env_creature.list[REcreature] == nil then if this.list[REcreature] == nil then
env_creature.list[REcreature] = creature; this.list[REcreature] = creature;
end end
return creature; return creature;
end end
function env_creature.get_creature(REcreature) function this.get_creature(REcreature)
if env_creature.list[REcreature] == nil then if this.list[REcreature] == nil then
env_creature.list[REcreature] = env_creature.new(REcreature); this.list[REcreature] = this.new(REcreature);
end end
return env_creature.list[REcreature]; return this.list[REcreature];
end end
local environment_creature_base_type_def = sdk.find_type_definition("snow.envCreature.EnvironmentCreatureBase"); local environment_creature_base_type_def = sdk.find_type_definition("snow.envCreature.EnvironmentCreatureBase");
@@ -44,7 +77,7 @@ local get_env_creature_name_message_method = message_manager_type_def:get_method
local get_pos_method = environment_creature_base_type_def:get_method("get_Pos"); local get_pos_method = environment_creature_base_type_def:get_method("get_Pos");
function env_creature.init(creature, REcreature) function this.init(creature, REcreature)
local creature_type = creature_type_field:get_data(REcreature); local creature_type = creature_type_field:get_data(REcreature);
if creature_type == nil then if creature_type == nil then
customization_menu.status = "No env creature type"; customization_menu.status = "No env creature type";
@@ -58,8 +91,8 @@ function env_creature.init(creature, REcreature)
end end
end end
function env_creature.init_UI(creature) function this.init_UI(creature)
creature.name_label = table_helpers.deep_copy(config.current_config.endemic_life_UI.creature_name_label); creature.name_label = utils.table.deep_copy(config.current_config.endemic_life_UI.creature_name_label);
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
@@ -67,13 +100,13 @@ function env_creature.init_UI(creature)
creature.name_label.offset.y = creature.name_label.offset.y * global_scale_modifier; creature.name_label.offset.y = creature.name_label.offset.y * global_scale_modifier;
end end
function env_creature.update_position(REcreature, creature) function this.update_position(REcreature, creature)
if not config.current_config.endemic_life_UI.enabled then if not config.current_config.endemic_life_UI.enabled then
return; return;
end end
if creature == nil then if creature == nil then
creature = env_creature.get_creature(REcreature); creature = this.get_creature(REcreature);
end end
local position = get_pos_method:call(REcreature); local position = get_pos_method:call(REcreature);
@@ -82,13 +115,13 @@ function env_creature.update_position(REcreature, creature)
end end
end end
function env_creature.update(REcreature, creature) function this.update(REcreature, creature)
if not config.current_config.endemic_life_UI.enabled then if not config.current_config.endemic_life_UI.enabled then
return; return;
end end
if creature == nil then if creature == nil then
creature = env_creature.get_creature(REcreature); creature = this.get_creature(REcreature);
end end
local is_inactive = creature_is_inactive_field:get_data(REcreature); local is_inactive = creature_is_inactive_field:get_data(REcreature);
@@ -97,7 +130,7 @@ function env_creature.update(REcreature, creature)
end end
end end
function env_creature.draw(creature, position_on_screen, opacity_scale) function this.draw(creature, position_on_screen, opacity_scale)
if d2d ~= nil and config.current_config.global_settings.renderer.use_d2d_if_available then if d2d ~= nil and config.current_config.global_settings.renderer.use_d2d_if_available then
local text_width, text_height = drawing.font:measure(creature.name); local text_width, text_height = drawing.font:measure(creature.name);
position_on_screen.x = position_on_screen.x - text_width / 2; position_on_screen.x = position_on_screen.x - text_width / 2;
@@ -106,15 +139,15 @@ function env_creature.draw(creature, position_on_screen, opacity_scale)
drawing.draw_label(creature.name_label, position_on_screen, opacity_scale, creature.name); drawing.draw_label(creature.name_label, position_on_screen, opacity_scale, creature.name);
end end
function env_creature.init_list() function this.init_list()
env_creature.list = {}; this.list = {};
end end
function env_creature.init_module() function this.init_module()
singletons = require("MHR_Overlay.Game_Handler.singletons"); singletons = require("MHR_Overlay.Game_Handler.singletons");
customization_menu = require("MHR_Overlay.UI.customization_menu"); customization_menu = require("MHR_Overlay.UI.customization_menu");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
table_helpers = require("MHR_Overlay.Misc.table_helpers"); utils = require("MHR_Overlay.Misc.utils");
--health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity"); --health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity");
--stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity"); --stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity");
--screen = require("MHR_Overlay.Game_Handler.screen"); --screen = require("MHR_Overlay.Game_Handler.screen");
@@ -123,4 +156,4 @@ function env_creature.init_module()
--ailment_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_UI_entity"); --ailment_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_UI_entity");
end end
return env_creature; return this;

View File

@@ -1,27 +1,60 @@
local env_creature_hook = {}; local this = {};
local env_creature; local env_creature;
local config; local config;
local time; local time;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
local environment_creature_base_type_def = sdk.find_type_definition("snow.envCreature.EnvironmentCreatureBase"); local environment_creature_base_type_def = sdk.find_type_definition("snow.envCreature.EnvironmentCreatureBase");
local update_method = environment_creature_base_type_def:get_method("update"); local update_method = environment_creature_base_type_def:get_method("update");
function env_creature_hook.update(REcreature) function this.update(REcreature)
local creature = env_creature.get_creature(REcreature); local creature = env_creature.get_creature(REcreature);
env_creature.update(REcreature, creature); env_creature.update(REcreature, creature);
env_creature.update_position(REcreature, creature); env_creature.update_position(REcreature, creature);
end end
function env_creature_hook.init_module() function this.init_module()
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
env_creature = require("MHR_Overlay.Endemic_Life.env_creature"); env_creature = require("MHR_Overlay.Endemic_Life.env_creature");
time = require("MHR_Overlay.Game_Handler.time"); time = require("MHR_Overlay.Game_Handler.time");
sdk.hook(update_method, function(args) sdk.hook(update_method, function(args)
pcall(env_creature_hook.update, sdk.to_managed_object(args[2])); pcall(this.update, sdk.to_managed_object(args[2]));
end, function(retval) end, function(retval)
return retval; return retval;
end); end);
end end
return env_creature_hook; return this;

View File

@@ -1,5 +1,6 @@
local config = require "MHR_Overlay.Misc.config" local this = {};
local keyboard = {};
local config;
local singletons; local singletons;
local customization_menu; local customization_menu;
local players; local players;
@@ -8,6 +9,38 @@ local large_monster;
local damage_meter_UI; local damage_meter_UI;
local time; local time;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
local game_keyboard_type_def = sdk.find_type_definition("snow.GameKeyboard"); local game_keyboard_type_def = sdk.find_type_definition("snow.GameKeyboard");
local hard_keyboard_field = game_keyboard_type_def:get_field("hardKeyboard"); local hard_keyboard_field = game_keyboard_type_def:get_field("hardKeyboard");
@@ -16,13 +49,13 @@ local get_down_method = hard_keyboard_field_type_def:get_method("getDown");
local get_trigger_method = hard_keyboard_field_type_def:get_method("getTrg"); local get_trigger_method = hard_keyboard_field_type_def:get_method("getTrg");
local get_release_method = hard_keyboard_field_type_def:get_method("getRelease"); local get_release_method = hard_keyboard_field_type_def:get_method("getRelease");
keyboard.hotkey_modifiers_down = { this.hotkey_modifiers_down = {
ctrl = false, ctrl = false,
shift = false, shift = false,
alt = false alt = false
}; };
keyboard.keys = { this.keys = {
[0] = "None", [0] = "None",
[1] = "Left Mouse Button", [1] = "Left Mouse Button",
[2] = "Right Mouse Button", [2] = "Right Mouse Button",
@@ -301,7 +334,7 @@ keyboard.keys = {
}; };
function keyboard.update() function this.update()
if singletons.game_keyboard == nil then if singletons.game_keyboard == nil then
customization_menu.status = "No game keyboard"; customization_menu.status = "No game keyboard";
return; return;
@@ -313,137 +346,137 @@ function keyboard.update()
return; return;
end end
keyboard.check_modifiers(hard_keyboard); this.check_modifiers(hard_keyboard);
local new_hotkey_registered = keyboard.register_hotkey(hard_keyboard); local new_hotkey_registered = this.register_hotkey(hard_keyboard);
if new_hotkey_registered then if new_hotkey_registered then
config.save(); config.save();
else else
keyboard.check_hotkeys(hard_keyboard); this.check_hotkeys(hard_keyboard);
end end
keyboard.hotkey_modifiers_down.ctrl = false; this.hotkey_modifiers_down.ctrl = false;
keyboard.hotkey_modifiers_down.shift = false; this.hotkey_modifiers_down.shift = false;
keyboard.hotkey_modifiers_down.alt = false this.hotkey_modifiers_down.alt = false
end end
function keyboard.check_modifiers(hard_keyboard) function this.check_modifiers(hard_keyboard)
local is_ctrl_down = get_down_method:call(hard_keyboard, 17); local is_ctrl_down = get_down_method:call(hard_keyboard, 17);
if is_ctrl_down ~= nil then if is_ctrl_down ~= nil then
keyboard.hotkey_modifiers_down.ctrl = is_ctrl_down; this.hotkey_modifiers_down.ctrl = is_ctrl_down;
end end
local is_shift_down = get_down_method:call(hard_keyboard, 16); local is_shift_down = get_down_method:call(hard_keyboard, 16);
if is_shift_down ~= nil then if is_shift_down ~= nil then
keyboard.hotkey_modifiers_down.shift = is_shift_down; this.hotkey_modifiers_down.shift = is_shift_down;
end end
local is_alt_down = get_down_method:call(hard_keyboard, 18); local is_alt_down = get_down_method:call(hard_keyboard, 18);
if is_alt_down ~= nil then if is_alt_down ~= nil then
keyboard.hotkey_modifiers_down.alt = is_alt_down; this.hotkey_modifiers_down.alt = is_alt_down;
end end
end end
function keyboard.register_hotkey(hard_keyboard) function this.register_hotkey(hard_keyboard)
local cached_config = config.current_config.global_settings.hotkeys_with_modifiers; local cached_config = config.current_config.global_settings.hotkeys_with_modifiers;
if customization_menu.all_UI_waiting_for_key then if customization_menu.all_UI_waiting_for_key then
for key, key_name in pairs(keyboard.keys) do for key, key_name in pairs(this.keys) do
if get_release_method:call(hard_keyboard, key) then if get_release_method:call(hard_keyboard, key) then
cached_config.all_UI.ctrl = keyboard.hotkey_modifiers_down.ctrl; cached_config.all_UI.ctrl = this.hotkey_modifiers_down.ctrl;
cached_config.all_UI.shift = keyboard.hotkey_modifiers_down.shift; cached_config.all_UI.shift = this.hotkey_modifiers_down.shift;
cached_config.all_UI.alt = keyboard.hotkey_modifiers_down.alt; cached_config.all_UI.alt = this.hotkey_modifiers_down.alt;
cached_config.all_UI.key = key; cached_config.all_UI.key = key;
customization_menu.all_UI_waiting_for_key = false; customization_menu.all_UI_waiting_for_key = false;
return true; return true;
end end
end end
elseif customization_menu.small_monster_UI_waiting_for_key then elseif customization_menu.small_monster_UI_waiting_for_key then
for key, key_name in pairs(keyboard.keys) do for key, key_name in pairs(this.keys) do
if get_release_method:call(hard_keyboard, key) then if get_release_method:call(hard_keyboard, key) then
cached_config.small_monster_UI.ctrl = keyboard.hotkey_modifiers_down.ctrl; cached_config.small_monster_UI.ctrl = this.hotkey_modifiers_down.ctrl;
cached_config.small_monster_UI.shift = keyboard.hotkey_modifiers_down.shift; cached_config.small_monster_UI.shift = this.hotkey_modifiers_down.shift;
cached_config.small_monster_UI.alt = keyboard.hotkey_modifiers_down.alt; cached_config.small_monster_UI.alt = this.hotkey_modifiers_down.alt;
cached_config.small_monster_UI.key = key; cached_config.small_monster_UI.key = key;
customization_menu.small_monster_UI_waiting_for_key = false; customization_menu.small_monster_UI_waiting_for_key = false;
return true; return true;
end end
end end
elseif customization_menu.large_monster_UI_waiting_for_key then elseif customization_menu.large_monster_UI_waiting_for_key then
for key, key_name in pairs(keyboard.keys) do for key, key_name in pairs(this.keys) do
if get_release_method:call(hard_keyboard, key) then if get_release_method:call(hard_keyboard, key) then
cached_config.large_monster_UI.ctrl = keyboard.hotkey_modifiers_down.ctrl; cached_config.large_monster_UI.ctrl = this.hotkey_modifiers_down.ctrl;
cached_config.large_monster_UI.shift = keyboard.hotkey_modifiers_down.shift; cached_config.large_monster_UI.shift = this.hotkey_modifiers_down.shift;
cached_config.large_monster_UI.alt = keyboard.hotkey_modifiers_down.alt; cached_config.large_monster_UI.alt = this.hotkey_modifiers_down.alt;
cached_config.large_monster_UI.key = key; cached_config.large_monster_UI.key = key;
customization_menu.large_monster_UI_waiting_for_key = false; customization_menu.large_monster_UI_waiting_for_key = false;
return true; return true;
end end
end end
elseif customization_menu.large_monster_dynamic_UI_waiting_for_key then elseif customization_menu.large_monster_dynamic_UI_waiting_for_key then
for key, key_name in pairs(keyboard.keys) do for key, key_name in pairs(this.keys) do
if get_release_method:call(hard_keyboard, key) then if get_release_method:call(hard_keyboard, key) then
cached_config.large_monster_dynamic_UI.ctrl = keyboard.hotkey_modifiers_down.ctrl; cached_config.large_monster_dynamic_UI.ctrl = this.hotkey_modifiers_down.ctrl;
cached_config.large_monster_dynamic_UI.shift = keyboard.hotkey_modifiers_down.shift; cached_config.large_monster_dynamic_UI.shift = this.hotkey_modifiers_down.shift;
cached_config.large_monster_dynamic_UI.alt = keyboard.hotkey_modifiers_down.alt; cached_config.large_monster_dynamic_UI.alt = this.hotkey_modifiers_down.alt;
cached_config.large_monster_dynamic_UI.key = key; cached_config.large_monster_dynamic_UI.key = key;
customization_menu.large_monster_dynamic_UI_waiting_for_key = false; customization_menu.large_monster_dynamic_UI_waiting_for_key = false;
return true; return true;
end end
end end
elseif customization_menu.large_monster_static_UI_waiting_for_key then elseif customization_menu.large_monster_static_UI_waiting_for_key then
for key, key_name in pairs(keyboard.keys) do for key, key_name in pairs(this.keys) do
if get_release_method:call(hard_keyboard, key) then if get_release_method:call(hard_keyboard, key) then
cached_config.large_monster_static_UI.ctrl = keyboard.hotkey_modifiers_down.ctrl; cached_config.large_monster_static_UI.ctrl = this.hotkey_modifiers_down.ctrl;
cached_config.large_monster_static_UI.shift = keyboard.hotkey_modifiers_down.shift; cached_config.large_monster_static_UI.shift = this.hotkey_modifiers_down.shift;
cached_config.large_monster_static_UI.alt = keyboard.hotkey_modifiers_down.alt; cached_config.large_monster_static_UI.alt = this.hotkey_modifiers_down.alt;
cached_config.large_monster_static_UI.key = key; cached_config.large_monster_static_UI.key = key;
customization_menu.large_monster_static_UI_waiting_for_key = false; customization_menu.large_monster_static_UI_waiting_for_key = false;
return true; return true;
end end
end end
elseif customization_menu.large_monster_highlighted_UI_waiting_for_key then elseif customization_menu.large_monster_highlighted_UI_waiting_for_key then
for key, key_name in pairs(keyboard.keys) do for key, key_name in pairs(this.keys) do
if get_release_method:call(hard_keyboard, key) then if get_release_method:call(hard_keyboard, key) then
cached_config.large_monster_highlighted_UI.ctrl = keyboard.hotkey_modifiers_down.ctrl; cached_config.large_monster_highlighted_UI.ctrl = this.hotkey_modifiers_down.ctrl;
cached_config.large_monster_highlighted_UI.shift = keyboard.hotkey_modifiers_down.shift; cached_config.large_monster_highlighted_UI.shift = this.hotkey_modifiers_down.shift;
cached_config.large_monster_highlighted_UI.alt = keyboard.hotkey_modifiers_down.alt; cached_config.large_monster_highlighted_UI.alt = this.hotkey_modifiers_down.alt;
cached_config.large_monster_highlighted_UI.key = key; cached_config.large_monster_highlighted_UI.key = key;
customization_menu.large_monster_highlighted_UI_waiting_for_key = false; customization_menu.large_monster_highlighted_UI_waiting_for_key = false;
return true; return true;
end end
end end
elseif customization_menu.time_UI_waiting_for_key then elseif customization_menu.time_UI_waiting_for_key then
for key, key_name in pairs(keyboard.keys) do for key, key_name in pairs(this.keys) do
if get_release_method:call(hard_keyboard, key) then if get_release_method:call(hard_keyboard, key) then
cached_config.time_UI.ctrl = keyboard.hotkey_modifiers_down.ctrl; cached_config.time_UI.ctrl = this.hotkey_modifiers_down.ctrl;
cached_config.time_UI.shift = keyboard.hotkey_modifiers_down.shift; cached_config.time_UI.shift = this.hotkey_modifiers_down.shift;
cached_config.time_UI.alt = keyboard.hotkey_modifiers_down.alt; cached_config.time_UI.alt = this.hotkey_modifiers_down.alt;
cached_config.time_UI.key = key; cached_config.time_UI.key = key;
customization_menu.time_UI_waiting_for_key = false; customization_menu.time_UI_waiting_for_key = false;
return true; return true;
end end
end end
elseif customization_menu.damage_meter_UI_waiting_for_key then elseif customization_menu.damage_meter_UI_waiting_for_key then
for key, key_name in pairs(keyboard.keys) do for key, key_name in pairs(this.keys) do
if get_release_method:call(hard_keyboard, key) then if get_release_method:call(hard_keyboard, key) then
cached_config.damage_meter_UI.ctrl = keyboard.hotkey_modifiers_down.ctrl; cached_config.damage_meter_UI.ctrl = this.hotkey_modifiers_down.ctrl;
cached_config.damage_meter_UI.shift = keyboard.hotkey_modifiers_down.shift; cached_config.damage_meter_UI.shift = this.hotkey_modifiers_down.shift;
cached_config.damage_meter_UI.alt = keyboard.hotkey_modifiers_down.alt; cached_config.damage_meter_UI.alt = this.hotkey_modifiers_down.alt;
cached_config.damage_meter_UI.key = key; cached_config.damage_meter_UI.key = key;
customization_menu.damage_meter_UI_waiting_for_key = false; customization_menu.damage_meter_UI_waiting_for_key = false;
return true; return true;
end end
end end
elseif customization_menu.endemic_life_UI_waiting_for_key then elseif customization_menu.endemic_life_UI_waiting_for_key then
for key, key_name in pairs(keyboard.keys) do for key, key_name in pairs(this.keys) do
if get_release_method:call(hard_keyboard, key) then if get_release_method:call(hard_keyboard, key) then
cached_config.endemic_life_UI.ctrl = keyboard.hotkey_modifiers_down.ctrl; cached_config.endemic_life_UI.ctrl = this.hotkey_modifiers_down.ctrl;
cached_config.endemic_life_UI.shift = keyboard.hotkey_modifiers_down.shift; cached_config.endemic_life_UI.shift = this.hotkey_modifiers_down.shift;
cached_config.endemic_life_UI.alt = keyboard.hotkey_modifiers_down.alt; cached_config.endemic_life_UI.alt = this.hotkey_modifiers_down.alt;
cached_config.endemic_life_UI.key = key; cached_config.endemic_life_UI.key = key;
customization_menu.endemic_life_UI_waiting_for_key = false; customization_menu.endemic_life_UI_waiting_for_key = false;
return true; return true;
@@ -454,12 +487,12 @@ function keyboard.register_hotkey(hard_keyboard)
return false; return false;
end end
function keyboard.check_hotkeys(hard_keyboard) function this.check_hotkeys(hard_keyboard)
local cached_config = config.current_config.global_settings.hotkeys_with_modifiers; local cached_config = config.current_config.global_settings.hotkeys_with_modifiers;
if not (cached_config.all_UI.ctrl and not keyboard.hotkey_modifiers_down.ctrl) if not (cached_config.all_UI.ctrl and not this.hotkey_modifiers_down.ctrl)
and not (cached_config.all_UI.shift and not keyboard.hotkey_modifiers_down.shift) and not (cached_config.all_UI.shift and not this.hotkey_modifiers_down.shift)
and not (cached_config.all_UI.alt and not keyboard.hotkey_modifiers_down.alt) then and not (cached_config.all_UI.alt and not this.hotkey_modifiers_down.alt) then
if get_release_method:call(hard_keyboard, math.tointeger(cached_config.all_UI.key)) then if get_release_method:call(hard_keyboard, math.tointeger(cached_config.all_UI.key)) then
local is_any_enabled = config.current_config.time_UI.enabled local is_any_enabled = config.current_config.time_UI.enabled
@@ -478,17 +511,17 @@ function keyboard.check_hotkeys(hard_keyboard)
end end
end end
if not (cached_config.small_monster_UI.ctrl and not keyboard.hotkey_modifiers_down.ctrl) if not (cached_config.small_monster_UI.ctrl and not this.hotkey_modifiers_down.ctrl)
and not (cached_config.small_monster_UI.shift and not keyboard.hotkey_modifiers_down.shift) and not (cached_config.small_monster_UI.shift and not this.hotkey_modifiers_down.shift)
and not (cached_config.small_monster_UI.alt and not keyboard.hotkey_modifiers_down.alt) then and not (cached_config.small_monster_UI.alt and not this.hotkey_modifiers_down.alt) then
if get_release_method:call(hard_keyboard, math.tointeger(cached_config.small_monster_UI.key)) then if get_release_method:call(hard_keyboard, math.tointeger(cached_config.small_monster_UI.key)) then
config.current_config.small_monster_UI.enabled = not config.current_config.small_monster_UI.enabled; config.current_config.small_monster_UI.enabled = not config.current_config.small_monster_UI.enabled;
end end
end end
if not (cached_config.large_monster_UI.ctrl and not keyboard.hotkey_modifiers_down.ctrl) if not (cached_config.large_monster_UI.ctrl and not this.hotkey_modifiers_down.ctrl)
and not (cached_config.large_monster_UI.shift and not keyboard.hotkey_modifiers_down.shift) and not (cached_config.large_monster_UI.shift and not this.hotkey_modifiers_down.shift)
and not (cached_config.large_monster_UI.alt and not keyboard.hotkey_modifiers_down.alt) then and not (cached_config.large_monster_UI.alt and not this.hotkey_modifiers_down.alt) then
if get_release_method:call(hard_keyboard, math.tointeger(cached_config.large_monster_UI.key)) then if get_release_method:call(hard_keyboard, math.tointeger(cached_config.large_monster_UI.key)) then
local is_any_enabled = config.current_config.large_monster_UI.dynamic.enabled local is_any_enabled = config.current_config.large_monster_UI.dynamic.enabled
or config.current_config.large_monster_UI.static.enabled or config.current_config.large_monster_UI.static.enabled
@@ -500,27 +533,27 @@ function keyboard.check_hotkeys(hard_keyboard)
end end
end end
if not (cached_config.large_monster_dynamic_UI.ctrl and not keyboard.hotkey_modifiers_down.ctrl) if not (cached_config.large_monster_dynamic_UI.ctrl and not this.hotkey_modifiers_down.ctrl)
and not (cached_config.large_monster_dynamic_UI.shift and not keyboard.hotkey_modifiers_down.shift) and not (cached_config.large_monster_dynamic_UI.shift and not this.hotkey_modifiers_down.shift)
and not (cached_config.large_monster_dynamic_UI.alt and not keyboard.hotkey_modifiers_down.alt) then and not (cached_config.large_monster_dynamic_UI.alt and not this.hotkey_modifiers_down.alt) then
if get_release_method:call(hard_keyboard, if get_release_method:call(hard_keyboard,
math.tointeger(cached_config.large_monster_dynamic_UI.key)) then math.tointeger(cached_config.large_monster_dynamic_UI.key)) then
config.current_config.large_monster_UI.dynamic.enabled = not config.current_config.large_monster_UI.dynamic.enabled; config.current_config.large_monster_UI.dynamic.enabled = not config.current_config.large_monster_UI.dynamic.enabled;
end end
end end
if not (cached_config.large_monster_static_UI.ctrl and not keyboard.hotkey_modifiers_down.ctrl) if not (cached_config.large_monster_static_UI.ctrl and not this.hotkey_modifiers_down.ctrl)
and not (cached_config.large_monster_static_UI.shift and not keyboard.hotkey_modifiers_down.shift) and not (cached_config.large_monster_static_UI.shift and not this.hotkey_modifiers_down.shift)
and not (cached_config.large_monster_static_UI.alt and not keyboard.hotkey_modifiers_down.alt) then and not (cached_config.large_monster_static_UI.alt and not this.hotkey_modifiers_down.alt) then
if get_release_method:call(hard_keyboard, if get_release_method:call(hard_keyboard,
math.tointeger(cached_config.large_monster_static_UI.key)) then math.tointeger(cached_config.large_monster_static_UI.key)) then
config.current_config.large_monster_UI.static.enabled = not config.current_config.large_monster_UI.static.enabled; config.current_config.large_monster_UI.static.enabled = not config.current_config.large_monster_UI.static.enabled;
end end
end end
if not (cached_config.large_monster_highlighted_UI.ctrl and not keyboard.hotkey_modifiers_down.ctrl) if not (cached_config.large_monster_highlighted_UI.ctrl and not this.hotkey_modifiers_down.ctrl)
and not (cached_config.large_monster_highlighted_UI.shift and not keyboard.hotkey_modifiers_down.shift) and not (cached_config.large_monster_highlighted_UI.shift and not this.hotkey_modifiers_down.shift)
and not (cached_config.large_monster_highlighted_UI.alt and not keyboard.hotkey_modifiers_down.alt) then and not (cached_config.large_monster_highlighted_UI.alt and not this.hotkey_modifiers_down.alt) then
if get_release_method:call(hard_keyboard, if get_release_method:call(hard_keyboard,
math.tointeger(cached_config.large_monster_highlighted_UI.key)) then math.tointeger(cached_config.large_monster_highlighted_UI.key)) then
config.current_config.large_monster_UI.highlighted.enabled = not config.current_config.large_monster_UI.highlighted.enabled = not
@@ -528,32 +561,32 @@ function keyboard.check_hotkeys(hard_keyboard)
end end
end end
if not (cached_config.time_UI.ctrl and not keyboard.hotkey_modifiers_down.ctrl) if not (cached_config.time_UI.ctrl and not this.hotkey_modifiers_down.ctrl)
and not (cached_config.time_UI.shift and not keyboard.hotkey_modifiers_down.shift) and not (cached_config.time_UI.shift and not this.hotkey_modifiers_down.shift)
and not (cached_config.time_UI.alt and not keyboard.hotkey_modifiers_down.alt) then and not (cached_config.time_UI.alt and not this.hotkey_modifiers_down.alt) then
if get_release_method:call(hard_keyboard, math.tointeger(cached_config.time_UI.key)) then if get_release_method:call(hard_keyboard, math.tointeger(cached_config.time_UI.key)) then
config.current_config.time_UI.enabled = not config.current_config.time_UI.enabled; config.current_config.time_UI.enabled = not config.current_config.time_UI.enabled;
end end
end end
if not (cached_config.damage_meter_UI.ctrl and not keyboard.hotkey_modifiers_down.ctrl) if not (cached_config.damage_meter_UI.ctrl and not this.hotkey_modifiers_down.ctrl)
and not (cached_config.damage_meter_UI.shift and not keyboard.hotkey_modifiers_down.shift) and not (cached_config.damage_meter_UI.shift and not this.hotkey_modifiers_down.shift)
and not (cached_config.damage_meter_UI.alt and not keyboard.hotkey_modifiers_down.alt) then and not (cached_config.damage_meter_UI.alt and not this.hotkey_modifiers_down.alt) then
if get_release_method:call(hard_keyboard, math.tointeger(cached_config.damage_meter_UI.key)) then if get_release_method:call(hard_keyboard, math.tointeger(cached_config.damage_meter_UI.key)) then
config.current_config.damage_meter_UI.enabled = not config.current_config.damage_meter_UI.enabled; config.current_config.damage_meter_UI.enabled = not config.current_config.damage_meter_UI.enabled;
end end
end end
if not (cached_config.endemic_life_UI.ctrl and not keyboard.hotkey_modifiers_down.ctrl) if not (cached_config.endemic_life_UI.ctrl and not this.hotkey_modifiers_down.ctrl)
and not (cached_config.endemic_life_UI.shift and not keyboard.hotkey_modifiers_down.shift) and not (cached_config.endemic_life_UI.shift and not this.hotkey_modifiers_down.shift)
and not (cached_config.endemic_life_UI.alt and not keyboard.hotkey_modifiers_down.alt) then and not (cached_config.endemic_life_UI.alt and not this.hotkey_modifiers_down.alt) then
if get_release_method:call(hard_keyboard, math.tointeger(cached_config.endemic_life_UI.key)) then if get_release_method:call(hard_keyboard, math.tointeger(cached_config.endemic_life_UI.key)) then
config.current_config.endemic_life_UI.enabled = not config.current_config.endemic_life_UI.enabled; config.current_config.endemic_life_UI.enabled = not config.current_config.endemic_life_UI.enabled;
end end
end end
end end
function keyboard.get_hotkey_name(hotkey) function this.get_hotkey_name(hotkey)
local hotkey_name = ""; local hotkey_name = "";
if hotkey.ctrl then if hotkey.ctrl then
@@ -568,10 +601,11 @@ function keyboard.get_hotkey_name(hotkey)
hotkey_name = hotkey_name .. "Alt + "; hotkey_name = hotkey_name .. "Alt + ";
end end
return hotkey_name .. tostring(keyboard.keys[hotkey.key]); return hotkey_name .. tostring(this.keys[hotkey.key]);
end end
function keyboard.init_module() function this.init_module()
config = require "MHR_Overlay.Misc.config"
singletons = require("MHR_Overlay.Game_Handler.singletons"); singletons = require("MHR_Overlay.Game_Handler.singletons");
customization_menu = require("MHR_Overlay.UI.customization_menu"); customization_menu = require("MHR_Overlay.UI.customization_menu");
players = require("MHR_Overlay.Damage_Meter.players"); players = require("MHR_Overlay.Damage_Meter.players");
@@ -581,4 +615,4 @@ function keyboard.init_module()
time = require("MHR_Overlay.Game_Handler.time"); time = require("MHR_Overlay.Game_Handler.time");
end end
return keyboard; return this;

View File

@@ -1,4 +1,4 @@
local quest_status = {}; local this = {};
local singletons; local singletons;
local customization_menu; local customization_menu;
@@ -10,7 +10,39 @@ local time;
local env_creature; local env_creature;
local non_players; local non_players;
quest_status.flow_states = { local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
this.flow_states = {
NONE = 0, NONE = 0,
IN_LOBBY = 1, IN_LOBBY = 1,
IN_TRAINING_AREA = 2, IN_TRAINING_AREA = 2,
@@ -32,15 +64,15 @@ quest_status.flow_states = {
SUMMARY_SCREEN = 32768, SUMMARY_SCREEN = 32768,
}; };
quest_status.previous_flow_state = quest_status.flow_states.NONE; this.previous_flow_state = this.flow_states.NONE;
quest_status.flow_state = quest_status.flow_states.NONE; this.flow_state = this.flow_states.NONE;
quest_status.index = 0; this.index = 0;
quest_status.is_online = false; this.is_online = false;
--quest_status.is_quest_host = false; --quest_status.is_quest_host = false;
quest_status.cart_count = 0; this.cart_count = 0;
quest_status.max_cart_count = 3; this.max_cart_count = 3;
local quest_manager_type_def = sdk.find_type_definition("snow.QuestManager"); local quest_manager_type_def = sdk.find_type_definition("snow.QuestManager");
local on_changed_game_status_method = quest_manager_type_def:get_method("onChangedGameStatus"); local on_changed_game_status_method = quest_manager_type_def:get_method("onChangedGameStatus");
@@ -84,8 +116,8 @@ local unique_event_manager_type_def = sdk.find_type_definition("snow.eventcut.Un
local play_event_common_method = unique_event_manager_type_def:get_method("playEventCommon"); local play_event_common_method = unique_event_manager_type_def:get_method("playEventCommon");
local event_manager_dispose_method = unique_event_manager_type_def:get_method("dispose"); local event_manager_dispose_method = unique_event_manager_type_def:get_method("dispose");
function quest_status.get_flow_state_name(flow_state, new_line) function this.get_flow_state_name(flow_state, new_line)
for key, value in pairs(quest_status.flow_states) do for key, value in pairs(this.flow_states) do
if value == flow_state then if value == flow_state then
if new_line then if new_line then
return "\n" .. tostring(key); return "\n" .. tostring(key);
@@ -96,52 +128,52 @@ function quest_status.get_flow_state_name(flow_state, new_line)
end end
end end
function quest_status.set_flow_state(new_flow_state) function this.set_flow_state(new_flow_state)
quest_status.previous_flow_state = quest_status.flow_state; this.previous_flow_state = this.flow_state;
quest_status.flow_state = new_flow_state; this.flow_state = new_flow_state;
if quest_status.flow_state >= quest_status.flow_states.KILLCAM then if this.flow_state >= this.flow_states.KILLCAM then
damage_meter_UI.freeze_displayed_players = true; damage_meter_UI.freeze_displayed_players = true;
else else
damage_meter_UI.freeze_displayed_players = false; damage_meter_UI.freeze_displayed_players = false;
end end
if quest_status.flow_state == quest_status.flow_states.IN_LOBBY or quest_status.flow_state == quest_status.flow_states.IN_TRAINING_AREA then if this.flow_state == this.flow_states.IN_LOBBY or this.flow_state == this.flow_states.IN_TRAINING_AREA then
players.init(); players.init();
non_players.init(); non_players.init();
small_monster.init_list(); small_monster.init_list();
large_monster.init_list(); large_monster.init_list();
env_creature.init_list(); env_creature.init_list();
damage_meter_UI.last_displayed_players = {}; damage_meter_UI.last_displayed_players = {};
elseif quest_status.flow_state >= quest_status.flow_states.LOADING_QUEST then elseif this.flow_state >= this.flow_states.LOADING_QUEST then
quest_status.get_cart_count(); this.get_cart_count();
quest_status.get_max_cart_count(); this.get_max_cart_count();
end end
end end
function quest_status.get_cart_count() function this.get_cart_count()
local death_num = get_death_num_method:call(singletons.quest_manager); local death_num = get_death_num_method:call(singletons.quest_manager);
if death_num ~= nil then if death_num ~= nil then
quest_status.cart_count = death_num; this.cart_count = death_num;
end end
end end
function quest_status.get_max_cart_count() function this.get_max_cart_count()
local quest_life = get_quest_life_method:call(singletons.quest_manager); local quest_life = get_quest_life_method:call(singletons.quest_manager);
if quest_life ~= nil then if quest_life ~= nil then
quest_status.max_cart_count = quest_life; this.max_cart_count = quest_life;
end end
end end
--type 2 = quest start --type 2 = quest start
--type 3 = monster killcam --type 3 = monster killcam
--type 5 = end screen --type 5 = end screen
function quest_status.on_demo_request_activation(request_data_base) function this.on_demo_request_activation(request_data_base)
if request_data_base == nil then if request_data_base == nil then
return; return;
end end
if quest_status.index ~= 2 then if this.index ~= 2 then
return; return;
end end
@@ -152,125 +184,125 @@ function quest_status.on_demo_request_activation(request_data_base)
-- QUEST_START_ANIMATION -- QUEST_START_ANIMATION
if request_data_type == 2 then if request_data_type == 2 then
quest_status.set_flow_state(quest_status.flow_states.QUEST_START_ANIMATION); this.set_flow_state(this.flow_states.QUEST_START_ANIMATION);
-- KILLCAM -- KILLCAM
elseif request_data_type == 3 then elseif request_data_type == 3 then
quest_status.set_flow_state(quest_status.flow_states.KILLCAM); this.set_flow_state(this.flow_states.KILLCAM);
-- QUEST_END_ANIMATION -- QUEST_END_ANIMATION
elseif request_data_type == 5 or request_data_type == 6 or request_data_type == 7 then elseif request_data_type == 5 or request_data_type == 6 or request_data_type == 7 then
quest_status.set_flow_state(quest_status.flow_states.QUEST_END_ANIMATION); this.set_flow_state(this.flow_states.QUEST_END_ANIMATION);
-- PLAYER_DEATH_ANIMATION -- PLAYER_DEATH_ANIMATION
elseif request_data_type == 8 then elseif request_data_type == 8 then
quest_status.set_flow_state(quest_status.flow_states.PLAYER_DEATH_ANIMATION); this.set_flow_state(this.flow_states.PLAYER_DEATH_ANIMATION);
-- PLAYER_CART_ANIMATION -- PLAYER_CART_ANIMATION
elseif request_data_type == 9 then elseif request_data_type == 9 then
quest_status.set_flow_state(quest_status.flow_states.PLAYER_CART_ANIMATION); this.set_flow_state(this.flow_states.PLAYER_CART_ANIMATION);
-- FAST_TRAVEL_ANIMATION -- FAST_TRAVEL_ANIMATION
elseif request_data_type == 10 then elseif request_data_type == 10 then
quest_status.set_flow_state(quest_status.flow_states.FAST_TRAVEL_ANIMATION); this.set_flow_state(this.flow_states.FAST_TRAVEL_ANIMATION);
-- WYVERN_RIDING_START_ANIMATION -- WYVERN_RIDING_START_ANIMATION
elseif request_data_type == 11 then elseif request_data_type == 11 then
quest_status.set_flow_state(quest_status.flow_states.WYVERN_RIDING_START_ANIMATION); this.set_flow_state(this.flow_states.WYVERN_RIDING_START_ANIMATION);
end end
end end
function quest_status.on_demo_end() function this.on_demo_end()
if quest_status.index == 2 then if this.index == 2 then
if quest_status.flow_state == quest_status.flow_states.PLAYER_DEATH_ANIMATION if this.flow_state == this.flow_states.PLAYER_DEATH_ANIMATION
or quest_status.flow_state == quest_status.flow_states.PLAYER_CART_ANIMATION or this.flow_state == this.flow_states.PLAYER_CART_ANIMATION
or quest_status.flow_state == quest_status.flow_states.FAST_TRAVEL_ANIMATION or this.flow_state == this.flow_states.FAST_TRAVEL_ANIMATION
or quest_status.flow_state == quest_status.flow_states.WYVERN_RIDING_START_ANIMATION then or this.flow_state == this.flow_states.WYVERN_RIDING_START_ANIMATION then
quest_status.set_flow_state(quest_status.previous_flow_state); this.set_flow_state(this.previous_flow_state);
elseif quest_status.flow_state == quest_status.flow_states.QUEST_START_ANIMATION then elseif this.flow_state == this.flow_states.QUEST_START_ANIMATION then
quest_status.set_flow_state(quest_status.flow_states.PLAYING_QUEST); this.set_flow_state(this.flow_states.PLAYING_QUEST);
elseif quest_status.flow_state == quest_status.flow_states.KILLCAM then elseif this.flow_state == this.flow_states.KILLCAM then
quest_status.set_flow_state(quest_status.flow_states.QUEST_END_TIMER); this.set_flow_state(this.flow_states.QUEST_END_TIMER);
end end
end end
end end
function quest_status.on_set_quest_clear() function this.on_set_quest_clear()
if quest_status.index == 2 and quest_status.flow_state ~= quest_status.flow_states.KILLCAM then if this.index == 2 and this.flow_state ~= this.flow_states.KILLCAM then
quest_status.set_flow_state(quest_status.flow_states.QUEST_END_TIMER); this.set_flow_state(this.flow_states.QUEST_END_TIMER);
end end
end end
function quest_status.on_quest_end_set_state() function this.on_quest_end_set_state()
if quest_status.index == 2 then if this.index == 2 then
quest_status.set_flow_state(quest_status.flow_states.QUEST_END_SCREEN); this.set_flow_state(this.flow_states.QUEST_END_SCREEN);
end end
end end
function quest_status.on_gui_result_reward_do_open() function this.on_gui_result_reward_do_open()
if quest_status.index == 3 then if this.index == 3 then
quest_status.set_flow_state(quest_status.flow_states.REWARD_SCREEN); this.set_flow_state(this.flow_states.REWARD_SCREEN);
end end
end end
function quest_status.on_gui_result_pay_off_do_open() function this.on_gui_result_pay_off_do_open()
if quest_status.index == 3 then if this.index == 3 then
quest_status.set_flow_state(quest_status.flow_states.SUMMARY_SCREEN); this.set_flow_state(this.flow_states.SUMMARY_SCREEN);
end end
end end
function quest_status.on_play_event_common() function this.on_play_event_common()
quest_status.set_flow_state(quest_status.flow_states.CUTSCENE); this.set_flow_state(this.flow_states.CUTSCENE);
end end
function quest_status.on_event_manager_dispose() function this.on_event_manager_dispose()
if quest_status.flow_state == quest_status.flow_states.CUTSCENE then if this.flow_state == this.flow_states.CUTSCENE then
quest_status.set_flow_state(quest_status.previous_flow_state); this.set_flow_state(this.previous_flow_state);
end end
end end
function quest_status.on_set_quest_fail() function this.on_set_quest_fail()
if quest_status.flow_state == quest_status.flow_states.PLAYER_DEATH_ANIMATION or if this.flow_state == this.flow_states.PLAYER_DEATH_ANIMATION or
quest_status.flow_state == quest_status.flow_states.PLAYER_CART_ANIMATION or this.flow_state == this.flow_states.PLAYER_CART_ANIMATION or
quest_status.flow_state == quest_status.flow_states.FAST_TRAVEL_ANIMATION or this.flow_state == this.flow_states.FAST_TRAVEL_ANIMATION or
quest_status.flow_state == quest_status.flow_states.WYVERN_RIDING_START_ANIMATION then this.flow_state == this.flow_states.WYVERN_RIDING_START_ANIMATION then
quest_status.set_flow_state(quest_status.flow_states.QUEST_END_ANIMATION); this.set_flow_state(this.flow_states.QUEST_END_ANIMATION);
end end
end end
function quest_status.on_village_fast_travel(area) function this.on_village_fast_travel(area)
if area == nil then if area == nil then
return; return;
end end
if area == 7 then if area == 7 then
quest_status.set_flow_state(quest_status.flow_states.IN_TRAINING_AREA); this.set_flow_state(this.flow_states.IN_TRAINING_AREA);
else else
quest_status.set_flow_state(quest_status.flow_states.IN_LOBBY); this.set_flow_state(this.flow_states.IN_LOBBY);
end end
end end
function quest_status.on_changed_game_status(new_quest_status) function this.on_changed_game_status(new_quest_status)
quest_status.index = new_quest_status; this.index = new_quest_status;
if quest_status.index == 0 then if this.index == 0 then
quest_status.set_flow_state(quest_status.flow_states.NONE); this.set_flow_state(this.flow_states.NONE);
elseif quest_status.index == 1 then elseif this.index == 1 then
quest_status.set_flow_state(quest_status.flow_states.IN_LOBBY); this.set_flow_state(this.flow_states.IN_LOBBY);
elseif quest_status.index == 2 then elseif this.index == 2 then
quest_status.set_flow_state(quest_status.flow_states.LOADING_QUEST); this.set_flow_state(this.flow_states.LOADING_QUEST);
elseif quest_status.index == 3 then elseif this.index == 3 then
quest_status.set_flow_state(quest_status.flow_states.SUMMARY_SCREEN); this.set_flow_state(this.flow_states.SUMMARY_SCREEN);
end end
end end
function quest_status.init() function this.init()
if singletons.quest_manager == nil then if singletons.quest_manager == nil then
return; return;
end end
@@ -281,22 +313,22 @@ function quest_status.init()
return; return;
end end
quest_status.index = new_quest_status; this.index = new_quest_status;
if quest_status.index == 0 then if this.index == 0 then
quest_status.set_flow_state(quest_status.flow_states.NONE); this.set_flow_state(this.flow_states.NONE);
elseif quest_status.index == 1 then elseif this.index == 1 then
quest_status.set_flow_state(quest_status.flow_states.IN_LOBBY); this.set_flow_state(this.flow_states.IN_LOBBY);
elseif quest_status.index == 2 then elseif this.index == 2 then
quest_status.set_flow_state(quest_status.flow_states.PLAYING_QUEST); this.set_flow_state(this.flow_states.PLAYING_QUEST);
elseif quest_status.index == 3 then elseif this.index == 3 then
quest_status.set_flow_state(quest_status.flow_states.SUMMARY_SCREEN); this.set_flow_state(this.flow_states.SUMMARY_SCREEN);
end end
quest_status.update_is_training_area(); this.update_is_training_area();
end end
function quest_status.update_is_online() function this.update_is_online()
if singletons.lobby_manager == nil then if singletons.lobby_manager == nil then
return; return;
end end
@@ -306,7 +338,7 @@ function quest_status.update_is_online()
return; return;
end end
quest_status.is_online = is_quest_online; this.is_online = is_quest_online;
end end
--[[function quest_status.update_is_quest_host() --[[function quest_status.update_is_quest_host()
@@ -322,7 +354,7 @@ end
quest_status.is_quest_host = is_quest_host; quest_status.is_quest_host = is_quest_host;
end--]] end--]]
function quest_status.update_is_training_area() function this.update_is_training_area()
if singletons.village_area_manager == nil then if singletons.village_area_manager == nil then
customization_menu.status = "No village area manager"; customization_menu.status = "No village area manager";
return; return;
@@ -334,11 +366,11 @@ function quest_status.update_is_training_area()
end end
if _is_training_area then if _is_training_area then
quest_status.set_flow_state(quest_status.flow_states.IN_TRAINING_AREA); this.set_flow_state(this.flow_states.IN_TRAINING_AREA);
end end
end end
function quest_status.init_module() function this.init_module()
singletons = require("MHR_Overlay.Game_Handler.singletons"); singletons = require("MHR_Overlay.Game_Handler.singletons");
customization_menu = require("MHR_Overlay.UI.customization_menu"); customization_menu = require("MHR_Overlay.UI.customization_menu");
players = require("MHR_Overlay.Damage_Meter.players"); players = require("MHR_Overlay.Damage_Meter.players");
@@ -349,63 +381,63 @@ function quest_status.init_module()
env_creature = require("MHR_Overlay.Endemic_Life.env_creature"); env_creature = require("MHR_Overlay.Endemic_Life.env_creature");
non_players = require("MHR_Overlay.Damage_Meter.non_players"); non_players = require("MHR_Overlay.Damage_Meter.non_players");
quest_status.init(); this.init();
sdk.hook(on_changed_game_status_method, function(args) sdk.hook(on_changed_game_status_method, function(args)
quest_status.on_changed_game_status(sdk.to_int64(args[3])); this.on_changed_game_status(sdk.to_int64(args[3]));
end, function(retval) return retval; end); end, function(retval) return retval; end);
sdk.hook(set_quest_clear_method, function(args) sdk.hook(set_quest_clear_method, function(args)
quest_status.on_set_quest_clear(); this.on_set_quest_clear();
end, function(retval) return retval; end); end, function(retval) return retval; end);
sdk.hook(set_quest_clear_sub_method, function(args) sdk.hook(set_quest_clear_sub_method, function(args)
quest_status.on_set_quest_clear(); this.on_set_quest_clear();
end, function(retval) return retval; end); end, function(retval) return retval; end);
sdk.hook(set_quest_clear_sub_hyakurui_method, function(args) sdk.hook(set_quest_clear_sub_hyakurui_method, function(args)
quest_status.on_set_quest_clear(); this.on_set_quest_clear();
end, function(retval) return retval; end); end, function(retval) return retval; end);
sdk.hook(demo_request_activation_method, function(args) sdk.hook(demo_request_activation_method, function(args)
quest_status.on_demo_request_activation(sdk.to_managed_object(args[3])); this.on_demo_request_activation(sdk.to_managed_object(args[3]));
end, function(retval) return retval; end); end, function(retval) return retval; end);
sdk.hook(demo_end_method, function(args) sdk.hook(demo_end_method, function(args)
quest_status.on_demo_end(); this.on_demo_end();
end, function(retval) return retval; end); end, function(retval) return retval; end);
sdk.hook(set_quest_clear_method, function(args) sdk.hook(set_quest_clear_method, function(args)
quest_status.on_set_quest_clear(); this.on_set_quest_clear();
end, function(retval) return retval; end); end, function(retval) return retval; end);
sdk.hook(quest_end_set_state_method, function(args) sdk.hook(quest_end_set_state_method, function(args)
quest_status.on_quest_end_set_state(); this.on_quest_end_set_state();
end, function(retval) return retval; end); end, function(retval) return retval; end);
sdk.hook(gui_result_reward_do_open_method, function(args) sdk.hook(gui_result_reward_do_open_method, function(args)
quest_status.on_gui_result_reward_do_open(); this.on_gui_result_reward_do_open();
end, function(retval) return retval; end); end, function(retval) return retval; end);
sdk.hook(gui_result_pay_off_do_open_method, function(args) sdk.hook(gui_result_pay_off_do_open_method, function(args)
quest_status.on_gui_result_pay_off_do_open(); this.on_gui_result_pay_off_do_open();
end, function(retval) return retval; end); end, function(retval) return retval; end);
sdk.hook(play_event_common_method, function(args) sdk.hook(play_event_common_method, function(args)
quest_status.on_play_event_common(); this.on_play_event_common();
end, function(retval) return retval; end); end, function(retval) return retval; end);
sdk.hook(event_manager_dispose_method, function(args) sdk.hook(event_manager_dispose_method, function(args)
quest_status.on_event_manager_dispose(); this.on_event_manager_dispose();
end, function(retval) return retval; end); end, function(retval) return retval; end);
sdk.hook(set_quest_fail_method, function(args) sdk.hook(set_quest_fail_method, function(args)
quest_status.on_set_quest_fail(); this.on_set_quest_fail();
end, function(retval) return retval; end); end, function(retval) return retval; end);
sdk.hook(fast_travel_method, function(args) sdk.hook(fast_travel_method, function(args)
quest_status.on_village_fast_travel(sdk.to_int64(args[3])); this.on_village_fast_travel(sdk.to_int64(args[3]));
end, function(retval) return retval; end); end, function(retval) return retval; end);
end end
return quest_status; return this;

View File

@@ -1,27 +1,59 @@
local screen = {}; local this = {};
local config; local config;
local singletons; local singletons;
screen.width = 1920; local sdk = sdk;
screen.height = 1080; local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function screen.update_window_size() this.width = 1920;
this.height = 1080;
function this.update_window_size()
local width; local width;
local height; local height;
if d2d ~= nil and config.current_config.global_settings.renderer.use_d2d_if_available then if d2d ~= nil and config.current_config.global_settings.renderer.use_d2d_if_available then
width, height = d2d.surface_size(); width, height = d2d.surface_size();
else else
width, height = screen.get_game_window_size(); width, height = this.get_game_window_size();
end end
if width ~= nil then if width ~= nil then
screen.width = width; this.width = width;
end end
if height ~= nil then if height ~= nil then
screen.height = height; this.height = height;
end end
end end
@@ -33,11 +65,9 @@ local size_type = get_size_method:get_return_type();
local width_field = size_type:get_field("w"); local width_field = size_type:get_field("w");
local height_field = size_type:get_field("h"); local height_field = size_type:get_field("h");
function screen.get_game_window_size() function this.get_game_window_size()
if scene_view == nil then if scene_view == nil then
scene_view = sdk.call_native_func(singletons.scene_manager, scene_view = sdk.call_native_func(singletons.scene_manager, sdk.find_type_definition("via.SceneManager") , "get_MainView");
sdk.find_type_definition("via.SceneManager")
, "get_MainView");
if scene_view == nil then if scene_view == nil then
--log.error("[MHR_Overlay.lua] No scene view"); --log.error("[MHR_Overlay.lua] No scene view");
@@ -66,7 +96,7 @@ function screen.get_game_window_size()
return screen_width, screen_height; return screen_width, screen_height;
end end
function screen.calculate_absolute_coordinates(position) function this.calculate_absolute_coordinates(position)
local global_position_modifier = config.current_config.global_settings.modifiers.global_position_modifier; local global_position_modifier = config.current_config.global_settings.modifiers.global_position_modifier;
local _position = { local _position = {
@@ -81,29 +111,29 @@ function screen.calculate_absolute_coordinates(position)
-- top right -- top right
if position.anchor == "Top-Right" then if position.anchor == "Top-Right" then
local screen_x = screen.width - _position.x; local screen_x = this.width - _position.x;
return { x = screen_x, y = _position.y }; return { x = screen_x, y = _position.y };
end end
-- bottom left -- bottom left
if position.anchor == "Bottom-Left" then if position.anchor == "Bottom-Left" then
local screen_y = screen.height - _position.y; local screen_y = this.height - _position.y;
return { x = _position.x, y = screen_y }; return { x = _position.x, y = screen_y };
end end
-- bottom right -- bottom right
if position.anchor == "Bottom-Right" then if position.anchor == "Bottom-Right" then
local screen_x = screen.width - _position.x; local screen_x = this.width - _position.x;
local screen_y = screen.height - _position.y; local screen_y = this.height - _position.y;
return { x = screen_x, y = screen_y }; return { x = screen_x, y = screen_y };
end end
return { x = _position.x, y = _position.y }; return { x = _position.x, y = _position.y };
end end
function screen.init_module() function this.init_module()
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
singletons = require("MHR_Overlay.Game_Handler.singletons"); singletons = require("MHR_Overlay.Game_Handler.singletons");
end end
return screen; return this;

View File

@@ -1,206 +1,238 @@
local singletons = {}; local this = {};
singletons.message_manager = nil; local sdk = sdk;
singletons.enemy_manager = nil; local tostring = tostring;
singletons.lobby_manager = nil; local pairs = pairs;
singletons.progress_manager = nil; local ipairs = ipairs;
singletons.quest_manager = nil; local tonumber = tonumber;
singletons.player_manager = nil; local require = require;
singletons.village_area_manager = nil; local pcall = pcall;
singletons.gui_manager = nil; local table = table;
singletons.game_keyboard = nil; local string = string;
singletons.scene_manager = nil; local Vector3f = Vector3f;
singletons.game_manager = nil; local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function singletons.init() this.message_manager = nil;
singletons.init_message_manager(); this.enemy_manager = nil;
singletons.init_enemy_manager(); this.lobby_manager = nil;
singletons.init_lobby_manager() this.progress_manager = nil;
singletons.init_progress_manager(); this.quest_manager = nil;
singletons.init_quest_manager(); this.player_manager = nil;
singletons.init_player_manager(); this.village_area_manager = nil;
singletons.init_village_area_manager(); this.gui_manager = nil;
singletons.init_gui_manager(); this.game_keyboard = nil;
singletons.init_game_keyboard(); this.scene_manager = nil;
singletons.init_scene_manager(); this.game_manager = nil;
singletons.init_game_manager();
singletons.init_servant_manager(); function this.init()
singletons.init_otomo_manager(); this.init_message_manager();
this.init_enemy_manager();
this.init_lobby_manager()
this.init_progress_manager();
this.init_quest_manager();
this.init_player_manager();
this.init_village_area_manager();
this.init_gui_manager();
this.init_game_keyboard();
this.init_scene_manager();
this.init_game_manager();
this.init_servant_manager();
this.init_otomo_manager();
end end
function singletons.init_message_manager() function this.init_message_manager()
if singletons.message_manager ~= nil then if this.message_manager ~= nil then
return; return;
end end
singletons.message_manager = sdk.get_managed_singleton("snow.gui.MessageManager"); this.message_manager = sdk.get_managed_singleton("snow.gui.MessageManager");
if singletons.message_manager == nil then if this.message_manager == nil then
--log.error("[MHR Overlay] No message manager"); --log.error("[MHR Overlay] No message manager");
end end
return singletons.message_manager; return this.message_manager;
end end
function singletons.init_enemy_manager() function this.init_enemy_manager()
if singletons.enemy_manager ~= nil then if this.enemy_manager ~= nil then
return; return;
end end
singletons.enemy_manager = sdk.get_managed_singleton("snow.enemy.EnemyManager"); this.enemy_manager = sdk.get_managed_singleton("snow.enemy.EnemyManager");
if singletons.enemy_manager == nil then if this.enemy_manager == nil then
--log.error("[MHR Overlay] No enemy manager"); --log.error("[MHR Overlay] No enemy manager");
end end
return singletons.enemy_manager; return this.enemy_manager;
end end
function singletons.init_lobby_manager() function this.init_lobby_manager()
if singletons.lobby_manager ~= nil then if this.lobby_manager ~= nil then
return; return;
end end
singletons.lobby_manager = sdk.get_managed_singleton("snow.LobbyManager"); this.lobby_manager = sdk.get_managed_singleton("snow.LobbyManager");
if singletons.lobby_manager == nil then if this.lobby_manager == nil then
--log.error("[MHR Overlay] No lobby manager"); --log.error("[MHR Overlay] No lobby manager");
return false; return false;
end end
return singletons.lobby_manager; return this.lobby_manager;
end end
function singletons.init_progress_manager() function this.init_progress_manager()
if singletons.progress_manager ~= nil then if this.progress_manager ~= nil then
return; return;
end end
singletons.progress_manager = sdk.get_managed_singleton("snow.progress.ProgressManager"); this.progress_manager = sdk.get_managed_singleton("snow.progress.ProgressManager");
if singletons.progress_manager == nil then if this.progress_manager == nil then
--log.error("[MHR Overlay] No progress manager"); --log.error("[MHR Overlay] No progress manager");
return false; return false;
end end
return singletons.progress_manager; return this.progress_manager;
end end
function singletons.init_quest_manager() function this.init_quest_manager()
if singletons.quest_manager ~= nil then if this.quest_manager ~= nil then
return; return;
end end
singletons.quest_manager = sdk.get_managed_singleton("snow.QuestManager"); this.quest_manager = sdk.get_managed_singleton("snow.QuestManager");
if singletons.quest_manager == nil then if this.quest_manager == nil then
--log.error("[MHR Overlay] No quest manager"); --log.error("[MHR Overlay] No quest manager");
end end
return singletons.quest_manager; return this.quest_manager;
end end
function singletons.init_player_manager() function this.init_player_manager()
if singletons.player_manager ~= nil then if this.player_manager ~= nil then
return; return;
end end
singletons.player_manager = sdk.get_managed_singleton("snow.player.PlayerManager"); this.player_manager = sdk.get_managed_singleton("snow.player.PlayerManager");
if singletons.player_manager == nil then if this.player_manager == nil then
--log.error("[MHR Overlay] No player manager"); --log.error("[MHR Overlay] No player manager");
end end
return singletons.player_manager; return this.player_manager;
end end
function singletons.init_village_area_manager() function this.init_village_area_manager()
if singletons.village_area_manager ~= nil then if this.village_area_manager ~= nil then
return; return;
end end
singletons.village_area_manager = sdk.get_managed_singleton("snow.VillageAreaManager"); this.village_area_manager = sdk.get_managed_singleton("snow.VillageAreaManager");
if singletons.village_area_manager == nil then if this.village_area_manager == nil then
--log.error("[MHR Overlay] No village area manager"); --log.error("[MHR Overlay] No village area manager");
end end
return singletons.village_area_manager; return this.village_area_manager;
end end
function singletons.init_gui_manager() function this.init_gui_manager()
if singletons.gui_manager ~= nil then if this.gui_manager ~= nil then
return; return;
end end
singletons.gui_manager = sdk.get_managed_singleton("snow.gui.GuiManager"); this.gui_manager = sdk.get_managed_singleton("snow.gui.GuiManager");
if singletons.gui_manager == nil then if this.gui_manager == nil then
--log.error("[MHR Overlay] No gui manager"); --log.error("[MHR Overlay] No gui manager");
end end
return singletons.gui_manager; return this.gui_manager;
end end
function singletons.init_game_keyboard() function this.init_game_keyboard()
if singletons.game_keyboard ~= nil then if this.game_keyboard ~= nil then
return; return;
end end
singletons.game_keyboard = sdk.get_managed_singleton("snow.GameKeyboard"); this.game_keyboard = sdk.get_managed_singleton("snow.GameKeyboard");
if singletons.game_keyboard == nil then if this.game_keyboard == nil then
--log.error("[MHR Overlay] No game keyboard"); --log.error("[MHR Overlay] No game keyboard");
end end
return singletons.game_keyboard; return this.game_keyboard;
end end
function singletons.init_scene_manager() function this.init_scene_manager()
if singletons.scene_manager ~= nil then if this.scene_manager ~= nil then
return; return;
end end
singletons.scene_manager = sdk.get_native_singleton("via.SceneManager"); this.scene_manager = sdk.get_native_singleton("via.SceneManager");
if singletons.scene_manager == nil then if this.scene_manager == nil then
--log.error("[MHR Overlay] No enemy manager"); --log.error("[MHR Overlay] No enemy manager");
end end
return singletons.scene_manager; return this.scene_manager;
end end
function singletons.init_game_manager() function this.init_game_manager()
if singletons.game_manager ~= nil then if this.game_manager ~= nil then
return; return;
end end
singletons.game_manager = sdk.get_managed_singleton("snow.SnowGameManager"); this.game_manager = sdk.get_managed_singleton("snow.SnowGameManager");
if singletons.game_manager == nil then if this.game_manager == nil then
--log.error("[MHR Overlay] No enemy manager"); --log.error("[MHR Overlay] No enemy manager");
end end
return singletons.game_manager; return this.game_manager;
end end
function singletons.init_servant_manager() function this.init_servant_manager()
if singletons.servant_manager ~= nil then if this.servant_manager ~= nil then
return; return;
end end
singletons.servant_manager = sdk.get_managed_singleton("snow.ai.ServantManager"); this.servant_manager = sdk.get_managed_singleton("snow.ai.ServantManager");
if singletons.servant_manager == nil then if this.servant_manager == nil then
--log.error("[MHR Overlay] No enemy manager"); --log.error("[MHR Overlay] No enemy manager");
end end
return singletons.servant_manager; return this.servant_manager;
end end
function singletons.init_otomo_manager() function this.init_otomo_manager()
if singletons.otomo_manager ~= nil then if this.otomo_manager ~= nil then
return; return;
end end
singletons.otomo_manager = sdk.get_managed_singleton("snow.otomo.OtomoManager"); this.otomo_manager = sdk.get_managed_singleton("snow.otomo.OtomoManager");
if singletons.otomo_manager == nil then if this.otomo_manager == nil then
--log.error("[MHR Overlay] No enemy manager"); --log.error("[MHR Overlay] No enemy manager");
end end
return singletons.otomo_manager; return this.otomo_manager;
end end
function singletons.init_module() function this.init_module()
singletons.init(); this.init();
end end
return singletons; return this;

View File

@@ -1,4 +1,5 @@
local time = {}; local this = {};
local singletons; local singletons;
local customization_menu; local customization_menu;
local quest_status; local quest_status;
@@ -7,23 +8,55 @@ local non_players;
local config; local config;
local small_monster; local small_monster;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
local quest_manager_type_def = sdk.find_type_definition("snow.QuestManager"); local quest_manager_type_def = sdk.find_type_definition("snow.QuestManager");
local get_quest_elapsed_time_min_method = quest_manager_type_def:get_method("getQuestElapsedTimeMin"); local get_quest_elapsed_time_min_method = quest_manager_type_def:get_method("getQuestElapsedTimeMin");
local get_quest_elapsed_time_sec_method = quest_manager_type_def:get_method("getQuestElapsedTimeSec"); local get_quest_elapsed_time_sec_method = quest_manager_type_def:get_method("getQuestElapsedTimeSec");
time.total_elapsed_seconds = 0; this.total_elapsed_seconds = 0;
time.elapsed_minutes = 0; this.elapsed_minutes = 0;
time.elapsed_seconds = 0; this.elapsed_seconds = 0;
time.total_elapsed_script_seconds = 0; this.total_elapsed_script_seconds = 0;
time.last_elapsed_script_seconds = 0; this.last_elapsed_script_seconds = 0;
function time.update_script_time() function this.update_script_time()
time.total_elapsed_script_seconds = os.clock(); this.total_elapsed_script_seconds = os.clock();
end end
function time.tick() function this.tick()
time.update_script_time(); this.update_script_time();
if singletons.quest_manager == nil then if singletons.quest_manager == nil then
return; return;
@@ -33,22 +66,20 @@ function time.tick()
if quest_time_elapsed_minutes == nil then if quest_time_elapsed_minutes == nil then
customization_menu.status = "No quest time elapsed minutes"; customization_menu.status = "No quest time elapsed minutes";
else else
time.elapsed_minutes = quest_time_elapsed_minutes; this.elapsed_minutes = quest_time_elapsed_minutes;
end end
local quest_time_total_elapsed_seconds = get_quest_elapsed_time_sec_method:call(singletons.quest_manager); local quest_time_total_elapsed_seconds = get_quest_elapsed_time_sec_method:call(singletons.quest_manager);
if quest_time_total_elapsed_seconds == nil then if quest_time_total_elapsed_seconds == nil then
customization_menu.status = "No quest time total elapsed seconds"; customization_menu.status = "No quest time total elapsed seconds";
else else
time.total_elapsed_seconds = quest_time_total_elapsed_seconds; this.total_elapsed_seconds = quest_time_total_elapsed_seconds;
end end
time.elapsed_seconds = quest_time_total_elapsed_seconds - quest_time_elapsed_minutes * 60; this.elapsed_seconds = quest_time_total_elapsed_seconds - quest_time_elapsed_minutes * 60;
if time.total_elapsed_script_seconds - time.last_elapsed_script_seconds > 0.5 then if this.total_elapsed_script_seconds - this.last_elapsed_script_seconds > 0.5 then
time.last_elapsed_script_seconds = time.total_elapsed_script_seconds; this.last_elapsed_script_seconds = this.total_elapsed_script_seconds;
local is_on_quest = quest_status.flow_state ~= quest_status.flow_states.IN_LOBBY and quest_status.flow_state ~= quest_status.flow_states.IN_TRAINING_AREA; local is_on_quest = quest_status.flow_state ~= quest_status.flow_states.IN_LOBBY and quest_status.flow_state ~= quest_status.flow_states.IN_TRAINING_AREA;
@@ -62,7 +93,7 @@ function time.tick()
end end
end end
function time.init_module() function this.init_module()
players = require("MHR_Overlay.Damage_Meter.players"); players = require("MHR_Overlay.Damage_Meter.players");
singletons = require("MHR_Overlay.Game_Handler.singletons"); singletons = require("MHR_Overlay.Game_Handler.singletons");
customization_menu = require("MHR_Overlay.UI.customization_menu"); customization_menu = require("MHR_Overlay.UI.customization_menu");
@@ -72,4 +103,4 @@ function time.init_module()
non_players = require("MHR_Overlay.Damage_Meter.non_players"); non_players = require("MHR_Overlay.Damage_Meter.non_players");
end end
return time; return this;

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
local debug = {}; local this = {};
debug.enabled = false; this.enabled = false;
return debug; return this;

View File

@@ -1,9 +1,45 @@
local language = {}; local this = {};
local table_helpers;
language.language_folder = "MHR Overlay\\languages\\"; local utils;
language.default_language = { local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
this.language_folder = "MHR Overlay\\languages\\";
this.current_language = {};
this.default_language = {
font_name = "NotoSansKR-Bold.otf", font_name = "NotoSansKR-Bold.otf",
parts = { parts = {
head = "Head", head = "Head",
@@ -88,7 +124,9 @@ language.default_language = {
chest = "Chest", chest = "Chest",
shell = "Shell", shell = "Shell",
thundersacs = "Thundersacs" thundersacs = "Thundersacs",
amatsu_unknown = "?"
}, },
ailments = { ailments = {
@@ -235,7 +273,7 @@ language.default_language = {
dynamically_positioned = "Dynamically Positioned", dynamically_positioned = "Dynamically Positioned",
statically_positioned = "Statically Positioned", statically_positioned = "Statically Positioned",
highlighted = "Highlighted (targeted)", highlighted_targeted = "Highlighted (targeted)",
include = "Include", include = "Include",
monster_name = "Monster Name", monster_name = "Monster Name",
@@ -445,16 +483,36 @@ language.default_language = {
myself = "Myself", myself = "Myself",
total = "Total", total = "Total",
level_label = "Level Label" level_label = "Level Label",
config = "Config",
rename = "Rename",
duplicate = "Duplicate",
delete = "Delete",
new = "New",
reset = "Reset",
highlighted = "Highlighted",
buff_UI = "Buff UI",
timer = "Timer",
duration = "Duration",
hide_bar_for_infinite_buffs = "Hide Bar for infinite Buffs",
hide_timer_for_infinite_buffs = "Hide Timer for infinite Buffs",
current_value = "Current Value",
max_value = "Max Value",
filter_mode = "Filter Mode",
current_state = "Current State",
default_state = "Default State"
} }
}; };
language.current_language = {}; this.language_names = { "default"};
this.languages = { this.default_language };
language.language_names = { "default" }; function this.load()
language.languages = { language.default_language };
function language.load()
local language_files = fs.glob([[MHR Overlay\\languages\\.*json]]); local language_files = fs.glob([[MHR Overlay\\languages\\.*json]]);
if language_files == nil then if language_files == nil then
@@ -462,46 +520,49 @@ function language.load()
end end
for i, language_file_name in ipairs(language_files) do for i, language_file_name in ipairs(language_files) do
local language_name = language_file_name:gsub(language.language_folder, ""):gsub(".json",""); local language_name = language_file_name:gsub(this.language_folder, ""):gsub(".json","");
local loaded_language = json.load_file(language_file_name); local loaded_language = json.load_file(language_file_name);
if loaded_language ~= nil then if loaded_language ~= nil then
log.info("[MHR Overlay] " .. language_name .. ".json loaded successfully");
table.insert(language.language_names, language_name);
local merged_language = table_helpers.merge(language.default_language, loaded_language); log.info("[MHR Overlay] " .. language_file_name .. ".json loaded successfully");
table.insert(language.languages, merged_language); table.insert(this.language_names, language_name);
local merged_language = utils.table.merge(this.default_language, loaded_language);
table.insert(this.languages, merged_language);
this.save(language_file_name, merged_language);
language.save(language_file_name, merged_language);
else else
log.error("[MHR Overlay] Failed to load " .. language_name .. ".json"); log.error("[MHR Overlay] Failed to load " .. language_file_name .. ".json");
end end
end end
end end
function language.save(file_name, language_table) function this.save(file_name, language_table)
local success = json.dump_file(file_name, language_table); local success = json.dump_file(file_name, language_table);
if success then if success then
log.info("[MHR Overlay] en-us.json saved successfully"); log.info("[MHR Overlay] " .. file_name .. " saved successfully");
else else
log.error("[MHR Overlay] Failed to save en-us.json"); log.error("[MHR Overlay] Failed to save " .. file_name);
end end
end end
function language.save_default() function this.save_default()
language.save(language.language_folder .. "en-us.json", language.default_language) this.save(this.language_folder .. "en-us.json", this.default_language);
end end
function language.update(index) function this.update(index)
language.current_language = table_helpers.deep_copy(language.languages[index]); this.current_language = this.languages[index];
end end
function language.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers"); utils = require("MHR_Overlay.Misc.utils");
language.save_default();
language.load(); this.save_default();
language.current_language = table_helpers.deep_copy(language.default_language); this.load();
this.current_language = this.default_language;
end end
return language; return this;

View File

@@ -1,11 +1,43 @@
local part_names = {}; local this = {};
local language; local language;
local table_helpers;
part_names.list = {}; local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function part_names.init() this.list = {};
part_names.list = {
function this.init()
this.list = {
[98] = -- Great Izuchi 98 [98] = -- Great Izuchi 98
{ {
language.current_language.parts.head, language.current_language.parts.head,
@@ -819,12 +851,79 @@ function part_names.init()
language.current_language.parts.hind_legs, language.current_language.parts.hind_legs,
language.current_language.parts.wings, language.current_language.parts.wings,
language.current_language.parts.tail language.current_language.parts.tail
} },
--SUNBREAK TITLE UPDATE 4
[124] = -- Velkhana 124
{
language.current_language.parts.head,
language.current_language.parts.body,
language.current_language.parts.forelegs,
language.current_language.parts.hind_legs,
language.current_language.parts.wings,
language.current_language.parts.tail
},
[2134] = -- Risen Crimson Glow Valstrax 2134
{
language.current_language.parts.head,
language.current_language.parts.body,
language.current_language.parts.left_wing,
language.current_language.parts.right_wing,
language.current_language.parts.left_foreleg,
language.current_language.parts.right_foreleg,
language.current_language.parts.tail,
language.current_language.parts.hind_legs,
language.current_language.parts.chest
},
--SUNBREAK TITLE UPDATE 5
[2120] = -- Risen Shagaru Magala 2120
{
language.current_language.parts.head,
language.current_language.parts.torso,
language.current_language.parts.wings,
language.current_language.parts.wingclaws,
language.current_language.parts.forelegs,
language.current_language.parts.hind_legs,
language.current_language.parts.tail
},
[58] = -- Amatsu 58
{
language.current_language.parts.head,
language.current_language.parts.left_arm,
language.current_language.parts.right_arm,
language.current_language.parts.abdomen,
language.current_language.parts.tail,
language.current_language.parts.back,
language.current_language.parts.amatsu_unknown,
language.current_language.parts.left_leg,
language.current_language.parts.right_leg
},
}; };
end end
function part_names.get_part_name(monster_id, part_id) function this.get_part_name(monster_id, part_id)
local monster_parts = part_names.list[monster_id]; local monster_parts = this.list[monster_id];
if monster_parts == nil then if monster_parts == nil then
return "?"; return "?";
end end
@@ -833,11 +932,10 @@ function part_names.get_part_name(monster_id, part_id)
return part_name; return part_name;
end end
function part_names.init_module() function this.init_module()
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
table_helpers = require("MHR_Overlay.Misc.table_helpers");
part_names.init(); this.init();
end end
return part_names; return this;

View File

@@ -1,93 +0,0 @@
local table_helpers = {};
local next = next;
function table_helpers.deep_copy(original, copies)
copies = copies or {};
local original_type = type(original);
local copy;
if original_type == "table" then
if copies[original] then
copy = copies[original];
else
copy = {};
copies[original] = copy;
for original_key, original_value in next, original, nil do
copy[table_helpers.deep_copy(original_key, copies)] = table_helpers.deep_copy(original_value
,
copies);
end
setmetatable(copy,
table_helpers.deep_copy(getmetatable(original)
, copies));
end
else -- number, string, boolean, etc
copy = original;
end
return copy;
end
function table_helpers.find_index(table_, value, nullable)
for i = 1, #table_ do
if table_[i] == value then
return i;
end
end
if not nullable then
return 1;
end
return nil;
end
function table_helpers.merge(...)
local tables_to_merge = { ... };
assert(#tables_to_merge > 1, "There should be at least two tables to merge them");
for key, table_ in ipairs(tables_to_merge) do
assert(type(table_) == "table", string.format("Expected a table as function parameter %d", key));
end
local result = table_helpers.deep_copy(tables_to_merge[1]);
for i = 2, #tables_to_merge do
local from = tables_to_merge[i];
for key, value in pairs(from) do
if type(value) == "table" then
result[key] = result[key] or {};
assert(type(result[key]) == "table", string.format("Expected a table: '%s'", key));
result[key] = table_helpers.merge(result[key], value);
else
result[key] = value;
end
end
end
return result;
end
function table_helpers.tostring(table_)
if type(table_) == "table" then
local s = "{ \n";
for k, v in pairs(table_) do
if type(k) ~= "number" then
k = "\"" .. k .. "\"";
end
s = s .. "\t[" .. k .. "] = " .. table_helpers.tostring(v) .. ",\n";
end
return s .. "} \n";
else
return tostring(table_);
end
end
function table_helpers.is_empty(table_)
return next(table_) == nil;
end
function table_helpers.init_module()
end
return table_helpers;

View File

@@ -1,143 +0,0 @@
local unicode_helpers = {};
-- https://github.com/blitmap/lua-utf8-simple/blob/master/utf8_simple.lua
-- ABNF from RFC 3629
--
-- UTF8-octets = *( UTF8-char )
-- UTF8-char = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4
-- UTF8-1 = %x00-7F
-- UTF8-2 = %xC2-DF UTF8-tail
-- UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) /
-- %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail )
-- UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) /
-- %xF4 %x80-8F 2( UTF8-tail )
-- UTF8-tail = %x80-BF
-- 0xxxxxxx | 007F (127)
-- 110xxxxx 10xxxxxx | 07FF (2047)
-- 1110xxxx 10xxxxxx 10xxxxxx | FFFF (65535)
-- 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx | 10FFFF (1114111)
local pattern = "[%z\1-\127\194-\244][\128-\191]*";
-- helper function
function unicode_helpers.relative_position(position, length)
if position < 0 then
position = length + position + 1;
end
return position;
end
-- THE MEAT
-- maps f over s's utf8 characters f can accept args: (visual_index, utf8_character, byte_index)
function unicode_helpers.map(s, f, no_subs)
local i = 0;
if no_subs then
for b, e in s:gmatch("()" .. pattern .. "()") do
i = i + 1;
local c = e - b;
f(i, c, b);
end
else
for b, c in s:gmatch("()(" .. pattern .. ")") do
i = i + 1;
f(i, c, b);
end
end
end
-- THE REST
-- returns the number of characters in a UTF-8 string
function unicode_helpers.len(s)
-- count the number of non-continuing bytes
return select(2, s:gsub('[^\128-\193]', ''));
end
-- replace all utf8 chars with mapping
function unicode_helpers.replace(s, map)
return s:gsub(pattern, map);
end
-- reverse a utf8 string
function unicode_helpers.reverse(s)
-- reverse the individual greater-than-single-byte characters
s = s:gsub(pattern,function (c)
return #c > 1 and c:reverse()
end);
return s:reverse();
end
-- strip non-ascii characters from a utf8 string
function unicode_helpers.strip(s)
return s:gsub(pattern, function(c)
return #c > 1 and '';
end);
end
-- generator for the above -- to iterate over all utf8 chars
function unicode_helpers.chars(s, no_subs)
return coroutine.wrap(function()
return unicode_helpers.map(s, coroutine.yield, no_subs);
end);
end
-- like string.sub() but i, j are utf8 strings
-- a utf8-safe string.sub()
function unicode_helpers.sub(str, i, j)
if coroutine == nil then
return str;
end
local l = utf8.len(str);
i = unicode_helpers.relative_position(i, l);
j = j and unicode_helpers.relative_position(j, l) or l;
if i < 1 then
i = 1;
end
if j > l then
j = l;
end
if i > j then
return "";
end
local diff = j - i;
local iterator = unicode_helpers.chars(str, true);
-- advance up to i
for _ = 1, i - 1 do
iterator();
end
local c, b = select(2, iterator());
-- i and j are the same, single-charaacter sub
if diff == 0 then
return string.sub(str, b, b + c - 1);
end
i = b;
-- advance up to j
for _ = 1, diff - 1 do
iterator();
end
c, b = select(2, iterator());
return string.sub(str, i, b + c - 1);
end
function unicode_helpers.init_module()
end
return unicode_helpers;

View File

@@ -0,0 +1,419 @@
local this = {};
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
local table_tostring;
local deep_copy;
local merge;
local is_empty;
local unicode_map;
local unicode_relative_position;
local unicode_chars;
this.table = {};
this.number = {};
this.string = {};
this.vec2 = {};
this.vec3 = {};
this.vec4 = {};
this.math = {};
this.unicode = {};
function this.table.tostring(table_)
if type(table_) == "number" or type(table_) == "boolean" or type(table_) == "string" then
return tostring(table_);
end
if is_empty(table_) then
return "{}";
end
local cache = {};
local stack = {};
local output = {};
local depth = 1;
local output_str = "{\n";
while true do
local size = 0;
for k,v in pairs(table_) do
size = size + 1;
end
local cur_index = 1;
for k,v in pairs(table_) do
if cache[table_] == nil or cur_index >= cache[table_] then
if string.find(output_str, "}", output_str:len()) then
output_str = output_str .. ",\n";
elseif not string.find(output_str, "\n", output_str:len()) then
output_str = output_str .. "\n";
end
-- This is necessary for working with HUGE tables otherwise we run out of memory using concat on huge strings
table.insert(output,output_str);
output_str = "";
local key;
if type(k) == "number" or type(k) == "boolean" then
key = "[" .. tostring(k) .. "]";
else
key = "['" .. tostring(k) .. "']";
end
if type(v) == "number" or type(v) == "boolean" then
output_str = output_str .. string.rep('\t', depth) .. key .. " = "..tostring(v);
elseif type(v) == "table" then
output_str = output_str .. string.rep('\t', depth) .. key .. " = {\n";
table.insert(stack, table_);
table.insert(stack, v);
cache[table_] = cur_index + 1;
break;
else
output_str = output_str .. string.rep('\t', depth) .. key .. " = '" .. tostring(v) .. "'";
end
if cur_index == size then
output_str = output_str .. "\n" .. string.rep('\t', depth - 1) .. "}";
else
output_str = output_str .. ",";
end
else
-- close the table
if cur_index == size then
output_str = output_str .. "\n" .. string.rep('\t', depth - 1) .. "}";
end
end
cur_index = cur_index + 1;
end
if size == 0 then
output_str = output_str .. "\n" .. string.rep('\t', depth - 1) .. "}";
end
if #stack > 0 then
table_ = stack[#stack];
stack[#stack] = nil;
depth = cache[table_] == nil and depth + 1 or depth - 1;
else
break;
end
end
-- This is necessary for working with HUGE tables otherwise we run out of memory using concat on huge strings
table.insert(output, output_str);
output_str = table.concat(output);
return output_str;
end
function this.table.tostringln(table_)
return "\n" .. table_tostring(table_);
end
function this.table.is_empty(table_)
return next(table_) == nil;
end
function this.table.deep_copy(original, copies)
copies = copies or {};
local original_type = type(original);
local copy;
if original_type == "table" then
if copies[original] then
copy = copies[original];
else
copy = {};
copies[original] = copy;
for original_key, original_value in next, original, nil do
copy[deep_copy(original_key, copies)] = deep_copy(original_value,copies);
end
setmetatable(copy, deep_copy(getmetatable(original), copies));
end
else -- number, string, boolean, etc
copy = original;
end
return copy;
end
function this.table.find_index(table_, value, nullable)
for i = 1, #table_ do
if table_[i] == value then
return i;
end
end
if not nullable then
return 1;
end
return nil;
end
function this.table.merge(...)
local tables_to_merge = { ... };
assert(#tables_to_merge > 1, "There should be at least two tables to merge them");
for key, table_ in ipairs(tables_to_merge) do
assert(type(table_) == "table", string.format("Expected a table as function parameter %d", key));
end
local result = deep_copy(tables_to_merge[1]);
for i = 2, #tables_to_merge do
local from = tables_to_merge[i];
for key, value in pairs(from) do
if type(value) == "table" then
result[key] = result[key] or {};
assert(type(result[key]) == "table", string.format("Expected a table: '%s'", key));
result[key] = merge(result[key], value);
else
result[key] = value;
end
end
end
return result;
end
function this.number.is_NaN(value)
return tostring(value) == tostring(0/0);
end
function this.number.round(value)
return math.floor(value + 0.5);
end
function this.string.trim(str)
return str:match("^%s*(.-)%s*$");
end
function this.string.starts_with(str, pattern)
return str:find("^" .. pattern) ~= nil;
end
function this.vec2.tostring(vector2f)
return string.format("<%f, %f>", vector2f.x, vector2f.y);
end
function this.vec2.random(distance)
distance = distance or 1;
local radians = math.random() * math.pi * 2;
return Vector2f.new(
distance * math.cos(radians),
distance * math.sin(radians)
);
end
function this.vec3.tostring(vector3f)
return string.format("<%f, %f, %f>", vector3f.x, vector3f.y, vector3f.z);
end
function this.vec4.tostring(vector4f)
return string.format("<%f, %f, %f, %f>", vector4f.x, vector4f.y, vector4f.z, vector4f.w);
end
--- When called without arguments, returns a pseudo-random float with uniform distribution in the range [0,1). When called with two floats min and max, math.random returns a pseudo-random float with uniform distribution in the range [min, max). The call .random(max) is equivalent to .random(1, max)
---@param min number
---@param max number
---@return number
function this.math.random(min, max)
if min == nil and max == nil then
return math.random();
end
if max == nil then
return max * math.random();
end
return min + (max - min) * math.random();
end
function this.math.sign(value)
return (value >= 0 and 1) or -1;
end
function this.math.round(value, bracket)
bracket = bracket or 1;
return math.floor(value / bracket + this.math.sign(value) * 0.5) * bracket;
end
-- https://github.com/blitmap/lua-utf8-simple/blob/master/utf8_simple.lua
-- ABNF from RFC 3629
--
-- UTF8-octets = *( UTF8-char )
-- UTF8-char = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4
-- UTF8-1 = %x00-7F
-- UTF8-2 = %xC2-DF UTF8-tail
-- UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) /
-- %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail )
-- UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) /
-- %xF4 %x80-8F 2( UTF8-tail )
-- UTF8-tail = %x80-BF
-- 0xxxxxxx | 007F (127)
-- 110xxxxx 10xxxxxx | 07FF (2047)
-- 1110xxxx 10xxxxxx 10xxxxxx | FFFF (65535)
-- 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx | 10FFFF (1114111)
local pattern = "[%z\1-\127\194-\244][\128-\191]*";
-- helper function
function this.unicode.relative_position(position, length)
if position < 0 then
position = length + position + 1;
end
return position;
end
-- THE MEAT
-- maps f over s's utf8 characters f can accept args: (visual_index, utf8_character, byte_index)
function this.unicode.map(s, f, no_subs)
local i = 0;
if no_subs then
for b, e in s:gmatch("()" .. pattern .. "()") do
i = i + 1;
local c = e - b;
f(i, c, b);
end
else
for b, c in s:gmatch("()(" .. pattern .. ")") do
i = i + 1;
f(i, c, b);
end
end
end
-- THE REST
-- returns the number of characters in a UTF-8 string
function this.unicode.len(s)
-- count the number of non-continuing bytes
return select(2, s:gsub('[^\128-\193]', ''));
end
-- replace all utf8 chars with mapping
function this.unicode.replace(s, map)
return s:gsub(pattern, map);
end
-- reverse a utf8 string
function this.unicode.reverse(s)
-- reverse the individual greater-than-single-byte characters
s = s:gsub(pattern, function (c)
return #c > 1 and c:reverse()
end);
return s:reverse();
end
-- strip non-ascii characters from a utf8 string
function this.unicode.strip(s)
return s:gsub(pattern, function(c)
return #c > 1 and '';
end);
end
-- generator for the above -- to iterate over all utf8 chars
function this.unicode.chars(s, no_subs)
return coroutine.wrap(function()
return unicode_map(s, coroutine.yield, no_subs);
end);
end
-- like string.sub() but i, j are utf8 strings
-- a utf8-safe string.sub()
function this.unicode.sub(str, i, j)
if coroutine == nil then
return str;
end
local l = utf8.len(str);
i = unicode_relative_position(i, l);
j = j and unicode_relative_position(j, l) or l;
if i < 1 then
i = 1;
end
if j > l then
j = l;
end
if i > j then
return "";
end
local diff = j - i;
local iterator = unicode_chars(str, true);
-- advance up to i
for _ = 1, i - 1 do
iterator();
end
local c, b = select(2, iterator());
-- i and j are the same, single-charaacter sub
if diff == 0 then
return string.sub(str, b, b + c - 1);
end
i = b;
-- advance up to j
for _ = 1, diff - 1 do
iterator();
end
c, b = select(2, iterator());
return string.sub(str, i, b + c - 1);
end
function this.init_module()
end
table_tostring = this.table.tostring;
deep_copy = this.table.deep_copy;
merge = this.table.merge;
is_empty = this.table.is_empty;
unicode_map = this.unicode.map;
unicode_relative_position = this.unicode.relative_position;
unicode_chars = this.unicode.chars;
return this;

View File

@@ -1,4 +1,5 @@
local ailment_buildup = {}; local this = {};
local players; local players;
local language; local language;
local config; local config;
@@ -7,18 +8,51 @@ local ailment_buildup_UI_entity;
local time; local time;
local small_monster; local small_monster;
local large_monster; local large_monster;
local table_helpers;
local drawing; local drawing;
function ailment_buildup.draw(monster, ailment_buildup_UI, cached_config, ailment_buildups_position_on_screen, opacity_scale) local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.draw(monster, ailment_buildup_UI, cached_config, ailment_buildups_position_on_screen, opacity_scale)
local cached_config = cached_config.ailment_buildups; local cached_config = cached_config.ailment_buildups;
local cached_damage_meter_UI_config = config.current_config.damage_meter_UI;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
if not cached_config.visibility then if not cached_config.visibility then
return; return;
end end
for id, ailment in pairs(monster.ailments) do for id, ailment in pairs(monster.ailments) do
if id == ailments.stun_id then if id == ailments.stun_id then
if not cached_config.filter.stun then if not cached_config.filter.stun then
@@ -42,24 +76,81 @@ function ailment_buildup.draw(monster, ailment_buildup_UI, cached_config, ailmen
goto continue goto continue
end end
local total_buildup = 0; local total_buildup = 0;
local top_buildup = 0; local top_buildup = 0;
local displayed_players = {}; local displayed_players = {};
for player_id, player_buildup in pairs(ailment.buildup) do for player, player_buildup in pairs(ailment.buildup) do
total_buildup = total_buildup + player_buildup; total_buildup = total_buildup + player_buildup;
if player_buildup > top_buildup then if player_buildup > top_buildup then
top_buildup = player_buildup; top_buildup = player_buildup;
end end
table.insert(displayed_players, displayed_players[player] = {
{ ["buildup"] = player_buildup,
["buildup"] = player_buildup, ["buildup_share"] = ailment.buildup_share[player],
["buildup_share"] = ailment.buildup_share[player_id], ["id"] = player.id
["id"] = player_id };
} end
);
for otomo, otomo_buildup in pairs(ailment.otomo_buildup) do
total_buildup = total_buildup + otomo_buildup;
if otomo_buildup > top_buildup then
top_buildup = otomo_buildup;
end
local player = players.get_player(otomo.id);
local displayed_player = displayed_players[player];
if otomo.type == players.types.my_otomo then
if cached_damage_meter_UI_config.settings.show_my_otomos_separately then
displayed_players[otomo] = {
["buildup"] = otomo_buildup,
["buildup_share"] = ailment.otomo_buildup_share[otomo],
["id"] = otomo.id
};
elseif player ~= nil then
displayed_players[player].buildup = displayed_players[player].buildup + otomo_buildup;
displayed_players[player].buildup_share = displayed_players[player].buildup_share + ailment.otomo_buildup_share[otomo];
end
elseif otomo.type == players.types.other_player_otomo then
if cached_damage_meter_UI_config.settings.show_other_player_otomos_separately then
displayed_players[otomo] = {
["buildup"] = otomo_buildup,
["buildup_share"] = ailment.otomo_buildup_share[otomo],
["id"] = otomo.id
};
elseif player ~= nil then
displayed_players[player].buildup = displayed_players[player].buildup + otomo_buildup;
displayed_players[player].buildup_share = displayed_players[player].buildup_share + ailment.otomo_buildup_share[otomo];
end
elseif otomo.type == players.types.servant_otomo then
if cached_damage_meter_UI_config.settings.show_servant_otomos_separately then
displayed_players[otomo] = {
["buildup"] = otomo_buildup,
["buildup_share"] = ailment.otomo_buildup_share[otomo],
["id"] = otomo.id
};
elseif player ~= nil then
displayed_players[player].buildup = displayed_players[player].buildup + otomo_buildup;
displayed_players[player].buildup_share = displayed_players[player].buildup_share + ailment.otomo_buildup_share[otomo];
end
end
end end
if total_buildup == 0 then if total_buildup == 0 then
@@ -98,6 +189,7 @@ function ailment_buildup.draw(monster, ailment_buildup_UI, cached_config, ailmen
end end
end end
local ailment_name = ""; local ailment_name = "";
if cached_config.ailment_name_label.include.ailment_name then if cached_config.ailment_name_label.include.ailment_name then
ailment_name = ailment.name .. " "; ailment_name = ailment.name .. " ";
@@ -108,20 +200,20 @@ function ailment_buildup.draw(monster, ailment_buildup_UI, cached_config, ailmen
drawing.draw_label(ailment_buildup_UI.ailment_name_label, ailment_buildups_position_on_screen, opacity_scale, ailment_name); drawing.draw_label(ailment_buildup_UI.ailment_name_label, ailment_buildups_position_on_screen, opacity_scale, ailment_name);
local last_j = 0; local j = 0;
for j, player in ipairs(displayed_players) do for player, displayed_player in pairs(displayed_players) do
local ailment_buildup_position_on_screen = { local ailment_buildup_position_on_screen = {
x = ailment_buildups_position_on_screen.x + cached_config.player_spacing.x * (j - 1) * global_scale_modifier, x = ailment_buildups_position_on_screen.x + cached_config.player_spacing.x * j * global_scale_modifier,
y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * (j - 1) * global_scale_modifier; y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * j * global_scale_modifier;
}; };
ailment_buildup_UI_entity.draw(player, ailment_buildup_UI, cached_config, ailment_buildup_position_on_screen, opacity_scale, top_buildup); ailment_buildup_UI_entity.draw(player, displayed_player, ailment_buildup_UI, cached_config, ailment_buildup_position_on_screen, opacity_scale, top_buildup);
last_j = j; j = j + 1;
end end
local total_buildup_position_on_screen = { local total_buildup_position_on_screen = {
x = ailment_buildups_position_on_screen.x + cached_config.player_spacing.x * last_j * global_scale_modifier, x = ailment_buildups_position_on_screen.x + cached_config.player_spacing.x * j * global_scale_modifier,
y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * last_j * global_scale_modifier; y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * j * global_scale_modifier;
}; };
drawing.draw_label(ailment_buildup_UI.total_buildup_label, total_buildup_position_on_screen, opacity_scale, language.current_language.UI.total_buildup); drawing.draw_label(ailment_buildup_UI.total_buildup_label, total_buildup_position_on_screen, opacity_scale, language.current_language.UI.total_buildup);
@@ -132,13 +224,14 @@ function ailment_buildup.draw(monster, ailment_buildup_UI, cached_config, ailmen
y = total_buildup_position_on_screen.y + 17 + cached_config.ailment_spacing.y * global_scale_modifier y = total_buildup_position_on_screen.y + 17 + cached_config.ailment_spacing.y * global_scale_modifier
}; };
::continue:: ::continue::
end end
end end
function ailment_buildup.init_module() function this.init_module()
players = require("MHR_Overlay.Damage_Meter.players"); players = require("MHR_Overlay.Damage_Meter.players");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
@@ -147,8 +240,7 @@ function ailment_buildup.init_module()
time = require("MHR_Overlay.Game_Handler.time"); time = require("MHR_Overlay.Game_Handler.time");
small_monster = require("MHR_Overlay.Monsters.small_monster"); small_monster = require("MHR_Overlay.Monsters.small_monster");
large_monster = require("MHR_Overlay.Monsters.large_monster"); large_monster = require("MHR_Overlay.Monsters.large_monster");
table_helpers = require("MHR_Overlay.Misc.table_helpers");
drawing = require("MHR_Overlay.UI.drawing"); drawing = require("MHR_Overlay.UI.drawing");
end end
return ailment_buildup; return this;

View File

@@ -1,9 +1,41 @@
local ailment_hook = {}; local this = {};
local small_monster; local small_monster;
local large_monster; local large_monster;
local config; local config;
local ailments; local ailments;
local table_helpers;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
local enemy_poison_damage_param_type_def = sdk.find_type_definition("snow.enemy.EnemyPoisonDamageParam"); 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 on_poison_activate_proc_method = enemy_poison_damage_param_type_def:get_method("onActivateProc");
@@ -28,7 +60,7 @@ local blast_param_type = blast_param_field:get_type();
local blast_damage_method = blast_param_type:get_method("get_BlastDamage"); local blast_damage_method = blast_param_type:get_method("get_BlastDamage");
local blast_adjust_rate_method = blast_param_type:get_method("get_BlastDamageAdjustRateByEnemyLv"); local blast_adjust_rate_method = blast_param_type:get_method("get_BlastDamageAdjustRateByEnemyLv");
function ailment_hook.poison_proc(poison_param) function this.poison_proc(poison_param)
if poison_param == nil then if poison_param == nil then
return; return;
end end
@@ -50,12 +82,13 @@ function ailment_hook.poison_proc(poison_param)
monster = small_monster.get_monster(enemy); monster = small_monster.get_monster(enemy);
end end
monster.ailments[ailments.poison_id].cached_buildup_share = table_helpers.deep_copy(monster.ailments[ailments monster.ailments[ailments.poison_id].cached_buildup_share = monster.ailments[ailments.poison_id].buildup_share;
.poison_id].buildup_share); monster.ailments[ailments.poison_id].cached_otomo_buildup_share = monster.ailments[ailments.poison_id].otomo_buildup_share;
ailments.clear_ailment_contribution(monster, ailments.poison_id); ailments.clear_ailment_contribution(monster, ailments.poison_id);
end end
function ailment_hook.blast_proc(blast_param) function this.blast_proc(blast_param)
if blast_param == nil then if blast_param == nil then
return; return;
end end
@@ -85,7 +118,7 @@ function ailment_hook.blast_proc(blast_param)
ailments.clear_ailment_contribution(monster, ailments.blast_id); ailments.clear_ailment_contribution(monster, ailments.blast_id);
end end
function ailment_hook.stock_damage() function this.stock_damage()
for enemy, monster in pairs(large_monster.list) do for enemy, monster in pairs(large_monster.list) do
local damage_param = damage_param_field:get_data(enemy); local damage_param = damage_param_field:get_data(enemy);
if damage_param == nil then if damage_param == nil then
@@ -111,30 +144,29 @@ function ailment_hook.stock_damage()
end end
end end
function ailment_hook.init_module() function this.init_module()
small_monster = require("MHR_Overlay.Monsters.small_monster"); small_monster = require("MHR_Overlay.Monsters.small_monster");
large_monster = require("MHR_Overlay.Monsters.large_monster"); large_monster = require("MHR_Overlay.Monsters.large_monster");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
ailments = require("MHR_Overlay.Monsters.ailments"); ailments = require("MHR_Overlay.Monsters.ailments");
table_helpers = require("MHR_Overlay.Misc.table_helpers");
sdk.hook(stock_damage_method, function(args) sdk.hook(stock_damage_method, function(args)
pcall(ailment_hook.stock_damage, sdk.to_managed_object(args[2])); pcall(this.stock_damage, sdk.to_managed_object(args[2]));
end, function(retval) end, function(retval)
return retval; return retval;
end); end);
sdk.hook(on_poison_activate_proc_method, function(args) sdk.hook(on_poison_activate_proc_method, function(args)
pcall(ailment_hook.poison_proc, sdk.to_managed_object(args[2])); pcall(this.poison_proc, sdk.to_managed_object(args[2]));
end, function(retval) end, function(retval)
return retval; return retval;
end); end);
sdk.hook(on_blast_activate_proc_method, function(args) sdk.hook(on_blast_activate_proc_method, function(args)
pcall(ailment_hook.blast_proc, sdk.to_managed_object(args[2])); pcall(this.blast_proc, sdk.to_managed_object(args[2]));
end, function(retval) end, function(retval)
return retval; return retval;
end); end);
end end
return ailment_hook; return this;

View File

@@ -1,4 +1,5 @@
local ailments = {}; local this = {};
local players; local players;
local language; local language;
local config; local config;
@@ -7,7 +8,39 @@ local ailment_buildup_UI_entity;
local time; local time;
local small_monster; local small_monster;
local large_monster; local large_monster;
local table_helpers; local non_players;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
--0 Paralyze --0 Paralyze
--1 Sleep --1 Sleep
@@ -27,131 +60,190 @@ local table_helpers;
--15 Koyashi --15 Koyashi
--16 SteelFang --16 SteelFang
ailments.paralyze_id = 0; this.paralyze_id = 0;
ailments.sleep_id = 1; this.sleep_id = 1;
ailments.stun_id = 2; this.stun_id = 2;
ailments.flash_id = 3; this.flash_id = 3;
ailments.poison_id = 4; this.poison_id = 4;
ailments.blast_id = 5; this.blast_id = 5;
ailments.exhaust_id = 6; this.exhaust_id = 6;
ailments.ride_id = 7; this.ride_id = 7;
ailments.water_id = 8; this.water_id = 8;
ailments.fire_id = 9; this.fire_id = 9;
ailments.ice_id = 10; this.ice_id = 10;
ailments.thunder_id = 11; this.thunder_id = 11;
ailments.fall_trap_id = 12; this.fall_trap_id = 12;
ailments.shock_trap_id = 13; this.shock_trap_id = 13;
ailments.capture_id = 14 --tranq bomb this.capture_id = 14 --tranq bomb
ailments.koyashi_id = 15; --dung bomb this.koyashi_id = 15; --dung bomb
ailments.steel_fang_id = 16; this.steel_fang_id = 16;
ailments.fall_quick_sand_id = 17; this.fall_quick_sand_id = 17;
ailments.fall_otomo_trap_id = 18; this.fall_otomo_trap_id = 18;
ailments.shock_otomo_trap_id = 19; this.shock_otomo_trap_id = 19;
function ailments.new(_ailments, ailment_id) function this.new(_ailments, ailment_id)
_ailments[ailment_id] = {}; local new_ailment = {}
new_ailment = {};
_ailments[ailment_id].is_enable = true; new_ailment.is_enable = true;
_ailments[ailment_id].id = ailment_id; new_ailment.id = ailment_id;
_ailments[ailment_id].total_buildup = 0; new_ailment.total_buildup = 0;
_ailments[ailment_id].buildup_limit = 0; new_ailment.buildup_limit = 0;
_ailments[ailment_id].buildup_percentage = 0; new_ailment.buildup_percentage = 0;
_ailments[ailment_id].timer = 0; new_ailment.timer = 0;
_ailments[ailment_id].duration = 100000; new_ailment.duration = 100000;
_ailments[ailment_id].timer_percentage = 0; new_ailment.timer_percentage = 0;
_ailments[ailment_id].minutes_left = 0; new_ailment.minutes_left = 0;
_ailments[ailment_id].seconds_left = 0; new_ailment.seconds_left = 0;
_ailments[ailment_id].is_active = false; new_ailment.is_active = false;
_ailments[ailment_id].activate_count = 0; new_ailment.activate_count = 0;
_ailments[ailment_id].last_change_time = time.total_elapsed_script_seconds; new_ailment.last_change_time = time.total_elapsed_script_seconds;
if ailment_id == ailments.paralyze_id then if ailment_id == this.paralyze_id then
_ailments[ailment_id].name = language.current_language.ailments.paralysis; new_ailment.name = language.current_language.ailments.paralysis;
elseif ailment_id == ailments.sleep_id then elseif ailment_id == this.sleep_id then
_ailments[ailment_id].name = language.current_language.ailments.sleep; new_ailment.name = language.current_language.ailments.sleep;
elseif ailment_id == ailments.stun_id then elseif ailment_id == this.stun_id then
_ailments[ailment_id].name = language.current_language.ailments.stun; new_ailment.name = language.current_language.ailments.stun;
elseif ailment_id == ailments.flash_id then elseif ailment_id == this.flash_id then
_ailments[ailment_id].name = language.current_language.ailments.flash; new_ailment.name = language.current_language.ailments.flash;
elseif ailment_id == ailments.poison_id then elseif ailment_id == this.poison_id then
_ailments[ailment_id].name = language.current_language.ailments.poison; new_ailment.name = language.current_language.ailments.poison;
elseif ailment_id == ailments.blast_id then elseif ailment_id == this.blast_id then
_ailments[ailment_id].name = language.current_language.ailments.blast; new_ailment.name = language.current_language.ailments.blast;
elseif ailment_id == ailments.exhaust_id then elseif ailment_id == this.exhaust_id then
_ailments[ailment_id].name = language.current_language.ailments.exhaust; new_ailment.name = language.current_language.ailments.exhaust;
elseif ailment_id == ailments.ride_id then elseif ailment_id == this.ride_id then
_ailments[ailment_id].name = language.current_language.ailments.ride; new_ailment.name = language.current_language.ailments.ride;
elseif ailment_id == ailments.water_id then elseif ailment_id == this.water_id then
_ailments[ailment_id].name = language.current_language.ailments.waterblight; new_ailment.name = language.current_language.ailments.waterblight;
elseif ailment_id == ailments.fire_id then elseif ailment_id == this.fire_id then
_ailments[ailment_id].name = language.current_language.ailments.fireblight; new_ailment.name = language.current_language.ailments.fireblight;
elseif ailment_id == ailments.ice_id then elseif ailment_id == this.ice_id then
_ailments[ailment_id].name = language.current_language.ailments.iceblight; new_ailment.name = language.current_language.ailments.iceblight;
elseif ailment_id == ailments.thunder_id then elseif ailment_id == this.thunder_id then
_ailments[ailment_id].name = language.current_language.ailments.thunderblight; new_ailment.name = language.current_language.ailments.thunderblight;
elseif ailment_id == ailments.fall_trap_id then elseif ailment_id == this.fall_trap_id then
_ailments[ailment_id].name = language.current_language.ailments.fall_trap; new_ailment.name = language.current_language.ailments.fall_trap;
elseif ailment_id == ailments.shock_trap_id then elseif ailment_id == this.shock_trap_id then
_ailments[ailment_id].name = language.current_language.ailments.shock_trap; new_ailment.name = language.current_language.ailments.shock_trap;
elseif ailment_id == ailments.capture_id then elseif ailment_id == this.capture_id then
_ailments[ailment_id].name = language.current_language.ailments.tranq_bomb; new_ailment.name = language.current_language.ailments.tranq_bomb;
elseif ailment_id == ailments.koyashi_id then elseif ailment_id == this.koyashi_id then
_ailments[ailment_id].name = language.current_language.ailments.dung_bomb; new_ailment.name = language.current_language.ailments.dung_bomb;
elseif ailment_id == ailments.steel_fang_id then elseif ailment_id == this.steel_fang_id then
_ailments[ailment_id].name = language.current_language.ailments.steel_fang; new_ailment.name = language.current_language.ailments.steel_fang;
elseif ailment_id == ailments.fall_quick_sand_id then elseif ailment_id == this.fall_quick_sand_id then
_ailments[ailment_id].name = language.current_language.ailments.quick_sand; new_ailment.name = language.current_language.ailments.quick_sand;
elseif ailment_id == ailments.fall_otomo_trap_id then elseif ailment_id == this.fall_otomo_trap_id then
_ailments[ailment_id].name = language.current_language.ailments.fall_otomo_trap; new_ailment.name = language.current_language.ailments.fall_otomo_trap;
elseif ailment_id == ailments.shock_otomo_trap_id then elseif ailment_id == this.shock_otomo_trap_id then
_ailments[ailment_id].name = language.current_language.ailments.shock_otomo_trap; new_ailment.name = language.current_language.ailments.shock_otomo_trap;
end end
_ailments[ailment_id] = new_ailment;
end end
function ailments.init_ailments() function this.init_ailments()
local _ailments = {}; local _ailments = {};
ailments.new(_ailments, ailments.paralyze_id); this.new(_ailments, this.paralyze_id);
ailments.new(_ailments, ailments.sleep_id); this.new(_ailments, this.sleep_id);
ailments.new(_ailments, ailments.stun_id); this.new(_ailments, this.stun_id);
ailments.new(_ailments, ailments.flash_id); this.new(_ailments, this.flash_id);
ailments.new(_ailments, ailments.poison_id); this.new(_ailments, this.poison_id);
ailments.new(_ailments, ailments.blast_id); this.new(_ailments, this.blast_id);
ailments.new(_ailments, ailments.exhaust_id); this.new(_ailments, this.exhaust_id);
ailments.new(_ailments, ailments.ride_id); this.new(_ailments, this.ride_id);
ailments.new(_ailments, ailments.water_id); this.new(_ailments, this.water_id);
ailments.new(_ailments, ailments.fire_id); this.new(_ailments, this.fire_id);
ailments.new(_ailments, ailments.ice_id); this.new(_ailments, this.ice_id);
ailments.new(_ailments, ailments.thunder_id); this.new(_ailments, this.thunder_id);
ailments.new(_ailments, ailments.fall_trap_id); this.new(_ailments, this.fall_trap_id);
ailments.new(_ailments, ailments.shock_trap_id); this.new(_ailments, this.shock_trap_id);
ailments.new(_ailments, ailments.capture_id); --tranq bomb this.new(_ailments, this.capture_id); --tranq bomb
ailments.new(_ailments, ailments.koyashi_id); --dung bomb this.new(_ailments, this.koyashi_id); --dung bomb
ailments.new(_ailments, ailments.steel_fang_id); this.new(_ailments, this.steel_fang_id);
--ailments.new(_ailments, ailments.fall_quick_sand_id); --ailments.new(_ailments, ailments.fall_quick_sand_id);
--ailments.new(_ailments, ailments.fall_otomo_trap_id); --ailments.new(_ailments, ailments.fall_otomo_trap_id);
--ailments.new(_ailments, ailments.shock_otomo_trap_id); --ailments.new(_ailments, ailments.shock_otomo_trap_id);
_ailments[ailments.poison_id].buildup = {}; _ailments[this.poison_id].buildup = {};
_ailments[ailments.poison_id].buildup_share = {}; _ailments[this.poison_id].buildup_share = {};
_ailments[ailments.poison_id].cached_buildup_share = {}; _ailments[this.poison_id].cached_buildup_share = {};
_ailments[ailments.blast_id].buildup = {}; _ailments[this.blast_id].buildup = {};
_ailments[ailments.blast_id].buildup_share = {}; _ailments[this.blast_id].buildup_share = {};
_ailments[ailments.stun_id].buildup = {}; _ailments[this.stun_id].buildup = {};
_ailments[ailments.stun_id].buildup_share = {}; _ailments[this.stun_id].buildup_share = {};
_ailments[this.poison_id].otomo_buildup = {};
_ailments[this.poison_id].otomo_buildup_share = {};
_ailments[this.poison_id].cached_otomo_buildup_share = {};
_ailments[this.blast_id].otomo_buildup = {};
_ailments[this.blast_id].otomo_buildup_share = {};
_ailments[this.stun_id].otomo_buildup = {};
_ailments[this.stun_id].otomo_buildup_share = {};
return _ailments; return _ailments;
end end
function this.init_ailment_names(_ailments)
for ailment_id, ailment in pairs(_ailments) do
if ailment_id == this.paralyze_id then
ailment.name = language.current_language.ailments.paralysis;
elseif ailment_id == this.sleep_id then
ailment.name = language.current_language.ailments.sleep;
elseif ailment_id == this.stun_id then
ailment.name = language.current_language.ailments.stun;
elseif ailment_id == this.flash_id then
ailment.name = language.current_language.ailments.flash;
elseif ailment_id == this.poison_id then
ailment.name = language.current_language.ailments.poison;
elseif ailment_id == this.blast_id then
ailment.name = language.current_language.ailments.blast;
elseif ailment_id == this.exhaust_id then
ailment.name = language.current_language.ailments.exhaust;
elseif ailment_id == this.ride_id then
ailment.name = language.current_language.ailments.ride;
elseif ailment_id == this.water_id then
ailment.name = language.current_language.ailments.waterblight;
elseif ailment_id == this.fire_id then
ailment.name = language.current_language.ailments.fireblight;
elseif ailment_id == this.ice_id then
ailment.name = language.current_language.ailments.iceblight;
elseif ailment_id == this.thunder_id then
ailment.name = language.current_language.ailments.thunderblight;
elseif ailment_id == this.fall_trap_id then
ailment.name = language.current_language.ailments.fall_trap;
elseif ailment_id == this.shock_trap_id then
ailment.name = language.current_language.ailments.shock_trap;
elseif ailment_id == this.capture_id then
ailment.name = language.current_language.ailments.tranq_bomb;
elseif ailment_id == this.koyashi_id then
ailment.name = language.current_language.ailments.dung_bomb;
elseif ailment_id == this.steel_fang_id then
ailment.name = language.current_language.ailments.steel_fang;
elseif ailment_id == this.fall_quick_sand_id then
ailment.name = language.current_language.ailments.quick_sand;
elseif ailment_id == this.fall_otomo_trap_id then
ailment.name = language.current_language.ailments.fall_otomo_trap;
elseif ailment_id == this.shock_otomo_trap_id then
ailment.name = language.current_language.ailments.shock_otomo_trap;
end
end
end
local enemy_character_base_type_def = sdk.find_type_definition("snow.enemy.EnemyCharacterBase"); local enemy_character_base_type_def = sdk.find_type_definition("snow.enemy.EnemyCharacterBase");
local enemy_condition_damage_param_base_type_def = sdk.find_type_definition("snow.enemy.EnemyConditionDamageParamBase"); local enemy_condition_damage_param_base_type_def = sdk.find_type_definition("snow.enemy.EnemyConditionDamageParamBase");
@@ -182,7 +274,7 @@ local system_array_type_def = sdk.find_type_definition("System.Array");
local length_method = system_array_type_def:get_method("get_Length"); local length_method = system_array_type_def:get_method("get_Length");
local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)"); local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)");
function ailments.update_ailments(enemy, monster) function this.update_ailments(enemy, monster)
if enemy == nil then if enemy == nil then
return; return;
end end
@@ -191,7 +283,7 @@ function ailments.update_ailments(enemy, monster)
return; return;
end end
ailments.update_stun_poison_blast_ailments(monster, damage_param); this.update_stun_poison_blast_ailments(monster, damage_param);
if not config.current_config.large_monster_UI.dynamic.ailments.visibility if not config.current_config.large_monster_UI.dynamic.ailments.visibility
and not config.current_config.large_monster_UI.static.ailments.visibility and not config.current_config.large_monster_UI.static.ailments.visibility
@@ -215,7 +307,7 @@ function ailments.update_ailments(enemy, monster)
end end
for id = 0, condition_param_array_length - 1 do for id = 0, condition_param_array_length - 1 do
if id == ailments.stun_id or id == ailments.poison_id or id == ailments.blast_id then if id == this.stun_id or id == this.poison_id or id == this.blast_id then
goto continue goto continue
end end
@@ -224,29 +316,29 @@ function ailments.update_ailments(enemy, monster)
goto continue goto continue
end end
ailments.update_ailment(monster, ailment_param, id); this.update_ailment(monster, ailment_param, id);
::continue:: ::continue::
end end
end end
function ailments.update_stun_poison_blast_ailments(monster, damage_param) function this.update_stun_poison_blast_ailments(monster, damage_param)
local stun_param = stun_param_field:get_data(damage_param); local stun_param = stun_param_field:get_data(damage_param);
if stun_param ~= nil then if stun_param ~= nil then
ailments.update_ailment(monster, stun_param, ailments.stun_id); this.update_ailment(monster, stun_param, this.stun_id);
end end
local poison_param = poison_param_field:get_data(damage_param); local poison_param = poison_param_field:get_data(damage_param);
if poison_param ~= nil then if poison_param ~= nil then
ailments.update_ailment(monster, poison_param, ailments.poison_id); this.update_ailment(monster, poison_param, this.poison_id);
end end
local blast_param = blast_param_field:get_data(damage_param); local blast_param = blast_param_field:get_data(damage_param);
if blast_param ~= nil then if blast_param ~= nil then
ailments.update_ailment(monster, blast_param, ailments.blast_id); this.update_ailment(monster, blast_param, this.blast_id);
end end
end end
function ailments.update_ailment(monster, ailment_param, id) function this.update_ailment(monster, ailment_param, id)
local is_enable = get_is_enable_method:call(ailment_param); local is_enable = get_is_enable_method:call(ailment_param);
local activate_count_array = get_activate_count_method:call(ailment_param); local activate_count_array = get_activate_count_method:call(ailment_param);
local buildup_array = get_stock_method:call(ailment_param); local buildup_array = get_stock_method:call(ailment_param);
@@ -321,17 +413,17 @@ function ailments.update_ailment(monster, ailment_param, id)
end end
if is_enable ~= monster.ailments[id].is_enable then if is_enable ~= monster.ailments[id].is_enable then
ailments.update_last_change_time(monster, id); this.update_last_change_time(monster, id);
end end
monster.ailments[id].is_enable = is_enable; monster.ailments[id].is_enable = is_enable;
if activate_count ~= nil then if activate_count ~= nil then
if activate_count ~= monster.ailments[id].activate_count then if activate_count ~= monster.ailments[id].activate_count then
ailments.update_last_change_time(monster, id); this.update_last_change_time(monster, id);
if id == ailments.stun_id then if id == this.stun_id then
ailments.clear_ailment_contribution(monster, ailments.stun_id); this.clear_ailment_contribution(monster, this.stun_id);
end end
end end
@@ -340,7 +432,7 @@ function ailments.update_ailment(monster, ailment_param, id)
if buildup ~= nil then if buildup ~= nil then
if buildup ~= monster.ailments[id].total_buildup then if buildup ~= monster.ailments[id].total_buildup then
ailments.update_last_change_time(monster, id); this.update_last_change_time(monster, id);
end end
monster.ailments[id].total_buildup = buildup; monster.ailments[id].total_buildup = buildup;
@@ -348,7 +440,7 @@ function ailments.update_ailment(monster, ailment_param, id)
if buildup_limit ~= nil then if buildup_limit ~= nil then
if buildup_limit ~= monster.ailments[id].buildup_limit then if buildup_limit ~= monster.ailments[id].buildup_limit then
ailments.update_last_change_time(monster, id); this.update_last_change_time(monster, id);
end end
monster.ailments[id].buildup_limit = buildup_limit; monster.ailments[id].buildup_limit = buildup_limit;
@@ -360,7 +452,7 @@ function ailments.update_ailment(monster, ailment_param, id)
if timer ~= nil then if timer ~= nil then
if timer ~= monster.ailments[id].timer then if timer ~= monster.ailments[id].timer then
ailments.update_last_change_time(monster, id); this.update_last_change_time(monster, id);
end end
monster.ailments[id].timer = timer; monster.ailments[id].timer = timer;
@@ -368,7 +460,7 @@ function ailments.update_ailment(monster, ailment_param, id)
if is_active ~= nil then if is_active ~= nil then
if is_active ~= monster.ailments[id].is_active then if is_active ~= monster.ailments[id].is_active then
ailments.update_last_change_time(monster, id); this.update_last_change_time(monster, id);
end end
monster.ailments[id].is_active = is_active; monster.ailments[id].is_active = is_active;
@@ -376,7 +468,7 @@ function ailments.update_ailment(monster, ailment_param, id)
if duration ~= nil and not monster.ailments[id].is_active then if duration ~= nil and not monster.ailments[id].is_active then
if duration ~= monster.ailments[id].duration then if duration ~= monster.ailments[id].duration then
ailments.update_last_change_time(monster, id); this.update_last_change_time(monster, id);
end end
monster.ailments[id].duration = duration; monster.ailments[id].duration = duration;
@@ -403,12 +495,12 @@ function ailments.update_ailment(monster, ailment_param, id)
end end
end end
function ailments.update_last_change_time(monster, id) function this.update_last_change_time(monster, id)
monster.ailments[id].last_change_time = time.total_elapsed_script_seconds; monster.ailments[id].last_change_time = time.total_elapsed_script_seconds;
end end
-- Code by coavins -- Code by coavins
function ailments.update_poison(monster, poison_param) function this.update_poison(monster, poison_param)
if monster == nil then if monster == nil then
return; return;
end end
@@ -419,95 +511,95 @@ function ailments.update_poison(monster, poison_param)
if is_damage then if is_damage then
local poison_damage = poison_damage_field:get_data(poison_param); local poison_damage = poison_damage_field:get_data(poison_param);
ailments.apply_ailment_damage(monster, ailments.poison_id, poison_damage); this.apply_ailment_damage(monster, this.poison_id, poison_damage);
end end
end end
end end
function ailments.draw(monster, ailment_UI, cached_config, ailments_position_on_screen, opacity_scale) function this.draw(monster, ailment_UI, cached_config, ailments_position_on_screen, opacity_scale)
local cached_config = cached_config.ailments; local cached_config = cached_config.ailments;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
--sort parts here --sort parts here
local displayed_ailments = {}; local displayed_ailments = {};
for id, ailment in pairs(monster.ailments) do for id, ailment in pairs(monster.ailments) do
if id == ailments.paralyze_id then if id == this.paralyze_id then
if not cached_config.filter.paralysis then if not cached_config.filter.paralysis then
goto continue goto continue
end end
elseif id == ailments.sleep_id then elseif id == this.sleep_id then
if not cached_config.filter.sleep then if not cached_config.filter.sleep then
goto continue goto continue
end end
elseif id == ailments.stun_id then elseif id == this.stun_id then
if not cached_config.filter.stun then if not cached_config.filter.stun then
goto continue goto continue
end end
elseif id == ailments.flash_id then elseif id == this.flash_id then
if not cached_config.filter.flash then if not cached_config.filter.flash then
goto continue goto continue
end end
elseif id == ailments.poison_id then elseif id == this.poison_id then
if not cached_config.filter.poison then if not cached_config.filter.poison then
goto continue goto continue
end end
elseif id == ailments.blast_id then elseif id == this.blast_id then
if not cached_config.filter.blast then if not cached_config.filter.blast then
goto continue goto continue
end end
elseif id == ailments.exhaust_id then elseif id == this.exhaust_id then
if not cached_config.filter.exhaust then if not cached_config.filter.exhaust then
goto continue goto continue
end end
elseif id == ailments.ride_id then elseif id == this.ride_id then
if not cached_config.filter.ride then if not cached_config.filter.ride then
goto continue goto continue
end end
elseif id == ailments.water_id then elseif id == this.water_id then
if not cached_config.filter.waterblight then if not cached_config.filter.waterblight then
goto continue goto continue
end end
elseif id == ailments.fire_id then elseif id == this.fire_id then
if not cached_config.filter.fireblight then if not cached_config.filter.fireblight then
goto continue goto continue
end end
elseif id == ailments.ice_id then elseif id == this.ice_id then
if not cached_config.filter.iceblight then if not cached_config.filter.iceblight then
goto continue goto continue
end end
elseif id == ailments.thunder_id then elseif id == this.thunder_id then
if not cached_config.filter.thunderblight then if not cached_config.filter.thunderblight then
goto continue goto continue
end end
elseif id == ailments.fall_trap_id then elseif id == this.fall_trap_id then
if not cached_config.filter.fall_trap then if not cached_config.filter.fall_trap then
goto continue goto continue
end end
elseif id == ailments.shock_trap_id then elseif id == this.shock_trap_id then
if not cached_config.filter.shock_trap then if not cached_config.filter.shock_trap then
goto continue goto continue
end end
elseif id == ailments.capture_id then elseif id == this.capture_id then
if not cached_config.filter.tranq_bomb then if not cached_config.filter.tranq_bomb then
goto continue goto continue
end end
elseif id == ailments.koyashi_id then elseif id == this.koyashi_id then
if not cached_config.filter.dung_bomb then if not cached_config.filter.dung_bomb then
goto continue goto continue
end end
elseif id == ailments.steel_fang_id then elseif id == this.steel_fang_id then
if not cached_config.filter.steel_fang then if not cached_config.filter.steel_fang then
goto continue goto continue
end end
elseif id == ailments.fall_quick_sand_id then elseif id == this.fall_quick_sand_id then
if not cached_config.filter.quick_sand then if not cached_config.filter.quick_sand then
goto continue goto continue
end end
elseif id == ailments.fall_otomo_trap_id then elseif id == this.fall_otomo_trap_id then
if not cached_config.filter.fall_otomo_trap then if not cached_config.filter.fall_otomo_trap then
goto continue goto continue
end end
elseif id == ailments.shock_otomo_trap_id then elseif id == this.shock_otomo_trap_id then
if not cached_config.filter.shock_otomo_trap then if not cached_config.filter.shock_otomo_trap then
goto continue goto continue
end end
@@ -593,14 +685,10 @@ function ailments.draw(monster, ailment_UI, cached_config, ailments_position_on_
end end
function ailments.apply_ailment_buildup(monster, attacker_id, ailment_type, ailment_buildup) function this.apply_ailment_buildup(monster, player, otomo, ailment_type, ailment_buildup)
if monster == nil or if monster == nil or
(ailment_type ~= ailments.poison_id and ailment_type ~= ailments.blast_id and ailment_type ~= ailments.stun_id) then (ailment_type ~= this.poison_id and ailment_type ~= this.blast_id and ailment_type ~= this.stun_id)
return; or (ailment_buildup == 0 or ailment_buildup == nil) then
end
if ailment_buildup == 0 or ailment_buildup == nil then
return; return;
end end
@@ -609,53 +697,83 @@ function ailments.apply_ailment_buildup(monster, attacker_id, ailment_type, ailm
monster.ailments[ailment_type].buildup = {}; monster.ailments[ailment_type].buildup = {};
end end
-- accumulate this buildup for this attacker -- get the otomo buildup accumulator for this type
monster.ailments[ailment_type].buildup[attacker_id] = (monster.ailments[ailment_type].buildup[attacker_id] or 0) + ailment_buildup; if monster.ailments[ailment_type].otomo_buildup == nil then
monster.ailments[ailment_type].otomo_buildup = {};
end
ailments.calculate_ailment_contribution(monster, ailment_type); if otomo == nil then
monster.ailments[ailment_type].buildup[player] = (monster.ailments[ailment_type].buildup[player] or 0) + ailment_buildup;
else
monster.ailments[ailment_type].otomo_buildup[otomo] = (monster.ailments[ailment_type].otomo_buildup[otomo] or 0) + ailment_buildup;
end
this.calculate_ailment_contribution(monster, ailment_type);
end end
-- Code by coavins -- Code by coavins
function ailments.calculate_ailment_contribution(monster, ailment_type) function this.calculate_ailment_contribution(monster, ailment_type)
-- get total -- get total
local total = 0; local total = 0;
for attacker_id, player_buildup in pairs(monster.ailments[ailment_type].buildup) do for player, player_buildup in pairs(monster.ailments[ailment_type].buildup) do
total = total + player_buildup; total = total + player_buildup;
end end
for attacker_id, player_buildup in pairs(monster.ailments[ailment_type].buildup) do for otomo, otomo_buildup in pairs(monster.ailments[ailment_type].otomo_buildup) do
-- update ratio for this attacker total = total + otomo_buildup;
monster.ailments[ailment_type].buildup_share[attacker_id] = player_buildup / total; end
if total == 0 then
total = 1;
end
for player, player_buildup in pairs(monster.ailments[ailment_type].buildup) do
-- update ratio for this player
monster.ailments[ailment_type].buildup_share[player] = player_buildup / total;
end
for otomo, otomo_buildup in pairs(monster.ailments[ailment_type].otomo_buildup) do
-- update ratio for this otomo
monster.ailments[ailment_type].otomo_buildup_share[otomo] = otomo_buildup / total;
end end
end end
function ailments.clear_ailment_contribution(monster, ailment_type) function this.clear_ailment_contribution(monster, ailment_type)
for attacker_id, player_buildup in pairs(monster.ailments[ailment_type].buildup) do monster.ailments[ailment_type].buildup = {};
monster.ailments[ailment_type].buildup_share[attacker_id] = 0; monster.ailments[ailment_type].otomo_buildup = {};
monster.ailments[ailment_type].buildup[attacker_id] = 0;
end monster.ailments[ailment_type].buildup_share = {};
monster.ailments[ailment_type].otomo_buildup_share = {};
end end
-- Code by coavins -- Code by coavins
function ailments.apply_ailment_damage(monster, ailment_type, ailment_damage) function this.apply_ailment_damage(monster, ailment_type, ailment_damage)
-- we only track poison and blast for now -- we only track poison and blast for now
if ailment_type == nil or ailment_damage == nil then if ailment_type == nil or ailment_damage == nil then
return; return;
end end
local damage_source_type = ""; local damage_source_type = "";
local otomo_damage_source_type = "";
local buildup_share = monster.ailments[ailment_type].buildup_share; local buildup_share = monster.ailments[ailment_type].buildup_share;
if ailment_type == ailments.poison_id then local otomo_buildup_share = monster.ailments[ailment_type].otomo_buildup_share;
if ailment_type == this.poison_id then
damage_source_type = "poison"; damage_source_type = "poison";
otomo_damage_source_type = "otomo poison";
buildup_share = monster.ailments[ailment_type].cached_buildup_share; buildup_share = monster.ailments[ailment_type].cached_buildup_share;
elseif ailment_type == ailments.blast_id then otomo_buildup_share = monster.ailments[ailment_type].cached_otomo_buildup_share;
elseif ailment_type == this.blast_id then
damage_source_type = "blast"; damage_source_type = "blast";
otomo_damage_source_type = "otomo blast";
else else
return; return;
end end
-- split up damage according to ratio of buildup on boss for this type -- split up damage according to ratio of buildup on boss for this type
for attacker_id, percentage in pairs(buildup_share) do for player, percentage in pairs(buildup_share) do
local damage_portion = ailment_damage * percentage; local damage_portion = ailment_damage * percentage;
local damage_object = {}; local damage_object = {};
@@ -664,11 +782,26 @@ function ailments.apply_ailment_damage(monster, ailment_type, ailment_damage)
damage_object.elemental_damage = 0; damage_object.elemental_damage = 0;
damage_object.ailment_damage = damage_portion; damage_object.ailment_damage = damage_portion;
local attacking_player = players.get_player(attacker_id); players.update_damage(player, damage_source_type, monster.is_large, damage_object);
end
if attacking_player ~= nil then -- split up damage according to ratio of buildup on boss for this type
players.update_damage(attacking_player, damage_source_type, true, damage_object); for otomo, percentage in pairs(otomo_buildup_share) do
local damage_portion = ailment_damage * percentage;
local damage_object = {};
damage_object.total_damage = damage_portion;
damage_object.physical_damage = 0;
damage_object.elemental_damage = 0;
damage_object.ailment_damage = damage_portion;
local player = players.get_player(otomo.id);
if player ~= nil then
players.update_damage(player, otomo_damage_source_type, monster.is_large, damage_object);
end end
players.update_damage(otomo, otomo_damage_source_type, monster.is_large, damage_object);
end end
local damage_object = {}; local damage_object = {};
@@ -677,11 +810,12 @@ function ailments.apply_ailment_damage(monster, ailment_type, ailment_damage)
damage_object.elemental_damage = 0; damage_object.elemental_damage = 0;
damage_object.ailment_damage = ailment_damage; damage_object.ailment_damage = ailment_damage;
players.update_damage(players.total, damage_source_type, true, damage_object); players.update_damage(players.total, damage_source_type, monster.is_large, damage_object);
end end
function ailments.init_module() function this.init_module()
players = require("MHR_Overlay.Damage_Meter.players"); players = require("MHR_Overlay.Damage_Meter.players");
non_players = require("MHR_Overlay.Damage_Meter.non_players");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
ailment_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_UI_entity"); ailment_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_UI_entity");
@@ -689,7 +823,6 @@ function ailments.init_module()
time = require("MHR_Overlay.Game_Handler.time"); time = require("MHR_Overlay.Game_Handler.time");
small_monster = require("MHR_Overlay.Monsters.small_monster"); small_monster = require("MHR_Overlay.Monsters.small_monster");
large_monster = require("MHR_Overlay.Monsters.large_monster"); large_monster = require("MHR_Overlay.Monsters.large_monster");
table_helpers = require("MHR_Overlay.Misc.table_helpers");
end end
return ailments; return this;

View File

@@ -1,8 +1,8 @@
local body_part = {}; local this = {};
local singletons; local singletons;
local customization_menu; local customization_menu;
local config; local config;
local table_helpers;
local health_UI_entity; local health_UI_entity;
local stamina_UI_entity; local stamina_UI_entity;
local rage_UI_entity; local rage_UI_entity;
@@ -12,9 +12,41 @@ local drawing;
local part_names; local part_names;
local time; local time;
body_part.list = {}; local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function body_part.new(id, name) this.list = {};
function this.new(id, name)
local part = {}; local part = {};
part.id = id; part.id = id;
@@ -41,7 +73,7 @@ function body_part.new(id, name)
return part; return part;
end end
function body_part.update_flinch(part, part_current, part_max) function this.update_flinch(part, part_current, part_max)
if part_current > part.health then if part_current > part.health then
part.flinch_count = part.flinch_count + 1; part.flinch_count = part.flinch_count + 1;
end end
@@ -62,7 +94,7 @@ function body_part.update_flinch(part, part_current, part_max)
end end
end end
function body_part.update_break(part, part_break_current, part_break_max, part_break_count, part_break_max_count) function this.update_break(part, part_break_current, part_break_max, part_break_count, part_break_max_count)
if part.break_health ~= part_break_current then if part.break_health ~= part_break_current then
part.last_change_time = time.total_elapsed_script_seconds; part.last_change_time = time.total_elapsed_script_seconds;
@@ -91,7 +123,7 @@ function body_part.update_break(part, part_break_current, part_break_max, part_b
end end
end end
function body_part.update_loss(part, part_loss_current, part_loss_max, is_severed) function this.update_loss(part, part_loss_current, part_loss_max, is_severed)
if part.loss_health ~= part_loss_current then if part.loss_health ~= part_loss_current then
part.last_change_time = time.total_elapsed_script_seconds; part.last_change_time = time.total_elapsed_script_seconds;
end end
@@ -115,7 +147,7 @@ function body_part.update_loss(part, part_loss_current, part_loss_max, is_severe
end end
function body_part.draw(monster, part_UI, cached_config, parts_position_on_screen, opacity_scale) function this.draw(monster, part_UI, cached_config, parts_position_on_screen, opacity_scale)
local cached_config = cached_config.body_parts; local cached_config = cached_config.body_parts;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
@@ -125,6 +157,16 @@ function body_part.draw(monster, part_UI, cached_config, parts_position_on_scree
local break_supported = part.break_max_health > 0; local break_supported = part.break_max_health > 0;
local severe_supported = part.loss_max_health > 0; local severe_supported = part.loss_max_health > 0;
if cached_config.settings.filter_mode == "Current State" then
if break_supported and part.break_count >= part.break_max_count then
break_supported = false;
end
if severe_supported and part.is_severed then
severe_supported = false;
end
end
if health_supported then if health_supported then
if break_supported then if break_supported then
if severe_supported then if severe_supported then
@@ -298,11 +340,10 @@ function body_part.draw(monster, part_UI, cached_config, parts_position_on_scree
return last_part_position_on_screen; return last_part_position_on_screen;
end end
function body_part.init_module() function this.init_module()
singletons = require("MHR_Overlay.Game_Handler.singletons"); singletons = require("MHR_Overlay.Game_Handler.singletons");
customization_menu = require("MHR_Overlay.UI.customization_menu"); customization_menu = require("MHR_Overlay.UI.customization_menu");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
table_helpers = require("MHR_Overlay.Misc.table_helpers");
health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity"); health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity");
stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity"); stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity");
rage_UI_entity = require("MHR_Overlay.UI.UI_Entities.rage_UI_entity"); rage_UI_entity = require("MHR_Overlay.UI.UI_Entities.rage_UI_entity");
@@ -313,4 +354,4 @@ function body_part.init_module()
time = require("MHR_Overlay.Game_Handler.time"); time = require("MHR_Overlay.Game_Handler.time");
end end
return body_part; return this;

View File

@@ -1,9 +1,10 @@
local large_monster = {}; local this = {};
local singletons; local singletons;
local customization_menu; local customization_menu;
local config; local config;
local language; local language;
local table_helpers; local utils;
local health_UI_entity; local health_UI_entity;
local stamina_UI_entity; local stamina_UI_entity;
local rage_UI_entity; local rage_UI_entity;
@@ -16,13 +17,44 @@ local drawing;
local ailments; local ailments;
local players; local players;
local time; local time;
local body_part; local body_part;
local part_names; local part_names;
large_monster.list = {}; local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function large_monster.new(enemy) this.list = {};
function this.new(enemy)
local monster = {}; local monster = {};
monster.enemy = enemy; monster.enemy = enemy;
monster.is_large = true; monster.is_large = true;
@@ -92,35 +124,35 @@ function large_monster.new(enemy)
monster.static_UI = {}; monster.static_UI = {};
monster.highlighted_UI = {}; monster.highlighted_UI = {};
large_monster.init(monster, enemy); this.init(monster, enemy);
large_monster.init_UI(monster, monster.dynamic_UI, config.current_config.large_monster_UI.dynamic); this.init_UI(monster, monster.dynamic_UI, config.current_config.large_monster_UI.dynamic);
large_monster.init_UI(monster, monster.static_UI, config.current_config.large_monster_UI.static); this.init_UI(monster, monster.static_UI, config.current_config.large_monster_UI.static);
large_monster.init_UI(monster, monster.highlighted_UI, config.current_config.large_monster_UI.highlighted); this.init_UI(monster, monster.highlighted_UI, config.current_config.large_monster_UI.highlighted);
large_monster.update_position(enemy, monster); this.update_position(enemy, monster);
local physical_param = large_monster.update_health(enemy, monster); local physical_param = this.update_health(enemy, monster);
large_monster.update_stamina(enemy, monster, nil); this.update_stamina(enemy, monster, nil);
large_monster.update_stamina_timer(enemy, monster, nil); this.update_stamina_timer(enemy, monster, nil);
large_monster.update_rage(enemy, monster, nil); this.update_rage(enemy, monster, nil);
large_monster.update_rage_timer(enemy, monster, nil); this.update_rage_timer(enemy, monster, nil);
large_monster.update(enemy, monster); this.update(enemy, monster);
pcall(large_monster.update_parts, enemy, monster, physical_param); pcall(this.update_parts, enemy, monster, physical_param);
if large_monster.list[enemy] == nil then if this.list[enemy] == nil then
large_monster.list[enemy] = monster; this.list[enemy] = monster;
end end
return monster; return monster;
end end
function large_monster.get_monster(enemy) function this.get_monster(enemy)
local monster = large_monster.list[enemy]; local monster = this.list[enemy];
if monster == nil then if monster == nil then
monster = large_monster.new(enemy); monster = this.new(enemy);
end end
return monster; return monster;
end end
@@ -146,7 +178,7 @@ local get_set_info_method = enemy_character_base_type_def:get_method("get_SetInf
local set_info_type = get_set_info_method:get_return_type(); local set_info_type = get_set_info_method:get_return_type();
local get_unique_id_method = set_info_type:get_method("get_UniqueId"); local get_unique_id_method = set_info_type:get_method("get_UniqueId");
function large_monster.init(monster, enemy) function this.init(monster, enemy)
local enemy_type = enemy_type_field:get_data(enemy); local enemy_type = enemy_type_field:get_data(enemy);
if enemy_type == nil then if enemy_type == nil then
customization_menu.status = "No enemy type"; customization_menu.status = "No enemy type";
@@ -225,10 +257,10 @@ function large_monster.init(monster, enemy)
monster.is_capturable = is_capture_enable and not is_anomaly; monster.is_capturable = is_capture_enable and not is_anomaly;
end end
function large_monster.init_UI(monster, monster_UI, cached_config) function this.init_UI(monster, monster_UI, cached_config)
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
monster_UI.monster_name_label = table_helpers.deep_copy(cached_config.monster_name_label); monster_UI.monster_name_label = utils.table.deep_copy(cached_config.monster_name_label);
monster_UI.health_UI = health_UI_entity.new( monster_UI.health_UI = health_UI_entity.new(
cached_config.health.visibility, cached_config.health.visibility,
@@ -303,6 +335,8 @@ function large_monster.init_UI(monster, monster_UI, cached_config)
cached_config.ailment_buildups.total_buildup_label, cached_config.ailment_buildups.total_buildup_label,
cached_config.ailment_buildups.total_buildup_value_label cached_config.ailment_buildups.total_buildup_value_label
); );
ailments.init_ailment_names(monster.ailments);
end end
local physical_param_field = enemy_character_base_type_def:get_field("<PhysicalParam>k__BackingField"); local physical_param_field = enemy_character_base_type_def:get_field("<PhysicalParam>k__BackingField");
@@ -349,7 +383,7 @@ local system_array_type_def = sdk.find_type_definition("System.Array");
local length_method = system_array_type_def:get_method("get_Length"); local length_method = system_array_type_def:get_method("get_Length");
local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)"); local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)");
function large_monster.update_position(enemy, monster) function this.update_position(enemy, monster)
if not config.current_config.large_monster_UI.dynamic.enabled and if not config.current_config.large_monster_UI.dynamic.enabled and
config.current_config.large_monster_UI.static.sorting.type ~= "Distance" then config.current_config.large_monster_UI.static.sorting.type ~= "Distance" then
return; return;
@@ -362,24 +396,33 @@ function large_monster.update_position(enemy, monster)
end end
-- Code by coavins -- Code by coavins
function large_monster.update_all_riders() function this.update_all_riders()
for enemy, monster in pairs(large_monster.list) do for enemy, monster in pairs(this.list) do
-- get marionette rider -- get marionette rider
local mario_param = enemy:get_field("<MarioParam>k__BackingField"); local mario_param = enemy:get_field("<MarioParam>k__BackingField");
if mario_param ~= nil then if mario_param ~= nil then
local is_marionette = get_is_marionette_method:call(mario_param); local is_marionette = get_is_marionette_method:call(mario_param);
if is_marionette == nil then
goto continue;
end
if is_marionette then if is_marionette then
local player_id = get_mario_player_index_method:call(mario_param); local player_id = get_mario_player_index_method:call(mario_param);
if monster.rider_id ~= player_id then if player_id ~= nil then
monster.rider_id = player_id; monster.rider_id = player_id;
end end
else
monster.rider_id = -1;
end end
end end
::continue::
end end
end end
function large_monster.update(enemy, monster) function this.update(enemy, monster)
local cached_config = config.current_config.large_monster_UI; local cached_config = config.current_config.large_monster_UI;
if not cached_config.dynamic.enabled if not cached_config.dynamic.enabled
@@ -428,7 +471,7 @@ function large_monster.update(enemy, monster)
pcall(ailments.update_ailments, enemy, monster); pcall(ailments.update_ailments, enemy, monster);
end end
function large_monster.update_health(enemy, monster) function this.update_health(enemy, monster)
local cached_config = config.current_config.large_monster_UI; local cached_config = config.current_config.large_monster_UI;
if not cached_config.dynamic.enabled if not cached_config.dynamic.enabled
@@ -443,7 +486,7 @@ function large_monster.update_health(enemy, monster)
return nil; return nil;
end end
local physical_param = physical_param_field:get_data(enemy) local physical_param = physical_param_field:get_data(enemy);
if physical_param == nil then if physical_param == nil then
customization_menu.status = "No physical param"; customization_menu.status = "No physical param";
return nil; return nil;
@@ -468,7 +511,7 @@ function large_monster.update_health(enemy, monster)
return physical_param; return physical_param;
end end
function large_monster.update_stamina(enemy, monster, stamina_param) function this.update_stamina(enemy, monster, stamina_param)
local cached_config = config.current_config.large_monster_UI; local cached_config = config.current_config.large_monster_UI;
if not cached_config.dynamic.enabled if not cached_config.dynamic.enabled
@@ -505,7 +548,7 @@ function large_monster.update_stamina(enemy, monster, stamina_param)
end end
end end
function large_monster.update_stamina_timer(enemy, monster, stamina_param) function this.update_stamina_timer(enemy, monster, stamina_param)
local cached_config = config.current_config.large_monster_UI; local cached_config = config.current_config.large_monster_UI;
if not cached_config.dynamic.enabled if not cached_config.dynamic.enabled
@@ -552,7 +595,7 @@ function large_monster.update_stamina_timer(enemy, monster, stamina_param)
end end
end end
function large_monster.update_rage(enemy, monster, anger_param) function this.update_rage(enemy, monster, anger_param)
local cached_config = config.current_config.large_monster_UI; local cached_config = config.current_config.large_monster_UI;
if not cached_config.dynamic.enabled if not cached_config.dynamic.enabled
@@ -584,7 +627,7 @@ function large_monster.update_rage(enemy, monster, anger_param)
end end
end end
function large_monster.update_rage_timer(enemy, monster, anger_param) function this.update_rage_timer(enemy, monster, anger_param)
local cached_config = config.current_config.large_monster_UI; local cached_config = config.current_config.large_monster_UI;
if not cached_config.dynamic.enabled if not cached_config.dynamic.enabled
@@ -630,7 +673,7 @@ function large_monster.update_rage_timer(enemy, monster, anger_param)
end end
end end
function large_monster.update_parts(enemy, monster, physical_param) function this.update_parts(enemy, monster, physical_param)
local cached_config = config.current_config.large_monster_UI; local cached_config = config.current_config.large_monster_UI;
if not cached_config.dynamic.enabled if not cached_config.dynamic.enabled
@@ -764,7 +807,7 @@ function large_monster.update_parts(enemy, monster, physical_param)
end end
end end
function large_monster.draw(monster, type, cached_config, position_on_screen, opacity_scale) function this.draw(monster, type, cached_config, position_on_screen, opacity_scale)
local monster_UI; local monster_UI;
if type == "dynamic" then if type == "dynamic" then
@@ -861,16 +904,16 @@ function large_monster.draw(monster, type, cached_config, position_on_screen, op
drawing.draw_label(monster_UI.monster_name_label, position_on_screen, opacity_scale, monster_name_text); drawing.draw_label(monster_UI.monster_name_label, position_on_screen, opacity_scale, monster_name_text);
end end
function large_monster.init_list() function this.init_list()
large_monster.list = {}; this.list = {};
end end
function large_monster.init_module() function this.init_module()
singletons = require("MHR_Overlay.Game_Handler.singletons"); singletons = require("MHR_Overlay.Game_Handler.singletons");
customization_menu = require("MHR_Overlay.UI.customization_menu"); customization_menu = require("MHR_Overlay.UI.customization_menu");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
table_helpers = require("MHR_Overlay.Misc.table_helpers"); utils = require("MHR_Overlay.Misc.utils");
body_part = require("MHR_Overlay.Monsters.body_part"); body_part = require("MHR_Overlay.Monsters.body_part");
health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity"); health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity");
stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity"); stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity");
@@ -888,4 +931,4 @@ function large_monster.init_module()
ailment_buildup = require("MHR_Overlay.Monsters.ailment_buildup"); ailment_buildup = require("MHR_Overlay.Monsters.ailment_buildup");
end end
return large_monster; return this;

View File

@@ -1,4 +1,5 @@
local monster_hook = {}; local this = {};
local small_monster; local small_monster;
local large_monster; local large_monster;
local config; local config;
@@ -6,6 +7,38 @@ local ailments;
local players; local players;
local quest_status; local quest_status;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
local enemy_character_base_type_def = sdk.find_type_definition("snow.enemy.EnemyCharacterBase"); 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 enemy_character_base_update_method = enemy_character_base_type_def:get_method("update");
@@ -13,12 +46,14 @@ local is_boss_enemy_method = enemy_character_base_type_def:get_method("get_isBos
local enemy_damage_check_type_def = sdk.find_type_definition("snow.enemy.EnemyDamageCheck"); local enemy_damage_check_type_def = sdk.find_type_definition("snow.enemy.EnemyDamageCheck");
local damage_check_update_param_update_method = enemy_damage_check_type_def:get_method("updateParam"); local damage_check_update_param_update_method = enemy_damage_check_type_def:get_method("updateParam");
local get_ref_enemy = enemy_damage_check_type_def:get_method("get_RefEnemy");
local anger_param_type_def = sdk.find_type_definition("snow.enemy.EnemyAngerParam"); local anger_param_type_def = sdk.find_type_definition("snow.enemy.EnemyAngerParam");
local anger_add_method = anger_param_type_def:get_method("add"); local anger_add_method = anger_param_type_def:get_method("add");
local stamina_param_type_def = sdk.find_type_definition("snow.enemy.EnemyStaminaParam"); local stamina_param_type_def = sdk.find_type_definition("snow.enemy.EnemyStaminaParam");
local stamina_sub_method = stamina_param_type_def:get_method("sub"); local stamina_sub_method = stamina_param_type_def:get_method("sub");
local get_enemy_method = stamina_param_type_def:get_method("get_Em");
local tick_count = 0; local tick_count = 0;
local last_update_tick = 0; local last_update_tick = 0;
@@ -52,7 +87,7 @@ re.on_pre_application_entry("UpdateBehavior", function()
end end
end) end)
function monster_hook.update_monster(enemy) function this.update_monster(enemy)
if enemy == nil then if enemy == nil then
return; return;
end end
@@ -73,13 +108,13 @@ function monster_hook.update_monster(enemy)
end end
if is_large then if is_large then
monster_hook.update_large_monster(enemy); this.update_large_monster(enemy);
else else
monster_hook.update_small_monster(enemy); this.update_small_monster(enemy);
end end
end end
function monster_hook.update_large_monster(enemy) function this.update_large_monster(enemy)
local cached_config = config.current_config.large_monster_UI; local cached_config = config.current_config.large_monster_UI;
if not cached_config.dynamic.enabled and if not cached_config.dynamic.enabled and
@@ -126,7 +161,7 @@ function monster_hook.update_large_monster(enemy)
large_monster.update(enemy, monster); large_monster.update(enemy, monster);
end end
function monster_hook.update_small_monster(enemy) function this.update_small_monster(enemy)
if not config.current_config.small_monster_UI.enabled then if not config.current_config.small_monster_UI.enabled then
return; return;
end end
@@ -163,8 +198,8 @@ function monster_hook.update_small_monster(enemy)
end end
end end
function monster_hook.update_health(enemy_damage_stock_param) function this.update_health(enemy_damage_check)
local enemy = enemy_damage_stock_param:call("get_RefEnemy"); local enemy = get_ref_enemy:call(enemy_damage_check);
if enemy == nil then if enemy == nil then
return; return;
end end
@@ -185,12 +220,12 @@ function monster_hook.update_health(enemy_damage_stock_param)
end end
end end
function monster_hook.update_stamina(stamina_param, stamina_sub) function this.update_stamina(stamina_param, stamina_sub)
if stamina_sub <= 0 then if stamina_sub <= 0 then
return; return;
end end
local enemy = stamina_param:call("get_Em"); local enemy = get_enemy_method:call(stamina_param);
if enemy == nil then if enemy == nil then
return; return;
end end
@@ -199,12 +234,12 @@ function monster_hook.update_stamina(stamina_param, stamina_sub)
large_monster.update_stamina(enemy, monster, stamina_param); large_monster.update_stamina(enemy, monster, stamina_param);
end end
function monster_hook.update_stamina_timer(stamina_param, enemy) function this.update_stamina_timer(stamina_param, enemy)
local monster = large_monster.get_monster(enemy); local monster = large_monster.get_monster(enemy);
large_monster.update_stamina_timer(enemy, monster, stamina_param); large_monster.update_stamina_timer(enemy, monster, stamina_param);
end end
function monster_hook.update_rage(anger_param, anger_add, enemy) function this.update_rage(anger_param, anger_add, enemy)
if anger_add <= 0 then if anger_add <= 0 then
return; return;
end end
@@ -213,12 +248,12 @@ function monster_hook.update_rage(anger_param, anger_add, enemy)
large_monster.update_rage(enemy, monster, anger_param); large_monster.update_rage(enemy, monster, anger_param);
end end
function monster_hook.update_rage_timer(anger_param, enemy) function this.update_rage_timer(anger_param, enemy)
local monster = large_monster.get_monster(enemy); local monster = large_monster.get_monster(enemy);
large_monster.update_rage_timer(enemy, monster, anger_param); large_monster.update_rage_timer(enemy, monster, anger_param);
end end
function monster_hook.init_module() function this.init_module()
small_monster = require("MHR_Overlay.Monsters.small_monster"); small_monster = require("MHR_Overlay.Monsters.small_monster");
large_monster = require("MHR_Overlay.Monsters.large_monster"); large_monster = require("MHR_Overlay.Monsters.large_monster");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
@@ -227,29 +262,29 @@ function monster_hook.init_module()
quest_status = require("MHR_Overlay.Game_Handler.quest_status"); quest_status = require("MHR_Overlay.Game_Handler.quest_status");
sdk.hook(enemy_character_base_update_method, function(args) sdk.hook(enemy_character_base_update_method, function(args)
pcall(monster_hook.update_monster, sdk.to_managed_object(args[2])); pcall(this.update_monster, sdk.to_managed_object(args[2]));
end, function(retval) end, function(retval)
return retval; return retval;
end); end);
sdk.hook(damage_check_update_param_update_method, function(args) sdk.hook(damage_check_update_param_update_method, function(args)
pcall(monster_hook.update_health, sdk.to_managed_object(args[2])); pcall(this.update_health, sdk.to_managed_object(args[2]));
end, function(retval) end, function(retval)
return retval; return retval;
end); end);
sdk.hook(stamina_sub_method, function(args) sdk.hook(stamina_sub_method, function(args)
pcall(monster_hook.update_stamina, sdk.to_managed_object(args[2]), sdk.to_float(args[3])); pcall(this.update_stamina, sdk.to_managed_object(args[2]), sdk.to_float(args[3]));
end, function(retval) end, function(retval)
return retval; return retval;
end); end);
sdk.hook(anger_add_method, function(args) sdk.hook(anger_add_method, function(args)
pcall(monster_hook.update_rage, sdk.to_managed_object(args[2]), sdk.to_float(args[3]), pcall(this.update_rage, sdk.to_managed_object(args[2]), sdk.to_float(args[3]),
sdk.to_managed_object(args[4])); sdk.to_managed_object(args[4]));
end, function(retval) end, function(retval)
return retval; return retval;
end); end);
end end
return monster_hook; return this;

View File

@@ -1,8 +1,9 @@
local small_monster = {}; local this = {};
local singletons; local singletons;
local customization_menu; local customization_menu;
local config; local config;
local table_helpers; local utils;
local health_UI_entity; local health_UI_entity;
local stamina_UI_entity; local stamina_UI_entity;
local screen; local screen;
@@ -12,9 +13,41 @@ local ailment_UI_entity;
local ailment_buildup; local ailment_buildup;
local ailment_buildup_UI_entity; local ailment_buildup_UI_entity;
small_monster.list = {}; local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function small_monster.new(enemy) this.list = {};
function this.new(enemy)
local monster = {}; local monster = {};
monster.is_large = false; monster.is_large = false;
@@ -33,24 +66,24 @@ function small_monster.new(enemy)
monster.UI = {}; monster.UI = {};
small_monster.init(monster, enemy); this.init(monster, enemy);
small_monster.init_UI(monster); this.init_UI(monster);
small_monster.update_position(enemy, monster); this.update_position(enemy, monster);
small_monster.update_health(enemy, monster); this.update_health(enemy, monster);
small_monster.update(enemy, monster); this.update(enemy, monster);
if small_monster.list[enemy] == nil then if this.list[enemy] == nil then
small_monster.list[enemy] = monster; this.list[enemy] = monster;
end end
return monster; return monster;
end end
function small_monster.get_monster(enemy) function this.get_monster(enemy)
local monster = small_monster.list[enemy]; local monster = this.list[enemy];
if monster == nil then if monster == nil then
monster = small_monster.new(enemy); monster = this.new(enemy);
end end
return monster; return monster;
@@ -62,7 +95,7 @@ local enemy_type_field = enemy_character_base_type_def:get_field("<EnemyType>k__
local message_manager_type_def = sdk.find_type_definition("snow.gui.MessageManager"); local message_manager_type_def = sdk.find_type_definition("snow.gui.MessageManager");
local get_enemy_name_message_method = message_manager_type_def:get_method("getEnemyNameMessage"); local get_enemy_name_message_method = message_manager_type_def:get_method("getEnemyNameMessage");
function small_monster.init(monster, enemy) function this.init(monster, enemy)
local enemy_type = enemy_type_field:get_data(enemy); local enemy_type = enemy_type_field:get_data(enemy);
if enemy_type == nil then if enemy_type == nil then
customization_menu.status = "No enemy type"; customization_menu.status = "No enemy type";
@@ -77,13 +110,13 @@ function small_monster.init(monster, enemy)
end end
end end
function small_monster.init_UI(monster) function this.init_UI(monster)
local cached_config = config.current_config.small_monster_UI; local cached_config = config.current_config.small_monster_UI;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
local monster_UI = monster.UI; local monster_UI = monster.UI;
monster_UI.name_label = table_helpers.deep_copy(cached_config.monster_name_label); monster_UI.name_label = utils.table.deep_copy(cached_config.monster_name_label);
monster_UI.name_label.offset.x = monster_UI.name_label.offset.x * global_scale_modifier; monster_UI.name_label.offset.x = monster_UI.name_label.offset.x * global_scale_modifier;
monster_UI.name_label.offset.y = monster_UI.name_label.offset.y * global_scale_modifier; monster_UI.name_label.offset.y = monster_UI.name_label.offset.y * global_scale_modifier;
@@ -130,7 +163,7 @@ local get_max_method = vital_param_type:get_method("get_Max");
local get_pos_field = enemy_character_base_type_def:get_method("get_Pos"); local get_pos_field = enemy_character_base_type_def:get_method("get_Pos");
function small_monster.update_position(enemy, monster) function this.update_position(enemy, monster)
local cached_config = config.current_config.small_monster_UI; local cached_config = config.current_config.small_monster_UI;
if not cached_config.enabled then if not cached_config.enabled then
@@ -147,7 +180,7 @@ function small_monster.update_position(enemy, monster)
end end
end end
function small_monster.update(enemy, monster) function this.update(enemy, monster)
if not config.current_config.small_monster_UI.enabled then if not config.current_config.small_monster_UI.enabled then
return; return;
end end
@@ -160,7 +193,7 @@ function small_monster.update(enemy, monster)
pcall(ailments.update_ailments, enemy, monster); pcall(ailments.update_ailments, enemy, monster);
end end
function small_monster.update_health(enemy, monster) function this.update_health(enemy, monster)
if not config.current_config.small_monster_UI.enabled or not config.current_config.small_monster_UI.health.visibility then if not config.current_config.small_monster_UI.enabled or not config.current_config.small_monster_UI.health.visibility then
return; return;
end end
@@ -187,7 +220,7 @@ function small_monster.update_health(enemy, monster)
end end
end end
function small_monster.draw(monster, cached_config, position_on_screen, opacity_scale) function this.draw(monster, cached_config, position_on_screen, opacity_scale)
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
drawing.draw_label(monster.UI.name_label, position_on_screen, opacity_scale, monster.name); drawing.draw_label(monster.UI.name_label, position_on_screen, opacity_scale, monster.name);
@@ -212,15 +245,15 @@ function small_monster.draw(monster, cached_config, position_on_screen, opacity_
ailment_buildup.draw(monster, monster.UI.ailment_buildup_UI, cached_config, ailment_buildups_position_on_screen, opacity_scale); ailment_buildup.draw(monster, monster.UI.ailment_buildup_UI, cached_config, ailment_buildups_position_on_screen, opacity_scale);
end end
function small_monster.init_list() function this.init_list()
small_monster.list = {}; this.list = {};
end end
function small_monster.init_module() function this.init_module()
singletons = require("MHR_Overlay.Game_Handler.singletons"); singletons = require("MHR_Overlay.Game_Handler.singletons");
customization_menu = require("MHR_Overlay.UI.customization_menu"); customization_menu = require("MHR_Overlay.UI.customization_menu");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
table_helpers = require("MHR_Overlay.Misc.table_helpers"); utils = require("MHR_Overlay.Misc.utils");
health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity"); health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity");
stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity"); stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity");
screen = require("MHR_Overlay.Game_Handler.screen"); screen = require("MHR_Overlay.Game_Handler.screen");
@@ -231,4 +264,4 @@ function small_monster.init_module()
ailment_buildup_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_buildup_UI_entity"); ailment_buildup_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_buildup_UI_entity");
end end
return small_monster; return this;

View File

@@ -1,6 +1,6 @@
local ailment_buildups_customization = {}; local this = {};
local table_helpers; local utils;
local config; local config;
local screen; local screen;
local players; local players;
@@ -15,9 +15,42 @@ local customization_menu;
local label_customization; local label_customization;
local bar_customization; local bar_customization;
function ailment_buildups_customization.draw(cached_config) local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.draw(cached_config)
local changed = false; local changed = false;
local config_changed = false; local config_changed = false;
local index = 1;
if imgui.tree_node(language.current_language.customization_menu.ailment_buildups) then if imgui.tree_node(language.current_language.customization_menu.ailment_buildups) then
changed, cached_config.visibility = imgui.checkbox( changed, cached_config.visibility = imgui.checkbox(
@@ -70,7 +103,7 @@ function ailment_buildups_customization.draw(cached_config)
if imgui.tree_node(language.current_language.customization_menu.settings) then if imgui.tree_node(language.current_language.customization_menu.settings) then
changed, index = imgui.combo( changed, index = imgui.combo(
language.current_language.customization_menu.highlighted_bar, language.current_language.customization_menu.highlighted_bar,
table_helpers.find_index(customization_menu.highlighted_buildup_bar_types, cached_config.settings.highlighted_bar), utils.table.find_index(customization_menu.highlighted_buildup_bar_types, cached_config.settings.highlighted_bar),
customization_menu.displayed_highlighted_buildup_bar_types); customization_menu.displayed_highlighted_buildup_bar_types);
config_changed = config_changed or changed; config_changed = config_changed or changed;
@@ -81,7 +114,7 @@ function ailment_buildups_customization.draw(cached_config)
changed, index = imgui.combo( changed, index = imgui.combo(
language.current_language.customization_menu.buildup_bars_are_relative_to, language.current_language.customization_menu.buildup_bars_are_relative_to,
table_helpers.find_index(customization_menu.displayed_buildup_bar_relative_types, cached_config.settings.buildup_bar_relative_to), utils.table.find_index(customization_menu.displayed_buildup_bar_relative_types, cached_config.settings.buildup_bar_relative_to),
customization_menu.displayed_buildup_bar_relative_types); customization_menu.displayed_buildup_bar_relative_types);
config_changed = config_changed or changed; config_changed = config_changed or changed;
@@ -101,7 +134,7 @@ function ailment_buildups_customization.draw(cached_config)
if imgui.tree_node(language.current_language.customization_menu.sorting) then if imgui.tree_node(language.current_language.customization_menu.sorting) then
changed, index = imgui.combo( changed, index = imgui.combo(
language.current_language.customization_menu.type, language.current_language.customization_menu.type,
table_helpers.find_index(customization_menu.ailment_buildups_sorting_types, cached_config.sorting.type), utils.table.find_index(customization_menu.ailment_buildups_sorting_types, cached_config.sorting.type),
customization_menu.displayed_ailment_buildups_sorting_types); customization_menu.displayed_ailment_buildups_sorting_types);
config_changed = config_changed or changed; config_changed = config_changed or changed;
@@ -137,90 +170,8 @@ function ailment_buildups_customization.draw(cached_config)
imgui.tree_pop(); imgui.tree_pop();
end end
if imgui.tree_node(language.current_language.customization_menu.ailment_name_label) then changed = label_customization.draw(language.current_language.customization_menu.ailment_name_label, cached_config.ailment_name_label);
changed, cached_config.ailment_name_label.visibility = config_changed = config_changed or changed;
imgui.checkbox(language.current_language.customization_menu.visible,
cached_config.ailment_name_label.visibility);
config_changed = config_changed or changed;
if imgui.tree_node(language.current_language.customization_menu.include) then
changed, cached_config.ailment_name_label.include.ailment_name = imgui.checkbox(
language.current_language.customization_menu.ailment_name,
cached_config.ailment_name_label.include.ailment_name);
config_changed = config_changed or changed;
changed, cached_config.ailment_name_label.include.activation_count = imgui.checkbox(
language.current_language.customization_menu.activation_count,
cached_config.ailment_name_label.include.activation_count);
config_changed = config_changed or changed;
imgui.tree_pop();
end
if imgui.tree_node(language.current_language.customization_menu.offset) then
changed, cached_config.ailment_name_label.offset.x = imgui.drag_float(
language.current_language.customization_menu.x, cached_config.ailment_name_label.offset.x,
0.1, -screen.width, screen.width, "%.1f");
config_changed = config_changed or changed;
changed, cached_config.ailment_name_label.offset.y = imgui.drag_float(
language.current_language.customization_menu.y, cached_config.ailment_name_label.offset.y,
0.1, -screen.height, screen.height, "%.1f");
config_changed = config_changed or changed;
imgui.tree_pop();
end
if imgui.tree_node(language.current_language.customization_menu.color) then
changed, cached_config.ailment_name_label.color = imgui.color_picker_argb(
"", cached_config.ailment_name_label.color, customization_menu.color_picker_flags);
config_changed = config_changed or changed;
imgui.tree_pop();
end
if imgui.tree_node(language.current_language.customization_menu.shadow) then
changed, cached_config.ailment_name_label.shadow.visibility = imgui.checkbox(
language.current_language.customization_menu.visible, cached_config.ailment_name_label.shadow.visibility);
config_changed = config_changed or changed;
if imgui.tree_node(language.current_language.customization_menu.offset) then
changed, cached_config.ailment_name_label.shadow.offset.x = imgui.drag_float(
language.current_language.customization_menu.x, cached_config.ailment_name_label.shadow.offset.x,
0.1, -screen.width, screen.width, "%.1f");
config_changed = config_changed or changed;
changed, cached_config.ailment_name_label.shadow.offset.y = imgui.drag_float(
language.current_language.customization_menu.y, cached_config.ailment_name_label.shadow.offset.y,
0.1, -screen.height, screen.height, "%.1f");
config_changed = config_changed or changed;
imgui.tree_pop();
end
if imgui.tree_node(language.current_language.customization_menu.color) then
changed, cached_config.ailment_name_label.shadow.color = imgui.color_picker_argb(
"", cached_config.ailment_name_label.shadow.color, customization_menu.color_picker_flags);
config_changed = config_changed or changed;
imgui.tree_pop();
end
imgui.tree_pop();
end
imgui.tree_pop();
end
changed = label_customization.draw(language.current_language.customization_menu.player_name_label, cached_config.player_name_label); changed = label_customization.draw(language.current_language.customization_menu.player_name_label, cached_config.player_name_label);
config_changed = config_changed or changed; config_changed = config_changed or changed;
@@ -249,8 +200,8 @@ function ailment_buildups_customization.draw(cached_config)
return config_changed; return config_changed;
end end
function ailment_buildups_customization.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers"); utils = require("MHR_Overlay.Misc.utils");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
screen = require("MHR_Overlay.Game_Handler.screen"); screen = require("MHR_Overlay.Game_Handler.screen");
@@ -267,4 +218,4 @@ function ailment_buildups_customization.init_module()
bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization"); bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization");
end end
return ailment_buildups_customization; return this;

View File

@@ -1,6 +1,6 @@
local ailments_customization = {}; local this = {};
local table_helpers; local utils;
local config; local config;
local screen; local screen;
local players; local players;
@@ -15,9 +15,42 @@ local customization_menu;
local label_customization; local label_customization;
local bar_customization; local bar_customization;
function ailments_customization.draw(cached_config) local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.draw(cached_config)
local changed = false; local changed = false;
local config_changed = false; local config_changed = false;
local index = 0;
if imgui.tree_node(language.current_language.customization_menu.ailments) then if imgui.tree_node(language.current_language.customization_menu.ailments) then
changed, cached_config.visibility = imgui.checkbox( changed, cached_config.visibility = imgui.checkbox(
@@ -110,7 +143,7 @@ function ailments_customization.draw(cached_config)
if imgui.tree_node(language.current_language.customization_menu.sorting) then if imgui.tree_node(language.current_language.customization_menu.sorting) then
changed, index = imgui.combo( changed, index = imgui.combo(
language.current_language.customization_menu.type, language.current_language.customization_menu.type,
table_helpers.find_index(customization_menu.ailments_sorting_types, cached_config.sorting.type), utils.table.find_index(customization_menu.ailments_sorting_types, cached_config.sorting.type),
customization_menu.displayed_ailments_sorting_types); customization_menu.displayed_ailments_sorting_types);
config_changed = config_changed or changed; config_changed = config_changed or changed;
@@ -332,8 +365,8 @@ function ailments_customization.draw(cached_config)
return config_changed; return config_changed;
end end
function ailments_customization.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers"); utils = require("MHR_Overlay.Misc.utils");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
screen = require("MHR_Overlay.Game_Handler.screen"); screen = require("MHR_Overlay.Game_Handler.screen");
@@ -349,4 +382,4 @@ function ailments_customization.init_module()
bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization"); bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization");
end end
return ailments_customization; return this;

View File

@@ -1,6 +1,6 @@
local bar_customization = {}; local this = {};
local table_helpers; local utils;
local config; local config;
local screen; local screen;
local players; local players;
@@ -14,7 +14,39 @@ local keyboard;
local customization_menu; local customization_menu;
local line_customization; local line_customization;
function bar_customization.draw(bar_name, bar) local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.draw(bar_name, bar)
if bar == nil then if bar == nil then
return false; return false;
end end
@@ -67,7 +99,7 @@ function bar_customization.draw(bar_name, bar)
changed, index = imgui.combo(language.current_language.customization_menu.style, changed, index = imgui.combo(language.current_language.customization_menu.style,
table_helpers.find_index(customization_menu.outline_styles, utils.table.find_index(customization_menu.outline_styles,
bar.outline.style), bar.outline.style),
customization_menu.displayed_outline_styles); customization_menu.displayed_outline_styles);
bar_changed = bar_changed or changed; bar_changed = bar_changed or changed;
@@ -159,8 +191,8 @@ function bar_customization.draw(bar_name, bar)
return bar_changed; return bar_changed;
end end
function bar_customization.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers"); utils = require("MHR_Overlay.Misc.utils");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
screen = require("MHR_Overlay.Game_Handler.screen"); screen = require("MHR_Overlay.Game_Handler.screen");
@@ -175,4 +207,4 @@ function bar_customization.init_module()
line_customization = require("MHR_Overlay.UI.Customizations.line_customization"); line_customization = require("MHR_Overlay.UI.Customizations.line_customization");
end end
return bar_customization; return this;

View File

@@ -1,6 +1,6 @@
local body_parts_customization = {}; local this = {};
local table_helpers; local utils;
local config; local config;
local screen; local screen;
local players; local players;
@@ -15,9 +15,42 @@ local customization_menu;
local label_customization; local label_customization;
local bar_customization; local bar_customization;
function body_parts_customization.draw(cached_config) local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.draw(cached_config)
local changed = false; local changed = false;
local config_changed = false; local config_changed = false;
local index = 0;
if imgui.tree_node(language.current_language.customization_menu.body_parts) then if imgui.tree_node(language.current_language.customization_menu.body_parts) then
changed, cached_config.visibility = imgui.checkbox( changed, cached_config.visibility = imgui.checkbox(
@@ -57,6 +90,16 @@ function body_parts_customization.draw(cached_config)
config_changed = config_changed or changed; config_changed = config_changed or changed;
changed, index = imgui.combo(language.current_language.customization_menu.filter_mode,
utils.table.find_index(customization_menu.large_monster_UI_parts_filter_types, cached_config.settings.filter_mode),
customization_menu.displayed_large_monster_UI_parts_filter_types);
config_changed = config_changed or changed;
if changed then
cached_config.settings.filter_mode = customization_menu.large_monster_UI_parts_filter_types[index];
end
changed, cached_config.settings.time_limit = imgui.drag_float( changed, cached_config.settings.time_limit = imgui.drag_float(
language.current_language.customization_menu.time_limit, cached_config.settings.time_limit, 0.1, 0, 99999, "%.1f"); language.current_language.customization_menu.time_limit, cached_config.settings.time_limit, 0.1, 0, 99999, "%.1f");
@@ -68,8 +111,8 @@ function body_parts_customization.draw(cached_config)
if imgui.tree_node(language.current_language.customization_menu.sorting) then if imgui.tree_node(language.current_language.customization_menu.sorting) then
changed, index = imgui.combo( changed, index = imgui.combo(
language.current_language.customization_menu.type, language.current_language.customization_menu.type,
table_helpers.find_index(customization_menu.large_monster_UI_parts_sorting_types, cached_config.sorting.type), utils.table.find_index(customization_menu.large_monster_UI_parts_sorting_types, cached_config.sorting.type),
customization_menu.displayed_monster_UI_parts_sorting_types); customization_menu.displayed_large_monster_UI_parts_sorting_types);
config_changed = config_changed or changed; config_changed = config_changed or changed;
@@ -325,8 +368,8 @@ function body_parts_customization.draw(cached_config)
return config_changed; return config_changed;
end end
function body_parts_customization.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers"); utils = require("MHR_Overlay.Misc.utils");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
screen = require("MHR_Overlay.Game_Handler.screen"); screen = require("MHR_Overlay.Game_Handler.screen");
@@ -342,4 +385,4 @@ function body_parts_customization.init_module()
bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization"); bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization");
end end
return body_parts_customization; return this;

View File

@@ -1,6 +1,5 @@
local large_monster_UI_customization = {}; local this = {};
local table_helpers;
local config; local config;
local screen; local screen;
local players; local players;
@@ -15,7 +14,39 @@ local customization_menu;
local label_customization; local label_customization;
local bar_customization; local bar_customization;
function large_monster_UI_customization.draw(cached_config) local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.draw(cached_config)
local changed = false; local changed = false;
local config_changed = false; local config_changed = false;
@@ -57,8 +88,7 @@ function large_monster_UI_customization.draw(cached_config)
return config_changed; return config_changed;
end end
function large_monster_UI_customization.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
screen = require("MHR_Overlay.Game_Handler.screen"); screen = require("MHR_Overlay.Game_Handler.screen");
@@ -74,4 +104,4 @@ function large_monster_UI_customization.init_module()
bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization"); bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization");
end end
return large_monster_UI_customization; return this;

View File

@@ -1,6 +1,5 @@
local label_customization = {}; local this = {};
local table_helpers;
local config; local config;
local screen; local screen;
local players; local players;
@@ -13,7 +12,39 @@ local time_UI;
local keyboard; local keyboard;
local customization_menu; local customization_menu;
function label_customization.draw(label_name, label) local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.draw(label_name, label)
local label_changed = false; local label_changed = false;
local changed = false; local changed = false;
@@ -84,8 +115,7 @@ function label_customization.draw(label_name, label)
return label_changed; return label_changed;
end end
function label_customization.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
screen = require("MHR_Overlay.Game_Handler.screen"); screen = require("MHR_Overlay.Game_Handler.screen");
@@ -99,4 +129,4 @@ function label_customization.init_module()
customization_menu = require("MHR_Overlay.UI.customization_menu"); customization_menu = require("MHR_Overlay.UI.customization_menu");
end end
return label_customization; return this;

View File

@@ -1,6 +1,5 @@
local large_monster_UI_customization = {}; local this = {};
local table_helpers;
local config; local config;
local screen; local screen;
local players; local players;
@@ -22,7 +21,39 @@ local body_parts_customization;
local ailments_customization; local ailments_customization;
local ailment_buildups_customization; local ailment_buildups_customization;
function large_monster_UI_customization.draw(cached_config) local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.draw(cached_config)
local changed = false; local changed = false;
local config_changed = false; local config_changed = false;
@@ -50,8 +81,7 @@ function large_monster_UI_customization.draw(cached_config)
return config_changed; return config_changed;
end end
function large_monster_UI_customization.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
screen = require("MHR_Overlay.Game_Handler.screen"); screen = require("MHR_Overlay.Game_Handler.screen");
@@ -74,4 +104,4 @@ function large_monster_UI_customization.init_module()
ailment_buildups_customization = require("MHR_Overlay.UI.Customizations.ailment_buildups_customization"); ailment_buildups_customization = require("MHR_Overlay.UI.Customizations.ailment_buildups_customization");
end end
return large_monster_UI_customization; return this;

View File

@@ -1,6 +1,5 @@
local line_customization = {}; local this = {};
local table_helpers;
local config; local config;
local screen; local screen;
local players; local players;
@@ -13,7 +12,39 @@ local time_UI;
local keyboard; local keyboard;
local customization_menu; local customization_menu;
function line_customization.draw(line_name, line) local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.draw(line_name, line)
if line == nil then if line == nil then
return; return;
end end
@@ -64,8 +95,7 @@ function line_customization.draw(line_name, line)
return line_changed; return line_changed;
end end
function line_customization.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
screen = require("MHR_Overlay.Game_Handler.screen"); screen = require("MHR_Overlay.Game_Handler.screen");
@@ -79,4 +109,4 @@ function line_customization.init_module()
customization_menu = require("MHR_Overlay.UI.customization_menu"); customization_menu = require("MHR_Overlay.UI.customization_menu");
end end
return line_customization; return this;

View File

@@ -1,6 +1,5 @@
local module_visibility_customization = {}; local this = {};
local table_helpers;
local config; local config;
local screen; local screen;
local players; local players;
@@ -15,7 +14,39 @@ local customization_menu;
local label_customization; local label_customization;
local bar_customization; local bar_customization;
function module_visibility_customization.draw(cached_config) local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.draw(cached_config)
local changed = false; local changed = false;
local config_changed = false; local config_changed = false;
@@ -61,11 +92,16 @@ function module_visibility_customization.draw(cached_config)
config_changed = config_changed or changed; config_changed = config_changed or changed;
--[[changed, cached_config.buff_UI = imgui.checkbox(
language.current_language.customization_menu.buff_UI,
cached_config.buff_UI);
config_changed = config_changed or changed;]]
return config_changed; return config_changed;
end end
function module_visibility_customization.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
screen = require("MHR_Overlay.Game_Handler.screen"); screen = require("MHR_Overlay.Game_Handler.screen");
@@ -79,4 +115,4 @@ function module_visibility_customization.init_module()
customization_menu = require("MHR_Overlay.UI.customization_menu"); customization_menu = require("MHR_Overlay.UI.customization_menu");
end end
return module_visibility_customization; return this;

View File

@@ -1,6 +1,5 @@
local rage_customization = {}; local this = {};
local table_helpers;
local config; local config;
local screen; local screen;
local players; local players;
@@ -15,7 +14,39 @@ local customization_menu;
local label_customization; local label_customization;
local bar_customization; local bar_customization;
function rage_customization.draw(cached_config) local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.draw(cached_config)
local changed = false; local changed = false;
local config_changed = false; local config_changed = false;
@@ -60,8 +91,7 @@ function rage_customization.draw(cached_config)
return config_changed; return config_changed;
end end
function rage_customization.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
screen = require("MHR_Overlay.Game_Handler.screen"); screen = require("MHR_Overlay.Game_Handler.screen");
@@ -77,4 +107,4 @@ function rage_customization.init_module()
bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization"); bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization");
end end
return rage_customization; return this;

View File

@@ -1,6 +1,5 @@
local stamina_customization = {}; local this = {};
local table_helpers;
local config; local config;
local screen; local screen;
local players; local players;
@@ -15,7 +14,39 @@ local customization_menu;
local label_customization; local label_customization;
local bar_customization; local bar_customization;
function stamina_customization.draw(cached_config) local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.draw(cached_config)
local changed = false; local changed = false;
local config_changed = false; local config_changed = false;
@@ -60,8 +91,7 @@ function stamina_customization.draw(cached_config)
return config_changed; return config_changed;
end end
function stamina_customization.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
screen = require("MHR_Overlay.Game_Handler.screen"); screen = require("MHR_Overlay.Game_Handler.screen");
@@ -77,4 +107,4 @@ function stamina_customization.init_module()
bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization"); bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization");
end end
return stamina_customization; return this;

View File

@@ -0,0 +1,127 @@
local this = {};
local buff_UI_entity;
local config;
local buffs;
local screen;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.draw()
local cached_config = config.current_config.buff_UI;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
local displayed_buffs = {};
for _, buff in pairs(buffs.list) do
if not buff.is_active then
goto continue
end
table.insert(displayed_buffs, buff);
::continue::
end
-- sort
if cached_config.sorting.type == "Name" then
if cached_config.sorting.reversed_order then
table.sort(displayed_buffs, function(left, right)
return left.name > right.name;
end);
else
table.sort(displayed_buffs, function(left, right)
return left.name < right.name;
end);
end
elseif cached_config.sorting.type == "Timer" then
if cached_config.sorting.reversed_order then
table.sort(displayed_buffs, function(left, right)
return left.timer > right.timer;
end);
else
table.sort(displayed_buffs, function(left, right)
return left.timer < right.timer;
end);
end
else
if cached_config.sorting.reversed_order then
table.sort(displayed_buffs, function(left, right)
return left.duration > right.duration;
end);
else
table.sort(displayed_buffs, function(left, right)
return left.duration < right.duration;
end);
end
end
local position_on_screen = screen.calculate_absolute_coordinates(cached_config.position);
-- draw
for _, buff in ipairs(displayed_buffs) do
if not buff.is_active then
goto continue2
end
buffs.draw(buff, buff.buff_UI, position_on_screen, 1);
if cached_config.settings.orientation == "Horizontal" then
position_on_screen.x = position_on_screen.x + cached_config.spacing.x * global_scale_modifier;
else
position_on_screen.y = position_on_screen.y + cached_config.spacing.y * global_scale_modifier;
end
::continue2::
end
end
function this.init_module()
config = require("MHR_Overlay.Misc.config");
buff_UI_entity = require("MHR_Overlay.UI.UI_Entities.buff_UI_entity");
buffs = require("MHR_Overlay.Buffs.buffs");
--singletons = require("MHR_Overlay.Game_Handler.singletons");
config = require("MHR_Overlay.Misc.config");
--customization_menu = require("MHR_Overlay.UI.customization_menu");
--players = require("MHR_Overlay.Damage_Meter.players");
--non_players = require("MHR_Overlay.Damage_Meter.non_players");
--quest_status = require("MHR_Overlay.Game_Handler.quest_status");
screen = require("MHR_Overlay.Game_Handler.screen");
--drawing = require("MHR_Overlay.UI.drawing");
end
return this;

View File

@@ -1,4 +1,5 @@
local damage_meter_UI = {}; local this = {};
local singletons; local singletons;
local config; local config;
local customization_menu; local customization_menu;
@@ -8,10 +9,42 @@ local quest_status;
local screen; local screen;
local drawing; local drawing;
local language; local language;
local table_helpers; local utils;
damage_meter_UI.last_displayed_players = {}; local sdk = sdk;
damage_meter_UI.freeze_displayed_players = false; local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
this.last_displayed_players = {};
this.freeze_displayed_players = false;
local lobby_manager_type_def = sdk.find_type_definition("snow.LobbyManager"); local lobby_manager_type_def = sdk.find_type_definition("snow.LobbyManager");
local quest_hunter_info_field = lobby_manager_type_def:get_field("_questHunterInfo"); local quest_hunter_info_field = lobby_manager_type_def:get_field("_questHunterInfo");
@@ -24,7 +57,7 @@ local get_item_method = quest_hunter_info_type_def:get_method("get_Item");
local hunter_info_type_def = sdk.find_type_definition("snow.LobbyManager.HunterInfo"); local hunter_info_type_def = sdk.find_type_definition("snow.LobbyManager.HunterInfo");
local member_index_field = hunter_info_type_def:get_field("_memberIndex"); local member_index_field = hunter_info_type_def:get_field("_memberIndex");
function damage_meter_UI.draw() function this.draw()
local cached_config = config.current_config.damage_meter_UI; local cached_config = config.current_config.damage_meter_UI;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
@@ -34,13 +67,13 @@ function damage_meter_UI.draw()
local quest_players = {}; local quest_players = {};
if damage_meter_UI.freeze_displayed_players and not table_helpers.is_empty(damage_meter_UI.last_displayed_players) then if this.freeze_displayed_players and not utils.table.is_empty(this.last_displayed_players) then
quest_players = damage_meter_UI.last_displayed_players; quest_players = this.last_displayed_players;
else else
quest_players = players.display_list; quest_players = players.display_list;
end end
damage_meter_UI.last_displayed_players = quest_players; this.last_displayed_players = quest_players;
local top_damage = 0; local top_damage = 0;
local top_dps = 0; local top_dps = 0;
@@ -79,8 +112,7 @@ function damage_meter_UI.draw()
if not cached_config.settings.total_damage_offset_is_relative then if not cached_config.settings.total_damage_offset_is_relative then
position_on_screen = screen.calculate_absolute_coordinates(cached_config.position); position_on_screen = screen.calculate_absolute_coordinates(cached_config.position);
end end
for _, player in ipairs(quest_players) do for _, player in ipairs(quest_players) do
if player.display.total_damage == 0 and cached_config.settings.hide_player_if_player_damage_is_zero then if player.display.total_damage == 0 and cached_config.settings.hide_player_if_player_damage_is_zero then
@@ -99,6 +131,18 @@ function damage_meter_UI.draw()
if cached_config.settings.hide_other_players then if cached_config.settings.hide_other_players then
goto continue goto continue
end end
elseif player.type == players.types.my_otomo then
if not cached_config.settings.show_my_otomos_separately then
goto continue
end
elseif player.type == players.types.other_player_otomo then
if not cached_config.settings.show_other_player_otomos_separately then
goto continue
end
elseif player.type == players.types.servant_otomo then
if not cached_config.settings.show_servant_otomos_separately then
goto continue
end
end end
players.draw(player, position_on_screen, 1, top_damage, top_dps); players.draw(player, position_on_screen, 1, top_damage, top_dps);
@@ -131,7 +175,7 @@ function damage_meter_UI.draw()
end end
end end
function damage_meter_UI.init_module() function this.init_module()
singletons = require("MHR_Overlay.Game_Handler.singletons"); singletons = require("MHR_Overlay.Game_Handler.singletons");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
customization_menu = require("MHR_Overlay.UI.customization_menu"); customization_menu = require("MHR_Overlay.UI.customization_menu");
@@ -141,7 +185,7 @@ function damage_meter_UI.init_module()
screen = require("MHR_Overlay.Game_Handler.screen"); screen = require("MHR_Overlay.Game_Handler.screen");
drawing = require("MHR_Overlay.UI.drawing"); drawing = require("MHR_Overlay.UI.drawing");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
table_helpers = require("MHR_Overlay.Misc.table_helpers"); utils = require("MHR_Overlay.Misc.utils");
end end
return damage_meter_UI; return this;

View File

@@ -1,4 +1,5 @@
local env_creature_UI = {}; local this = {};
local singletons; local singletons;
local config; local config;
local customization_menu; local customization_menu;
@@ -6,15 +7,46 @@ local large_monster;
local screen; local screen;
local players; local players;
local drawing; local drawing;
local table_helpers;
local health_UI_entity; local health_UI_entity;
local stamina_UI_entity; local stamina_UI_entity;
local rage_UI_entity; local rage_UI_entity;
local env_creature; local env_creature;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
local enemy_manager_type_def = sdk.find_type_definition("snow.enemy.EnemyManager"); local enemy_manager_type_def = sdk.find_type_definition("snow.enemy.EnemyManager");
function env_creature_UI.draw() function this.draw()
if singletons.enemy_manager == nil then if singletons.enemy_manager == nil then
return; return;
end end
@@ -62,7 +94,7 @@ function env_creature_UI.draw()
end end
end end
function env_creature_UI.init_module() function this.init_module()
singletons = require("MHR_Overlay.Game_Handler.singletons"); singletons = require("MHR_Overlay.Game_Handler.singletons");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
customization_menu = require("MHR_Overlay.UI.customization_menu"); customization_menu = require("MHR_Overlay.UI.customization_menu");
@@ -70,11 +102,10 @@ function env_creature_UI.init_module()
screen = require("MHR_Overlay.Game_Handler.screen"); screen = require("MHR_Overlay.Game_Handler.screen");
players = require("MHR_Overlay.Damage_Meter.players"); players = require("MHR_Overlay.Damage_Meter.players");
drawing = require("MHR_Overlay.UI.drawing"); drawing = require("MHR_Overlay.UI.drawing");
table_helpers = require("MHR_Overlay.Misc.table_helpers");
health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity"); health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity");
stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity"); stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity");
rage_UI_entity = require("MHR_Overlay.UI.UI_Entities.rage_UI_entity"); rage_UI_entity = require("MHR_Overlay.UI.UI_Entities.rage_UI_entity");
env_creature = require("MHR_Overlay.Endemic_Life.env_creature"); env_creature = require("MHR_Overlay.Endemic_Life.env_creature");
end end
return env_creature_UI; return this;

View File

@@ -1,4 +1,5 @@
local large_monster_UI = {}; local this = {};
local singletons; local singletons;
local config; local config;
local customization_menu; local customization_menu;
@@ -6,11 +7,42 @@ local large_monster;
local screen; local screen;
local players; local players;
local drawing; local drawing;
local table_helpers;
local health_UI_entity; local health_UI_entity;
local stamina_UI_entity; local stamina_UI_entity;
local rage_UI_entity; local rage_UI_entity;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
local enemy_manager_type_def = sdk.find_type_definition("snow.enemy.EnemyManager"); local enemy_manager_type_def = sdk.find_type_definition("snow.enemy.EnemyManager");
local get_boss_enemy_count_method = enemy_manager_type_def:get_method("getBossEnemyCount"); local get_boss_enemy_count_method = enemy_manager_type_def:get_method("getBossEnemyCount");
local get_boss_enemy_method = enemy_manager_type_def:get_method("getBossEnemy"); local get_boss_enemy_method = enemy_manager_type_def:get_method("getBossEnemy");
@@ -21,7 +53,7 @@ local get_tg_camera_method = gui_manager_type_def:get_method("get_refGuiHud_TgCa
local tg_camera_type_def = get_tg_camera_method:get_return_type(); local tg_camera_type_def = get_tg_camera_method:get_return_type();
local get_targeting_enemy_index_field = tg_camera_type_def:get_field("OldTargetingEmIndex"); local get_targeting_enemy_index_field = tg_camera_type_def:get_field("OldTargetingEmIndex");
function large_monster_UI.draw(dynamic_enabled, static_enabled, highlighted_enabled) function this.draw(dynamic_enabled, static_enabled, highlighted_enabled)
local cached_config = config.current_config.large_monster_UI; local cached_config = config.current_config.large_monster_UI;
if singletons.enemy_manager == nil then if singletons.enemy_manager == nil then
@@ -121,19 +153,27 @@ function large_monster_UI.draw(dynamic_enabled, static_enabled, highlighted_enab
end end
if dynamic_enabled then if dynamic_enabled then
large_monster_UI.draw_dynamic(displayed_monsters, highlighted_monster, cached_config); local success = pcall(this.draw_dynamic, displayed_monsters, highlighted_monster, cached_config);
if not success then
customization_menu.status = string.format("[%s] Dynamic Large Monster drawing function threw an exception");
end
end end
if highlighted_enabled then if highlighted_enabled then
large_monster_UI.draw_highlighted(highlighted_monster, cached_config); local success = pcall(this.draw_highlighted, highlighted_monster, cached_config);
if not success then
customization_menu.status = string.format("[%s] Highlighted Large Monster drawing function threw an exception");
end
end end
if static_enabled then if static_enabled then
large_monster_UI.draw_static(displayed_monsters, highlighted_monster, cached_config); local success = pcall(this.draw_static, displayed_monsters, highlighted_monster, cached_config);
if not success then
customization_menu.status = string.format("[%s] Static Large Monster drawing function threw an exception");
end
end end
end end
function large_monster_UI.draw_dynamic(displayed_monsters, highlighted_monster, cached_config) function this.draw_dynamic(displayed_monsters, highlighted_monster, cached_config)
cached_config = cached_config.dynamic; cached_config = cached_config.dynamic;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
@@ -163,8 +203,7 @@ function large_monster_UI.draw_dynamic(displayed_monsters, highlighted_monster,
local position_on_screen = {}; local position_on_screen = {};
local world_offset = Vector3f.new(cached_config.world_offset.x, cached_config.world_offset.y, local world_offset = Vector3f.new(cached_config.world_offset.x, cached_config.world_offset.y, cached_config.world_offset.z);
cached_config.world_offset.z);
position_on_screen = draw.world_to_screen(monster.position + world_offset); position_on_screen = draw.world_to_screen(monster.position + world_offset);
@@ -191,7 +230,7 @@ function large_monster_UI.draw_dynamic(displayed_monsters, highlighted_monster,
end end
end end
function large_monster_UI.draw_static(displayed_monsters, highlighted_monster, cached_config) function this.draw_static(displayed_monsters, highlighted_monster, cached_config)
cached_config = cached_config.static; cached_config = cached_config.static;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
@@ -272,7 +311,7 @@ function large_monster_UI.draw_static(displayed_monsters, highlighted_monster, c
end end
end end
function large_monster_UI.draw_highlighted(monster, cached_config) function this.draw_highlighted(monster, cached_config)
cached_config = cached_config.highlighted; cached_config = cached_config.highlighted;
if monster == nil then if monster == nil then
@@ -281,14 +320,14 @@ function large_monster_UI.draw_highlighted(monster, cached_config)
local position_on_screen = screen.calculate_absolute_coordinates(cached_config.position); local position_on_screen = screen.calculate_absolute_coordinates(cached_config.position);
if monster.dead_or_captured and cached_config.settings.hide_dead_or_captured then if monster.dead_or_captured then
return; return;
end end
large_monster.draw(monster, "highlighted", cached_config, position_on_screen, 1); large_monster.draw(monster, "highlighted", cached_config, position_on_screen, 1);
end end
function large_monster_UI.init_module() function this.init_module()
singletons = require("MHR_Overlay.Game_Handler.singletons"); singletons = require("MHR_Overlay.Game_Handler.singletons");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
customization_menu = require("MHR_Overlay.UI.customization_menu"); customization_menu = require("MHR_Overlay.UI.customization_menu");
@@ -296,10 +335,9 @@ function large_monster_UI.init_module()
screen = require("MHR_Overlay.Game_Handler.screen"); screen = require("MHR_Overlay.Game_Handler.screen");
players = require("MHR_Overlay.Damage_Meter.players"); players = require("MHR_Overlay.Damage_Meter.players");
drawing = require("MHR_Overlay.UI.drawing"); drawing = require("MHR_Overlay.UI.drawing");
table_helpers = require("MHR_Overlay.Misc.table_helpers");
health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity"); health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity");
stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity"); stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity");
rage_UI_entity = require("MHR_Overlay.UI.UI_Entities.rage_UI_entity"); rage_UI_entity = require("MHR_Overlay.UI.UI_Entities.rage_UI_entity");
end end
return large_monster_UI; return this;

View File

@@ -1,4 +1,5 @@
local small_monster_UI = {}; local this = {};
local singletons; local singletons;
local config; local config;
local small_monster; local small_monster;
@@ -6,15 +7,46 @@ local customization_menu;
local screen; local screen;
local players; local players;
local drawing; local drawing;
local table_helpers;
local health_UI_entity; local health_UI_entity;
local stamina_UI_entity; local stamina_UI_entity;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
local enemy_manager_type_def = sdk.find_type_definition("snow.enemy.EnemyManager"); local enemy_manager_type_def = sdk.find_type_definition("snow.enemy.EnemyManager");
local get_zako_enemy_count_method = enemy_manager_type_def:get_method("getZakoEnemyCount"); local get_zako_enemy_count_method = enemy_manager_type_def:get_method("getZakoEnemyCount");
local get_zako_enemy_method = enemy_manager_type_def:get_method("getZakoEnemy"); local get_zako_enemy_method = enemy_manager_type_def:get_method("getZakoEnemy");
function small_monster_UI.draw() function this.draw()
if singletons.enemy_manager == nil then if singletons.enemy_manager == nil then
return; return;
end end
@@ -154,7 +186,7 @@ function small_monster_UI.draw()
end end
end end
function small_monster_UI.init_module() function this.init_module()
singletons = require("MHR_Overlay.Game_Handler.singletons"); singletons = require("MHR_Overlay.Game_Handler.singletons");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
customization_menu = require("MHR_Overlay.UI.customization_menu"); customization_menu = require("MHR_Overlay.UI.customization_menu");
@@ -162,9 +194,8 @@ function small_monster_UI.init_module()
screen = require("MHR_Overlay.Game_Handler.screen"); screen = require("MHR_Overlay.Game_Handler.screen");
players = require("MHR_Overlay.Damage_Meter.players"); players = require("MHR_Overlay.Damage_Meter.players");
drawing = require("MHR_Overlay.UI.drawing"); drawing = require("MHR_Overlay.UI.drawing");
table_helpers = require("MHR_Overlay.Misc.table_helpers");
health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity"); health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity");
stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity"); stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity");
end end
return small_monster_UI; return this;

View File

@@ -1,13 +1,46 @@
local time_UI = {}; local this = {};
local time; local time;
local screen; local screen;
local config; local config;
local drawing; local drawing;
local table_helpers; local utils;
time_UI.label = nil; local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function time_UI.draw() this.label = nil;
function this.draw()
local elapsed_minutes = time.elapsed_minutes; local elapsed_minutes = time.elapsed_minutes;
local elapsed_seconds = time.elapsed_seconds; local elapsed_seconds = time.elapsed_seconds;
@@ -17,26 +50,26 @@ function time_UI.draw()
local position_on_screen = screen.calculate_absolute_coordinates(config.current_config.time_UI.position); local position_on_screen = screen.calculate_absolute_coordinates(config.current_config.time_UI.position);
drawing.draw_label(time_UI.label, position_on_screen, 1, elapsed_minutes, elapsed_seconds); drawing.draw_label(this.label, position_on_screen, 1, elapsed_minutes, elapsed_seconds);
end end
function time_UI.init_UI() function this.init_UI()
time_UI.label = table_helpers.deep_copy(config.current_config.time_UI.time_label); this.label = utils.table.deep_copy(config.current_config.time_UI.time_label);
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
time_UI.label.offset.x = time_UI.label.offset.x * global_scale_modifier; this.label.offset.x = this.label.offset.x * global_scale_modifier;
time_UI.label.offset.y = time_UI.label.offset.y * global_scale_modifier; this.label.offset.y = this.label.offset.y * global_scale_modifier;
end end
function time_UI.init_module() function this.init_module()
time = require("MHR_Overlay.Game_Handler.time"); time = require("MHR_Overlay.Game_Handler.time");
screen = require("MHR_Overlay.Game_Handler.screen"); screen = require("MHR_Overlay.Game_Handler.screen");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
drawing = require("MHR_Overlay.UI.drawing"); drawing = require("MHR_Overlay.UI.drawing");
table_helpers = require("MHR_Overlay.Misc.table_helpers"); utils = require("MHR_Overlay.Misc.utils");
time_UI.init_UI() this.init_UI()
end end
return time_UI; return this;

View File

@@ -1,21 +1,54 @@
local ailment_UI_entity = {}; local this = {};
local config; local config;
local table_helpers; local utils;
local drawing; local drawing;
local language; local language;
function ailment_UI_entity.new(visibility, bar, name_label, text_label, value_label, percentage_label, timer_label) local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.new(visibility, bar, name_label, text_label, value_label, percentage_label, timer_label)
local entity = {}; local entity = {};
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
entity.visibility = visibility; entity.visibility = visibility;
entity.bar = table_helpers.deep_copy(bar); entity.bar = utils.table.deep_copy(bar);
entity.name_label = table_helpers.deep_copy(name_label); entity.name_label = utils.table.deep_copy(name_label);
entity.text_label = table_helpers.deep_copy(text_label); entity.text_label = utils.table.deep_copy(text_label);
entity.value_label = table_helpers.deep_copy(value_label); entity.value_label = utils.table.deep_copy(value_label);
entity.percentage_label = table_helpers.deep_copy(percentage_label); entity.percentage_label = utils.table.deep_copy(percentage_label);
entity.timer_label = table_helpers.deep_copy(timer_label); entity.timer_label = utils.table.deep_copy(timer_label);
entity.bar.offset.x = entity.bar.offset.x * global_scale_modifier; entity.bar.offset.x = entity.bar.offset.x * global_scale_modifier;
entity.bar.offset.y = entity.bar.offset.y * global_scale_modifier; entity.bar.offset.y = entity.bar.offset.y * global_scale_modifier;
@@ -42,7 +75,7 @@ function ailment_UI_entity.new(visibility, bar, name_label, text_label, value_la
return entity; return entity;
end end
function ailment_UI_entity.draw(ailment, ailment_UI, cached_config, position_on_screen, opacity_scale) function this.draw(ailment, ailment_UI, cached_config, position_on_screen, opacity_scale)
if not ailment_UI.visibility then if not ailment_UI.visibility then
return; return;
end end
@@ -55,29 +88,41 @@ function ailment_UI_entity.draw(ailment, ailment_UI, cached_config, position_on_
ailment_name = ailment_name .. "x" .. tostring(ailment.activate_count); ailment_name = ailment_name .. "x" .. tostring(ailment.activate_count);
end end
local total_buildup_string = "";
if not ailment.is_active then
local include_current_value = ailment_UI.value_label.include.current_value;
local include_max_value = ailment_UI.value_label.include.max_value;
if include_current_value and include_max_value then
total_buildup_string = string.format("%.0f/%.0f", ailment.total_buildup, ailment.buildup_limit);
elseif include_current_value then
total_buildup_string = string.format("%.0f", ailment.total_buildup);
elseif include_max_value then
total_buildup_string = string.format("%.0f", ailment.buildup_limit);
end
end
if ailment.is_active then if ailment.is_active then
drawing.draw_bar(ailment_UI.bar, position_on_screen, opacity_scale, ailment.timer_percentage); drawing.draw_bar(ailment_UI.bar, position_on_screen, opacity_scale, ailment.timer_percentage);
drawing.draw_label(ailment_UI.name_label, position_on_screen, opacity_scale, ailment_name); drawing.draw_label(ailment_UI.name_label, position_on_screen, opacity_scale, ailment_name);
drawing.draw_label(ailment_UI.text_label, position_on_screen, opacity_scale, language.current_language.UI.buildup); drawing.draw_label(ailment_UI.text_label, position_on_screen, opacity_scale, language.current_language.UI.buildup);
drawing.draw_label(ailment_UI.timer_label, position_on_screen, opacity_scale, ailment.minutes_left, drawing.draw_label(ailment_UI.timer_label, position_on_screen, opacity_scale, ailment.minutes_left, ailment.seconds_left);
ailment.seconds_left);
else else
drawing.draw_bar(ailment_UI.bar, position_on_screen, opacity_scale, ailment.buildup_percentage); drawing.draw_bar(ailment_UI.bar, position_on_screen, opacity_scale, ailment.buildup_percentage);
drawing.draw_label(ailment_UI.name_label, position_on_screen, opacity_scale, ailment_name); drawing.draw_label(ailment_UI.name_label, position_on_screen, opacity_scale, ailment_name);
drawing.draw_label(ailment_UI.text_label, position_on_screen, opacity_scale, language.current_language.UI.buildup); drawing.draw_label(ailment_UI.text_label, position_on_screen, opacity_scale, language.current_language.UI.buildup);
drawing.draw_label(ailment_UI.value_label, position_on_screen, opacity_scale, ailment.total_buildup, drawing.draw_label(ailment_UI.value_label, position_on_screen, opacity_scale, total_buildup_string);
ailment.buildup_limit);
drawing.draw_label(ailment_UI.percentage_label, position_on_screen, opacity_scale, 100 * ailment.buildup_percentage); drawing.draw_label(ailment_UI.percentage_label, position_on_screen, opacity_scale, 100 * ailment.buildup_percentage);
end end
end end
function ailment_UI_entity.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers"); utils = require("MHR_Overlay.Misc.utils");
drawing = require("MHR_Overlay.UI.drawing"); drawing = require("MHR_Overlay.UI.drawing");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
end end
return ailment_UI_entity; return this;

View File

@@ -1,11 +1,44 @@
local ailment_buildup_UI_entity = {}; local this = {};
local table_helpers;
local utils;
local drawing; local drawing;
local config; local config;
local players; local players;
local language; local language;
function ailment_buildup_UI_entity.new(buildup_bar, highlighted_buildup_bar, ailment_name_label, player_name_label, local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.new(buildup_bar, highlighted_buildup_bar, ailment_name_label, player_name_label,
buildup_value_label, buildup_percentage_label, total_buildup_label, buildup_value_label, buildup_percentage_label, total_buildup_label,
total_buildup_value_label) total_buildup_value_label)
local entity = {}; local entity = {};
@@ -13,14 +46,14 @@ function ailment_buildup_UI_entity.new(buildup_bar, highlighted_buildup_bar, ail
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
--entity.visibility = visibility; --entity.visibility = visibility;
entity.buildup_bar = table_helpers.deep_copy(buildup_bar); entity.buildup_bar = utils.table.deep_copy(buildup_bar);
entity.highlighted_buildup_bar = table_helpers.deep_copy(highlighted_buildup_bar); entity.highlighted_buildup_bar = utils.table.deep_copy(highlighted_buildup_bar);
entity.ailment_name_label = table_helpers.deep_copy(ailment_name_label); entity.ailment_name_label = utils.table.deep_copy(ailment_name_label);
entity.player_name_label = table_helpers.deep_copy(player_name_label); entity.player_name_label = utils.table.deep_copy(player_name_label);
entity.buildup_value_label = table_helpers.deep_copy(buildup_value_label); entity.buildup_value_label = utils.table.deep_copy(buildup_value_label);
entity.buildup_percentage_label = table_helpers.deep_copy(buildup_percentage_label); entity.buildup_percentage_label = utils.table.deep_copy(buildup_percentage_label);
entity.total_buildup_label = table_helpers.deep_copy(total_buildup_label); entity.total_buildup_label = utils.table.deep_copy(total_buildup_label);
entity.total_buildup_value_label = table_helpers.deep_copy(total_buildup_value_label); entity.total_buildup_value_label = utils.table.deep_copy(total_buildup_value_label);
entity.buildup_bar.offset.x = entity.buildup_bar.offset.x * global_scale_modifier; entity.buildup_bar.offset.x = entity.buildup_bar.offset.x * global_scale_modifier;
entity.buildup_bar.offset.y = entity.buildup_bar.offset.y * global_scale_modifier; entity.buildup_bar.offset.y = entity.buildup_bar.offset.y * global_scale_modifier;
@@ -55,42 +88,41 @@ function ailment_buildup_UI_entity.new(buildup_bar, highlighted_buildup_bar, ail
return entity; return entity;
end end
function ailment_buildup_UI_entity.draw(_player_buildup, ailment_buildup_UI, cached_config, position_on_screen, opacity_scale, top_buildup) function this.draw(player, player_buildup, ailment_buildup_UI, cached_config, position_on_screen, opacity_scale, top_buildup)
local player_buildup_bar_percentage = 0; local player_buildup_bar_percentage = 0;
if cached_config.settings.buildup_bar_relative_to == "Total Buildup" then if cached_config.settings.buildup_bar_relative_to == "Total Buildup" then
player_buildup_bar_percentage = _player_buildup.buildup_share; player_buildup_bar_percentage = player_buildup.buildup_share;
else else
if top_buildup ~= 0 then if top_buildup ~= 0 then
player_buildup_bar_percentage = _player_buildup.buildup / top_buildup; player_buildup_bar_percentage = player_buildup.buildup / top_buildup;
end end
end end
if _player_buildup.id == players.myself.id and cached_config.settings.highlighted_bar == "Me" then if player.type == players.types.myself and cached_config.settings.highlighted_bar == "Me" then
drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage); drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage);
elseif cached_config.settings.highlighted_bar == "Top Buildup" and _player_buildup.buildup == top_buildup then elseif cached_config.settings.highlighted_bar == "Top Buildup" and player_buildup.buildup == top_buildup then
drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage); drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage);
else else
drawing.draw_bar(ailment_buildup_UI.buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage); drawing.draw_bar(ailment_buildup_UI.buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage);
end end
local player = players.get_player(_player_buildup.id); local player_name = tostring(player_buildup.id);
local player_name = "Player " .. tostring(_player_buildup.id);
if player ~= nil then if player ~= nil then
player_name = player.name; player_name = player.name;
end end
drawing.draw_label(ailment_buildup_UI.player_name_label, position_on_screen, opacity_scale, player_name); drawing.draw_label(ailment_buildup_UI.player_name_label, position_on_screen, opacity_scale, player_name);
drawing.draw_label(ailment_buildup_UI.buildup_value_label, position_on_screen, opacity_scale, _player_buildup.buildup); drawing.draw_label(ailment_buildup_UI.buildup_value_label, position_on_screen, opacity_scale, player_buildup.buildup);
drawing.draw_label(ailment_buildup_UI.buildup_percentage_label, position_on_screen, opacity_scale, 100 * _player_buildup.buildup_share); drawing.draw_label(ailment_buildup_UI.buildup_percentage_label, position_on_screen, opacity_scale, 100 * player_buildup.buildup_share);
end end
function ailment_buildup_UI_entity.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers"); utils = require("MHR_Overlay.Misc.utils");
drawing = require("MHR_Overlay.UI.drawing"); drawing = require("MHR_Overlay.UI.drawing");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
players = require("MHR_Overlay.Damage_Meter.players"); players = require("MHR_Overlay.Damage_Meter.players");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
end end
return ailment_buildup_UI_entity; return this;

View File

@@ -1,9 +1,42 @@
local body_part_UI_entity = {}; local this = {};
local config; local config;
local table_helpers; local utils;
local drawing; local drawing;
function body_part_UI_entity.new(part_visibility, part_name_label, flinch_visibility, flinch_bar, flinch_text_label, local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.new(part_visibility, part_name_label, flinch_visibility, flinch_bar, flinch_text_label,
flinch_value_label, flinch_percentage_label, break_visibility, break_bar, break_text_label, break_value_label, flinch_value_label, flinch_percentage_label, break_visibility, break_bar, break_text_label, break_value_label,
break_percentage_label, loss_visibility, loss_bar, loss_text_label, loss_value_label, loss_health_percentage_label) break_percentage_label, loss_visibility, loss_bar, loss_text_label, loss_value_label, loss_health_percentage_label)
@@ -16,15 +49,15 @@ function body_part_UI_entity.new(part_visibility, part_name_label, flinch_visibi
entity.break_visibility = break_visibility; entity.break_visibility = break_visibility;
entity.loss_visibility = loss_visibility; entity.loss_visibility = loss_visibility;
entity.part_name_label = table_helpers.deep_copy(part_name_label); entity.part_name_label = utils.table.deep_copy(part_name_label);
entity.part_name_label.offset.x = entity.part_name_label.offset.x * global_scale_modifier; entity.part_name_label.offset.x = entity.part_name_label.offset.x * global_scale_modifier;
entity.part_name_label.offset.y = entity.part_name_label.offset.y * global_scale_modifier; entity.part_name_label.offset.y = entity.part_name_label.offset.y * global_scale_modifier;
entity.flinch_bar = table_helpers.deep_copy(flinch_bar); entity.flinch_bar = utils.table.deep_copy(flinch_bar);
entity.flinch_text_label = table_helpers.deep_copy(flinch_text_label); entity.flinch_text_label = utils.table.deep_copy(flinch_text_label);
entity.flinch_value_label = table_helpers.deep_copy(flinch_value_label); entity.flinch_value_label = utils.table.deep_copy(flinch_value_label);
entity.flinch_percentage_label = table_helpers.deep_copy(flinch_percentage_label); entity.flinch_percentage_label = utils.table.deep_copy(flinch_percentage_label);
entity.flinch_bar.offset.x = entity.flinch_bar.offset.x * global_scale_modifier; entity.flinch_bar.offset.x = entity.flinch_bar.offset.x * global_scale_modifier;
entity.flinch_bar.offset.y = entity.flinch_bar.offset.y * global_scale_modifier; entity.flinch_bar.offset.y = entity.flinch_bar.offset.y * global_scale_modifier;
@@ -42,10 +75,10 @@ function body_part_UI_entity.new(part_visibility, part_name_label, flinch_visibi
entity.flinch_percentage_label.offset.x = entity.flinch_percentage_label.offset.x * global_scale_modifier; entity.flinch_percentage_label.offset.x = entity.flinch_percentage_label.offset.x * global_scale_modifier;
entity.flinch_percentage_label.offset.y = entity.flinch_percentage_label.offset.y * global_scale_modifier; entity.flinch_percentage_label.offset.y = entity.flinch_percentage_label.offset.y * global_scale_modifier;
entity.break_bar = table_helpers.deep_copy(break_bar); entity.break_bar = utils.table.deep_copy(break_bar);
entity.break_text_label = table_helpers.deep_copy(break_text_label); entity.break_text_label = utils.table.deep_copy(break_text_label);
entity.break_value_label = table_helpers.deep_copy(break_value_label); entity.break_value_label = utils.table.deep_copy(break_value_label);
entity.break_percentage_label = table_helpers.deep_copy(break_percentage_label); entity.break_percentage_label = utils.table.deep_copy(break_percentage_label);
entity.break_bar.offset.x = entity.break_bar.offset.x * global_scale_modifier; entity.break_bar.offset.x = entity.break_bar.offset.x * global_scale_modifier;
entity.break_bar.offset.y = entity.break_bar.offset.y * global_scale_modifier; entity.break_bar.offset.y = entity.break_bar.offset.y * global_scale_modifier;
@@ -63,10 +96,10 @@ function body_part_UI_entity.new(part_visibility, part_name_label, flinch_visibi
entity.break_percentage_label.offset.x = entity.break_percentage_label.offset.x * global_scale_modifier; entity.break_percentage_label.offset.x = entity.break_percentage_label.offset.x * global_scale_modifier;
entity.break_percentage_label.offset.y = entity.break_percentage_label.offset.y * global_scale_modifier; entity.break_percentage_label.offset.y = entity.break_percentage_label.offset.y * global_scale_modifier;
entity.loss_bar = table_helpers.deep_copy(loss_bar); entity.loss_bar = utils.table.deep_copy(loss_bar);
entity.loss_text_label = table_helpers.deep_copy(loss_text_label); entity.loss_text_label = utils.table.deep_copy(loss_text_label);
entity.loss_value_label = table_helpers.deep_copy(loss_value_label); entity.loss_value_label = utils.table.deep_copy(loss_value_label);
entity.loss_health_percentage_label = table_helpers.deep_copy(loss_health_percentage_label); entity.loss_health_percentage_label = utils.table.deep_copy(loss_health_percentage_label);
entity.loss_bar.offset.x = entity.loss_bar.offset.x * global_scale_modifier; entity.loss_bar.offset.x = entity.loss_bar.offset.x * global_scale_modifier;
entity.loss_bar.offset.y = entity.loss_bar.offset.y * global_scale_modifier; entity.loss_bar.offset.y = entity.loss_bar.offset.y * global_scale_modifier;
@@ -87,7 +120,7 @@ function body_part_UI_entity.new(part_visibility, part_name_label, flinch_visibi
return entity; return entity;
end end
function body_part_UI_entity.draw(part, part_UI, cached_config, position_on_screen, opacity_scale) function this.draw(part, part_UI, cached_config, position_on_screen, opacity_scale)
if not part_UI.part_visibility then if not part_UI.part_visibility then
return; return;
end end
@@ -121,9 +154,50 @@ function body_part_UI_entity.draw(part, part_UI, cached_config, position_on_scre
end end
end end
local health_string = string.format("%.0f/%.0f", part.health, part.max_health); -- health value string
local break_health_string = string.format("%.0f/%.0f", part.break_health, part.break_max_health); local health_string = "";
local loss_health_string = string.format("%.0f/%.0f", part.loss_health, part.loss_max_health); if draw_health then
local include_health_current_value = part_UI.flinch_value_label.include.current_value;
local include_health_max_value = part_UI.flinch_value_label.include.max_value;
if include_health_current_value and include_health_max_value then
health_string = string.format("%.0f/%.0f", part.health, part.max_health);
elseif include_health_current_value then
health_string = string.format("%.0f", part.health);
elseif include_health_max_value then
health_string = string.format("%.0f", part.max_health);
end
end
-- break health value string
local break_health_string = "";
if draw_break then
local include_break_health_current_value = part_UI.break_value_label.include.current_value;
local include_break_health_max_value = part_UI.break_value_label.include.max_value;
if include_break_health_current_value and include_break_health_max_value then
break_health_string = string.format("%.0f/%.0f", part.break_health, part.break_max_health);
elseif include_break_health_current_value then
break_health_string = string.format("%.0f", part.break_health);
elseif include_break_health_max_value then
break_health_string = string.format("%.0f", part.break_max_health);
end
end
-- loss health value string
local loss_health_string = "";
if draw_severe then
local include_loss_health_current_value = part_UI.loss_value_label.include.current_value;
local include_loss_health_max_value = part_UI.loss_value_label.include.max_value;
if include_loss_health_current_value and include_loss_health_max_value then
loss_health_string = string.format("%.0f/%.0f", part.loss_health, part.loss_max_health);
elseif include_loss_health_current_value then
loss_health_string = string.format("%.0f", part.loss_health);
elseif include_loss_health_max_value then
loss_health_string = string.format("%.0f", part.loss_max_health);
end
end
local flinch_position_on_screen = { local flinch_position_on_screen = {
x = position_on_screen.x + cached_config.part_health.offset.x, x = position_on_screen.x + cached_config.part_health.offset.x,
@@ -147,7 +221,7 @@ function body_part_UI_entity.draw(part, part_UI, cached_config, position_on_scre
drawing.draw_bar(part_UI.flinch_bar, flinch_position_on_screen, opacity_scale, part.health_percentage); drawing.draw_bar(part_UI.flinch_bar, flinch_position_on_screen, opacity_scale, part.health_percentage);
end end
if draw_break then if draw_break then
drawing.draw_bar(part_UI.break_bar, break_position_on_screen, opacity_scale, part.break_health_percentage); drawing.draw_bar(part_UI.break_bar, break_position_on_screen, opacity_scale, part.break_health_percentage);
end end
@@ -176,10 +250,10 @@ function body_part_UI_entity.draw(part, part_UI, cached_config, position_on_scre
end end
end end
function body_part_UI_entity.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers"); utils = require("MHR_Overlay.Misc.utils");
drawing = require("MHR_Overlay.UI.drawing"); drawing = require("MHR_Overlay.UI.drawing");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
end end
return body_part_UI_entity; return this;

View File

@@ -0,0 +1,91 @@
local this = {};
local config;
local utils;
local drawing;
local language;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.new(bar, name_label, timer_label)
local entity = {};
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
--entity.visibility = visibility;
entity.bar = utils.table.deep_copy(bar);
entity.name_label = utils.table.deep_copy(name_label);
entity.timer_label = utils.table.deep_copy(timer_label);
entity.bar.offset.x = entity.bar.offset.x * global_scale_modifier;
entity.bar.offset.y = entity.bar.offset.y * global_scale_modifier;
entity.bar.size.width = entity.bar.size.width * global_scale_modifier;
entity.bar.size.height = entity.bar.size.height * global_scale_modifier;
entity.bar.outline.thickness = entity.bar.outline.thickness * global_scale_modifier;
entity.bar.outline.offset = entity.bar.outline.offset * global_scale_modifier;
entity.name_label.offset.x = entity.name_label.offset.x * global_scale_modifier;
entity.name_label.offset.y = entity.name_label.offset.y * global_scale_modifier;
entity.timer_label.offset.x = entity.timer_label.offset.x * global_scale_modifier;
entity.timer_label.offset.y = entity.timer_label.offset.y * global_scale_modifier;
return entity;
end
function this.draw(buff, buff_UI, position_on_screen, opacity_scale)
local cached_config = config.current_config.buff_UI;
if not buff.is_infinite then
drawing.draw_bar(buff_UI.bar, position_on_screen, opacity_scale, buff.timer_percentage);
elseif not cached_config.settings.hide_bar_for_infinite_buffs then
drawing.draw_bar(buff_UI.bar, position_on_screen, opacity_scale, 1);
end
drawing.draw_label(buff_UI.name_label, position_on_screen, opacity_scale, buff.name);
if not buff.is_infinite then
drawing.draw_label(buff_UI.timer_label, position_on_screen, opacity_scale, buff.minutes_left, buff.seconds_left);
elseif not cached_config.settings.hide_timer_for_infinite_buffs then
drawing.draw_label(buff_UI.timer_label, position_on_screen, opacity_scale, 0, 0);
end
end
function this.init_module()
utils = require("MHR_Overlay.Misc.utils");
drawing = require("MHR_Overlay.UI.drawing");
config = require("MHR_Overlay.Misc.config");
language = require("MHR_Overlay.Misc.language");
end
return this;

View File

@@ -1,5 +1,6 @@
local damage_UI_entity = {}; local this = {};
local table_helpers;
local utils;
local drawing; local drawing;
local config; local config;
local players; local players;
@@ -7,20 +8,50 @@ local language;
local quest_status; local quest_status;
local non_players; local non_players;
function damage_UI_entity.new(damage_meter_UI_elements, type) local sdk = sdk;
local entity = {}; local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
local cached_config = config.current_config.damage_meter_UI; function this.new(damage_meter_UI_elements, type)
local entity = {};
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
entity.bar = table_helpers.deep_copy(damage_meter_UI_elements.damage_bar); entity.bar = utils.table.deep_copy(damage_meter_UI_elements.damage_bar);
entity.name_label = table_helpers.deep_copy(damage_meter_UI_elements.name_label); entity.name_label = utils.table.deep_copy(damage_meter_UI_elements.name_label);
entity.hunter_rank_label = table_helpers.deep_copy(damage_meter_UI_elements.hunter_rank_label); entity.hunter_rank_label = utils.table.deep_copy(damage_meter_UI_elements.hunter_rank_label);
entity.cart_count_label = table_helpers.deep_copy(damage_meter_UI_elements.cart_count_label); entity.cart_count_label = utils.table.deep_copy(damage_meter_UI_elements.cart_count_label);
entity.dps_label = table_helpers.deep_copy(damage_meter_UI_elements.dps_label); entity.dps_label = utils.table.deep_copy(damage_meter_UI_elements.dps_label);
entity.value_label = table_helpers.deep_copy(damage_meter_UI_elements.damage_value_label); entity.value_label = utils.table.deep_copy(damage_meter_UI_elements.damage_value_label);
entity.percentage_label = table_helpers.deep_copy(damage_meter_UI_elements.damage_percentage_label); entity.percentage_label = utils.table.deep_copy(damage_meter_UI_elements.damage_percentage_label);
entity.player_name_size_limit = config.current_config.damage_meter_UI.settings.player_name_size_limit; entity.player_name_size_limit = config.current_config.damage_meter_UI.settings.player_name_size_limit;
@@ -80,7 +111,7 @@ function damage_UI_entity.new(damage_meter_UI_elements, type)
return entity; return entity;
end end
function damage_UI_entity.draw(player, position_on_screen, opacity_scale, top_damage, top_dps) function this.draw(player, position_on_screen, opacity_scale, top_damage, top_dps)
local cached_config = config.current_config.damage_meter_UI; local cached_config = config.current_config.damage_meter_UI;
local name_include = nil; local name_include = nil;
@@ -171,8 +202,8 @@ function damage_UI_entity.draw(player, position_on_screen, opacity_scale, top_da
local dps_label = player.damage_UI.dps_label; local dps_label = player.damage_UI.dps_label;
if player.type ~= players.types.total then if player.type ~= players.types.total then
if (cached_config.settings.highlighted_bar == "Top Damage" and player.display.total_damage == top_damage) or if (cached_config.settings.highlighted_bar == "Top Damage" and player.display.total_damage == top_damage and top_damage ~= 0) or
(cached_config.settings.highlighted_bar == "Top DPS" and player.dps == top_dps) then (cached_config.settings.highlighted_bar == "Top DPS" and player.dps == top_dps and top_dps ~= 0) then
bar = players.highlighted_damage_UI.bar; bar = players.highlighted_damage_UI.bar;
name_label = players.highlighted_damage_UI.name_label; name_label = players.highlighted_damage_UI.name_label;
hunter_rank_label = players.highlighted_damage_UI.hunter_rank_label; hunter_rank_label = players.highlighted_damage_UI.hunter_rank_label;
@@ -181,7 +212,6 @@ function damage_UI_entity.draw(player, position_on_screen, opacity_scale, top_da
dps_label = players.highlighted_damage_UI.dps_label; dps_label = players.highlighted_damage_UI.dps_label;
end end
end end
drawing.draw_bar(bar, position_on_screen, opacity_scale, player_damage_bar_percentage); drawing.draw_bar(bar, position_on_screen, opacity_scale, player_damage_bar_percentage);
@@ -194,12 +224,17 @@ function damage_UI_entity.draw(player, position_on_screen, opacity_scale, top_da
drawing.draw_label(dps_label, position_on_screen, opacity_scale, player.dps); drawing.draw_label(dps_label, position_on_screen, opacity_scale, player.dps);
if is_on_quest then if is_on_quest then
drawing.draw_label(player.damage_UI.cart_count_label, position_on_screen, opacity_scale, player.cart_count); if player.type == players.types.total then
drawing.draw_label(player.damage_UI.cart_count_label, position_on_screen, opacity_scale, quest_status.cart_count, quest_status.max_cart_count);
else
drawing.draw_label(player.damage_UI.cart_count_label, position_on_screen, opacity_scale, player.cart_count);
end
end end
end end
function damage_UI_entity.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers"); utils = require("MHR_Overlay.Misc.utils");
drawing = require("MHR_Overlay.UI.drawing"); drawing = require("MHR_Overlay.UI.drawing");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
players = require("MHR_Overlay.Damage_Meter.players"); players = require("MHR_Overlay.Damage_Meter.players");
@@ -208,4 +243,4 @@ function damage_UI_entity.init_module()
non_players = require("MHR_Overlay.Damage_Meter.non_players"); non_players = require("MHR_Overlay.Damage_Meter.non_players");
end end
return damage_UI_entity; return this;

View File

@@ -1,19 +1,52 @@
local health_UI_entity = {}; local this = {};
local table_helpers;
local utils;
local drawing; local drawing;
local language; local language;
local config; local config;
function health_UI_entity.new(visibility, bar, text_label, value_label, percentage_label) local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.new(visibility, bar, text_label, value_label, percentage_label)
local entity = {}; local entity = {};
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
entity.visibility = visibility; entity.visibility = visibility;
entity.bar = table_helpers.deep_copy(bar); entity.bar = utils.table.deep_copy(bar);
entity.text_label = table_helpers.deep_copy(text_label); entity.text_label = utils.table.deep_copy(text_label);
entity.value_label = table_helpers.deep_copy(value_label); entity.value_label = utils.table.deep_copy(value_label);
entity.percentage_label = table_helpers.deep_copy(percentage_label); entity.percentage_label = utils.table.deep_copy(percentage_label);
entity.bar.offset.x = entity.bar.offset.x * global_scale_modifier; entity.bar.offset.x = entity.bar.offset.x * global_scale_modifier;
entity.bar.offset.y = entity.bar.offset.y * global_scale_modifier; entity.bar.offset.y = entity.bar.offset.y * global_scale_modifier;
@@ -34,23 +67,35 @@ function health_UI_entity.new(visibility, bar, text_label, value_label, percenta
return entity; return entity;
end end
function health_UI_entity.draw(monster, health_UI, position_on_screen, opacity_scale) function this.draw(monster, health_UI, position_on_screen, opacity_scale)
if not health_UI.visibility then if not health_UI.visibility then
return; return;
end end
local include_current_value = health_UI.value_label.include.current_value;
local include_max_value = health_UI.value_label.include.max_value;
local health_string;
if include_current_value and include_max_value then
health_string = string.format("%.0f/%.0f", monster.health, monster.max_health);
elseif include_current_value then
health_string = string.format("%.0f", monster.health);
elseif include_max_value then
health_string = string.format("%.0f", monster.max_health);
end
drawing.draw_bar(health_UI.bar, position_on_screen, opacity_scale, monster.health_percentage); drawing.draw_bar(health_UI.bar, position_on_screen, opacity_scale, monster.health_percentage);
drawing.draw_label(health_UI.text_label, position_on_screen, opacity_scale, language.current_language.UI.HP); drawing.draw_label(health_UI.text_label, position_on_screen, opacity_scale, language.current_language.UI.HP);
drawing.draw_label(health_UI.value_label, position_on_screen, opacity_scale, monster.health, monster.max_health); drawing.draw_label(health_UI.value_label, position_on_screen, opacity_scale, health_string);
drawing.draw_label(health_UI.percentage_label, position_on_screen, opacity_scale, 100 * monster.health_percentage); drawing.draw_label(health_UI.percentage_label, position_on_screen, opacity_scale, 100 * monster.health_percentage);
end end
function health_UI_entity.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers"); utils = require("MHR_Overlay.Misc.utils");
drawing = require("MHR_Overlay.UI.drawing"); drawing = require("MHR_Overlay.UI.drawing");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
end end
return health_UI_entity; return this;

View File

@@ -1,20 +1,53 @@
local rage_UI_entity = {}; local this = {};
local table_helpers;
local utils;
local drawing; local drawing;
local language; local language;
local config; local config;
function rage_UI_entity.new(visibility, bar, text_label, value_label, percentage_label, timer_label) local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.new(visibility, bar, text_label, value_label, percentage_label, timer_label)
local entity = {}; local entity = {};
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
entity.visibility = visibility; entity.visibility = visibility;
entity.bar = table_helpers.deep_copy(bar); entity.bar = utils.table.deep_copy(bar);
entity.text_label = table_helpers.deep_copy(text_label); entity.text_label = utils.table.deep_copy(text_label);
entity.value_label = table_helpers.deep_copy(value_label); entity.value_label = utils.table.deep_copy(value_label);
entity.percentage_label = table_helpers.deep_copy(percentage_label); entity.percentage_label = utils.table.deep_copy(percentage_label);
entity.timer_label = table_helpers.deep_copy(timer_label); entity.timer_label = utils.table.deep_copy(timer_label);
entity.bar.offset.x = entity.bar.offset.x * global_scale_modifier; entity.bar.offset.x = entity.bar.offset.x * global_scale_modifier;
entity.bar.offset.y = entity.bar.offset.y * global_scale_modifier; entity.bar.offset.y = entity.bar.offset.y * global_scale_modifier;
@@ -38,11 +71,25 @@ function rage_UI_entity.new(visibility, bar, text_label, value_label, percentage
return entity; return entity;
end end
function rage_UI_entity.draw(monster, rage_UI, position_on_screen, opacity_scale) function this.draw(monster, rage_UI, position_on_screen, opacity_scale)
if not rage_UI.visibility then if not rage_UI.visibility then
return; return;
end end
local rage_string = "";
if not monster.is_in_rage then
local include_current_value = rage_UI.value_label.include.current_value;
local include_max_value = rage_UI.value_label.include.max_value;
if include_current_value and include_max_value then
rage_string = string.format("%.0f/%.0f", monster.rage_point, monster.rage_limit);
elseif include_current_value then
rage_string = string.format("%.0f", monster.rage_point);
elseif include_max_value then
rage_string = string.format("%.0f", monster.rage_limit);
end
end
if monster.is_in_rage then if monster.is_in_rage then
drawing.draw_bar(rage_UI.bar, position_on_screen, opacity_scale, monster.rage_timer_percentage); drawing.draw_bar(rage_UI.bar, position_on_screen, opacity_scale, monster.rage_timer_percentage);
@@ -53,16 +100,16 @@ function rage_UI_entity.draw(monster, rage_UI, position_on_screen, opacity_scale
drawing.draw_bar(rage_UI.bar, position_on_screen, opacity_scale, monster.rage_percentage); drawing.draw_bar(rage_UI.bar, position_on_screen, opacity_scale, monster.rage_percentage);
drawing.draw_label(rage_UI.text_label, position_on_screen, opacity_scale, language.current_language.UI.rage); drawing.draw_label(rage_UI.text_label, position_on_screen, opacity_scale, language.current_language.UI.rage);
drawing.draw_label(rage_UI.value_label, position_on_screen, opacity_scale, monster.rage_point, monster.rage_limit); drawing.draw_label(rage_UI.value_label, position_on_screen, opacity_scale, rage_string);
drawing.draw_label(rage_UI.percentage_label, position_on_screen, opacity_scale, 100 * monster.rage_percentage); drawing.draw_label(rage_UI.percentage_label, position_on_screen, opacity_scale, 100 * monster.rage_percentage);
end end
end end
function rage_UI_entity.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers"); utils = require("MHR_Overlay.Misc.utils");
drawing = require("MHR_Overlay.UI.drawing"); drawing = require("MHR_Overlay.UI.drawing");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
end end
return rage_UI_entity; return this;

View File

@@ -1,20 +1,53 @@
local stamina_UI_entity = {}; local this = {};
local table_helpers;
local utils;
local drawing; local drawing;
local language; local language;
local config; local config;
function stamina_UI_entity.new(visibility, bar, text_label, value_label, percentage_label, timer_label) local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function this.new(visibility, bar, text_label, value_label, percentage_label, timer_label)
local entity = {}; local entity = {};
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
entity.visibility = visibility; entity.visibility = visibility;
entity.bar = table_helpers.deep_copy(bar); entity.bar = utils.table.deep_copy(bar);
entity.text_label = table_helpers.deep_copy(text_label); entity.text_label = utils.table.deep_copy(text_label);
entity.value_label = table_helpers.deep_copy(value_label); entity.value_label = utils.table.deep_copy(value_label);
entity.percentage_label = table_helpers.deep_copy(percentage_label); entity.percentage_label = utils.table.deep_copy(percentage_label);
entity.timer_label = table_helpers.deep_copy(timer_label); entity.timer_label = utils.table.deep_copy(timer_label);
entity.bar.offset.x = entity.bar.offset.x * global_scale_modifier; entity.bar.offset.x = entity.bar.offset.x * global_scale_modifier;
entity.bar.offset.y = entity.bar.offset.y * global_scale_modifier; entity.bar.offset.y = entity.bar.offset.y * global_scale_modifier;
@@ -36,31 +69,44 @@ function stamina_UI_entity.new(visibility, bar, text_label, value_label, percent
return entity; return entity;
end end
function stamina_UI_entity.draw(monster, stamina_UI, position_on_screen, opacity_scale) function this.draw(monster, stamina_UI, position_on_screen, opacity_scale)
if not stamina_UI.visibility then if not stamina_UI.visibility then
return; return;
end end
local stamina_string = "";
if not monster.is_tired then
local include_current_value = stamina_UI.value_label.include.current_value;
local include_max_value = stamina_UI.value_label.include.max_value;
if include_current_value and include_max_value then
stamina_string = string.format("%.0f/%.0f", monster.stamina, monster.max_stamina);
elseif include_current_value then
stamina_string = string.format("%.0f", monster.stamina);
elseif include_max_value then
stamina_string = string.format("%.0f", monster.max_stamina);
end
end
drawing.draw_label(stamina_UI.text_label, position_on_screen, opacity_scale, language.current_language.UI.stamina); drawing.draw_label(stamina_UI.text_label, position_on_screen, opacity_scale, language.current_language.UI.stamina);
if monster.is_tired then if monster.is_tired then
drawing.draw_bar(stamina_UI.bar, position_on_screen, opacity_scale, monster.tired_timer_percentage); drawing.draw_bar(stamina_UI.bar, position_on_screen, opacity_scale, monster.tired_timer_percentage);
drawing.draw_label(stamina_UI.timer_label, position_on_screen, opacity_scale, monster.tired_minutes_left, drawing.draw_label(stamina_UI.timer_label, position_on_screen, opacity_scale, monster.tired_minutes_left, monster.tired_seconds_left);
monster.tired_seconds_left);
else else
drawing.draw_bar(stamina_UI.bar, position_on_screen, opacity_scale, monster.stamina_percentage); drawing.draw_bar(stamina_UI.bar, position_on_screen, opacity_scale, monster.stamina_percentage);
drawing.draw_label(stamina_UI.value_label, position_on_screen, opacity_scale, monster.stamina, monster.max_stamina); drawing.draw_label(stamina_UI.value_label, position_on_screen, opacity_scale, stamina_string);
drawing.draw_label(stamina_UI.percentage_label, position_on_screen, opacity_scale, 100 * monster.stamina_percentage); drawing.draw_label(stamina_UI.percentage_label, position_on_screen, opacity_scale, 100 * monster.stamina_percentage);
end end
end end
function stamina_UI_entity.init_module() function this.init_module()
table_helpers = require("MHR_Overlay.Misc.table_helpers"); utils = require("MHR_Overlay.Misc.utils");
drawing = require("MHR_Overlay.UI.drawing"); drawing = require("MHR_Overlay.UI.drawing");
language = require("MHR_Overlay.Misc.language"); language = require("MHR_Overlay.Misc.language");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
end end
return stamina_UI_entity; return this;

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +1,48 @@
local drawing = {}; local this = {};
local config; local config;
local table_helpers; local utils;
local unicode_helpers;
drawing.font = nil; local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
function drawing.init_font() this.font = nil;
function this.init_font()
local cached_config = config.current_config.global_settings.UI_font; local cached_config = config.current_config.global_settings.UI_font;
drawing.font = d2d.Font.new(cached_config.family, cached_config.size, cached_config.bold, cached_config.italic); this.font = d2d.Font.new(cached_config.family, cached_config.size, cached_config.bold, cached_config.italic);
end end
function drawing.argb_color_to_abgr_color(argb_color) function this.argb_color_to_abgr_color(argb_color)
local alpha = (argb_color >> 24) & 0xFF; local alpha = (argb_color >> 24) & 0xFF;
local red = (argb_color >> 16) & 0xFF; local red = (argb_color >> 16) & 0xFF;
local green = (argb_color >> 8) & 0xFF; local green = (argb_color >> 8) & 0xFF;
@@ -21,7 +53,7 @@ function drawing.argb_color_to_abgr_color(argb_color)
return abgr_color; return abgr_color;
end end
function drawing.color_to_argb(color) function this.color_to_argb(color)
local alpha = (color >> 24) & 0xFF; local alpha = (color >> 24) & 0xFF;
local red = (color >> 16) & 0xFF; local red = (color >> 16) & 0xFF;
local green = (color >> 8) & 0xFF; local green = (color >> 8) & 0xFF;
@@ -30,24 +62,24 @@ function drawing.color_to_argb(color)
return alpha, red, green, blue; return alpha, red, green, blue;
end end
function drawing.argb_to_color(alpha, red, green, blue) function this.argb_to_color(alpha, red, green, blue)
return 0x1000000 * alpha + 0x10000 * red + 0x100 * green + blue; return 0x1000000 * alpha + 0x10000 * red + 0x100 * green + blue;
end end
function drawing.limit_text_size(text, size_limit) function this.limit_text_size(text, size_limit)
if d2d == nil or not config.current_config.global_settings.renderer.use_d2d_if_available or size_limit <= 0 then if d2d == nil or not config.current_config.global_settings.renderer.use_d2d_if_available or size_limit <= 0 then
return text; return text;
end end
local limited_text = text; local limited_text = text;
while limited_text ~= "..." do while limited_text ~= "..." do
local text_width, text_height = drawing.font:measure(limited_text); local text_width, text_height = this.font:measure(limited_text);
if text_width < size_limit then if text_width < size_limit then
break break
else else
local old_limited_text = limited_text; local old_limited_text = limited_text;
limited_text = unicode_helpers.sub(limited_text, 1, -5) .. "..."; limited_text = utils.unicode.sub(limited_text, 1, -5) .. "...";
if limited_text == old_limited_text then if limited_text == old_limited_text then
break break
@@ -58,8 +90,8 @@ function drawing.limit_text_size(text, size_limit)
return limited_text; return limited_text;
end end
function drawing.scale_color_opacity(color, scale) function this.scale_color_opacity(color, scale)
local alpha, red, green, blue = drawing.color_to_argb(color); local alpha, red, green, blue = this.color_to_argb(color);
local new_alpha = math.floor(alpha * scale); local new_alpha = math.floor(alpha * scale);
if new_alpha < 0 then if new_alpha < 0 then
new_alpha = 0; new_alpha = 0;
@@ -68,33 +100,38 @@ function drawing.scale_color_opacity(color, scale)
new_alpha = 255; new_alpha = 255;
end end
return drawing.argb_to_color(new_alpha, red, green, blue); return this.argb_to_color(new_alpha, red, green, blue);
end end
function drawing.scale_bar_opacity(bar, scale) function this.scale_bar_opacity(bar, scale)
if bar == nil or scale == nil or not bar.visibility then if bar == nil or scale == nil or not bar.visibility then
return; return;
end end
bar.colors.foreground = drawing.scale_color_opacity(bar.colors.foreground, scale); bar.colors.foreground = this.scale_color_opacity(bar.colors.foreground, scale);
bar.colors.background = drawing.scale_color_opacity(bar.colors.background, scale); bar.colors.background = this.scale_color_opacity(bar.colors.background, scale);
end end
function drawing.scale_label_opacity(label, scale) function this.scale_label_opacity(label, scale)
if label == nil or scale == nil or not label.visibility then if label == nil or scale == nil or not label.visibility then
return; return;
end end
label.color = drawing.scale_color_opacity(label.color, scale); label.color = this.scale_color_opacity(label.color, scale);
label.shadow.color = drawing.scale_color_opacity(label.shadow.color, scale); label.shadow.color = this.scale_color_opacity(label.shadow.color, scale);
end end
function drawing.draw_label(label, position, opacity_scale, ...) function this.draw_label(label, position, opacity_scale, ...)
if label == nil or not label.visibility then if label == nil or not label.visibility then
return; return;
end end
local text = string.format(label.text, table.unpack({...})); local text = string.format(label.text_format, table.unpack({...}));
if text == "" then
return;
end
local position_x = position.x + label.offset.x; local position_x = position.x + label.offset.x;
local position_y = position.y + label.offset.y; local position_y = position.y + label.offset.y;
@@ -104,32 +141,32 @@ function drawing.draw_label(label, position, opacity_scale, ...)
local new_shadow_color = label.shadow.color; local new_shadow_color = label.shadow.color;
if opacity_scale < 1 then if opacity_scale < 1 then
new_shadow_color = drawing.scale_color_opacity(new_shadow_color, opacity_scale); new_shadow_color = this.scale_color_opacity(new_shadow_color, opacity_scale);
end end
if use_d2d then if use_d2d then
d2d.text(drawing.font, text, position_x + label.shadow.offset.x, position_y + label.shadow.offset.y, new_shadow_color); d2d.text(this.font, text, position_x + label.shadow.offset.x, position_y + label.shadow.offset.y, new_shadow_color);
else else
new_shadow_color = drawing.argb_color_to_abgr_color(new_shadow_color); new_shadow_color = this.argb_color_to_abgr_color(new_shadow_color);
draw.text(text, position_x + label.shadow.offset.x, position_y + label.shadow.offset.y, new_shadow_color); draw.text(text, position_x + label.shadow.offset.x, position_y + label.shadow.offset.y, new_shadow_color);
end end
end end
local new_color = label.color; local new_color = label.color;
if opacity_scale < 1 then if opacity_scale < 1 then
new_color = drawing.scale_color_opacity(new_color, opacity_scale); new_color = this.scale_color_opacity(new_color, opacity_scale);
end end
if use_d2d then if use_d2d then
d2d.text(drawing.font, text, position_x, position_y, new_color); d2d.text(this.font, text, position_x, position_y, new_color);
else else
new_color = drawing.argb_color_to_abgr_color(new_color); new_color = this.argb_color_to_abgr_color(new_color);
draw.text(text, position_x, position_y, new_color); draw.text(text, position_x, position_y, new_color);
end end
end end
function drawing.draw_bar(bar, position, opacity_scale, percentage) function this.draw_bar(bar, position, opacity_scale, percentage)
if bar == nil or not bar.visibility then if bar == nil or not bar.visibility then
return; return;
@@ -227,9 +264,9 @@ function drawing.draw_bar(bar, position, opacity_scale, percentage)
local outline_color = bar.colors.outline; local outline_color = bar.colors.outline;
if opacity_scale < 1 then if opacity_scale < 1 then
foreground_color = drawing.scale_color_opacity(foreground_color, opacity_scale); foreground_color = this.scale_color_opacity(foreground_color, opacity_scale);
background_color = drawing.scale_color_opacity(background_color, opacity_scale); background_color = this.scale_color_opacity(background_color, opacity_scale);
outline_color = drawing.scale_color_opacity(outline_color, opacity_scale); outline_color = this.scale_color_opacity(outline_color, opacity_scale);
end end
local use_d2d = d2d ~= nil and config.current_config.global_settings.renderer.use_d2d_if_available; local use_d2d = d2d ~= nil and config.current_config.global_settings.renderer.use_d2d_if_available;
@@ -240,7 +277,7 @@ function drawing.draw_bar(bar, position, opacity_scale, percentage)
d2d.outline_rect(outline_position_x, outline_position_y, outline_width, outline_height, outline_thickness, d2d.outline_rect(outline_position_x, outline_position_y, outline_width, outline_height, outline_thickness,
outline_color); outline_color);
else else
outline_color = drawing.argb_color_to_abgr_color(outline_color); outline_color = this.argb_color_to_abgr_color(outline_color);
draw.outline_rect(outline_position_x, outline_position_y, outline_width, outline_height, outline_color); draw.outline_rect(outline_position_x, outline_position_y, outline_width, outline_height, outline_color);
end end
end end
@@ -251,7 +288,7 @@ function drawing.draw_bar(bar, position, opacity_scale, percentage)
d2d.fill_rect(position_x, position_y, foreground_width, height, foreground_color); d2d.fill_rect(position_x, position_y, foreground_width, height, foreground_color);
else else
foreground_color = drawing.argb_color_to_abgr_color(foreground_color); foreground_color = this.argb_color_to_abgr_color(foreground_color);
draw.filled_rect(position_x, position_y, foreground_width, height, foreground_color) draw.filled_rect(position_x, position_y, foreground_width, height, foreground_color)
end end
end end
@@ -261,13 +298,13 @@ function drawing.draw_bar(bar, position, opacity_scale, percentage)
if use_d2d then if use_d2d then
d2d.fill_rect(position_x + foreground_width, position_y, background_width, height, background_color); d2d.fill_rect(position_x + foreground_width, position_y, background_width, height, background_color);
else else
background_color = drawing.argb_color_to_abgr_color(background_color); background_color = this.argb_color_to_abgr_color(background_color);
draw.filled_rect(position_x + foreground_width, position_y, background_width, height, background_color) draw.filled_rect(position_x + foreground_width, position_y, background_width, height, background_color)
end end
end end
end end
function drawing.draw_capture_line(health_UI, position, opacity_scale, percentage) function this.draw_capture_line(health_UI, position, opacity_scale, percentage)
if health_UI == nil or not health_UI.visibility or health_UI.bar == nil or not health_UI.bar.visibility or if health_UI == nil or not health_UI.visibility or health_UI.bar == nil or not health_UI.bar.visibility or
health_UI.bar.capture_line == nil or not health_UI.bar.capture_line.visibility or percentage >= 1 or percentage <= 0 then health_UI.bar.capture_line == nil or not health_UI.bar.capture_line.visibility or percentage >= 1 or percentage <= 0 then
return; return;
@@ -280,7 +317,7 @@ function drawing.draw_capture_line(health_UI, position, opacity_scale, percentag
local color = health_UI.bar.capture_line.color; local color = health_UI.bar.capture_line.color;
if opacity_scale < 1 then if opacity_scale < 1 then
color = drawing.scale_color_opacity(color, opacity_scale); color = this.scale_color_opacity(color, opacity_scale);
end end
local use_d2d = d2d ~= nil and config.current_config.global_settings.renderer.use_d2d_if_available; local use_d2d = d2d ~= nil and config.current_config.global_settings.renderer.use_d2d_if_available;
@@ -289,16 +326,15 @@ function drawing.draw_capture_line(health_UI, position, opacity_scale, percentag
d2d.fill_rect(position_x, position_y, health_UI.bar.capture_line.size.width, health_UI.bar.capture_line.size.height, d2d.fill_rect(position_x, position_y, health_UI.bar.capture_line.size.width, health_UI.bar.capture_line.size.height,
color); color);
else else
color = drawing.argb_color_to_abgr_color(color); color = this.argb_color_to_abgr_color(color);
draw.filled_rect(position_x, position_y, health_UI.bar.capture_line.size.width, draw.filled_rect(position_x, position_y, health_UI.bar.capture_line.size.width,
health_UI.bar.capture_line.size.height, color) health_UI.bar.capture_line.size.height, color)
end end
end end
function drawing.init_module() function this.init_module()
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
table_helpers = require("MHR_Overlay.Misc.table_helpers"); utils = require("MHR_Overlay.Misc.utils");
unicode_helpers = require("MHR_Overlay.Misc.unicode_helpers");
end end
return drawing; return this;

View File

@@ -65,6 +65,7 @@
"break_health_percentage": "Break Health Percentage", "break_health_percentage": "Break Health Percentage",
"break_max_count": "Break Max Count", "break_max_count": "Break Max Count",
"break_severe_filter": "Break + Severe", "break_severe_filter": "Break + Severe",
"buff_UI": "Buff UI",
"buildup": "Buildup", "buildup": "Buildup",
"buildup_bar": "Buildup Bar", "buildup_bar": "Buildup Bar",
"buildup_bars_are_relative_to": "Buildup Bars are relative to", "buildup_bars_are_relative_to": "Buildup Bars are relative to",
@@ -78,9 +79,12 @@
"closest": "Closest", "closest": "Closest",
"color": "Color", "color": "Color",
"colors": "Colors", "colors": "Colors",
"config": "Config",
"creature_name_label": "Creature Name Label", "creature_name_label": "Creature Name Label",
"crown": "Crown", "crown": "Crown",
"crown_thresholds": "Crown Thresholds", "crown_thresholds": "Crown Thresholds",
"current_state": "Current State",
"current_value": "Current Value",
"cutscene": "Cutscene", "cutscene": "Cutscene",
"damage": "Damage", "damage": "Damage",
"damage_bar": "Damage Bar", "damage_bar": "Damage Bar",
@@ -88,10 +92,14 @@
"damage_meter_UI": "Damage Meter UI", "damage_meter_UI": "Damage Meter UI",
"damage_percentage_label": "Damage Percentage Label", "damage_percentage_label": "Damage Percentage Label",
"damage_value_label": "Damage Value Label", "damage_value_label": "Damage Value Label",
"default_state": "Default State",
"delete": "Delete",
"distance": "Distance", "distance": "Distance",
"dps": "DPS", "dps": "DPS",
"dps_label": "DPS Label", "dps_label": "DPS Label",
"dps_mode": "DPS Mode", "dps_mode": "DPS Mode",
"duplicate": "Duplicate",
"duration": "Duration",
"dynamic_positioning": "Dynamic Positioning", "dynamic_positioning": "Dynamic Positioning",
"dynamically_positioned": "Dynamically Positioned", "dynamically_positioned": "Dynamically Positioned",
"enable_for": "Enable for", "enable_for": "Enable for",
@@ -102,6 +110,7 @@
"farthest": "Farthest", "farthest": "Farthest",
"fight_time": "Fight Time", "fight_time": "Fight Time",
"filter": "Filter", "filter": "Filter",
"filter_mode": "Filter Mode",
"first": "First", "first": "First",
"first_hit": "First Hit", "first_hit": "First Hit",
"flinch_count": "Flinch Count", "flinch_count": "Flinch Count",
@@ -120,6 +129,7 @@
"hide_ailments_with_zero_buildup": "Hide Ailments when Buildup is 0", "hide_ailments_with_zero_buildup": "Hide Ailments when Buildup is 0",
"hide_all_active_ailments": "Hide All Active Ailments", "hide_all_active_ailments": "Hide All Active Ailments",
"hide_all_inactive_ailments": "Hide All Inactive Ailments", "hide_all_inactive_ailments": "Hide All Inactive Ailments",
"hide_bar_for_infinite_buffs": "Hide Bar for infinite Buffs",
"hide_dead_or_captured": "Hide Dead or Captured", "hide_dead_or_captured": "Hide Dead or Captured",
"hide_disabled_ailments": "Hide Disabled Ailments by Game", "hide_disabled_ailments": "Hide Disabled Ailments by Game",
"hide_inactive_ailments_with_no_buildup_support": "Hide Inactive Ailments with no Buildup Support", "hide_inactive_ailments_with_no_buildup_support": "Hide Inactive Ailments with no Buildup Support",
@@ -129,15 +139,17 @@
"hide_other_players": "Hide Other Players", "hide_other_players": "Hide Other Players",
"hide_player_if_player_damage_is_zero": "Hide Player if Player Damage is 0", "hide_player_if_player_damage_is_zero": "Hide Player if Player Damage is 0",
"hide_servants": "Hide Followers", "hide_servants": "Hide Followers",
"hide_timer_for_infinite_buffs": "Hide Timer for infinite Buffs",
"hide_total_damage": "Hide Total Damage", "hide_total_damage": "Hide Total Damage",
"hide_total_if_total_damage_is_zero": "Hide Total if Total Damage is 0", "hide_total_if_total_damage_is_zero": "Hide Total if Total Damage is 0",
"hide_undamaged_parts": "Hide Undamaged Parts", "hide_undamaged_parts": "Hide Undamaged Parts",
"highest_health": "Highest Health", "highest_health": "Highest Health",
"highest_health_percentage": "Highest Health Percentage", "highest_health_percentage": "Highest Health Percentage",
"highlighted": "Highlighted (targeted)", "highlighted": "Highlighted",
"highlighted_bar": "Highlighted Bar", "highlighted_bar": "Highlighted Bar",
"highlighted_buildup_bar": "Highlighted Buildup Bar", "highlighted_buildup_bar": "Highlighted Buildup Bar",
"highlighted_damage_bar": "Highlighted Damage Bar", "highlighted_damage_bar": "Highlighted Damage Bar",
"highlighted_targeted": "Highlighted (targeted)",
"horizontal": "Horizontal", "horizontal": "Horizontal",
"hotkeys": "Hotkeys", "hotkeys": "Hotkeys",
"hunter_rank": "Hunter Rank", "hunter_rank": "Hunter Rank",
@@ -169,6 +181,7 @@
"master_rank": "Master Rank", "master_rank": "Master Rank",
"max_distance": "Max Distance", "max_distance": "Max Distance",
"max_monster_updates_per_tick": "Max Monster Updates per Tick", "max_monster_updates_per_tick": "Max Monster Updates per Tick",
"max_value": "Max Value",
"me": "Me", "me": "Me",
"menu_font": "Menu Font", "menu_font": "Menu Font",
"menu_font_change_disclaimer": "Changing Language and Menu Font Size several times will cause a crash!", "menu_font_change_disclaimer": "Changing Language and Menu Font Size several times will cause a crash!",
@@ -187,6 +200,7 @@
"myself": "Myself", "myself": "Myself",
"name": "Name", "name": "Name",
"name_label": "Name Label", "name_label": "Name Label",
"new": "New",
"none": "None", "none": "None",
"normal": "Normal", "normal": "Normal",
"offset": "Offset", "offset": "Offset",
@@ -221,9 +235,11 @@
"rage": "Rage", "rage": "Rage",
"reframework_outdated": "Installed REFramework version is outdated. Please, update. Otherwise, MHR Overlay won't work correctly.", "reframework_outdated": "Installed REFramework version is outdated. Please, update. Otherwise, MHR Overlay won't work correctly.",
"relative_offset": "Relative Offset", "relative_offset": "Relative Offset",
"rename": "Rename",
"render_highlighted_monster": "Render Highlighted Monster", "render_highlighted_monster": "Render Highlighted Monster",
"render_not_highlighted_monsters": "Render Not Highlighted Monsters", "render_not_highlighted_monsters": "Render Not Highlighted Monsters",
"renderer": "Renderer", "renderer": "Renderer",
"reset": "Reset",
"reversed_order": "Reversed Order", "reversed_order": "Reversed Order",
"reward_screen": "Reward Screen", "reward_screen": "Reward Screen",
"servant_otomos": "Servant Buddies", "servant_otomos": "Servant Buddies",
@@ -253,6 +269,7 @@
"time_UI": "Time UI", "time_UI": "Time UI",
"time_label": "Time Label", "time_label": "Time Label",
"time_limit": "Time Limit (seconds)", "time_limit": "Time Limit (seconds)",
"timer": "Timer",
"timer_label": "Timer Label", "timer_label": "Timer Label",
"top_buildup": "Top Buildup", "top_buildup": "Top Buildup",
"top_damage": "Top Damage", "top_damage": "Top Damage",
@@ -289,6 +306,7 @@
"font_name": "NotoSansKR-Bold.otf", "font_name": "NotoSansKR-Bold.otf",
"parts": { "parts": {
"abdomen": "Abdomen", "abdomen": "Abdomen",
"amatsu_unknown": "?",
"antenna": "Antenna", "antenna": "Antenna",
"arms": "Arms", "arms": "Arms",
"arms_mud": "Arms (Mud)", "arms_mud": "Arms (Mud)",

View File

@@ -65,6 +65,7 @@
"break_health_percentage": "部位破壊までのダメージ状況()", "break_health_percentage": "部位破壊までのダメージ状況()",
"break_max_count": "最大破壊数", "break_max_count": "最大破壊数",
"break_severe_filter": "Break + Severe", "break_severe_filter": "Break + Severe",
"buff_UI": "Buff UI",
"buildup": "蓄積値", "buildup": "蓄積値",
"buildup_bar": "蓄積値バー", "buildup_bar": "蓄積値バー",
"buildup_bars_are_relative_to": "相対的な蓄積バー", "buildup_bars_are_relative_to": "相対的な蓄積バー",
@@ -78,9 +79,12 @@
"closest": "Closest", "closest": "Closest",
"color": "カラー", "color": "カラー",
"colors": "カラー", "colors": "カラー",
"config": "Config",
"creature_name_label": "モンスターの名前ラベル", "creature_name_label": "モンスターの名前ラベル",
"crown": "王冠", "crown": "王冠",
"crown_thresholds": "王冠の閾値", "crown_thresholds": "王冠の閾値",
"current_state": "Current State",
"current_value": "Current Value",
"cutscene": "Cutscene", "cutscene": "Cutscene",
"damage": "ダメージ", "damage": "ダメージ",
"damage_bar": "ダメージバー", "damage_bar": "ダメージバー",
@@ -88,10 +92,14 @@
"damage_meter_UI": "ダメージメーターUI", "damage_meter_UI": "ダメージメーターUI",
"damage_percentage_label": "ダメージ割合()ラベル", "damage_percentage_label": "ダメージ割合()ラベル",
"damage_value_label": "ダメージラベル", "damage_value_label": "ダメージラベル",
"default_state": "Default State",
"delete": "Delete",
"distance": "距離", "distance": "距離",
"dps": "DPS", "dps": "DPS",
"dps_label": "DPSラベル", "dps_label": "DPSラベル",
"dps_mode": "DPS モード", "dps_mode": "DPS モード",
"duplicate": "Duplicate",
"duration": "Duration",
"dynamic_positioning": "動的な場所", "dynamic_positioning": "動的な場所",
"dynamically_positioned": "モンスターに追随して表示", "dynamically_positioned": "モンスターに追随して表示",
"enable_for": "有効にする", "enable_for": "有効にする",
@@ -102,6 +110,7 @@
"farthest": "Farthest", "farthest": "Farthest",
"fight_time": "戦闘時間", "fight_time": "戦闘時間",
"filter": "フィルター", "filter": "フィルター",
"filter_mode": "Filter Mode",
"first": "最初", "first": "最初",
"first_hit": "初撃", "first_hit": "初撃",
"flinch_count": "ひるみ回数", "flinch_count": "ひるみ回数",
@@ -120,6 +129,7 @@
"hide_ailments_with_zero_buildup": "蓄積値がゼロの時に状態異常の表示を隠す", "hide_ailments_with_zero_buildup": "蓄積値がゼロの時に状態異常の表示を隠す",
"hide_all_active_ailments": "全ての有効な状態異常を隠す", "hide_all_active_ailments": "全ての有効な状態異常を隠す",
"hide_all_inactive_ailments": "全ての無効な状態異常を隠す", "hide_all_inactive_ailments": "全ての無効な状態異常を隠す",
"hide_bar_for_infinite_buffs": "Hide Bar for infinite Buffs",
"hide_dead_or_captured": "討伐済み、または捕獲済みも表示する", "hide_dead_or_captured": "討伐済み、または捕獲済みも表示する",
"hide_disabled_ailments": "無効な状態異常を隠す", "hide_disabled_ailments": "無効な状態異常を隠す",
"hide_inactive_ailments_with_no_buildup_support": "累積値がなく、非活性な異常状態を隠す", "hide_inactive_ailments_with_no_buildup_support": "累積値がなく、非活性な異常状態を隠す",
@@ -129,15 +139,17 @@
"hide_other_players": "ほかのプレイヤーの表示を隠す", "hide_other_players": "ほかのプレイヤーの表示を隠す",
"hide_player_if_player_damage_is_zero": "プレイヤーのダメージが0の場合、プレイヤーの表示を隠す", "hide_player_if_player_damage_is_zero": "プレイヤーのダメージが0の場合、プレイヤーの表示を隠す",
"hide_servants": "Hide Followers", "hide_servants": "Hide Followers",
"hide_timer_for_infinite_buffs": "Hide Timer for infinite Buffs",
"hide_total_damage": "合計ダメージの表示を隠す", "hide_total_damage": "合計ダメージの表示を隠す",
"hide_total_if_total_damage_is_zero": "合計ダメージが0の場合、合計の表示を隠す", "hide_total_if_total_damage_is_zero": "合計ダメージが0の場合、合計の表示を隠す",
"hide_undamaged_parts": "攻撃していない部位の表示を隠す", "hide_undamaged_parts": "攻撃していない部位の表示を隠す",
"highest_health": "Highest Health", "highest_health": "Highest Health",
"highest_health_percentage": "Highest Health Percentage", "highest_health_percentage": "Highest Health Percentage",
"highlighted": "詳細表示 (ターゲット)", "highlighted": "詳細表示",
"highlighted_bar": "ハイライトされたバー", "highlighted_bar": "ハイライトされたバー",
"highlighted_buildup_bar": "ハイライトされた蓄積値バー", "highlighted_buildup_bar": "ハイライトされた蓄積値バー",
"highlighted_damage_bar": "ハイライトされたダメージバー", "highlighted_damage_bar": "ハイライトされたダメージバー",
"highlighted_targeted": "詳細表示 (ターゲット)",
"horizontal": "水平", "horizontal": "水平",
"hotkeys": "ホットキー", "hotkeys": "ホットキー",
"hunter_rank": "ハンターランク", "hunter_rank": "ハンターランク",
@@ -169,6 +181,7 @@
"master_rank": "マスターランク", "master_rank": "マスターランク",
"max_distance": "最大距離", "max_distance": "最大距離",
"max_monster_updates_per_tick": "モンスター情報をアップデートする間隔", "max_monster_updates_per_tick": "モンスター情報をアップデートする間隔",
"max_value": "Max Value",
"me": "自分", "me": "自分",
"menu_font": "メニューで使うフォント", "menu_font": "メニューで使うフォント",
"menu_font_change_disclaimer": "言語とメニューのフォントサイズを何度も変更すると、クラッシュが発生します。", "menu_font_change_disclaimer": "言語とメニューのフォントサイズを何度も変更すると、クラッシュが発生します。",
@@ -187,6 +200,7 @@
"myself": "Myself", "myself": "Myself",
"name": "Name", "name": "Name",
"name_label": "Name Label", "name_label": "Name Label",
"new": "New",
"none": "設定なし", "none": "設定なし",
"normal": "標準", "normal": "標準",
"offset": "基準点からの位置", "offset": "基準点からの位置",
@@ -194,7 +208,6 @@
"opacity_falloff": "透明度を上げる", "opacity_falloff": "透明度を上げる",
"orientation": "並べ方", "orientation": "並べ方",
"other_damage": "その他のダメージ", "other_damage": "その他のダメージ",
"other_otomos": "Other Buddies",
"other_player_otomos": "Other Player Buddies", "other_player_otomos": "Other Player Buddies",
"other_players": "他のプレイヤー", "other_players": "他のプレイヤー",
"otomo_damage": "オトモのダメージ", "otomo_damage": "オトモのダメージ",
@@ -222,9 +235,11 @@
"rage": "怒り値", "rage": "怒り値",
"reframework_outdated": "Installed REFramework version is outdated. Please, update. Otherwise, MHR Overlay won't work correctly.", "reframework_outdated": "Installed REFramework version is outdated. Please, update. Otherwise, MHR Overlay won't work correctly.",
"relative_offset": "相対的な表示位置", "relative_offset": "相対的な表示位置",
"rename": "Rename",
"render_highlighted_monster": "ハイライトされたモンスターをレンダリング(表示)する", "render_highlighted_monster": "ハイライトされたモンスターをレンダリング(表示)する",
"render_not_highlighted_monsters": "ハイライトされていないモンスターをレンダリング(表示)する", "render_not_highlighted_monsters": "ハイライトされていないモンスターをレンダリング(表示)する",
"renderer": "Renderer", "renderer": "Renderer",
"reset": "Reset",
"reversed_order": "逆順", "reversed_order": "逆順",
"reward_screen": "Reward Screen", "reward_screen": "Reward Screen",
"servant_otomos": "Servant Buddies", "servant_otomos": "Servant Buddies",
@@ -232,13 +247,9 @@
"settings": "設定", "settings": "設定",
"severe_filter": "Severe", "severe_filter": "Severe",
"shadow": "影", "shadow": "影",
"show_followers_separately": "Show Followers separately",
"show_my_otomos_separately": "Show my Buddies separately", "show_my_otomos_separately": "Show my Buddies separately",
"show_other_otomos_separately": "Show other Buddies separately",
"show_other_player_otomos_separately": "Show Other Player Buddies separately", "show_other_player_otomos_separately": "Show Other Player Buddies separately",
"show_servant_otomos_separately": "Show Follower Buddies separately", "show_servant_otomos_separately": "Show Follower Buddies separately",
"show_servant_separately": "Show Followers separately",
"show_servants_separately": "Show Followers separately",
"size": "サイズ", "size": "サイズ",
"small_monster_UI": "小型モンスターUI", "small_monster_UI": "小型モンスターUI",
"small_monsters": "小型モンスター", "small_monsters": "小型モンスター",
@@ -258,6 +269,7 @@
"time_UI": "タイムUI", "time_UI": "タイムUI",
"time_label": "タイムラベル", "time_label": "タイムラベル",
"time_limit": "タイムリミット(s.)", "time_limit": "タイムリミット(s.)",
"timer": "Timer",
"timer_label": "タイマーラベル", "timer_label": "タイマーラベル",
"top_buildup": "最高蓄積値", "top_buildup": "最高蓄積値",
"top_damage": "最高ダメージ", "top_damage": "最高ダメージ",
@@ -294,6 +306,7 @@
"font_name": "NotoSansJP-Bold.otf", "font_name": "NotoSansJP-Bold.otf",
"parts": { "parts": {
"abdomen": "腹部", "abdomen": "腹部",
"amatsu_unknown": "?",
"antenna": "触角", "antenna": "触角",
"arms": "腕", "arms": "腕",
"arms_mud": "腕(泥)", "arms_mud": "腕(泥)",

View File

@@ -4,12 +4,12 @@
"buildup": "누적치:", "buildup": "누적치:",
"gold": "금관", "gold": "금관",
"mini": "최소", "mini": "최소",
"otomo": "Buddy", "otomo": "동반자",
"part_break": "파괴", "part_break": "파괴",
"part_sever": "절단", "part_sever": "절단",
"player": "헌터", "player": "헌터",
"rage": "분노:", "rage": "분노:",
"servant": "Follower", "servant": "맹우",
"silver": "은관", "silver": "은관",
"stamina": "스태미나:", "stamina": "스태미나:",
"total_buildup": "총 누적치", "total_buildup": "총 누적치",
@@ -52,7 +52,7 @@
"assign_new_key": "새 키를 할당", "assign_new_key": "새 키를 할당",
"auto_highlight": "자동 타겟 설정", "auto_highlight": "자동 타겟 설정",
"background": "배경색", "background": "배경색",
"bar": "", "bar": "막대",
"blast_damage": "폭파 대미지", "blast_damage": "폭파 대미지",
"body_parts": "부위", "body_parts": "부위",
"bold": "굵게", "bold": "굵게",
@@ -65,9 +65,10 @@
"break_health_percentage": "파괴 수치 비율", "break_health_percentage": "파괴 수치 비율",
"break_max_count": "최대 파괴 횟수", "break_max_count": "최대 파괴 횟수",
"break_severe_filter": "파괴 + 절단", "break_severe_filter": "파괴 + 절단",
"buff_UI": "버프 UI",
"buildup": "누적치", "buildup": "누적치",
"buildup_bar": "누적치 ", "buildup_bar": "누적치 막대",
"buildup_bars_are_relative_to": "기준으로 누적치 ", "buildup_bars_are_relative_to": "기준으로 누적치 막대",
"buildup_percentage": "누적치 비율", "buildup_percentage": "누적치 비율",
"buildup_percentage_label": "누적치 비율 정보", "buildup_percentage_label": "누적치 비율 정보",
"buildup_value_label": "누적치 값 정보", "buildup_value_label": "누적치 값 정보",
@@ -78,20 +79,27 @@
"closest": "가장 가까운", "closest": "가장 가까운",
"color": "색상", "color": "색상",
"colors": "색상", "colors": "색상",
"config": "설정",
"creature_name_label": "환경생물 이름 정보", "creature_name_label": "환경생물 이름 정보",
"crown": "금관", "crown": "금관",
"crown_thresholds": "금관 판정값", "crown_thresholds": "금관 판정값",
"cutscene": "Cutscene", "current_state": "Current State",
"current_value": "Current Value",
"cutscene": "컷신",
"damage": "대미지", "damage": "대미지",
"damage_bar": "대미지 ", "damage_bar": "대미지 막대",
"damage_bars_are_relative_to": "기준으로 대미지 바", "damage_bars_are_relative_to": "대미지 막대 순서",
"damage_meter_UI": "대미지 미터 UI", "damage_meter_UI": "대미지 미터 UI",
"damage_percentage_label": "대미지 비율 정보", "damage_percentage_label": "대미지 비율 정보",
"damage_value_label": "대미지 값 정보", "damage_value_label": "대미지 값 정보",
"distance": "거리", "default_state": "Default State",
"delete": "삭제하기",
"distance": "간격",
"dps": "DPS", "dps": "DPS",
"dps_label": "DPS 정보", "dps_label": "DPS 정보",
"dps_mode": "DPS 모드", "dps_mode": "DPS 모드",
"duplicate": "복제하기",
"duration": "지속시간",
"dynamic_positioning": "유동 위치", "dynamic_positioning": "유동 위치",
"dynamically_positioned": "유동 위치 UI", "dynamically_positioned": "유동 위치 UI",
"enable_for": "표시 대상", "enable_for": "표시 대상",
@@ -102,11 +110,12 @@
"farthest": "가장 멀리있는", "farthest": "가장 멀리있는",
"fight_time": "전투 시간", "fight_time": "전투 시간",
"filter": "필터", "filter": "필터",
"first": "처음", "filter_mode": "Filter Mode",
"first": "맨 앞",
"first_hit": "첫 공격", "first_hit": "첫 공격",
"flinch_count": "경직 횟수", "flinch_count": "경직 횟수",
"foreground": "전경색", "foreground": "전경색",
"freeze_dps_on_quest_end": "Freeze DPS on Quest End", "freeze_dps_on_quest_end": "퀘스트 종료시 DPS 멈춤",
"global_position_modifier": "전역 위치 배율", "global_position_modifier": "전역 위치 배율",
"global_scale_modifier": "전역 크기 배율", "global_scale_modifier": "전역 크기 배율",
"global_settings": "전역 설정", "global_settings": "전역 설정",
@@ -117,51 +126,54 @@
"health_percentage": "체력 비율", "health_percentage": "체력 비율",
"health_severe_filter": "체력 + 절단", "health_severe_filter": "체력 + 절단",
"height": "높이", "height": "높이",
"hide_ailments_with_zero_buildup": "누적치가 0이면 상태이상 숨김", "hide_ailments_with_zero_buildup": "누적치가 0이면 상태이상 표시 안 함",
"hide_all_active_ailments": "걸린 상태이상 모두 숨김", "hide_all_active_ailments": "걸린 상태이상 모두 표시 안 함",
"hide_all_inactive_ailments": "걸리지 않은 상태이상 모두 숨김", "hide_all_inactive_ailments": "걸리지 않은 상태이상 모두 표시 안 함",
"hide_dead_or_captured": "토벌되거나 포획되면 숨김", "hide_bar_for_infinite_buffs": "무한 버프의 막대는 표시 안 함",
"hide_disabled_ailments": "비활성화된 상태이상 숨김", "hide_dead_or_captured": "토벌되거나 포획되면 표시 안 함",
"hide_inactive_ailments_with_no_buildup_support": "누적치가 없고 걸리지 않은 상태이상 숨김", "hide_disabled_ailments": "비활성화된 상태이상 표시 안 함",
"hide_inactive_creatures": "쿨타임인 환경생물 숨김", "hide_inactive_ailments_with_no_buildup_support": "누적치가 없고 걸리지 않은 상태이상 표시 안 함",
"hide_module_if_total_damage_is_zero": "총 대미지가 0이면 UI 숨김", "hide_inactive_creatures": "쿨타임인 환경생물 표시 안 함",
"hide_myself": "내 정보 숨김", "hide_module_if_total_damage_is_zero": "총 대미지가 0이면 UI 표시 안 함",
"hide_other_players": "다른 헌터 정보 숨김", "hide_myself": "내 정보 표시 안 함",
"hide_player_if_player_damage_is_zero": "헌터 대미지가 0이면 헌터 숨김", "hide_other_players": "다른 헌터 정보 표시 안 함",
"hide_servants": "Hide Followers", "hide_player_if_player_damage_is_zero": "헌터 대미지가 0이면 헌터 표시 안 함",
"hide_total_damage": "모든 대미지 숨김", "hide_servants": "맹우 표시 안 함",
"hide_total_if_total_damage_is_zero": "총 대미지가 0이면 모두 숨김이 높은", "hide_timer_for_infinite_buffs": "무한 버프는 표시 안 함",
"hide_undamaged_parts": "피해를 입히지 않은 부위 숨김", "hide_total_damage": "모든 대미지 표시 안 함",
"hide_total_if_total_damage_is_zero": "총 대미지가 0이면 모두 표시 안 함",
"hide_undamaged_parts": "피해를 입히지 않은 부위 표시 안 함",
"highest_health": "가장 체력이 높은", "highest_health": "가장 체력이 높은",
"highest_health_percentage": "가장 체력 비율이 높은", "highest_health_percentage": "가장 체력 비율이 높은",
"highlighted": "타겟이 된 몬스터 표시", "highlighted": "주시대상",
"highlighted_bar": "타겟이 된 몬스터 ", "highlighted_bar": "주시대상 몬스터 막대",
"highlighted_buildup_bar": "타겟이 된 몬스터 누적치 ", "highlighted_buildup_bar": "주시대상 몬스터 누적치 막대",
"highlighted_damage_bar": "타겟이 된 몬스터 대미지 ", "highlighted_damage_bar": "주시대상 몬스터 대미지 막대",
"highlighted_targeted": "주시대상 몬스터 표시",
"horizontal": "가로", "horizontal": "가로",
"hotkeys": "단축키", "hotkeys": "단축키",
"hunter_rank": "헌터 랭크", "hunter_rank": "헌터 랭크",
"hunter_rank_label": "헌터 랭크 정보", "hunter_rank_label": "헌터 랭크 정보",
"id": "ID", "id": "ID",
"in_lobby": "In Lobby", "in_lobby": "로비 내",
"in_training_area": "In Training Area", "in_training_area": "훈련구역 내",
"include": "포함", "include": "포함",
"inside": "내부", "inside": "내부",
"installation_damage": "설비 대미지", "installation_damage": "설비 대미지",
"italic": "기울임", "italic": "기울임",
"join_time": "참가 시간", "join_time": "참가 시간",
"killcam": "Killcam", "killcam": "처치 영상",
"kunai_damage": "쿠나이 대미지", "kunai_damage": "쿠나이 대미지",
"language": "언어", "language": "언어",
"large_monster_UI": "대형 몬스터 UI", "large_monster_UI": "대형 몬스터 UI",
"large_monster_dynamic_UI": "대형 몬스터 유동 UI", "large_monster_dynamic_UI": "대형 몬스터 유동 UI",
"large_monster_highlighted_UI": "타겟이 된 대형 몬스터 UI", "large_monster_highlighted_UI": "주시대상 대형 몬스터 UI",
"large_monster_static_UI": "대형 몬스터 고정 UI", "large_monster_static_UI": "대형 몬스터 고정 UI",
"large_monsters": "대형 몬스터", "large_monsters": "대형 몬스터",
"last": "마지막", "last": "맨 뒤",
"level": "Level", "level": "레벨",
"level_label": "Level Label", "level_label": "레벨 정보",
"loading_quest": "Loading Quest", "loading_quest": "퀘스트 로딩 중",
"loss_health": "절단 수치", "loss_health": "절단 수치",
"loss_health_percentage": "절단 수치 비율", "loss_health_percentage": "절단 수치 비율",
"lowest_health": "가장 체력이 낮은", "lowest_health": "가장 체력이 낮은",
@@ -169,33 +181,34 @@
"master_rank": "마스터 랭크", "master_rank": "마스터 랭크",
"max_distance": "최대 거리", "max_distance": "최대 거리",
"max_monster_updates_per_tick": "틱당 최대 몬스터 갱신 횟수", "max_monster_updates_per_tick": "틱당 최대 몬스터 갱신 횟수",
"max_value": "Max Value",
"me": "나", "me": "나",
"menu_font": "메뉴 글꼴", "menu_font": "메뉴 글꼴",
"menu_font_change_disclaimer": "언어 및 메뉴 글꼴 크기를 여러 번 변경하면 비정상 종료가 될 수 있습니다!", "menu_font_change_disclaimer": "언어 및 메뉴 글꼴 크기를 여러 번 변경하면 비정상 종료가 될 수 있습니다!",
"mod_name": "MHR Overlay", "mod_name": "MHR Overlay",
"mode": "모드", "mode": "모드",
"modifiers": "설정 배율", "modifiers": "설정 배율",
"module_visibility_based_on_game_state": "Module Visibility based on Game State", "module_visibility_based_on_game_state": "게임 상태에 따라 모듈 표시",
"modules": "UI", "modules": "UI",
"monster_can_be_captured": "몬스터 포획 가능", "monster_can_be_captured": "몬스터 포획 가능",
"monster_damage": "몬스터 대미지", "monster_damage": "몬스터 대미지",
"monster_id": "Monster ID", "monster_id": "몬스터 ID",
"monster_name": "몬스터명", "monster_name": "몬스터명",
"monster_name_label": "몬스터명 정보", "monster_name_label": "몬스터명 정보",
"my_damage_bar_location": "내 대미지 위치", "my_damage_bar_location": "내 대미지 막대 위치",
"my_otomos": "My Buddies", "my_otomos": "내 동반자",
"myself": "Myself", "myself": "",
"name": "Name", "name": "이름",
"name_label": "Name Label", "name_label": "이름 정보",
"new": "새",
"none": "없음", "none": "없음",
"normal": "보통", "normal": "기본",
"offset": "거리", "offset": "오프셋",
"offset_is_relative_to_parts": "거리를 부위 기준으로", "offset_is_relative_to_parts": "오프셋을 부위 기준으로",
"opacity_falloff": "투명도 감소", "opacity_falloff": "투명도 감소",
"orientation": "방향", "orientation": "방향",
"other_damage": "기타 대미지", "other_damage": "기타 대미지",
"other_otomos": "Other Buddies", "other_player_otomos": "다른 플레이어 동반자",
"other_player_otomos": "Other Player Buddies",
"other_players": "다른 헌터", "other_players": "다른 헌터",
"otomo_damage": "동반자 대미지", "otomo_damage": "동반자 대미지",
"outline": "외곽선", "outline": "외곽선",
@@ -209,36 +222,34 @@
"player_name_label": "헌터명 정보", "player_name_label": "헌터명 정보",
"player_name_size_limit": "헌터명 크기 제한", "player_name_size_limit": "헌터명 크기 제한",
"player_spacing": "플레이어 간격", "player_spacing": "플레이어 간격",
"playing_quest": "Playing Quest", "playing_quest": "퀘스트 중",
"poison_damage": "독 대미지", "poison_damage": "독 대미지",
"position": "위치", "position": "위치",
"press_any_key": "설정할 키를 누르세요...", "press_any_key": "설정할 키를 누르세요...",
"prioritize_large_monsters": "대형 몬스터를 우선적으로", "prioritize_large_monsters": "대형 몬스터를 우선적으로",
"quest_end_animation": "Quest End Animation", "quest_end_animation": "퀘스트 종료 영상",
"quest_end_screen": "Quest End Screen", "quest_end_screen": "퀘스트 종료 화면",
"quest_end_timer": "Quest End Timer", "quest_end_timer": "퀘스트 종료 타이머",
"quest_start_animation": "Quest Start Animation", "quest_start_animation": "퀘스트 시작 영상",
"quest_time": "퀘스트 시간", "quest_time": "퀘스트 시간",
"rage": "분노", "rage": "분노",
"reframework_outdated": "설치된 REFramework가 구버전입니다. 업데이트 하지 않으면 MHR Overlay가 제대로 동작하지 않을 수 있습니다.", "reframework_outdated": "설치된 REFramework가 구버전입니다. 업데이트 하지 않으면 MHR Overlay가 제대로 동작하지 않을 수 있습니다.",
"relative_offset": "상대적 위치 거리", "relative_offset": "상대적 위치 오프셋",
"render_highlighted_monster": "타겟이 된 몬스터 표시", "rename": "이름 변경",
"render_not_highlighted_monsters": "타겟이 아닌 몬스터 표시", "render_highlighted_monster": "주시대상 몬스터 표시",
"renderer": "Renderer", "render_not_highlighted_monsters": "주시대상이 아닌 아닌 몬스터 표시",
"renderer": "렌더링",
"reset": "리셋",
"reversed_order": "역순", "reversed_order": "역순",
"reward_screen": "Reward Screen", "reward_screen": "보상 화면",
"servant_otomos": "Servant Buddies", "servant_otomos": "맹우 동반자",
"servants": "Followers", "servants": "맹우",
"settings": "설정", "settings": "설정",
"severe_filter": "절단", "severe_filter": "절단",
"shadow": "그림자", "shadow": "그림자",
"show_followers_separately": "Show Followers separately", "show_my_otomos_separately": "내 동반자를 따로",
"show_my_otomos_separately": "Show my Buddies separately", "show_other_player_otomos_separately": "다른 플레이어의 동반자를 따로",
"show_other_otomos_separately": "Show other Buddies separately", "show_servant_otomos_separately": "맹우의 동반자를 따로",
"show_other_player_otomos_separately": "Show Other Player Buddies separately",
"show_servant_otomos_separately": "Show Follower Buddies separately",
"show_servant_separately": "Show Followers separately",
"show_servants_separately": "Show Followers separately",
"size": "크기", "size": "크기",
"small_monster_UI": "소형 몬스터 UI", "small_monster_UI": "소형 몬스터 UI",
"small_monsters": "소형 몬스터", "small_monsters": "소형 몬스터",
@@ -252,40 +263,41 @@
"statically_positioned": "고정 위치 UI", "statically_positioned": "고정 위치 UI",
"status": "상태", "status": "상태",
"style": "스타일", "style": "스타일",
"summary_screen": "Summary Screen", "summary_screen": "결과 요약 화면",
"text_label": "텍스트 정보", "text_label": "텍스트 정보",
"thickness": "두께", "thickness": "두께",
"time_UI": "시간 UI", "time_UI": "시간 UI",
"time_label": "시간 정보", "time_label": "시간 정보",
"time_limit": "시간 제한 (단위: 초)", "time_limit": "시간 제한 (단위: 초)",
"timer": "타이머",
"timer_label": "타이머 정보", "timer_label": "타이머 정보",
"top_buildup": "총 누적치", "top_buildup": "총 누적치",
"top_damage": "최고 대미지", "top_damage": "최고 대미지",
"top_dps": "최고 DPS", "top_dps": "최고 DPS",
"top_left": "좌상단", "top_left": "좌상단",
"top_right": "우상단", "top_right": "우상단",
"total": "Total", "total": "전체",
"total_buildup": "총 누적치", "total_buildup": "총 누적치",
"total_buildup_label": "총 누적치 정보", "total_buildup_label": "총 누적치 정보",
"total_buildup_value_label": "총 누적치 값 정보", "total_buildup_value_label": "총 누적치 값 정보",
"total_cart_count_label": "Total Cart Count Label", "total_cart_count_label": "총 수레 횟수 정보",
"total_damage": "총 대미지", "total_damage": "총 대미지",
"total_damage_label": "총 대미지 정보", "total_damage_label": "총 대미지 정보",
"total_damage_location": "Total Damage Bar Location", "total_damage_location": "총 대미지 막대 위치",
"total_damage_offset_is_relative": "총 대미지 거리를 상대적 값으로", "total_damage_offset_is_relative": "총 대미지 오프셋을 상대적 값으로",
"total_damage_value_label": "총 대미지 값 정보", "total_damage_value_label": "총 대미지 값 정보",
"total_dps": "총 DPS", "total_dps": "총 DPS",
"total_dps_label": "총 DPS 정보", "total_dps_label": "총 DPS 정보",
"tracked_damage_types": "추적할 대미지 종류", "tracked_damage_types": "추적할 대미지 종류",
"tracked_monster_types": "추적할 몬스터 타입", "tracked_monster_types": "추적할 몬스터 타입",
"type": "순으로", "type": "종류",
"use_d2d_if_available": "Use Direct2D if available", "use_d2d_if_available": "가능한 Direct2D를 사용함",
"value_label": "값 정보", "value_label": "값 정보",
"vertical": "세로", "vertical": "세로",
"viewport_offset": "뷰포트 거리", "viewport_offset": "뷰포트 오프셋",
"visible": "표시함", "visible": "표시함",
"width": "너비", "width": "너비",
"world_offset": "전역 거리", "world_offset": "전역 오프셋",
"wyvern_riding_damage": "용조종 대미지", "wyvern_riding_damage": "용조종 대미지",
"x": "X", "x": "X",
"y": "Y", "y": "Y",
@@ -294,6 +306,7 @@
"font_name": "NotoSansKR-Bold.otf", "font_name": "NotoSansKR-Bold.otf",
"parts": { "parts": {
"abdomen": "배", "abdomen": "배",
"amatsu_unknown": "?",
"antenna": "더듬이", "antenna": "더듬이",
"arms": "팔", "arms": "팔",
"arms_mud": "팔(진흙)", "arms_mud": "팔(진흙)",
@@ -350,7 +363,7 @@
"tail_mud": "꼬리(진흙)", "tail_mud": "꼬리(진흙)",
"tail_tip": "꼬리끝", "tail_tip": "꼬리끝",
"tail_windsac": "꼬리(바람주머니)", "tail_windsac": "꼬리(바람주머니)",
"thundersacs": "Thundersacs", "thundersacs": "번개주머니",
"torso": "몸통", "torso": "몸통",
"torso_mud": "몸통(진흙)", "torso_mud": "몸통(진흙)",
"unknown": "?", "unknown": "?",

View File

@@ -65,6 +65,7 @@
"break_health_percentage": "Повреждение части в процентах", "break_health_percentage": "Повреждение части в процентах",
"break_max_count": "Максимальное кол-во повреждений", "break_max_count": "Максимальное кол-во повреждений",
"break_severe_filter": "Повреждение + Отсечение", "break_severe_filter": "Повреждение + Отсечение",
"buff_UI": "Интерфейс баффов",
"buildup": "Накопление", "buildup": "Накопление",
"buildup_bar": "Шкала накопления", "buildup_bar": "Шкала накопления",
"buildup_bars_are_relative_to": "Шкалы накопления расположены относительно к", "buildup_bars_are_relative_to": "Шкалы накопления расположены относительно к",
@@ -78,9 +79,12 @@
"closest": "Ближайший", "closest": "Ближайший",
"color": "Цвет", "color": "Цвет",
"colors": "Цвета", "colors": "Цвета",
"config": "Файл конфигурации",
"creature_name_label": "Метка имени существа", "creature_name_label": "Метка имени существа",
"crown": "Корона", "crown": "Корона",
"crown_thresholds": "Лимиты корон", "crown_thresholds": "Лимиты корон",
"current_state": "Текущее состояние",
"current_value": "Текущее значение",
"cutscene": "Катсцена", "cutscene": "Катсцена",
"damage": "Урон", "damage": "Урон",
"damage_bar": "Шкала урона", "damage_bar": "Шкала урона",
@@ -88,10 +92,14 @@
"damage_meter_UI": "Интерфейс модуля урона", "damage_meter_UI": "Интерфейс модуля урона",
"damage_percentage_label": "Метка урона в процентах", "damage_percentage_label": "Метка урона в процентах",
"damage_value_label": "Метка значений урона", "damage_value_label": "Метка значений урона",
"default_state": "Состояние по умолчанию",
"delete": "Удалить",
"distance": "Расстояние", "distance": "Расстояние",
"dps": "Урон в секунду", "dps": "Урон в секунду",
"dps_label": "Метка урона в секунду", "dps_label": "Метка урона в секунду",
"dps_mode": "Режим урона в секунду", "dps_mode": "Режим урона в секунду",
"duplicate": "Дублировать",
"duration": "Продолжительность",
"dynamic_positioning": "Динамическое позиционирование", "dynamic_positioning": "Динамическое позиционирование",
"dynamically_positioned": "Рассположенный динамично", "dynamically_positioned": "Рассположенный динамично",
"enable_for": "Показывать для", "enable_for": "Показывать для",
@@ -102,6 +110,7 @@
"farthest": "Самый дальний", "farthest": "Самый дальний",
"fight_time": "Время в бою", "fight_time": "Время в бою",
"filter": "Фильтр", "filter": "Фильтр",
"filter_mode": "Режим Фильтра",
"first": "Первый", "first": "Первый",
"first_hit": "Первый удар", "first_hit": "Первый удар",
"flinch_count": "Кол-во вздрагиваний", "flinch_count": "Кол-во вздрагиваний",
@@ -120,6 +129,7 @@
"hide_ailments_with_zero_buildup": "Скрыть аномальный статус, если накопление равно 0", "hide_ailments_with_zero_buildup": "Скрыть аномальный статус, если накопление равно 0",
"hide_all_active_ailments": "Скрыть все активные аномальные статусы", "hide_all_active_ailments": "Скрыть все активные аномальные статусы",
"hide_all_inactive_ailments": "Скрыть все неактивные аномальные статусы", "hide_all_inactive_ailments": "Скрыть все неактивные аномальные статусы",
"hide_bar_for_infinite_buffs": "Скрыть шкалу у бесконечных баффов",
"hide_dead_or_captured": "Скрыть мёртвых и захваченных монстров", "hide_dead_or_captured": "Скрыть мёртвых и захваченных монстров",
"hide_disabled_ailments": "Скрыть отключенные аномальные статусы", "hide_disabled_ailments": "Скрыть отключенные аномальные статусы",
"hide_inactive_ailments_with_no_buildup_support": "Скрыть неактивные аномальные статусы без поддержки накопления", "hide_inactive_ailments_with_no_buildup_support": "Скрыть неактивные аномальные статусы без поддержки накопления",
@@ -128,7 +138,8 @@
"hide_myself": "Скрыть себя", "hide_myself": "Скрыть себя",
"hide_other_players": "Скрыть остальных игроков", "hide_other_players": "Скрыть остальных игроков",
"hide_player_if_player_damage_is_zero": "Скрыть игрока, если его урон равен 0", "hide_player_if_player_damage_is_zero": "Скрыть игрока, если его урон равен 0",
"hide_servants": "Hide Followers", "hide_servants": "Скрыть последователей",
"hide_timer_for_infinite_buffs": "Скрыть таймер у бесконечных баффов",
"hide_total_damage": "Скрыть общий урон", "hide_total_damage": "Скрыть общий урон",
"hide_total_if_total_damage_is_zero": "Скрыть общий урон, если он равен 0", "hide_total_if_total_damage_is_zero": "Скрыть общий урон, если он равен 0",
"hide_undamaged_parts": "Скрыть неповреждённые части тела", "hide_undamaged_parts": "Скрыть неповреждённые части тела",
@@ -138,6 +149,7 @@
"highlighted_bar": "Помеченная шкала", "highlighted_bar": "Помеченная шкала",
"highlighted_buildup_bar": "Помеченная шкала накопления", "highlighted_buildup_bar": "Помеченная шкала накопления",
"highlighted_damage_bar": "Помеченная шкала урона", "highlighted_damage_bar": "Помеченная шкала урона",
"highlighted_targeted": "Помеченный",
"horizontal": "Горизонтально", "horizontal": "Горизонтально",
"hotkeys": "Горячие клавиши", "hotkeys": "Горячие клавиши",
"hunter_rank": "Ранг охотника", "hunter_rank": "Ранг охотника",
@@ -159,8 +171,8 @@
"large_monster_static_UI": "Статический интерфейс больших монстров", "large_monster_static_UI": "Статический интерфейс больших монстров",
"large_monsters": "Большие монстры", "large_monsters": "Большие монстры",
"last": "Последний", "last": "Последний",
"level": "Level", "level": "Уровень",
"level_label": "Level Label", "level_label": "Метка уровня",
"loading_quest": "Загрузка квеста", "loading_quest": "Загрузка квеста",
"loss_health": "Отсечение части", "loss_health": "Отсечение части",
"loss_health_percentage": "Отсечение части в процентах", "loss_health_percentage": "Отсечение части в процентах",
@@ -169,6 +181,7 @@
"master_rank": "Ранг мастера", "master_rank": "Ранг мастера",
"max_distance": "Макс. расстояние", "max_distance": "Макс. расстояние",
"max_monster_updates_per_tick": "Макс. кол-во обновлений за тик", "max_monster_updates_per_tick": "Макс. кол-во обновлений за тик",
"max_value": "Максимальное значение",
"me": "Я", "me": "Я",
"menu_font": "Шрифт меню", "menu_font": "Шрифт меню",
"menu_font_change_disclaimer": "Изменение языка и размера шрифта меню несколько раз приведёт к вылету!", "menu_font_change_disclaimer": "Изменение языка и размера шрифта меню несколько раз приведёт к вылету!",
@@ -183,10 +196,11 @@
"monster_name": "Имя монстра", "monster_name": "Имя монстра",
"monster_name_label": "Метка имени монстра", "monster_name_label": "Метка имени монстра",
"my_damage_bar_location": "Позиция моей шкалы урона", "my_damage_bar_location": "Позиция моей шкалы урона",
"my_otomos": "My Buddies", "my_otomos": "Мои спутники",
"myself": "Myself", "myself": "Я",
"name": "Name", "name": "Имя",
"name_label": "Name Label", "name_label": "Метка имени",
"new": "Создать",
"none": "Нет", "none": "Нет",
"normal": "Обычный", "normal": "Обычный",
"offset": "Сдвиг", "offset": "Сдвиг",
@@ -194,8 +208,7 @@
"opacity_falloff": "Увеличение прозрачности от расстояния", "opacity_falloff": "Увеличение прозрачности от расстояния",
"orientation": "Ориентация", "orientation": "Ориентация",
"other_damage": "Другой урон", "other_damage": "Другой урон",
"other_otomos": "Other Buddies", "other_player_otomos": "Спутники других игроков",
"other_player_otomos": "Other Player Buddies",
"other_players": "Другие игроки", "other_players": "Другие игроки",
"otomo_damage": "Урон от спутников", "otomo_damage": "Урон от спутников",
"outline": "Обводка", "outline": "Обводка",
@@ -222,23 +235,21 @@
"rage": "Ярость", "rage": "Ярость",
"reframework_outdated": "Установленная версия REFramework устарела. Пожалуйста, обновитесь, иначе MHR Overlay будет работать некорректно.", "reframework_outdated": "Установленная версия REFramework устарела. Пожалуйста, обновитесь, иначе MHR Overlay будет работать некорректно.",
"relative_offset": "Относительный сдвиг", "relative_offset": "Относительный сдвиг",
"rename": "Переименовать",
"render_highlighted_monster": "Показывать помеченного монстра", "render_highlighted_monster": "Показывать помеченного монстра",
"render_not_highlighted_monsters": "Показывать непомеченных монстров", "render_not_highlighted_monsters": "Показывать непомеченных монстров",
"renderer": "Renderer", "renderer": "Рендерер",
"reset": "Сбросить",
"reversed_order": "Обратный порядок", "reversed_order": "Обратный порядок",
"reward_screen": "Экран наград", "reward_screen": "Экран наград",
"servant_otomos": "Servant Buddies", "servant_otomos": "Спутники последователей",
"servants": "Followers", "servants": "Последователи",
"settings": "Настройки", "settings": "Настройки",
"severe_filter": "Отсечение", "severe_filter": "Отсечение",
"shadow": "Тень", "shadow": "Тень",
"show_followers_separately": "Показывать последователей отдельно",
"show_my_otomos_separately": "Показывать моих спутников отдельно", "show_my_otomos_separately": "Показывать моих спутников отдельно",
"show_other_otomos_separately": "Показывать спутников других игроков отдельно", "show_other_player_otomos_separately": "Показывать спутников других игроков отдельно",
"show_other_player_otomos_separately": "Show Other Player Buddies separately", "show_servant_otomos_separately": "Показывать спутников последователей отдельно",
"show_servant_otomos_separately": "Show Follower Buddies separately",
"show_servant_separately": "Show Followers separately",
"show_servants_separately": "Show Followers separately",
"size": "Размер", "size": "Размер",
"small_monster_UI": "Интерфейс малых монстров", "small_monster_UI": "Интерфейс малых монстров",
"small_monsters": "Малые монстры", "small_monsters": "Малые монстры",
@@ -258,13 +269,14 @@
"time_UI": "Интерфейс времени", "time_UI": "Интерфейс времени",
"time_label": "Метка времени", "time_label": "Метка времени",
"time_limit": "Ограничение по времени (cек.)", "time_limit": "Ограничение по времени (cек.)",
"timer": "Таймер",
"timer_label": "Метка таймера", "timer_label": "Метка таймера",
"top_buildup": "Наибольшее накопление", "top_buildup": "Наибольшее накопление",
"top_damage": "Наибольший урон", "top_damage": "Наибольший урон",
"top_dps": "Наибольший урон в секунду", "top_dps": "Наибольший урон в секунду",
"top_left": "Левый верхний угол", "top_left": "Левый верхний угол",
"top_right": "Правый верхний угол", "top_right": "Правый верхний угол",
"total": "Total", "total": "Всего",
"total_buildup": "Общее накопление", "total_buildup": "Общее накопление",
"total_buildup_label": "Метка общего накопления", "total_buildup_label": "Метка общего накопления",
"total_buildup_value_label": "Метка значения общего накопления", "total_buildup_value_label": "Метка значения общего накопления",
@@ -294,6 +306,7 @@
"font_name": "NotoSansKR-Bold.otf", "font_name": "NotoSansKR-Bold.otf",
"parts": { "parts": {
"abdomen": "Брюхо", "abdomen": "Брюхо",
"amatsu_unknown": "?",
"antenna": "Антернна", "antenna": "Антернна",
"arms": "Передние лапы", "arms": "Передние лапы",
"arms_mud": "Передние лапы (в грязи)", "arms_mud": "Передние лапы (в грязи)",

View File

@@ -4,12 +4,12 @@
"buildup": "积累值:", "buildup": "积累值:",
"gold": "金冠", "gold": "金冠",
"mini": "小型", "mini": "小型",
"otomo": "Buddy", "otomo": "随从",
"part_break": "Break", "part_break": "部位破坏",
"part_sever": "Sever", "part_sever": "部位切断",
"player": "玩家", "player": "玩家",
"rage": "愤怒值:", "rage": "愤怒值:",
"servant": "Follower", "servant": "盟友",
"silver": "银冠", "silver": "银冠",
"stamina": "耐力:", "stamina": "耐力:",
"total_buildup": "总积累值", "total_buildup": "总积累值",
@@ -48,23 +48,24 @@
"ailments": "状态异常", "ailments": "状态异常",
"all_UI": "所有UI", "all_UI": "所有UI",
"anchor": "锚点", "anchor": "锚点",
"apply": "Apply", "apply": "应用",
"assign_new_key": "指定新按键", "assign_new_key": "指定新按键",
"auto_highlight": "Auto-highlight", "auto_highlight": "自动高亮",
"background": "背景", "background": "背景",
"bar": "状态条", "bar": "状态条",
"blast_damage": "爆破伤害", "blast_damage": "爆破伤害",
"body_parts": "身体部位", "body_parts": "身体部位",
"bold": "粗体", "bold": "粗体",
"bomb_damage": "炸弹伤害", "bomb_damage": "爆弹桶伤害",
"bottom_left": "左下", "bottom_left": "左下",
"bottom_right": "右下", "bottom_right": "右下",
"break_count": "破坏次数", "break_count": "破坏次数",
"break_filter": "Break", "break_filter": "破坏",
"break_health": "Break Health", "break_health": "破坏值",
"break_health_percentage": "Break Health Percentage", "break_health_percentage": "破坏值百分比",
"break_max_count": "Break Max Count", "break_max_count": "最大破坏次数",
"break_severe_filter": "Break + Severe", "break_severe_filter": "破坏+切断",
"buff_UI": "Buff UI",
"buildup": "积累值", "buildup": "积累值",
"buildup_bar": "积累值条", "buildup_bar": "积累值条",
"buildup_bars_are_relative_to": "积累值条基于", "buildup_bars_are_relative_to": "积累值条基于",
@@ -72,85 +73,96 @@
"buildup_percentage_label": "积累值百分比标签", "buildup_percentage_label": "积累值百分比标签",
"buildup_value_label": "积累值标签", "buildup_value_label": "积累值标签",
"capture_line": "可捕捉线", "capture_line": "可捕捉线",
"cart_count": "Cart Count", "cart_count": "猫车数",
"cart_count_label": "Cart Count Label", "cart_count_label": "猫车数标签",
"center": "Center", "center": "中央",
"closest": "Closest", "closest": "最近的",
"color": "颜色", "color": "颜色",
"colors": "颜色", "colors": "颜色",
"config": "设置",
"creature_name_label": "生物名标签", "creature_name_label": "生物名标签",
"crown": "皇冠", "crown": "皇冠",
"crown_thresholds": "皇冠阈值", "crown_thresholds": "皇冠阈值",
"cutscene": "Cutscene", "current_state": "当前阶段",
"current_value": "当前值",
"cutscene": "过场动画",
"damage": "伤害", "damage": "伤害",
"damage_bar": "伤害条", "damage_bar": "伤害条",
"damage_bars_are_relative_to": "伤害条基于", "damage_bars_are_relative_to": "伤害条基于",
"damage_meter_UI": "伤害统计UI", "damage_meter_UI": "伤害统计UI",
"damage_percentage_label": "伤害百分比标签", "damage_percentage_label": "伤害百分比标签",
"damage_value_label": "伤害量标签", "damage_value_label": "伤害量标签",
"default_state": "默认阶段",
"delete": "删除",
"distance": "距离", "distance": "距离",
"dps": "DPS", "dps": "DPS",
"dps_label": "DPS标签", "dps_label": "DPS标签",
"dps_mode": "DPS模式", "dps_mode": "DPS模式",
"duplicate": "复制",
"duration": "持续时间",
"dynamic_positioning": "动态位置", "dynamic_positioning": "动态位置",
"dynamically_positioned": "动态位置", "dynamically_positioned": "动态位置",
"enable_for": "开启", "enable_for": "开启",
"enabled": "开启", "enabled": "开启",
"endemic_life_UI": "环境生物UI", "endemic_life_UI": "环境生物UI",
"endemic_life_damage": "Endemic Life Damage", "endemic_life_damage": "环境生物伤害",
"family": "字体", "family": "字体",
"farthest": "Farthest", "farthest": "最远",
"fight_time": "战斗时间", "fight_time": "战斗时间",
"filter": "筛选器", "filter": "筛选器",
"filter_mode": "筛选方式",
"first": "第一", "first": "第一",
"first_hit": "第一击", "first_hit": "第一击",
"flinch_count": "胆怯次数", "flinch_count": "胆怯次数",
"foreground": "前景", "foreground": "前景",
"freeze_dps_on_quest_end": "Freeze DPS on Quest End", "freeze_dps_on_quest_end": "任务结束时冻结DPS",
"global_position_modifier": "全局位置更改", "global_position_modifier": "全局位置更改",
"global_scale_modifier": "全局比例更改", "global_scale_modifier": "全局比例更改",
"global_settings": "全局设定", "global_settings": "全局设定",
"health": "生命", "health": "生命",
"health_break_filter": "Health + Break", "health_break_filter": "生命+破坏",
"health_break_severe_filter": "Health + Break + Severe", "health_break_severe_filter": "生命+破坏+切断",
"health_filter": "Health", "health_filter": "生命",
"health_percentage": "生命百分比", "health_percentage": "生命百分比",
"health_severe_filter": "Health + Severe", "health_severe_filter": "生命+切断",
"height": "高度", "height": "高度",
"hide_ailments_with_zero_buildup": "当积累值为0时隐藏该状态异常", "hide_ailments_with_zero_buildup": "当积累值为0时隐藏该状态异常",
"hide_all_active_ailments": "隐藏所有激活的状态异常", "hide_all_active_ailments": "隐藏所有激活的状态异常",
"hide_all_inactive_ailments": "隐藏所有没有激活的状态异常", "hide_all_inactive_ailments": "隐藏所有没有激活的状态异常",
"hide_bar_for_infinite_buffs": "隐藏无限Buff的状态条",
"hide_dead_or_captured": "隐藏死亡或被捕获的怪物", "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_module_if_total_damage_is_zero": "当总伤害为0时隐藏该模块", "hide_module_if_total_damage_is_zero": "当总伤害为0时隐藏该模块",
"hide_myself": "Hide Myself", "hide_myself": "隐藏我自己",
"hide_other_players": "Hide Other Players", "hide_other_players": "隐藏其他玩家",
"hide_player_if_player_damage_is_zero": "当玩家伤害为0时隐藏该玩家", "hide_player_if_player_damage_is_zero": "当玩家伤害为0时隐藏该玩家",
"hide_servants": "Hide Followers", "hide_servants": "隐藏盟友",
"hide_total_damage": "Hide Total Damage", "hide_timer_for_infinite_buffs": "隐藏无限Buff的计时器",
"hide_total_damage": "隐藏总伤害",
"hide_total_if_total_damage_is_zero": "当总伤害为0时隐藏总伤害", "hide_total_if_total_damage_is_zero": "当总伤害为0时隐藏总伤害",
"hide_undamaged_parts": "隐藏没有受到伤害的部位", "hide_undamaged_parts": "隐藏没有受到伤害的部位",
"highest_health": "Highest Health", "highest_health": "最高生命值",
"highest_health_percentage": "Highest Health Percentage", "highest_health_percentage": "最高生命百分比",
"highlighted": "高亮(目标)", "highlighted": "高亮",
"highlighted_bar": "高亮条", "highlighted_bar": "高亮条",
"highlighted_buildup_bar": "高亮积累值条", "highlighted_buildup_bar": "高亮积累值条",
"highlighted_damage_bar": "高亮伤害条", "highlighted_damage_bar": "高亮伤害条",
"highlighted_targeted": "高亮目标[锁定目标的UI]",
"horizontal": "水平", "horizontal": "水平",
"hotkeys": "热键", "hotkeys": "热键",
"hunter_rank": "猎人等", "hunter_rank": "猎人等",
"hunter_rank_label": "猎人等级标签", "hunter_rank_label": "猎人等级标签",
"id": "ID", "id": "ID",
"in_lobby": "In Lobby", "in_lobby": "在大厅",
"in_training_area": "In Training Area", "in_training_area": "在修炼场",
"include": "包含", "include": "包含",
"inside": "Inside", "inside": "里面",
"installation_damage": "设伤害", "installation_damage": "设伤害",
"italic": "斜体", "italic": "斜体",
"join_time": "加入时间", "join_time": "加入时间",
"killcam": "Killcam", "killcam": "击杀镜头",
"kunai_damage": "苦无伤害", "kunai_damage": "苦无伤害",
"language": "语言", "language": "语言",
"large_monster_UI": "大型怪物UI", "large_monster_UI": "大型怪物UI",
@@ -159,86 +171,85 @@
"large_monster_static_UI": "大型怪物固定UI", "large_monster_static_UI": "大型怪物固定UI",
"large_monsters": "大型怪物群", "large_monsters": "大型怪物群",
"last": "最后", "last": "最后",
"level": "Level", "level": "等级",
"level_label": "Level Label", "level_label": "等级标签",
"loading_quest": "Loading Quest", "loading_quest": "任务加载中",
"loss_health": "Sever Health", "loss_health": "切断值",
"loss_health_percentage": "Sever Health Percentage", "loss_health_percentage": "切断值百分比",
"lowest_health": "Lowest Health", "lowest_health": "最低生命值",
"lowest_health_percentage": "Lowest Health Percentage", "lowest_health_percentage": "最低生命百分比",
"master_rank": "Master Rank", "master_rank": "大师等级",
"max_distance": "最大距离", "max_distance": "最大距离",
"max_monster_updates_per_tick": "每次更新的最大怪物数量", "max_monster_updates_per_tick": "每次更新的最大怪物数量",
"max_value": "最大值",
"me": "我", "me": "我",
"menu_font": "菜单字体", "menu_font": "菜单字体",
"menu_font_change_disclaimer": "Changing Language and Menu Font Size several times will cause a crash!", "menu_font_change_disclaimer": "多次改变字体或语言会导致崩溃!",
"mod_name": "MHR Overlay", "mod_name": "MHR Overlay",
"mode": "Mode", "mode": "模式",
"modifiers": "更改项", "modifiers": "更改项",
"module_visibility_based_on_game_state": "Module Visibility based on Game State", "module_visibility_based_on_game_state": "基于游戏状态的模组可视化设置",
"modules": "模块", "modules": "模块",
"monster_can_be_captured": "可捕获的怪物", "monster_can_be_captured": "可捕获的怪物",
"monster_damage": "怪物伤害", "monster_damage": "怪物伤害",
"monster_id": "Monster ID", "monster_id": "怪物ID",
"monster_name": "怪物名", "monster_name": "怪物名",
"monster_name_label": "怪物名标签", "monster_name_label": "怪物名标签",
"my_damage_bar_location": "我的伤害条位置", "my_damage_bar_location": "我的伤害条位置",
"my_otomos": "My Buddies", "my_otomos": "我的随从",
"myself": "Myself", "myself": "我自己",
"name": "Name", "name": "名称",
"name_label": "Name Label", "name_label": "名字标签",
"new": "新建",
"none": "空", "none": "空",
"normal": "正常", "normal": "正常",
"offset": "偏移", "offset": "偏移",
"offset_is_relative_to_parts": "根据部位偏移", "offset_is_relative_to_parts": "根据部位偏移",
"opacity_falloff": "透明度增加", "opacity_falloff": "透明度增加",
"orientation": "方向", "orientation": "方向",
"other_damage": "Other Damage", "other_damage": "其他伤害",
"other_otomos": "Other Buddies", "other_player_otomos": "其他玩家的随从",
"other_player_otomos": "Other Player Buddies",
"other_players": "其他玩家", "other_players": "其他玩家",
"otomo_damage": "随从伤害", "otomo_damage": "随从伤害",
"outline": "Outline", "outline": "轮廓",
"outside": "Outside", "outside": "外面",
"part_health": "Part Health", "part_health": "部位生命值",
"part_name": "部位名", "part_name": "部位名",
"part_name_label": "部位名标签", "part_name_label": "部位名标签",
"percentage_label": "百分比标签", "percentage_label": "百分比标签",
"performance": "性能", "performance": "性能",
"player_damage": "玩家伤害", "player_damage": "玩家伤害",
"player_name_label": "玩家名标签", "player_name_label": "玩家名标签",
"player_name_size_limit": "Player Name Size Limit", "player_name_size_limit": "玩家名长度限制",
"player_spacing": "玩家间距", "player_spacing": "玩家间距",
"playing_quest": "Playing Quest", "playing_quest": "操作界面/正常游玩时",
"poison_damage": "中毒伤害", "poison_damage": "中毒伤害",
"position": "位置", "position": "位置",
"press_any_key": "按任意键...", "press_any_key": "按任意键...",
"prioritize_large_monsters": "大型怪物优先", "prioritize_large_monsters": "大型怪物优先",
"quest_end_animation": "Quest End Animation", "quest_end_animation": "任务结束动画",
"quest_end_screen": "Quest End Screen", "quest_end_screen": "任务结束界面",
"quest_end_timer": "Quest End Timer", "quest_end_timer": "任务结束计时器",
"quest_start_animation": "Quest Start Animation", "quest_start_animation": "任务开始动画",
"quest_time": "任务时间", "quest_time": "任务时间",
"rage": "愤怒", "rage": "愤怒",
"reframework_outdated": "Installed REFramework version is outdated. Please, update. Otherwise, MHR Overlay won't work correctly.", "reframework_outdated": "已安装的REFramework版本过低请更新。否则MHR Overlay不能正常工作。",
"relative_offset": "相对偏移", "relative_offset": "相对偏移",
"rename": "重命名",
"render_highlighted_monster": "渲染高亮怪物", "render_highlighted_monster": "渲染高亮怪物",
"render_not_highlighted_monsters": "渲染非高亮怪物", "render_not_highlighted_monsters": "渲染非高亮怪物",
"renderer": "Renderer", "renderer": "渲染器",
"reset": "重置",
"reversed_order": "逆向排序", "reversed_order": "逆向排序",
"reward_screen": "Reward Screen", "reward_screen": "奖励界面",
"servant_otomos": "Servant Buddies", "servant_otomos": "盟友随从",
"servants": "Followers", "servants": "盟友",
"settings": "设定", "settings": "设定",
"severe_filter": "Severe", "severe_filter": "切断",
"shadow": "阴影", "shadow": "阴影",
"show_followers_separately": "Show Followers separately", "show_my_otomos_separately": "分开显示我的随从",
"show_my_otomos_separately": "Show my Buddies separately", "show_other_player_otomos_separately": "分开显示其他玩家的随从",
"show_other_otomos_separately": "Show other Buddies separately", "show_servant_otomos_separately": "分开显示盟友的随从",
"show_other_player_otomos_separately": "Show Other Player Buddies separately",
"show_servant_otomos_separately": "Show Follower Buddies separately",
"show_servant_separately": "Show Followers separately",
"show_servants_separately": "Show Followers separately",
"size": "大小", "size": "大小",
"small_monster_UI": "小型怪物UI", "small_monster_UI": "小型怪物UI",
"small_monsters": "小型怪物群", "small_monsters": "小型怪物群",
@@ -251,27 +262,28 @@
"static_spacing": "固定间距", "static_spacing": "固定间距",
"statically_positioned": "固定位置", "statically_positioned": "固定位置",
"status": "状态", "status": "状态",
"style": "Style", "style": "样式",
"summary_screen": "Summary Screen", "summary_screen": "总结界面",
"text_label": "文字标签", "text_label": "文字标签",
"thickness": "Thickness", "thickness": "粗细度",
"time_UI": "时间UI", "time_UI": "时间UI",
"time_label": "时间标签", "time_label": "时间标签",
"time_limit": "时间限制(秒)", "time_limit": "时间限制(秒)",
"timer": "计时器",
"timer_label": "计时器标签", "timer_label": "计时器标签",
"top_buildup": "最高积累值", "top_buildup": "最高积累值",
"top_damage": "最高伤害", "top_damage": "最高伤害",
"top_dps": "最高DPS", "top_dps": "最高DPS",
"top_left": "左上", "top_left": "左上",
"top_right": "右上", "top_right": "右上",
"total": "Total", "total": "总计",
"total_buildup": "总积累值", "total_buildup": "总积累值",
"total_buildup_label": "总积累值标签", "total_buildup_label": "总积累值标签",
"total_buildup_value_label": "总积累值标签", "total_buildup_value_label": "总积累值标签",
"total_cart_count_label": "Total Cart Count Label", "total_cart_count_label": "总猫车数标签",
"total_damage": "总伤害", "total_damage": "总伤害",
"total_damage_label": "总伤害标签", "total_damage_label": "总伤害标签",
"total_damage_location": "Total Damage Bar Location", "total_damage_location": "总伤害条位置",
"total_damage_offset_is_relative": "总伤害相对偏移", "total_damage_offset_is_relative": "总伤害相对偏移",
"total_damage_value_label": "总伤害量标签", "total_damage_value_label": "总伤害量标签",
"total_dps": "总DPS", "total_dps": "总DPS",
@@ -279,14 +291,14 @@
"tracked_damage_types": "跟踪的伤害类型", "tracked_damage_types": "跟踪的伤害类型",
"tracked_monster_types": "跟踪的怪物类型", "tracked_monster_types": "跟踪的怪物类型",
"type": "类型", "type": "类型",
"use_d2d_if_available": "Use Direct2D if available", "use_d2d_if_available": "可用时使用Direct2D",
"value_label": "数字", "value_label": "数字",
"vertical": "垂直", "vertical": "垂直",
"viewport_offset": "窗口偏移", "viewport_offset": "窗口偏移",
"visible": "可见", "visible": "可见",
"width": "宽度", "width": "宽度",
"world_offset": "整体偏移", "world_offset": "整体偏移",
"wyvern_riding_damage": "Wyvern Riding Damage", "wyvern_riding_damage": "御龙伤害",
"x": "X轴", "x": "X轴",
"y": "Y轴", "y": "Y轴",
"z": "Z轴" "z": "Z轴"
@@ -294,70 +306,71 @@
"font_name": "NotoSansSC-Bold.otf", "font_name": "NotoSansSC-Bold.otf",
"parts": { "parts": {
"abdomen": "腹部", "abdomen": "腹部",
"antenna": "Antenna", "amatsu_unknown": "?",
"antenna": "触角",
"arms": "手臂", "arms": "手臂",
"arms_mud": "Arms (Mud)", "arms_mud": "手臂(泥)",
"back": "背部", "back": "背部",
"back_windsac": "背部(风袋)", "back_windsac": "背部(风袋)",
"body": "本体", "body": "本体",
"body_mud": "Body (Mud)", "body_mud": "身体(泥)",
"carapace": "甲壳", "carapace": "甲壳",
"chest": "Chest", "chest": "胸部",
"chest_windsac": "胸部(风袋)", "chest_windsac": "胸部(风袋)",
"claw": "爪", "claw": "爪",
"crest": "Crest", "crest": "头冠",
"dorsal_fin": "背鳍", "dorsal_fin": "背鳍",
"foreleg": "Foreleg", "foreleg": "前腿",
"forelegs": "Forelegs", "forelegs": "前腿",
"head": "头部", "head": "头部",
"head_mud": "头部(泥)", "head_mud": "头部(泥)",
"hind_leg": "Hind Leg", "hind_leg": "后腿",
"hind_legs": "Hind Legs", "hind_legs": "后腿",
"large_mudbulb": "大泥球", "large_mudbulb": "大泥球",
"left_arm": "左臂", "left_arm": "左臂",
"left_arm_ice": "左臂(冰)", "left_arm_ice": "左臂(冰)",
"left_claw": "Left Claw", "left_claw": "左爪",
"left_cutwing": "左刃翼", "left_cutwing": "左刃翼",
"left_foreleg": "Foreleg L", "left_foreleg": "左前腿",
"left_hind_leg": "Hind Leg L", "left_hind_leg": "左后腿",
"left_leg": "左腿", "left_leg": "左腿",
"left_leg_mud": "Leg L (Mud)", "left_leg_mud": "左腿(泥)",
"left_legs": "左腿", "left_legs": "左腿",
"left_wing": "左翼", "left_wing": "左翼",
"left_wingclaw": "Wingclaw L", "left_wingclaw": "左翼爪",
"legs": "四肢", "legs": "四肢",
"lower_back": "下背部", "lower_back": "下背部",
"lower_body": "下半身", "lower_body": "下半身",
"mane": "鬃毛", "mane": "鬃毛",
"mudbulb": "Mudbulb", "mudbulb": "泥球",
"neck": "颈部", "neck": "颈部",
"rear": "臀部", "rear": "臀部",
"right_arm": "右臂", "right_arm": "右臂",
"right_arm_ice": "右臂(冰)", "right_arm_ice": "右臂(冰)",
"right_claw": "Right Claw", "right_claw": "右爪",
"right_cutwing": "右刃翼", "right_cutwing": "右刃翼",
"right_foreleg": "Foreleg R", "right_foreleg": "右前腿",
"right_hind_leg": "Hind Leg R", "right_hind_leg": "右后腿",
"right_leg": "右腿", "right_leg": "右腿",
"right_leg_mud": "Leg R (Mud)", "right_leg_mud": "右腿(泥)",
"right_legs": "右腿", "right_legs": "右腿",
"right_wing": "右翼", "right_wing": "右翼",
"right_wingclaw": "Wingclaw R", "right_wingclaw": "右翼爪",
"rock": "岩石", "rock": "岩石",
"shell": "Shell", "shell": "",
"spinning": "旋转中", "spinning": "旋转中",
"tail": "尾巴", "tail": "尾巴",
"tail_mud": "尾巴(泥)", "tail_mud": "尾巴(泥)",
"tail_tip": "Tail Tip", "tail_tip": "尾尖",
"tail_windsac": "尾巴(风袋)", "tail_windsac": "尾巴(风袋)",
"thundersacs": "Thundersacs", "thundersacs": "雷袋",
"torso": "躯干", "torso": "躯干",
"torso_mud": "Torso (Mud)", "torso_mud": "躯干(泥)",
"unknown": "?", "unknown": "未知【等待更新】",
"upper_back": "上背", "upper_back": "上背",
"upper_body": "上半身", "upper_body": "上半身",
"wingclaw": "Wingclaw", "wingclaw": "翼爪",
"wingclaws": "Wingclaws", "wingclaws": "翼爪",
"wings": "翼" "wings": "翼"
} }
} }

View File

@@ -65,6 +65,7 @@
"break_health_percentage": "Break Health Percentage", "break_health_percentage": "Break Health Percentage",
"break_max_count": "Break Max Count", "break_max_count": "Break Max Count",
"break_severe_filter": "Break + Severe", "break_severe_filter": "Break + Severe",
"buff_UI": "Buff UI",
"buildup": "累積值", "buildup": "累積值",
"buildup_bar": "累積值條", "buildup_bar": "累積值條",
"buildup_bars_are_relative_to": "累積值條顯示位置調整", "buildup_bars_are_relative_to": "累積值條顯示位置調整",
@@ -78,9 +79,12 @@
"closest": "最近的", "closest": "最近的",
"color": "調色盤", "color": "調色盤",
"colors": "調色盤", "colors": "調色盤",
"config": "Config",
"creature_name_label": "環境生物名稱", "creature_name_label": "環境生物名稱",
"crown": "皇冠", "crown": "皇冠",
"crown_thresholds": "皇冠的大小判定範圍", "crown_thresholds": "皇冠的大小判定範圍",
"current_state": "Current State",
"current_value": "Current Value",
"cutscene": "Cutscene", "cutscene": "Cutscene",
"damage": "傷害", "damage": "傷害",
"damage_bar": "傷害條", "damage_bar": "傷害條",
@@ -88,10 +92,14 @@
"damage_meter_UI": "傷害量計算 UI", "damage_meter_UI": "傷害量計算 UI",
"damage_percentage_label": "傷害量百分比", "damage_percentage_label": "傷害量百分比",
"damage_value_label": "傷害量", "damage_value_label": "傷害量",
"default_state": "Default State",
"delete": "Delete",
"distance": "距離", "distance": "距離",
"dps": "DPS", "dps": "DPS",
"dps_label": "DPS文字", "dps_label": "DPS文字",
"dps_mode": "DPS模式", "dps_mode": "DPS模式",
"duplicate": "Duplicate",
"duration": "Duration",
"dynamic_positioning": "浮動的資訊位置", "dynamic_positioning": "浮動的資訊位置",
"dynamically_positioned": "浮動的魔物資訊", "dynamically_positioned": "浮動的魔物資訊",
"enable_for": "啟用對象", "enable_for": "啟用對象",
@@ -102,6 +110,7 @@
"farthest": "最遠的", "farthest": "最遠的",
"fight_time": "戰鬥時間", "fight_time": "戰鬥時間",
"filter": "篩選器", "filter": "篩選器",
"filter_mode": "Filter Mode",
"first": "第一", "first": "第一",
"first_hit": "第一擊", "first_hit": "第一擊",
"flinch_count": "膽怯次數", "flinch_count": "膽怯次數",
@@ -120,6 +129,7 @@
"hide_ailments_with_zero_buildup": "當累積值為0時,隱藏該異常狀態", "hide_ailments_with_zero_buildup": "當累積值為0時,隱藏該異常狀態",
"hide_all_active_ailments": "隱藏觸發中的異常狀態", "hide_all_active_ailments": "隱藏觸發中的異常狀態",
"hide_all_inactive_ailments": "隱藏尚未被觸發的異常狀態", "hide_all_inactive_ailments": "隱藏尚未被觸發的異常狀態",
"hide_bar_for_infinite_buffs": "Hide Bar for infinite Buffs",
"hide_dead_or_captured": "隱藏死亡或被捕獲的魔物", "hide_dead_or_captured": "隱藏死亡或被捕獲的魔物",
"hide_disabled_ailments": "隱藏並停用所有異常狀態", "hide_disabled_ailments": "隱藏並停用所有異常狀態",
"hide_inactive_ailments_with_no_buildup_support": "隱藏無累積值的非觸發下異常狀態", "hide_inactive_ailments_with_no_buildup_support": "隱藏無累積值的非觸發下異常狀態",
@@ -129,15 +139,17 @@
"hide_other_players": "隱藏其他玩家", "hide_other_players": "隱藏其他玩家",
"hide_player_if_player_damage_is_zero": "當玩家傷害為0時,隱藏玩家傷害", "hide_player_if_player_damage_is_zero": "當玩家傷害為0時,隱藏玩家傷害",
"hide_servants": "Hide Followers", "hide_servants": "Hide Followers",
"hide_timer_for_infinite_buffs": "Hide Timer for infinite Buffs",
"hide_total_damage": "隱藏總傷害", "hide_total_damage": "隱藏總傷害",
"hide_total_if_total_damage_is_zero": "當總傷害為0時,隱藏總傷害", "hide_total_if_total_damage_is_zero": "當總傷害為0時,隱藏總傷害",
"hide_undamaged_parts": "隱藏沒受到傷害的部位", "hide_undamaged_parts": "隱藏沒受到傷害的部位",
"highest_health": "最高血量", "highest_health": "最高血量",
"highest_health_percentage": "最高血量百分比", "highest_health_percentage": "最高血量百分比",
"highlighted": "鎖定的魔物資訊(目標)", "highlighted": "鎖定的魔物資訊",
"highlighted_bar": "重點條", "highlighted_bar": "重點條",
"highlighted_buildup_bar": "重點累積條", "highlighted_buildup_bar": "重點累積條",
"highlighted_damage_bar": "重點傷害條", "highlighted_damage_bar": "重點傷害條",
"highlighted_targeted": "鎖定的魔物資訊(目標)",
"horizontal": "水平", "horizontal": "水平",
"hotkeys": "快捷鍵", "hotkeys": "快捷鍵",
"hunter_rank": "獵人等級", "hunter_rank": "獵人等級",
@@ -169,6 +181,7 @@
"master_rank": "大師等級", "master_rank": "大師等級",
"max_distance": "最大距離", "max_distance": "最大距離",
"max_monster_updates_per_tick": "每次更新的最大魔物數量", "max_monster_updates_per_tick": "每次更新的最大魔物數量",
"max_value": "Max Value",
"me": "我", "me": "我",
"menu_font": "選單字體大小", "menu_font": "選單字體大小",
"menu_font_change_disclaimer": "重複變更語言和選單字型大小有可能會當機!", "menu_font_change_disclaimer": "重複變更語言和選單字型大小有可能會當機!",
@@ -187,6 +200,7 @@
"myself": "Myself", "myself": "Myself",
"name": "Name", "name": "Name",
"name_label": "Name Label", "name_label": "Name Label",
"new": "New",
"none": "空", "none": "空",
"normal": "正常", "normal": "正常",
"offset": "位置", "offset": "位置",
@@ -194,7 +208,6 @@
"opacity_falloff": "透明度提高", "opacity_falloff": "透明度提高",
"orientation": "對齊方式", "orientation": "對齊方式",
"other_damage": "其他傷害", "other_damage": "其他傷害",
"other_otomos": "Other Buddies",
"other_player_otomos": "Other Player Buddies", "other_player_otomos": "Other Player Buddies",
"other_players": "其他玩家", "other_players": "其他玩家",
"otomo_damage": "隨從傷害", "otomo_damage": "隨從傷害",
@@ -222,9 +235,11 @@
"rage": "憤怒度", "rage": "憤怒度",
"reframework_outdated": "已安裝的 REFramework 版本已過期. 麻煩請更新版本, 否則 MHR Overlay 無法正確作用.", "reframework_outdated": "已安裝的 REFramework 版本已過期. 麻煩請更新版本, 否則 MHR Overlay 無法正確作用.",
"relative_offset": "相對偏移", "relative_offset": "相對偏移",
"rename": "Rename",
"render_highlighted_monster": "渲染目標魔物", "render_highlighted_monster": "渲染目標魔物",
"render_not_highlighted_monsters": "渲染非目標魔物", "render_not_highlighted_monsters": "渲染非目標魔物",
"renderer": "Renderer", "renderer": "Renderer",
"reset": "Reset",
"reversed_order": "反向排序", "reversed_order": "反向排序",
"reward_screen": "Reward Screen", "reward_screen": "Reward Screen",
"servant_otomos": "Servant Buddies", "servant_otomos": "Servant Buddies",
@@ -232,13 +247,9 @@
"settings": "設定", "settings": "設定",
"severe_filter": "Severe", "severe_filter": "Severe",
"shadow": "陰影", "shadow": "陰影",
"show_followers_separately": "Show Followers separately",
"show_my_otomos_separately": "Show my Buddies separately", "show_my_otomos_separately": "Show my Buddies separately",
"show_other_otomos_separately": "Show other Buddies separately",
"show_other_player_otomos_separately": "Show Other Player Buddies separately", "show_other_player_otomos_separately": "Show Other Player Buddies separately",
"show_servant_otomos_separately": "Show Follower Buddies separately", "show_servant_otomos_separately": "Show Follower Buddies separately",
"show_servant_separately": "Show Followers separately",
"show_servants_separately": "Show Followers separately",
"size": "大小", "size": "大小",
"small_monster_UI": "小型魔物 UI", "small_monster_UI": "小型魔物 UI",
"small_monsters": "小型魔物群", "small_monsters": "小型魔物群",
@@ -258,6 +269,7 @@
"time_UI": "時間 UI", "time_UI": "時間 UI",
"time_label": "時間", "time_label": "時間",
"time_limit": "時限 (秒)", "time_limit": "時限 (秒)",
"timer": "Timer",
"timer_label": "計時器", "timer_label": "計時器",
"top_buildup": "最高累積值", "top_buildup": "最高累積值",
"top_damage": "最高傷害", "top_damage": "最高傷害",
@@ -294,6 +306,7 @@
"font_name": "NotoSansTC-Bold.otf", "font_name": "NotoSansTC-Bold.otf",
"parts": { "parts": {
"abdomen": "腹部", "abdomen": "腹部",
"amatsu_unknown": "?",
"antenna": "觸角", "antenna": "觸角",
"arms": "手臂", "arms": "手臂",
"arms_mud": "手臂 (泥)", "arms_mud": "手臂 (泥)",