diff --git a/reframework/autorun/MHR_Overlay/Damage_Meter/damage_hook.lua b/reframework/autorun/MHR_Overlay/Damage_Meter/damage_hook.lua index be06b20..385f628 100644 --- a/reframework/autorun/MHR_Overlay/Damage_Meter/damage_hook.lua +++ b/reframework/autorun/MHR_Overlay/Damage_Meter/damage_hook.lua @@ -159,41 +159,40 @@ function damage_hook.update_damage(enemy, enemy_calc_damage_info) monster = small_monster.get_monster(enemy); end - local attacking_player = nil; - local attacking_otomo = nil; + local player = nil; + local otomo = nil; if not is_otomo_attack then - attacking_player = players.get_player(attacker_id); + player = players.get_player(attacker_id); - if attacking_player == nil then - attacking_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); + if player == nil then + player = non_players.get_servant(attacker_id); end else if attacker_id < 4 then - attacking_player = players.get_player(attacker_id); - attacking_otomo = non_players.get_otomo(attacker_id); + player = players.get_player(attacker_id); + otomo = non_players.get_otomo(attacker_id); elseif attacker_id == 4 then - attacking_player = players.myself - attacking_otomo = non_players.get_otomo(non_players.my_second_otomo_id); + player = players.myself + otomo = non_players.get_otomo(non_players.my_second_otomo_id); else - attacking_player = non_players.get_servant(attacker_id - 1); - attacking_otomo = non_players.get_otomo(attacker_id - 1); + player = non_players.get_servant(attacker_id - 1); + otomo = non_players.get_otomo(attacker_id - 1); 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 + 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(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) .. @@ -204,15 +203,15 @@ function damage_hook.update_damage(enemy, enemy_calc_damage_info) --" 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); + --[[if is_otomo_attack then + xy = xy .. "\nOtomo Master: " .. tostring(player.id) .. + " " .. tostring(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 + xy = xy .. "\nOtomo: " .. tostring(otomo.id) .. + " " .. tostring(otomo.name) .. + " Damage: " .. tostring(damage_object.total_damage); + end]] --if string.len(xy) > 2700 then -- xy = ""; diff --git a/reframework/autorun/MHR_Overlay/Damage_Meter/players.lua b/reframework/autorun/MHR_Overlay/Damage_Meter/players.lua index 16eda66..e692f7c 100644 --- a/reframework/autorun/MHR_Overlay/Damage_Meter/players.lua +++ b/reframework/autorun/MHR_Overlay/Damage_Meter/players.lua @@ -139,6 +139,10 @@ function players.init_damage_sources() end function players.get_player(player_id) + if player_id == non_players.my_second_otomo_id then + return players.myself; + end + return players.list[player_id]; end @@ -172,6 +176,10 @@ function players.update_damage(player, damage_source_type, is_large_monster, dam players.merge_damage(player_monster_type.poison, damage_object); elseif damage_source_type == "blast" then players.merge_damage(player_monster_type.blast, damage_object); + elseif damage_source_type == "otomo poison" then + players.merge_damage(player_monster_type.otomo_poison, damage_object); + elseif damage_source_type == "otomo blast" then + players.merge_damage(player_monster_type.otomo_blast, damage_object); elseif damage_source_type == "endemic life" then players.merge_damage(player_monster_type.endemic_life, damage_object); elseif damage_source_type == "other" then @@ -188,154 +196,166 @@ function players.update_display(player) return; end + local cached_config = config.current_config.damage_meter_UI; + player.display.total_damage = 0; player.display.physical_damage = 0; player.display.elemental_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_damage_types.player_damage then - 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 + table.insert(monster_types, player.small_monsters); end 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 - players.merge_damage(player.display, player.large_monsters); + players.merge_damage(player.display, monster_type); end if cached_config.tracked_damage_types.bomb_damage then - players.merge_damage(player.display, player.large_monsters.bombs); + players.merge_damage(player.display, monster_type.bombs); end if cached_config.tracked_damage_types.kunai_damage then - players.merge_damage(player.display, player.large_monsters.kunai); + players.merge_damage(player.display, monster_type.kunai); end if cached_config.tracked_damage_types.installation_damage then - players.merge_damage(player.display, player.large_monsters.installations); + players.merge_damage(player.display, monster_type.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.large_monsters.otomo); + players.merge_damage(player.display, monster_type.otomo); end - elseif player.type == players.types.other_players then + elseif player.type == players.types.other_player then if not cached_config.settings.show_other_player_otomos_separately then - players.merge_damage(player.display, player.large_monsters.otomo); + players.merge_damage(player.display, monster_type.otomo); end - elseif player.type == players.types.servants then - + elseif player.type == players.types.servant then + if not cached_config.settings.show_servant_otomos_separately then - players.merge_damage(player.display, player.large_monsters.otomo); + players.merge_damage(player.display, monster_type.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.large_monsters.otomo); + players.merge_damage(player.display, monster_type.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.large_monsters.otomo); + players.merge_damage(player.display, monster_type.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.large_monsters.otomo); + players.merge_damage(player.display, monster_type.otomo); end + elseif player.type == players.types.total then + + players.merge_damage(player.display, monster_type.otomo); end end if cached_config.tracked_damage_types.wyvern_riding_damage then - players.merge_damage(player.display, player.large_monsters.wyvern_riding); + players.merge_damage(player.display, monster_type.wyvern_riding); end if cached_config.tracked_damage_types.poison_damage then - players.merge_damage(player.display, player.large_monsters.poison); + players.merge_damage(player.display, monster_type.poison); + + if player.type == players.types.myself then + + if not cached_config.settings.show_my_otomos_separately then + players.merge_damage(player.display, monster_type.otomo_poison); + end + elseif player.type == players.types.other_player then + + if not cached_config.settings.show_other_player_otomos_separately then + players.merge_damage(player.display, monster_type.otomo_poison); + end + elseif player.type == players.types.servant then + + if not cached_config.settings.show_servant_otomos_separately then + players.merge_damage(player.display, monster_type.otomo_poison); + end + elseif player.type == players.types.my_otomo then + + if cached_config.settings.show_my_otomos_separately then + players.merge_damage(player.display, monster_type.otomo_poison); + 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, monster_type.otomo_poison); + end + elseif player.type == players.types.servant_otomo then + + if cached_config.settings.show_servant_otomos_separately then + players.merge_damage(player.display, monster_type.otomo_poison); + end + + elseif player.type == players.types.total then + + players.merge_damage(player.display, monster_type.otomo_poison); + end end if cached_config.tracked_damage_types.blast_damage then - players.merge_damage(player.display, player.large_monsters.blast); + players.merge_damage(player.display, monster_type.blast); + + if player.type == players.types.myself then + + if not cached_config.settings.show_my_otomos_separately then + players.merge_damage(player.display, monster_type.otomo_blast); + end + elseif player.type == players.types.other_player then + + if not cached_config.settings.show_other_player_otomos_separately then + players.merge_damage(player.display, monster_type.otomo_blast); + end + elseif player.type == players.types.servant then + + if not cached_config.settings.show_servant_otomos_separately then + players.merge_damage(player.display, monster_type.otomo_blast); + end + elseif player.type == players.types.my_otomo then + + if cached_config.settings.show_my_otomos_separately then + players.merge_damage(player.display, monster_type.otomo_blast); + 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, monster_type.otomo_blast); + end + elseif player.type == players.types.servant_otomo then + + if cached_config.settings.show_servant_otomos_separately then + players.merge_damage(player.display, monster_type.otomo_blast); + end + elseif player.type == players.types.total then + + players.merge_damage(player.display, monster_type.otomo_blast); + end end if cached_config.tracked_damage_types.endemic_life_damage then - players.merge_damage(player.display, player.large_monsters.endemic_life); + players.merge_damage(player.display, monster_type.endemic_life); end if cached_config.tracked_damage_types.other_damage then - players.merge_damage(player.display, player.large_monsters.other); + players.merge_damage(player.display, monster_type.other); end end end diff --git a/reframework/autorun/MHR_Overlay/Misc/config.lua b/reframework/autorun/MHR_Overlay/Misc/config.lua index b20bc47..269eb8e 100644 --- a/reframework/autorun/MHR_Overlay/Misc/config.lua +++ b/reframework/autorun/MHR_Overlay/Misc/config.lua @@ -2,41 +2,53 @@ local config = {}; local table_helpers; local language; +config.version = "2.4"; + +config.config_folder = "MHR Overlay\\configs\\"; +config.current_config_value_file_name = "MHR Overlay\\config.json"; + +config.current_config_name = nil; config.current_config = nil; -config.config_file_name = "MHR Overlay/config.json"; -config.default_config = {}; +config.config_names = {}; +config.configs = {}; -function config.init() +config.default_config = nil; + +local is_old_config_transferred = false; + +function config.init_default() config.default_config = { + version = config.version, + global_settings = { language = "default", - + menu_font = { size = 17 }, - + UI_font = { family = "Consolas", size = 13, bold = true, italic = false }, - + modifiers = { global_position_modifier = 1, global_scale_modifier = 1 }, - + performance = { max_monster_updates_per_tick = 2, prioritize_large_monsters = false }, - + renderer = { use_d2d_if_available = true }, - + module_visibility = { in_training_area = { large_monster_dynamic_UI = true, @@ -45,7 +57,7 @@ function config.init() damage_meter_UI = true, endemic_life_UI = true }, - + cutscene = { small_monster_UI = false, large_monster_dynamic_UI = false, @@ -55,7 +67,7 @@ function config.init() damage_meter_UI = false, endemic_life_UI = false }, - + loading_quest = { small_monster_UI = false, large_monster_dynamic_UI = false, @@ -65,7 +77,7 @@ function config.init() damage_meter_UI = false, endemic_life_UI = false }, - + quest_start_animation = { small_monster_UI = true, large_monster_dynamic_UI = true, @@ -75,7 +87,7 @@ function config.init() damage_meter_UI = true, endemic_life_UI = true }, - + playing_quest = { small_monster_UI = true, large_monster_dynamic_UI = true, @@ -85,7 +97,7 @@ function config.init() damage_meter_UI = true, endemic_life_UI = true }, - + killcam = { small_monster_UI = true, large_monster_dynamic_UI = true, @@ -95,7 +107,7 @@ function config.init() damage_meter_UI = true, endemic_life_UI = true }, - + quest_end_timer = { small_monster_UI = true, large_monster_dynamic_UI = true, @@ -105,7 +117,7 @@ function config.init() damage_meter_UI = true, endemic_life_UI = true }, - + quest_end_animation = { small_monster_UI = false, large_monster_dynamic_UI = false, @@ -115,7 +127,7 @@ function config.init() damage_meter_UI = false, endemic_life_UI = false }, - + quest_end_screen = { small_monster_UI = false, large_monster_dynamic_UI = false, @@ -125,7 +137,7 @@ function config.init() damage_meter_UI = false, endemic_life_UI = false }, - + reward_screen = { small_monster_UI = false, large_monster_dynamic_UI = false, @@ -135,7 +147,7 @@ function config.init() damage_meter_UI = true, endemic_life_UI = false }, - + summary_screen = { small_monster_UI = false, large_monster_dynamic_UI = false, @@ -146,7 +158,7 @@ function config.init() endemic_life_UI = false }, }, - + hotkeys_with_modifiers = { all_UI = { shift = false, @@ -154,56 +166,56 @@ function config.init() alt = false, key = 0 }, - + small_monster_UI = { shift = false, ctrl = false, alt = false, key = 0 }, - + large_monster_UI = { shift = false, ctrl = false, alt = false, key = 0 }, - + large_monster_dynamic_UI = { shift = false, ctrl = false, alt = false, key = 0 }, - + large_monster_static_UI = { shift = false, ctrl = false, alt = false, key = 0 }, - + large_monster_highlighted_UI = { shift = false, ctrl = false, alt = false, key = 0 }, - + time_UI = { shift = false, ctrl = false, alt = false, key = 0 }, - + damage_meter_UI = { shift = false, ctrl = false, alt = false, key = 0 }, - + endemic_life_UI = { shift = false, ctrl = false, @@ -212,58 +224,58 @@ function config.init() } } }, - + small_monster_UI = { enabled = true, - + settings = { hide_dead_or_captured = true, orientation = "Horizontal" }, - + dynamic_positioning = { enabled = true, max_distance = 300, opacity_falloff = true, - + world_offset = { x = 0, y = 3, z = 0 }, - + viewport_offset = { x = -50, y = 0 } }, - + static_spacing = { x = 110, y = 40 }, - + static_sorting = { type = "Normal", reversed_order = false }, - + static_position = { x = 0, y = 0, anchor = "Top-Left" }, - + monster_name_label = { visibility = true, text = "%s", - + offset = { x = 5, y = 0 }, color = 0xFFCCF4E1, - + shadow = { visibility = true, offset = { @@ -273,15 +285,15 @@ function config.init() color = 0xFF000000 } }, - + health = { visibility = true, - + offset = { x = 0, y = 17 }, - + text_label = { visibility = false, text = "%s", @@ -290,7 +302,7 @@ function config.init() y = -5 }, color = 0xFFCCF4E1, - + shadow = { visibility = true, offset = { @@ -300,7 +312,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = true, text = "%.0f/%.0f", -- current_health/max_health @@ -309,7 +321,7 @@ function config.init() y = 0 }, color = 0xFFCCF4E1, - + shadow = { visibility = true, offset = { @@ -319,17 +331,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = false, text = "%5.1f%%", - + offset = { x = -5, y = 0 }, color = 0xFFCCF4E1, - + shadow = { visibility = true, offset = { @@ -339,49 +351,49 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 0 }, - + size = { width = 100, height = 7 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xB974A652, background = 0xB9000000, outline = 0xC0000000, capture_health = 0xB9CCCC33 } - + } }, - + ailments = { visibility = false, - + offset = { x = 10, y = 40 }, - + spacing = { x = 0, y = 24 }, - + settings = { hide_ailments_with_zero_buildup = true, hide_inactive_ailments_with_no_buildup_support = true, @@ -390,12 +402,12 @@ function config.init() hide_disabled_ailments = true, time_limit = 15 }, - + sorting = { type = "Normal", reversed_order = false }, - + filter = { paralysis = true, sleep = true, @@ -409,7 +421,7 @@ function config.init() fireblight = true, iceblight = true, thunderblight = true, - + fall_trap = true, shock_trap = true, tranq_bomb = true, @@ -419,22 +431,22 @@ function config.init() fall_otomo_trap = true, shock_otomo_trap = true }, - + ailment_name_label = { visibility = true, text = "%s", - + include = { ailment_name = true, activation_count = true }, - + offset = { x = 5, y = 0 }, color = 0xFFffb2e2, - + shadow = { visibility = true, offset = { @@ -444,7 +456,7 @@ function config.init() color = 0xFF000000 } }, - + text_label = { visibility = false, text = language.current_language.UI.buildup, @@ -453,7 +465,7 @@ function config.init() y = 6 }, color = 0xF1F4A3CC, - + shadow = { visibility = true, offset = { @@ -463,7 +475,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = true, text = "%.0f/%.0f", -- current_buildup/max_buildup @@ -472,7 +484,7 @@ function config.init() y = 13 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -482,17 +494,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = false, text = "%5.1f%%", - + offset = { x = 0, y = 13 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -502,17 +514,17 @@ function config.init() color = 0xFF000000 } }, - + timer_label = { visibility = true, text = "%2.0f:%02.0f", - + offset = { x = 140, y = 13 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -522,26 +534,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 14 }, - + size = { width = 90, height = 4 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xA7ff80ce, background = 0xA7000000, @@ -549,57 +561,57 @@ function config.init() } } }, - + ailment_buildups = { visibility = false, - + offset = { x = 115, y = 17 }, - + player_spacing = { x = 0, y = 24 }, - + ailment_spacing = { x = 0, y = 17 }, - + settings = { buildup_bar_relative_to = "Top Buildup", highlighted_bar = "Me", time_limit = 15 }, - + filter = { stun = true, poison = true, blast = true }, - + sorting = { type = "Buildup", reversed_order = false }, - + ailment_name_label = { visibility = true, - + include = { ailment_name = true, activation_count = true }, - + text = "%s", offset = { x = 5, y = -17 }, color = 0xFF7cdbff, - + shadow = { visibility = true, offset = { @@ -609,17 +621,17 @@ function config.init() color = 0xFF000000 } }, - + player_name_label = { visibility = true, - + text = "%s", offset = { x = 5, y = 0 }, color = 0xFFb5dded, - + shadow = { visibility = true, offset = { @@ -629,7 +641,7 @@ function config.init() color = 0xFF000000 } }, - + buildup_value_label = { visibility = true, text = "%.0f", @@ -638,7 +650,7 @@ function config.init() y = 0 }, color = 0xFFb5dded, - + shadow = { visibility = true, offset = { @@ -648,7 +660,7 @@ function config.init() color = 0xFF000000 } }, - + buildup_percentage_label = { visibility = true, text = "%5.1f%%", @@ -657,7 +669,7 @@ function config.init() y = 0 }, color = 0xFFb5dded, - + shadow = { visibility = true, offset = { @@ -667,7 +679,7 @@ function config.init() color = 0xFF000000 } }, - + total_buildup_label = { visibility = true, text = "%s", @@ -676,7 +688,7 @@ function config.init() y = 0 }, color = 0xFFFF9393, - + shadow = { visibility = true, offset = { @@ -686,7 +698,7 @@ function config.init() color = 0xFF000000 } }, - + total_buildup_value_label = { visibility = true, text = "%.0f", @@ -695,7 +707,7 @@ function config.init() y = 0 }, color = 0xFFFF9393, - + shadow = { visibility = true, offset = { @@ -705,52 +717,52 @@ function config.init() color = 0xFF000000 } }, - + buildup_bar = { visibility = true, offset = { x = 0, y = 17 }, - + size = { width = 200, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xA796CFE5, background = 0xA7000000, outline = 0xC0000000 } }, - + highlighted_buildup_bar = { visibility = true, offset = { x = 0, y = 17 }, - + size = { width = 200, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xA7F4D5A3, background = 0xA7000000, @@ -759,11 +771,11 @@ function config.init() } } }, - + large_monster_UI = { dynamic = { enabled = true, - + settings = { hide_dead_or_captured = true, render_highlighted_monster = true, @@ -772,22 +784,22 @@ function config.init() opacity_falloff = true, time_limit = 15 }, - + world_offset = { x = 0, y = 6, z = 0 }, - + viewport_offset = { x = -100, y = 0 }, - + monster_name_label = { visibility = true, text = "%s", - + include = { monster_name = true, monster_id = false, @@ -795,13 +807,13 @@ function config.init() size = true, crown_thresholds = false }, - + offset = { x = 5, y = 0 }, color = 0xFFCCF4E1, - + shadow = { visibility = true, offset = { @@ -811,15 +823,15 @@ function config.init() color = 0xFF000000 } }, - + health = { visibility = true, - + offset = { x = 0, y = 17 }, - + text_label = { visibility = false, text = "%s", @@ -828,7 +840,7 @@ function config.init() y = 2 }, color = 0xFFCCF4E1, - + shadow = { visibility = true, offset = { @@ -838,7 +850,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = false, text = "%.0f/%.0f", -- current_health/max_health @@ -847,7 +859,7 @@ function config.init() y = 2 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -857,17 +869,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = false, text = "%5.1f%%", - + offset = { x = 150, y = 2 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -877,63 +889,63 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 0 }, - + size = { width = 200, height = 7 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + normal_colors = { foreground = 0xB974A653, background = 0xB9000000, outline = 0xC0000000 }, - + capture_colors = { foreground = 0xB9CCCC33, background = 0x88000000, outline = 0xC0000000 }, - + capture_line = { visibility = true, offset = { x = 0, y = -3 }, - + size = { width = 2, height = 8 }, - + color = 0xB9000000 } } }, - + stamina = { visibility = false, - + offset = { x = 10, y = 7 }, - + text_label = { visibility = false, text = "%s", @@ -942,7 +954,7 @@ function config.init() y = 0 }, color = 0xFFA3F5F0, - + shadow = { visibility = true, offset = { @@ -952,7 +964,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = false, text = "%.0f/%.0f", -- current_health/max_health @@ -961,7 +973,7 @@ function config.init() y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -971,17 +983,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = false, text = "%5.1f%%", - + offset = { x = 135, y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -991,17 +1003,17 @@ function config.init() color = 0xFF000000 } }, - + timer_label = { visibility = false, text = "%2.0f:%02.0f", - + offset = { x = 140, y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -1011,26 +1023,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 17 }, - + size = { width = 185, height = 6 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xB966CCC5, background = 0x88000000, @@ -1038,15 +1050,15 @@ function config.init() } } }, - + rage = { visibility = false, - + offset = { x = 10, y = 13 }, - + text_label = { visibility = false, text = "%s", @@ -1055,7 +1067,7 @@ function config.init() y = 0 }, color = 0xFFA3F5F0, - + shadow = { visibility = true, offset = { @@ -1065,7 +1077,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = false, text = "%.0f/%.0f", -- current_health/max_health @@ -1074,7 +1086,7 @@ function config.init() y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -1084,17 +1096,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = false, text = "%5.1f%%", - + offset = { x = 135, y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -1104,17 +1116,17 @@ function config.init() color = 0xFF000000 } }, - + timer_label = { visibility = false, text = "%2.0f:%02.0f", - + offset = { x = 140, y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -1124,26 +1136,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 17 }, - + size = { width = 185, height = 6 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xB966CCC5, background = 0x88000000, @@ -1151,30 +1163,30 @@ function config.init() } } }, - + body_parts = { visibility = false, - + offset = { x = 10, y = 45 }, - + spacing = { x = 0, y = 33 }, - + settings = { hide_undamaged_parts = true, time_limit = 15 }, - + sorting = { type = "Normal", reversed_order = false }, - + filter = { health_break_severe = true, health_break = true, @@ -1184,24 +1196,24 @@ function config.init() break_ = true, severe = true }, - + part_name_label = { visibility = true, text = "%s", - + include = { part_name = true, flinch_count = false, break_count = true, break_max_count = true }, - + offset = { x = 5, y = 0 }, color = 0xFFf9d9ff, - + shadow = { visibility = true, offset = { @@ -1211,15 +1223,15 @@ function config.init() color = 0xFF000000 } }, - + part_health = { visibility = true, - + offset = { x = 0, y = 9 }, - + text_label = { visibility = false, text = language.current_language.UI.HP, @@ -1228,7 +1240,7 @@ function config.init() y = -5 }, color = 0xFFF4A3CC, - + shadow = { visibility = true, offset = { @@ -1238,7 +1250,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = true, text = "%11s", -- current_health/max_health @@ -1247,7 +1259,7 @@ function config.init() y = -5 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -1257,17 +1269,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = false, text = "%5.1f%%", - + offset = { x = 190, y = -5 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -1277,26 +1289,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 6 }, - + size = { width = 185, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xB9CA85CC, background = 0x88000000, @@ -1304,15 +1316,15 @@ function config.init() } } }, - + part_break = { visibility = true, - + offset = { x = 0, y = 15 }, - + text_label = { visibility = false, text = language.current_language.UI.part_break, @@ -1321,7 +1333,7 @@ function config.init() y = 6 }, color = 0xFFb2d0ff, - + shadow = { visibility = true, offset = { @@ -1331,17 +1343,17 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = true, text = "%-9s", offset = { x = 5, y = 6 - + }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -1351,17 +1363,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = false, text = "%5.1f%%", - + offset = { x = 5, y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -1371,26 +1383,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 7 }, - + size = { width = 92, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xB999bfff, background = 0x88000000, @@ -1398,15 +1410,15 @@ function config.init() } } }, - + part_loss = { visibility = true, - + offset = { x = 94, y = 15 }, - + text_label = { visibility = false, text = language.current_language.UI.part_sever, @@ -1415,7 +1427,7 @@ function config.init() y = 5 }, color = 0xFFff8095, - + shadow = { visibility = true, offset = { @@ -1425,7 +1437,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = true, text = "%11s", @@ -1434,7 +1446,7 @@ function config.init() y = 6 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -1444,17 +1456,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = false, text = "%5.1f%%", - + offset = { x = 41, y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -1464,26 +1476,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 7 }, - + size = { width = 91, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xB9e57386, background = 0x88000000, @@ -1491,27 +1503,27 @@ function config.init() } } } - + }, - + ailments = { visibility = false, - + offset = { x = 10, y = 111 }, - + relative_offset = { x = 0, y = 45 }, - + spacing = { x = 0, y = 24 }, - + settings = { hide_ailments_with_zero_buildup = true, hide_inactive_ailments_with_no_buildup_support = true, @@ -1521,12 +1533,12 @@ function config.init() offset_is_relative_to_parts = true, time_limit = 15 }, - + sorting = { type = "Normal", reversed_order = false }, - + filter = { paralysis = true, sleep = true, @@ -1540,7 +1552,7 @@ function config.init() fireblight = true, iceblight = true, thunderblight = true, - + fall_trap = true, shock_trap = true, tranq_bomb = true, @@ -1550,22 +1562,22 @@ function config.init() fall_otomo_trap = true, shock_otomo_trap = true }, - + ailment_name_label = { visibility = true, text = "%s", - + include = { ailment_name = true, activation_count = true }, - + offset = { x = 5, y = 0 }, color = 0xFFffb2e2, - + shadow = { visibility = true, offset = { @@ -1575,7 +1587,7 @@ function config.init() color = 0xFF000000 } }, - + text_label = { visibility = false, text = language.current_language.UI.buildup, @@ -1584,7 +1596,7 @@ function config.init() y = 7 }, color = 0xFFffb2e2, - + shadow = { visibility = true, offset = { @@ -1594,7 +1606,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = true, text = "%.0f/%.0f", -- current_buildup/max_buildup @@ -1603,7 +1615,7 @@ function config.init() y = 13 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -1613,17 +1625,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = true, text = "%5.1f%%", - + offset = { x = 135, y = 13 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -1633,17 +1645,17 @@ function config.init() color = 0xFF000000 } }, - + timer_label = { visibility = true, text = "%2.0f:%02.0f", - + offset = { x = 140, y = 13 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -1653,26 +1665,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 14 }, - + size = { width = 185, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xA7ff80ce, background = 0xA7000000, @@ -1680,57 +1692,57 @@ function config.init() } } }, - + ailment_buildups = { visibility = false, - + offset = { x = 220, y = 17 }, - + player_spacing = { x = 0, y = 24 }, - + ailment_spacing = { x = 0, y = 17 }, - + settings = { buildup_bar_relative_to = "Top Buildup", highlighted_bar = "Me", time_limit = 15 }, - + filter = { stun = true, poison = true, blast = true }, - + sorting = { type = "Buildup", reversed_order = false }, - + ailment_name_label = { visibility = true, - + include = { ailment_name = true, activation_count = true }, - + text = "%s", offset = { x = 5, y = -17 }, color = 0xFF7cdbff, - + shadow = { visibility = true, offset = { @@ -1740,17 +1752,17 @@ function config.init() color = 0xFF000000 } }, - + player_name_label = { visibility = true, - + text = "%s", offset = { x = 5, y = 0 }, - color = 0xFFb5dded, - + color = 0xFFB5DDED, + shadow = { visibility = true, offset = { @@ -1760,7 +1772,7 @@ function config.init() color = 0xFF000000 } }, - + buildup_value_label = { visibility = true, text = "%.0f", @@ -1768,8 +1780,8 @@ function config.init() x = 115, y = 0 }, - color = 0xFFb5dded, - + color = 0xFFB5DDED, + shadow = { visibility = true, offset = { @@ -1779,7 +1791,7 @@ function config.init() color = 0xFF000000 } }, - + buildup_percentage_label = { visibility = true, text = "%5.1f%%", @@ -1787,8 +1799,8 @@ function config.init() x = 152, y = 0 }, - color = 0xFFb5dded, - + color = 0xFFB5DDED, + shadow = { visibility = true, offset = { @@ -1798,7 +1810,7 @@ function config.init() color = 0xFF000000 } }, - + total_buildup_label = { visibility = true, text = "%s", @@ -1806,8 +1818,8 @@ function config.init() x = 5, y = 0 }, - color = 0xFFFF9393, - + color = 0xFFF27979, + shadow = { visibility = true, offset = { @@ -1817,7 +1829,7 @@ function config.init() color = 0xFF000000 } }, - + total_buildup_value_label = { visibility = true, text = "%.0f", @@ -1825,8 +1837,8 @@ function config.init() x = 115, y = 0 }, - color = 0xFFFF9393, - + color = 0xFFF27979, + shadow = { visibility = true, offset = { @@ -1836,69 +1848,69 @@ function config.init() color = 0xFF000000 } }, - + buildup_bar = { visibility = true, offset = { x = 0, y = 17 }, - + size = { width = 200, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xA796CFE5, background = 0xA7000000, outline = 0xC0000000 } }, - + highlighted_buildup_bar = { visibility = true, offset = { x = 0, y = 17 }, - + size = { width = 200, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { - foreground = 0xA7F4D5A3, + foreground = 0xA7FDC689, background = 0xA7000000, outline = 0xC0000000 } } } }, - + static = { enabled = true, - + spacing = { x = 250, y = 40 }, - + settings = { hide_dead_or_captured = true, render_highlighted_monster = true, @@ -1907,22 +1919,22 @@ function config.init() orientation = "Horizontal", time_limit = 15 }, - + sorting = { type = "Normal", reversed_order = false }, - + position = { x = 525, y = 47, anchor = "Bottom-Left" }, - + monster_name_label = { visibility = true, text = "%s", - + include = { monster_name = true, monster_id = false, @@ -1930,13 +1942,13 @@ function config.init() size = true, crown_thresholds = false }, - + offset = { x = 5, y = 0 }, color = 0xFFCCF4E1, - + shadow = { visibility = true, offset = { @@ -1946,15 +1958,15 @@ function config.init() color = 0xFF000000 } }, - + health = { visibility = true, - + offset = { x = 0, y = 17 }, - + text_label = { visibility = false, text = "%s", @@ -1963,7 +1975,7 @@ function config.init() y = 2 }, color = 0xFFCCF4E1, - + shadow = { visibility = true, offset = { @@ -1973,7 +1985,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = true, text = "%.0f/%.0f", -- current_health/max_health @@ -1982,7 +1994,7 @@ function config.init() y = 2 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -1992,17 +2004,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = true, text = "%5.1f%%", - + offset = { x = 150, y = 2 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -2012,63 +2024,63 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 0 }, - + size = { width = 200, height = 20 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + normal_colors = { foreground = 0xB974A653, background = 0xB9000000, outline = 0xC0000000 }, - + capture_colors = { foreground = 0xB9CCCC33, background = 0x88000000, outline = 0xC0000000 }, - + capture_line = { visibility = true, offset = { x = 0, y = -3 }, - + size = { width = 2, height = 8 }, - + color = 0xB9000000 } } }, - + stamina = { visibility = true, - + offset = { x = 0, y = 37 }, - + text_label = { visibility = false, text = "%s", @@ -2077,7 +2089,7 @@ function config.init() y = 0 }, color = 0xFFA3F5F0, - + shadow = { visibility = true, offset = { @@ -2087,7 +2099,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = false, text = "%.0f/%.0f", -- current_health/max_health @@ -2096,7 +2108,7 @@ function config.init() y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -2106,17 +2118,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = false, text = "%5.1f%%", - + offset = { x = 145, y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -2126,17 +2138,17 @@ function config.init() color = 0xFF000000 } }, - + timer_label = { visibility = true, text = "%2.0f:%02.0f", - + offset = { x = 140, y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -2146,26 +2158,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 0 }, - + size = { width = 200, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xB966CCC5, background = 0x88000000, @@ -2173,15 +2185,15 @@ function config.init() } } }, - + rage = { visibility = true, - + offset = { x = 0, y = 42 }, - + text_label = { visibility = false, text = "%s", @@ -2190,7 +2202,7 @@ function config.init() y = 19 }, color = 0xFFFF9393, - + shadow = { visibility = true, offset = { @@ -2200,7 +2212,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = false, text = "%.0f/%.0f", -- current_health/max_health @@ -2209,7 +2221,7 @@ function config.init() y = 36 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -2219,17 +2231,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = true, text = "%5.1f%%", - + offset = { x = 150, y = -9 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -2239,17 +2251,17 @@ function config.init() color = 0xFF000000 } }, - + timer_label = { visibility = true, text = "%2.0f:%02.0f", - + offset = { x = 157, y = -9 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -2259,26 +2271,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 0 }, - + size = { width = 200, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xB9CC6666, background = 0x88000000, @@ -2286,30 +2298,30 @@ function config.init() } } }, - + body_parts = { visibility = false, - + offset = { x = 10, y = 60 }, - + spacing = { x = 0, y = 33 }, - + settings = { hide_undamaged_parts = true, time_limit = 15 }, - + sorting = { type = "Normal", reversed_order = false }, - + filter = { health_break_severe = true, health_break = true, @@ -2319,24 +2331,24 @@ function config.init() break_ = true, severe = true }, - + part_name_label = { visibility = true, text = "%s", - + include = { part_name = true, flinch_count = false, break_count = true, break_max_count = true }, - + offset = { x = 5, y = 0 }, color = 0xFFf9d9ff, - + shadow = { visibility = true, offset = { @@ -2346,15 +2358,15 @@ function config.init() color = 0xFF000000 } }, - + part_health = { visibility = true, - + offset = { x = 0, y = 9 }, - + text_label = { visibility = false, text = language.current_language.UI.HP, @@ -2363,7 +2375,7 @@ function config.init() y = -5 }, color = 0xFFF4A3CC, - + shadow = { visibility = true, offset = { @@ -2373,7 +2385,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = true, text = "%11s", -- current_health/max_health @@ -2382,7 +2394,7 @@ function config.init() y = -5 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -2392,17 +2404,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = false, text = "%5.1f%%", - + offset = { x = 190, y = -5 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -2412,26 +2424,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 6 }, - + size = { width = 185, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xB9CA85CC, background = 0x88000000, @@ -2439,15 +2451,15 @@ function config.init() } } }, - + part_break = { visibility = true, - + offset = { x = 0, y = 15 }, - + text_label = { visibility = false, text = language.current_language.UI.part_break, @@ -2456,7 +2468,7 @@ function config.init() y = 6 }, color = 0xFFb2d0ff, - + shadow = { visibility = true, offset = { @@ -2466,17 +2478,17 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = true, text = "%-9s", offset = { x = 5, y = 6 - + }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -2486,17 +2498,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = false, text = "%5.1f%%", - + offset = { x = 5, y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -2506,26 +2518,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 7 }, - + size = { width = 92, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xB999BFFF, background = 0x88000000, @@ -2533,15 +2545,15 @@ function config.init() } } }, - + part_loss = { visibility = true, - + offset = { x = 94, y = 15 }, - + text_label = { visibility = false, text = language.current_language.UI.part_sever, @@ -2550,7 +2562,7 @@ function config.init() y = 5 }, color = 0xFFff8095, - + shadow = { visibility = true, offset = { @@ -2560,7 +2572,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = true, text = "%11s", @@ -2569,7 +2581,7 @@ function config.init() y = 6 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -2579,17 +2591,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = false, text = "%5.1f%%", - + offset = { x = 41, y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -2599,26 +2611,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 7 }, - + size = { width = 91, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xB9E57386, background = 0x88000000, @@ -2626,43 +2638,43 @@ function config.init() } } } - + }, - + ailments = { visibility = false, - + offset = { x = 10, y = 73 }, - + relative_offset = { x = 0, y = 45 }, - + spacing = { x = 0, y = 24 }, - + settings = { hide_ailments_with_zero_buildup = true, hide_inactive_ailments_with_no_buildup_support = true, hide_all_inactive_ailments = false, hide_all_active_ailments = false, hide_disabled_ailments = true, - + offset_is_relative_to_parts = true, time_limit = 15 }, - + sorting = { type = "Normal", reversed_order = false }, - + filter = { paralysis = true, sleep = true, @@ -2676,7 +2688,7 @@ function config.init() fireblight = true, iceblight = true, thunderblight = true, - + fall_trap = true, shock_trap = true, tranq_bomb = true, @@ -2686,22 +2698,22 @@ function config.init() fall_otomo_trap = true, shock_otomo_trap = true }, - + ailment_name_label = { visibility = true, text = "%s", - + include = { ailment_name = true, activation_count = true }, - + offset = { x = 5, y = 0 }, color = 0xFFffb2e2, - + shadow = { visibility = true, offset = { @@ -2711,7 +2723,7 @@ function config.init() color = 0xFF000000 } }, - + text_label = { visibility = false, text = language.current_language.UI.buildup, @@ -2720,7 +2732,7 @@ function config.init() y = 7 }, color = 0xFFffb2e2, - + shadow = { visibility = true, offset = { @@ -2730,7 +2742,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = true, text = "%.0f/%.0f", -- current_buildup/max_buildup @@ -2739,7 +2751,7 @@ function config.init() y = 13 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -2749,17 +2761,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = true, text = "%5.1f%%", - + offset = { x = 135, y = 13 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -2769,17 +2781,17 @@ function config.init() color = 0xFF000000 } }, - + timer_label = { visibility = true, text = "%2.0f:%02.0f", - + offset = { x = 140, y = 13 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -2789,26 +2801,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 14 }, - + size = { width = 185, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xA7FF80CE, background = 0xA7000000, @@ -2816,57 +2828,57 @@ function config.init() } } }, - + ailment_buildups = { visibility = false, - + offset = { x = 220, y = 17 }, - + player_spacing = { x = 0, y = 24 }, - + ailment_spacing = { x = 0, y = 17 }, - + settings = { buildup_bar_relative_to = "Top Buildup", highlighted_bar = "Me", time_limit = 15 }, - + filter = { stun = true, poison = true, blast = true }, - + sorting = { type = "Buildup", reversed_order = false }, - + ailment_name_label = { visibility = true, - + include = { ailment_name = true, activation_count = true }, - + text = "%s", offset = { x = 5, y = -17 }, color = 0xFF7cdbff, - + shadow = { visibility = true, offset = { @@ -2876,17 +2888,17 @@ function config.init() color = 0xFF000000 } }, - + player_name_label = { visibility = true, - + text = "%s", offset = { x = 5, y = 0 }, color = 0xFFb5dded, - + shadow = { visibility = true, offset = { @@ -2896,7 +2908,7 @@ function config.init() color = 0xFF000000 } }, - + buildup_value_label = { visibility = true, text = "%.0f", @@ -2905,7 +2917,7 @@ function config.init() y = 0 }, color = 0xFFb5dded, - + shadow = { visibility = true, offset = { @@ -2915,7 +2927,7 @@ function config.init() color = 0xFF000000 } }, - + buildup_percentage_label = { visibility = true, text = "%5.1f%%", @@ -2924,7 +2936,7 @@ function config.init() y = 0 }, color = 0xFFb5dded, - + shadow = { visibility = true, offset = { @@ -2934,7 +2946,7 @@ function config.init() color = 0xFF000000 } }, - + total_buildup_label = { visibility = true, text = "%s", @@ -2943,7 +2955,7 @@ function config.init() y = 0 }, color = 0xFFFF9393, - + shadow = { visibility = true, offset = { @@ -2953,7 +2965,7 @@ function config.init() color = 0xFF000000 } }, - + total_buildup_value_label = { visibility = true, text = "%.0f", @@ -2962,7 +2974,7 @@ function config.init() y = 0 }, color = 0xFFFF9393, - + shadow = { visibility = true, offset = { @@ -2972,52 +2984,52 @@ function config.init() color = 0xFF000000 } }, - + buildup_bar = { visibility = true, offset = { x = 0, y = 17 }, - + size = { width = 200, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xA796CFE5, background = 0xA7000000, outline = 0xC0000000 } }, - + highlighted_buildup_bar = { visibility = true, offset = { x = 0, y = 17 }, - + size = { width = 200, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xA7F4D5A3, background = 0xA7000000, @@ -3026,25 +3038,25 @@ function config.init() } } }, - + highlighted = { enabled = true, - + position = { x = 615, y = 25, -- y = 44, anchor = "Top-Right" }, - + auto_highlight = { enabled = false, mode = "Closest" }, - + monster_name_label = { visibility = true, text = "%s", - + include = { monster_name = true, monster_id = false, @@ -3052,13 +3064,13 @@ function config.init() size = true, crown_thresholds = false }, - + offset = { x = 5, y = 0 }, color = 0xFFCCF4E1, - + shadow = { visibility = true, offset = { @@ -3068,15 +3080,15 @@ function config.init() color = 0xFF000000 } }, - + health = { visibility = true, - + offset = { x = 0, y = 17 }, - + text_label = { visibility = false, text = "%s", @@ -3085,7 +3097,7 @@ function config.init() y = 2 }, color = 0xFFCCF4E1, - + shadow = { visibility = true, offset = { @@ -3095,7 +3107,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = true, text = "%.0f/%.0f", -- current_health/max_health @@ -3104,7 +3116,7 @@ function config.init() y = 2 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -3114,17 +3126,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = true, text = "%5.1f%%", - + offset = { x = 150, y = 2 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -3134,63 +3146,63 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 0 }, - + size = { width = 200, height = 20 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + normal_colors = { foreground = 0xB974A653, background = 0xB9000000, outline = 0xC0000000 }, - + capture_colors = { foreground = 0xB9CCCC33, background = 0x88000000, outline = 0xC0000000 }, - + capture_line = { visibility = true, offset = { x = 0, y = -3 }, - + size = { width = 2, height = 8 }, - + color = 0xB9000000 } } }, - + stamina = { visibility = true, - + offset = { x = 10, y = 37 }, - + text_label = { visibility = true, text = "%s", @@ -3199,7 +3211,7 @@ function config.init() y = 0 }, color = 0xFFA3F5F0, - + shadow = { visibility = true, offset = { @@ -3209,7 +3221,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = true, text = "%.0f/%.0f", -- current_health/max_health @@ -3218,7 +3230,7 @@ function config.init() y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -3228,17 +3240,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = true, text = "%5.1f%%", - + offset = { x = 135, y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -3248,17 +3260,17 @@ function config.init() color = 0xFF000000 } }, - + timer_label = { visibility = true, text = "%2.0f:%02.0f", - + offset = { x = 140, y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -3268,26 +3280,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 10 - 10, y = 17 }, - + size = { width = 185, height = 7 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xB966CCC5, background = 0x88000000, @@ -3295,15 +3307,15 @@ function config.init() } } }, - + rage = { visibility = true, - + offset = { x = 10, y = 61 }, - + text_label = { visibility = true, text = "%s", @@ -3312,7 +3324,7 @@ function config.init() y = 0 }, color = 0xFFFF9393, - + shadow = { visibility = true, offset = { @@ -3322,7 +3334,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = true, text = "%.0f/%.0f", -- current_health/max_health @@ -3331,7 +3343,7 @@ function config.init() y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -3341,17 +3353,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = true, text = "%5.1f%%", - + offset = { x = 135, y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -3361,17 +3373,17 @@ function config.init() color = 0xFF000000 } }, - + timer_label = { visibility = true, text = "%2.0f:%02.0f", - + offset = { x = 140, y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -3381,26 +3393,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 17 }, - + size = { width = 185, height = 7 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xB9CC6666, background = 0x88000000, @@ -3408,30 +3420,30 @@ function config.init() } } }, - + body_parts = { visibility = true, - + offset = { x = 10, y = 111 }, - + spacing = { x = 0, y = 33 }, - + settings = { hide_undamaged_parts = true, time_limit = 15 }, - + sorting = { type = "Normal", reversed_order = false }, - + filter = { health_break_severe = true, health_break = true, @@ -3441,24 +3453,24 @@ function config.init() break_ = true, severe = true }, - + part_name_label = { visibility = true, text = "%s", - + include = { part_name = true, flinch_count = false, break_count = true, break_max_count = true }, - + offset = { x = 5, y = 0 }, color = 0xFFf9d9ff, - + shadow = { visibility = true, offset = { @@ -3468,15 +3480,15 @@ function config.init() color = 0xFF000000 } }, - + part_health = { visibility = true, - + offset = { x = 0, y = 9 }, - + text_label = { visibility = false, text = language.current_language.UI.HP, @@ -3485,7 +3497,7 @@ function config.init() y = -5 }, color = 0xFFF4A3CC, - + shadow = { visibility = true, offset = { @@ -3495,7 +3507,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = true, text = "%11s", -- current_health/max_health @@ -3504,7 +3516,7 @@ function config.init() y = -5 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -3514,17 +3526,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = false, text = "%5.1f%%", - + offset = { x = 190, y = -5 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -3534,26 +3546,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 6 }, - + size = { width = 185, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xB9CA85CC, background = 0x88000000, @@ -3561,15 +3573,15 @@ function config.init() } } }, - + part_break = { visibility = true, - + offset = { x = 0, y = 15 }, - + text_label = { visibility = false, text = language.current_language.UI.part_break, @@ -3578,7 +3590,7 @@ function config.init() y = 6 }, color = 0xFFb2d0ff, - + shadow = { visibility = true, offset = { @@ -3588,17 +3600,17 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = true, text = "%-9s", offset = { x = 5, y = 6 - + }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -3608,17 +3620,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = false, text = "%5.1f%%", - + offset = { x = 5, y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -3628,26 +3640,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 7 }, - + size = { width = 92, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xB999BFFF, background = 0x88000000, @@ -3655,15 +3667,15 @@ function config.init() } } }, - + part_loss = { visibility = true, - + offset = { x = 94, y = 15 }, - + text_label = { visibility = false, text = language.current_language.UI.part_sever, @@ -3672,7 +3684,7 @@ function config.init() y = 5 }, color = 0xFFff8095, - + shadow = { visibility = true, offset = { @@ -3682,7 +3694,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = true, text = "%11s", @@ -3691,7 +3703,7 @@ function config.init() y = 6 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -3701,17 +3713,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = false, text = "%5.1f%%", - + offset = { x = 41, y = 17 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -3721,26 +3733,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 7 }, - + size = { width = 91, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xB9E57386, background = 0x88000000, @@ -3748,27 +3760,27 @@ function config.init() } } } - + }, - + ailments = { visibility = true, - + offset = { x = 10, y = 111 }, - + relative_offset = { x = 0, y = 45 }, - + spacing = { x = 0, y = 24 }, - + settings = { hide_ailments_with_zero_buildup = true, hide_inactive_ailments_with_no_buildup_support = true, @@ -3778,12 +3790,12 @@ function config.init() offset_is_relative_to_parts = true, time_limit = 15 }, - + sorting = { type = "Normal", reversed_order = false }, - + filter = { paralysis = true, sleep = true, @@ -3797,7 +3809,7 @@ function config.init() fireblight = true, iceblight = true, thunderblight = true, - + fall_trap = true, shock_trap = true, tranq_bomb = true, @@ -3807,22 +3819,22 @@ function config.init() fall_otomo_trap = true, shock_otomo_trap = true }, - + ailment_name_label = { visibility = true, text = "%s", - + include = { ailment_name = true, activation_count = true }, - + offset = { x = 5, y = 0 }, color = 0xFFffb2e2, - + shadow = { visibility = true, offset = { @@ -3832,7 +3844,7 @@ function config.init() color = 0xFF000000 } }, - + text_label = { visibility = false, text = language.current_language.UI.buildup, @@ -3841,7 +3853,7 @@ function config.init() y = 7 }, color = 0xFFffb2e2, - + shadow = { visibility = true, offset = { @@ -3851,7 +3863,7 @@ function config.init() color = 0xFF000000 } }, - + value_label = { visibility = true, text = "%.0f/%.0f", -- current_buildup/max_buildup @@ -3860,7 +3872,7 @@ function config.init() y = 13 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -3870,17 +3882,17 @@ function config.init() color = 0xFF000000 } }, - + percentage_label = { visibility = true, text = "%5.1f%%", - + offset = { x = 135, y = 13 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -3890,17 +3902,17 @@ function config.init() color = 0xFF000000 } }, - + timer_label = { visibility = true, text = "%2.0f:%02.0f", - + offset = { x = 140, y = 13 }, color = 0xFFFFFFFF, - + shadow = { visibility = true, offset = { @@ -3910,26 +3922,26 @@ function config.init() color = 0xFF000000 } }, - + bar = { visibility = true, offset = { x = 0, y = 14 }, - + size = { width = 185, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xA7FF80CE, background = 0xA7000000, @@ -3937,57 +3949,57 @@ function config.init() } } }, - + ailment_buildups = { visibility = false, - + offset = { x = 220, y = 167 }, - + player_spacing = { x = 0, y = 24 }, - + ailment_spacing = { x = 0, y = 17 }, - + settings = { buildup_bar_relative_to = "Top Buildup", highlighted_bar = "Me", time_limit = 15 }, - + filter = { stun = true, poison = true, blast = true }, - + sorting = { type = "Buildup", reversed_order = false }, - + ailment_name_label = { visibility = true, - + include = { ailment_name = true, activation_count = true }, - + text = "%s", offset = { x = 5, y = -17 }, color = 0xFF7cdbff, - + shadow = { visibility = true, offset = { @@ -3997,17 +4009,17 @@ function config.init() color = 0xFF000000 } }, - + player_name_label = { visibility = true, - + text = "%s", offset = { x = 5, y = 0 }, color = 0xFFb5dded, - + shadow = { visibility = true, offset = { @@ -4017,7 +4029,7 @@ function config.init() color = 0xFF000000 } }, - + buildup_value_label = { visibility = true, text = "%.0f", @@ -4026,7 +4038,7 @@ function config.init() y = 0 }, color = 0xFFb5dded, - + shadow = { visibility = true, offset = { @@ -4036,7 +4048,7 @@ function config.init() color = 0xFF000000 } }, - + buildup_percentage_label = { visibility = true, text = "%5.1f%%", @@ -4045,7 +4057,7 @@ function config.init() y = 0 }, color = 0xFFb5dded, - + shadow = { visibility = true, offset = { @@ -4055,7 +4067,7 @@ function config.init() color = 0xFF000000 } }, - + total_buildup_label = { visibility = true, text = "%s", @@ -4064,7 +4076,7 @@ function config.init() y = 0 }, color = 0xFFFF9393, - + shadow = { visibility = true, offset = { @@ -4074,7 +4086,7 @@ function config.init() color = 0xFF000000 } }, - + total_buildup_value_label = { visibility = true, text = "%.0f", @@ -4083,7 +4095,7 @@ function config.init() y = 0 }, color = 0xFFFF9393, - + shadow = { visibility = true, offset = { @@ -4093,52 +4105,52 @@ function config.init() color = 0xFF000000 } }, - + buildup_bar = { visibility = true, offset = { x = 0, y = 17 }, - + size = { width = 200, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xA796CFE5, background = 0xA7000000, outline = 0xC0000000 } }, - + highlighted_buildup_bar = { visibility = true, offset = { x = 0, y = 17 }, - + size = { width = 200, height = 5 }, - + outline = { visibility = true, thickness = 1, offset = 0, style = "Center" }, - + colors = { foreground = 0xA7F4D5A3, background = 0xA7000000, @@ -4148,16 +4160,16 @@ function config.init() } } }, - + time_UI = { enabled = true, - + position = { x = 65, y = 189, anchor = "Top-Left" }, - + time_label = { visibility = true, text = "%02d:%06.3f", @@ -4166,7 +4178,7 @@ function config.init() y = 0 }, color = 0xFFCCF4E1, - + shadow = { visibility = true, offset = { @@ -4177,15 +4189,15 @@ function config.init() } } }, - + damage_meter_UI = { enabled = true, - + tracked_monster_types = { small_monsters = true, large_monsters = true }, - + tracked_damage_types = { player_damage = true, bomb_damage = true, @@ -4198,54 +4210,54 @@ function config.init() endemic_life_damage = true, other_damage = true -- note that installations during narwa fight are counted as other damage }, - + spacing = { x = 300, y = -24 }, - + settings = { - + hide_myself = false, hide_other_players = false, hide_servants = false, hide_total_damage = false, - + hide_module_if_total_damage_is_zero = false, hide_player_if_player_damage_is_zero = false, hide_total_if_total_damage_is_zero = false, total_damage_offset_is_relative = true, - + freeze_dps_on_quest_end = true, show_my_otomos_separately = true, show_other_player_otomos_separately = true, show_servant_otomos_separately = true, - - + + orientation = "Vertical", -- "Vertical" or "Horizontal" highlighted_bar = "None", damage_bar_relative_to = "Top Damage", -- "total damage" or "top damage" my_damage_bar_location = "Last", -- "normal" or "first" or "last" total_damage_location = "First", dps_mode = "First Hit", - + player_name_size_limit = 150 }, - + sorting = { type = "Damage", -- "normal" or "damage" or "dps" reversed_order = true }, - + position = { x = 525, y = 120, -- Possible values: "Top-Left", "Top-Right", "Bottom-Left", "Bottom-Right" anchor = "Bottom-Left" }, - + myself = { name_label = { visibility = true, @@ -4378,7 +4390,7 @@ function config.init() color = 0xFF000000 } }, - + damage_bar = { visibility = true, offset = { @@ -4405,7 +4417,7 @@ function config.init() } } }, - + other_players = { name_label = { visibility = true, @@ -4538,7 +4550,7 @@ function config.init() color = 0xFF000000 } }, - + damage_bar = { visibility = true, offset = { @@ -4565,7 +4577,7 @@ function config.init() } } }, - + servants = { name_label = { visibility = true, @@ -4650,7 +4662,7 @@ function config.init() color = 0xFF000000 } }, - + damage_bar = { visibility = true, offset = { @@ -4677,7 +4689,7 @@ function config.init() } } }, - + my_otomos = { name_label = { visibility = true, @@ -4783,7 +4795,7 @@ function config.init() color = 0xFF000000 } }, - + damage_bar = { visibility = true, offset = { @@ -4810,7 +4822,7 @@ function config.init() } } }, - + other_player_otomos = { name_label = { visibility = true, @@ -4916,7 +4928,7 @@ function config.init() color = 0xFF000000 } }, - + damage_bar = { visibility = true, offset = { @@ -4943,7 +4955,7 @@ function config.init() } } }, - + servant_otomos = { name_label = { visibility = true, @@ -5049,7 +5061,7 @@ function config.init() color = 0xFF000000 } }, - + damage_bar = { visibility = true, offset = { @@ -5076,7 +5088,7 @@ function config.init() } } }, - + total = { name_label = { visibility = true, @@ -5157,7 +5169,7 @@ function config.init() } }, }, - + highlighted = { name_label = { visibility = true, @@ -5276,7 +5288,7 @@ function config.init() color = 0xFF000000 } }, - + damage_bar = { visibility = true, offset = { @@ -5304,37 +5316,37 @@ function config.init() } } }, - + endemic_life_UI = { enabled = false, - + settings = { hide_inactive_creatures = true, max_distance = 300, opacity_falloff = true }, - + world_offset = { x = 0, y = 1, z = 0 }, - + viewport_offset = { x = 0, y = 0 }, - + creature_name_label = { visibility = true, text = "%s", - + offset = { x = 0, y = 0 }, color = 0xFFf4f3ab, - + shadow = { visibility = true, offset = { @@ -5348,38 +5360,163 @@ function config.init() }; end -function config.load() - local loaded_config = json.load_file(config.config_file_name); +function config.load_current_config_value() + local loaded_config = json.load_file(config.current_config_value_file_name); if loaded_config ~= nil then - log.info("[MHR Overlay] config.json loaded successfully"); - config.current_config = table_helpers.merge(config.default_config, loaded_config); + if loaded_config.config == nil then + log.info("[MHR Overlay] old config.json loaded successfully"); + + local config_save = { + config = config.current_config_name + }; + + config.current_config_name = "old_config"; + config.current_config = table_helpers.merge(config.default_config, loaded_config); + config.current_config.version = config.version; + + config.save(config.config_folder .. "old_config.json", config.current_config); + config.save_current_config_name(); + + table.insert(config.config_names, "old_config"); + table.insert(config.configs, config.current_config); + + is_old_config_transferred = true; + else + log.info("[MHR Overlay] config.json loaded successfully"); + config.current_config_name = loaded_config.config; + end else log.error("[MHR Overlay] Failed to load config.json"); - config.current_config = table_helpers.deep_copy(config.default_config); end end -function config.save() - -- save current config to disk, replacing any existing file - local success = json.dump_file(config.config_file_name, config.current_config); - if success then - log.info("[MHR Overlay] config.json saved successfully"); - else - log.error("[MHR Overlay] Failed to save config.json"); +function config.load_configs() + local config_files = fs.glob([[MHR Overlay\\configs\\.*json]]); + + if config_files == nil then + return; end + + for i, config_file_name in ipairs(config_files) do + + local config_name = config_file_name:gsub(config.config_folder, ""):gsub(".json",""); + + if config_name == "old_config" and is_old_config_transferred then + goto continue; + end + + local loaded_config = json.load_file(config_file_name); + if loaded_config ~= nil then + log.info("[MHR Overlay] " .. config_name .. ".json loaded successfully"); + + + local merged_config = table_helpers.merge(config.default_config, loaded_config); + merged_config.version = config.version; + + table.insert(config.config_names, config_name); + table.insert(config.configs, merged_config); + + config.save(config_file_name, merged_config); + + if config_name == config.current_config_name then + config.current_config = merged_config; + end + else + log.error("[MHR Overlay] Failed to load " .. config_name .. ".json"); + end + + ::continue:: + end + + if config.current_config == nil then + if #config.configs > 0 then + config.current_config_name = config.config_names[1]; + config.current_config = config.configs[1]; + else + config.current_config_name = "default"; + config.current_config = table_helpers.deep_copy(config.default_config); + + table.insert(config.config_names, config.current_config_name); + table.insert(config.configs, config.current_config); + + config.save(config.current_config_name, config.current_config); + end + + config.save_current_config_name(); + end +end + +function config.save_current_config_name() + config.save(config.current_config_value_file_name, { config = config.current_config_name }); +end + +function config.save(file_name, config_table) + -- save current config to disk, replacing any existing file + local success = json.dump_file(file_name, config_table); + if success then + log.info("[MHR Overlay] " .. file_name .. " saved successfully"); + else + log.error("[MHR Overlay] Failed to save " .. file_name); + end +end + +function config.save_current() + config.save(config.config_folder .. config.current_config_name .. ".json", config.current_config); +end + +function config.create_new(config_file_name, config_table) + table.insert(config.config_names, config_file_name); + table.insert(config.configs, config_table); + + config.save(config.config_folder .. config_file_name .. ".json", config_table); + + config.current_config_name = config_file_name; + config.current_config = config_table; + + config.save_current_config_name(); +end + +function config.new(config_name) + if config_name == "" then + return; + end + + local new_config = table_helpers.deep_copy(config.default_config); + + config.create_new(config_name, new_config); +end + +function config.duplicate(config_name) + if config_name == "" then + return; + end + + local new_config = table_helpers.deep_copy(config.current_config); + + config.create_new(config_name, new_config); +end + +function config.reset() + config.current_config = table_helpers.deep_copy(config.default_config); + + local index = table_helpers.find_index(config.config_names, config.current_config_name); + config.configs[index] = config.current_config; +end + +function config.update(index) + config.current_config = config.configs[index]; + config.save_current_config_name(); end function config.init_module() table_helpers = require("MHR_Overlay.Misc.table_helpers"); language = require("MHR_Overlay.Misc.language"); - config.init(); - config.load(); - config.current_config.version = "2.3.2"; - - language.update( - table_helpers.find_index(language.language_names, config.current_config.global_settings.language, false)); + config.init_default(); + config.load_current_config_value(); + config.load_configs(); + language.update(table_helpers.find_index(language.language_names, config.current_config.global_settings.language, false)); end return config; \ No newline at end of file diff --git a/reframework/autorun/MHR_Overlay/Misc/language.lua b/reframework/autorun/MHR_Overlay/Misc/language.lua index 9483092..8823ab8 100644 --- a/reframework/autorun/MHR_Overlay/Misc/language.lua +++ b/reframework/autorun/MHR_Overlay/Misc/language.lua @@ -3,6 +3,9 @@ local table_helpers; language.language_folder = "MHR Overlay\\languages\\"; +language.current_language = {}; + + language.default_language = { font_name = "NotoSansKR-Bold.otf", parts = { @@ -445,13 +448,18 @@ language.default_language = { myself = "Myself", total = "Total", - level_label = "Level Label" + level_label = "Level Label", + + config = "Config", + rename = "Rename", + duplicate = "Duplicate", + delete = "Delete", + new = "New", + reset = "Reset" } }; -language.current_language = {}; - -language.language_names = { "default" }; +language.language_names = { "default"}; language.languages = { language.default_language }; function language.load() @@ -466,7 +474,8 @@ function language.load() local loaded_language = json.load_file(language_file_name); if loaded_language ~= nil then - log.info("[MHR Overlay] " .. language_name .. ".json loaded successfully"); + + log.info("[MHR Overlay] " .. language_file_name .. ".json loaded successfully"); table.insert(language.language_names, language_name); local merged_language = table_helpers.merge(language.default_language, loaded_language); @@ -474,8 +483,9 @@ function language.load() language.save(language_file_name, merged_language); + 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 @@ -483,25 +493,26 @@ end function language.save(file_name, language_table) local success = json.dump_file(file_name, language_table); if success then - log.info("[MHR Overlay] en-us.json saved successfully"); + log.info("[MHR Overlay] " .. file_name .. " saved successfully"); else - log.error("[MHR Overlay] Failed to save en-us.json"); + log.error("[MHR Overlay] Failed to save " .. file_name); end end function language.save_default() - language.save(language.language_folder .. "en-us.json", language.default_language) + language.save(language.language_folder .. "en-us.json", language.default_language); end function language.update(index) - language.current_language = table_helpers.deep_copy(language.languages[index]); + language.current_language = language.languages[index]; end function language.init_module() table_helpers = require("MHR_Overlay.Misc.table_helpers"); + language.save_default(); language.load(); - language.current_language = table_helpers.deep_copy(language.default_language); + language.current_language = language.default_language; end return language; diff --git a/reframework/autorun/MHR_Overlay/Monsters/ailment_buildup.lua b/reframework/autorun/MHR_Overlay/Monsters/ailment_buildup.lua index d1fa3a0..cd43842 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/ailment_buildup.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/ailment_buildup.lua @@ -13,22 +13,24 @@ local drawing; function ailment_buildup.draw(monster, ailment_buildup_UI, cached_config, ailment_buildups_position_on_screen, opacity_scale) 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; if not cached_config.visibility then return; end + for id, ailment in pairs(monster.ailments) do if id == ailments.stun_id then - if not cached_config.filter.stun then + --if not cached_config.filter.stun then goto continue - end + --end elseif id == ailments.poison_id then - if not cached_config.filter.poison then + --if not cached_config.filter.poison then goto continue - end + --end elseif id == ailments.blast_id then if not cached_config.filter.blast then goto continue @@ -42,24 +44,81 @@ function ailment_buildup.draw(monster, ailment_buildup_UI, cached_config, ailmen goto continue end + local total_buildup = 0; local top_buildup = 0; 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; if player_buildup > top_buildup then top_buildup = player_buildup; end - table.insert(displayed_players, - { - ["buildup"] = player_buildup, - ["buildup_share"] = ailment.buildup_share[player_id], - ["id"] = player_id - } - ); + displayed_players[player] = { + ["buildup"] = player_buildup, + ["buildup_share"] = ailment.buildup_share[player], + ["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 if total_buildup == 0 then @@ -98,6 +157,7 @@ function ailment_buildup.draw(monster, ailment_buildup_UI, cached_config, ailmen end end + local ailment_name = ""; if cached_config.ailment_name_label.include.ailment_name then ailment_name = ailment.name .. " "; @@ -108,20 +168,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); - local last_j = 0; - for j, player in ipairs(displayed_players) do + local j = 0; + for player, displayed_player in pairs(displayed_players) do local ailment_buildup_position_on_screen = { - x = ailment_buildups_position_on_screen.x + cached_config.player_spacing.x * (j - 1) * global_scale_modifier, - y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * (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 * global_scale_modifier; }; - ailment_buildup_UI_entity.draw(player, ailment_buildup_UI, cached_config, ailment_buildup_position_on_screen, opacity_scale, top_buildup); - last_j = j; + ailment_buildup_UI_entity.draw(player, displayed_player, ailment_buildup_UI, cached_config, ailment_buildup_position_on_screen, opacity_scale, top_buildup); + j = j + 1; end local total_buildup_position_on_screen = { - x = ailment_buildups_position_on_screen.x + cached_config.player_spacing.x * last_j * global_scale_modifier, - y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * 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 * 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); @@ -132,6 +192,7 @@ 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 }; + ::continue:: end diff --git a/reframework/autorun/MHR_Overlay/Monsters/ailment_hook.lua b/reframework/autorun/MHR_Overlay/Monsters/ailment_hook.lua index a198aab..3b392a8 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/ailment_hook.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/ailment_hook.lua @@ -50,8 +50,8 @@ function ailment_hook.poison_proc(poison_param) monster = small_monster.get_monster(enemy); end - monster.ailments[ailments.poison_id].cached_buildup_share = table_helpers.deep_copy(monster.ailments[ailments - .poison_id].buildup_share); + monster.ailments[ailments.poison_id].cached_buildup_share = table_helpers.deep_copy(monster.ailments[ailments.poison_id].buildup_share); + monster.ailments[ailments.poison_id].cached_otomo_buildup_share = table_helpers.deep_copy(monster.ailments[ailments.poison_id].otomo_buildup_share); ailments.clear_ailment_contribution(monster, ailments.poison_id); end diff --git a/reframework/autorun/MHR_Overlay/Monsters/ailments.lua b/reframework/autorun/MHR_Overlay/Monsters/ailments.lua index 1ebcd65..1dc3651 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/ailments.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/ailments.lua @@ -8,6 +8,7 @@ local time; local small_monster; local large_monster; local table_helpers; +local non_players; --0 Paralyze --1 Sleep @@ -50,68 +51,71 @@ ailments.fall_otomo_trap_id = 18; ailments.shock_otomo_trap_id = 19; function ailments.new(_ailments, ailment_id) - _ailments[ailment_id] = {}; + local new_ailment = {} + new_ailment = {}; - _ailments[ailment_id].is_enable = true; - _ailments[ailment_id].id = ailment_id; + new_ailment.is_enable = true; + new_ailment.id = ailment_id; - _ailments[ailment_id].total_buildup = 0; - _ailments[ailment_id].buildup_limit = 0; - _ailments[ailment_id].buildup_percentage = 0; + new_ailment.total_buildup = 0; + new_ailment.buildup_limit = 0; + new_ailment.buildup_percentage = 0; - _ailments[ailment_id].timer = 0; - _ailments[ailment_id].duration = 100000; - _ailments[ailment_id].timer_percentage = 0; + new_ailment.timer = 0; + new_ailment.duration = 100000; + new_ailment.timer_percentage = 0; - _ailments[ailment_id].minutes_left = 0; - _ailments[ailment_id].seconds_left = 0; + new_ailment.minutes_left = 0; + new_ailment.seconds_left = 0; - _ailments[ailment_id].is_active = false; - _ailments[ailment_id].activate_count = 0; + new_ailment.is_active = false; + 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 - _ailments[ailment_id].name = language.current_language.ailments.paralysis; + new_ailment.name = language.current_language.ailments.paralysis; elseif ailment_id == ailments.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 - _ailments[ailment_id].name = language.current_language.ailments.stun; + new_ailment.name = language.current_language.ailments.stun; elseif ailment_id == ailments.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 - _ailments[ailment_id].name = language.current_language.ailments.poison; + new_ailment.name = language.current_language.ailments.poison; elseif ailment_id == ailments.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 - _ailments[ailment_id].name = language.current_language.ailments.exhaust; + new_ailment.name = language.current_language.ailments.exhaust; elseif ailment_id == ailments.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 - _ailments[ailment_id].name = language.current_language.ailments.waterblight; + new_ailment.name = language.current_language.ailments.waterblight; elseif ailment_id == ailments.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 - _ailments[ailment_id].name = language.current_language.ailments.iceblight; + new_ailment.name = language.current_language.ailments.iceblight; elseif ailment_id == ailments.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 - _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 - _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 - _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 - _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 - _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 - _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 - _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 - _ailments[ailment_id].name = language.current_language.ailments.shock_otomo_trap; + new_ailment.name = language.current_language.ailments.shock_otomo_trap; end + + _ailments[ailment_id] = new_ailment; end function ailments.init_ailments() @@ -149,9 +153,65 @@ function ailments.init_ailments() _ailments[ailments.stun_id].buildup = {}; _ailments[ailments.stun_id].buildup_share = {}; + _ailments[ailments.poison_id].otomo_buildup = {}; + _ailments[ailments.poison_id].otomo_buildup_share = {}; + _ailments[ailments.poison_id].cached_otomo_buildup_share = {}; + + _ailments[ailments.blast_id].otomo_buildup = {}; + _ailments[ailments.blast_id].otomo_buildup_share = {}; + + _ailments[ailments.stun_id].otomo_buildup = {}; + _ailments[ailments.stun_id].otomo_buildup_share = {}; + return _ailments; end +function ailments.init_ailment_names(_ailments) + for ailment_id, ailment in pairs(_ailments) do + if ailment_id == ailments.paralyze_id then + ailment.name = language.current_language.ailments.paralysis; + elseif ailment_id == ailments.sleep_id then + ailment.name = language.current_language.ailments.sleep; + elseif ailment_id == ailments.stun_id then + ailment.name = language.current_language.ailments.stun; + elseif ailment_id == ailments.flash_id then + ailment.name = language.current_language.ailments.flash; + elseif ailment_id == ailments.poison_id then + ailment.name = language.current_language.ailments.poison; + elseif ailment_id == ailments.blast_id then + ailment.name = language.current_language.ailments.blast; + elseif ailment_id == ailments.exhaust_id then + ailment.name = language.current_language.ailments.exhaust; + elseif ailment_id == ailments.ride_id then + ailment.name = language.current_language.ailments.ride; + elseif ailment_id == ailments.water_id then + ailment.name = language.current_language.ailments.waterblight; + elseif ailment_id == ailments.fire_id then + ailment.name = language.current_language.ailments.fireblight; + elseif ailment_id == ailments.ice_id then + ailment.name = language.current_language.ailments.iceblight; + elseif ailment_id == ailments.thunder_id then + ailment.name = language.current_language.ailments.thunderblight; + elseif ailment_id == ailments.fall_trap_id then + ailment.name = language.current_language.ailments.fall_trap; + elseif ailment_id == ailments.shock_trap_id then + ailment.name = language.current_language.ailments.shock_trap; + elseif ailment_id == ailments.capture_id then + ailment.name = language.current_language.ailments.tranq_bomb; + elseif ailment_id == ailments.koyashi_id then + ailment.name = language.current_language.ailments.dung_bomb; + elseif ailment_id == ailments.steel_fang_id then + ailment.name = language.current_language.ailments.steel_fang; + elseif ailment_id == ailments.fall_quick_sand_id then + ailment.name = language.current_language.ailments.quick_sand; + elseif ailment_id == ailments.fall_otomo_trap_id then + ailment.name = language.current_language.ailments.fall_otomo_trap; + elseif ailment_id == ailments.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_condition_damage_param_base_type_def = sdk.find_type_definition("snow.enemy.EnemyConditionDamageParamBase"); @@ -593,14 +653,11 @@ function ailments.draw(monster, ailment_UI, cached_config, ailments_position_on_ end -function ailments.apply_ailment_buildup(monster, attacker_id, ailment_type, ailment_buildup) +function ailments.apply_ailment_buildup(monster, player, otomo, ailment_type, ailment_buildup) if monster == nil or - (ailment_type ~= ailments.poison_id and ailment_type ~= ailments.blast_id and ailment_type ~= ailments.stun_id) then - return; - end - - if ailment_buildup == 0 or ailment_buildup == nil then + (ailment_type ~= ailments.poison_id and ailment_type ~= ailments.blast_id and ailment_type ~= ailments.stun_id) + or (ailment_buildup == 0 or ailment_buildup == nil) then return; end @@ -609,8 +666,17 @@ function ailments.apply_ailment_buildup(monster, attacker_id, ailment_type, ailm monster.ailments[ailment_type].buildup = {}; end - -- accumulate this buildup for this attacker - monster.ailments[ailment_type].buildup[attacker_id] = (monster.ailments[ailment_type].buildup[attacker_id] or 0) + ailment_buildup; + -- get the otomo buildup accumulator for this type + if monster.ailments[ailment_type].otomo_buildup == nil then + monster.ailments[ailment_type].otomo_buildup = {}; + end + + 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 + ailments.calculate_ailment_contribution(monster, ailment_type); end @@ -619,20 +685,34 @@ end function ailments.calculate_ailment_contribution(monster, ailment_type) -- get total 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; end - for attacker_id, player_buildup in pairs(monster.ailments[ailment_type].buildup) do - -- update ratio for this attacker - monster.ailments[ailment_type].buildup_share[attacker_id] = player_buildup / total; + for otomo, otomo_buildup in pairs(monster.ailments[ailment_type].otomo_buildup) do + total = total + otomo_buildup; + 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 function ailments.clear_ailment_contribution(monster, ailment_type) - for attacker_id, player_buildup in pairs(monster.ailments[ailment_type].buildup) do - monster.ailments[ailment_type].buildup_share[attacker_id] = 0; - monster.ailments[ailment_type].buildup[attacker_id] = 0; + for player, player_buildup in pairs(monster.ailments[ailment_type].buildup) do + monster.ailments[ailment_type].buildup_share[player] = 0; + monster.ailments[ailment_type].buildup[player] = 0; + end + + for aotomo, otomo_buildup in pairs(monster.ailments[ailment_type].otomo_buildup) do + monster.ailments[ailment_type].otomo_buildup_share[aotomo] = 0; + monster.ailments[ailment_type].otomo_buildup[aotomo] = 0; end end @@ -644,18 +724,25 @@ function ailments.apply_ailment_damage(monster, ailment_type, ailment_damage) end local damage_source_type = ""; + local otomo_damage_source_type = ""; local buildup_share = monster.ailments[ailment_type].buildup_share; + local otomo_buildup_share = monster.ailments[ailment_type].otomo_buildup_share; + if ailment_type == ailments.poison_id then damage_source_type = "poison"; + otomo_damage_source_type = "otomo poison"; buildup_share = monster.ailments[ailment_type].cached_buildup_share; + otomo_buildup_share = monster.ailments[ailment_type].cached_otomo_buildup_share; + elseif ailment_type == ailments.blast_id then damage_source_type = "blast"; + otomo_damage_source_type = "otomo blast"; else return; end -- 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_object = {}; @@ -664,11 +751,26 @@ function ailments.apply_ailment_damage(monster, ailment_type, ailment_damage) damage_object.elemental_damage = 0; damage_object.ailment_damage = damage_portion; - local attacking_player = players.get_player(attacker_id); + players.update_damage(player, damage_source_type, true, damage_object); + end - if attacking_player ~= nil then - players.update_damage(attacking_player, damage_source_type, true, damage_object); + -- split up damage according to ratio of buildup on boss for this type + 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, true, damage_object); end + + players.update_damage(otomo, otomo_damage_source_type, true, damage_object); end local damage_object = {}; @@ -682,6 +784,7 @@ end function ailments.init_module() players = require("MHR_Overlay.Damage_Meter.players"); + non_players = require("MHR_Overlay.Damage_Meter.non_players"); language = require("MHR_Overlay.Misc.language"); config = require("MHR_Overlay.Misc.config"); ailment_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_UI_entity"); diff --git a/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua b/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua index 81ba8dd..3301519 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua @@ -303,6 +303,8 @@ function large_monster.init_UI(monster, monster_UI, cached_config) cached_config.ailment_buildups.total_buildup_label, cached_config.ailment_buildups.total_buildup_value_label ); + + ailments.init_ailment_names(monster.ailments); end local physical_param_field = enemy_character_base_type_def:get_field("k__BackingField"); diff --git a/reframework/autorun/MHR_Overlay/UI/Customizations/ailment_buildups_customization.lua b/reframework/autorun/MHR_Overlay/UI/Customizations/ailment_buildups_customization.lua index 1b1d41d..fb951d0 100644 --- a/reframework/autorun/MHR_Overlay/UI/Customizations/ailment_buildups_customization.lua +++ b/reframework/autorun/MHR_Overlay/UI/Customizations/ailment_buildups_customization.lua @@ -18,6 +18,7 @@ local bar_customization; function ailment_buildups_customization.draw(cached_config) local changed = false; local config_changed = false; + local index = 1; if imgui.tree_node(language.current_language.customization_menu.ailment_buildups) then changed, cached_config.visibility = imgui.checkbox( @@ -137,90 +138,8 @@ function ailment_buildups_customization.draw(cached_config) imgui.tree_pop(); end - if imgui.tree_node(language.current_language.customization_menu.ailment_name_label) then - changed, cached_config.ailment_name_label.visibility = - 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.ailment_name_label, cached_config.ailment_name_label); + config_changed = config_changed or changed; changed = label_customization.draw(language.current_language.customization_menu.player_name_label, cached_config.player_name_label); config_changed = config_changed or changed; diff --git a/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_buildup_UI_entity.lua b/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_buildup_UI_entity.lua index e3f40b4..e531438 100644 --- a/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_buildup_UI_entity.lua +++ b/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_buildup_UI_entity.lua @@ -55,34 +55,33 @@ function ailment_buildup_UI_entity.new(buildup_bar, highlighted_buildup_bar, ail return entity; end -function ailment_buildup_UI_entity.draw(_player_buildup, ailment_buildup_UI, cached_config, position_on_screen, opacity_scale, top_buildup) +function ailment_buildup_UI_entity.draw(player, player_buildup, ailment_buildup_UI, cached_config, position_on_screen, opacity_scale, top_buildup) local player_buildup_bar_percentage = 0; 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 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 - 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); - 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); else drawing.draw_bar(ailment_buildup_UI.buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage); end - local player = players.get_player(_player_buildup.id); - local player_name = "Player " .. tostring(_player_buildup.id); + local player_name = tostring(player_buildup.id); if player ~= nil then player_name = player.name; end 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_percentage_label, position_on_screen, opacity_scale, 100 * _player_buildup.buildup_share); + 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); end function ailment_buildup_UI_entity.init_module() diff --git a/reframework/autorun/MHR_Overlay/UI/UI_Entities/damage_UI_entity.lua b/reframework/autorun/MHR_Overlay/UI/UI_Entities/damage_UI_entity.lua index 57b773b..6424ddc 100644 --- a/reframework/autorun/MHR_Overlay/UI/UI_Entities/damage_UI_entity.lua +++ b/reframework/autorun/MHR_Overlay/UI/UI_Entities/damage_UI_entity.lua @@ -10,8 +10,6 @@ local non_players; function damage_UI_entity.new(damage_meter_UI_elements, type) local entity = {}; - local cached_config = config.current_config.damage_meter_UI; - 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); diff --git a/reframework/autorun/MHR_Overlay/UI/customization_menu.lua b/reframework/autorun/MHR_Overlay/UI/customization_menu.lua index 3501119..cfe14e5 100644 --- a/reframework/autorun/MHR_Overlay/UI/customization_menu.lua +++ b/reframework/autorun/MHR_Overlay/UI/customization_menu.lua @@ -103,6 +103,8 @@ customization_menu.damage_meter_UI_waiting_for_key = false; customization_menu.endemic_life_UI_waiting_for_key = false; customization_menu.menu_font_changed = false; +customization_menu.config_name_input = ""; + function customization_menu.reload_font(pop_push) customization_menu.font = imgui.load_font(language.current_language.font_name, config.current_config.global_settings.menu_font.size, customization_menu.font_range); @@ -261,6 +263,8 @@ function customization_menu.draw() imgui.push_font(customization_menu.font); + local config_changed = false; + local language_changed = false; local modifiers_changed = false; local modules_changed = false; local global_settings_changed = false; @@ -277,8 +281,215 @@ function customization_menu.draw() imgui.text(language.current_language.customization_menu.status .. ": " .. status_string); + config_changed, apply_font_requested = customization_menu.draw_config(); modules_changed = customization_menu.draw_modules(); + customization_menu.draw_hotkeys(); + global_settings_changed, modifiers_changed, apply_font_requested, language_changed = customization_menu.draw_global_settings(apply_font_requested, config_changed); + small_monster_UI_changed = customization_menu.draw_small_monster_UI(); + if imgui.tree_node(language.current_language.customization_menu.large_monster_UI) then + large_monster_dynamic_UI_changed = customization_menu.draw_large_monster_dynamic_UI() + large_monster_static_UI_changed = customization_menu.draw_large_monster_static_UI() + large_monster_highlighted_UI_changed = customization_menu.draw_large_monster_highlighted_UI() + imgui.tree_pop(); + end + + time_UI_changed = customization_menu.draw_time_UI(); + damage_meter_UI_changed = customization_menu.draw_damage_meter_UI(); + endemic_life_UI_changed = customization_menu.draw_endemic_life_UI() + + imgui.pop_font(); + imgui.end_window(); + + if small_monster_UI_changed or modifiers_changed or config_changed then + for _, monster in pairs(small_monster.list) do + small_monster.init_UI(monster); + end + end + + if large_monster_dynamic_UI_changed or modifiers_changed or config_changed then + for _, monster in pairs(large_monster.list) do + large_monster.init_UI(monster, monster.dynamic_UI, config.current_config.large_monster_UI.dynamic); + end + end + + if large_monster_static_UI_changed or modifiers_changed or config_changed then + for _, monster in pairs(large_monster.list) do + large_monster.init_UI(monster, monster.static_UI, config.current_config.large_monster_UI.static); + end + end + + if large_monster_highlighted_UI_changed or modifiers_changed or config_changed then + for _, monster in pairs(large_monster.list) do + large_monster.init_UI(monster, monster.highlighted_UI, config.current_config.large_monster_UI.highlighted); + end + end + + if time_UI_changed or modifiers_changed or config_changed then + time_UI.init_UI(); + end + + if damage_meter_UI_changed or modifiers_changed or config_changed then + + for _, player in pairs(players.list) do + players.init_UI(player); + + end + + for _, servant in pairs(non_players.servant_list) do + non_players.init_UI(servant); + end + + for _, otomo in pairs(non_players.otomo_list) do + non_players.init_UI(otomo); + end + + + players.init_UI(players.total); + players.init_highlighted_UI(); + end + + if endemic_life_UI_changed or modifiers_changed or config_changed then + for _, creature in pairs(env_creature.list) do + env_creature.init_UI(creature); + end + end + + if customization_menu.menu_font_changed and apply_font_requested or config_changed then + customization_menu.menu_font_changed = false; + customization_menu.reload_font(false); + end + + if modules_changed or global_settings_changed or small_monster_UI_changed or large_monster_dynamic_UI_changed or + large_monster_static_UI_changed or large_monster_highlighted_UI_changed or time_UI_changed or damage_meter_UI_changed or + endemic_life_UI_changed or modifiers_changed or config_changed then + config.save_current(); + end +end + +function customization_menu.draw_config() + local index = 1; + local changed = false; + local config_changed = false; + local apply_font_requested = false; + + if imgui.tree_node(language.current_language.customization_menu.config) then + + changed, index = imgui.combo(language.current_language.customization_menu.config, + table_helpers.find_index(config.config_names, config.current_config_name), config.config_names); + config_changed = config_changed or changed; + + if changed then + config.current_config_name = config.config_names[index]; + config.update(index); + + language.update(table_helpers.find_index(language.language_names, config.current_config.global_settings.language, false)); + + customization_menu.init(); + + customization_menu.menu_font_changed = true; + apply_font_requested = true; + end + + changed, customization_menu.config_name_input = imgui.input_text(language.current_language.customization_menu.config_name, customization_menu.config_name_input); + + changed = imgui.button(language.current_language.customization_menu.new); + if changed then + if customization_menu.config_name_input ~= "" then + config.new(customization_menu.config_name_input); + config_changed = config_changed or changed; + + language.update(table_helpers.find_index(language.language_names, config.current_config.global_settings.language, false)); + + customization_menu.init(); + + customization_menu.menu_font_changed = true; + apply_font_requested = true; + end + + end + + imgui.same_line(); + + changed = imgui.button(language.current_language.customization_menu.duplicate); + if changed then + if customization_menu.config_name_input ~= "" then + config.duplicate(customization_menu.config_name_input); + config_changed = config_changed or changed; + + language.update(table_helpers.find_index(language.language_names, config.current_config.global_settings.language, false)); + + customization_menu.init(); + + customization_menu.menu_font_changed = true; + apply_font_requested = true; + end + + end + + imgui.same_line(); + + changed = imgui.button(language.current_language.customization_menu.reset); + config_changed = config_changed or changed; + if changed then + config.reset(); + + language.update(table_helpers.find_index(language.language_names, config.current_config.global_settings.language, false)); + + customization_menu.init(); + + customization_menu.menu_font_changed = true; + apply_font_requested = true; + end + + imgui.tree_pop(); + end + + return config_changed, apply_font_requested; +end + +function customization_menu.draw_modules() + local changed = false; + local config_changed = false; + + if imgui.tree_node(language.current_language.customization_menu.modules) then + changed, config.current_config.small_monster_UI.enabled = imgui.checkbox( + language.current_language.customization_menu.small_monster_UI, config.current_config.small_monster_UI.enabled); + config_changed = config_changed or changed; + + changed, config.current_config.large_monster_UI.dynamic.enabled = + imgui.checkbox(language.current_language.customization_menu.large_monster_dynamic_UI, + config.current_config.large_monster_UI.dynamic.enabled); + config_changed = config_changed or changed; + + changed, config.current_config.large_monster_UI.static.enabled = + imgui.checkbox(language.current_language.customization_menu.large_monster_static_UI, + config.current_config.large_monster_UI.static.enabled); + config_changed = config_changed or changed; + + changed, config.current_config.large_monster_UI.highlighted.enabled = + imgui.checkbox(language.current_language.customization_menu.large_monster_highlighted_UI, + config.current_config.large_monster_UI.highlighted.enabled); + config_changed = config_changed or changed; + + changed, config.current_config.time_UI.enabled = imgui.checkbox(language.current_language.customization_menu.time_UI, + config.current_config.time_UI.enabled); + config_changed = config_changed or changed; + + changed, config.current_config.damage_meter_UI.enabled = imgui.checkbox( + language.current_language.customization_menu.damage_meter_UI, config.current_config.damage_meter_UI.enabled); + config_changed = config_changed or changed; + + changed, config.current_config.endemic_life_UI.enabled = imgui.checkbox( + language.current_language.customization_menu.endemic_life_UI, config.current_config.endemic_life_UI.enabled); + config_changed = config_changed or changed; + imgui.tree_pop(); + end + + return config_changed; +end + +function customization_menu.draw_hotkeys() if imgui.tree_node(language.current_language.customization_menu.hotkeys) then if customization_menu.all_UI_waiting_for_key then if imgui.button(language.current_language.customization_menu.press_any_key) then @@ -509,140 +720,20 @@ function customization_menu.draw() imgui.text(keyboard.get_hotkey_name(config.current_config.global_settings.hotkeys_with_modifiers.endemic_life_UI)); imgui.tree_pop(); end - - global_settings_changed, modifiers_changed, apply_font_requested = customization_menu.draw_global_settings(); - small_monster_UI_changed = customization_menu.draw_small_monster_UI(); - - if imgui.tree_node(language.current_language.customization_menu.large_monster_UI) then - large_monster_dynamic_UI_changed = customization_menu.draw_large_monster_dynamic_UI() - large_monster_static_UI_changed = customization_menu.draw_large_monster_static_UI() - large_monster_highlighted_UI_changed = customization_menu.draw_large_monster_highlighted_UI() - imgui.tree_pop(); - end - - time_UI_changed = customization_menu.draw_time_UI(); - damage_meter_UI_changed = customization_menu.draw_damage_meter_UI(); - endemic_life_UI_changed = customization_menu.draw_endemic_life_UI() - - imgui.pop_font(); - imgui.end_window(); - - if small_monster_UI_changed or modifiers_changed then - for _, monster in pairs(small_monster.list) do - small_monster.init_UI(monster); - end - end - - if large_monster_dynamic_UI_changed or modifiers_changed then - for _, monster in pairs(large_monster.list) do - large_monster.init_UI(monster, monster.dynamic_UI, config.current_config.large_monster_UI.dynamic); - end - end - - if large_monster_static_UI_changed or modifiers_changed then - for _, monster in pairs(large_monster.list) do - large_monster.init_UI(monster, monster.static_UI, config.current_config.large_monster_UI.static); - end - end - - if large_monster_highlighted_UI_changed or modifiers_changed then - for _, monster in pairs(large_monster.list) do - large_monster.init_UI(monster, monster.highlighted_UI, config.current_config.large_monster_UI.highlighted); - end - end - - if time_UI_changed or modifiers_changed then - time_UI.init_UI(); - end - - if damage_meter_UI_changed or modifiers_changed then - for _, player in pairs(players.list) do - players.init_UI(player); - - end - - for _, servant in pairs(non_players.servant_list) do - non_players.init_UI(servant); - end - - for _, otomo in pairs(non_players.otomo_list) do - non_players.init_UI(otomo); - end - - players.init_UI(players.total); - players.init_highlighted_UI(); - end - - if endemic_life_UI_changed or modifiers_changed then - for _, creature in pairs(env_creature.list) do - env_creature.init_UI(creature); - end - end - - if customization_menu.menu_font_changed and apply_font_requested then - customization_menu.menu_font_changed = false; - customization_menu.reload_font(false); - end - - if modules_changed or global_settings_changed or small_monster_UI_changed or large_monster_dynamic_UI_changed or - large_monster_static_UI_changed or large_monster_highlighted_UI_changed or time_UI_changed or damage_meter_UI_changed or - endemic_life_UI_changed then - config.save(); - end end -function customization_menu.draw_modules() - local changed = false; - local config_changed = false; - - if imgui.tree_node(language.current_language.customization_menu.modules) then - changed, config.current_config.small_monster_UI.enabled = imgui.checkbox( - language.current_language.customization_menu.small_monster_UI, config.current_config.small_monster_UI.enabled); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.dynamic.enabled = - imgui.checkbox(language.current_language.customization_menu.large_monster_dynamic_UI, - config.current_config.large_monster_UI.dynamic.enabled); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.static.enabled = - imgui.checkbox(language.current_language.customization_menu.large_monster_static_UI, - config.current_config.large_monster_UI.static.enabled); - config_changed = config_changed or changed; - - changed, config.current_config.large_monster_UI.highlighted.enabled = - imgui.checkbox(language.current_language.customization_menu.large_monster_highlighted_UI, - config.current_config.large_monster_UI.highlighted.enabled); - config_changed = config_changed or changed; - - changed, config.current_config.time_UI.enabled = imgui.checkbox(language.current_language.customization_menu.time_UI, - config.current_config.time_UI.enabled); - config_changed = config_changed or changed; - - changed, config.current_config.damage_meter_UI.enabled = imgui.checkbox( - language.current_language.customization_menu.damage_meter_UI, config.current_config.damage_meter_UI.enabled); - config_changed = config_changed or changed; - - changed, config.current_config.endemic_life_UI.enabled = imgui.checkbox( - language.current_language.customization_menu.endemic_life_UI, config.current_config.endemic_life_UI.enabled); - config_changed = config_changed or changed; - imgui.tree_pop(); - end - - return config_changed; -end - -function customization_menu.draw_global_settings() +function customization_menu.draw_global_settings(apply_font_requested, language_changed) local changed = false; local config_changed = false; local modifiers_changed = false; - local apply_font_requested = false; local index = 1; if imgui.tree_node(language.current_language.customization_menu.global_settings) then local cached_config = config.current_config.global_settings; + imgui.text(language.current_language.customization_menu.menu_font_change_disclaimer); + changed, index = imgui.combo(language.current_language.customization_menu.language .. "*", table_helpers.find_index(language.language_names, cached_config.language), language.language_names); config_changed = config_changed or changed; @@ -652,28 +743,10 @@ function customization_menu.draw_global_settings() language.update(index); customization_menu.init(); - apply_font_requested = true; + language_changed = true; customization_menu.menu_font_changed = true; - - part_names.init(); - small_monster.init_list(); - large_monster.init_list(); - env_creature.init_list(); - - for _, player in pairs(players.list) do - players.init_UI(player); - end - - for _, servant in pairs(non_players.servant_list) do - non_players.init_UI(servant); - end - - for _, otomo in pairs(non_players.otomo_list) do - non_players.init_UI(otomo); - end - - players.init_UI(players.total); - players.init_highlighted_UI(); + modifiers_changed = true; + apply_font_requested = true; end if imgui.tree_node(language.current_language.customization_menu.menu_font) then @@ -906,7 +979,7 @@ function customization_menu.draw_global_settings() imgui.tree_pop(); end - return config_changed, modifiers_changed, apply_font_requested; + return config_changed, modifiers_changed, apply_font_requested, language_changed; end function customization_menu.draw_small_monster_UI()