4 Commits

Author SHA1 Message Date
GreenComfyTea
6c2d09b505 Add some dangos, skills and endemic life buffs 2023-08-08 16:23:17 +03:00
GreenComfyTea
26966818b3 Dont update buffs if buff UI is disabled 2023-08-08 13:05:05 +03:00
GreenComfyTea
e09c82278d Optimize small monster UI drawing function 2023-08-08 13:04:40 +03:00
GreenComfyTea
e1d3754733 Fix is_health_initialized variable not being set to true 2023-08-08 12:24:33 +03:00
29 changed files with 771 additions and 96 deletions

View File

@@ -45,6 +45,9 @@ local utils = require("MHR_Overlay.Misc.utils");
local buffs = require("MHR_Overlay.Buffs.buffs"); local buffs = require("MHR_Overlay.Buffs.buffs");
local consumables = require("MHR_Overlay.Buffs.consumables"); local consumables = require("MHR_Overlay.Buffs.consumables");
local melody_effects = require("MHR_Overlay.Buffs.melody_effects"); local melody_effects = require("MHR_Overlay.Buffs.melody_effects");
local endemic_life_buffs = require("MHR_Overlay.Buffs.endemic_life_buffs");
local skills = require("MHR_Overlay.Buffs.skills");
local dangos = require("MHR_Overlay.Buffs.dangos");
local players = require("MHR_Overlay.Damage_Meter.players"); local players = require("MHR_Overlay.Damage_Meter.players");
local non_players = require("MHR_Overlay.Damage_Meter.non_players"); local non_players = require("MHR_Overlay.Damage_Meter.non_players");
@@ -118,6 +121,9 @@ buff_UI_entity.init_dependencies();
buffs.init_dependencies(); buffs.init_dependencies();
consumables.init_dependencies(); consumables.init_dependencies();
melody_effects.init_dependencies(); melody_effects.init_dependencies();
endemic_life_buffs.init_dependencies();
skills.init_dependencies();
dangos.init_dependencies();
damage_hook.init_dependencies(); damage_hook.init_dependencies();
players.init_dependencies(); players.init_dependencies();
@@ -186,6 +192,9 @@ buff_UI_entity.init_module();
buffs.init_module(); buffs.init_module();
consumables.init_module(); consumables.init_module();
melody_effects.init_module(); melody_effects.init_module();
endemic_life_buffs.init_module();
skills.init_module();
dangos.init_module();
damage_hook.init_module(); damage_hook.init_module();
players.init_module(); players.init_module();
@@ -247,12 +256,9 @@ local function draw_modules(module_visibility_config, flow_state_name)
local large_monster_UI_config = config.current_config.large_monster_UI; local large_monster_UI_config = config.current_config.large_monster_UI;
local dynamic_enabled = large_monster_UI_config.dynamic.enabled and local dynamic_enabled = large_monster_UI_config.dynamic.enabled and module_visibility_config.large_monster_dynamic_UI;
module_visibility_config.large_monster_dynamic_UI; local static_enabled = large_monster_UI_config.static.enabled and module_visibility_config.large_monster_static_UI;
local static_enabled = large_monster_UI_config.static.enabled and local highlighted_enabled = large_monster_UI_config.highlighted.enabled and module_visibility_config.large_monster_highlighted_UI;
module_visibility_config.large_monster_static_UI;
local highlighted_enabled = large_monster_UI_config.highlighted.enabled and
module_visibility_config.large_monster_highlighted_UI;
if dynamic_enabled or static_enabled or highlighted_enabled then if dynamic_enabled or static_enabled or highlighted_enabled then
local success = pcall(large_monster_UI.draw, dynamic_enabled, static_enabled, highlighted_enabled); local success = pcall(large_monster_UI.draw, dynamic_enabled, static_enabled, highlighted_enabled);

View File

@@ -11,6 +11,9 @@ local language;
local time; local time;
local quest_status; local quest_status;
local error_handler; local error_handler;
local endemic_life_buffs;
local skills;
local dangos;
local sdk = sdk; local sdk = sdk;
local tostring = tostring; local tostring = tostring;
@@ -48,6 +51,7 @@ this.types = {
consumable = 0, consumable = 0,
melody_effect = 1, melody_effect = 1,
dango = 2, dango = 2,
skill = 4,
}; };
local player_manager_type_def = sdk.find_type_definition("snow.player.PlayerManager"); local player_manager_type_def = sdk.find_type_definition("snow.player.PlayerManager");
@@ -62,10 +66,10 @@ local system_array_type_def = sdk.find_type_definition("System.Array");
local length_method = system_array_type_def:get_method("get_Length"); local length_method = system_array_type_def:get_method("get_Length");
local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)"); local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)");
function this.new(type, key, name, value, duration) function this.new(type, key, name, level, duration)
local is_infinite = false; local is_infinite = false;
value = value or 0; level = level or 1;
if duration == nil then if duration == nil then
duration = 0; duration = 0;
@@ -77,7 +81,7 @@ function this.new(type, key, name, value, duration)
buff.type = type; buff.type = type;
buff.key = key; buff.key = key;
buff.name = name; buff.name = name;
buff.value = value; buff.level = level;
buff.timer = duration; buff.timer = duration;
buff.duration = duration; buff.duration = duration;
@@ -110,9 +114,16 @@ end
function this.init_names() function this.init_names()
consumables.init_names(); consumables.init_names();
melody_effects.init_names(); melody_effects.init_names();
endemic_life_buffs.init_names();
skills.init_names();
dangos.init_names();
end end
function this.update() function this.update()
if not config.current_config.buff_UI.enabled then
return;
end
if singletons.player_manager == nil then if singletons.player_manager == nil then
error_handler.report("buffs.update", "Failed to access Data: player_manager"); error_handler.report("buffs.update", "Failed to access Data: player_manager");
return; return;
@@ -133,10 +144,15 @@ function this.update()
local master_player_data = get_player_data_method:call(master_player); local master_player_data = get_player_data_method:call(master_player);
if master_player_data ~= nil then if master_player_data ~= nil then
consumables.update(master_player_data); consumables.update(master_player_data);
endemic_life_buffs.update(master_player_data);
skills.update(master_player_data);
dangos.update(master_player_data);
else else
error_handler.report("buffs.update", "Failed to access Data: master_player_data"); error_handler.report("buffs.update", "Failed to access Data: master_player_data");
end end
--xy = master_player_data._Attack;
local music_data_array = music_data_field:get_data(master_player); local music_data_array = music_data_field:get_data(master_player);
if music_data_array ~= nil then if music_data_array ~= nil then
local music_data_table = {}; local music_data_table = {};
@@ -190,6 +206,9 @@ function this.init_dependencies()
time = require("MHR_Overlay.Game_Handler.time"); time = require("MHR_Overlay.Game_Handler.time");
quest_status = require("MHR_Overlay.Game_Handler.quest_status"); quest_status = require("MHR_Overlay.Game_Handler.quest_status");
error_handler = require("MHR_Overlay.Misc.error_handler"); error_handler = require("MHR_Overlay.Misc.error_handler");
endemic_life_buffs = require("MHR_Overlay.Buffs.endemic_life_buffs");
skills = require("MHR_Overlay.Buffs.skills");
dangos = require("MHR_Overlay.Buffs.dangos");
end end
function this.init_module() function this.init_module()

View File

@@ -50,7 +50,8 @@ this.list = {
adamant_seed = nil, adamant_seed = nil,
hardshell_powder = nil, hardshell_powder = nil,
immunizer = nil, immunizer = nil,
dash_juice = nil dash_juice = nil,
gourmet_fish = nil,
}; };
local player_manager_type_def = sdk.find_type_definition("snow.player.PlayerManager"); local player_manager_type_def = sdk.find_type_definition("snow.player.PlayerManager");
@@ -92,6 +93,8 @@ local def_up_item_second_timer_field = player_data_type_def:get_field("_DefUpIte
local vitalizer_timer_field = player_data_type_def:get_field("_VitalizerTimer"); local vitalizer_timer_field = player_data_type_def:get_field("_VitalizerTimer");
-- Dash Juice -- Dash Juice
local stamina_up_buff_second_timer_field = player_data_type_def:get_field("_StaminaUpBuffSecondTimer"); local stamina_up_buff_second_timer_field = player_data_type_def:get_field("_StaminaUpBuffSecondTimer");
-- Gourmet Fish
local fish_regene_enable_field = player_data_type_def:get_field("_FishRegeneEnableTimer");
local system_array_type_def = sdk.find_type_definition("System.Array"); local system_array_type_def = sdk.find_type_definition("System.Array");
local length_method = system_array_type_def:get_method("get_Length"); local length_method = system_array_type_def:get_method("get_Length");
@@ -112,6 +115,7 @@ function this.update(player_data)
this.update_hardshell_powder(player_data, item_parameter); this.update_hardshell_powder(player_data, item_parameter);
this.update_immunizer(player_data, item_parameter); this.update_immunizer(player_data, item_parameter);
this.update_dash_juice(player_data, item_parameter); this.update_dash_juice(player_data, item_parameter);
this.update_gourmet_fish(player_data, item_parameter);
end end
function this.update_demondrug(player_data, item_parameter) function this.update_demondrug(player_data, item_parameter)
@@ -146,7 +150,7 @@ function this.update_demondrug(player_data, item_parameter)
local name = language.current_language.consumables.demondrug; local name = language.current_language.consumables.demondrug;
this.list.demondrug = buffs.new(buffs.types.consumable, "demondrug", name, demondrug_value); this.list.demondrug = buffs.new(buffs.types.consumable, "demondrug", name);
this.list.mega_demondrug = nil; this.list.mega_demondrug = nil;
elseif demondrug_value == mega_demondrug_const_value then elseif demondrug_value == mega_demondrug_const_value then
@@ -158,7 +162,7 @@ function this.update_demondrug(player_data, item_parameter)
local name = language.current_language.consumables.mega_demondrug; local name = language.current_language.consumables.mega_demondrug;
this.list.demondrug = nil; this.list.demondrug = nil;
this.list.mega_demondrug = buffs.new(buffs.types.consumable, "mega_demondrug", name, demondrug_value); this.list.mega_demondrug = buffs.new(buffs.types.consumable, "mega_demondrug", name);
end end
end end
@@ -195,7 +199,7 @@ function this.update_armorskin(player_data, item_parameter)
local name = language.current_language.consumables.armorskin; local name = language.current_language.consumables.armorskin;
this.list.armorskin = buffs.new(buffs.types.consumable, "armorskin", name, armorskin_value); this.list.armorskin = buffs.new(buffs.types.consumable, "armorskin", name);
this.list.mega_armorskin = nil; this.list.mega_armorskin = nil;
elseif armorskin_value == mega_armorskin_const_value then elseif armorskin_value == mega_armorskin_const_value then
@@ -207,7 +211,7 @@ function this.update_armorskin(player_data, item_parameter)
local name = language.current_language.consumables.mega_armorskin; local name = language.current_language.consumables.mega_armorskin;
this.list.armorskin = nil; this.list.armorskin = nil;
this.list.mega_armorskin = buffs.new(buffs.types.consumable, "mega_armorskin", name, armorskin_value); this.list.mega_armorskin = buffs.new(buffs.types.consumable, "mega_armorskin", name);
end end
end end
@@ -239,10 +243,9 @@ function this.update_might_seed(player_data, item_parameter)
local name = language.current_language.consumables.might_seed; local name = language.current_language.consumables.might_seed;
buff = buffs.new(buffs.types.consumable, "might_seed", name, might_seed_value, might_seed_timer_const_value); buff = buffs.new(buffs.types.consumable, "might_seed", name, 1, might_seed_timer_const_value);
this.list.might_seed = buff; this.list.might_seed = buff;
else else
buff.value = might_seed_value;
buffs.update_timer(buff, might_seed_timer / 60); buffs.update_timer(buff, might_seed_timer / 60);
end end
end end
@@ -275,10 +278,9 @@ function this.update_adamant_seed(player_data, item_parameter)
local name = language.current_language.consumables.adamant_seed; local name = language.current_language.consumables.adamant_seed;
buff = buffs.new(buffs.types.consumable, "adamant_seed", name, adamant_seed_value, adamant_seed_timer_const_value); buff = buffs.new(buffs.types.consumable, "adamant_seed", name, 1, adamant_seed_timer_const_value);
this.list.adamant_seed = buff; this.list.adamant_seed = buff;
else else
buff.value = adamant_seed_value;
buffs.update_timer(buff, adamant_seed_timer / 60); buffs.update_timer(buff, adamant_seed_timer / 60);
end end
end end
@@ -311,10 +313,9 @@ function this.update_demon_powder(player_data, item_parameter)
local name = language.current_language.consumables.demon_powder; local name = language.current_language.consumables.demon_powder;
buff = buffs.new(buffs.types.consumable, "demon_powder", name, demon_powder_value, demon_powder_timer_const_value); buff = buffs.new(buffs.types.consumable, "demon_powder", name, demon_powder_timer_const_value);
this.list.demon_powder = buff; this.list.demon_powder = buff;
else else
buff.value = demon_powder_value;
buffs.update_timer(buff, demon_powder_timer / 60); buffs.update_timer(buff, demon_powder_timer / 60);
end end
end end
@@ -347,10 +348,9 @@ function this.update_hardshell_powder(player_data, item_parameter)
local name = language.current_language.consumables.hardshell_powder; local name = language.current_language.consumables.hardshell_powder;
buff = buffs.new(buffs.types.consumable, "hardshell_powder", name, hardshell_powder_value, demon_powder_timer_const_value); buff = buffs.new(buffs.types.consumable, "hardshell_powder", name, 1, demon_powder_timer_const_value);
this.list.hardshell_powder = buff; this.list.hardshell_powder = buff;
else else
buff.value = hardshell_powder_value;
buffs.update_timer(buff, hardshell_powder_timer / 60); buffs.update_timer(buff, hardshell_powder_timer / 60);
end end
end end
@@ -377,7 +377,7 @@ function this.update_immunizer(player_data, item_parameter)
local name = language.current_language.consumables.immunizer; local name = language.current_language.consumables.immunizer;
buff = buffs.new(buffs.types.consumable, "immunizer", name, 0, immunizer_timer_const_value); buff = buffs.new(buffs.types.consumable, "immunizer", name, 1, immunizer_timer_const_value);
this.list.immunizer = buff; this.list.immunizer = buff;
else else
buffs.update_timer(buff, immunizer_timer / 60); buffs.update_timer(buff, immunizer_timer / 60);
@@ -401,19 +401,49 @@ function this.update_dash_juice(player_data, item_parameter)
if buff == nil then if buff == nil then
local dash_juice_timer_const_value = stamina_up_buff_second_field:get_data(item_parameter); local dash_juice_timer_const_value = stamina_up_buff_second_field:get_data(item_parameter);
if dash_juice_timer_const_value == nil then if dash_juice_timer_const_value == nil then
error_handler.report("consumables.update_dash_juice", "Failed to access Data: dash_juice_timer"); error_handler.report("consumables.update_dash_juice", "Failed to access Data: dash_juice_timer_const_value");
return; return;
end end
local name = language.current_language.consumables.dash_juice; local name = language.current_language.consumables.dash_juice;
buff = buffs.new(buffs.types.consumable, "dash_juice", name, 0, dash_juice_timer_const_value); buff = buffs.new(buffs.types.consumable, "dash_juice", name, 1, dash_juice_timer_const_value);
this.list.dash_juice = buff; this.list.dash_juice = buff;
else else
buffs.update_timer(buff, dash_juice_timer / 60); buffs.update_timer(buff, dash_juice_timer / 60);
end end
end end
function this.update_gourmet_fish(player_data, item_parameter)
local gourmet_fish_timer = fish_regene_enable_field:get_data(player_data);
if gourmet_fish_timer == nil then
error_handler.report("consumables.update_gourmet_fish", "Failed to access Data: gourmet_fish_timer");
return;
end
if gourmet_fish_timer == 0 then
this.list.gourmet_fish = nil;
return;
end
local buff = this.list.gourmet_fish;
if buff == nil then
--local gourmet_fish_timer_const_value = stamina_up_buff_second_field:get_data(item_parameter);
--if gourmet_fish_timer_const_value == nil then
-- error_handler.report("consumables.update_gourmet_fish", "Failed to access Data: gourmet_fish_timer_const_value");
-- return;
--end
local name = language.current_language.consumables.gourmet_fish;
buff = buffs.new(buffs.types.consumable, "gourmet_fish", name, 1, gourmet_fish_timer);
this.list.gourmet_fish = buff;
else
buffs.update_timer(buff, gourmet_fish_timer / 60);
end
end
function this.init_names() function this.init_names()
for key, buff in pairs(this.list) do for key, buff in pairs(this.list) do
buff.name = language.current_language.consumables[key]; buff.name = language.current_language.consumables[key];

View File

@@ -0,0 +1,127 @@
local this = {};
local buffs;
local buff_UI_entity;
local config;
local singletons;
local players;
local utils;
local language;
local error_handler;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
this.list = {
dango_defender = nil,
};
local player_manager_type_def = sdk.find_type_definition("snow.player.PlayerManager");
local get_player_data_method = player_manager_type_def:get_method("get_PlayerData");
local get_ref_item_parameter_method = player_manager_type_def:get_method("get_RefItemParameter");
local player_user_data_item_parameter_type_def = get_ref_item_parameter_method:get_return_type();
local demondrug_atk_up_field = player_user_data_item_parameter_type_def:get_field("_DemondrugAtkUp");
local great_demondrug_atk_up_field = player_user_data_item_parameter_type_def:get_field("_GreatDemondrugAtkUp");
local armorskin_def_up_field = player_user_data_item_parameter_type_def:get_field("_ArmorSkinDefUp");
local great_armorskin_def_up_field = player_user_data_item_parameter_type_def:get_field("_GreatArmorSkinDefUp");
local might_seed_timer_field = player_user_data_item_parameter_type_def:get_field("_MightSeedTimer");
local adamant_seed_timer_field = player_user_data_item_parameter_type_def:get_field("_AdamantSeedTimer");
local demondrug_powder_timer_field = player_user_data_item_parameter_type_def:get_field("_DemondrugPowderTimer");
local armorskin_powder_timer_field = player_user_data_item_parameter_type_def:get_field("_ArmorSkinPowderTimer");
local vitalizer_timer_const_field = player_user_data_item_parameter_type_def:get_field("_VitalizerTimer");
local stamina_up_buff_second_field = player_user_data_item_parameter_type_def:get_field("_StaminaUpBuffSecond");
local player_data_type_def = sdk.find_type_definition("snow.player.PlayerData");
-- Dango Defender
local kitchen_skill_048_field = player_data_type_def:get_field("_KitchenSkill048_Damage");
local system_array_type_def = sdk.find_type_definition("System.Array");
local length_method = system_array_type_def:get_method("get_Length");
local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)");
function this.update(player_data)
local item_parameter = get_ref_item_parameter_method:call(singletons.player_manager);
if item_parameter == nil then
error_handler.report("dangos.update", "Failed to access Data: item_parameter");
return;
end
--this.update_dango_defender(player_data, item_parameter);
end
-- Not working??
function this.update_dango_defender(player_data, item_parameter)
local dango_defender_value = kitchen_skill_048_field:get_data(player_data);
if dango_defender_value == nil then
error_handler.report("dangos.update_dango_defender", "Failed to access Data: dango_defender_value");
return;
end
if dango_defender_value < 200 then
this.list.dango_defender = nil;
return;
end
local buff = this.list.dango_defender;
if buff ~= nil then
return;
end
local name = language.current_language.dangos.dango_defender_hi;
this.list.dango_defender = buffs.new(buffs.types.dango, "dango_defender", name, 1);
end
function this.init_names()
for key, buff in pairs(this.list) do
buff.name = language.current_language.dangos[key];
end
end
function this.init_dependencies()
buffs = require("MHR_Overlay.Buffs.buffs");
config = require("MHR_Overlay.Misc.config");
utils = require("MHR_Overlay.Misc.utils");
buff_UI_entity = require("MHR_Overlay.UI.UI_Entities.buff_UI_entity");
singletons = require("MHR_Overlay.Game_Handler.singletons");
players = require("MHR_Overlay.Damage_Meter.players");
language = require("MHR_Overlay.Misc.language");
error_handler = require("MHR_Overlay.Misc.error_handler");
end
function this.init_module()
end
return this;

View File

@@ -0,0 +1,156 @@
local this = {};
local buffs;
local buff_UI_entity;
local config;
local singletons;
local players;
local utils;
local language;
local error_handler;
local env_creature;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
this.list = {
cutterfly = nil,
clothfly = nil
};
local player_manager_type_def = sdk.find_type_definition("snow.player.PlayerManager");
local get_player_data_method = player_manager_type_def:get_method("get_PlayerData");
local get_ref_item_parameter_method = player_manager_type_def:get_method("get_RefItemParameter");
local player_user_data_item_parameter_type_def = get_ref_item_parameter_method:get_return_type();
local demondrug_atk_up_field = player_user_data_item_parameter_type_def:get_field("_DemondrugAtkUp");
local player_data_type_def = sdk.find_type_definition("snow.player.PlayerData");
-- Cutterfly
local crit_up_ec_second_timer_field = player_data_type_def:get_field("_CritUpEcSecondTimer");
-- Clothfly
local def_up_buff_second_rate_timer_field = player_data_type_def:get_field("_DefUpBuffSecondRateTimer");
local system_array_type_def = sdk.find_type_definition("System.Array");
local length_method = system_array_type_def:get_method("get_Length");
local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)");
local message_manager_type_def = sdk.find_type_definition("snow.gui.MessageManager");
local get_env_creature_name_message_method = message_manager_type_def:get_method("getEnvCreatureNameMessage");
function this.update(player_data)
local item_parameter = get_ref_item_parameter_method:call(singletons.player_manager);
if item_parameter == nil then
error_handler.report("endemic_life_buffs.update", "Failed to access Data: item_parameter");
return;
end
this.update_cutterfly(player_data, item_parameter);
this.update_clothfly(player_data, item_parameter);
end
function this.update_cutterfly(player_data, item_parameter)
local cutterfly_timer = crit_up_ec_second_timer_field:get_data(player_data);
if cutterfly_timer == nil then
error_handler.report("endemic_life_buffs.update_cutterfly", "Failed to access Data: cutterfly_timer");
return;
end
if cutterfly_timer == 0 then
this.list.cutterfly = nil;
return;
end
local buff = this.list.cutterfly;
if buff == nil then
local name = get_env_creature_name_message_method:call(singletons.message_manager, env_creature.creature_ids.cutterfly);
if name == nil then
error_handler.report("endemic_life_buffs.update_cutterfly", "Failed to access Data: name");
return;
end
buff = buffs.new(buffs.types.consumable, "cutterfly", name, 1, cutterfly_timer / 60);
this.list.cutterfly = buff;
else
buffs.update_timer(buff, cutterfly_timer / 60);
end
end
function this.update_clothfly(player_data, item_parameter)
local clothfly_timer = def_up_buff_second_rate_timer_field:get_data(player_data);
if clothfly_timer == nil then
error_handler.report("endemic_life_buffs.update_clothfly", "Failed to access Data: clothfly_timer");
return;
end
if clothfly_timer == 0 then
this.list.clothfly = nil;
return;
end
local buff = this.list.clothfly;
if buff == nil then
local name = get_env_creature_name_message_method:call(singletons.message_manager, env_creature.creature_ids.clothfly);
if name == nil then
error_handler.report("endemic_life_buffs.update_clothfly", "Failed to access Data: name");
return;
end
buff = buffs.new(buffs.types.consumable, "clothfly", name, 1, clothfly_timer / 60);
this.list.clothfly = buff;
else
buffs.update_timer(buff, clothfly_timer / 60);
end
end
function this.init_names()
-- Nothing to do here
end
function this.init_dependencies()
buffs = require("MHR_Overlay.Buffs.buffs");
config = require("MHR_Overlay.Misc.config");
utils = require("MHR_Overlay.Misc.utils");
buff_UI_entity = require("MHR_Overlay.UI.UI_Entities.buff_UI_entity");
singletons = require("MHR_Overlay.Game_Handler.singletons");
players = require("MHR_Overlay.Damage_Meter.players");
language = require("MHR_Overlay.Misc.language");
error_handler = require("MHR_Overlay.Misc.error_handler");
env_creature = require("MHR_Overlay.Endemic_Life.env_creature");
end
function this.init_module()
end
return this;

View File

@@ -130,10 +130,9 @@ function this.update(melody_data_table)
local key = melody_effect_keys[lua_index]; local key = melody_effect_keys[lua_index];
local name = language.current_language.melody_effects[key]; local name = language.current_language.melody_effects[key];
buff = buffs.new(buffs.types.melody_effect, key, name, melody_timer, melody_timer / 60); buff = buffs.new(buffs.types.melody_effect, key, name, 1, melody_timer / 60);
this.list[lua_index] = buff; this.list[lua_index] = buff;
else else
buff.value = melody_timer;
buffs.update_timer(buff, melody_timer / 60); buffs.update_timer(buff, melody_timer / 60);
end end

View File

@@ -0,0 +1,233 @@
local this = {};
local buffs;
local buff_UI_entity;
local config;
local singletons;
local players;
local utils;
local language;
local error_handler;
local env_creature;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
this.list = {
burst = nil,
kushala_daora_soul = nil,
intrepid_heart = nil,
dereliction = nil,
};
local player_manager_type_def = sdk.find_type_definition("snow.player.PlayerManager");
local get_player_data_method = player_manager_type_def:get_method("get_PlayerData");
local get_ref_item_parameter_method = player_manager_type_def:get_method("get_RefItemParameter");
local player_user_data_item_parameter_type_def = get_ref_item_parameter_method:get_return_type();
local demondrug_atk_up_field = player_user_data_item_parameter_type_def:get_field("_DemondrugAtkUp");
local player_data_type_def = sdk.find_type_definition("snow.player.PlayerData");
-- Burst
local rengeki_power_up_count_field = player_data_type_def:get_field("_RengekiPowerUpCnt");
local rengeki_power_up_timer_field = player_data_type_def:get_field("_RengekiPowerUpTimer");
-- Kushala Daora Soul
local hyakuryu_dragon_power_up_count_field = player_data_type_def:get_field("_HyakuryuDragonPowerUpCnt");
local hyakuryu_dragon_power_up_timer_field = player_data_type_def:get_field("_HyakuryuDragonPowerUpTimer");
-- Intrepid Heart
local equip_skill_223_accumulator_field = player_data_type_def:get_field("_EquipSkill223Accumulator");
-- Derelection
local symbiosis_skill_lost_vital_field = player_data_type_def:get_field("_SymbiosisSkillLostVital");
local system_array_type_def = sdk.find_type_definition("System.Array");
local length_method = system_array_type_def:get_method("get_Length");
local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)");
function this.update(player_data)
local item_parameter = get_ref_item_parameter_method:call(singletons.player_manager);
if item_parameter == nil then
error_handler.report("skills.update", "Failed to access Data: item_parameter");
return;
end
this.update_burst(player_data);
this.update_kushala_daora_soul(player_data);
this.update_intrepid_heart(player_data);
this.update_dereliction(player_data);
--xy = string.format("%s\n%s", player_data._Attack, player_data._SymbiosisSkillLostVital);
end
function this.update_burst(player_data)
local burst_value = rengeki_power_up_count_field:get_data(player_data);
if burst_value == nil then
error_handler.report("skills.update_burst", "Failed to access Data: burst_value");
return;
end
if burst_value == 0 then
this.list.burst = nil;
return;
end
local burst_timer = rengeki_power_up_timer_field:get_data(player_data);
if burst_timer == nil then
error_handler.report("skills.update_burst", "Failed to access Data: burst_timer");
return;
end
local skill_level = 1;
if burst_value >= 5 then
skill_level = 2;
end
local buff = this.list.burst;
if buff == nil then
local name = language.current_language.skills.burst;
buff = buffs.new(buffs.types.skill, "burst", name, skill_level, burst_timer / 60);
this.list.burst = buff;
else
buff.level = skill_level;
buffs.update_timer(buff, burst_timer / 60);
end
end
function this.update_kushala_daora_soul(player_data)
local kushala_daora_soul_value = hyakuryu_dragon_power_up_count_field:get_data(player_data);
if kushala_daora_soul_value == nil then
error_handler.report("skills.update_kushala_daora_soul", "Failed to access Data: kushala_daora_soul_value");
return;
end
if kushala_daora_soul_value == 0 then
this.list.kushala_daora_soul = nil;
this.list.kushala_daora_soul_2 = nil;
return;
end
local kushala_daora_soul_timer = hyakuryu_dragon_power_up_timer_field:get_data(player_data);
if kushala_daora_soul_timer == nil then
error_handler.report("skills.update_kushala_daora_soul", "Failed to access Data: kushala_daora_soul_timer");
return;
end
local skill_level = 1;
if kushala_daora_soul_value >= 5 then
skill_level = 2;
end
local buff = this.list.kushala_daora_soul;
if buff == nil then
local name = language.current_language.skills.kushala_daora_soul;
buff = buffs.new(buffs.types.skill, "kushala_daora_soul", name, skill_level, kushala_daora_soul_timer / 60);
this.list.kushala_daora_soul = buff;
else
buff.level = skill_level;
buffs.update_timer(buff, kushala_daora_soul_timer / 60);
end
end
function this.update_intrepid_heart(player_data)
local intrepid_heart_value = equip_skill_223_accumulator_field:get_data(player_data);
if intrepid_heart_value == nil then
error_handler.report("skills.update_intrepid_heart", "Failed to access Data: intrepid_heart_value");
return;
end
if intrepid_heart_value < 400 then
this.list.intrepid_heart = nil;
return;
end
local buff = this.list.intrepid_heart;
if buff == nil then
local name = language.current_language.skills.intrepid_heart;
buff = buffs.new(buffs.types.skill, "intrepid_heart", name, 1);
this.list.intrepid_heart = buff;
end
end
function this.update_dereliction(player_data)
local dereliction_value = symbiosis_skill_lost_vital_field:get_data(player_data);
if dereliction_value == nil then
error_handler.report("skills.update_derelection", "Failed to access Data: dereliction_value");
return;
end
if dereliction_value == 0 then
this.list.dereliction = nil;
return;
end
local skill_level = 1;
if dereliction_value >= 100 then
skill_level = 3;
elseif dereliction_value >= 50 then
skill_level = 2;
end
local buff = this.list.dereliction;
if buff == nil then
local name = language.current_language.skills.dereliction;
buff = buffs.new(buffs.types.skill, "dereliction", name, skill_level);
this.list.dereliction = buff;
else
buff.level = skill_level;
end
end
function this.init_names()
for key, buff in pairs(this.list) do
buff.name = language.current_language.skills[key];
end
end
function this.init_dependencies()
buffs = require("MHR_Overlay.Buffs.buffs");
config = require("MHR_Overlay.Misc.config");
utils = require("MHR_Overlay.Misc.utils");
buff_UI_entity = require("MHR_Overlay.UI.UI_Entities.buff_UI_entity");
singletons = require("MHR_Overlay.Game_Handler.singletons");
players = require("MHR_Overlay.Damage_Meter.players");
language = require("MHR_Overlay.Misc.language");
error_handler = require("MHR_Overlay.Misc.error_handler");
env_creature = require("MHR_Overlay.Endemic_Life.env_creature");
end
function this.init_module()
end
return this;

View File

@@ -282,7 +282,7 @@ function this.update_servant_otomos()
local servant_otomo = otomo_get_item_method:call(servant_otomo_list, i); local servant_otomo = otomo_get_item_method:call(servant_otomo_list, i);
if servant_otomo == nil then if servant_otomo == nil then
error_handler.report("non_players.update_servant_otomos", "Failed to access Data: servant_otomo No. " .. tostring(i)); error_handler.report("non_players.update_servant_otomos", "Failed to access Data: servant_otomo No. " .. tostring(i));
goto continue goto continue;
end end
local otomo_create_data = servant_otomo:call("get_OtCreateData"); local otomo_create_data = servant_otomo:call("get_OtCreateData");

View File

@@ -41,6 +41,11 @@ local package = package;
this.list = {}; this.list = {};
this.creature_ids = {
cutterfly = 50,
clothfly = 7
};
function this.new(REcreature) function this.new(REcreature)
local creature = {}; local creature = {};

View File

@@ -7493,6 +7493,10 @@ function this.init_default()
text_formatting = "%s", text_formatting = "%s",
include = {
skill_level = true
},
offset = { offset = {
x = 5, x = 5,
y = 0 y = 0

View File

@@ -200,7 +200,8 @@ this.default_language = {
demon_powder = "Demon Powder", demon_powder = "Demon Powder",
hardshell_powder = "Hardshell Powder", hardshell_powder = "Hardshell Powder",
immunizer = "Immunizer", immunizer = "Immunizer",
dash_juice = "Dash Juice" dash_juice = "Dash Juice",
gourmet_fish = "Gourmet Fish"
}, },
melody_effects = { melody_effects = {
@@ -234,6 +235,17 @@ this.default_language = {
sharpness_extension = "Sharpness Extension" sharpness_extension = "Sharpness Extension"
}, },
skills = {
burst = "Burst",
kushala_daora_soul = "Kushala Daora Soul",
intrepid_heart = "Intrepid Heart",
dereliction = "Dereliction"
},
dangos = {
dango_defender_hi = "Dango Defender (Hi)"
},
UI = { UI = {
HP = "HP:", HP = "HP:",
stamina = "Stamina:", stamina = "Stamina:",

View File

@@ -56,24 +56,24 @@ function this.draw(monster, ailment_buildup_UI, cached_config, ailment_buildups_
for id, ailment in pairs(monster.ailments) do for id, ailment in pairs(monster.ailments) do
if id == ailments.stun_id then if id == ailments.stun_id then
if not cached_config.filter.stun then if not cached_config.filter.stun then
goto continue goto continue;
end end
elseif id == ailments.poison_id then elseif id == ailments.poison_id then
if not cached_config.filter.poison then if not cached_config.filter.poison then
goto continue goto continue;
end end
elseif id == ailments.blast_id then elseif id == ailments.blast_id then
if not cached_config.filter.blast then if not cached_config.filter.blast then
goto continue goto continue;
end end
else else
goto continue goto continue;
end end
if cached_config.settings.time_limit ~= 0 and if cached_config.settings.time_limit ~= 0 and
time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit then time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit then
goto continue goto continue;
end end
@@ -154,7 +154,7 @@ function this.draw(monster, ailment_buildup_UI, cached_config, ailment_buildups_
end end
if total_buildup == 0 then if total_buildup == 0 then
goto continue goto continue;
end end
if cached_config.sorting.type == "Normal" then if cached_config.sorting.type == "Normal" then

View File

@@ -147,7 +147,7 @@ function this.stock_damage()
local damage_param = get_damage_param_method:call(enemy); local damage_param = get_damage_param_method:call(enemy);
if damage_param == nil then if damage_param == nil then
error_handler.report("ailment_hook.stock_damage", "Failed to access Data: small_monster -> damage_param"); error_handler.report("ailment_hook.stock_damage", "Failed to access Data: small_monster -> damage_param");
goto continue goto continue;
end end
local poison_param = poison_param_field:get_data(damage_param); local poison_param = poison_param_field:get_data(damage_param);

View File

@@ -312,13 +312,13 @@ function this.update_ailments(enemy, monster)
for id = 0, condition_param_array_length - 1 do for id = 0, condition_param_array_length - 1 do
if id == this.stun_id or id == this.poison_id or id == this.blast_id then if id == this.stun_id or id == this.poison_id or id == this.blast_id then
goto continue goto continue;
end end
local ailment_param = get_value_method:call(condition_param_array, id); local ailment_param = get_value_method:call(condition_param_array, id);
if ailment_param == nil then if ailment_param == nil then
error_handler.report("ailments.update_ailments", "Failed to access Data: ailment_param No. " .. tostring(id)); error_handler.report("ailments.update_ailments", "Failed to access Data: ailment_param No. " .. tostring(id));
goto continue goto continue;
end end
this.update_ailment(monster, ailment_param, id); this.update_ailment(monster, ailment_param, id);
@@ -559,86 +559,86 @@ function this.draw(monster, ailment_UI, cached_config, ailments_position_on_scre
for id, ailment in pairs(monster.ailments) do for id, ailment in pairs(monster.ailments) do
if id == this.paralyze_id then if id == this.paralyze_id then
if not cached_config.filter.paralysis then if not cached_config.filter.paralysis then
goto continue goto continue;
end end
elseif id == this.sleep_id then elseif id == this.sleep_id then
if not cached_config.filter.sleep then if not cached_config.filter.sleep then
goto continue goto continue;
end end
elseif id == this.stun_id then elseif id == this.stun_id then
if not cached_config.filter.stun then if not cached_config.filter.stun then
goto continue goto continue;
end end
elseif id == this.flash_id then elseif id == this.flash_id then
if not cached_config.filter.flash then if not cached_config.filter.flash then
goto continue goto continue;
end end
elseif id == this.poison_id then elseif id == this.poison_id then
if not cached_config.filter.poison then if not cached_config.filter.poison then
goto continue goto continue;
end end
elseif id == this.blast_id then elseif id == this.blast_id then
if not cached_config.filter.blast then if not cached_config.filter.blast then
goto continue goto continue;
end end
elseif id == this.exhaust_id then elseif id == this.exhaust_id then
if not cached_config.filter.exhaust then if not cached_config.filter.exhaust then
goto continue goto continue;
end end
elseif id == this.ride_id then elseif id == this.ride_id then
if not cached_config.filter.ride then if not cached_config.filter.ride then
goto continue goto continue;
end end
elseif id == this.water_id then elseif id == this.water_id then
if not cached_config.filter.waterblight then if not cached_config.filter.waterblight then
goto continue goto continue;
end end
elseif id == this.fire_id then elseif id == this.fire_id then
if not cached_config.filter.fireblight then if not cached_config.filter.fireblight then
goto continue goto continue;
end end
elseif id == this.ice_id then elseif id == this.ice_id then
if not cached_config.filter.iceblight then if not cached_config.filter.iceblight then
goto continue goto continue;
end end
elseif id == this.thunder_id then elseif id == this.thunder_id then
if not cached_config.filter.thunderblight then if not cached_config.filter.thunderblight then
goto continue goto continue;
end end
elseif id == this.fall_trap_id then elseif id == this.fall_trap_id then
if not cached_config.filter.fall_trap then if not cached_config.filter.fall_trap then
goto continue goto continue;
end end
elseif id == this.shock_trap_id then elseif id == this.shock_trap_id then
if not cached_config.filter.shock_trap then if not cached_config.filter.shock_trap then
goto continue goto continue;
end end
elseif id == this.capture_id then elseif id == this.capture_id then
if not cached_config.filter.tranq_bomb then if not cached_config.filter.tranq_bomb then
goto continue goto continue;
end end
elseif id == this.koyashi_id then elseif id == this.koyashi_id then
if not cached_config.filter.dung_bomb then if not cached_config.filter.dung_bomb then
goto continue goto continue;
end end
elseif id == this.steel_fang_id then elseif id == this.steel_fang_id then
if not cached_config.filter.steel_fang then if not cached_config.filter.steel_fang then
goto continue goto continue;
end end
elseif id == this.fall_quick_sand_id then elseif id == this.fall_quick_sand_id then
if not cached_config.filter.quick_sand then if not cached_config.filter.quick_sand then
goto continue goto continue;
end end
elseif id == this.fall_otomo_trap_id then elseif id == this.fall_otomo_trap_id then
if not cached_config.filter.fall_otomo_trap then if not cached_config.filter.fall_otomo_trap then
goto continue goto continue;
end end
elseif id == this.shock_otomo_trap_id then elseif id == this.shock_otomo_trap_id then
if not cached_config.filter.shock_otomo_trap then if not cached_config.filter.shock_otomo_trap then
goto continue goto continue;
end end
else else
goto continue goto continue;
end end
if cached_config.settings.hide_ailments_with_zero_buildup if cached_config.settings.hide_ailments_with_zero_buildup
@@ -646,31 +646,31 @@ function this.draw(monster, ailment_UI, cached_config, ailments_position_on_scre
and ailment.buildup_limit ~= 0 and ailment.buildup_limit ~= 0
and ailment.activate_count == 0 and ailment.activate_count == 0
and not ailment.is_active then and not ailment.is_active then
goto continue goto continue;
end end
if cached_config.settings.hide_inactive_ailments_with_no_buildup_support if cached_config.settings.hide_inactive_ailments_with_no_buildup_support
and ailment.buildup_limit == 0 and ailment.buildup_limit == 0
and not ailment.is_active then and not ailment.is_active then
goto continue goto continue;
end end
if cached_config.settings.hide_all_inactive_ailments and not ailment.is_active then if cached_config.settings.hide_all_inactive_ailments and not ailment.is_active then
goto continue goto continue;
end end
if cached_config.settings.hide_all_active_ailments and ailment.is_active then if cached_config.settings.hide_all_active_ailments and ailment.is_active then
goto continue goto continue;
end end
if cached_config.settings.hide_disabled_ailments and not ailment.is_enable then if cached_config.settings.hide_disabled_ailments and not ailment.is_enable then
goto continue goto continue;
end end
if cached_config.settings.time_limit ~= 0 if cached_config.settings.time_limit ~= 0
and time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit and time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit
and not ailment.is_active then and not ailment.is_active then
goto continue goto continue;
end end
table.insert(displayed_ailments, ailment); table.insert(displayed_ailments, ailment);

View File

@@ -316,19 +316,19 @@ function this.draw(monster, part_UI, cached_config, parts_position_on_screen, op
and ((part.break_health == part.break_max_health and part.break_count == 0) or not break_supported) and ((part.break_health == part.break_max_health and part.break_count == 0) or not break_supported)
and ((part.loss_health == part.loss_max_health and not part.is_severed) or not sever_supported) and ((part.loss_health == part.loss_max_health and not part.is_severed) or not sever_supported)
and ((part.anomaly_health == part.anomaly_max_health) or not anomaly_supported) then and ((part.anomaly_health == part.anomaly_max_health) or not anomaly_supported) then
goto continue goto continue;
end end
if (not part_UI.flinch_visibility or not health_supported) if (not part_UI.flinch_visibility or not health_supported)
and (not part_UI.break_visibility or not break_supported or part.break_count >= part.break_max_count) and (not part_UI.break_visibility or not break_supported or part.break_count >= part.break_max_count)
and (not part_UI.loss_visibility or not sever_supported or part.is_severed) and (not part_UI.loss_visibility or not sever_supported or part.is_severed)
and (not part_UI.anomaly_visibility or not anomaly_supported) then and (not part_UI.anomaly_visibility or not anomaly_supported) then
goto continue goto continue;
end end
if cached_config.settings.time_limit ~= 0 and if cached_config.settings.time_limit ~= 0 and
time.total_elapsed_script_seconds - part.last_change_time > cached_config.settings.time_limit then time.total_elapsed_script_seconds - part.last_change_time > cached_config.settings.time_limit then
goto continue goto continue;
end end
table.insert(displayed_parts, part); table.insert(displayed_parts, part);

View File

@@ -620,6 +620,8 @@ function this.update_health(enemy, monster)
monster.capture_percentage = capture_health / max_health; monster.capture_percentage = capture_health / max_health;
end end
monster.is_health_initialized = true;
return physical_param; return physical_param;
end end

View File

@@ -129,7 +129,7 @@ function this.update_large_monster(enemy)
-- this is the VERY LEAST thing we should do all the time -- this is the VERY LEAST thing we should do all the time
-- so the position doesn't lag all over the place -- so the position doesn't lag all over the place
-- due to how infrequently we update the monster(s). -- due to how infrequently we update the monster(s).
--large_monster.update_position(enemy, monster); large_monster.update_position(enemy, monster);
if not config.current_config.global_settings.performance.prioritize_large_monsters and updated_monsters[enemy] then if not config.current_config.global_settings.performance.prioritize_large_monsters and updated_monsters[enemy] then
return; return;
@@ -174,7 +174,7 @@ function this.update_small_monster(enemy)
-- this is the VERY LEAST thing we should do all the time -- this is the VERY LEAST thing we should do all the time
-- so the position doesn't lag all over the place -- so the position doesn't lag all over the place
-- due to how infrequently we update the monster(s). -- due to how infrequently we update the monster(s).
--small_monster.update_position(enemy, monster); small_monster.update_position(enemy, monster);
if updated_monsters[enemy] then if updated_monsters[enemy] then
return; return;

View File

@@ -237,6 +237,8 @@ function this.update_health(enemy, monster)
if max_health ~= 0 then if max_health ~= 0 then
monster.health_percentage = health / max_health; monster.health_percentage = health / max_health;
end end
monster.is_health_initialized = true;
end end
function this.draw(monster, cached_config, position_on_screen, opacity_scale) function this.draw(monster, cached_config, position_on_screen, opacity_scale)

View File

@@ -5,9 +5,12 @@ local config;
local buffs; local buffs;
local consumables; local consumables;
local melody_effects; local melody_effects;
local endemic_life_buff;
local screen; local screen;
local utils; local utils;
local error_handler; local error_handler;
local skills;
local dangos;
local sdk = sdk; local sdk = sdk;
local tostring = tostring; local tostring = tostring;
@@ -69,6 +72,36 @@ function this.draw()
::continue2:: ::continue2::
end end
for key, endemic_life_buff in pairs(endemic_life_buff.list) do
if not endemic_life_buff.is_active then
goto continue3;
end
table.insert(displayed_buffs, endemic_life_buff);
::continue3::
end
for key, skill in pairs(skills.list) do
if not skill.is_active then
goto continue4;
end
table.insert(displayed_buffs, skill);
::continue4::
end
for key, dango_buff in pairs(dangos.list) do
if not dango_buff.is_active then
goto continue5;
end
table.insert(displayed_buffs, dango_buff);
::continue5::
end
-- sort -- sort
if cached_config.sorting.type == "Name" then if cached_config.sorting.type == "Name" then
if cached_config.sorting.reversed_order then if cached_config.sorting.reversed_order then
@@ -139,6 +172,9 @@ function this.init_dependencies()
--drawing = require("MHR_Overlay.UI.drawing"); --drawing = require("MHR_Overlay.UI.drawing");
utils = require("MHR_Overlay.Misc.utils"); utils = require("MHR_Overlay.Misc.utils");
error_handler = require("MHR_Overlay.Misc.error_handler"); error_handler = require("MHR_Overlay.Misc.error_handler");
endemic_life_buff = require("MHR_Overlay.Buffs.endemic_life_buffs");
skills = require("MHR_Overlay.Buffs.skills");
dangos = require("MHR_Overlay.Buffs.dangos");
end end
function this.init_module() function this.init_module()

View File

@@ -52,6 +52,7 @@ function this.draw()
local cached_config = config.current_config.endemic_life_UI; local cached_config = config.current_config.endemic_life_UI;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier; local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
for REcreature, creature in pairs(env_creature.list) do for REcreature, creature in pairs(env_creature.list) do
if cached_config.settings.max_distance == 0 then if cached_config.settings.max_distance == 0 then
break; break;

View File

@@ -91,8 +91,6 @@ function this.draw(dynamic_enabled, static_enabled, highlighted_enabled)
goto continue; goto continue;
end end
large_monster.update_position(enemy, monster);
if update_distance then if update_distance then
monster.distance = (players.myself_position - monster.position):length(); monster.distance = (players.myself_position - monster.position):length();
end end

View File

@@ -56,31 +56,11 @@ function this.draw()
local displayed_monsters = {}; local displayed_monsters = {};
local enemy_count = get_zako_enemy_count_method:call(singletons.enemy_manager); for enemy, monster in pairs(small_monster.list) do
if enemy_count == nil then
error_handler.report("small_monster_UI.draw", "Failed to access Data: enemy_count");
return;
end
for i = 0, enemy_count - 1 do
local enemy = get_zako_enemy_method:call(singletons.enemy_manager, i);
if enemy == nil then
error_handler.report("small_monster_UI.draw", "Failed to access Data: enemy No. " .. tostring(i));
goto continue;
end
local monster = small_monster.get_monster(enemy);
if monster == nil then
error_handler.report("small_monster_UI.draw", "Failed to create Small Monster Entry No. " .. tostring(i));
goto continue;
end
if monster.dead_or_captured and cached_config.settings.hide_dead_or_captured then if monster.dead_or_captured and cached_config.settings.hide_dead_or_captured then
goto continue; goto continue;
end; end;
small_monster.update_position(enemy, monster);
table.insert(displayed_monsters, monster); table.insert(displayed_monsters, monster);
::continue:: ::continue::
end end
@@ -147,7 +127,7 @@ function this.draw()
position_on_screen = draw.world_to_screen(monster.position + world_offset); position_on_screen = draw.world_to_screen(monster.position + world_offset);
if position_on_screen == nil then if position_on_screen == nil then
goto continue goto continue;
end end
position_on_screen.x = position_on_screen.x + cached_config.dynamic_positioning.viewport_offset.x; position_on_screen.x = position_on_screen.x + cached_config.dynamic_positioning.viewport_offset.x;
@@ -169,7 +149,7 @@ function this.draw()
end end
if monster.distance > cached_config.dynamic_positioning.max_distance then if monster.distance > cached_config.dynamic_positioning.max_distance then
goto continue goto continue;
end end
if cached_config.dynamic_positioning.opacity_falloff then if cached_config.dynamic_positioning.opacity_falloff then

View File

@@ -73,7 +73,12 @@ function this.draw(buff, buff_UI, position_on_screen, opacity_scale)
drawing.draw_bar(buff_UI.bar, position_on_screen, opacity_scale, 1); drawing.draw_bar(buff_UI.bar, position_on_screen, opacity_scale, 1);
end end
drawing.draw_label(buff_UI.name_label, position_on_screen, opacity_scale, buff.name); local buff_name = buff.name;
if cached_config.name_label.include.skill_level and buff.level > 1 then
buff_name = string.format("%s %d", buff_name, buff.level);
end
drawing.draw_label(buff_UI.name_label, position_on_screen, opacity_scale, buff_name);
if not buff.is_infinite then if not buff.is_infinite then
drawing.draw_label(buff_UI.timer_label, position_on_screen, opacity_scale, buff.minutes_left, buff.seconds_left); drawing.draw_label(buff_UI.timer_label, position_on_screen, opacity_scale, buff.minutes_left, buff.seconds_left);

View File

@@ -44,6 +44,7 @@
"dash_juice": "Dash Juice", "dash_juice": "Dash Juice",
"demon_powder": "Demon Powder", "demon_powder": "Demon Powder",
"demondrug": "Demondrug", "demondrug": "Demondrug",
"gourmet_fish": "Gourmet Fish",
"hardshell_powder": "Hardshell Powder", "hardshell_powder": "Hardshell Powder",
"immunizer": "Immunizer", "immunizer": "Immunizer",
"mega_armorskin": "Mega Armorskin", "mega_armorskin": "Mega Armorskin",
@@ -339,6 +340,9 @@
"y": "Y", "y": "Y",
"z": "Z" "z": "Z"
}, },
"dangos": {
"dango_defender_hi": "Dango Defender (Hi)"
},
"font_name": "", "font_name": "",
"melody_effects": { "melody_effects": {
"affinity_up": "Affinity Up", "affinity_up": "Affinity Up",
@@ -439,6 +443,12 @@
"wingclaws": "Wingclaws", "wingclaws": "Wingclaws",
"wings": "Wings" "wings": "Wings"
}, },
"skills": {
"burst": "Burst",
"dereliction": "Dereliction",
"intrepid_heart": "Intrepid Heart",
"kushala_daora_soul": "Kushala Daora Soul"
},
"unicode_glyph_ranges": [ "unicode_glyph_ranges": [
0 0
] ]

View File

@@ -44,6 +44,7 @@
"dash_juice": "Dash Juice", "dash_juice": "Dash Juice",
"demon_powder": "Demon Powder", "demon_powder": "Demon Powder",
"demondrug": "Demondrug", "demondrug": "Demondrug",
"gourmet_fish": "Gourmet Fish",
"hardshell_powder": "Hardshell Powder", "hardshell_powder": "Hardshell Powder",
"immunizer": "Immunizer", "immunizer": "Immunizer",
"mega_armorskin": "Mega Armorskin", "mega_armorskin": "Mega Armorskin",
@@ -339,6 +340,9 @@
"y": "Y", "y": "Y",
"z": "Z" "z": "Z"
}, },
"dangos": {
"dango_defender_hi": "Dango Defender (Hi)"
},
"font_name": "NotoSansJP-Bold.otf", "font_name": "NotoSansJP-Bold.otf",
"melody_effects": { "melody_effects": {
"affinity_up": "Affinity Up", "affinity_up": "Affinity Up",
@@ -439,6 +443,12 @@
"wingclaws": "Wingclaws", "wingclaws": "Wingclaws",
"wings": "翼" "wings": "翼"
}, },
"skills": {
"burst": "Burst",
"dereliction": "Dereliction",
"intrepid_heart": "Intrepid Heart",
"kushala_daora_soul": "Kushala Daora Soul"
},
"unicode_glyph_ranges": [ "unicode_glyph_ranges": [
32, 32,
255, 255,

View File

@@ -44,6 +44,7 @@
"dash_juice": "Dash Juice", "dash_juice": "Dash Juice",
"demon_powder": "Demon Powder", "demon_powder": "Demon Powder",
"demondrug": "Demondrug", "demondrug": "Demondrug",
"gourmet_fish": "Gourmet Fish",
"hardshell_powder": "Hardshell Powder", "hardshell_powder": "Hardshell Powder",
"immunizer": "Immunizer", "immunizer": "Immunizer",
"mega_armorskin": "Mega Armorskin", "mega_armorskin": "Mega Armorskin",
@@ -340,6 +341,9 @@
"y": "Y", "y": "Y",
"z": "Z" "z": "Z"
}, },
"dangos": {
"dango_defender_hi": "Dango Defender (Hi)"
},
"font_name": "NotoSansKR-Bold.otf", "font_name": "NotoSansKR-Bold.otf",
"melody_effects": { "melody_effects": {
"affinity_up": "Affinity Up", "affinity_up": "Affinity Up",
@@ -440,6 +444,12 @@
"wingclaws": "날개발톱", "wingclaws": "날개발톱",
"wings": "날개" "wings": "날개"
}, },
"skills": {
"burst": "Burst",
"dereliction": "Dereliction",
"intrepid_heart": "Intrepid Heart",
"kushala_daora_soul": "Kushala Daora Soul"
},
"unicode_glyph_ranges": [ "unicode_glyph_ranges": [
32, 32,
255, 255,

View File

@@ -44,6 +44,7 @@
"dash_juice": "Dash Juice", "dash_juice": "Dash Juice",
"demon_powder": "Demon Powder", "demon_powder": "Demon Powder",
"demondrug": "Demondrug", "demondrug": "Demondrug",
"gourmet_fish": "Gourmet Fish",
"hardshell_powder": "Hardshell Powder", "hardshell_powder": "Hardshell Powder",
"immunizer": "Immunizer", "immunizer": "Immunizer",
"mega_armorskin": "Mega Armorskin", "mega_armorskin": "Mega Armorskin",
@@ -340,6 +341,9 @@
"y": "Y", "y": "Y",
"z": "Z" "z": "Z"
}, },
"dangos": {
"dango_defender_hi": "Dango Defender (Hi)"
},
"font_name": "NotoSansKR-Bold.otf", "font_name": "NotoSansKR-Bold.otf",
"melody_effects": { "melody_effects": {
"affinity_up": "Affinity Up", "affinity_up": "Affinity Up",
@@ -440,6 +444,12 @@
"wingclaws": "Крыло-коготь", "wingclaws": "Крыло-коготь",
"wings": "Крылья" "wings": "Крылья"
}, },
"skills": {
"burst": "Burst",
"dereliction": "Dereliction",
"intrepid_heart": "Intrepid Heart",
"kushala_daora_soul": "Kushala Daora Soul"
},
"unicode_glyph_ranges": [ "unicode_glyph_ranges": [
32, 32,
255, 255,

View File

@@ -44,6 +44,7 @@
"dash_juice": "Dash Juice", "dash_juice": "Dash Juice",
"demon_powder": "Demon Powder", "demon_powder": "Demon Powder",
"demondrug": "Demondrug", "demondrug": "Demondrug",
"gourmet_fish": "Gourmet Fish",
"hardshell_powder": "Hardshell Powder", "hardshell_powder": "Hardshell Powder",
"immunizer": "Immunizer", "immunizer": "Immunizer",
"mega_armorskin": "Mega Armorskin", "mega_armorskin": "Mega Armorskin",
@@ -340,6 +341,9 @@
"y": "Y轴", "y": "Y轴",
"z": "Z轴" "z": "Z轴"
}, },
"dangos": {
"dango_defender_hi": "Dango Defender (Hi)"
},
"font_name": "NotoSansSC-Bold.otf", "font_name": "NotoSansSC-Bold.otf",
"melody_effects": { "melody_effects": {
"affinity_up": "Affinity Up", "affinity_up": "Affinity Up",
@@ -440,6 +444,12 @@
"wingclaws": "翼爪", "wingclaws": "翼爪",
"wings": "翼" "wings": "翼"
}, },
"skills": {
"burst": "Burst",
"dereliction": "Dereliction",
"intrepid_heart": "Intrepid Heart",
"kushala_daora_soul": "Kushala Daora Soul"
},
"unicode_glyph_ranges": [ "unicode_glyph_ranges": [
32, 32,
255, 255,

View File

@@ -44,6 +44,7 @@
"dash_juice": "Dash Juice", "dash_juice": "Dash Juice",
"demon_powder": "Demon Powder", "demon_powder": "Demon Powder",
"demondrug": "Demondrug", "demondrug": "Demondrug",
"gourmet_fish": "Gourmet Fish",
"hardshell_powder": "Hardshell Powder", "hardshell_powder": "Hardshell Powder",
"immunizer": "Immunizer", "immunizer": "Immunizer",
"mega_armorskin": "Mega Armorskin", "mega_armorskin": "Mega Armorskin",
@@ -340,6 +341,9 @@
"y": "Y軸", "y": "Y軸",
"z": "Z軸" "z": "Z軸"
}, },
"dangos": {
"dango_defender_hi": "Dango Defender (Hi)"
},
"font_name": "NotoSansTC-Bold.otf", "font_name": "NotoSansTC-Bold.otf",
"melody_effects": { "melody_effects": {
"affinity_up": "Affinity Up", "affinity_up": "Affinity Up",
@@ -440,6 +444,12 @@
"wingclaws": "翼爪", "wingclaws": "翼爪",
"wings": "翅膀" "wings": "翅膀"
}, },
"skills": {
"burst": "Burst",
"dereliction": "Dereliction",
"intrepid_heart": "Intrepid Heart",
"kushala_daora_soul": "Kushala Daora Soul"
},
"unicode_glyph_ranges": [ "unicode_glyph_ranges": [
32, 32,
255, 255,