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

@@ -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()