Add Buff Filters

This commit is contained in:
GreenComfyTea
2023-09-26 11:31:00 +03:00
parent cbaa537a0b
commit 480bc9c9b7
22 changed files with 1960 additions and 581 deletions

View File

@@ -45,8 +45,8 @@ local package = package;
this.list = {
fireblight = nil,
waterblight = nil,
iceblight = nil,
thunderblight = nil,
iceblight = nil,
dragonblight = nil,
blastblight = nil,
minor_bubbleblight = nil,
@@ -57,6 +57,7 @@ this.list = {
deadly_poison = nil,
stun = nil,
paralysis = nil,
falling_asleep = nil,
sleep = nil,
defense_down = nil,
resistance_down = nil,
@@ -65,17 +66,48 @@ this.list = {
webbed = nil,
stench = nil,
leeched = nil,
whirlwind = nil,
-- whirlwind = nil,
bleeding = nil,
frenzy = nil,
frenzy_overcome = nil,
frenzy_infection = nil,
engulfed = nil,
frostblight = nil,
muck = nil
};
local ailments_type_name = "ailments";
this.keys = {
"fireblight",
"waterblight",
"thunderblight",
"iceblight",
"dragonblight",
"blastblight",
"minor_bubbleblight",
"major_bubbleblight",
"hellfireblight",
"bloodblight",
"frostblight",
"poison",
"deadly_poison",
"stun",
"paralysis",
"falling_asleep",
"sleep",
"defense_down",
"resistance_down",
"tremor",
"roar",
"webbed",
"stench",
"leeched",
-- "whirlwind",
"bleeding",
"engulfed",
"muck",
"frenzy",
"frenzy_overcome",
"frenzy_infection"
};
local frenzy_infected_duration = 121;
@@ -85,10 +117,10 @@ local player_quest_base_type_def = sdk.find_type_definition("snow.player.PlayerQ
local fire_duration_timer_field = player_quest_base_type_def:get_field("_FireLDurationTimer");
-- Waterblight
local water_duration_timer_field = player_quest_base_type_def:get_field("_WaterLDurationTimer");
-- Iceblight
local ice_duration_timer_field = player_quest_base_type_def:get_field("_IceLDurationTimer");
-- Thunderblight
local thunder_duration_timer_field = player_quest_base_type_def:get_field("_ThunderLDurationTimer");
-- Iceblight
local ice_duration_timer_field = player_quest_base_type_def:get_field("_IceLDurationTimer");
-- Dragonblight
local dragon_duration_timer_field = player_quest_base_type_def:get_field("_DragonLDurationTimer");
-- blastblight
@@ -149,12 +181,6 @@ local player_data_type_def = sdk.find_type_definition("snow.player.PlayerData");
local virus_overcome_buff_timer_field = player_data_type_def:get_field("_VirusOvercomeBuffTimer");
function this.update(player, player_data)
--local item_parameter = get_ref_item_parameter_method:call(singletons.player_manager);
--if item_parameter == nil then
-- error_handler.report("abnormal_statuses.update", "Failed to access Data: item_parameter");
-- return;
--end
-- Missing:
-- whirlwind?
-- Wind Pressure?
@@ -164,39 +190,63 @@ function this.update(player, player_data)
this.update_muck(player);
this.update_frenzy_infection(player);
buffs.update_generic_buff(this.list, ailments_type_name, "fireblight", this.get_abnormal_status_name, nil, nil, player, fire_duration_timer_field);
buffs.update_generic_buff(this.list, ailments_type_name, "fireblight", this.get_abnormal_status_name, nil, nil, player, fire_duration_timer_field);
buffs.update_generic_buff(this.list, ailments_type_name, "waterblight", this.get_abnormal_status_name, nil, nil, player, water_duration_timer_field);
buffs.update_generic_buff(this.list, ailments_type_name, "iceblight", this.get_abnormal_status_name, nil, nil, player, ice_duration_timer_field);
buffs.update_generic_buff(this.list, ailments_type_name, "thunderblight", this.get_abnormal_status_name, nil, nil, player, thunder_duration_timer_field);
buffs.update_generic_buff(this.list, ailments_type_name, "dragonblight", this.get_abnormal_status_name, nil, nil, player, dragon_duration_timer_field);
buffs.update_generic_buff(this.list, ailments_type_name, "blastblight", this.get_abnormal_status_name, nil, nil, player, bomb_duration_timer_field);
buffs.update_generic_buff(this.list, ailments_type_name, "hellfireblight", this.get_abnormal_status_name, nil, nil, player, oni_bomb_duration_timer_field);
buffs.update_generic_buff(this.list, ailments_type_name, "bloodblight", this.get_abnormal_status_name, nil, nil, player, mystery_debuff_timer_field);
this.update_abnormal_status("fireblight", nil, nil, player, fire_duration_timer_field);
this.update_abnormal_status("waterblight", nil, nil, player, water_duration_timer_field);
this.update_abnormal_status("thunderblight", nil, nil, player, thunder_duration_timer_field);
this.update_abnormal_status("iceblight", nil, nil, player, ice_duration_timer_field);
this.update_abnormal_status("dragonblight", nil, nil, player, dragon_duration_timer_field);
this.update_abnormal_status("blastblight", nil, nil, player, bomb_duration_timer_field);
this.update_abnormal_status("hellfireblight", nil, nil, player, oni_bomb_duration_timer_field);
this.update_abnormal_status("bloodblight", nil, nil, player, mystery_debuff_timer_field);
this.update_abnormal_status("frostblight", player, get_is_frozen_damage_method);
buffs.update_generic_buff(this.list, ailments_type_name, "stun", this.get_abnormal_status_name, nil, nil, player, stun_duration_timer_field);
buffs.update_generic_buff(this.list, ailments_type_name, "paralysis", this.get_abnormal_status_name, nil, nil, player, paralyze_duration_timer_field);
buffs.update_generic_buff(this.list, ailments_type_name, "falling_asleep", this.get_abnormal_status_name, nil, nil, player, get_sleep_movable_timer_method);
buffs.update_generic_buff(this.list, ailments_type_name, "defense_down", this.get_abnormal_status_name, nil, nil, player, defense_down_duration_timer_field);
buffs.update_generic_buff(this.list, ailments_type_name, "resistance_down", this.get_abnormal_status_name, nil, nil, player, resistance_down_duration_timer_field);
this.update_abnormal_status("stun", nil, nil, player, stun_duration_timer_field);
this.update_abnormal_status("paralysis", nil, nil, player, paralyze_duration_timer_field);
this.update_abnormal_status("falling_asleep", nil, nil, player, get_sleep_movable_timer_method);
this.update_abnormal_status("defense_down", nil, nil, player, defense_down_duration_timer_field);
this.update_abnormal_status("resistance_down", nil, nil, player, resistance_down_duration_timer_field);
buffs.update_generic_buff(this.list, ailments_type_name, "tremor", this.get_abnormal_status_name, nil, nil, player, quake_duration_timer_field);
buffs.update_generic_buff(this.list, ailments_type_name, "roar", this.get_abnormal_status_name, nil, nil, player, ear_duration_timer_field);
buffs.update_generic_buff(this.list, ailments_type_name, "webbed", this.get_abnormal_status_name, nil, nil, player, beto_duration_timer_field);
buffs.update_generic_buff(this.list, ailments_type_name, "stench", this.get_abnormal_status_name, nil, nil, player, stink_duration_timer_field);
buffs.update_generic_buff(this.list, ailments_type_name, "leeched", this.get_abnormal_status_name, nil, nil, player, blooding_enemy_timer_field, true);
buffs.update_generic_buff(this.list, ailments_type_name, "bleeding", this.get_abnormal_status_name, nil, nil, player, bleeding_debuff_timer_field);
this.update_abnormal_status("tremor", nil, nil, player, quake_duration_timer_field);
this.update_abnormal_status("roar", nil, nil, player, ear_duration_timer_field);
this.update_abnormal_status("webbed", nil, nil, player, beto_duration_timer_field);
this.update_abnormal_status("stench", nil, nil, player, stink_duration_timer_field);
this.update_abnormal_status("leeched", nil, nil, player, blooding_enemy_timer_field, true);
this.update_abnormal_status("bleeding", nil, nil, player, bleeding_debuff_timer_field);
this.update_abnormal_status("engulfed", player, get_is_vacuum_damage_method);
buffs.update_generic_buff(this.list, ailments_type_name, "frenzy", this.get_abnormal_status_name, nil, nil, player, virus_onset_timer_field);
buffs.update_generic_buff(this.list, ailments_type_name, "frenzy_overcome", this.get_abnormal_status_name, nil, nil, player_data, virus_overcome_buff_timer_field);
buffs.update_generic_buff(this.list, ailments_type_name, "engulfed", this.get_abnormal_status_name, player, get_is_vacuum_damage_method);
buffs.update_generic_buff(this.list, ailments_type_name, "frostblight", this.get_abnormal_status_name, player, get_is_frozen_damage_method);
this.update_abnormal_status("frenzy", nil, nil, player, virus_onset_timer_field);
this.update_abnormal_status("frenzy_overcome", nil, nil, player_data, virus_overcome_buff_timer_field);
this.update_sleep(player);
end
function this.update_abnormal_status(key, value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints)
return buffs.update_generic_buff(this.list, config.current_config.buff_UI.filter.abnormal_statuses, this.get_abnormal_status_name, key,
value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints);
end
function this.update_generic(key, level, timer)
return buffs.update_generic(this.list, this.get_abnormal_status_name, key, level, timer);
end
function this.apply_filter(key)
return buffs.apply_filter(this.list, config.current_config.buff_UI.filter.abnormal_statuses, key);
end
function this.update_poison(player)
local cached_config = config.current_config.buff_UI.filter.abnormal_statuses;
if not cached_config.poison
and not cached_config.deadly_poison then
if this.apply_filter("poison") then
return;
end
if this.apply_filter("deadly_poison") then
return;
end
end
local poison_level = poison_level_field:get_data(player);
if poison_level == nil then
error_handler.report("abnormal_statuses.update_poison", "Failed to access Data: poison_level");
@@ -210,15 +260,28 @@ function this.update_poison(player)
end
if poison_level == 1 then
buffs.update_generic_buff(this.list, ailments_type_name, "poison", this.get_abnormal_status_name, player, poison_duration_timer_field);
this.update_abnormal_status("poison", nil, nil, player, poison_duration_timer_field);
this.list.deadly_poison = nil;
else
buffs.update_generic_buff(this.list, ailments_type_name, "deadly_poison", this.get_abnormal_status_name, player, poison_duration_timer_field);
this.update_abnormal_status("deadly_poison", nil, nil, player, poison_duration_timer_field);
this.list.poison = nil;
end
end
function this.update_bubbleblight(player)
local cached_config = config.current_config.buff_UI.filter.abnormal_statuses;
if not cached_config.minor_bubbleblight
and not cached_config.major_bubbleblight then
if this.apply_filter("minor_bubbleblight") then
return;
end
if this.apply_filter("major_bubbleblight") then
return;
end
end
local bubble_type = bubble_type_field:get_data(player);
if bubble_type == nil then
error_handler.report("abnormal_statuses.update_bubbleblight", "Failed to access Data: bubble_Type");
@@ -232,15 +295,19 @@ function this.update_bubbleblight(player)
end
if bubble_type == 1 then
buffs.update_generic_buff(this.list, ailments_type_name, "minor_bubbleblight", this.get_abnormal_status_name, player, bubble_damage_timer_field);
this.update_abnormal_status("minor_bubbleblight", nil, nil, player, bubble_damage_timer_field);
this.list.major_bubbleblight = nil;
else
buffs.update_generic_buff(this.list, ailments_type_name, "major_bubbleblight", this.get_abnormal_status_name, player, bubble_damage_timer_field);
this.update_abnormal_status("major_bubbleblight", nil, nil, player, bubble_damage_timer_field);
this.list.minor_bubbleblight = nil;
end
end
function this.update_muck(player)
if this.apply_filter("muck") then
return;
end
local is_mud_damage = get_is_mud_damage_method:call(player);
if is_mud_damage == nil then
error_handler.report("abnormal_statuses.update_generic_boolean_value_method", "Failed to access Data: is_mud_damage");
@@ -258,10 +325,14 @@ function this.update_muck(player)
return;
end
buffs.update_generic(ailments_type_name, "muck", this.get_abnormal_status_name);
this.update_generic("muck");
end
function this.update_frenzy_infection(player)
if this.apply_filter("frenzy_infection") then
return;
end
local virus_accumulator_value = virus_accumulator_field:get_data(player);
if virus_accumulator_value == nil then
error_handler.report("abnormal_statuses.update_frenzy_infection", "Failed to access Data: virus_accumulator_value");
@@ -281,16 +352,20 @@ function this.update_frenzy_infection(player)
local timer = frenzy_infected_duration - (virus_accumulator_value + virus_timer / 60);
buffs.update_generic(this.list, ailments_type_name, "frenzy_infection", this.get_abnormal_status_name, 1, timer);
this.update_generic("frenzy_infection", 1, timer);
end
function this.update_sleep(player)
if this.apply_filter("sleep") then
return;
end
if this.list.falling_asleep ~= nil then
this.list.sleep = nil;
return;
end
buffs.update_generic_buff(this.list, ailments_type_name, "sleep", this.get_abnormal_status_name, nil, nil, player, sleep_duration_timer_field);
this.update_abnormal_status("sleep", nil, nil, player, sleep_duration_timer_field);
end
function this.init_names()
@@ -299,10 +374,10 @@ function this.init_names()
end
end
function this.get_abnormal_status_name(abnormal_status_key)
local abnormal_status_name = language.current_language.ailments[abnormal_status_key];
function this.get_abnormal_status_name(key)
local abnormal_status_name = language.current_language.ailments[key];
if abnormal_status_name == nil then
return abnormal_status_key;
return key;
end
return abnormal_status_name;

View File

@@ -54,6 +54,7 @@ local package = package;
local player_manager_type_def = sdk.find_type_definition("snow.player.PlayerManager");
local find_master_player_method = player_manager_type_def:get_method("findMasterPlayer");
local get_ref_item_parameter_method = player_manager_type_def:get_method("get_RefItemParameter");
local player_base_type_def = find_master_player_method:get_return_type();
local get_player_data_method = player_base_type_def:get_method("get_PlayerData");
@@ -63,7 +64,7 @@ local player_lobby_base_type_def = sdk.find_type_definition("snow.player.PlayerL
local player_base_type_def = sdk.find_type_definition("snow.player.PlayerBase");
local player_weapon_type_field = player_base_type_def:get_field("_playerWeaponType");
function this.new(type, key, name, level, duration)
function this.new(key, name, level, duration)
local is_infinite = false;
if name == nil then
@@ -82,7 +83,6 @@ function this.new(type, key, name, level, duration)
local buff = {};
buff.type = type;
buff.key = key;
buff.name = name;
buff.level = level;
@@ -90,7 +90,7 @@ function this.new(type, key, name, level, duration)
buff.timer = duration;
buff.duration = duration;
buff.is_active = true;
buff.is_visible = true;
buff.timer_percentage = 0;
@@ -122,6 +122,8 @@ function this.init_names()
misc_buffs.init_names();
end
local tere = {};
function this.update()
if not config.current_config.buff_UI.enabled then
return;
@@ -154,27 +156,40 @@ function this.update()
local weapon_type = player_weapon_type_field:get_data(master_player);
if weapon_type == nil then
error_handler.report("skills.update", "Failed to access Data: weapon_type");
error_handler.report("buffs.update", "Failed to access Data: weapon_type");
return;
end
if singletons.player_manager == nil then
error_handler.report("buffs.update", "Failed to access Data: player_manager");
return;
end
local item_parameter = get_ref_item_parameter_method:call(singletons.player_manager);
if item_parameter == nil then
error_handler.report("buffs.update", "Failed to access Data: item_parameter");
return;
end
local is_player_lobby_base = master_player:get_type_definition() == player_lobby_base_type_def;
item_buffs.update(master_player_data);
otomo_moves.update(master_player_data);
item_buffs.update(master_player_data, item_parameter);
rampage_skills.update(master_player_data);
otomo_moves.update(master_player_data);
if not is_player_lobby_base then
skills.update(master_player, master_player_data, weapon_type);
dango_skills.update(master_player, master_player_data);
endemic_life_buffs.update(master_player, master_player_data);
abnormal_statuses.update(master_player, master_player_data);
endemic_life_buffs.update(master_player, master_player_data);
dango_skills.update(master_player, master_player_data);
skills.update(master_player, master_player_data, weapon_type);
weapon_skills.update(master_player, master_player_data, weapon_type);
misc_buffs.update(master_player, master_player_data);
misc_buffs.update(master_player, master_player_data, item_parameter);
end
end
function this.update_timer(buff, timer)
buff.is_visible = true;
if timer == nil then
return;
end
@@ -183,7 +198,7 @@ function this.update_timer(buff, timer)
timer = 0;
end
if timer > buff.duration then
if timer > buff.duration or timer > buff.timer then
buff.duration = timer;
end
@@ -198,13 +213,16 @@ function this.update_timer(buff, timer)
end
end
function this.update_generic_buff(buff_list, buff_type, buff_key, get_name_function,
function this.update_generic_buff(buff_list, filter_list, get_name_function, buff_key,
value_owner, value_holder,
timer_owner, timer_holder,
is_infinite, minimal_value, level_breakpoints)
if this.apply_filter(buff_list, filter_list, buff_key) then
return;
end
if timer_owner == nil then timer_owner = value_owner; end
if duration_owner == nil then duration_owner = value_owner; end
if minimal_value == nil then minimal_value = 1; end
local level = 1;
@@ -270,33 +288,23 @@ function this.update_generic_buff(buff_list, buff_type, buff_key, get_name_funct
end
end
-- local duration = nil;
-- if duration_holder ~= nil then
-- if utils.type.is_REField(duration_holder) then
-- duration = duration_holder:get_data(duration_owner);
-- else
-- duration = duration_holder:call(duration_owner);
-- end
-- if duration == nil then
-- error_handler.report("buffs.update_generic_number", string.format("Failed to access Data: %s_duration", buff_key));
-- return;
-- end
-- end
return this.update_generic(buff_list, buff_type, buff_key, get_name_function, level, timer);
return this.update_generic(buff_list, get_name_function, buff_key, level, timer);
end
function this.update_generic(buff_list, buff_type, buff_key, get_name_function, level, timer)
function this.update_generic(buff_list, get_name_function, buff_key, level, timer)
level = level or 1;
local buff = buff_list[buff_key];
if buff == nil then
local name = get_name_function(buff_key);
buff = this.new(buff_type, buff_key, name, level, timer);
buff = this.new(buff_key, name, level, timer);
buff_list[buff_key] = buff;
else
if buff.level ~= level then
buff.duration = timer;
end
buff.level = level;
this.update_timer(buff, timer);
end
@@ -304,6 +312,38 @@ function this.update_generic(buff_list, buff_type, buff_key, get_name_function,
return buff;
end
function this.apply_filter(buff_list, filter_list, buff_key)
if filter_list[buff_key] then
return false;
end
local buff = buff_list[buff_key];
if buff == nil then
return true;
end
if not buff.is_visible then
return true;
end
if buff.is_infinite then
buff_list[buff_key] = nil;
return true;
end
time.new_delay_timer(function()
local _buff = buff_list[buff_key];
if _buff ~= nil and not _buff.is_visible then
buff_list[buff_key] = nil;
end
end, buff.timer);
buff.is_visible = false;
return true;
end
function this.draw(buff, buff_UI, position_on_screen, opacity_scale)
buff_UI_entity.draw(buff, buff_UI, position_on_screen, opacity_scale);
end

View File

@@ -8,6 +8,7 @@ local players;
local utils;
local language;
local error_handler;
local time;
local sdk = sdk;
local tostring = tostring;
@@ -54,6 +55,19 @@ this.list = {
super_recovery_dango = nil
};
this.keys = {
"dango_adrenaline",
"dango_booster",
"dango_insurance",
"dango_insurance_defense_up",
"dango_glutton",
"dango_flyer",
"dango_defender",
"dango_hunter",
"dango_connector",
"super_recovery_dango"
};
local dango_skill_ids = {
-- dango_polisher = 1,
-- dango_rider = 2,
@@ -84,7 +98,7 @@ local dango_skill_ids = {
-- dango_trainer = 27,
dango_booster = 28,
-- dango_feet = 29,
-- dango_bulker = 30,
dango_bulker = 30,
dango_insurance = 31,
-- dango_reviver = 32,
-- dango_summoner = 33,
@@ -115,7 +129,6 @@ local dango_skill_ids = {
this.is_dango_adrenaline_active = false;
local dango_skills_type_name = "dango_skills";
local dango_bulker_attack_up = 15;
local previous_super_recovery_dango_timer = 0;
@@ -125,7 +138,7 @@ local has_anyone_kitchen_skill_in_quest_method = player_manager_type_def:get_met
local player_data_type_def = sdk.find_type_definition("snow.player.PlayerData");
-- Dango Defender
local is_enable_kitchen_skill_048_reduce_method = player_data_type_def:get_field("_IsEnable_KitchenSkill048_Reduce");
local is_enable_kitchen_skill_048_reduce_field = player_data_type_def:get_field("_IsEnable_KitchenSkill048_Reduce");
-- Dango Booster
local kitchen_skill_027_timer_field = player_data_type_def:get_field("_KitchenSkill027Timer");
-- Dango Glutton
@@ -158,6 +171,8 @@ local flag_cat_skill_insurance_field = quest_manager_type_def:get_field("_FlagCa
local is_cat_skill_insurance_method = quest_manager_type_def:get_method("isCatSkillInsurance");
function this.update(player, player_data)
this.update_dango_adrenaline();
this.update_dango_hunter(player_data);
this.update_dango_insurance();
@@ -165,22 +180,43 @@ function this.update(player, player_data)
this.update_dango_flyer(player);
this.update_super_recovery_dango(player);
buffs.update_generic_buff(this.list, dango_skills_type_name, "dango_booster", this.get_dango_skill_name, nil, nil, player_data, kitchen_skill_027_timer_field);
buffs.update_generic_buff(this.list, dango_skills_type_name, "dango_defender", this.get_dango_skill_name, player_data, is_enable_kitchen_skill_048_reduce_method, nil, nil, true);
buffs.update_generic_buff(this.list, dango_skills_type_name, "dango_glutton", this.get_dango_skill_name, nil, nil, player_data, kitchen_skill_045_timer_field);
buffs.update_generic_buff(this.list, dango_skills_type_name, "dango_connector", this.get_dango_skill_name, nil, nil, player_data, kitchen_skill_054_timer_field);
this.update_dango_skill("dango_booster", nil, nil, player_data, kitchen_skill_027_timer_field);
this.update_dango_skill("dango_defender", player_data, is_enable_kitchen_skill_048_reduce_field, nil, nil, true);
this.update_dango_skill("dango_glutton", nil, nil, player_data, kitchen_skill_045_timer_field);
this.update_dango_skill("dango_connector", nil, nil, player_data, kitchen_skill_054_timer_field);
end
function this.update_dango_skill(key, value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints)
return buffs.update_generic_buff(this.list, config.current_config.buff_UI.filter.dango_skills, this.get_dango_skill_name, key,
value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints);
end
function this.update_generic(key, level, timer)
return buffs.update_generic(this.list, this.get_dango_skill_name, key, level, timer);
end
function this.apply_filter(key)
return buffs.apply_filter(this.list, config.current_config.buff_UI.filter.dango_skills, key);
end
function this.update_dango_adrenaline()
if this.apply_filter("dango_adrenaline") then
return;
end
if not this.is_dango_adrenaline_active then
this.list.dango_adrenaline = nil;
return;
end
buffs.update_generic(this.list, dango_skills_type_name, "dango_adrenaline", this.get_dango_skill_name);
this.update_generic("dango_adrenaline");
end
function this.update_dango_insurance()
if this.apply_filter("dango_insurance") then
return;
end
if singletons.player_manager == nil then
error_handler.report("dango_skills.update_dango_insurance", "Failed to access Data: player_manager");
return;
@@ -210,10 +246,14 @@ function this.update_dango_insurance()
return;
end
buffs.update_generic(this.list, dango_skills_type_name, "dango_insurance", this.get_dango_skill_name, 1);
this.update_generic("dango_insurance");
end
function this.update_dango_insurance_defense_up(player_data)
if this.apply_filter("dango_insurance_defense_up") then
return;
end
local level = 3;
local insurance_def_up_lv3 = kitchen_skill_insurance_def_up_lv3_field:get_data(player_data);
@@ -238,10 +278,14 @@ function this.update_dango_insurance_defense_up(player_data)
level = 4;
end
buffs.update_generic(this.list, dango_skills_type_name, "dango_insurance_defense_up", this.get_dango_skill_name, level);
this.update_generic("dango_insurance_defense_up", level);
end
function this.update_dango_flyer(player)
if this.apply_filter("dango_flyer") then
return;
end
local level = 4;
local is_kitchen_skill_wire_stop_regene = get_is_kitchen_skill_wire_stop_regene_method:call(player);
@@ -266,11 +310,11 @@ function this.update_dango_flyer(player)
level = 3;
end
buffs.update_generic(this.list, dango_skills_type_name, "dango_flyer", this.get_dango_skill_name, level);
this.update_generic("dango_flyer", level);
end
function this.update_dango_hunter(player_data)
local dango_hunter_buff = buffs.update_generic_buff(this.list, dango_skills_type_name, "dango_hunter", this.get_dango_skill_name, nil, nil, player_data, kitchen_skill_051_atk_up_timer_field);
local dango_hunter_buff = this.update_dango_skill("dango_hunter", nil, nil, player_data, kitchen_skill_051_atk_up_timer_field);
if dango_hunter_buff ~= nil then
dango_hunter_buff.level = 4;
@@ -278,6 +322,10 @@ function this.update_dango_hunter(player_data)
end
function this.update_super_recovery_dango(player)
if this.apply_filter("super_recovery_dango") then
return;
end
local kitchen_skill_surume_regene_timer = get_kitchen_skill_surume_regene_timer_method:call(player);
if kitchen_skill_surume_regene_timer == nil then
error_handler.report("dango_skills.update_super_recovery_dango", "Failed to access Data: kitchen_skill_surume_regene_timer");
@@ -285,23 +333,22 @@ function this.update_super_recovery_dango(player)
end
if utils.number.is_equal(kitchen_skill_surume_regene_timer, 0)
and utils.number.is_equal(previous_super_recovery_dango_timer, 0) then
and utils.number.is_equal(previous_super_recovery_dango_timer, 0) then
this.list.super_recovery_dango = nil;
return;
end
previous_super_recovery_dango_timer = kitchen_skill_surume_regene_timer;
buffs.update_generic(this.list, dango_skills_type_name, "super_recovery_dango", this.get_dango_skill_name);
this.update_generic("super_recovery_dango");
end
function this.get_dango_skill_name(dango_key)
local dango_skill_id = dango_skill_ids[dango_key];
function this.get_dango_skill_name(key)
local dango_skill_id = dango_skill_ids[key];
if dango_skill_id == nil then
local dango_skill_name = language.current_language.dango_skills[dango_key];
local dango_skill_name = language.current_language.dango_skills[key];
if dango_skill_name == nil then
return dango_key;
return key;
end
return dango_skill_name;
@@ -309,8 +356,8 @@ function this.get_dango_skill_name(dango_key)
local dango_skill_name = get_name_method:call(nil, dango_skill_id);
if dango_skill_name == nil then
error_handler.report("dango_skills.get_dango_name", string.format("Failed to access Data: %s_name", dango_key));
return dango_key;
error_handler.report("dango_skills.get_dango_name", string.format("Failed to access Data: %s_name", key));
return key;
end
return dango_skill_name;
@@ -325,6 +372,7 @@ function this.init_dependencies()
players = require("MHR_Overlay.Damage_Meter.players");
language = require("MHR_Overlay.Misc.language");
error_handler = require("MHR_Overlay.Misc.error_handler");
time = require("MHR_Overlay.Game_Handler.time");
end

View File

@@ -10,6 +10,7 @@ local language;
local error_handler;
local env_creature;
local item_buffs;
local time;
local sdk = sdk;
local tostring = tostring;
@@ -55,12 +56,22 @@ this.list = {
yellow_lampsquid = nil
};
this.peepersects_duration = 90;
this.keys = {
"clothfly",
"stinkmink",
"butterflame",
-- "peepersects",
"cutterfly",
"ruby_wirebug",
"gold_wirebug",
"red_lampsquid",
"yellow_lampsquid"
};
local endemic_life_buffs_type_name = "endemic_life_buffs";
this.peepersects_duration = 90;
this.butterflame_attack_up = 25;
local marionette_mode_types = { "ruby_wirebug", "gold_wirebug" };
local butterflame_attack_up = 25;
@@ -93,23 +104,40 @@ function this.update(player, player_data, item_parameter)
this.update_ruby_and_gold_wirebugs(player, player_data);
this.update_butterflame(player_data);
buffs.update_generic_buff(this.list, endemic_life_buffs_type_name, "cutterfly", this.get_endemic_life_name,
nil, nil, player_data, crit_up_ec_second_timer_field);
this.update_endemic_life_buff("cutterfly", nil, nil, player_data, crit_up_ec_second_timer_field);
this.update_endemic_life_buff("clothfly", nil, nil, player_data, def_up_buff_second_rate_timer_field);
this.update_endemic_life_buff("stinkmink", nil, nil, player_data, lead_enemy_timer_field);
this.update_endemic_life_buff("red_lampsquid", nil, nil, player_data, atk_up_ec_second_timer_field);
this.update_endemic_life_buff("yellow_lampsquid", nil, nil, player_data, def_up_ec_second_timer_field);
end
buffs.update_generic_buff(this.list, endemic_life_buffs_type_name, "clothfly", this.get_endemic_life_name,
nil, nil, player_data, def_up_buff_second_rate_timer_field);
function this.update_endemic_life_buff(key, value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints)
return buffs.update_generic_buff(this.list, config.current_config.buff_UI.filter.endemic_life_buffs, this.get_endemic_life_name, key,
value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints)
end
buffs.update_generic_buff(this.list, endemic_life_buffs_type_name, "stinkmink", this.get_endemic_life_name,
nil, nil, player_data, lead_enemy_timer_field);
function this.update_generic(key, level, timer)
return buffs.update_generic(this.list, this.get_endemic_life_name, key, level, timer);
end
buffs.update_generic_buff(this.list, endemic_life_buffs_type_name, "red_lampsquid", this.get_endemic_life_name,
nil, nil, player_data, atk_up_ec_second_timer_field);
buffs.update_generic_buff(this.list, endemic_life_buffs_type_name, "yellow_lampsquid", this.get_endemic_life_name,
nil, nil, player_data, def_up_ec_second_timer_field);
function this.apply_filter(key)
return buffs.apply_filter(this.list, config.current_config.buff_UI.filter.endemic_life_buffs, key);
end
function this.update_ruby_and_gold_wirebugs(player, player_data)
local cached_config = config.current_config.buff_UI.filter.endemic_life_buffs;
if not cached_config.ruby_wirebug
and not cached_config.gold_wirebug then
if this.apply_filter("ruby_wirebug") then
return;
end
if this.apply_filter("gold_wirebug") then
return;
end
end
local marionette_mode_type = get_marionette_mode_type_method:call(player);
if marionette_mode_type == nil then
error_handler.report("endemic_life_buffs.update_ruby_and_gold_wirebugs", "Failed to access Data: marionette_mode_type");
@@ -126,37 +154,38 @@ function this.update_ruby_and_gold_wirebugs(player, player_data)
end
local endemic_life_buff_key = marionette_mode_types[marionette_mode_type];
buffs.update_generic_buff(this.list, endemic_life_buffs_type_name, endemic_life_buff_key, this.get_endemic_life_name,
nil, nil, player_data, wirebug_powerup_timer_field);
this.update_endemic_life_buff(endemic_life_buff_key, nil, nil, player_data, wirebug_powerup_timer_field);
end
function this.update_butterflame(player_data)
if this.apply_filter("butterflame") then
return;
end
local atk_up_buff_second = atk_up_buff_second_field:get_data(player_data);
if atk_up_buff_second == nil then
error_handler.report("item_buffs.update_butterflame", "Failed to access Data: atk_up_buff_second");
return;
end
if atk_up_buff_second ~= butterflame_attack_up then
if atk_up_buff_second ~= this.butterflame_attack_up then
this.list.butterflame = nil;
return;
end
buffs.update_generic_buff(this.list, endemic_life_buffs_type_name, "butterflame", this.get_endemic_life_name,
nil, nil, player_data, atk_up_buff_second_timer_field);
this.update_endemic_life_buff("butterflame", nil, nil, player_data, atk_up_buff_second_timer_field);
end
function this.get_endemic_life_name(endemic_life_buff_key)
function this.get_endemic_life_name(key)
if singletons.message_manager == nil then
error_handler.report("endemic_life_buffs.get_endemic_life_name", "Failed to access Data: message_manager");
return endemic_life_buff_key;
return key;
end
local endemic_life_name = get_env_creature_name_message_method:call(singletons.message_manager, env_creature.creature_ids[endemic_life_buff_key]);
local endemic_life_name = get_env_creature_name_message_method:call(singletons.message_manager, env_creature.creature_ids[key]);
if endemic_life_name == nil then
error_handler.report("endemic_life_buffs.get_endemic_life_name", string.format("Failed to access Data: %s_name", endemic_life_buff_key));
return endemic_life_buff_key;
error_handler.report("endemic_life_buffs.get_endemic_life_name", string.format("Failed to access Data: %s_name", key));
return key;
end
return endemic_life_name;
@@ -173,6 +202,7 @@ function this.init_dependencies()
error_handler = require("MHR_Overlay.Misc.error_handler");
env_creature = require("MHR_Overlay.Endemic_Life.env_creature");
item_buffs = require("MHR_Overlay.Buffs.item_buffs");
time = require("MHR_Overlay.Game_Handler.time");
end
function this.init_module()

View File

@@ -47,49 +47,55 @@ this.list = {
mega_demondrug = nil,
armorskin = nil,
mega_armorskin = nil,
-- might_seed = nil,
might_seed = nil,
-- adamant_seed = nil,
demon_powder = nil,
hardshell_powder = nil,
immunizer = nil,
-- immunizer = nil,
-- dash_juice = nil,
gourmet_fish = nil,
};
this.keys = {
"demondrug",
"mega_demondrug",
"armorskin",
"mega_armorskin",
"might_seed",
-- "adamant_seed",
"demon_powder",
"hardshell_powder",
-- "immunizer",
-- "dash_juice",
"gourmet_fish",
};
local item_ids = {
demondrug = 68157917,
mega_demondrug = 68157918,
armorskin = 68157922,
mega_armorskin = 68157923,
--might_seed = 68157919,
--adamant_seed = 68157924,
might_seed = 68157919,
adamant_seed = 68157924,
demon_powder = 68157920,
hardshell_powder = 68157925,
--immunizer = 68157911,
--dash_juice = 68157913,
immunizer = 68157911,
dash_juice = 68157913,
gourmet_fish = 68157909,
demon_ammo = 68157595,
armor_ammo = 68157596
}
local item_buffs_type_name = "item_buffs";
local player_manager_type_def = sdk.find_type_definition("snow.player.PlayerManager");
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");
this.might_seed_attack_up = 10;
local player_data_type_def = sdk.find_type_definition("snow.player.PlayerData");
-- Demondrug/Mega Demondrug
local atk_up_alive_field = player_data_type_def:get_field("_AtkUpAlive");
-- Armorskin/Mega Armorskin
local def_up_alive_field = player_data_type_def:get_field("_DefUpAlive");
-- Might Seed
local atk_up_buff_second_field = player_data_type_def:get_field("_AtkUpBuffSecond");
local atk_up_buff_second_timer_field = player_data_type_def:get_field("_AtkUpBuffSecondTimer");
-- Demon Powder
local atk_up_item_second_field = player_data_type_def:get_field("_AtkUpItemSecond");
local atk_up_item_second_timer_field = player_data_type_def:get_field("_AtkUpItemSecondTimer");
@@ -103,43 +109,58 @@ local kijin_bullet_timer_field = player_data_type_def:get_field("_KijinBulletTim
-- Armor Ammo
local kouka_bullet_timer_field = player_data_type_def:get_field("_KoukaBulletTimer");
local player_manager_type_def = sdk.find_type_definition("snow.player.PlayerManager");
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();
-- Demondrug/Mega Demondrug
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");
-- Armorskin/Mega Armorskin
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");
-- Might Seed
local might_seed_atk_up_field = player_user_data_item_parameter_type_def:get_field("_MightSeedAtkUp");
local data_shortcut_type_def = sdk.find_type_definition("snow.data.DataShortcut");
local get_name_method = data_shortcut_type_def:get_method("getName(snow.data.ContentsIdSystem.ItemId)");
function this.update(player_data)
if singletons.player_manager == nil then
error_handler.report("item_buffs.update", "Failed to access Data: player_manager");
return;
end
local item_parameter = get_ref_item_parameter_method:call(singletons.player_manager);
if item_parameter == nil then
error_handler.report("item_buffs.update", "Failed to access Data: item_parameter");
return;
end
local cached_language = language.current_language;
function this.update(player_data, item_parameter)
this.update_demondrug(player_data, item_parameter);
this.update_armorskin(player_data, item_parameter);
this.update_might_seed(player_data, item_parameter);
buffs.update_generic_buff(this.list, item_buffs_type_name, "demon_powder", this.get_item_buff_name,
player_data, atk_up_item_second_field, player_data, atk_up_item_second_timer_field);
buffs.update_generic_buff(this.list, item_buffs_type_name, "hardshell_powder", this.get_item_buff_name,
player_data, def_up_item_second_field, player_data, def_up_item_second_timer_field);
this.update_item_buff("demon_powder", player_data, atk_up_item_second_field, player_data, atk_up_item_second_timer_field);
this.update_item_buff("hardshell_powder", player_data, def_up_item_second_field, player_data, def_up_item_second_timer_field);
this.update_item_buff("gourmet_fish", nil, nil, player_data, fish_regene_enable_field);
this.update_item_buff("demon_ammo", nil, nil, player_data, kijin_bullet_timer_field);
this.update_item_buff("armor_ammo", nil, nil, player_data, kouka_bullet_timer_field);
end
buffs.update_generic_buff(this.list, item_buffs_type_name, "gourmet_fish", this.get_item_buff_name,
nil, nil, player_data, fish_regene_enable_field);
function this.update_item_buff(key, value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints)
return buffs.update_generic_buff(this.list, config.current_config.buff_UI.filter.item_buffs, this.get_item_buff_name, key,
value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints)
end
buffs.update_generic_buff(this.list, item_buffs_type_name, "demon_ammo", this.get_item_buff_name,
nil, nil, player_data, kijin_bullet_timer_field);
function this.update_generic(key, level, timer)
return buffs.update_generic(this.list, this.get_item_buff_name, key, level, timer);
end
buffs.update_generic_buff(this.list, item_buffs_type_name, "armor_ammo", this.get_item_buff_name,
nil, nil, player_data, kouka_bullet_timer_field);
function this.apply_filter(key)
return buffs.apply_filter(this.list, config.current_config.buff_UI.filter.item_buffs, key);
end
function this.update_demondrug(player_data, item_parameter)
local cached_config = config.current_config.buff_UI.filter.item_buffs;
if not cached_config.demondrug and not cached_config.mega_demondrug then
this.list.demondrug = nil;
this.list.mega_demondrug = nil;
return;
end
local demondrug_value = atk_up_alive_field:get_data(player_data);
if demondrug_value == nil then
error_handler.report("item_buffs.update_demondrug", "Failed to access Data: demondrug_value");
@@ -174,10 +195,23 @@ function this.update_demondrug(player_data, item_parameter)
this.list.demondrug = nil;
end
buffs.update_generic(this.list, item_buffs_type_name, item_key, this.get_item_buff_name);
if not cached_config[item_key] then
this.list[item_key] = nil;
return;
end
this.update_generic(item_key);
end
function this.update_armorskin(player_data, item_parameter)
local cached_config = config.current_config.buff_UI.filter.item_buffs;
if not cached_config.armorskin and not cached_config.mega_armorskin then
this.list.armorskin = nil;
this.list.mega_armorskin = nil;
return;
end
local armorskin_value = def_up_alive_field:get_data(player_data);
if armorskin_value == nil then
error_handler.report("item_buffs.update_armorskin", "Failed to access Data: armorskin_value");
@@ -212,14 +246,44 @@ function this.update_armorskin(player_data, item_parameter)
this.list.armorskin = nil;
end
buffs.update_generic(this.list, item_buffs_type_name, item_key, this.get_item_buff_name);
if not cached_config[item_key] then
this.list[item_key] = nil;
return;
end
this.update_generic(item_key);
end
function this.get_item_buff_name(item_key)
local item_buff_name = get_name_method:call(nil, item_ids[item_key]);
function this.update_might_seed(player_data, item_parameter)
if this.apply_filter("might_seed") then
return;
end
local atk_up_buff_second = atk_up_buff_second_field:get_data(player_data);
if atk_up_buff_second == nil then
error_handler.report("item_buffs.update_might_seed", "Failed to access Data: atk_up_buff_second");
return;
end
local might_seed_atk_up = might_seed_atk_up_field:get_data(item_parameter);
if might_seed_atk_up == nil then
error_handler.report("item_buffs.update_might_seed", "Failed to access Data: might_seed_atk_up");
return;
end
if atk_up_buff_second ~= might_seed_atk_up then
this.list.might_seed = nil;
return;
end
this.update_item_buff("might_seed", nil, nil, player_data, atk_up_buff_second_timer_field);
end
function this.get_item_buff_name(key)
local item_buff_name = get_name_method:call(nil, item_ids[key]);
if item_buff_name == nil then
error_handler.report("item_buffs.get_item_buff_name", string.format("Failed to access Data: %s_name", item_key));
return item_key;
error_handler.report("item_buffs.get_item_buff_name", string.format("Failed to access Data: %s_name", key));
return key;
end
return item_buff_name;

View File

@@ -8,6 +8,7 @@ local players;
local utils;
local language;
local error_handler;
local time;
local sdk = sdk;
local tostring = tostring;
@@ -72,6 +73,37 @@ local package = package;
sharpness_extension = 27
};]]
this.keys = {
"self_improvement",
"attack_up",
"defense_up",
"affinity_up",
"elemental_attack_boost",
"attack_and_defense_up",
"attack_and_affinity_up",
"knockbacks_negated",
"earplugs_s",
"earplugs_l",
"tremors_negated",
"wind_pressure_negated",
"stun_negated",
"blight_negated",
"divine_protection",
"health_recovery_s",
"health_recovery_l",
"health_recovery_s_antidote",
"health_regeneration",
"stamina_use_reduced",
"stamina_recovery_up",
"sharpness_loss_reduced",
"environment_damage_negated",
"sonic_wave",
"sonic_barrier",
"infernal_melody",
"sharpness_regeneration",
"sharpness_extension"
};
this.list = {};
local player_manager_type_def = sdk.find_type_definition("snow.player.PlayerManager");
@@ -97,30 +129,40 @@ function this.update(master_player)
return;
end
local length = get_length_method:call(music_data_array) - 1;
local length = get_length_method:call(music_data_array);
if length == nil then
error_handler.report("melody_effects.update", "Failed to access Data: music_data_array -> length");
return;
end
for i = 0, length do
local music_data = get_value_method:call(music_data_array, i);
if music_data == nil then
error_handler.report("melody_effects.update", "Failed to access Data: music_data No." .. tostring(i));
length = length - 1;
for id = 0, length do
local lua_index = id + 1;
local melody_effect = this.list[lua_index];
local key = this.keys[lua_index];
if this.apply_filter(key, lua_index) then
goto continue;
end
this.update_melody_effect(i, music_data);
local music_data = get_value_method:call(music_data_array, id);
if music_data == nil then
error_handler.report("melody_effects.update", "Failed to access Data: music_data No." .. tostring(id));
goto continue;
end
this.update_melody_effect(lua_index, id, key, melody_effect, music_data);
::continue::
end
end
function this.update_melody_effect(index, melody_data)
local lua_index = index + 1;
function this.update_melody_effect(lua_index, id, key, melody_effect, melody_data)
local melody_timer = time_field:get_data(melody_data);
if melody_timer == nil then
error_handler.report("melody_effects.update_melody_effect", "Failed to access Data: melody_timer No. " .. tostring(index));
error_handler.report("melody_effects.update_melody_effect", "Failed to access Data: melody_timer No. " .. tostring(id));
return;
end
@@ -129,21 +171,52 @@ function this.update_melody_effect(index, melody_data)
return;
end
local melody_effect = this.list[lua_index];
if melody_effect == nil then
local melody_effect_name = this.get_melody_effect_name(index);
local melody_effect_name = this.get_melody_effect_name(id);
melody_effect = buffs.new("melody_effects", lua_index, melody_effect_name, 1, melody_timer / 60);
melody_effect = buffs.new(key, melody_effect_name, 1, melody_timer / 60);
this.list[lua_index] = melody_effect;
else
buffs.update_timer(melody_effect, melody_timer / 60);
end
end
function this.get_melody_effect_name(melody_effect_id)
local melody_effect_name = get_name_method:call(nil, melody_effect_id);
function this.apply_filter(key, lua_index)
if config.current_config.buff_UI.filter.melody_effects[key] then
return false;
end
local buff = this.list[lua_index];
if buff == nil then
return true;
end
if not buff.is_visible then
return true;
end
if buff.is_infinite then
this.list[lua_index] = nil;
return true;
end
time.new_delay_timer(function()
local _buff = this.list[lua_index];
if _buff ~= nil and not _buff.is_visible then
this.list[lua_index] = nil;
end
end, buff.timer);
buff.is_visible = false;
return true;
end
function this.get_melody_effect_name(id)
local melody_effect_name = get_name_method:call(nil, id);
if melody_effect_name == nil then
local name = string.format("Melody Effect No. %d", melody_effect_id);
local name = string.format("Melody Effect No. %d", id);
error_handler.report("melody_effects.get_melody_effect_name", "Failed to access Data: " .. melody_effect_name);
return name;
end
@@ -160,6 +233,7 @@ function this.init_dependencies()
players = require("MHR_Overlay.Damage_Meter.players");
language = require("MHR_Overlay.Misc.language");
error_handler = require("MHR_Overlay.Misc.error_handler");
time = require("MHR_Overlay.Game_Handler.time");
end
function this.init_module()

View File

@@ -46,15 +46,24 @@ local package = package;
this.list = {
attack_up = nil,
defense_up = nil,
stamina_use_down = nil
stamina_use_down = nil,
natural_healing_up = nil,
immunity = nil
};
local misc_buffs_type_name = "misc_buffs";
this.keys = {
"attack_up",
"defense_up",
"stamina_use_down",
"natural_healing_up",
"immunity"
};
-- Attack Up
-- Might Seed +10 3min
-- Might Seed +10 3min -- Separated
-- Dango Bulker + 15 30sec
-- Chameleos Souls +15 30sec
-- Chameleos Soul +15 30sec
-- Butterflame +25 1min -- Separated
-- Defense Up
-- Adamant Seed +20 3min
@@ -70,6 +79,7 @@ local misc_buffs_type_name = "misc_buffs";
-- Vase of Vitality 20sec
local player_data_type_def = sdk.find_type_definition("snow.player.PlayerData");
-- Attack Up
local atk_up_buff_second_field = player_data_type_def:get_field("_AtkUpBuffSecond");
local atk_up_buff_second_timer_field = player_data_type_def:get_field("_AtkUpBuffSecondTimer");
@@ -83,33 +93,69 @@ local debuff_prevention_timer_field = player_data_type_def:get_field("_DebuffPre
-- Immunizer
local vitalizer_timer_field = player_data_type_def:get_field("_VitalizerTimer");
function this.update(player, player_data)
buffs.update_generic_buff(this.list, misc_buffs_type_name, "stamina_use_down", this.get_misc_buff_name,
nil, nil, player_data, stamina_up_buff_second_timer_field);
local player_manager_type_def = sdk.find_type_definition("snow.player.PlayerManager");
local get_ref_item_parameter_method = player_manager_type_def:get_method("get_RefItemParameter");
buffs.update_generic_buff(this.list, misc_buffs_type_name, "attack_up", this.get_misc_buff_name,
player_data, atk_up_buff_second_field, player_data, atk_up_buff_second_timer_field);
local player_user_data_item_parameter_type_def = get_ref_item_parameter_method:get_return_type();
buffs.update_generic_buff(this.list, misc_buffs_type_name, "defense_up", this.get_misc_buff_name,
player_data, def_up_buff_second_field, player_data, def_up_buff_second_timer_field);
-- Might Seed
local might_seed_atk_up_field = player_user_data_item_parameter_type_def:get_field("_MightSeedAtkUp");
buffs.update_generic_buff(this.list, misc_buffs_type_name, "immunity", this.get_misc_buff_name,
nil, nil, player_data, debuff_prevention_timer_field);
function this.update(player, player_data, item_parameter)
this.update_attack_up(player_data, item_parameter);
buffs.update_generic_buff(this.list, misc_buffs_type_name, "natural_healing_up", this.get_misc_buff_name,
nil, nil, player_data, vitalizer_timer_field);
--this.update_misc_buff("attack_up", player_data, atk_up_buff_second_field, player_data, atk_up_buff_second_timer_field);
this.update_misc_buff("defense_up", player_data, def_up_buff_second_field, player_data, def_up_buff_second_timer_field);
this.update_misc_buff("stamina_use_down", nil, nil, player_data, stamina_up_buff_second_timer_field);
this.update_misc_buff("natural_healing_up", nil, nil, player_data, vitalizer_timer_field);
this.update_misc_buff("immunity", nil, nil, player_data, debuff_prevention_timer_field);
end
function this.update_misc_buff(key, value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints)
return buffs.update_generic_buff(this.list, config.current_config.buff_UI.filter.misc_buffs, this.get_misc_buff_name, key,
value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints);
end
function this.apply_filter(key)
return buffs.apply_filter(this.list, config.current_config.buff_UI.filter.misc_buffs, key);
end
function this.update_attack_up(player_data, item_parameter)
if this.apply_filter("attack_up") then
return;
end
local atk_up_buff_second = atk_up_buff_second_field:get_data(player_data);
if atk_up_buff_second == nil then
error_handler.report("item_buffs.update_attack_up", "Failed to access Data: atk_up_buff_second");
return;
end
local might_seed_atk_up = might_seed_atk_up_field:get_data(item_parameter);
if might_seed_atk_up == nil then
error_handler.report("item_buffs.update_might_seed", "Failed to access Data: might_seed_atk_up");
return;
end
if atk_up_buff_second == might_seed_atk_up or atk_up_buff_second == endemic_life_buffs.butterflame_attack_up then
this.list.attack_up = nil;
return;
end
this.update_misc_buff("attack_up", nil, nil, player_data, atk_up_buff_second_timer_field);
end
function this.init_names()
for misc_buff_key, dango in pairs(this.list) do
dango.name = this.get_misc_buff_name(misc_buff_key);
end
end
function this.get_misc_buff_name(misc_buff_key)
local misc_buff_name = language.current_language.misc_buffs[misc_buff_key];
function this.get_misc_buff_name(key)
local misc_buff_name = language.current_language.misc_buffs[key];
if misc_buff_name == nil then
return misc_buff_key;
return key;
end
return misc_buff_name;

View File

@@ -51,6 +51,12 @@ this.list = {
power_drum = nil
};
this.keys = {
"rousing_roar",
"go_fight_win",
"power_drum"
};
local otomo_moves_ids = {
-- herbaceous_healing = 1,
-- felyne_silkbind = 2,
@@ -59,12 +65,12 @@ local otomo_moves_ids = {
-- endemic_life_barrage = 5,
-- health_horn = 6,
-- healing_bubble = 7,
-- vase_of_vitality = 8,
vase_of_vitality = 8,
-- furbidden_acorn = 9,
-- poison_purr_ison = 10,
-- summeown_endemic_life = 11,
-- shock_purr_ison = 12,
-- go_fight_win = 13,
go_fight_win = 13,
-- giga_barrel_bombay = 14,
-- flash_bombay = 15,
-- anti_monster_mine = 16,
@@ -84,8 +90,6 @@ local otomo_moves_ids = {
-- ameowzing_mist = 30
};
local otomo_moves_type_name = "otomo_moves";
local player_data_type_def = sdk.find_type_definition("snow.player.PlayerData");
-- Palico: Rousing Roar
local beast_roar_otomo_timer_field = player_data_type_def:get_field("_BeastRoarOtomoTimer");
@@ -98,21 +102,25 @@ local data_shortcut_type_def = sdk.find_type_definition("snow.data.DataShortcut"
local get_name_method = data_shortcut_type_def:get_method("getName(snow.data.DataDef.OtSupportActionId)");
function this.update(player_data)
buffs.update_generic_buff(this.list, otomo_moves_type_name, "rousing_roar", this.get_otomo_move_name,
nil, nil, player_data, beast_roar_otomo_timer_field);
buffs.update_generic_buff(this.list, otomo_moves_type_name, "go_fight_win", this.get_otomo_move_name,
nil, nil, player_data, runhigh_otomo_timer_field);
buffs.update_generic_buff(this.list, otomo_moves_type_name, "power_drum", this.get_otomo_move_name,
nil, nil, player_data, kijin_otomo_timer_field);
this.update_otomo_move("rousing_roar", nil, nil, player_data, beast_roar_otomo_timer_field);
this.update_otomo_move("go_fight_win", nil, nil, player_data, runhigh_otomo_timer_field);
this.update_otomo_move("power_drum", nil, nil, player_data, kijin_otomo_timer_field);
end
function this.get_otomo_move_name(otomo_move_key)
local otomo_move_name = get_name_method:call(nil, otomo_moves_ids[otomo_move_key]);
function this.update_otomo_move(key, value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints)
return buffs.update_generic_buff(this.list, config.current_config.buff_UI.filter.otomo_moves, this.get_otomo_move_name, key,
value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints)
end
function this.apply_filter(key)
return buffs.apply_filter(this.list, config.current_config.buff_UI.filter.otomo_moves, key);
end
function this.get_otomo_move_name(key)
local otomo_move_name = get_name_method:call(nil, otomo_moves_ids[key]);
if otomo_move_name == nil then
error_handler.report("otomo_moves.get_otomo_move_name", string.format("Failed to access Data: %s_name", otomo_move_key));
return otomo_move_key;
error_handler.report("otomo_moves.get_otomo_move_name", string.format("Failed to access Data: %s_name", key));
return key;
end
return otomo_move_name;

View File

@@ -50,7 +50,10 @@ this.list = {
chameleos_soul = nil
};
local rampage_skills_type_name = "rampage_skills";
this.keys = {
"kushala_daora_soul",
"chameleos_soul"
};
local rampage_skill_ids = {
chameleos_soul = 250,
@@ -70,25 +73,32 @@ local data_shortcut_type_def = sdk.find_type_definition("snow.data.DataShortcut"
local get_name_method = data_shortcut_type_def:get_method("getName(snow.data.DataDef.PlHyakuryuSkillId)");
function this.update(player_data)
this.update_rampage_skill("kushala_daora_soul", player_data, hyakuryu_dragon_power_up_count_field,
player_data, hyakuryu_dragon_power_up_timer_field, false, nil, {kushara_daora_soul_breakpoint});
buffs.update_generic_buff(this.list, rampage_skills_type_name, "kushala_daora_soul", this.get_skill_name,
player_data, hyakuryu_dragon_power_up_count_field, player_data, hyakuryu_dragon_power_up_timer_field, false, nil, {kushara_daora_soul_breakpoint});
this.update_rampage_skill("chameleos_soul", nil, nil, player_data, hyakuryu_onazuti_power_up_interval_field);
end
buffs.update_generic_buff(this.list, rampage_skills_type_name, "chameleos_soul", this.get_skill_name,
nil, nil, player_data, hyakuryu_onazuti_power_up_interval_field);
function this.update_rampage_skill(key, value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints)
return buffs.update_generic_buff(this.list, config.current_config.buff_UI.filter.rampage_skills, this.get_rampage_skill_name, key,
value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints)
end
function this.apply_filter(key)
return this.apply_filter(this.list, config.current_config.buff_UI.filter.rampage_skills, key);
end
function this.init_names()
for rampage_skill_key, skill in pairs(this.list) do
skill.name = this.get_skill_name(rampage_skill_key);
skill.name = this.get_rampage_skill_name(rampage_skill_key);
end
end
function this.get_skill_name(rampage_skill_key)
local rampage_skill_name = get_name_method:call(nil, rampage_skill_ids[rampage_skill_key]);
function this.get_rampage_skill_name(key)
local rampage_skill_name = get_name_method:call(nil, rampage_skill_ids[key]);
if rampage_skill_name == nil then
error_handler.report("rampage_skills.get_skill_name", string.format("Failed to access Data: %s_name", rampage_skill_key));
return rampage_skill_key;
error_handler.report("rampage_skills.get_rampage_skill_name", string.format("Failed to access Data: %s_name", key));
return key;
end
return rampage_skill_name;

View File

@@ -81,7 +81,50 @@ this.list = {
strife = nil,
inspiration = nil,
blood_awakening = nil,
partbreaker = nil
dragon_conversion_elemental_attack_up = nil,
dragon_conversion_elemental_res_up = nil,
partbreaker = nil,
};
this.keys = {
"burst",
"intrepid_heart",
"dereliction",
"latent_power",
"protective_polish",
"wind_mantle",
"grinder_s",
"counterstrike",
"affinity_sliding",
"coalescence",
"adrenaline_rush",
"wall_runner",
"offensive_guard",
"hellfire_cloak",
"agitator",
"furious",
"status_trigger",
"heaven_sent",
"heroics",
"resuscitate",
"maximum_might",
"bloodlust",
"frenzied_bloodlust",
"peak_performance",
"dragonheart",
"resentment",
"bladescale_hone",
"spiribirds_call",
"embolden",
"berserk",
"powder_mantle_red",
"powder_mantle_blue",
"strife",
"inspiration",
"blood_awakening",
"dragon_conversion_elemental_attack_up",
"dragon_conversion_elemental_res_up",
"partbreaker"
};
local skills_type_name = "skills";
@@ -227,7 +270,7 @@ local skill_data_list = {
wind_mantle = { id = 138 },
-- powder_mantle = { id = 139 },
-- frostcraft = { id = 140 },
-- dragon_conversion = { id = 141 },
-- dragon_conversion = { id = 141 }, -- implemented
heaven_sent = { id = 142 },
frenzied_bloodlust = { id = 143 },
blood_awakening = { id = 144 },
@@ -236,6 +279,7 @@ local skill_data_list = {
inspiration = { id = 147 },
}
this.is_heroics_active = false;
local intrepid_heart_minimal_value = 400;
@@ -322,7 +366,7 @@ local power_freedom_timer_field = player_base_type_def:get_field("_PowerFreedomT
-- Protective Polish
local sharpness_gauge_boost_timer_field = player_base_type_def:get_field("_SharpnessGaugeBoostTimer");
-- Heroics
local is_predicament_power_up_method = player_base_type_def:get_method("isPredicamentPowerUp");
--local is_predicament_power_up_method = player_base_type_def:get_method("isPredicamentPowerUp");
-- Berserk
local get_is_enable_equip_skill_225_method = player_base_type_def:get_method("get_IsEnableEquipSkill225");
-- Dragon Conversion
@@ -370,6 +414,7 @@ function this.update(player, player_data, weapon_type)
this.update_bloodlust();
this.update_frenzied_bloodlust(player, player_data);
this.update_peak_performance();
this.update_heroics();
this.update_dragonheart();
this.update_resentment(player_data);
this.update_bladescale_hone(player, weapon_type);
@@ -377,54 +422,53 @@ function this.update(player, player_data, weapon_type)
this.update_powder_mantle(player_data);
this.update_blood_awakening(player, player_data);
this.update_generic_skill("dereliction", player_data, symbiosis_skill_lost_vital_field,
nil, nil, true, nil, dereliction_breakpoints);
this.update_generic_skill("burst", player_data, rengeki_power_up_count_field,
player_data, rengeki_power_up_timer_field, false, nil, burst_breakpoints);
this.update_generic_skill("intrepid_heart", player_data, equip_skill_223_accumulator_field,
nil, nil, true, intrepid_heart_minimal_value);
this.update_generic_skill("latent_power", nil, nil, player, power_freedom_timer_field);
this.update_generic_skill("protective_polish", nil, nil, player, sharpness_gauge_boost_timer_field);
this.update_generic_skill("grinder_s", nil, nil, player_data, brand_new_sharpness_adjust_up_timer_field);
this.update_generic_skill("counterstrike", nil, nil, player_data, counterattack_powerup_timer_field);
this.update_generic_skill("affinity_sliding", nil, nil, player_data, sliding_powerup_timer_field);
this.update_generic_skill("coalescence", nil, nil, player_data, disaster_turn_powerup_timer_field);
this.update_generic_skill("adrenaline_rush", nil, nil, player_data, equip_skill_208_atk_up_field);
this.update_generic_skill("wall_runner", nil, nil, player_data, wall_run_powerup_timer_field);
this.update_generic_skill("offensive_guard", nil, nil, player_data, equip_skill_036_timer_field);
this.update_generic_skill("hellfire_cloak", nil, nil, player_data, onibi_powerup_timer_field);
this.update_generic_skill("agitator", nil, nil, player_data, challenge_timer_field, nil, nil, true);
this.update_generic_skill("furious", nil, nil, player_data, furious_skill_stamina_buff_second_timer_field);
this.update_generic_skill("status_trigger", nil, nil, player_data, equip_skill_222_timer_field);
this.update_generic_skill("inspiration", nil, nil, player_data, equip_skill_235_atk_up_second_timer_field);
this.update_generic_skill("heaven_sent", player, is_active_equip_skill_230_method);
this.update_generic_skill("heroics", player, is_predicament_power_up_method);
this.update_generic_skill("resuscitate", player, is_debuff_state_method);
this.update_generic_skill("embolden", player, get_active_equip_209_method);
this.update_generic_skill("berserk", player, get_is_enable_equip_skill_225_method);
this.update_generic_skill("dragon_conversion_elemental_attack_up", player, equip_skill_229_sum_resist_field);
this.update_generic_skill("dragon_conversion_elemental_res_up", player, equip_skill_229_use_up_flag_field);
this.update_generic_skill("partbreaker", nil, nil, nil, nil, true);
this.update_generic_skill("strife", player, get_affinity_equip_skill_233_method,
nil, nil, nil, nil, strife_breakpoints[skill_data_list.strife.level]);
this.update_skill("dereliction", player_data, symbiosis_skill_lost_vital_field, nil, nil, true, nil, dereliction_breakpoints);
this.update_skill("burst", player_data, rengeki_power_up_count_field, player_data, rengeki_power_up_timer_field, false, nil, burst_breakpoints);
this.update_skill("intrepid_heart", player_data, equip_skill_223_accumulator_field, nil, nil, true, intrepid_heart_minimal_value);
this.update_skill("latent_power", nil, nil, player, power_freedom_timer_field);
this.update_skill("protective_polish", nil, nil, player, sharpness_gauge_boost_timer_field);
this.update_skill("grinder_s", nil, nil, player_data, brand_new_sharpness_adjust_up_timer_field);
this.update_skill("counterstrike", nil, nil, player_data, counterattack_powerup_timer_field);
this.update_skill("affinity_sliding", nil, nil, player_data, sliding_powerup_timer_field);
this.update_skill("coalescence", nil, nil, player_data, disaster_turn_powerup_timer_field);
this.update_skill("adrenaline_rush", nil, nil, player_data, equip_skill_208_atk_up_field);
this.update_skill("wall_runner", nil, nil, player_data, wall_run_powerup_timer_field);
this.update_skill("offensive_guard", nil, nil, player_data, equip_skill_036_timer_field);
this.update_skill("hellfire_cloak", nil, nil, player_data, onibi_powerup_timer_field);
this.update_skill("agitator", nil, nil, player_data, challenge_timer_field, nil, nil, true);
this.update_skill("furious", nil, nil, player_data, furious_skill_stamina_buff_second_timer_field);
this.update_skill("status_trigger", nil, nil, player_data, equip_skill_222_timer_field);
this.update_skill("inspiration", nil, nil, player_data, equip_skill_235_atk_up_second_timer_field);
this.update_skill("heaven_sent", player, is_active_equip_skill_230_method);
this.update_skill("resuscitate", player, is_debuff_state_method);
this.update_skill("embolden", player, get_active_equip_209_method);
this.update_skill("berserk", player, get_is_enable_equip_skill_225_method);
this.update_skill("dragon_conversion_elemental_attack_up", player, equip_skill_229_sum_resist_field);
this.update_skill("dragon_conversion_elemental_res_up", player, equip_skill_229_use_up_flag_field);
this.update_skill("partbreaker", nil, nil, nil, nil, true);
this.update_skill("strife", player, get_affinity_equip_skill_233_method, nil, nil, nil, nil, strife_breakpoints[skill_data_list.strife.level]);
end
function this.update_generic_skill(skill_key, value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints)
local skill_data = skill_data_list[skill_key];
function this.update_skill(key, value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints)
local skill_data = skill_data_list[key];
if skill_data ~= nil and skill_data.is_equipped ~= nil and not skill_data.is_equipped then
this.list[skill_key] = nil;
this.list[key] = nil;
return nil;
end
return buffs.update_generic_buff(this.list, skills_type_name, skill_key, this.get_skill_name,
return buffs.update_generic_buff(this.list, config.current_config.buff_UI.filter.skills, this.get_skill_name, key,
value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints);
end
function this.update_generic(key, level, timer)
return buffs.update_generic(this.list, this.get_skill_name, key, level, timer);
end
function this.apply_filter(key)
return buffs.apply_filter(this.list, config.current_config.buff_UI.filter.skills, key);
end
function this.update_equipped_skill_data(player)
local player_skill_list = get_player_skill_list_method:call(player);
if player_skill_list == nil then
@@ -464,6 +508,10 @@ function this.update_equipped_skill_data(player)
end
function this.update_wind_mantle(player, weapon_type)
if this.apply_filter("wind_mantle") then
return;
end
local is_wind_mantle_enable = is_equip_skill_226_enable_field:get_data(player);
if is_wind_mantle_enable == nil then
error_handler.report("skills.update_wind_mantle", "Failed to access Data: is_wind_mantle_enable");
@@ -499,10 +547,16 @@ function this.update_wind_mantle(player, weapon_type)
end
end
buffs.update_generic(this.list, skills_type_name, "wind_mantle", this.get_skill_name, level, wind_mantle_duration - (wind_mantle_timer / 60));
this.update_generic("wind_mantle", level, wind_mantle_duration - (wind_mantle_timer / 60));
end
function this.update_maximum_might(player_data)
if not config.current_config.buff_UI.filter.skills.maximum_might then
this.list.maximum_might = nil;
maximum_might_previous_timer_value = 0;
return;
end
if not skill_data_list.maximum_might.is_equipped then
this.list.maximum_might = nil;
return;
@@ -518,26 +572,25 @@ function this.update_maximum_might(player_data)
return;
end
local skill = this.list.maximum_might;
local is_timer_zero = utils.number.is_equal(whole_body_timer, 0);
local maximum_might = this.list.maximum_might;
if player_info.list.stamina ~= player_info.list.max_stamina then
if skill ~= nil and whole_body_timer < maximum_might_previous_timer_value then
if whole_body_timer < maximum_might_previous_timer_value then
this.list.maximum_might = nil;
end
elseif skill == nil then
elseif maximum_might == nil then
local maximum_might_name = this.get_skill_name("maximum_might");
if whole_body_timer < maximum_might_previous_timer_value then
this.list.maximum_might = buffs.new(skills_type_name, "maximum_might", maximum_might_name, 1);
this.list.maximum_might = buffs.new("maximum_might", maximum_might_name, 1);
elseif is_timer_zero then
elseif utils.number.is_equal(whole_body_timer, 0) then
if maximum_might_delay_timer == nil then
maximum_might_delay_timer = time.new_delay_timer(function()
maximum_might_delay_timer = nil;
this.list.maximum_might = buffs.new(skills_type_name, "maximum_might", maximum_might_name, 1);
this.list.maximum_might = buffs.new("maximum_might", maximum_might_name, 1);
end, 3.5);
end
@@ -547,9 +600,18 @@ function this.update_maximum_might(player_data)
end
maximum_might_previous_timer_value = whole_body_timer;
if maximum_might ~= nil then
maximum_might.is_visible = true;
end
end
function this.update_bloodlust()
if not config.current_config.buff_UI.filter.skills.bloodlust then
this.list.bloodlust = nil;
return;
end
if not skill_data_list.bloodlust.is_equipped then
this.list.bloodlust = nil;
return;
@@ -561,18 +623,25 @@ function this.update_bloodlust()
return;
end
if this.list.bloodlust == nil then
local bloodlust = this.list.bloodlust;
if bloodlust == nil then
local bloodlust_name = this.get_skill_name("bloodlust");
if bloodlust_name == nil then
error_handler.report("skills.update_generic_buff", "Failed to access Data: bloodlust_name");
error_handler.report("skills.update_bloodlust", "Failed to access Data: bloodlust_name");
return;
end
this.list.bloodlust = buffs.new(skills_type_name, "bloodlust", bloodlust_name);
this.list.bloodlust = buffs.new("bloodlust", bloodlust_name);
end
this.list.bloodlust.is_visible = true;
end
function this.update_frenzied_bloodlust(player, player_data)
if this.apply_filter("frenzied_bloodlust") then
return;
end
local hunter_wire_skill_231_num = get_hunter_wire_skill_231_num_method:call(player);
if hunter_wire_skill_231_num == nil then
error_handler.report("skills.update_frenzied_bloodlust", "Failed to access Data: hunter_wire_skill_231_num");
@@ -619,7 +688,7 @@ function this.update_frenzied_bloodlust(player, player_data)
timer = equip_skill_231_wp_off_timer;
end
local skill = buffs.update_generic(this.list, skills_type_name, "frenzied_bloodlust", this.get_skill_name, 1, timer / 60);
local skill = this.update_generic("frenzied_bloodlust", 1, timer / 60);
if is_wp_off_timer_max then
skill.duration = frenzied_bloodlust_duration / 60;
@@ -629,6 +698,11 @@ function this.update_frenzied_bloodlust(player, player_data)
end
function this.update_peak_performance()
if not config.current_config.buff_UI.filter.skills.peak_performance then
this.list.peak_performance = nil;
return;
end
if not skill_data_list.peak_performance.is_equipped then
this.list.peak_performance = nil;
return;
@@ -639,10 +713,28 @@ function this.update_peak_performance()
return;
end
buffs.update_generic(this.list, skills_type_name, "peak_performance", this.get_skill_name);
this.update_generic("peak_performance");
end
function this.update_heroics()
if this.apply_filter("heroics") then
return;
end
if not this.is_heroics_active then
this.list.heroics = nil;
return;
end
this.update_generic("heroics");
end
function this.update_dragonheart()
if not config.current_config.buff_UI.filter.skills.dragonheart then
this.list.dragonheart = nil;
return;
end
if not skill_data_list.dragonheart.is_equipped then
this.list.dragonheart = nil;
return;
@@ -662,10 +754,15 @@ function this.update_dragonheart()
return;
end
buffs.update_generic(this.list, skills_type_name, "dragonheart", this.get_skill_name);
this.update_generic("dragonheart");
end
function this.update_resentment(player_data)
if not config.current_config.buff_UI.filter.skills.resentment then
this.list.resentment = nil;
return;
end
if not skill_data_list.resentment.is_equipped then
this.list.resentment = nil;
return;
@@ -682,7 +779,7 @@ function this.update_resentment(player_data)
return;
end
buffs.update_generic(this.list, skills_type_name, "resentment", this.get_skill_name);
this.update_generic("resentment");
end
function this.update_bladescale_hone(player, weapon_type)
@@ -691,10 +788,18 @@ function this.update_bladescale_hone(player, weapon_type)
return;
end
this.update_generic_skill("bladescale_hone", nil, nil, player, _equip_skill_216_bottle_up_timer_field);
if this.apply_filter("bladescale_hone") then
return;
end
this.update_skill("bladescale_hone", nil, nil, player, _equip_skill_216_bottle_up_timer_field);
end
function this.update_spiribirds_call(player_data)
if this.apply_filter("spiribirds_call") then
return;
end
local equip_skill_211_timer = equip_skill_211_timer_field:get_data(player_data);
if equip_skill_211_timer == nil then
error_handler.report("skills.update_spiribirds_call", "Failed to access Data: equip_skill_211_timer");
@@ -708,25 +813,28 @@ function this.update_spiribirds_call(player_data)
local timer = spiribirds_call_duration - (equip_skill_211_timer / 60);
buffs.update_generic(this.list, skills_type_name, "spiribirds_call", this.get_skill_name, 1, timer);
this.update_generic("spiribirds_call", 1, timer);
end
function this.update_powder_mantle(player_data)
this.update_generic_skill("powder_mantle_blue", player_data, equip_skill_227_state_field,
player_data, equip_skill_227_state_timer_field, nil, 2);
if not this.apply_filter("powder_mantle_blue") then
this.update_skill("powder_mantle_blue", player_data, equip_skill_227_state_field, player_data, equip_skill_227_state_timer_field, nil, 2);
end
if this.list.powder_mantle_blue ~= nil then
this.list.powder_mantle_red = nil;
return;
end
if this.apply_filter("powder_mantle_red") then
return;
end
this.update_generic_skill("powder_mantle_red", player_data, equip_skill_227_state_field,
player_data, equip_skill_227_state_timer_field);
this.update_skill("powder_mantle_red", player_data, equip_skill_227_state_field, player_data, equip_skill_227_state_timer_field);
end
function this.update_blood_awakening(player, player_data)
this.update_generic_skill("blood_awakening", player, get_equip_skill_232_lv_method,
player_data, equip_skill_232_timer_field, nil, nil, blood_awakening_breakpoints);
this.update_skill("blood_awakening", player, get_equip_skill_232_lv_method, player_data, equip_skill_232_timer_field, nil, nil, blood_awakening_breakpoints);
end
function this.init_names()
@@ -735,23 +843,23 @@ function this.init_names()
end
end
function this.get_skill_name(skill_key)
local skill_data = skill_data_list[skill_key];
function this.get_skill_name(key)
local skill_data = skill_data_list[key];
if skill_data == nil then
local skill_name = language.current_language.skills[skill_key];
local skill_name = language.current_language.skills[key];
if skill_name == nil then
return skill_key;
return key;
end
return skill_name;
end
local skill_name = get_name_method:call(nil, skill_data_list[skill_key].id);
local skill_name = get_name_method:call(nil, skill_data_list[key].id);
if skill_name == nil then
error_handler.report("skills.get_skill_name", string.format("Failed to access Data: %s_name", skill_key));
return skill_key;
error_handler.report("skills.get_skill_name", string.format("Failed to access Data: %s_name", key));
return key;
end
return skill_name;

View File

@@ -48,14 +48,40 @@ local package = package;
this.list = {
-- Great Sword
power_sheathe = nil,
-- Switch Axe
amped_state = nil,
switch_charger = nil,
axe_heavy_slam = nil,
-- Long Sword
spirit_gauge_autofill = nil, -- Soaring Kick, Iai Slash
spirit_gauge = nil,
harvest_moon = nil,
-- Sword & Shield
destroyer_oil = nil,
-- Dual Blades
ironshine_silk = nil,
archdemon_mode = nil,
-- Lance
anchor_rage = nil,
spiral_thrust = nil,
twin_wine = nil,
-- Gunlance
ground_splitter = nil,
erupting_cannon = nil,
-- Hammer
impact_burst = nil,
-- Hunting Horn
silkbind_shockwave = nil,
bead_of_resonance = nil,
sonic_bloom = nil,
-- Switch Axe
amped_state = nil,
switch_charger = nil,
axe_heavy_slam = nil,
-- Charge Blade
element_boost = nil,
sword_boost_mode = nil,
-- Insect Glaive
red_extract = nil,
white_extract = nil,
orange_extract = nil,
all_extracts_mix = nil,
-- Light Bowgun
fanning_maneuver = nil,
wyvernblast_reload = nil,
@@ -65,24 +91,166 @@ this.list = {
setting_sun = nil,
overheat = nil,
wyvernsnipe_reload = nil,
-- Hammer
impact_burst = nil,
-- Gunlance
ground_splitter = nil,
erupting_cannon = nil,
-- Lance
anchor_rage = nil,
spiral_thrust = nil,
twin_wine = nil,
-- Bow
herculean_draw = nil,
bolt_boost = nil,
arc_shot_affinity = nil,
arc_shot_brace = nil
};
this.keys = {
-- Great Sword
{
key = "great_sword",
skill_keys = {
"power_sheathe"
}
},
-- Long Sword
{
key = "long_sword",
skill_keys = {
"spirit_gauge_autofill", -- Soaring Kick, Iai Slash
"spirit_gauge",
"harvest_moon"
}
},
-- Sword & Shield
destroyer_oil = nil,
{
key = "sword_and_shield",
skill_keys = {
"destroyer_oil"
}
},
-- Dual Blades
ironshine_silk = nil,
archdemon_mode = nil,
{
key = "dual_blades",
skill_keys = {
"ironshine_silk",
"archdemon_mode"
}
},
-- Lance
{
key = "lance",
skill_keys = {
"anchor_rage",
"spiral_thrust",
"twin_wine"
}
},
-- Gunlance
{
key = "gunlance",
skill_keys = {
"ground_splitter",
"erupting_cannon"
}
},
-- Hammer
{
key = "hammer",
skill_keys = {
"impact_burst"
}
},
-- Hunting Horn
silkbind_shockwave = nil,
bead_of_resonance = nil,
sonic_bloom = nil,
{
key = "hunting_horn",
skill_keys = {
"silkbind_shockwave",
"bead_of_resonance",
"sonic_bloom"
}
},
-- Switch Axe
{
key = "switch_axe",
skill_keys = {
"amped_state",
"switch_charger",
"axe_heavy_slam"
}
},
-- Charge Blade
{
key = "charge_blade",
skill_keys = {
"element_boost",
"sword_boost_mode"
}
},
-- Insect Glaive
{
key = "insect_glaive",
skill_keys = {
"red_extract",
"white_extract",
"orange_extract",
"all_extracts_mix"
}
},
-- Light Bowgun
{
key = "light_bowgun",
skill_keys = {
"fanning_maneuver",
"wyvernblast_reload"
}
},
-- Heavy Bowgun
{
key = "heavy_bowgun",
skill_keys = {
"counter_charger",
"rising_moon",
"setting_sun",
"overheat",
"wyvernsnipe_reload"
}
},
-- Bow
{
key = "bow",
skill_keys = {
"herculean_draw",
"bolt_boost",
"arc_shot_affinity",
"arc_shot_brace"
}
}
};
local weapon_skill_ids = {
-- Great Sword
power_sheathe = nil,
-- Long Sword
soaring_kick = 9,
spirit_gauge_autofill = nil, -- Soaring Kick, Iai Slash
spirit_gauge = nil,
harvest_moon = 94,
-- Sword & Shield
destroyer_oil = 97,
-- Dual Blades
ironshine_silk = 104,
archdemon_mode = nil,
-- Lance
anchor_rage = 37,
spiral_thrust = 38,
twin_wine = nil,
-- Gunlance
ground_splitter = 46,
erupting_cannon = 121,
-- Hammer
impact_burst = 109,
-- Hunting Horn
silkbind_shockwave = 114,
bead_of_resonance = 35,
sonic_bloom = 112,
-- Switch Axe
amped_state = nil,
switch_charger = nil,
axe_heavy_slam = nil,
-- Charge Blade
element_boost = nil,
sword_boost_mode = nil,
@@ -91,24 +259,6 @@ this.list = {
white_extract = nil,
orange_extract = nil,
all_extracts_mix = nil,
-- Bow
herculean_draw = nil,
bolt_boost = nil,
arc_shot_affinity = nil,
arc_shot_brace = nil
};
local weapon_skill_ids = {
-- Great Sword
power_sheathe = nil,
-- Switch Axe
amped_state = nil,
switch_charger = nil,
axe_heavy_slam = nil,
-- Long Sword
spirit_gauge_autofill = nil, -- Soaring Kick, Iai Slash
spirit_gauge = nil,
harvest_moon = 94,
-- Light Bowgun
fanning_maneuver = 72,
wyvernblast_reload = nil,
@@ -118,53 +268,40 @@ local weapon_skill_ids = {
setting_sun = 149,
overheat = nil,
wyvernsnipe_reload = nil,
-- Hammer
impact_burst = 109,
-- Gunlance
ground_splitter = 46,
erupting_cannon = 121,
-- Lance
anchor_rage = 37,
spiral_thrust = 38,
twin_wine = nil,
-- Sword & Shield
destroyer_oil = 97,
-- Dual Blades
ironshine_silk = 104,
archdemon_mode = nil,
-- Hunting Horn
silkbind_shockwave = 114,
bead_of_resonance = 35,
sonic_bloom = 112,
-- Charge Blade
element_boost = nil,
sword_boost_mode = nil,
-- Insect Glaive
red_extract = nil,
white_extract = nil,
orange_extract = nil,
all_extracts_mix = nil,
-- Bow
herculean_draw = nil,
bolt_boost = 154
};
-- 0 Great Sword
local great_sword_type_name = "great_sword";
-- 1 Switch Axe
local switch_axe_type_name = "switch_axe";
-- 2 Long Sword
local long_sword_type_name = "long_sword";
-- 3 Light Bowgun
local light_bowgun_type_name = "light_bowgun";
-- 4 Heavy Bowgun
local heavy_bowgun_type_name = "heavy_bowgun";
-- 5 Hammer
local hammer_type_name = "hammer";
-- 6 Gunlance
local gunlance_type_name = "gunlance";
-- 7 Lance
local lance_type_name = "lance";
-- 8 Sword and Shield
local sword_and_shield_type_name = "sword_and_shield";
-- 9 Dual Blades
local dual_blades_type_name = "dual_blades";
-- 10 Hunting Horn
local hunting_horn_type_name = "hunting_horn";
-- 11 Charge Blade
local charge_blade_type_name = "charge_blade";
-- 12 Insect Glaive
local insect_glaive_type_name = "insect_glaive";
-- 13 Bow
local bow_type_name = "bow";
local weapon_skills_type_name = "weapon_skills";
local previous_weapon_type = -1;
local spirit_gauge_breakpoints = {3, 2};
@@ -177,7 +314,7 @@ local player_data_type_def = sdk.find_type_definition("snow.player.PlayerData");
local great_sword_type_def = sdk.find_type_definition("snow.player.GreatSword");
-- Power Sheathe
local move_wp_off_buff_set_time_field = great_sword_type_def:get_field("_MoveWpOffBuffSetTime");
local move_wp_off_buff_great_sword_timer_field = great_sword_type_def:get_field("MoveWpOffBuffGreatSwordTimer");
-- Switch Axe
@@ -408,33 +545,41 @@ function this.update(player, player_data, weapon_type)
end
end
function this.update_weapon_skill(key, weapon_type_name, value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints)
return buffs.update_generic_buff(this.list, config.current_config.buff_UI.filter.weapon_skills[weapon_type_name], this.get_weapon_skill_name, key,
value_owner, value_holder, timer_owner, timer_holder, is_infinite, minimal_value, level_breakpoints);
end
function this.update_generic(key, level, timer)
return buffs.update_generic(this.list, this.get_weapon_skill_name, key, level, timer);
end
function this.apply_filter(weapon_type_name, key)
return buffs.apply_filter(this.list, config.current_config.buff_UI.filter.weapon_skills[weapon_type_name], key);
end
function this.update_great_sword_skills(player)
buffs.update_generic_buff(this.list, weapon_skills_type_name, "power_sheathe", this.get_weapon_skill_name,
nil, nil, player, move_wp_off_buff_set_time_field);
this.update_weapon_skill("power_sheathe", great_sword_type_name, nil, nil, player, move_wp_off_buff_great_sword_timer_field);
end
function this.update_switch_axe_skills(player)
buffs.update_generic_buff(this.list, weapon_skills_type_name, "amped_state", this.get_weapon_skill_name,
nil, nil, player, get_bottle_awake_duration_timer_method);
buffs.update_generic_buff(this.list, weapon_skills_type_name, "switch_charger", this.get_weapon_skill_name,
nil, nil, player, no_use_slash_gauge_timer_field);
buffs.update_generic_buff(this.list, weapon_skills_type_name, "axe_heavy_slam", this.get_weapon_skill_name,
nil, nil, player, bottle_awake_assist_timer_field);
this.update_weapon_skill("amped_state", switch_axe_type_name, nil, nil, player, get_bottle_awake_duration_timer_method);
this.update_weapon_skill("switch_charger", switch_axe_type_name, nil, nil, player, no_use_slash_gauge_timer_field);
this.update_weapon_skill("axe_heavy_slam", switch_axe_type_name, nil, nil, player, bottle_awake_assist_timer_field);
end
function this.update_long_sword_skills(player)
buffs.update_generic_buff(this.list, weapon_skills_type_name, "spirit_gauge_autofill", this.get_weapon_skill_name,
nil, nil, player, get_long_sword_gauge_powerup_time_method);
buffs.update_generic_buff(this.list, weapon_skills_type_name, "spirit_gauge", this.get_weapon_skill_name,
player, get_long_sword_gauge_lv_method, player, get_long_sword_gauge_lv_timer_method, false, nil, spirit_gauge_breakpoints);
this.update_weapon_skill("spirit_gauge_autofill", long_sword_type_name, nil, nil, player, get_long_sword_gauge_powerup_time_method);
this.update_weapon_skill("spirit_gauge", long_sword_type_name, player, get_long_sword_gauge_lv_method, player, get_long_sword_gauge_lv_timer_method, false, nil, spirit_gauge_breakpoints);
this.update_harvest_moon();
end
function this.update_harvest_moon()
if this.apply_filter(long_sword_type_name, "harvest_moon") then
return;
end
if singletons.long_sword_shell_manager == nil then
error_handler.report("weapon_skills.update_harvest_moon", "Failed to access Data: long_sword_shell_manager");
return;
@@ -473,17 +618,20 @@ function this.update_harvest_moon()
return;
end
buffs.update_generic(this.list, weapon_skills_type_name, "harvest_moon", this.get_weapon_skill_name, 1, life_timer);
this.update_generic("harvest_moon", 1, life_timer);
end
function this.update_light_bowgun_skills(player, player_data)
buffs.update_generic_buff(this.list, weapon_skills_type_name, "fanning_maneuver", this.get_weapon_skill_name,
nil, nil, player, light_bowgun_wire_buff_timer_field);
this.update_weapon_skill("fanning_maneuver", light_bowgun_type_name, nil, nil, player, light_bowgun_wire_buff_timer_field);
this.update_wyvernblast_reload(player_data);
end
function this.update_wyvernblast_reload(player_data)
if this.apply_filter(light_bowgun_type_name, "wyvernblast_reload") then
return;
end
local wyvernblast_reload_timer = wyvernblast_reload_timer_field:get_data(player_data);
if wyvernblast_reload_timer == nil then
error_handler.report("weapon_skills.update_wyvernblast_reload", "Failed to access Data: heavy_bowgun_overheat_timer_field");
@@ -497,15 +645,12 @@ function this.update_wyvernblast_reload(player_data)
local timer = wyverblast_reload_duration - (wyvernblast_reload_timer / 60);
buffs.update_generic(this.list, weapon_skills_type_name, "wyvernblast_reload", this.get_weapon_skill_name, 1, timer);
this.update_generic("wyvernblast_reload", 1, timer);
end
function this.update_heavy_bowgun_skills(player, player_data)
buffs.update_generic_buff(this.list, weapon_skills_type_name, "counter_charger", this.get_weapon_skill_name,
nil, nil, player, reduce_charge_timer_field);
buffs.update_generic_buff(this.list, weapon_skills_type_name, "wyvernsnipe_reload", this.get_weapon_skill_name,
nil, nil, player_data, heavy_bowgun_wyvern_snipe_timer_field);
this.update_weapon_skill("counter_charger", heavy_bowgun_type_name, nil, nil, player, reduce_charge_timer_field);
this.update_weapon_skill("wyvernsnipe_reload", heavy_bowgun_type_name, nil, nil, player_data, heavy_bowgun_wyvern_snipe_timer_field);
this.update_rising_moon();
this.update_setting_sun();
@@ -513,6 +658,10 @@ function this.update_heavy_bowgun_skills(player, player_data)
end
function this.update_rising_moon()
if this.apply_filter(heavy_bowgun_type_name, "rising_moon") then
return;
end
if singletons.light_bowgun_shell_manager == nil then
error_handler.report("weapon_skills.update_rising_moon", "Failed to access Data: light_bowgun_shell_manager");
return;
@@ -564,10 +713,14 @@ function this.update_rising_moon()
return;
end
buffs.update_generic(this.list, weapon_skills_type_name, "rising_moon", this.get_weapon_skill_name, 1, timer);
this.update_generic("rising_moon", 1, timer);
end
function this.update_setting_sun()
if this.apply_filter(heavy_bowgun_type_name, "setting_sun") then
return;
end
if singletons.light_bowgun_shell_manager == nil then
error_handler.report("weapon_skills.update_setting_sun", "Failed to access Data: light_bowgun_shell_manager");
return;
@@ -624,10 +777,14 @@ function this.update_setting_sun()
return;
end
buffs.update_generic(this.list, weapon_skills_type_name, "setting_sun", this.get_weapon_skill_name, 1, timer);
this.update_generic("setting_sun", 1, timer);
end
function this.update_overheat(player_data)
if this.apply_filter(heavy_bowgun_type_name, "overheat") then
return;
end
local heavy_bowgun_overheat_timer = heavy_bowgun_overheat_timer_field:get_data(player_data);
if heavy_bowgun_overheat_timer_field == nil then
error_handler.report("weapon_skills.update_overheat", "Failed to access Data: heavy_bowgun_overheat_timer_field");
@@ -639,56 +796,54 @@ function this.update_overheat(player_data)
return;
end
buffs.update_generic(this.list, weapon_skills_type_name, "overheat", this.get_weapon_skill_name, 1, heavy_bowgun_overheat_timer);
this.update_generic("overheat", 1, heavy_bowgun_overheat_timer);
end
function this.update_hammer_skills(player)
buffs.update_generic_buff(this.list, weapon_skills_type_name, "impact_burst", this.get_weapon_skill_name,
nil, nil, player, hammer_impact_pulls_timer_field);
this.update_weapon_skill("impact_burst", hammer_type_name, nil, nil, player, hammer_impact_pulls_timer_field);
end
function this.update_gunlance_skills(player)
buffs.update_generic_buff(this.list, weapon_skills_type_name, "ground_splitter", this.get_weapon_skill_name,
nil, nil, player, shot_damage_up_duration_timer_field);
buffs.update_generic_buff(this.list, weapon_skills_type_name, "erupting_cannon", this.get_weapon_skill_name,
nil, nil, player, explode_pile_buff_timer_field);
this.update_weapon_skill("ground_splitter", gunlance_type_name, nil, nil, player, shot_damage_up_duration_timer_field);
this.update_weapon_skill("erupting_cannon", gunlance_type_name, nil, nil, player, explode_pile_buff_timer_field);
end
function this.update_lance_skills(player)
buffs.update_generic_buff(this.list, weapon_skills_type_name, "spiral_thrust", this.get_weapon_skill_name,
nil, nil, player, get_ruten_timer_method);
buffs.update_generic_buff(this.list, weapon_skills_type_name, "anchor_rage", this.get_weapon_skill_name,
nil, nil, player, get_guard_rage_timer_method);
this.update_weapon_skill("spiral_thrust", lance_type_name, nil, nil, player, get_ruten_timer_method);
this.update_weapon_skill("anchor_rage", lance_type_name, nil, nil, player, get_guard_rage_timer_method);
this.update_twin_wine(player);
end
function this.update_twin_wine(player)
if this.apply_filter(lance_type_name, "twin_wine") then
return;
end
local chain_death_match_shell = chain_death_match_shell_field:get_data(player);
if chain_death_match_shell == nil then
error_handler.report("weapon_skills.update_twin_wine", "Failed to access Data: chain_death_match_shell");
return;
end
buffs.update_generic_buff(this.list, weapon_skills_type_name, "twin_wine", this.get_weapon_skill_name,
nil, nil, chain_death_match_shell, chain_death_match_shell_life_timer_field);
this.update_weapon_skill("twin_wine", lance_type_name, nil, nil, chain_death_match_shell, chain_death_match_shell_life_timer_field);
end
function this.update_sword_and_shield_skills(player)
buffs.update_generic_buff(this.list, weapon_skills_type_name, "destroyer_oil", this.get_weapon_skill_name,
nil, nil, player, get_oil_buff_timer_method);
this.update_weapon_skill("destroyer_oil", sword_and_shield_type_name, nil, nil, player, get_oil_buff_timer_method);
end
function this.update_dual_blades_skills(player)
this.update_archdemon_mode(player)
this.update_weapon_skill("ironshine_silk", dual_blades_type_name, nil, nil, player, get_sharpness_recovery_buff_valid_timer_method);
buffs.update_generic_buff(this.list, weapon_skills_type_name, "ironshine_silk", this.get_weapon_skill_name,
nil, nil, player, get_sharpness_recovery_buff_valid_timer_method);
this.update_archdemon_mode(player)
end
function this.update_archdemon_mode(player)
if this.apply_filter(dual_blades_type_name, "archdemon_mode") then
return;
end
local is_kijin_kyouka = is_kijin_kyouka_field:get_data(player);
if is_kijin_kyouka == nil then
error_handler.report("weapon_skills.update_archdemon_mode", "Failed to access Data: is_kijin_kyouka");
@@ -711,18 +866,21 @@ function this.update_archdemon_mode(player)
return;
end
buffs.update_generic(this.list, weapon_skills_type_name, "archdemon_mode", this.get_weapon_skill_name, 1, kijin_kyouka_gauge);
this.update_generic("archdemon_mode", 1, kijin_kyouka_gauge);
end
function this.update_hunting_horn_skills(player)
this.update_bead_of_resonance();
this.update_sonic_bloom(player);
buffs.update_generic_buff(this.list, weapon_skills_type_name, "silkbind_shockwave", this.get_weapon_skill_name,
nil, nil, player, horn_impact_pulls_timer_field);
this.update_weapon_skill("silkbind_shockwave", hunting_horn_type_name, nil, nil, player, horn_impact_pulls_timer_field);
end
function this.update_bead_of_resonance()
if this.apply_filter(hunting_horn_type_name, "bead_of_resonance") then
return;
end
if singletons.horn_shell_manager == nil then
error_handler.report("weapon_skills.update_bead_of_resonance", "Failed to access Data: horn_shell_manager");
return;
@@ -779,10 +937,14 @@ function this.update_bead_of_resonance()
return;
end
buffs.update_generic(this.list, weapon_skills_type_name, "bead_of_resonance", this.get_weapon_skill_name, 1, life_timer);
this.update_generic("bead_of_resonance", 1, life_timer);
end
function this.update_sonic_bloom(player)
if this.apply_filter(hunting_horn_type_name, "sonic_bloom") then
return;
end
local blast_speaker_shell = get_ref_blast_speaker_shell_method:call(player);
if blast_speaker_shell == nil then
this.list.bead_of_resonance = nil;
@@ -800,18 +962,15 @@ function this.update_sonic_bloom(player)
return;
end
buffs.update_generic(this.list, weapon_skills_type_name, "sonic_bloom", this.get_weapon_skill_name, 1, life_timer);
this.update_generic("sonic_bloom", 1, life_timer);
end
function this.update_charge_blade_skills(player)
buffs.update_generic_buff(this.list, weapon_skills_type_name, "element_boost", this.get_weapon_skill_name, nil, nil,
player, shield_buff_timer_field);
this.update_weapon_skill("element_boost", charge_blade_type_name, nil, nil, player, shield_buff_timer_field);
buffs.update_generic_buff(this.list, weapon_skills_type_name, "sword_boost_mode", this.get_weapon_skill_name, nil, nil,
player, sword_buff_timer_field);
this.update_weapon_skill("sword_boost_mode", charge_blade_type_name, nil, nil, player, sword_buff_timer_field);
end
function this.update_insect_glaive_skills(player)
this.update_all_extracts_mix(player);
@@ -828,6 +987,10 @@ function this.update_insect_glaive_skills(player)
end
function this.update_all_extracts_mix(player)
if this.apply_filter(insect_glaive_type_name, "all_extracts_mix") then
return;
end
local is_get_all_extractive = is_get_all_extractive_method:call(player);
if is_get_all_extractive == nil then
error_handler.report("weapon_skills.update_all_extracts_mix", "Failed to access Data: is_get_all_extractive");
@@ -850,11 +1013,14 @@ function this.update_all_extracts_mix(player)
return;
end
buffs.update_generic(this.list, weapon_skills_type_name, "all_extracts_mix", this.get_weapon_skill_name, 1,
red_extractive_time);
this.update_generic("all_extracts_mix", 1, red_extractive_time);
end
function this.update_extract(player, extract_key, time_holder)
if this.apply_filter(insect_glaive_type_name, extract_key) then
return;
end
local extractive_time = time_holder:call(player);
if extractive_time == nil then
error_handler.report("weapon_skills.update_extract", string.format("Failed to access Data: %s_extractive_time", extract_key));
@@ -866,21 +1032,14 @@ function this.update_extract(player, extract_key, time_holder)
return;
end
buffs.update_generic(this.list, weapon_skills_type_name, extract_key, this.get_weapon_skill_name, 1, extractive_time);
this.update_generic(extract_key, 1, extractive_time);
end
function this.update_bow_skills(player, player_data)
buffs.update_generic_buff(this.list, weapon_skills_type_name, "herculean_draw", this.get_weapon_skill_name,
nil, nil, player, wire_buff_attack_up_timer_field);
buffs.update_generic_buff(this.list, weapon_skills_type_name, "bolt_boost", this.get_weapon_skill_name,
nil, nil, player, wire_buff_arrow_up_timer_field);
buffs.update_generic_buff(this.list, weapon_skills_type_name, "arc_shot_affinity", this.get_weapon_skill_name,
nil, nil, player_data, crit_chance_bow_timer_field);
buffs.update_generic_buff(this.list, weapon_skills_type_name, "arc_shot_brace", this.get_weapon_skill_name,
nil, nil, player_data, super_armor_item_timer_field);
this.update_weapon_skill("herculean_draw", bow_type_name, nil, nil, player, wire_buff_attack_up_timer_field);
this.update_weapon_skill("bolt_boost", bow_type_name, nil, nil, player, wire_buff_arrow_up_timer_field);
this.update_weapon_skill("arc_shot_affinity", bow_type_name, nil, nil, player_data, crit_chance_bow_timer_field);
this.update_weapon_skill("arc_shot_brace", bow_type_name, nil, nil, player_data, super_armor_item_timer_field);
end
function this.init_names()

View File

@@ -7501,6 +7501,235 @@ function this.init_default()
reversed_order = true
},
filter = {
abnormal_statuses = {
fireblight = true,
waterblight = true,
thunderblight = true,
iceblight = true,
dragonblight = true,
blastblight = true,
minor_bubbleblight = true,
major_bubbleblight = true,
hellfireblight = true,
bloodblight = true,
poison = true,
deadly_poison = true,
stun = true,
paralysis = true,
sleep = true,
defense_down = true,
resistance_down = true,
tremor = true,
roar = true,
webbed = true,
stench = true,
leeched = true,
--whirlwind = true,
bleeding = true,
frenzy = true,
frenzy_overcome = true,
frenzy_infection = true,
engulfed = true,
frostblight = true,
muck = true
},
item_buffs = {
demondrug = true,
mega_demondrug = true,
armorskin = true,
mega_armorskin = true,
demon_powder = true,
hardshell_powder = true,
gourmet_fish = true,
demon_ammo = true,
armor_ammo = true
},
endemic_life_buffs = {
clothfly = true,
stinkmink = true,
butterflame = true,
cutterfly = true,
ruby_wirebug = true,
gold_wirebug = true,
red_lampsquid = true,
yellow_lampsquid = true
},
melody_effects = {
self_improvement = true,
attack_up = true,
defense_up = true,
affinity_up = true,
elemental_attack_boost = true,
attack_and_defense_up = true,
attack_and_affinity_up = true,
knockbacks_negated = true,
earplugs_s = true,
earplugs_l = true,
tremors_negated = true,
wind_pressure_negated = true,
stun_negated = true,
blight_negated = true,
divine_protection = true,
health_recovery_s = true,
health_recovery_l = true,
health_recovery_s_antidote = true,
health_regeneration = true,
stamina_use_reduced = true,
stamina_recovery_up = true,
sharpness_loss_reduced = true,
environment_damage_negated = true,
sonic_wave = true,
sonic_barrier = true,
infernal_melody = true,
sharpness_regeneration = true,
sharpness_extension = true
},
dango_skills = {
dango_adrenaline = true,
dango_booster = true,
dango_insurance = true,
dango_insurance_defense_up = true,
dango_glutton = true,
dango_flyer = true,
dango_defender = true,
dango_hunter = true,
dango_connector = true,
super_recovery_dango = true
},
rampage_skills = {
kushala_daora_soul = true,
chameleos_soul = true
},
skills = {
burst = true,
intrepid_heart = true,
dereliction = true,
latent_power = true,
protective_polish = true,
wind_mantle = true,
grinder_s = true,
counterstrike = true,
affinity_sliding = true,
coalescence = true,
adrenaline_rush = true,
wall_runner = true,
offensive_guard = true,
hellfire_cloak = true,
agitator = true,
furious = true,
status_trigger = true,
heaven_sent = true,
heroics = true,
resuscitate = true,
maximum_might = true,
bloodlust = true,
frenzied_bloodlust = true,
peak_performance = true,
dragonheart = true,
resentment = true,
bladescale_hone = true,
spiribirds_call = true,
embolden = true,
berserk = true,
powder_mantle_red = true,
powder_mantle_blue = true,
strife = true,
inspiration = true,
blood_awakening = true,
dragon_conversion_elemental_attack_up = true,
dragon_conversion_elemental_res_up = true,
partbreaker = true
},
weapon_skills = {
great_sword = {
power_sheathe = true
},
long_sword = {
spirit_gauge_autofill = true, -- Soaring Kick, Iai Slash
spirit_gauge = true,
harvest_moon = true,
},
sword_and_shield = {
destroyer_oil = true
},
dual_blades = {
ironshine_silk = true,
archdemon_mode = true
},
lance = {
anchor_rage = true,
spiral_thrust = true,
twin_wine = true,
},
gunlance = {
ground_splitter = true,
erupting_cannon = true
},
hammer = {
impact_burst = true
},
hunting_horn = {
silkbind_shockwave = true,
bead_of_resonance = true,
sonic_bloom = true
},
switch_axe = {
amped_state = true,
switch_charger = true,
axe_heavy_slam = true
},
charge_blade = {
element_boost = true,
sword_boost_mode = true
},
insect_glaive = {
red_extract = true,
white_extract = true,
orange_extract = true,
all_extracts_mix = true
},
light_bowgun = {
fanning_maneuver = true,
wyvernblast_reload = true
},
heavy_bowgun = {
counter_charger = true,
rising_moon = true,
setting_sun = true,
overheat = true,
wyvernsnipe_reload = true,
},
bow = {
herculean_draw = true,
bolt_boost = true,
arc_shot_affinity = true,
arc_shot_brace = true
}
},
otomo_moves = {
rousing_roar = true,
go_fight_win = true,
power_drum = true
},
misc_buffs = {
attack_up = true,
defense_up = true,
stamina_use_down = true,
immunity = true,
natural_healing_up = true
}
},
name_label = {
visibility = true,

View File

@@ -77,7 +77,24 @@ this.language_folder = "MHR Overlay\\languages\\";
this.current_language = {};
this.default_language = {
font_name = "",
unicode_glyph_ranges = {0},
unicode_glyph_ranges = {
-- 0x0020, 0x00FF, -- Basic Latin + Latin Supplement
-- 0x0100, 0x017F, -- Latin Extended-A
-- 0x0400, 0x052F, -- Cyrillic
-- 0x1100, 0x11FF, -- Hangul Jamo
-- 0x2000, 0x206F, -- General Punctuation
-- 0x3000, 0x30FF, -- CJK Symbols and Punctuations, Hiragana, Katakana
-- 0x3130, 0x318F, -- Hangul Compatibility Jamo
-- 0x31F0, 0x31FF, -- Katakana Phonetic Extensions
-- 0x4e00, 0x9FAF, -- CJK Ideograms
-- 0xAC00, 0xD7AF, -- Hangul Syllables
-- 0xFF00, 0xFFEF, -- Half-width characters
0
},
-- unicode_glyph_ranges = {
-- 0x0020, 0xFFFF,
-- 0
-- },
parts = {
head = "Head",
neck = "Neck",
@@ -180,8 +197,8 @@ this.default_language = {
fireblight = "Fireblight",
waterblight = "Waterblight",
iceblight = "Iceblight",
thunderblight = "Thunderblight",
iceblight = "Iceblight",
fall_trap = "Fall Trap",
shock_trap = "Shock Trap",
@@ -229,55 +246,86 @@ this.default_language = {
dragon_conversion_elemental_res_up = "Dragon Conversion Elem. Res Up",
},
weapons = {
great_sword = "Great Sword",
long_sword = "Long Sword",
sword_and_shield = "Sword & Shield",
dual_blades = "Dual Blades",
lance = "Lance",
gunlance = "Gunlance",
hammer = "Hammer",
hunting_horn = "Hunting Horn",
switch_axe = "Switch Axe",
charge_blade = "Charge Blade",
insect_glaive = "Insect Glaive",
light_bowgun = "Light Bowgun",
heavy_bowgun = "Heavy Bowgun",
bow = "Bow"
},
weapon_skills = {
-- Great Sword
power_sheathe = "Power Sheathe",
-- Long Sword
iai_slash = "Iai Slash",
spirit_gauge_autofill = "Spirit Gauge Autofill", -- Soaring Kick, Iai Slash
spirit_gauge = "Spirit Gauge",
-- harvest_moon = "Harvest Moon",
-- Sword & Shield
-- destroyer_oil = "Destroyer Oil",
-- Dual Blades
ironshine_silk = "Ironshine Silk",
archdemon_mode = "Archdemon Mode",
-- Lance
-- anchor_rage = "Anchor Rage",
-- spiral_thrust = "Spiral Thrust",
twin_wine = "Twin Wine",
-- Gunlance
--ground_splitter = "Ground Splitter",
--erupting_cannon = "Erupting Cannon",
-- Hammer
-- impact_burst = "Impact Burst",
-- Hunting Horn
-- silkbind_shockwave = "Silkbind Shockwave",
-- bead_of_resonance = "Bead of Resonance",
-- sonic_bloom = "Sonic Bloom",
-- Switch Axe
amped_state = "Amped State",
switch_charger = "Switch Charger",
axe_heavy_slam = "Axe: Heavy Slam",
-- Long Sword
spirit_gauge_autofill = "Spirit Gauge Autofill", -- Soaring Kick, Iai Slash
spirit_gauge = "Spirit Gauge",
--harvest_moon = "Harvest Moon",
-- Light Bowgun
--fanning_maneuver = "Fanning Maneuver",
wyvernblast_reload = "Wyvernblast Reload",
-- Heavy Bowgun
--counter_charger = "Counter Charger",
--rising_moon = "Rising Moon",
--setting_sun = "Setting Sun",
overheat = "Overheat",
wyvernsnipe_reload = "Wyvernsnipe Reload",
-- Hammer
--impact_burst = "Impact Burst",
-- Gunlance
--ground_splitter = "Ground Splitter",
--erupting_cannon = "Erupting Cannon",
-- Lance
--anchor_rage = "Anchor Rage",
--spiral_thrust = "Spiral Thrust",
twin_wine = "Twin Wine",
-- Sword & Shield
--destroyer_oil = "Destroyer Oil",
-- Dual Blades
ironshine_silk = "Ironshine Silk",
archdemon_mode = "Archdemon Mode",
-- Hunting Horn
--silkbind_shockwave = "Silkbind Shockwave",
--bead_of_resonance = "Bead of Resonance",
--sonic_bloom = "Sonic Bloom",
-- Charge Blade
element_boost = "Element Boost",
sword_boost_mode ="Sword Boost Mode",
-- Insect Glaive
red_extract = "Red Extract",
white_extract = "White Extract",
orange_extract = "Orange Extract",
all_extracts_mix = "All Extracts Mix",
-- Light Bowgun
-- fanning_maneuver = "Fanning Maneuver",
wyvernblast_reload = "Wyvernblast Reload",
-- Heavy Bowgun
-- counter_charger = "Counter Charger",
-- rising_moon = "Rising Moon",
-- setting_sun = "Setting Sun",
overheat = "Overheat",
wyvernsnipe_reload = "Wyvernsnipe Reload",
-- Bow
herculean_draw = "Herculean Draw",
--bolt_boost = "Bolt Boost",
-- bolt_boost = "Bolt Boost",
arc_shot_affinity = "Arc Shot: Affinity",
arc_shot_brace = "Arc Shot: Brace",
},
@@ -311,6 +359,26 @@ this.default_language = {
lv = ""
},
stats = {
attack = "Attack",
defense = "Defense",
affinity = "Affinity",
fire_resistance = "Fire Res";
water_resistance = "Water Res";
thunder_resistance = "Thunder Res";
ice_resistance = "Ice Res";
dragon_resistance = "Dragon Res";
stamina = "Stamina",
fire = "Fire",
water = "Water",
thunder = "Thunder",
ice = "Ice",
dragon = "Dragon",
},
customization_menu = {
mod_name = "MHR Overlay";
status = "Status",
@@ -688,28 +756,19 @@ this.default_language = {
ice_resistance_label = "Ice Resistance Label",
dragon_resistance_label = "Dragon Resistance Label",
element_label = "Element Label",
element_2_label = "Element 2 Label"
element_2_label = "Element 2 Label",
abnormal_statuses = "Abnormal Statuses",
item_buffs = "Item Buffs",
endemic_life_buffs = "Endemic Life Buffs",
melody_effects = "Melody Effects",
dango_skills = "Dango Skills",
rampage_skills = "Rampage Skills",
skills = "Skills",
weapon_skills = "Weapon Skills",
otomo_moves = "Buddy Moves",
misc_buffs = "Misc Buffs",
},
stats = {
attack = "Attack",
defense = "Defense",
affinity = "Affinity",
fire_resistance = "Fire Res";
water_resistance = "Water Res";
thunder_resistance = "Thunder Res";
ice_resistance = "Ice Res";
dragon_resistance = "Dragon Res";
stamina = "Stamina",
fire = "Fire",
water = "Water",
thunder = "Thunder",
ice = "Ice",
dragon = "Dragon",
}
};
this.language_names = { "default"};

View File

@@ -9,6 +9,7 @@ local error_handler;
local quest_status;
local time;
local dango_skills;
local skills;
local sdk = sdk;
local tostring = tostring;
@@ -104,6 +105,8 @@ local player_quest_base_update_method = player_quest_base_type_def:get_method("u
local is_master_player_method = player_quest_base_type_def:get_method("isMasterPlayer");
local player_base_type_def = sdk.find_type_definition("snow.player.PlayerBase");
-- Heroics
local is_predicament_power_up_method = player_base_type_def:get_method("isPredicamentPowerUp");
-- Dango Adrenaline
local is_kitchen_skill_predicament_powerup_method = player_base_type_def:get_method("isKitchenSkillPredicamentPowerUp");
@@ -273,6 +276,7 @@ function this.on_pre_player_update(quest_player_base)
end
this.update_health(quest_player_base);
this.update_heroics(quest_player_base);
this.update_dango_adrenaline(quest_player_base);
should_health_update = false;
@@ -288,7 +292,25 @@ function this.update_health(quest_player_base)
this.list.health = vital;
end
function this.update_heroics(quest_player_base)
if not config.current_config.buff_UI.filter.skills.heroics then
return;
end
local is_predicament_power_up = is_predicament_power_up_method:call(master_player_ref);
if is_predicament_power_up == nil then
error_handler.report("player_info.update_heroics", "Failed to access Data: is_predicament_power_up");
return;
end
skills.is_heroics_active = is_predicament_power_up;
end
function this.update_dango_adrenaline(quest_player_base)
if not config.current_config.buff_UI.filter.dango_skills.dango_adrenaline then
return;
end
local is_kitchen_skill_predicament_powerup = is_kitchen_skill_predicament_powerup_method:call(master_player_ref);
if is_kitchen_skill_predicament_powerup == nil then
error_handler.report("player_info.update_dango_adrenaline", "Failed to access Data: is_kitchen_skill_predicament_powerup");
@@ -313,6 +335,7 @@ function this.init_dependencies()
quest_status = require("MHR_Overlay.Game_Handler.quest_status");
time = require("MHR_Overlay.Game_Handler.time");
dango_skills = require("MHR_Overlay.Buffs.dango_skills");
skills = require("MHR_Overlay.Buffs.skills");
end
function this.init_module()

View File

@@ -56,110 +56,78 @@ function this.update()
local _displayed_buffs = {};
for key, item_buff in pairs(item_buffs.list) do
if not item_buff.is_active then
goto continue;
for key, abnormal_status in pairs(abnormal_statuses.list) do
if abnormal_status.is_visible then
table.insert(_displayed_buffs, abnormal_status);
end
end
table.insert(_displayed_buffs, item_buff);
for key, item_buff in pairs(item_buffs.list) do
::continue::
if item_buff.is_visible then
table.insert(_displayed_buffs, item_buff);
end
end
for key, endemic_life_buff in pairs(endemic_life_buff.list) do
if endemic_life_buff.is_visible then
table.insert(_displayed_buffs, endemic_life_buff);
end
end
for _, melody_effect in pairs(melody_effects.list) do
if not melody_effect.is_active then
goto continue2;
if melody_effect.is_visible then
table.insert(_displayed_buffs, melody_effect);
end
table.insert(_displayed_buffs, melody_effect);
::continue2::
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_skill in pairs(dango_skills.list) do
if not dango_skill.is_active then
goto continue5;
if dango_skill.is_visible then
table.insert(_displayed_buffs, dango_skill);
end
table.insert(_displayed_buffs, dango_skill);
::continue5::
end
for key, abnormal_status in pairs(abnormal_statuses.list) do
if not abnormal_status.is_active then
goto continue6;
end
table.insert(_displayed_buffs, abnormal_status);
::continue6::
end
for key, otomo_move in pairs(otomo_moves.list) do
if not otomo_move.is_active then
goto continue7;
end
table.insert(_displayed_buffs, otomo_move);
::continue7::
end
for key, weapon_skill in pairs(weapon_skills.list) do
if not weapon_skill.is_active then
goto continue8;
end
table.insert(_displayed_buffs, weapon_skill);
::continue8::
end
for key, rampage_skill in pairs(rampage_skills.list) do
if not rampage_skill.is_active then
goto continue9;
if rampage_skill.is_visible then
table.insert(_displayed_buffs, rampage_skill);
end
end
table.insert(_displayed_buffs, rampage_skill);
for key, skill in pairs(skills.list) do
::continue9::
if skill.is_visible then
table.insert(_displayed_buffs, skill);
end
end
for key, weapon_skill in pairs(weapon_skills.list) do
if weapon_skill.is_visible then
table.insert(_displayed_buffs, weapon_skill);
end
end
for key, otomo_move in pairs(otomo_moves.list) do
if otomo_move.is_visible then
table.insert(_displayed_buffs, otomo_move);
end
end
for key, misc_buffs in pairs(misc_buffs.list) do
if not misc_buffs.is_active then
goto continue10;
if misc_buffs.is_visible then
table.insert(_displayed_buffs, misc_buffs);
end
table.insert(_displayed_buffs, misc_buffs);
::continue10::
end
displayed_buffs = this.sort_buffs(_displayed_buffs, cached_config);
end
function this.sort_buffs(_displayed_buffs, cached_config)

View File

@@ -13,11 +13,22 @@ local time_UI;
local keyboard;
local non_players;
local quest_status;
local buffs;
local error_handler;
local time;
local stats_UI;
local buffs;
local item_buffs;
local melody_effects;
local endemic_life_buffs;
local skills;
local dango_skills;
local abnormal_statuses;
local otomo_moves;
local weapon_skills;
local rampage_skills;
local misc_buffs;
local label_customization;
local bar_customization;
local large_monster_UI_customization;
@@ -471,16 +482,15 @@ function this.draw()
end
if buff_UI_changed or modifiers_changed or config_changed then
for _, buff in pairs(buffs.list) do
buffs.init_UI(buff);
end
-- for _, buff in pairs(buffs.list) do
-- buffs.init_UI(buff);
-- end
end
if stats_UI_changed or modifiers_changed or config_changed then
stats_UI.init_UI();
end
if this.menu_font_changed and (apply_font_requested or config_changed) then
this.menu_font_changed = false;
this.reload_font();
@@ -2302,6 +2312,190 @@ function this.draw_buff_UI()
imgui.tree_pop();
end
if imgui.tree_node(language.current_language.customization_menu.filter) then
-- weapon_skills = "Weapon Skills",
-- otomo_moves = "Buddy Moves",
-- misc_buffs = "Misc Buffs",
if imgui.tree_node(language.current_language.customization_menu.abnormal_statuses) then
for _, key in ipairs(abnormal_statuses.keys) do
changed, cached_config.filter.abnormal_statuses[key] = imgui.checkbox(
abnormal_statuses.get_abnormal_status_name(key), cached_config.filter.abnormal_statuses[key]);
config_changed = config_changed or changed;
end
imgui.tree_pop();
end
if imgui.tree_node(language.current_language.customization_menu.item_buffs) then
for _, key in ipairs(item_buffs.keys) do
changed, cached_config.filter.item_buffs[key] = imgui.checkbox(
item_buffs.get_item_buff_name(key), cached_config.filter.item_buffs[key]);
config_changed = config_changed or changed;
end
imgui.tree_pop();
end
if imgui.tree_node(language.current_language.customization_menu.endemic_life_buffs) then
for _, key in ipairs(endemic_life_buffs.keys) do
changed, cached_config.filter.endemic_life_buffs[key] = imgui.checkbox(
endemic_life_buffs.get_endemic_life_name(key), cached_config.filter.endemic_life_buffs[key]);
config_changed = config_changed or changed;
end
imgui.tree_pop();
end
if imgui.tree_node(language.current_language.customization_menu.melody_effects) then
for lua_index, key in ipairs(melody_effects.keys) do
if (lua_index >= 16 and lua_index <= 18) or lua_index == 24 then
goto continue;
end
changed, cached_config.filter.melody_effects[key] = imgui.checkbox(
melody_effects.get_melody_effect_name(lua_index - 1), cached_config.filter.melody_effects[key]);
config_changed = config_changed or changed;
::continue::
end
imgui.tree_pop();
end
if imgui.tree_node(language.current_language.customization_menu.dango_skills) then
for _, key in ipairs(dango_skills.keys) do
changed, cached_config.filter.dango_skills[key] = imgui.checkbox(
dango_skills.get_dango_skill_name(key), cached_config.filter.dango_skills[key]);
config_changed = config_changed or changed;
end
imgui.tree_pop();
end
if imgui.tree_node(language.current_language.customization_menu.rampage_skills) then
for _, key in ipairs(rampage_skills.keys) do
changed, cached_config.filter.rampage_skills[key] = imgui.checkbox(
rampage_skills.get_rampage_skill_name(key), cached_config.filter.rampage_skills[key]);
config_changed = config_changed or changed;
end
imgui.tree_pop();
end
if imgui.tree_node(language.current_language.customization_menu.skills) then
for _, key in ipairs(skills.keys) do
changed, cached_config.filter.skills[key] = imgui.checkbox(
skills.get_skill_name(key), cached_config.filter.skills[key]);
config_changed = config_changed or changed;
end
imgui.tree_pop();
end
if imgui.tree_node(language.current_language.customization_menu.weapon_skills) then
for _, weapon in ipairs(weapon_skills.keys) do
if imgui.tree_node(language.current_language.weapons[weapon.key]) then
local cached_weapon_filter = cached_config.filter.weapon_skills[weapon.key];
for _, key in ipairs(weapon.skill_keys) do
local name = weapon_skills.get_weapon_skill_name(key);
if key == "spirit_gauge_autofill" then
local soaring_kick_name = weapon_skills.get_weapon_skill_name("soaring_kick");
local iai_slash_name = weapon_skills.get_weapon_skill_name("iai_slash");
name = string.format("%s (%s, %s)", name, soaring_kick_name, iai_slash_name);
end
changed, cached_weapon_filter[key] = imgui.checkbox(
name, cached_weapon_filter[key]);
config_changed = config_changed or changed;
end
imgui.tree_pop();
end
end
imgui.tree_pop();
end
if imgui.tree_node(language.current_language.customization_menu.otomo_moves) then
for _, key in ipairs(otomo_moves.keys) do
changed, cached_config.filter.otomo_moves[key] = imgui.checkbox(
otomo_moves.get_otomo_move_name(key), cached_config.filter.otomo_moves[key]);
config_changed = config_changed or changed;
end
imgui.tree_pop();
end
if imgui.tree_node(language.current_language.customization_menu.misc_buffs) then
for _, key in ipairs(misc_buffs.keys) do
local name = misc_buffs.get_misc_buff_name(key);
if key == "attack_up" then
local might_seed_name = item_buffs.get_item_buff_name("might_seed");
local dango_bulker_name = dango_skills.get_dango_skill_name("dango_bulker");
local chameleos_soul_name = rampage_skills.get_rampage_skill_name("chameleos_soul");
name = string.format("%s (%s, %s, %s)", name, might_seed_name, dango_bulker_name, chameleos_soul_name);
elseif key == "defense_up" then
local adamant_seed_name = item_buffs.get_item_buff_name("adamant_seed");
local chameleos_soul_name = rampage_skills.get_rampage_skill_name("chameleos_soul");
name = string.format("%s (%s, %s)", name, adamant_seed_name, chameleos_soul_name);
elseif key == "stamina_use_down" then
local dash_juice_name = item_buffs.get_item_buff_name("dash_juice");
local peepersects_name = endemic_life_buffs.get_endemic_life_name("peepersects");
local chameleos_soul_name = rampage_skills.get_rampage_skill_name("chameleos_soul");
name = string.format("%s (%s, %s, %s)", name, dash_juice_name, peepersects_name, chameleos_soul_name);
elseif key == "natural_healing_up" then
local immunizer_name = item_buffs.get_item_buff_name("immunizer");
local vase_of_vitality_name = otomo_moves.get_otomo_move_name("vase_of_vitality");
name = string.format("%s (%s, %s)", name, immunizer_name, vase_of_vitality_name);
end
changed, cached_config.filter.misc_buffs[key] = imgui.checkbox(
name, cached_config.filter.misc_buffs[key]);
config_changed = config_changed or changed;
end
imgui.tree_pop();
end
imgui.tree_pop();
end
changed = label_customization.draw(language.current_language.customization_menu.name_label, cached_config.name_label);
config_changed = config_changed or changed;
@@ -2467,11 +2661,22 @@ function this.init_dependencies()
keyboard = require("MHR_Overlay.Game_Handler.keyboard");
non_players = require("MHR_Overlay.Damage_Meter.non_players");
quest_status = require("MHR_Overlay.Game_Handler.quest_status");
buffs = require("MHR_Overlay.Buffs.buffs");
error_handler = require("MHR_Overlay.Misc.error_handler");
time = require("MHR_Overlay.Game_Handler.time");
stats_UI = require("MHR_Overlay.UI.Modules.stats_UI");
buffs = require("MHR_Overlay.Buffs.buffs");
item_buffs = require("MHR_Overlay.Buffs.item_buffs");
melody_effects = require("MHR_Overlay.Buffs.melody_effects");
endemic_life_buffs = require("MHR_Overlay.Buffs.endemic_life_buffs");
skills = require("MHR_Overlay.Buffs.skills");
dango_skills = require("MHR_Overlay.Buffs.dango_skills");
abnormal_statuses = require("MHR_Overlay.Buffs.abnormal_statuses");
otomo_moves = require("MHR_Overlay.Buffs.otomo_moves");
weapon_skills = require("MHR_Overlay.Buffs.weapon_skills");
rampage_skills = require("MHR_Overlay.Buffs.rampage_skills");
misc_buffs = require("MHR_Overlay.Buffs.misc_buffs");
label_customization = require("MHR_Overlay.UI.Customizations.label_customization");
bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization");
large_monster_UI_customization = require("MHR_Overlay.UI.Customizations.large_monster_UI_customization");