mirror of
https://github.com/GreenComfyTea/MHR-Overlay.git
synced 2026-01-24 04:18:11 -08:00
Added highlighted large monster UI.
This commit is contained in:
@@ -89,8 +89,8 @@ re.on_frame(function()
|
|||||||
end);
|
end);
|
||||||
|
|
||||||
re.on_frame(function()
|
re.on_frame(function()
|
||||||
--draw.text("x: " .. tostring(x), 451, 51, 0xFF000000);
|
draw.text("x: " .. tostring(x), 451, 51, 0xFF000000);
|
||||||
--draw.text("x: " .. tostring(x), 450, 50, 0xFFFFFFFF);
|
draw.text("x: " .. tostring(x), 450, 50, 0xFFFFFFFF);
|
||||||
end);
|
end);
|
||||||
-- #endregion
|
-- #endregion
|
||||||
--------------------------RE_IMGUI---------------------------
|
--------------------------RE_IMGUI---------------------------
|
||||||
@@ -114,9 +114,10 @@ end, function()
|
|||||||
if quest_status.is_training_area then
|
if quest_status.is_training_area then
|
||||||
local dynamic_enabled = config.current_config.large_monster_UI.dynamic.enabled and config.current_config.global_settings.module_visibility.training_area.large_monster_dynamic_UI;
|
local dynamic_enabled = config.current_config.large_monster_UI.dynamic.enabled and config.current_config.global_settings.module_visibility.training_area.large_monster_dynamic_UI;
|
||||||
local static_enabled = config.current_config.large_monster_UI.static.enabled and config.current_config.global_settings.module_visibility.training_area.large_monster_static_UI;
|
local static_enabled = config.current_config.large_monster_UI.static.enabled and config.current_config.global_settings.module_visibility.training_area.large_monster_static_UI;
|
||||||
|
local highlighted_enabled = config.current_config.large_monster_UI.highlighted.enabled and config.current_config.global_settings.module_visibility.training_area.large_monster_highlighted_UI;
|
||||||
|
|
||||||
if dynamic_enabled or static_enabled then
|
if dynamic_enabled or static_enabled or highlighted_enabled then
|
||||||
local success = pcall(large_monster_UI.draw, dynamic_enabled, static_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 = "Large monster drawing function threw an exception";
|
customization_menu.status = "Large monster drawing function threw an exception";
|
||||||
end
|
end
|
||||||
@@ -140,9 +141,10 @@ end, function()
|
|||||||
|
|
||||||
local dynamic_enabled = config.current_config.large_monster_UI.dynamic.enabled and config.current_config.global_settings.module_visibility.during_quest.large_monster_dynamic_UI;
|
local dynamic_enabled = config.current_config.large_monster_UI.dynamic.enabled and config.current_config.global_settings.module_visibility.during_quest.large_monster_dynamic_UI;
|
||||||
local static_enabled = config.current_config.large_monster_UI.static.enabled and config.current_config.global_settings.module_visibility.during_quest.large_monster_static_UI;
|
local static_enabled = config.current_config.large_monster_UI.static.enabled and config.current_config.global_settings.module_visibility.during_quest.large_monster_static_UI;
|
||||||
|
local highlighted_enabled = config.current_config.large_monster_UI.highlighted.enabled and config.current_config.global_settings.module_visibility.during_quest.large_monster_highlighted_UI;
|
||||||
|
|
||||||
if dynamic_enabled or static_enabled then
|
if dynamic_enabled or static_enabled or highlighted_enabled then
|
||||||
local success = pcall(large_monster_UI.draw, dynamic_enabled, static_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 = "Large monster drawing function threw an exception";
|
customization_menu.status = "Large monster drawing function threw an exception";
|
||||||
end
|
end
|
||||||
@@ -171,9 +173,10 @@ end, function()
|
|||||||
|
|
||||||
local dynamic_enabled = config.current_config.large_monster_UI.dynamic.enabled and config.current_config.global_settings.module_visibility.quest_summary_screen.large_monster_dynamic_UI;
|
local dynamic_enabled = config.current_config.large_monster_UI.dynamic.enabled and config.current_config.global_settings.module_visibility.quest_summary_screen.large_monster_dynamic_UI;
|
||||||
local static_enabled = config.current_config.large_monster_UI.static.enabled and config.current_config.global_settings.module_visibility.quest_summary_screen.large_monster_static_UI;
|
local static_enabled = config.current_config.large_monster_UI.static.enabled and config.current_config.global_settings.module_visibility.quest_summary_screen.large_monster_static_UI;
|
||||||
|
local highlighted_enabled = config.current_config.large_monster_UI.highlighted.enabled and config.current_config.global_settings.module_visibility.quest_summary_screen.large_monster_highlighted_UI;
|
||||||
|
|
||||||
if dynamic_enabled or static_enabled then
|
if dynamic_enabled or static_enabled or highlighted_enabled then
|
||||||
local success = pcall(large_monster_UI.draw, dynamic_enabled, static_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 = "Large monster drawing function threw an exception";
|
customization_menu.status = "Large monster drawing function threw an exception";
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -262,6 +262,7 @@ function player.init_UI(_player)
|
|||||||
config.current_config.damage_meter_UI.damage_bar,
|
config.current_config.damage_meter_UI.damage_bar,
|
||||||
config.current_config.damage_meter_UI.highlighted_damage_bar,
|
config.current_config.damage_meter_UI.highlighted_damage_bar,
|
||||||
config.current_config.damage_meter_UI.player_name_label,
|
config.current_config.damage_meter_UI.player_name_label,
|
||||||
|
config.current_config.damage_meter_UI.hunter_rank_label,
|
||||||
config.current_config.damage_meter_UI.damage_value_label,
|
config.current_config.damage_meter_UI.damage_value_label,
|
||||||
config.current_config.damage_meter_UI.damage_percentage_label
|
config.current_config.damage_meter_UI.damage_percentage_label
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ singletons.progress_manager = nil;
|
|||||||
singletons.quest_manager = nil;
|
singletons.quest_manager = nil;
|
||||||
singletons.player_manager = nil;
|
singletons.player_manager = nil;
|
||||||
singletons.village_area_manager = nil;
|
singletons.village_area_manager = nil;
|
||||||
|
singletons.gui_manager = nil;
|
||||||
|
|
||||||
function singletons.init()
|
function singletons.init()
|
||||||
singletons.init_message_manager();
|
singletons.init_message_manager();
|
||||||
@@ -16,6 +17,7 @@ function singletons.init()
|
|||||||
singletons.init_quest_manager();
|
singletons.init_quest_manager();
|
||||||
singletons.init_player_manager();
|
singletons.init_player_manager();
|
||||||
singletons.init_village_area_manager();
|
singletons.init_village_area_manager();
|
||||||
|
singletons.init_gui_manager();
|
||||||
end
|
end
|
||||||
|
|
||||||
function singletons.init_message_manager()
|
function singletons.init_message_manager()
|
||||||
@@ -111,6 +113,20 @@ function singletons.init_village_area_manager()
|
|||||||
return singletons.village_area_manager;
|
return singletons.village_area_manager;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function singletons.init_gui_manager()
|
||||||
|
if singletons.gui_manager ~= nil then
|
||||||
|
return;
|
||||||
|
end
|
||||||
|
|
||||||
|
singletons.gui_manager = sdk.get_managed_singleton("snow.gui.GuiManager");
|
||||||
|
if singletons.gui_manager == nil then
|
||||||
|
log.error("[MHR Overlay] No gui manager");
|
||||||
|
end
|
||||||
|
|
||||||
|
return singletons.gui_manager;
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function singletons.init_module()
|
function singletons.init_module()
|
||||||
singletons.init();
|
singletons.init();
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ function config.init()
|
|||||||
small_monster_UI = true,
|
small_monster_UI = true,
|
||||||
large_monster_dynamic_UI = true,
|
large_monster_dynamic_UI = true,
|
||||||
large_monster_static_UI = true,
|
large_monster_static_UI = true,
|
||||||
|
large_monster_highlighted_UI = true,
|
||||||
time_UI = true,
|
time_UI = true,
|
||||||
damage_meter_UI = true
|
damage_meter_UI = true
|
||||||
},
|
},
|
||||||
@@ -30,6 +31,7 @@ function config.init()
|
|||||||
small_monster_UI = false,
|
small_monster_UI = false,
|
||||||
large_monster_dynamic_UI = false,
|
large_monster_dynamic_UI = false,
|
||||||
large_monster_static_UI = true,
|
large_monster_static_UI = true,
|
||||||
|
large_monster_highlighted_UI = true,
|
||||||
time_UI = true,
|
time_UI = true,
|
||||||
damage_meter_UI = true
|
damage_meter_UI = true
|
||||||
},
|
},
|
||||||
@@ -37,6 +39,7 @@ function config.init()
|
|||||||
training_area = {
|
training_area = {
|
||||||
large_monster_dynamic_UI = true,
|
large_monster_dynamic_UI = true,
|
||||||
large_monster_static_UI = true,
|
large_monster_static_UI = true,
|
||||||
|
large_monster_highlighted_UI = true,
|
||||||
damage_meter_UI = true
|
damage_meter_UI = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -749,8 +752,453 @@ function config.init()
|
|||||||
|
|
||||||
position = {
|
position = {
|
||||||
x = 525,
|
x = 525,
|
||||||
y = 125,--y = 44,
|
y = 47,
|
||||||
anchor = "Top-Left"
|
anchor = "Bottom-Left"
|
||||||
|
},
|
||||||
|
|
||||||
|
monster_name_label = {
|
||||||
|
visibility = true,
|
||||||
|
text = "%s",
|
||||||
|
|
||||||
|
include = {
|
||||||
|
monster_name = true,
|
||||||
|
crown = true,
|
||||||
|
size = true,
|
||||||
|
crown_thresholds = false
|
||||||
|
},
|
||||||
|
|
||||||
|
offset = {
|
||||||
|
x = 5,
|
||||||
|
y = 0
|
||||||
|
},
|
||||||
|
color = 0xFFCCF4E1,
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 1,
|
||||||
|
y = 1
|
||||||
|
},
|
||||||
|
color = 0xFF000000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
health = {
|
||||||
|
visibility = true,
|
||||||
|
|
||||||
|
text_label = {
|
||||||
|
visibility = false,
|
||||||
|
text = "%s",
|
||||||
|
offset = {
|
||||||
|
x = -25,
|
||||||
|
y = 19
|
||||||
|
},
|
||||||
|
color = 0xFFCCF4E1,
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 1,
|
||||||
|
y = 1
|
||||||
|
},
|
||||||
|
color = 0xFF000000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
value_label = {
|
||||||
|
visibility = true,
|
||||||
|
text = "%.0f/%.0f", -- current_health/max_health
|
||||||
|
offset = {
|
||||||
|
x = 5,
|
||||||
|
y = 19
|
||||||
|
},
|
||||||
|
color = 0xFFFFFFFF,
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 1,
|
||||||
|
y = 1
|
||||||
|
},
|
||||||
|
color = 0xFF000000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
percentage_label = {
|
||||||
|
visibility = true,
|
||||||
|
text = "%5.1f%%",
|
||||||
|
|
||||||
|
offset = {
|
||||||
|
x = 150,
|
||||||
|
y = 19
|
||||||
|
},
|
||||||
|
color = 0xFFFFFFFF,
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 1,
|
||||||
|
y = 1
|
||||||
|
},
|
||||||
|
color = 0xFF000000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
bar = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 0,
|
||||||
|
y = 17
|
||||||
|
},
|
||||||
|
|
||||||
|
size = {
|
||||||
|
width = 200,
|
||||||
|
height = 20
|
||||||
|
},
|
||||||
|
|
||||||
|
normal_colors = {
|
||||||
|
foreground = 0xB974A653,
|
||||||
|
background = 0xB9000000,
|
||||||
|
},
|
||||||
|
|
||||||
|
capture_colors = {
|
||||||
|
foreground = 0xB9CCCC33,
|
||||||
|
background = 0x88000000
|
||||||
|
},
|
||||||
|
|
||||||
|
capture_line = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 0,
|
||||||
|
y = -3
|
||||||
|
},
|
||||||
|
|
||||||
|
size = {
|
||||||
|
width = 2,
|
||||||
|
height = 8
|
||||||
|
},
|
||||||
|
|
||||||
|
color = 0xB9000000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
stamina = {
|
||||||
|
visibility = true,
|
||||||
|
|
||||||
|
text_label = {
|
||||||
|
visibility = false,
|
||||||
|
text = "%s",
|
||||||
|
offset = {
|
||||||
|
x = 15,
|
||||||
|
y = 37
|
||||||
|
},
|
||||||
|
color = 0xFFA3F5F0,
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 1,
|
||||||
|
y = 1
|
||||||
|
},
|
||||||
|
color = 0xFF000000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
value_label = {
|
||||||
|
visibility = false,
|
||||||
|
text = "%.0f/%.0f", -- current_health/max_health
|
||||||
|
offset = {
|
||||||
|
x = 55,
|
||||||
|
y = 54
|
||||||
|
},
|
||||||
|
color = 0xFFFFFFFF,
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 1,
|
||||||
|
y = 1
|
||||||
|
},
|
||||||
|
color = 0xFF000000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
percentage_label = {
|
||||||
|
visibility = false,
|
||||||
|
text = "%5.1f%%",
|
||||||
|
|
||||||
|
offset = {
|
||||||
|
x = 145,
|
||||||
|
y = 54
|
||||||
|
},
|
||||||
|
color = 0xFFFFFFFF,
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 1,
|
||||||
|
y = 1
|
||||||
|
},
|
||||||
|
color = 0xFF000000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
bar = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 0,
|
||||||
|
y = 37
|
||||||
|
},
|
||||||
|
|
||||||
|
size = {
|
||||||
|
width = 200,
|
||||||
|
height = 5
|
||||||
|
},
|
||||||
|
|
||||||
|
colors = {
|
||||||
|
foreground = 0xB966CCC5,
|
||||||
|
background = 0x88000000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
rage = {
|
||||||
|
visibility = true,
|
||||||
|
|
||||||
|
text_label = {
|
||||||
|
visibility = false,
|
||||||
|
text = "%s",
|
||||||
|
offset = {
|
||||||
|
x = 15,
|
||||||
|
y = 61
|
||||||
|
},
|
||||||
|
color = 0xFFFF9393,
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 1,
|
||||||
|
y = 1
|
||||||
|
},
|
||||||
|
color = 0xFF000000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
value_label = {
|
||||||
|
visibility = false,
|
||||||
|
text = "%.0f/%.0f", -- current_health/max_health
|
||||||
|
offset = {
|
||||||
|
x = 55,
|
||||||
|
y = 78
|
||||||
|
},
|
||||||
|
color = 0xFFFFFFFF,
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 1,
|
||||||
|
y = 1
|
||||||
|
},
|
||||||
|
color = 0xFF000000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
percentage_label = {
|
||||||
|
visibility = true,
|
||||||
|
text = "%5.1f%%",
|
||||||
|
|
||||||
|
offset = {
|
||||||
|
x = 150,
|
||||||
|
y = 33
|
||||||
|
},
|
||||||
|
color = 0xFFFFFFFF,
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 1,
|
||||||
|
y = 1
|
||||||
|
},
|
||||||
|
color = 0xFF000000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
timer_label = {
|
||||||
|
visibility = true,
|
||||||
|
text = "%.0f:%02.0f",
|
||||||
|
|
||||||
|
offset = {
|
||||||
|
x = 150,
|
||||||
|
y = 33
|
||||||
|
},
|
||||||
|
color = 0xFFFFFFFF,
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 1,
|
||||||
|
y = 1
|
||||||
|
},
|
||||||
|
color = 0xFF000000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
bar = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 0,
|
||||||
|
y = 42
|
||||||
|
},
|
||||||
|
|
||||||
|
size = {
|
||||||
|
width = 200,
|
||||||
|
height = 5
|
||||||
|
},
|
||||||
|
|
||||||
|
colors = {
|
||||||
|
foreground = 0xB9CC6666,
|
||||||
|
background = 0x88000000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
parts = {
|
||||||
|
visibility = false,
|
||||||
|
|
||||||
|
offset = {
|
||||||
|
x = 0,
|
||||||
|
y = 50
|
||||||
|
},
|
||||||
|
|
||||||
|
spacing = {
|
||||||
|
x = 0,
|
||||||
|
y = 24,
|
||||||
|
},
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
hide_undamaged_parts = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
sorting = {
|
||||||
|
type = "Normal",
|
||||||
|
reversed_order = false
|
||||||
|
},
|
||||||
|
|
||||||
|
part_name_label = {
|
||||||
|
visibility = true,
|
||||||
|
text = "%s",
|
||||||
|
|
||||||
|
include = {
|
||||||
|
part_name = true,
|
||||||
|
break_count = true
|
||||||
|
},
|
||||||
|
|
||||||
|
offset = {
|
||||||
|
x = 15,
|
||||||
|
y = 61
|
||||||
|
},
|
||||||
|
color = 0xFFf9d9ff,
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 1,
|
||||||
|
y = 1
|
||||||
|
},
|
||||||
|
color = 0xFF000000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
text_label = {
|
||||||
|
visibility = false,
|
||||||
|
text = language.current_language.UI.HP,
|
||||||
|
offset = {
|
||||||
|
x = -15,
|
||||||
|
y = 69
|
||||||
|
},
|
||||||
|
color = 0xF1F4A3CC,
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 1,
|
||||||
|
y = 1
|
||||||
|
},
|
||||||
|
color = 0xFF000000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
value_label = {
|
||||||
|
visibility = true,
|
||||||
|
text = "%.0f/%.0f", -- current_health/max_health
|
||||||
|
offset = {
|
||||||
|
x = 55,
|
||||||
|
y = 74
|
||||||
|
},
|
||||||
|
color = 0xFFFFFFFF,
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 1,
|
||||||
|
y = 1
|
||||||
|
},
|
||||||
|
color = 0xFF000000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
percentage_label = {
|
||||||
|
visibility = true,
|
||||||
|
text = "%5.1f%%",
|
||||||
|
|
||||||
|
offset = {
|
||||||
|
x = 145,
|
||||||
|
y = 74
|
||||||
|
},
|
||||||
|
color = 0xFFFFFFFF,
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 1,
|
||||||
|
y = 1
|
||||||
|
},
|
||||||
|
color = 0xFF000000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
bar = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 10,
|
||||||
|
y = 75
|
||||||
|
},
|
||||||
|
|
||||||
|
size = {
|
||||||
|
width = 185,
|
||||||
|
height = 5
|
||||||
|
},
|
||||||
|
|
||||||
|
colors = {
|
||||||
|
foreground = 0xB9ca85cc,
|
||||||
|
background = 0x88000000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
highlighted = {
|
||||||
|
enabled = true,
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
hide_dead_or_captured = true
|
||||||
|
},
|
||||||
|
|
||||||
|
position = {
|
||||||
|
x = 615,
|
||||||
|
y = 25,--y = 44,
|
||||||
|
anchor = "Top-Right"
|
||||||
},
|
},
|
||||||
|
|
||||||
monster_name_label = {
|
monster_name_label = {
|
||||||
@@ -1229,8 +1677,8 @@ function config.init()
|
|||||||
kunai_damage = true,
|
kunai_damage = true,
|
||||||
installation_damage = true, -- hunting_installations like ballista, cannon, etc.
|
installation_damage = true, -- hunting_installations like ballista, cannon, etc.
|
||||||
otomo_damage = true,
|
otomo_damage = true,
|
||||||
monster_damage = true
|
monster_damage = true -- note that installations during narwa fight are counted as monster damage
|
||||||
}, -- note that installations during narwa fight are counted as monster damage
|
},
|
||||||
|
|
||||||
spacing = {
|
spacing = {
|
||||||
x = 270,
|
x = 270,
|
||||||
@@ -1267,14 +1715,12 @@ function config.init()
|
|||||||
|
|
||||||
include = {
|
include = {
|
||||||
myself = {
|
myself = {
|
||||||
hunter_rank = true,
|
|
||||||
word_player = false,
|
word_player = false,
|
||||||
player_id = false,
|
player_id = false,
|
||||||
player_name = true
|
player_name = true
|
||||||
},
|
},
|
||||||
|
|
||||||
others = {
|
others = {
|
||||||
hunter_rank = true,
|
|
||||||
word_player = false,
|
word_player = false,
|
||||||
player_id = false,
|
player_id = false,
|
||||||
player_name = true
|
player_name = true
|
||||||
@@ -1298,6 +1744,31 @@ function config.init()
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hunter_rank_label = {
|
||||||
|
visibility = true,
|
||||||
|
|
||||||
|
enable_for = {
|
||||||
|
me = true,
|
||||||
|
other_players = true
|
||||||
|
},
|
||||||
|
|
||||||
|
text = "[%d]",
|
||||||
|
offset = {
|
||||||
|
x = 5,
|
||||||
|
y = 0
|
||||||
|
},
|
||||||
|
color = 0xFFCCF4E1,
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 1,
|
||||||
|
y = 1
|
||||||
|
},
|
||||||
|
color = 0xFF000000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
damage_value_label = {
|
damage_value_label = {
|
||||||
visibility = true,
|
visibility = true,
|
||||||
text = "%.0f",
|
text = "%.0f",
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ language.default_language = {
|
|||||||
|
|
||||||
large_monster_dynamic_UI = "Large Monster Dynamic UI",
|
large_monster_dynamic_UI = "Large Monster Dynamic UI",
|
||||||
large_monster_static_UI = "Large Monster Static UI",
|
large_monster_static_UI = "Large Monster Static UI",
|
||||||
|
large_monster_highlighted_UI = "Large Monster Highlighted UI",
|
||||||
|
|
||||||
language = "Language",
|
language = "Language",
|
||||||
module_visibility_on_different_screens = "Module Visibility on Different Screens",
|
module_visibility_on_different_screens = "Module Visibility on Different Screens",
|
||||||
@@ -156,6 +157,7 @@ language.default_language = {
|
|||||||
|
|
||||||
dynamically_positioned = "Dynamically Positioned",
|
dynamically_positioned = "Dynamically Positioned",
|
||||||
statically_positioned = "Statically Positioned",
|
statically_positioned = "Statically Positioned",
|
||||||
|
highlighted = "Highlighted (targeted)",
|
||||||
|
|
||||||
include = "Include",
|
include = "Include",
|
||||||
monster_name = "Monster Name",
|
monster_name = "Monster Name",
|
||||||
@@ -185,6 +187,7 @@ language.default_language = {
|
|||||||
tracked_damage_types = "Tracked Damage Types",
|
tracked_damage_types = "Tracked Damage Types",
|
||||||
|
|
||||||
player_name_label = "Player Name Label",
|
player_name_label = "Player Name Label",
|
||||||
|
hunter_rank_label = "Hunter Rank Label",
|
||||||
damage_value_label = "Damage Value Label",
|
damage_value_label = "Damage Value Label",
|
||||||
damage_percentage_label = "Damage Percetange Label",
|
damage_percentage_label = "Damage Percetange Label",
|
||||||
total_damage_label = "Total Damage Label",
|
total_damage_label = "Total Damage Label",
|
||||||
@@ -199,6 +202,7 @@ language.default_language = {
|
|||||||
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",
|
||||||
total_damage_offset_is_relative = "Total Damage Offset is Relative",
|
total_damage_offset_is_relative = "Total Damage Offset is Relative",
|
||||||
|
|
||||||
|
enable_for = "Enable for",
|
||||||
highlighted_bar = "Highlighted Bar",
|
highlighted_bar = "Highlighted Bar",
|
||||||
me = "Me",
|
me = "Me",
|
||||||
top_damage = "Top Damage",
|
top_damage = "Top Damage",
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ function body_part.new(REpart, name, id)
|
|||||||
|
|
||||||
body_part.init_dynamic_UI(part);
|
body_part.init_dynamic_UI(part);
|
||||||
body_part.init_static_UI(part);
|
body_part.init_static_UI(part);
|
||||||
|
body_part.init_highlighted_UI(part);
|
||||||
|
|
||||||
return part;
|
return part;
|
||||||
end
|
end
|
||||||
@@ -55,6 +56,17 @@ function body_part.init_static_UI(part)
|
|||||||
);
|
);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function body_part.init_highlighted_UI(part)
|
||||||
|
part.body_part_highlighted_UI = body_part_UI_entity.new(
|
||||||
|
config.current_config.large_monster_UI.highlighted.parts.visibility,
|
||||||
|
config.current_config.large_monster_UI.highlighted.parts.bar,
|
||||||
|
config.current_config.large_monster_UI.highlighted.parts.part_name_label,
|
||||||
|
config.current_config.large_monster_UI.highlighted.parts.text_label,
|
||||||
|
config.current_config.large_monster_UI.highlighted.parts.value_label,
|
||||||
|
config.current_config.large_monster_UI.highlighted.parts.percentage_label
|
||||||
|
);
|
||||||
|
end
|
||||||
|
|
||||||
function body_part.update(part, new_health, new_max_health)
|
function body_part.update(part, new_health, new_max_health)
|
||||||
if part == nil then
|
if part == nil then
|
||||||
return;
|
return;
|
||||||
@@ -80,6 +92,10 @@ function body_part.draw_static(part, position_on_screen, opacity_scale)
|
|||||||
body_part_UI_entity.draw_static(part, position_on_screen, opacity_scale);
|
body_part_UI_entity.draw_static(part, position_on_screen, opacity_scale);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function body_part.draw_highlighted(part, position_on_screen, opacity_scale)
|
||||||
|
body_part_UI_entity.draw_highlighted(part, position_on_screen, opacity_scale);
|
||||||
|
end
|
||||||
|
|
||||||
function body_part.init_module()
|
function body_part.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");
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ function large_monster.new(enemy)
|
|||||||
large_monster.init(monster, enemy);
|
large_monster.init(monster, enemy);
|
||||||
large_monster.init_static_UI(monster);
|
large_monster.init_static_UI(monster);
|
||||||
large_monster.init_dynamic_UI(monster);
|
large_monster.init_dynamic_UI(monster);
|
||||||
|
large_monster.init_highlighted_UI(monster);
|
||||||
|
|
||||||
if large_monster.list[enemy] == nil then
|
if large_monster.list[enemy] == nil then
|
||||||
large_monster.list[enemy] = monster;
|
large_monster.list[enemy] = monster;
|
||||||
@@ -215,6 +215,41 @@ function large_monster.init_dynamic_UI(monster)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function large_monster.init_highlighted_UI(monster)
|
||||||
|
monster.highlighted_name_label = table_helpers.deep_copy(config.current_config.large_monster_UI.highlighted.monster_name_label);
|
||||||
|
|
||||||
|
monster.health_highlighted_UI = health_UI_entity.new(
|
||||||
|
config.current_config.large_monster_UI.highlighted.health.visibility,
|
||||||
|
config.current_config.large_monster_UI.highlighted.health.bar,
|
||||||
|
config.current_config.large_monster_UI.highlighted.health.text_label,
|
||||||
|
config.current_config.large_monster_UI.highlighted.health.value_label,
|
||||||
|
config.current_config.large_monster_UI.highlighted.health.percentage_label
|
||||||
|
);
|
||||||
|
|
||||||
|
monster.health_highlighted_UI.bar.colors = config.current_config.large_monster_UI.highlighted.health.bar.normal_colors;
|
||||||
|
|
||||||
|
monster.stamina_highlighted_UI = stamina_UI_entity.new(
|
||||||
|
config.current_config.large_monster_UI.highlighted.stamina.visibility,
|
||||||
|
config.current_config.large_monster_UI.highlighted.stamina.bar,
|
||||||
|
config.current_config.large_monster_UI.highlighted.stamina.text_label,
|
||||||
|
config.current_config.large_monster_UI.highlighted.stamina.value_label,
|
||||||
|
config.current_config.large_monster_UI.highlighted.stamina.percentage_label
|
||||||
|
);
|
||||||
|
|
||||||
|
monster.rage_highlighted_UI = rage_UI_entity.new(
|
||||||
|
config.current_config.large_monster_UI.highlighted.rage.visibility,
|
||||||
|
config.current_config.large_monster_UI.highlighted.rage.bar,
|
||||||
|
config.current_config.large_monster_UI.highlighted.rage.text_label,
|
||||||
|
config.current_config.large_monster_UI.highlighted.rage.value_label,
|
||||||
|
config.current_config.large_monster_UI.highlighted.rage.percentage_label,
|
||||||
|
config.current_config.large_monster_UI.highlighted.rage.timer_label
|
||||||
|
);
|
||||||
|
|
||||||
|
for REpart, part in pairs(monster.parts) do
|
||||||
|
body_part.init_highlighted_UI(part);
|
||||||
|
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");
|
||||||
local status_param_field = enemy_character_base_type_def:get_field("<StatusParam>k__BackingField")
|
local status_param_field = enemy_character_base_type_def:get_field("<StatusParam>k__BackingField")
|
||||||
local stamina_param_field = enemy_character_base_type_def:get_field("<StaminaParam>k__BackingField")
|
local stamina_param_field = enemy_character_base_type_def:get_field("<StaminaParam>k__BackingField")
|
||||||
@@ -671,6 +706,92 @@ function large_monster.draw_static(monster, position_on_screen, opacity_scale)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function large_monster.draw_highlighted(monster, position_on_screen, opacity_scale)
|
||||||
|
local monster_name_text = "";
|
||||||
|
if config.current_config.large_monster_UI.highlighted.monster_name_label.include.monster_name then
|
||||||
|
monster_name_text = string.format("%s ", monster.name);
|
||||||
|
end
|
||||||
|
|
||||||
|
if config.current_config.large_monster_UI.highlighted.monster_name_label.include.crown and monster.crown ~= "" then
|
||||||
|
monster_name_text = monster_name_text .. string.format("%s ", monster.crown);
|
||||||
|
end
|
||||||
|
if config.current_config.large_monster_UI.highlighted.monster_name_label.include.size then
|
||||||
|
monster_name_text = monster_name_text .. string.format("#%.0f ", 100 * monster.size);
|
||||||
|
end
|
||||||
|
|
||||||
|
if config.current_config.large_monster_UI.highlighted.monster_name_label.include.scrown_thresholds then
|
||||||
|
monster_name_text = monster_name_text .. string.format("<=%.0f >=%.0f >=%.0f", 100 * monster.small_border,
|
||||||
|
100 * monster.big_border, 100 * monster.king_border);
|
||||||
|
end
|
||||||
|
|
||||||
|
if monster.health < monster.capture_health then
|
||||||
|
monster.health_highlighted_UI.bar.colors = config.current_config.large_monster_UI.highlighted.health.bar.capture_colors;
|
||||||
|
else
|
||||||
|
monster.health_highlighted_UI.bar.colors = config.current_config.large_monster_UI.highlighted.health.bar.normal_colors;
|
||||||
|
end
|
||||||
|
|
||||||
|
drawing.draw_label(monster.highlighted_name_label, position_on_screen, opacity_scale, monster_name_text);
|
||||||
|
|
||||||
|
|
||||||
|
health_UI_entity.draw(monster, monster.health_highlighted_UI, position_on_screen, opacity_scale);
|
||||||
|
drawing.draw_capture_line(monster.health_highlighted_UI.bar, position_on_screen, opacity_scale, monster.capture_percentage);
|
||||||
|
|
||||||
|
stamina_UI_entity.draw(monster, monster.stamina_highlighted_UI, position_on_screen, opacity_scale);
|
||||||
|
rage_UI_entity.draw(monster, monster.rage_highlighted_UI, position_on_screen, opacity_scale);
|
||||||
|
|
||||||
|
--sort parts here
|
||||||
|
local displayed_parts = {};
|
||||||
|
for REpart, part in pairs(monster.parts) do
|
||||||
|
if config.current_config.large_monster_UI.highlighted.parts.settings.hide_undamaged_parts and part.health == part.max_health and part.break_count == 0 then
|
||||||
|
goto continue;
|
||||||
|
end
|
||||||
|
|
||||||
|
table.insert(displayed_parts, part);
|
||||||
|
::continue::
|
||||||
|
end
|
||||||
|
|
||||||
|
if config.current_config.large_monster_UI.highlighted.parts.sorting.type == "Normal" then
|
||||||
|
if config.current_config.large_monster_UI.highlighted.parts.sorting.reversed_order then
|
||||||
|
table.sort(displayed_parts, function(left, right)
|
||||||
|
return left.id > right.id;
|
||||||
|
end);
|
||||||
|
else
|
||||||
|
table.sort(displayed_parts, function(left, right)
|
||||||
|
return left.id < right.id;
|
||||||
|
end);
|
||||||
|
end
|
||||||
|
elseif config.current_config.large_monster_UI.highlighted.parts.sorting.type == "Health" then
|
||||||
|
if config.current_config.large_monster_UI.highlighted.parts.sorting.reversed_order then
|
||||||
|
table.sort(displayed_parts, function(left, right)
|
||||||
|
return left.health > right.health;
|
||||||
|
end);
|
||||||
|
else
|
||||||
|
table.sort(displayed_parts, function(left, right)
|
||||||
|
return left.health < right.health;
|
||||||
|
end);
|
||||||
|
end
|
||||||
|
elseif config.current_config.large_monster_UI.highlighted.parts.sorting.type == "Health Percentage" then
|
||||||
|
if config.current_config.large_monster_UI.highlighted.parts.sorting.reversed_order then
|
||||||
|
table.sort(displayed_parts, function(left, right)
|
||||||
|
return left.health_percentage > right.health_percentage;
|
||||||
|
end);
|
||||||
|
else
|
||||||
|
table.sort(displayed_parts, function(left, right)
|
||||||
|
return left.health_percentage < right.health_percentage;
|
||||||
|
end);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for j, part in ipairs(displayed_parts) do
|
||||||
|
local part_position_on_screen = {
|
||||||
|
x = position_on_screen.x + config.current_config.large_monster_UI.highlighted.parts.offset.x + config.current_config.large_monster_UI.highlighted.parts.spacing.x * (j - 1),
|
||||||
|
y = position_on_screen.y + config.current_config.large_monster_UI.highlighted.parts.offset.y + config.current_config.large_monster_UI.highlighted.parts.spacing.y * (j - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
body_part.draw_highlighted(part, part_position_on_screen, opacity_scale);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function large_monster.init_list()
|
function large_monster.init_list()
|
||||||
large_monster.list = {};
|
large_monster.list = {};
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -15,13 +15,28 @@ 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");
|
||||||
|
|
||||||
function large_monster_UI.draw(dynamic_enabled, static_enabled)
|
function large_monster_UI.draw(dynamic_enabled, static_enabled, highlighted_enabled)
|
||||||
if singletons.enemy_manager == nil then
|
if singletons.enemy_manager == nil then
|
||||||
return;
|
return;
|
||||||
end
|
end
|
||||||
|
|
||||||
local displayed_monsters = {};
|
local displayed_monsters = {};
|
||||||
|
|
||||||
|
local highlighted_id = -1;
|
||||||
|
local highlighted_monster = nil;
|
||||||
|
|
||||||
|
if singletons.gui_manager ~= nil then
|
||||||
|
local gui_hud_target_camera = singletons.gui_manager:call("get_refGuiHud_TgCamera");
|
||||||
|
if gui_hud_target_camera ~= nil then
|
||||||
|
highlighted_id = gui_hud_target_camera:get_field("OldTargetingEmIndex");
|
||||||
|
|
||||||
|
if highlighted_id == nil then
|
||||||
|
highlighted_id = -1;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local enemy_count = get_boss_enemy_count_method:call(singletons.enemy_manager);
|
local enemy_count = get_boss_enemy_count_method:call(singletons.enemy_manager);
|
||||||
if enemy_count == nil then
|
if enemy_count == nil then
|
||||||
return;
|
return;
|
||||||
@@ -40,6 +55,10 @@ function large_monster_UI.draw(dynamic_enabled, static_enabled)
|
|||||||
goto continue;
|
goto continue;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if i == highlighted_id then
|
||||||
|
highlighted_monster = monster;
|
||||||
|
end
|
||||||
|
|
||||||
table.insert(displayed_monsters, monster);
|
table.insert(displayed_monsters, monster);
|
||||||
::continue::
|
::continue::
|
||||||
end
|
end
|
||||||
@@ -51,7 +70,21 @@ function large_monster_UI.draw(dynamic_enabled, static_enabled)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if dynamic_enabled then
|
if dynamic_enabled then
|
||||||
local i = 0;
|
large_monster_UI.draw_dynamic(displayed_monsters);
|
||||||
|
end
|
||||||
|
|
||||||
|
if highlighted_enabled then
|
||||||
|
large_monster_UI.draw_highlighted(highlighted_monster);
|
||||||
|
end
|
||||||
|
|
||||||
|
if static_enabled then
|
||||||
|
large_monster_UI.draw_static(displayed_monsters);
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function large_monster_UI.draw_dynamic(displayed_monsters)
|
||||||
|
local i = 0;
|
||||||
for _, monster in ipairs(displayed_monsters) do
|
for _, monster in ipairs(displayed_monsters) do
|
||||||
if config.current_config.large_monster_UI.dynamic.settings.max_distance == 0 then
|
if config.current_config.large_monster_UI.dynamic.settings.max_distance == 0 then
|
||||||
break;
|
break;
|
||||||
@@ -88,75 +121,88 @@ function large_monster_UI.draw(dynamic_enabled, static_enabled)
|
|||||||
i = i + 1;
|
i = i + 1;
|
||||||
::continue::
|
::continue::
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if static_enabled then
|
function large_monster_UI.draw_static(displayed_monsters)
|
||||||
-- sort here
|
-- sort here
|
||||||
if config.current_config.large_monster_UI.static.sorting.type == "Normal" and config.current_config.large_monster_UI.static.sorting.reversed_order then
|
if config.current_config.large_monster_UI.static.sorting.type == "Normal" and config.current_config.large_monster_UI.static.sorting.reversed_order then
|
||||||
local reversed_monsters = {};
|
local reversed_monsters = {};
|
||||||
for i = #displayed_monsters, 1, -1 do
|
for i = #displayed_monsters, 1, -1 do
|
||||||
table.insert(reversed_monsters, displayed_monsters[i]);
|
table.insert(reversed_monsters, displayed_monsters[i]);
|
||||||
end
|
|
||||||
|
|
||||||
displayed_monsters = reversed_monsters;
|
|
||||||
|
|
||||||
elseif config.current_config.large_monster_UI.static.sorting.type == "Health" then
|
|
||||||
if config.current_config.large_monster_UI.static.sorting.reversed_order then
|
|
||||||
table.sort(displayed_monsters, function(left, right)
|
|
||||||
return left.health > right.health;
|
|
||||||
end);
|
|
||||||
else
|
|
||||||
table.sort(displayed_monsters, function(left, right)
|
|
||||||
return left.health < right.health;
|
|
||||||
end);
|
|
||||||
end
|
|
||||||
elseif config.current_config.large_monster_UI.static.sorting.type == "Health Percentage" then
|
|
||||||
if config.current_config.large_monster_UI.static.sorting.reversed_order then
|
|
||||||
table.sort(displayed_monsters, function(left, right)
|
|
||||||
return left.health_percentage > right.health_percentage;
|
|
||||||
end);
|
|
||||||
else
|
|
||||||
table.sort(displayed_monsters, function(left, right)
|
|
||||||
return left.health_percentage < right.health_percentage;
|
|
||||||
end);
|
|
||||||
end
|
|
||||||
elseif config.current_config.large_monster_UI.static.sorting.type == "Distance" then
|
|
||||||
if config.current_config.large_monster_UI.static.sorting.reversed_order then
|
|
||||||
table.sort(displayed_monsters, function(left, right)
|
|
||||||
return left.distance > right.distance;
|
|
||||||
end);
|
|
||||||
else
|
|
||||||
table.sort(displayed_monsters, function(left, right)
|
|
||||||
return left.distance < right.distance;
|
|
||||||
end);
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local position_on_screen = screen.calculate_absolute_coordinates(config.current_config.large_monster_UI.static.position);
|
displayed_monsters = reversed_monsters;
|
||||||
|
|
||||||
local i = 0;
|
elseif config.current_config.large_monster_UI.static.sorting.type == "Health" then
|
||||||
for _, monster in ipairs(displayed_monsters) do
|
if config.current_config.large_monster_UI.static.sorting.reversed_order then
|
||||||
if monster.dead_or_captured and config.current_config.large_monster_UI.static.settings.hide_dead_or_captured then
|
table.sort(displayed_monsters, function(left, right)
|
||||||
goto continue;
|
return left.health > right.health;
|
||||||
end
|
end);
|
||||||
|
else
|
||||||
local monster_position_on_screen = {
|
table.sort(displayed_monsters, function(left, right)
|
||||||
x = position_on_screen.x,
|
return left.health < right.health;
|
||||||
y = position_on_screen.y
|
end);
|
||||||
}
|
end
|
||||||
|
elseif config.current_config.large_monster_UI.static.sorting.type == "Health Percentage" then
|
||||||
if config.current_config.large_monster_UI.static.settings.orientation == "Horizontal" then
|
if config.current_config.large_monster_UI.static.sorting.reversed_order then
|
||||||
monster_position_on_screen.x = monster_position_on_screen.x + config.current_config.large_monster_UI.static.spacing.x * i;
|
table.sort(displayed_monsters, function(left, right)
|
||||||
else
|
return left.health_percentage > right.health_percentage;
|
||||||
monster_position_on_screen.y = monster_position_on_screen.y + config.current_config.large_monster_UI.static.spacing.y * i;
|
end);
|
||||||
end
|
else
|
||||||
|
table.sort(displayed_monsters, function(left, right)
|
||||||
large_monster.draw_static(monster, monster_position_on_screen, 1);
|
return left.health_percentage < right.health_percentage;
|
||||||
|
end);
|
||||||
i = i + 1;
|
end
|
||||||
::continue::
|
elseif config.current_config.large_monster_UI.static.sorting.type == "Distance" then
|
||||||
|
if config.current_config.large_monster_UI.static.sorting.reversed_order then
|
||||||
|
table.sort(displayed_monsters, function(left, right)
|
||||||
|
return left.distance > right.distance;
|
||||||
|
end);
|
||||||
|
else
|
||||||
|
table.sort(displayed_monsters, function(left, right)
|
||||||
|
return left.distance < right.distance;
|
||||||
|
end);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local position_on_screen = screen.calculate_absolute_coordinates(config.current_config.large_monster_UI.static.position);
|
||||||
|
|
||||||
|
local i = 0;
|
||||||
|
for _, monster in ipairs(displayed_monsters) do
|
||||||
|
if monster.dead_or_captured and config.current_config.large_monster_UI.static.settings.hide_dead_or_captured then
|
||||||
|
goto continue;
|
||||||
|
end
|
||||||
|
|
||||||
|
local monster_position_on_screen = {
|
||||||
|
x = position_on_screen.x,
|
||||||
|
y = position_on_screen.y
|
||||||
|
}
|
||||||
|
|
||||||
|
if config.current_config.large_monster_UI.static.settings.orientation == "Horizontal" then
|
||||||
|
monster_position_on_screen.x = monster_position_on_screen.x + config.current_config.large_monster_UI.static.spacing.x * i;
|
||||||
|
else
|
||||||
|
monster_position_on_screen.y = monster_position_on_screen.y + config.current_config.large_monster_UI.static.spacing.y * i;
|
||||||
|
end
|
||||||
|
|
||||||
|
large_monster.draw_static(monster, monster_position_on_screen, 1);
|
||||||
|
|
||||||
|
i = i + 1;
|
||||||
|
::continue::
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function large_monster_UI.draw_highlighted(monster)
|
||||||
|
if monster == nil then
|
||||||
|
return;
|
||||||
|
end
|
||||||
|
|
||||||
|
local position_on_screen = screen.calculate_absolute_coordinates(config.current_config.large_monster_UI.highlighted.position);
|
||||||
|
|
||||||
|
if monster.dead_or_captured and config.current_config.large_monster_UI.highlighted.settings.hide_dead_or_captured then
|
||||||
|
return;
|
||||||
|
end
|
||||||
|
|
||||||
|
large_monster.draw_highlighted(monster, position_on_screen, 1);
|
||||||
end
|
end
|
||||||
|
|
||||||
function large_monster_UI.init_module()
|
function large_monster_UI.init_module()
|
||||||
|
|||||||
@@ -58,6 +58,27 @@ function body_part_UI_entity.draw_static(part, position_on_screen, opacity_scale
|
|||||||
drawing.draw_label(part.body_part_static_UI.percentage_label, position_on_screen, opacity_scale, 100 * part.health_percentage);
|
drawing.draw_label(part.body_part_static_UI.percentage_label, position_on_screen, opacity_scale, 100 * part.health_percentage);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function body_part_UI_entity.draw_highlighted(part, position_on_screen, opacity_scale)
|
||||||
|
if not part.body_part_highlighted_UI.visibility then
|
||||||
|
return;
|
||||||
|
end
|
||||||
|
|
||||||
|
local part_name = "";
|
||||||
|
if config.current_config.large_monster_UI.highlighted.parts.part_name_label.include.part_name then
|
||||||
|
part_name = part.name .. " ";
|
||||||
|
end
|
||||||
|
if config.current_config.large_monster_UI.highlighted.parts.part_name_label.include.break_count and part.break_count ~= 0 then
|
||||||
|
part_name = part_name .. "x" .. tostring(part.break_count);
|
||||||
|
end
|
||||||
|
|
||||||
|
drawing.draw_bar(part.body_part_highlighted_UI.bar, position_on_screen, opacity_scale, part.health_percentage);
|
||||||
|
|
||||||
|
drawing.draw_label(part.body_part_highlighted_UI.name_label, position_on_screen, opacity_scale, part_name);
|
||||||
|
drawing.draw_label(part.body_part_highlighted_UI.text_label, position_on_screen, opacity_scale);
|
||||||
|
drawing.draw_label(part.body_part_highlighted_UI.value_label, position_on_screen, opacity_scale, part.health, part.max_health);
|
||||||
|
drawing.draw_label(part.body_part_highlighted_UI.percentage_label, position_on_screen, opacity_scale, 100 * part.health_percentage);
|
||||||
|
end
|
||||||
|
|
||||||
function body_part_UI_entity.init_module()
|
function body_part_UI_entity.init_module()
|
||||||
table_helpers = require("MHR_Overlay.Misc.table_helpers");
|
table_helpers = require("MHR_Overlay.Misc.table_helpers");
|
||||||
drawing = require("MHR_Overlay.UI.drawing");
|
drawing = require("MHR_Overlay.UI.drawing");
|
||||||
|
|||||||
@@ -5,13 +5,14 @@ local config;
|
|||||||
local player;
|
local player;
|
||||||
local language;
|
local language;
|
||||||
|
|
||||||
function damage_UI_entity.new(bar, highlighted_bar, player_name_label, value_label, percentage_label)
|
function damage_UI_entity.new(bar, highlighted_bar, player_name_label, hunter_rank_label, value_label, percentage_label)
|
||||||
local entity = {};
|
local entity = {};
|
||||||
|
|
||||||
--entity.visibility = visibility;
|
--entity.visibility = visibility;
|
||||||
entity.bar = table_helpers.deep_copy(bar);
|
entity.bar = table_helpers.deep_copy(bar);
|
||||||
entity.highlighted_bar = table_helpers.deep_copy(highlighted_bar);
|
entity.highlighted_bar = table_helpers.deep_copy(highlighted_bar);
|
||||||
entity.player_name_label = table_helpers.deep_copy(player_name_label);
|
entity.player_name_label = table_helpers.deep_copy(player_name_label);
|
||||||
|
entity.hunter_rank_label = table_helpers.deep_copy(hunter_rank_label);
|
||||||
entity.value_label = table_helpers.deep_copy(value_label);
|
entity.value_label = table_helpers.deep_copy(value_label);
|
||||||
entity.percentage_label = table_helpers.deep_copy(percentage_label);
|
entity.percentage_label = table_helpers.deep_copy(percentage_label);
|
||||||
|
|
||||||
@@ -26,12 +27,9 @@ function damage_UI_entity.draw(_player, position_on_screen, opacity_scale, top_d
|
|||||||
end
|
end
|
||||||
|
|
||||||
local player_name_text = "";
|
local player_name_text = "";
|
||||||
if player_include.hunter_rank then
|
|
||||||
player_name_text = string.format("[%d] ", _player.hunter_rank);
|
|
||||||
end
|
|
||||||
|
|
||||||
if player_include.word_player then
|
if player_include.word_player then
|
||||||
player_name_text = player_name_text .. language.current_config.UI.player .. " ";
|
player_name_text = language.current_language.UI.player .. " ";
|
||||||
end
|
end
|
||||||
|
|
||||||
if player_include.player_id then
|
if player_include.player_id then
|
||||||
@@ -66,6 +64,14 @@ function damage_UI_entity.draw(_player, position_on_screen, opacity_scale, top_d
|
|||||||
drawing.draw_bar(_player.damage_UI.bar, position_on_screen, opacity_scale, player_damage_bar_percentage);
|
drawing.draw_bar(_player.damage_UI.bar, position_on_screen, opacity_scale, player_damage_bar_percentage);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if _player.id == player.myself_id then
|
||||||
|
if _player.damage_UI.hunter_rank_label.enable_for.me then
|
||||||
|
drawing.draw_label(_player.damage_UI.hunter_rank_label, position_on_screen, opacity_scale, _player.hunter_rank);
|
||||||
|
end
|
||||||
|
elseif _player.damage_UI.hunter_rank_label.enable_for.other_players then
|
||||||
|
drawing.draw_label(_player.damage_UI.hunter_rank_label, position_on_screen, opacity_scale, _player.hunter_rank);
|
||||||
|
end
|
||||||
|
|
||||||
drawing.draw_label(_player.damage_UI.player_name_label, position_on_screen, opacity_scale, player_name_text);
|
drawing.draw_label(_player.damage_UI.player_name_label, position_on_screen, opacity_scale, player_name_text);
|
||||||
drawing.draw_label(_player.damage_UI.value_label, position_on_screen, opacity_scale, _player.display.total_damage);
|
drawing.draw_label(_player.damage_UI.value_label, position_on_screen, opacity_scale, _player.display.total_damage);
|
||||||
drawing.draw_label(_player.damage_UI.percentage_label, position_on_screen, opacity_scale, 100 * player_damage_percentage);
|
drawing.draw_label(_player.damage_UI.percentage_label, position_on_screen, opacity_scale, 100 * player_damage_percentage);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -36,6 +36,7 @@
|
|||||||
"during_quest": "During Quest",
|
"during_quest": "During Quest",
|
||||||
"dynamic_positioning": "Dynamic Positioning",
|
"dynamic_positioning": "Dynamic Positioning",
|
||||||
"dynamically_positioned": "Dynamically Positioned",
|
"dynamically_positioned": "Dynamically Positioned",
|
||||||
|
"enable_for": "Enable for",
|
||||||
"enabled": "Enabled",
|
"enabled": "Enabled",
|
||||||
"family": "Family",
|
"family": "Family",
|
||||||
"first": "First",
|
"first": "First",
|
||||||
@@ -49,10 +50,12 @@
|
|||||||
"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_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",
|
||||||
|
"highlighted": "Highlighted (targeted)",
|
||||||
"highlighted_bar": "Highlighted Bar",
|
"highlighted_bar": "Highlighted Bar",
|
||||||
"highlighted_damage_bar": "Highlighted Damage Bar",
|
"highlighted_damage_bar": "Highlighted Damage Bar",
|
||||||
"horizontal": "Horizontal",
|
"horizontal": "Horizontal",
|
||||||
"hunter_rank": "Hunter Rank",
|
"hunter_rank": "Hunter Rank",
|
||||||
|
"hunter_rank_label": "Hunter Rank Label",
|
||||||
"include": "Include",
|
"include": "Include",
|
||||||
"installation_damage": "Installation Damage",
|
"installation_damage": "Installation Damage",
|
||||||
"italic": "Italic",
|
"italic": "Italic",
|
||||||
@@ -60,6 +63,7 @@
|
|||||||
"language": "Language",
|
"language": "Language",
|
||||||
"large_monster_UI": "Large Monster UI",
|
"large_monster_UI": "Large Monster UI",
|
||||||
"large_monster_dynamic_UI": "Large Monster Dynamic UI",
|
"large_monster_dynamic_UI": "Large Monster Dynamic UI",
|
||||||
|
"large_monster_highlighted_UI": "Large Monster Highlighted UI",
|
||||||
"large_monster_static_UI": "Large Monster Static UI",
|
"large_monster_static_UI": "Large Monster Static UI",
|
||||||
"large_monsters": "Large Monsters",
|
"large_monsters": "Large Monsters",
|
||||||
"last": "Last",
|
"last": "Last",
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
"during_quest": "퀘스트 중",
|
"during_quest": "퀘스트 중",
|
||||||
"dynamic_positioning": "유동 위치",
|
"dynamic_positioning": "유동 위치",
|
||||||
"dynamically_positioned": "유동 위치 UI",
|
"dynamically_positioned": "유동 위치 UI",
|
||||||
|
"enable_for": "Enable for",
|
||||||
|
"enable_on": "Enable on",
|
||||||
"enabled": "사용함",
|
"enabled": "사용함",
|
||||||
"family": "글꼴",
|
"family": "글꼴",
|
||||||
"first": "처음",
|
"first": "처음",
|
||||||
@@ -51,11 +53,13 @@
|
|||||||
"hide_player_if_player_damage_is_zero": "헌터 대미지가 0이면 헌터 숨김",
|
"hide_player_if_player_damage_is_zero": "헌터 대미지가 0이면 헌터 숨김",
|
||||||
"hide_total_if_total_damage_is_zero": "총 대미지가 0이면 모두 숨김",
|
"hide_total_if_total_damage_is_zero": "총 대미지가 0이면 모두 숨김",
|
||||||
"hide_undamaged_parts": "피해를 입히지 않은 부위 숨김",
|
"hide_undamaged_parts": "피해를 입히지 않은 부위 숨김",
|
||||||
|
"highlighted": "Highlighted (targeted)",
|
||||||
"highlighted_bar": "강조된 막대",
|
"highlighted_bar": "강조된 막대",
|
||||||
"highlighted_damage_bar": "강조된 대미지 막대",
|
"highlighted_damage_bar": "강조된 대미지 막대",
|
||||||
"higlighted_bar": "강조된 막대",
|
"higlighted_bar": "강조된 막대",
|
||||||
"horizontal": "가로",
|
"horizontal": "가로",
|
||||||
"hunter_rank": "헌터 랭크",
|
"hunter_rank": "헌터 랭크",
|
||||||
|
"hunter_rank_label": "Hunter Rank Label",
|
||||||
"include": "포함",
|
"include": "포함",
|
||||||
"installation_damage": "설비 대미지",
|
"installation_damage": "설비 대미지",
|
||||||
"italic": "기울임",
|
"italic": "기울임",
|
||||||
@@ -63,6 +67,7 @@
|
|||||||
"language": "언어",
|
"language": "언어",
|
||||||
"large_monster_UI": "대형 몬스터 UI",
|
"large_monster_UI": "대형 몬스터 UI",
|
||||||
"large_monster_dynamic_UI": "대형 몬스터 유동 UI",
|
"large_monster_dynamic_UI": "대형 몬스터 유동 UI",
|
||||||
|
"large_monster_highlighted_UI": "Large Monster Highlighted UI",
|
||||||
"large_monster_static_UI": "대형 몬스터 고정 UI",
|
"large_monster_static_UI": "대형 몬스터 고정 UI",
|
||||||
"large_monsters": "대형 몬스터",
|
"large_monsters": "대형 몬스터",
|
||||||
"last": "마지막",
|
"last": "마지막",
|
||||||
@@ -131,6 +136,7 @@
|
|||||||
"vertical": "세로",
|
"vertical": "세로",
|
||||||
"viewport_offset": "뷰포트 옵셋",
|
"viewport_offset": "뷰포트 옵셋",
|
||||||
"visible": "표시함",
|
"visible": "표시함",
|
||||||
|
"visible_on": "Visible on",
|
||||||
"width": "너비",
|
"width": "너비",
|
||||||
"word_player": "\"헌터\" 명칭",
|
"word_player": "\"헌터\" 명칭",
|
||||||
"world_offset": "전역 옵셋",
|
"world_offset": "전역 옵셋",
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
"during_quest": "任務中",
|
"during_quest": "任務中",
|
||||||
"dynamic_positioning": "浮動的資訊位置",
|
"dynamic_positioning": "浮動的資訊位置",
|
||||||
"dynamically_positioned": "浮動的魔物資訊",
|
"dynamically_positioned": "浮動的魔物資訊",
|
||||||
|
"enable_for": "Enable for",
|
||||||
|
"enable_on": "Enable on",
|
||||||
"enabled": "可見",
|
"enabled": "可見",
|
||||||
"family": "字體",
|
"family": "字體",
|
||||||
"first": "第一",
|
"first": "第一",
|
||||||
@@ -49,10 +51,12 @@
|
|||||||
"hide_player_if_player_damage_is_zero": "當玩家傷害為0時,隱藏玩家傷害",
|
"hide_player_if_player_damage_is_zero": "當玩家傷害為0時,隱藏玩家傷害",
|
||||||
"hide_total_if_total_damage_is_zero": "當總傷害為0時,隱藏總傷害",
|
"hide_total_if_total_damage_is_zero": "當總傷害為0時,隱藏總傷害",
|
||||||
"hide_undamaged_parts": "隱藏沒受到傷害的部位",
|
"hide_undamaged_parts": "隱藏沒受到傷害的部位",
|
||||||
|
"highlighted": "Highlighted (targeted)",
|
||||||
"highlighted_bar": "重點條",
|
"highlighted_bar": "重點條",
|
||||||
"highlighted_damage_bar": "重點傷害條",
|
"highlighted_damage_bar": "重點傷害條",
|
||||||
"horizontal": "水平",
|
"horizontal": "水平",
|
||||||
"hunter_rank": "獵人等級",
|
"hunter_rank": "獵人等級",
|
||||||
|
"hunter_rank_label": "Hunter Rank Label",
|
||||||
"include": "細部資訊調整",
|
"include": "細部資訊調整",
|
||||||
"installation_damage": "設備傷害",
|
"installation_damage": "設備傷害",
|
||||||
"italic": "斜體",
|
"italic": "斜體",
|
||||||
@@ -60,6 +64,7 @@
|
|||||||
"language": "語言",
|
"language": "語言",
|
||||||
"large_monster_UI": "大型魔物 UI",
|
"large_monster_UI": "大型魔物 UI",
|
||||||
"large_monster_dynamic_UI": "大型魔物浮動 UI",
|
"large_monster_dynamic_UI": "大型魔物浮動 UI",
|
||||||
|
"large_monster_highlighted_UI": "Large Monster Highlighted UI",
|
||||||
"large_monster_static_UI": "大型魔物固定 UI",
|
"large_monster_static_UI": "大型魔物固定 UI",
|
||||||
"large_monsters": "大型魔物群",
|
"large_monsters": "大型魔物群",
|
||||||
"last": "最後",
|
"last": "最後",
|
||||||
@@ -128,6 +133,7 @@
|
|||||||
"vertical": "垂直",
|
"vertical": "垂直",
|
||||||
"viewport_offset": "視窗的位置",
|
"viewport_offset": "視窗的位置",
|
||||||
"visible": "可見",
|
"visible": "可見",
|
||||||
|
"visible_on": "Visible on",
|
||||||
"width": "寬度",
|
"width": "寬度",
|
||||||
"word_player": "名稱 \"玩家\"",
|
"word_player": "名稱 \"玩家\"",
|
||||||
"world_offset": "地圖中的位置",
|
"world_offset": "地圖中的位置",
|
||||||
|
|||||||
Reference in New Issue
Block a user