21 Commits

Author SHA1 Message Date
GreenComfyTea
6b8809b79e Add more quest_status restrictions 2023-08-06 16:20:15 +03:00
GreenComfyTea
d20446fe37 Change default customization menu window height 2023-08-06 16:08:35 +03:00
GreenComfyTea
4e4aae3c68 Update localizations 2023-08-06 16:08:06 +03:00
GreenComfyTea
3e121fbd1c Add Customization Menu status, position and size to config
+ Customization Menu bugfixes
2023-08-06 15:57:48 +03:00
GreenComfyTea
ade8a6bf19 Formatting 2023-08-06 14:43:41 +03:00
GreenComfyTea
0eac453bf4 Add some quest_status restrictions 2023-08-06 14:27:23 +03:00
GreenComfyTea
c4b7f6d195 Fix Health access attempts outside hooks
(large monster updated in previous commit)
2023-08-06 14:26:59 +03:00
GreenComfyTea
e389f6cf53 Remove magical numbers of stealth monster ids + process toadversary properly + Fix Crown Threshold Typo 2023-08-06 14:25:22 +03:00
GreenComfyTea
9e8c77f480 Singletons are not real singletons so track changes 2023-08-06 13:25:05 +03:00
GreenComfyTea
9c2bc59a37 Undo previous commit 2023-08-06 12:24:08 +03:00
GreenComfyTea
effe5579a7 Move env.creature.update_position to draw function 2023-08-06 12:22:09 +03:00
GreenComfyTea
0fbf47f7ff comment out monster update_position 2023-08-06 12:18:02 +03:00
GreenComfyTea
3e508c0e28 Move highlight_id to large_monster from draw function 2023-08-06 12:17:06 +03:00
GreenComfyTea
972d874a99 Clean up 2023-08-06 12:15:42 +03:00
GreenComfyTea
50726b9291 Init Singletons on init_module 2023-08-06 12:15:25 +03:00
GreenComfyTea
c39e5babea Rename list to array 2023-08-06 12:14:59 +03:00
GreenComfyTea
d1f56f4316 Ignore error during REFramework Initialization 2023-08-06 12:14:34 +03:00
GreenComfyTea
d3efcb5b08 Typo 2023-08-06 12:14:13 +03:00
GreenComfyTea
681b865f03 Create missing small monster entries in draw function 2023-08-06 12:13:48 +03:00
GreenComfyTea
6f40a1dfd3 Update localizations 2023-08-06 12:13:12 +03:00
GreenComfyTea
432e115aea Fix fake error when assigning creature name 2023-08-06 12:12:41 +03:00
32 changed files with 488 additions and 429 deletions

View File

@@ -361,16 +361,14 @@ end
-- #region
re.on_draw_ui(function()
if imgui.button(language.current_language.customization_menu.mod_name .. " v" .. config.current_config.version) then
customization_menu.is_opened = not customization_menu.is_opened;
local cached_config = config.current_config.customization_menu;
cached_config.visible = not cached_config.visible;
config.save_current();
end
end);
re.on_frame(function()
if not reframework:is_drawing_ui() then
customization_menu.is_opened = false;
end
if customization_menu.is_opened then
if reframework:is_drawing_ui() then
pcall(customization_menu.draw);
end

View File

@@ -114,18 +114,19 @@ end
function this.update()
if singletons.player_manager == nil then
error_handler.report("buffs.update", "Failed to Access Data: player_manager");
error_handler.report("buffs.update", "Failed to access Data: player_manager");
return;
end
if quest_status.flow_state == quest_status.flow_states.IN_LOBBY
if quest_status.flow_state <= quest_status.flow_states.IN_LOBBY
or quest_status.flow_state == quest_status.flow_states.CUTSCENE
or quest_status.flow_state >= quest_status.flow_states.QUEST_END_ANIMATION then
return;
end
local master_player = find_master_player_method:call(singletons.player_manager);
if master_player == nil then
error_handler.report("buffs.update", "Failed to Access Data: master_player");
error_handler.report("buffs.update", "Failed to access Data: master_player");
return;
end
@@ -133,7 +134,7 @@ function this.update()
if master_player_data ~= nil then
consumables.update(master_player_data);
else
error_handler.report("buffs.update", "Failed to Access Data: master_player_data");
error_handler.report("buffs.update", "Failed to access Data: master_player_data");
end
local music_data_array = music_data_field:get_data(master_player);
@@ -144,7 +145,7 @@ function this.update()
for i = 0, length do
local music_data = get_value_method:call(music_data_array, i);
if music_data == nil then
error_handler.report("buffs.update", "Failed to Access Data: music_data No." .. tostring(i));
error_handler.report("buffs.update", "Failed to access Data: music_data No." .. tostring(i));
music_data = "";
end
@@ -153,7 +154,7 @@ function this.update()
melody_effects.update(music_data_table);
else
error_handler.report("buffs.update", "Failed to Access Data: music_data_array");
error_handler.report("buffs.update", "Failed to access Data: music_data_array");
end
end

View File

@@ -100,7 +100,7 @@ local get_value_method = system_array_type_def:get_method("GetValue(System.Int32
function this.update(player_data)
local item_parameter = get_ref_item_parameter_method:call(singletons.player_manager);
if item_parameter == nil then
error_handler.report("consumables.update", "Failed to Access Data: item_parameter");
error_handler.report("consumables.update", "Failed to access Data: item_parameter");
return;
end
@@ -117,7 +117,7 @@ end
function this.update_demondrug(player_data, item_parameter)
local demondrug_value = atk_up_alive_field:get_data(player_data);
if demondrug_value == nil then
error_handler.report("consumables.update_demondrug", "Failed to Access Data: demondrug_value");
error_handler.report("consumables.update_demondrug", "Failed to access Data: demondrug_value");
return;
end
@@ -129,13 +129,13 @@ function this.update_demondrug(player_data, item_parameter)
local demondrug_const_value = demondrug_atk_up_field:get_data(item_parameter);
if demondrug_const_value == nil then
error_handler.report("consumables.update_demondrug", "Failed to Access Data: demondrug_const_value");
error_handler.report("consumables.update_demondrug", "Failed to access Data: demondrug_const_value");
return;
end
local mega_demondrug_const_value = great_demondrug_atk_up_field:get_data(item_parameter);
if mega_demondrug_const_value == nil then
error_handler.report("consumables.update_demondrug", "Failed to Access Data: mega_demondrug_const_value");
error_handler.report("consumables.update_demondrug", "Failed to access Data: mega_demondrug_const_value");
return;
end
if demondrug_value == demondrug_const_value then
@@ -165,7 +165,7 @@ end
function this.update_armorskin(player_data, item_parameter)
local armorskin_value = def_up_alive_field:get_data(player_data);
if armorskin_value == nil then
error_handler.report("consumables.update_armorskin", "Failed to Access Data: armorskin_value");
error_handler.report("consumables.update_armorskin", "Failed to access Data: armorskin_value");
return;
end
@@ -177,13 +177,13 @@ function this.update_armorskin(player_data, item_parameter)
local armorskin_const_value = armorskin_def_up_field:get_data(item_parameter);
if armorskin_const_value == nil then
error_handler.report("consumables.update_armorskin", "Failed to Access Data: armorskin_const_value");
error_handler.report("consumables.update_armorskin", "Failed to access Data: armorskin_const_value");
return;
end
local mega_armorskin_const_value = great_armorskin_def_up_field:get_data(item_parameter);
if mega_armorskin_const_value == nil then
error_handler.report("consumables.update_armorskin", "Failed to Access Data: mega_armorskin_const_value");
error_handler.report("consumables.update_armorskin", "Failed to access Data: mega_armorskin_const_value");
return;
end
@@ -214,7 +214,7 @@ end
function this.update_might_seed(player_data, item_parameter)
local might_seed_value = atk_up_buff_second_field:get_data(player_data);
if might_seed_value == nil then
error_handler.report("consumables.update_might_seed", "Failed to Access Data: might_seed_value");
error_handler.report("consumables.update_might_seed", "Failed to access Data: might_seed_value");
return;
end
@@ -225,7 +225,7 @@ function this.update_might_seed(player_data, item_parameter)
local might_seed_timer = atk_up_buff_second_timer_field:get_data(player_data);
if might_seed_timer == nil then
error_handler.report("consumables.update_might_seed", "Failed to Access Data: might_seed_timer");
error_handler.report("consumables.update_might_seed", "Failed to access Data: might_seed_timer");
return;
end
@@ -233,7 +233,7 @@ function this.update_might_seed(player_data, item_parameter)
if buff == nil then
local might_seed_timer_const_value = might_seed_timer_field:get_data(item_parameter);
if might_seed_timer_const_value == nil then
error_handler.report("consumables.update_might_seed", "Failed to Access Data: might_seed_timer_const_value");
error_handler.report("consumables.update_might_seed", "Failed to access Data: might_seed_timer_const_value");
return;
end
@@ -250,7 +250,7 @@ end
function this.update_adamant_seed(player_data, item_parameter)
local adamant_seed_value = def_up_buff_second_field:get_data(player_data);
if adamant_seed_value == nil then
error_handler.report("consumables.update_adamant_seed", "Failed to Access Data: adamant_seed_value");
error_handler.report("consumables.update_adamant_seed", "Failed to access Data: adamant_seed_value");
return;
end
@@ -261,7 +261,7 @@ function this.update_adamant_seed(player_data, item_parameter)
local adamant_seed_timer = def_up_buff_second_timer_field:get_data(player_data);
if adamant_seed_timer == nil then
error_handler.report("consumables.update_adamant_seed", "Failed to Access Data: adamant_seed_timer");
error_handler.report("consumables.update_adamant_seed", "Failed to access Data: adamant_seed_timer");
return;
end
@@ -269,7 +269,7 @@ function this.update_adamant_seed(player_data, item_parameter)
if buff == nil then
local adamant_seed_timer_const_value = adamant_seed_timer_field:get_data(item_parameter);
if adamant_seed_timer_const_value == nil then
error_handler.report("consumables.update_adamant_seed", "Failed to Access Data: adamant_seed_timer_const_value");
error_handler.report("consumables.update_adamant_seed", "Failed to access Data: adamant_seed_timer_const_value");
return;
end
@@ -286,7 +286,7 @@ end
function this.update_demon_powder(player_data, item_parameter)
local demon_powder_value = atk_up_item_second_field:get_data(player_data);
if demon_powder_value == nil then
error_handler.report("consumables.update_demon_powder", "Failed to Access Data: demon_powder_value");
error_handler.report("consumables.update_demon_powder", "Failed to access Data: demon_powder_value");
return;
end
@@ -297,7 +297,7 @@ function this.update_demon_powder(player_data, item_parameter)
local demon_powder_timer = atk_up_item_second_timer_field:get_data(player_data);
if demon_powder_timer == nil then
error_handler.report("consumables.update_demon_powder", "Failed to Access Data: demon_powder_timer");
error_handler.report("consumables.update_demon_powder", "Failed to access Data: demon_powder_timer");
return;
end
@@ -305,7 +305,7 @@ function this.update_demon_powder(player_data, item_parameter)
if buff == nil then
local demon_powder_timer_const_value = demondrug_powder_timer_field:get_data(item_parameter);
if demon_powder_timer_const_value == nil then
error_handler.report("consumables.update_demon_powder", "Failed to Access Data: demon_powder_timer_const_value");
error_handler.report("consumables.update_demon_powder", "Failed to access Data: demon_powder_timer_const_value");
return;
end
@@ -322,7 +322,7 @@ end
function this.update_hardshell_powder(player_data, item_parameter)
local hardshell_powder_value = def_up_item_second_field:get_data(player_data);
if hardshell_powder_value == nil then
error_handler.report("consumables.update_hardshell_powder", "Failed to Access Data: hardshell_powder_value");
error_handler.report("consumables.update_hardshell_powder", "Failed to access Data: hardshell_powder_value");
return;
end
@@ -333,7 +333,7 @@ function this.update_hardshell_powder(player_data, item_parameter)
local hardshell_powder_timer = def_up_item_second_timer_field:get_data(player_data);
if hardshell_powder_timer == nil then
error_handler.report("consumables.update_hardshell_powder", "Failed to Access Data: hardshell_powder_timer");
error_handler.report("consumables.update_hardshell_powder", "Failed to access Data: hardshell_powder_timer");
return;
end
@@ -341,7 +341,7 @@ function this.update_hardshell_powder(player_data, item_parameter)
if buff == nil then
local demon_powder_timer_const_value = armorskin_powder_timer_field:get_data(item_parameter);
if demon_powder_timer_const_value == nil then
error_handler.report("consumables.update_hardshell_powder", "Failed to Access Data: demon_powder_timer_const_value");
error_handler.report("consumables.update_hardshell_powder", "Failed to access Data: demon_powder_timer_const_value");
return;
end
@@ -358,7 +358,7 @@ end
function this.update_immunizer(player_data, item_parameter)
local immunizer_timer = vitalizer_timer_field:get_data(player_data);
if immunizer_timer == nil then
error_handler.report("consumables.update_immunizer", "Failed to Access Data: immunizer_timer");
error_handler.report("consumables.update_immunizer", "Failed to access Data: immunizer_timer");
return;
end
@@ -371,7 +371,7 @@ function this.update_immunizer(player_data, item_parameter)
if buff == nil then
local immunizer_timer_const_value = vitalizer_timer_const_field:get_data(item_parameter);
if immunizer_timer_const_value == nil then
error_handler.report("consumables.update_immunizer", "Failed to Access Data: immunizer_timer_const_value");
error_handler.report("consumables.update_immunizer", "Failed to access Data: immunizer_timer_const_value");
return;
end
@@ -387,7 +387,7 @@ end
function this.update_dash_juice(player_data, item_parameter)
local dash_juice_timer = stamina_up_buff_second_timer_field:get_data(player_data);
if dash_juice_timer == nil then
error_handler.report("consumables.update_dash_juice", "Failed to Access Data: dash_juice_timer");
error_handler.report("consumables.update_dash_juice", "Failed to access Data: dash_juice_timer");
return;
end
@@ -401,7 +401,7 @@ function this.update_dash_juice(player_data, item_parameter)
if buff == nil then
local dash_juice_timer_const_value = stamina_up_buff_second_field:get_data(item_parameter);
if dash_juice_timer_const_value == nil then
error_handler.report("consumables.update_dash_juice", "Failed to Access Data: dash_juice_timer");
error_handler.report("consumables.update_dash_juice", "Failed to access Data: dash_juice_timer");
return;
end

View File

@@ -116,7 +116,7 @@ function this.update(melody_data_table)
local melody_timer = time_field:get_data(melody_data);
if melody_timer == nil then
error_handler.report("melody_effects.update", "Failed to Access Data: melody_timer No. " .. tostring(lua_index - 1));
error_handler.report("melody_effects.update", "Failed to access Data: melody_timer No. " .. tostring(lua_index - 1));
goto continue;
end

View File

@@ -107,13 +107,13 @@ function this.update_damage(enemy, enemy_calc_damage_info)
local is_large_monster = is_boss_enemy_method:call(enemy);
if is_large_monster == nil then
error_handler.report("damage_hook.update_damage", "Failed to Access Data: is_large_monster");
error_handler.report("damage_hook.update_damage", "Failed to access Data: is_large_monster");
return;
end
local dead_or_captured = check_die_method:call(enemy);
if dead_or_captured == nil then
error_handler.report("damage_hook.update_damage", "Failed to Access Data: dead_or_captured");
error_handler.report("damage_hook.update_damage", "Failed to access Data: dead_or_captured");
return;
end
@@ -300,7 +300,7 @@ function this.on_stock_direct_marionette_finish_shoot_hit_parts_damage(enemy, da
end
if player == nil then
error_handler.report("damage_hook.on_stock_direct_marionette_finish_shoot_hit_parts_damage", "Failed to Create Player Entry");
error_handler.report("damage_hook.on_stock_direct_marionette_finish_shoot_hit_parts_damage", "Failed to create Player Entry");
return;
end
@@ -366,7 +366,7 @@ function this.on_anomaly_core_break(anomaly_core_part)
local anomaly_core_break_damage_rate = get_mystery_core_break_damage_rate_method:call(anomaly_monster.enemy);
if anomaly_core_break_damage_rate == nil then
error_handler.report("damage_hook.on_anomaly_core_break", "Failed to Access Data: anomaly_core_break_damage_rate");
error_handler.report("damage_hook.on_anomaly_core_break", "Failed to access Data: anomaly_core_break_damage_rate");
return;
end

View File

@@ -133,19 +133,19 @@ function this.update_servant_list()
local cached_config = config.current_config.damage_meter_UI;
if singletons.servant_manager == nil then
error_handler.report("non_players.update_servant_list", "Failed to Access Data: servant_manager");
error_handler.report("non_players.update_servant_list", "Failed to access Data: servant_manager");
return;
end
local quest_servant_id_list = get_quest_servant_id_list_method:call(singletons.servant_manager);
if quest_servant_id_list == nil then
error_handler.report("non_players.update_servant_list", "Failed to Access Data: quest_servant_id_list");
error_handler.report("non_players.update_servant_list", "Failed to access Data: quest_servant_id_list");
return;
end
local servant_count = servant_get_count_method:call(quest_servant_id_list);
if servant_count == nil then
error_handler.report("non_players.update_servant_list", "Failed to Access Data: servant_count");
error_handler.report("non_players.update_servant_list", "Failed to access Data: servant_count");
return;
end
@@ -153,20 +153,20 @@ function this.update_servant_list()
for i = 0, servant_count - 1 do
local servant_id = servant_get_item_method:call(quest_servant_id_list, i);
if servant_id == nil then
error_handler.report("non_players.update_servant_list", "Failed to Access Data: servant_id No." .. tostring(i));
error_handler.report("non_players.update_servant_list", "Failed to access Data: servant_id No." .. tostring(i));
goto continue;
end
local ai_control = get_ai_control_by_servant_id_method:call(singletons.servant_manager, servant_id);
if ai_control == nil then
error_handler.report("non_players.update_servant_list", "Failed to Access Data: ai_control No." .. tostring(i));
error_handler.report("non_players.update_servant_list", "Failed to access Data: ai_control No." .. tostring(i));
goto continue;
end
local servant_info = get_servant_info_method:call(ai_control);
if servant_info == nil then
error_handler.report("non_players.update_servant_list", "Failed to Access Data: servant_info No." .. tostring(i));
error_handler.report("non_players.update_servant_list", "Failed to access Data: servant_info No." .. tostring(i));
goto continue;
end
@@ -218,11 +218,11 @@ function this.update_my_otomos()
local first_otomo = get_master_otomo_info_method:call(singletons.otomo_manager, 0);
if first_otomo == nil then
error_handler.report("non_players.update_my_otomos", "Failed to Access Data: first_otomo");
error_handler.report("non_players.update_my_otomos", "Failed to access Data: first_otomo");
else
local name = otomo_create_data_name_field:get_data(first_otomo);
if name == nil then
error_handler.report("non_players.update_my_otomos", "Failed to Access Data: first_otomo -> name");
error_handler.report("non_players.update_my_otomos", "Failed to access Data: first_otomo -> name");
end
if name ~= nil and name ~= "" then
@@ -241,11 +241,11 @@ function this.update_my_otomos()
local second_otomo = get_master_otomo_info_method:call(singletons.otomo_manager, 1);
if second_otomo == nil then
error_handler.report("non_players.update_my_otomos", "Failed to Access Data: second_otomo");
error_handler.report("non_players.update_my_otomos", "Failed to access Data: second_otomo");
else
local name = otomo_create_data_name_field:get_data(second_otomo);
if name == nil then
error_handler.report("non_players.update_my_otomos", "Failed to Access Data: second_otomo -> name");
error_handler.report("non_players.update_my_otomos", "Failed to access Data: second_otomo -> name");
end
if name ~= nil and name ~= "" then
@@ -268,20 +268,20 @@ function this.update_servant_otomos()
local servant_otomo_list = get_servant_otomo_list_method:call(singletons.otomo_manager);
if servant_otomo_list == nil then
error_handler.report("non_players.update_servant_otomos", "Failed to Access Data: servant_otomo_list");
error_handler.report("non_players.update_servant_otomos", "Failed to access Data: servant_otomo_list");
return;
end
local count = otomo_get_count_method:call(servant_otomo_list);
if count == nil then
error_handler.report("non_players.update_servant_otomos", "Failed to Access Data: servant_otomo_list -> count");
error_handler.report("non_players.update_servant_otomos", "Failed to access Data: servant_otomo_list -> count");
return;
end
for i = 0, count - 1 do
local servant_otomo = otomo_get_item_method:call(servant_otomo_list, i);
if servant_otomo == nil then
error_handler.report("non_players.update_servant_otomos", "Failed to Access Data: servant_otomo No. " .. tostring(i));
error_handler.report("non_players.update_servant_otomos", "Failed to access Data: servant_otomo No. " .. tostring(i));
goto continue
end
@@ -292,7 +292,7 @@ function this.update_servant_otomos()
local member_id = otomo_create_data:get_field("MemberID");
if name == nil then
error_handler.report("non_players.update_servant_otomos", string.format("Failed to Access Data: servant_otomo No. %d -> name", i));
error_handler.report("non_players.update_servant_otomos", string.format("Failed to access Data: servant_otomo No. %d -> name", i));
goto continue;
end
@@ -314,33 +314,33 @@ function this.update_otomos(otomo_info_field_)
local cached_config = config.current_config.damage_meter_UI;
if singletons.lobby_manager == nil then
error_handler.report("non_players.update_otomos", "Failed to Access Data: lobby_manager");
error_handler.report("non_players.update_otomos", "Failed to access Data: lobby_manager");
return;
end
-- other players
local otomo_info_list = otomo_info_field_:get_data(singletons.lobby_manager);
if otomo_info_list == nil then
error_handler.report("non_players.update_otomos", "Failed to Access Data: otomo_info_list");
error_handler.report("non_players.update_otomos", "Failed to access Data: otomo_info_list");
return;
end
local count = otomo_info_get_count_method:call(otomo_info_list);
if count == nil then
error_handler.report("non_players.update_otomos", "Failed to Access Data: otomo_info_list -> count");
error_handler.report("non_players.update_otomos", "Failed to access Data: otomo_info_list -> count");
return;
end
for id = 0, count - 1 do
local otomo_info = otomo_info_get_item_method:call(otomo_info_list, id);
if otomo_info == nil then
error_handler.report("non_players.update_otomos", "Failed to Access Data: otomo_info No. " .. tostring(id));
error_handler.report("non_players.update_otomos", "Failed to access Data: otomo_info No. " .. tostring(id));
goto continue;
end
local name = otomo_info_name_field:get_data(otomo_info);
if name == nil then
error_handler.report("non_players.update_otomos", string.format("Failed to Access Data: otomo_info No. %d -> name", id));
error_handler.report("non_players.update_otomos", string.format("Failed to access Data: otomo_info No. %d -> name", id));
goto continue;
end

View File

@@ -138,7 +138,6 @@ end
function this.update_damage(player, damage_source_type, is_large_monster, damage_object)
if player == nil then
error_handler.report("players.update_damage", "Missing Parameter: player");
return;
end
@@ -453,19 +452,24 @@ local get_pos_field = player_base_type_def:get_method("get_Pos");
function this.update_myself_position()
if singletons.player_manager == nil then
error_handler.report("players.update_myself_position", "Failed to Access Data: player_manager");
error_handler.report("players.update_myself_position", "Failed to access Data: player_manager");
return;
end
if quest_status.flow_state == quest_status.flow_states.NONE
or quest_status.flow_state == quest_status.flow_states.CUTSCENE then
return;
end
local master_player = find_master_player_method:call(singletons.player_manager);
if master_player == nil then
error_handler.report("players.update_myself_position", "Failed to Access Data: master_player");
error_handler.report("players.update_myself_position", "Failed to access Data: master_player");
return;
end
local position = get_pos_field:call(master_player);
if position == nil then
error_handler.report("players.update_myself_position", "Failed to Access Data: position");
error_handler.report("players.update_myself_position", "Failed to access Data: position");
end
this.myself_position = position;
@@ -517,25 +521,25 @@ function this.update_player_list_(hunter_info_field_)
local cached_config = config.current_config.damage_meter_UI;
if singletons.lobby_manager == nil then
error_handler.report("players.update_player_list_", "Failed to Access Data: lobby_manager");
error_handler.report("players.update_player_list_", "Failed to access Data: lobby_manager");
return;
end
if singletons.progress_manager == nil then
error_handler.report("players.update_player_list_", "Failed to Access Data: progress_manager");
error_handler.report("players.update_player_list_", "Failed to access Data: progress_manager");
return;
end
-- myself player
local myself_player_info = my_hunter_info_field:get_data(singletons.lobby_manager);
if myself_player_info == nil then
error_handler.report("players.update_player_list_", "Failed to Access Data: myself_player_info");
error_handler.report("players.update_player_list_", "Failed to access Data: myself_player_info");
return;
end
local myself_player_name = name_field:get_data(myself_player_info);
if myself_player_name == nil then
error_handler.report("players.update_player_list_", "Failed to Access Data: myself_player_name");
error_handler.report("players.update_player_list_", "Failed to access Data: myself_player_name");
return;
end
@@ -545,7 +549,7 @@ function this.update_player_list_(hunter_info_field_)
local myself_id = get_master_player_id_method:call(singletons.player_manager);
if myself_id == nil then
error_handler.report("players.update_player_list_", "Failed to Access Data: myself_id");
error_handler.report("players.update_player_list_", "Failed to access Data: myself_id");
return;
end
@@ -556,29 +560,29 @@ function this.update_player_list_(hunter_info_field_)
end
-- other players
local player_info_list = hunter_info_field_:get_data(singletons.lobby_manager);
if player_info_list == nil then
error_handler.report("players.update_player_list_", "Failed to Access Data: player_info_list");
local player_info_array = hunter_info_field_:get_data(singletons.lobby_manager);
if player_info_array == nil then
error_handler.report("players.update_player_list_", "Failed to access Data: player_info_array");
return;
end
local count = get_count_method:call(player_info_list);
local count = get_count_method:call(player_info_array);
if count == nil then
error_handler.report("players.update_player_list_", "Failed to Access Data: player_info_list -> count");
error_handler.report("players.update_player_list_", "Failed to access Data: player_info_array -> count");
return;
end
for i = 0, count - 1 do
local player_info = get_item_method:call(player_info_list, i);
local player_info = get_item_method:call(player_info_array, i);
if player_info == nil then
error_handler.report("players.update_player_list_", "Failed to Access Data: player_info No. " .. tostring(i));
goto continue
error_handler.report("players.update_player_list_", "Failed to access Data: player_info No. " .. tostring(i));
goto continue;
end
local id = member_index_field:get_data(player_info);
if id == nil then
error_handler.report("players.update_player_list_", string.format("Failed to Access Data: player_info No. %d -> id", i));
goto continue
error_handler.report("players.update_player_list_", string.format("Failed to access Data: player_info No. %d -> id", i));
goto continue;
end
local hunter_rank = hunter_rank_field:get_data(player_info) or 0;
@@ -586,8 +590,8 @@ function this.update_player_list_(hunter_info_field_)
local name = name_field:get_data(player_info);
if name == nil then
error_handler.report("players.update_player_list_", string.format("Failed to Access Data: player_info No. %d -> name", i));
goto continue
error_handler.report("players.update_player_list_", string.format("Failed to access Data: player_info No. %d -> name", i));
goto continue;
end
local player = this.list[id];

View File

@@ -81,15 +81,17 @@ local get_pos_method = environment_creature_base_type_def:get_method("get_Pos");
function this.init(creature, REcreature)
local creature_type = creature_type_field:get_data(REcreature);
if creature_type == nil then
error_handler.report("env_creature.init", "Failed to Access Data: creature_type");
error_handler.report("env_creature.init", "Failed to access Data: creature_type");
return;
end
local creature_name = get_env_creature_name_message_method:call(singletons.message_manager, creature_type);
if creature_name ~= nil then
error_handler.report("env_creature.init", "Failed to Access Data: creature_name");
creature.name = creature_name;
if creature_name == nil then
error_handler.report("env_creature.init", "Failed to access Data: creature_name");
return;
end
creature.name = creature_name;
end
function this.init_UI(creature)
@@ -112,7 +114,7 @@ function this.update_position(REcreature, creature)
local position = get_pos_method:call(REcreature);
if position == nil then
error_handler.report("env_creature.update_position", "Failed to Access Data: position");
error_handler.report("env_creature.update_position", "Failed to access Data: position");
end
creature.position = position;
@@ -129,7 +131,7 @@ function this.update(REcreature, creature)
local is_inactive = creature_is_inactive_field:get_data(REcreature);
if is_inactive == nil then
error_handler.report("env_creature.update", "Failed to Access Data: is_inactive");
error_handler.report("env_creature.update", "Failed to access Data: is_inactive");
end
creature.is_inactive = is_inactive;

View File

@@ -336,13 +336,13 @@ this.keys = {
function this.update()
if singletons.game_keyboard == nil then
error_handler.report("keyboard.update", "Failed to Access Data: game_keyboard");
error_handler.report("keyboard.update", "Failed to access Data: game_keyboard");
return;
end
local hard_keyboard = hard_keyboard_field:get_data(singletons.game_keyboard);
if hard_keyboard == nil then
error_handler.report("keyboard.update", "Failed to Access Data: hard_keyboard");
error_handler.report("keyboard.update", "Failed to access Data: hard_keyboard");
return;
end
@@ -495,7 +495,7 @@ function this.check_hotkeys(hard_keyboard)
local all_UI_key_release = get_release_method:call(hard_keyboard, math.tointeger(cached_config.all_UI.key));
if all_UI_key_release == nil then
error_handler.report("keyboard.check_hotkeys", "Failed to Access Data: all_UI_key_release");
error_handler.report("keyboard.check_hotkeys", "Failed to access Data: all_UI_key_release");
elseif all_UI_key_release then
local is_any_enabled = config.current_config.time_UI.enabled
@@ -521,7 +521,7 @@ function this.check_hotkeys(hard_keyboard)
local small_monster_UI_key_release = get_release_method:call(hard_keyboard, math.tointeger(cached_config.small_monster_UI.key));
if small_monster_UI_key_release == nil then
error_handler.report("keyboard.check_hotkeys", "Failed to Access Data: small_monster_UI_key_release");
error_handler.report("keyboard.check_hotkeys", "Failed to access Data: small_monster_UI_key_release");
elseif small_monster_UI_key_release then
config.current_config.small_monster_UI.enabled = not config.current_config.small_monster_UI.enabled;
@@ -535,7 +535,7 @@ function this.check_hotkeys(hard_keyboard)
local large_monster_UI_key_release = get_release_method:call(hard_keyboard, math.tointeger(cached_config.large_monster_UI.key));
if large_monster_UI_key_release == nil then
error_handler.report("keyboard.check_hotkeys", "Failed to Access Data: large_monster_UI_key_release");
error_handler.report("keyboard.check_hotkeys", "Failed to access Data: large_monster_UI_key_release");
elseif large_monster_UI_key_release then
local is_any_enabled = config.current_config.large_monster_UI.dynamic.enabled
@@ -555,7 +555,7 @@ function this.check_hotkeys(hard_keyboard)
local large_monster_dynamic_UI_key_release = get_release_method:call(hard_keyboard, math.tointeger(cached_config.large_monster_dynamic_UI.key));
if large_monster_dynamic_UI_key_release == nil then
error_handler.report("keyboard.check_hotkeys", "Failed to Access Data: large_monster_dynamic_UI_key_release");
error_handler.report("keyboard.check_hotkeys", "Failed to access Data: large_monster_dynamic_UI_key_release");
elseif large_monster_dynamic_UI_key_release then
config.current_config.large_monster_UI.dynamic.enabled = not config.current_config.large_monster_UI.dynamic.enabled;
@@ -569,7 +569,7 @@ function this.check_hotkeys(hard_keyboard)
local large_monster_static_UI_key_release = get_release_method:call(hard_keyboard, math.tointeger(cached_config.large_monster_static_UI.key));
if large_monster_static_UI_key_release == nil then
error_handler.report("keyboard.check_hotkeys", "Failed to Access Data: large_monster_static_UI_key_release");
error_handler.report("keyboard.check_hotkeys", "Failed to access Data: large_monster_static_UI_key_release");
elseif large_monster_static_UI_key_release then
config.current_config.large_monster_UI.static.enabled = not config.current_config.large_monster_UI.static.enabled;
@@ -583,7 +583,7 @@ function this.check_hotkeys(hard_keyboard)
local large_monster_highlighted_UI_key_release = get_release_method:call(hard_keyboard, math.tointeger(cached_config.large_monster_highlighted_UI.key));
if large_monster_highlighted_UI_key_release == nil then
error_handler.report("keyboard.check_hotkeys", "Failed to Access Data: large_monster_highlighted_UI_key_release");
error_handler.report("keyboard.check_hotkeys", "Failed to access Data: large_monster_highlighted_UI_key_release");
elseif large_monster_highlighted_UI_key_release then
config.current_config.large_monster_UI.highlighted.enabled = not config.current_config.large_monster_UI.highlighted.enabled;
@@ -597,7 +597,7 @@ function this.check_hotkeys(hard_keyboard)
local time_UI_key_release = get_release_method:call(hard_keyboard, math.tointeger(cached_config.time_UI.key));
if time_UI_key_release == nil then
error_handler.report("keyboard.check_hotkeys", "Failed to Access Data: time_UI_key_release");
error_handler.report("keyboard.check_hotkeys", "Failed to access Data: time_UI_key_release");
elseif time_UI_key_release then
config.current_config.time_UI.enabled = not config.current_config.time_UI.enabled;
@@ -611,7 +611,7 @@ function this.check_hotkeys(hard_keyboard)
local damage_meter_UI_key_release = get_release_method:call(hard_keyboard, math.tointeger(cached_config.damage_meter_UI.key));
if damage_meter_UI_key_release == nil then
error_handler.report("keyboard.check_hotkeys", "Failed to Access Data: damage_meter_UI_key_release");
error_handler.report("keyboard.check_hotkeys", "Failed to access Data: damage_meter_UI_key_release");
elseif damage_meter_UI_key_release then
config.current_config.damage_meter_UI.enabled = not config.current_config.damage_meter_UI.enabled;
@@ -625,7 +625,7 @@ function this.check_hotkeys(hard_keyboard)
local endemic_life_UI_key_release = get_release_method:call(hard_keyboard, math.tointeger(cached_config.endemic_life_UI.key));
if endemic_life_UI_key_release == nil then
error_handler.report("keyboard.check_hotkeys", "Failed to Access Data: endemic_life_UI_key_release");
error_handler.report("keyboard.check_hotkeys", "Failed to access Data: endemic_life_UI_key_release");
elseif endemic_life_UI_key_release then
config.current_config.endemic_life_UI.enabled = not config.current_config.endemic_life_UI.enabled;

View File

@@ -155,7 +155,7 @@ end
function this.get_cart_count()
local death_num = get_death_num_method:call(singletons.quest_manager);
if death_num == nil then
error_handler.report("quest_status.get_cart_count", "Failed to Access Data: death_num");
error_handler.report("quest_status.get_cart_count", "Failed to access Data: death_num");
end
this.cart_count = death_num;
@@ -164,7 +164,7 @@ end
function this.get_max_cart_count()
local quest_life = get_quest_life_method:call(singletons.quest_manager);
if quest_life == nil then
error_handler.report("quest_status.get_max_cart_count", "Failed to Access Data: quest_life");
error_handler.report("quest_status.get_max_cart_count", "Failed to access Data: quest_life");
end
this.max_cart_count = quest_life;
@@ -185,7 +185,7 @@ function this.on_demo_request_activation(request_data_base)
local request_data_type = request_data_base:call("get_Type");
if request_data_type == nil then
error_handler.report("quest_status.on_demo_request_activation", "Failed to Access Data: request_data_type");
error_handler.report("quest_status.on_demo_request_activation", "Failed to access Data: request_data_type");
return;
end
@@ -317,13 +317,13 @@ end
function this.init()
if singletons.quest_manager == nil then
error_handler.report("quest_status.init", "Failed to Access Data: quest_manager");
error_handler.report("quest_status.init", "Failed to access Data: quest_manager");
return;
end
local new_quest_status = get_status_method:call(singletons.game_manager);
if new_quest_status == nil then
error_handler.report("quest_status.init", "Failed to Access Data: new_quest_status");
error_handler.report("quest_status.init", "Failed to access Data: new_quest_status");
return;
end
@@ -344,13 +344,13 @@ end
function this.update_is_online()
if singletons.lobby_manager == nil then
error_handler.report("quest_status.update_is_online", "Failed to Access Data: lobby_manager");
error_handler.report("quest_status.update_is_online", "Failed to access Data: lobby_manager");
return;
end
local is_quest_online = is_quest_online_method:call(singletons.lobby_manager);
if is_quest_online == nil then
error_handler.report("quest_status.update_is_online", "Failed to Access Data: is_quest_online");
error_handler.report("quest_status.update_is_online", "Failed to access Data: is_quest_online");
return;
end
@@ -359,13 +359,13 @@ end
--[[function quest_status.update_is_quest_host()
if singletons.lobby_manager == nil then
error_handler.report("quest_status.update_is_quest_host", "Failed to Access Data: lobby_manager");
error_handler.report("quest_status.update_is_quest_host", "Failed to access Data: lobby_manager");
return;
end
local is_quest_host = is_quest_host_method:call(singletons.lobby_manager, true);
if is_quest_host == nil then
error_handler.report("quest_status.update_is_quest_host", "Failed to Access Data: is_quest_host");
error_handler.report("quest_status.update_is_quest_host", "Failed to access Data: is_quest_host");
return;
end
@@ -374,13 +374,13 @@ end--]]
function this.update_is_training_area()
if singletons.village_area_manager == nil then
error_handler.report("quest_status.update_is_training_area", "Failed to Access Data: village_area_manager");
error_handler.report("quest_status.update_is_training_area", "Failed to access Data: village_area_manager");
return;
end
local is_training_area = check_current_area_training_area_method:call(singletons.village_area_manager);
if is_training_area == nil then
error_handler.report("quest_status.update_is_training_area", "Failed to Access Data: is_training_area");
error_handler.report("quest_status.update_is_training_area", "Failed to access Data: is_training_area");
return;
end

View File

@@ -73,26 +73,26 @@ function this.get_game_window_size()
scene_view = sdk.call_native_func(singletons.scene_manager, sdk.find_type_definition("via.SceneManager") , "get_MainView");
if scene_view == nil then
error_handler.report("screen.get_game_window_size", "Failed to Access Data: scene_view");
error_handler.report("screen.get_game_window_size", "Failed to access Data: scene_view");
return;
end
end
local size = get_size_method:call(scene_view);
if size == nil then
error_handler.report("screen.get_game_window_size", "Failed to Access Data: size");
error_handler.report("screen.get_game_window_size", "Failed to access Data: size");
return;
end
local screen_width = width_field:get_data(size);
if screen_width == nil then
error_handler.report("screen.get_game_window_size", "Failed to Access Data: screen_width");
error_handler.report("screen.get_game_window_size", "Failed to access Data: screen_width");
return;
end
local screen_height = height_field:get_data(size);
if screen_height == nil then
error_handler.report("screen.get_game_window_size", "Failed to Access Data: screen_height");
error_handler.report("screen.get_game_window_size", "Failed to access Data: screen_height");
return;
end

View File

@@ -65,39 +65,27 @@ function this.init()
end
function this.init_message_manager()
if this.message_manager ~= nil then
return;
end
this.message_manager = sdk.get_managed_singleton("snow.gui.MessageManager");
if this.message_manager == nil then
error_handler.report("singletons.init_message_manager", "Failed to Access Data: message_manager");
error_handler.report("singletons.init_message_manager", "Failed to access Data: message_manager");
end
return this.message_manager;
end
function this.init_enemy_manager()
if this.enemy_manager ~= nil then
return;
end
this.enemy_manager = sdk.get_managed_singleton("snow.enemy.EnemyManager");
if this.enemy_manager == nil then
error_handler.report("singletons.init_enemy_manager", "Failed to Access Data: enemy_manager");
error_handler.report("singletons.init_enemy_manager", "Failed to access Data: enemy_manager");
end
return this.enemy_manager;
end
function this.init_lobby_manager()
if this.lobby_manager ~= nil then
return;
end
this.lobby_manager = sdk.get_managed_singleton("snow.LobbyManager");
if this.lobby_manager == nil then
error_handler.report("singletons.init_lobby_manager", "Failed to Access Data: lobby_manager");
error_handler.report("singletons.init_lobby_manager", "Failed to access Data: lobby_manager");
return false;
end
@@ -105,13 +93,9 @@ function this.init_lobby_manager()
end
function this.init_progress_manager()
if this.progress_manager ~= nil then
return;
end
this.progress_manager = sdk.get_managed_singleton("snow.progress.ProgressManager");
if this.progress_manager == nil then
error_handler.report("singletons.init_lobby_manager", "Failed to Access Data: progress_manager");
error_handler.report("singletons.init_lobby_manager", "Failed to access Data: progress_manager");
return false;
end
@@ -119,117 +103,81 @@ function this.init_progress_manager()
end
function this.init_quest_manager()
if this.quest_manager ~= nil then
return;
end
this.quest_manager = sdk.get_managed_singleton("snow.QuestManager");
if this.quest_manager == nil then
error_handler.report("singletons.init_quest_manager", "Failed to Access Data: quest_manager");
error_handler.report("singletons.init_quest_manager", "Failed to access Data: quest_manager");
end
return this.quest_manager;
end
function this.init_player_manager()
if this.player_manager ~= nil then
return;
end
this.player_manager = sdk.get_managed_singleton("snow.player.PlayerManager");
if this.player_manager == nil then
error_handler.report("singletons.init_player_manager", "Failed to Access Data: player_manager");
error_handler.report("singletons.init_player_manager", "Failed to access Data: player_manager");
end
return this.player_manager;
end
function this.init_village_area_manager()
if this.village_area_manager ~= nil then
return;
end
this.village_area_manager = sdk.get_managed_singleton("snow.VillageAreaManager");
if this.village_area_manager == nil then
error_handler.report("singletons.init_village_area_manager", "Failed to Access Data: village_area_manager");
error_handler.report("singletons.init_village_area_manager", "Failed to access Data: village_area_manager");
end
return this.village_area_manager;
end
function this.init_gui_manager()
if this.gui_manager ~= nil then
return;
end
this.gui_manager = sdk.get_managed_singleton("snow.gui.GuiManager");
if this.gui_manager == nil then
error_handler.report("singletons.init_gui_manager", "Failed to Access Data: gui_manager");
error_handler.report("singletons.init_gui_manager", "Failed to access Data: gui_manager");
end
return this.gui_manager;
end
function this.init_game_keyboard()
if this.game_keyboard ~= nil then
return;
end
this.game_keyboard = sdk.get_managed_singleton("snow.GameKeyboard");
if this.game_keyboard == nil then
error_handler.report("singletons.init_game_keyboard", "Failed to Access Data: game_keyboard");
error_handler.report("singletons.init_game_keyboard", "Failed to access Data: game_keyboard");
end
return this.game_keyboard;
end
function this.init_scene_manager()
if this.scene_manager ~= nil then
return;
end
this.scene_manager = sdk.get_native_singleton("via.SceneManager");
if this.scene_manager == nil then
error_handler.report("singletons.init_scene_manager", "Failed to Access Data: scene_manager");
error_handler.report("singletons.init_scene_manager", "Failed to access Data: scene_manager");
end
return this.scene_manager;
end
function this.init_game_manager()
if this.game_manager ~= nil then
return;
end
this.game_manager = sdk.get_managed_singleton("snow.SnowGameManager");
if this.game_manager == nil then
error_handler.report("singletons.init_game_manager", "Failed to Access Data: game_manager");
error_handler.report("singletons.init_game_manager", "Failed to access Data: game_manager");
end
return this.game_manager;
end
function this.init_servant_manager()
if this.servant_manager ~= nil then
return;
end
this.servant_manager = sdk.get_managed_singleton("snow.ai.ServantManager");
if this.servant_manager == nil then
error_handler.report("singletons.init_servant_manager", "Failed to Access Data: servant_manager");
error_handler.report("singletons.init_servant_manager", "Failed to access Data: servant_manager");
end
return this.servant_manager;
end
function this.init_otomo_manager()
if this.otomo_manager ~= nil then
return;
end
this.otomo_manager = sdk.get_managed_singleton("snow.otomo.OtomoManager");
if this.otomo_manager == nil then
error_handler.report("singletons.init_otomo_manager", "Failed to Access Data: otomo_manager");
error_handler.report("singletons.init_otomo_manager", "Failed to access Data: otomo_manager");
end
return this.otomo_manager;
@@ -242,6 +190,7 @@ function this.init_dependencies()
end
function this.init_module()
this.init();
time.new_timer(this.init, 1);
end

View File

@@ -97,14 +97,14 @@ function this.update_quest_time()
local quest_time_elapsed_minutes = get_quest_elapsed_time_min_method:call(singletons.quest_manager);
if quest_time_elapsed_minutes == nil then
error_handler.report("time.update_quest_time", "Failed to Access Data: quest_time_elapsed_minutes");
error_handler.report("time.update_quest_time", "Failed to access Data: quest_time_elapsed_minutes");
else
this.elapsed_minutes = quest_time_elapsed_minutes;
end
local quest_time_total_elapsed_seconds = get_quest_elapsed_time_sec_method:call(singletons.quest_manager);
if quest_time_total_elapsed_seconds == nil then
error_handler.report("time.update_quest_time", "Failed to Access Data: quest_time_total_elapsed_seconds");
error_handler.report("time.update_quest_time", "Failed to access Data: quest_time_total_elapsed_seconds");
else
this.total_elapsed_seconds = quest_time_total_elapsed_seconds;
end

View File

@@ -476,6 +476,11 @@ function this.init_default()
x = 10,
y = 40
},
relative_offset = {
x = 0,
y = 45
},
spacing = {
x = 0,
@@ -7569,6 +7574,25 @@ function this.init_default()
debug = {
history_size = 64
},
customization_menu = {
visible = false,
position = {
x = 360,
y = 50
},
size = {
width = 785,
height = 500
},
pivot = {
x = 0,
y = 0
}
}
};
end

View File

@@ -49,6 +49,10 @@ function this.report(error_key, error_message)
local error_time = time.total_elapsed_script_seconds;
if error_time == 0 then
return;
end
local error = {
key = error_key,
time = error_time,

View File

@@ -611,8 +611,9 @@ this.default_language = {
right_alignment_shift = "Right Alignment Shift",
debug = "Debug",
current_time = "Current Time",
everything_seems_to_be_ok = "Everything seems to be OK!",
error_history = "Error History",
history = "History",
history_size = "History Size"
}
};

View File

@@ -69,13 +69,13 @@ function this.poison_proc(poison_param)
local enemy = get_enemy_method:call(poison_param);
if enemy == nil then
error_handler.report("ailment_hook.poison_proc", "Failed to Access Data: enemy");
error_handler.report("ailment_hook.poison_proc", "Failed to access Data: enemy");
return;
end
local is_large = is_boss_enemy_method:call(enemy);
if is_large == nil then
error_handler.report("ailment_hook.poison_proc", "Failed to Access Data: is_large");
error_handler.report("ailment_hook.poison_proc", "Failed to access Data: is_large");
return;
end
@@ -100,13 +100,13 @@ function this.blast_proc(blast_param)
local enemy = get_enemy_method:call(blast_param);
if enemy == nil then
error_handler.report("ailment_hook.blast_proc", "Failed to Access Data: enemy");
error_handler.report("ailment_hook.blast_proc", "Failed to access Data: enemy");
return;
end
local is_large = is_boss_enemy_method:call(enemy);
if is_large == nil then
error_handler.report("ailment_hook.blast_proc", "Failed to Access Data: is_large");
error_handler.report("ailment_hook.blast_proc", "Failed to access Data: is_large");
return;
end
@@ -129,13 +129,13 @@ function this.stock_damage()
for enemy, monster in pairs(large_monster.list) do
local damage_param = get_damage_param_method:call(enemy);
if damage_param == nil then
error_handler.report("ailment_hook.stock_damage", "Failed to Access Data: large_monster -> damage_param");
error_handler.report("ailment_hook.stock_damage", "Failed to access Data: large_monster -> damage_param");
goto continue;
end
local poison_param = poison_param_field:get_data(damage_param);
if poison_param == nil then
error_handler.report("ailment_hook.stock_damage", "Failed to Access Data: large_monster -> poison_param");
error_handler.report("ailment_hook.stock_damage", "Failed to access Data: large_monster -> poison_param");
goto continue;
end
@@ -146,13 +146,13 @@ function this.stock_damage()
for enemy, monster in pairs(small_monster.list) do
local damage_param = get_damage_param_method:call(enemy);
if damage_param == nil then
error_handler.report("ailment_hook.stock_damage", "Failed to Access Data: small_monster -> damage_param");
error_handler.report("ailment_hook.stock_damage", "Failed to access Data: small_monster -> damage_param");
goto continue
end
local poison_param = poison_param_field:get_data(damage_param);
if poison_param == nil then
error_handler.report("ailment_hook.stock_damage", "Failed to Access Data: small_monster -> poison_param");
error_handler.report("ailment_hook.stock_damage", "Failed to access Data: small_monster -> poison_param");
goto continue;
end

View File

@@ -282,7 +282,7 @@ function this.update_ailments(enemy, monster)
local damage_param = get_damage_param_method:call(enemy);
if damage_param == nil then
error_handler.report("ailments.update_ailments", "Failed to Access Data: damage_param");
error_handler.report("ailments.update_ailments", "Failed to access Data: damage_param");
return;
end
@@ -300,13 +300,13 @@ function this.update_ailments(enemy, monster)
local condition_param_array = get_condition_param_method:call(damage_param);
if condition_param_array == nil then
error_handler.report("ailments.update_ailments", "Failed to Access Data: condition_param_array");
error_handler.report("ailments.update_ailments", "Failed to access Data: condition_param_array");
return;
end
local condition_param_array_length = length_method:call(condition_param_array);
if condition_param_array_length == nil then
error_handler.report("ailments.update_ailments", "Failed to Access Data: condition_param_array_length");
error_handler.report("ailments.update_ailments", "Failed to access Data: condition_param_array_length");
return;
end
@@ -317,7 +317,7 @@ function this.update_ailments(enemy, monster)
local ailment_param = get_value_method:call(condition_param_array, id);
if ailment_param == nil then
error_handler.report("ailments.update_ailments", "Failed to Access Data: ailment_param No. " .. tostring(id));
error_handler.report("ailments.update_ailments", "Failed to access Data: ailment_param No. " .. tostring(id));
goto continue
end
@@ -331,21 +331,21 @@ function this.update_stun_poison_blast_ailments(monster, damage_param)
if stun_param ~= nil then
this.update_ailment(monster, stun_param, this.stun_id);
else
error_handler.report("ailments.update_stun_poison_blast_ailments", "Failed to Access Data: stun_param");
error_handler.report("ailments.update_stun_poison_blast_ailments", "Failed to access Data: stun_param");
end
local poison_param = poison_param_field:get_data(damage_param);
if poison_param ~= nil then
this.update_ailment(monster, poison_param, this.poison_id);
else
error_handler.report("ailments.update_stun_poison_blast_ailments", "Failed to Access Data: poison_param");
error_handler.report("ailments.update_stun_poison_blast_ailments", "Failed to access Data: poison_param");
end
local blast_param = blast_param_field:get_data(damage_param);
if blast_param ~= nil then
this.update_ailment(monster, blast_param, this.blast_id);
else
error_handler.report("ailments.update_stun_poison_blast_ailments", "Failed to Access Data: blast_param");
error_handler.report("ailments.update_stun_poison_blast_ailments", "Failed to access Data: blast_param");
end
end
@@ -373,14 +373,14 @@ function this.update_ailment(monster, ailment_param, id)
if activate_count_valuetype ~= nil then
activate_count = activate_count_valuetype:get_field("mValue");
else
error_handler.report("ailments.update_ailment", "Failed to Access Data: activate_count_valuetype");
error_handler.report("ailments.update_ailment", "Failed to access Data: activate_count_valuetype");
end
end
else
error_handler.report("ailments.update_ailment", "Failed to Access Data: activate_count_array_length");
error_handler.report("ailments.update_ailment", "Failed to access Data: activate_count_array_length");
end
else
error_handler.report("ailments.update_ailment", "Failed to Access Data: activate_count_array");
error_handler.report("ailments.update_ailment", "Failed to access Data: activate_count_array");
end
if buildup_array ~= nil then
@@ -394,14 +394,14 @@ function this.update_ailment(monster, ailment_param, id)
if buildup_valuetype ~= nil then
buildup = buildup_valuetype:get_field("mValue");
else
error_handler.report("ailments.update_ailment", "Failed to Access Data: buildup_valuetype");
error_handler.report("ailments.update_ailment", "Failed to access Data: buildup_valuetype");
end
end
else
error_handler.report("ailments.update_ailment", "Failed to Access Data: buildup_array_length");
error_handler.report("ailments.update_ailment", "Failed to access Data: buildup_array_length");
end
else
error_handler.report("ailments.update_ailment", "Failed to Access Data: buildup_array");
error_handler.report("ailments.update_ailment", "Failed to access Data: buildup_array");
end
if buildup_limit_array ~= nil then
@@ -415,14 +415,14 @@ function this.update_ailment(monster, ailment_param, id)
if buildup_limit_valuetype ~= nil then
buildup_limit = buildup_limit_valuetype:get_field("mValue");
else
error_handler.report("ailments.update_ailment", "Failed to Access Data: buildup_limit_valuetype");
error_handler.report("ailments.update_ailment", "Failed to access Data: buildup_limit_valuetype");
end
end
else
error_handler.report("ailments.update_ailment", "Failed to Access Data: buildup_limit_array_length");
error_handler.report("ailments.update_ailment", "Failed to access Data: buildup_limit_array_length");
end
else
error_handler.report("ailments.update_ailment", "Failed to Access Data: buildup_limit_array");
error_handler.report("ailments.update_ailment", "Failed to access Data: buildup_limit_array");
end
if is_enable == nil then
@@ -446,7 +446,7 @@ function this.update_ailment(monster, ailment_param, id)
monster.ailments[id].activate_count = activate_count;
else
error_handler.report("ailments.update_ailment", "Failed to Access Data: activate_count");
error_handler.report("ailments.update_ailment", "Failed to access Data: activate_count");
end
if buildup ~= nil then
@@ -456,7 +456,7 @@ function this.update_ailment(monster, ailment_param, id)
monster.ailments[id].total_buildup = buildup;
else
error_handler.report("ailments.update_ailment", "Failed to Access Data: buildup");
error_handler.report("ailments.update_ailment", "Failed to access Data: buildup");
end
if buildup_limit ~= nil then
@@ -466,7 +466,7 @@ function this.update_ailment(monster, ailment_param, id)
monster.ailments[id].buildup_limit = buildup_limit;
else
error_handler.report("ailments.update_ailment", "Failed to Access Data: buildup_limit");
error_handler.report("ailments.update_ailment", "Failed to access Data: buildup_limit");
end
if buildup ~= nil and buildup_limit ~= nil and buildup_limit ~= 0 then
@@ -537,13 +537,13 @@ function this.update_poison(monster, poison_param)
--if poison tick, apply damage
local is_damage = poison_get_is_damage_method:call(poison_param);
if is_damage == nil then
error_handler.report("ailments.update_poison", "Failed to Access Data: is_damage");
error_handler.report("ailments.update_poison", "Failed to access Data: is_damage");
return;
end
local poison_damage = poison_damage_field:get_data(poison_param);
if poison_damage == nil then
error_handler.report("ailments.update_poison", "Failed to Access Data: poison_damage");
error_handler.report("ailments.update_poison", "Failed to access Data: poison_damage");
return;
end
@@ -850,10 +850,7 @@ function this.apply_ailment_damage(monster, ailment_type, ailment_damage)
local player = players.get_player(otomo.id);
if player ~= nil then
players.update_damage(player, otomo_damage_source_type, monster.is_large, damage_object);
end
players.update_damage(player, otomo_damage_source_type, monster.is_large, damage_object);
players.update_damage(otomo, otomo_damage_source_type, monster.is_large, damage_object);
end

View File

@@ -20,6 +20,7 @@ local time;
local body_part;
local part_names;
local error_handler;
local quest_status;
local sdk = sdk;
local tostring = tostring;
@@ -54,6 +55,14 @@ local ValueType = ValueType;
local package = package;
this.list = {};
this.highlighted_id = -1;
this.monster_ids = {
chameleos = 25,
toadversary = 131,
lucent_nargacuga = 549,
risen_chameleos = 2073
}
function this.new(enemy)
local monster = {};
@@ -64,10 +73,11 @@ function this.new(enemy)
monster.id = 0;
monster.unique_id = 0;
monster.health = 0;
monster.max_health = 999999;
monster.health = 100000;
monster.max_health = 100000;
monster.health_percentage = 0;
monster.missing_health = 0;
monster.is_health_initialized = false;
monster.is_capturable = true;
monster.capture_health = 0;
@@ -110,17 +120,16 @@ function this.new(enemy)
monster.distance = 0;
monster.name = "Large Monster";
monster.size = 1;
monster.small_border = 0;
monster.big_border = 5;
monster.king_border = 10;
monster.size = -1;
monster.small_border = -1;
monster.big_border = -1;
monster.king_border = -1;
monster.crown = "";
monster.is_anomaly = false;
monster.parts = {};
monster.ailments = ailments.init_ailments();
monster.rider_id = -1;
monster.dynamic_UI = {};
@@ -133,17 +142,12 @@ function this.new(enemy)
this.init_UI(monster, monster.highlighted_UI, config.current_config.large_monster_UI.highlighted);
this.update_position(enemy, monster);
local physical_param = this.update_health(enemy, monster);
this.update_stamina(enemy, monster, nil);
this.update_stamina_timer(enemy, monster, nil);
this.update_rage(enemy, monster, nil);
this.update_rage_timer(enemy, monster, nil);
this.update(enemy, monster);
pcall(this.update_parts, enemy, monster, physical_param);
pcall(this.update_anomaly_parts, enemy, monster, nil);
if this.list[enemy] == nil then
@@ -158,6 +162,7 @@ function this.get_monster(enemy)
if monster == nil then
monster = this.new(enemy);
end
return monster;
end
@@ -258,79 +263,87 @@ local core_parts_get_is_active_method = enemy_mystery_core_parts_type_def:get_me
local core_parts_get_dying_vital_threashold_method = enemy_mystery_core_parts_type_def:get_method("get_DyingVitalThreashold");
local on_break_method = enemy_mystery_core_parts_type_def:get_method("onBreak");
local gui_manager_type_def = sdk.find_type_definition("snow.gui.GuiManager");
local get_tg_camera_method = gui_manager_type_def:get_method("get_refGuiHud_TgCamera");
local tg_camera_type_def = get_tg_camera_method:get_return_type();
local get_targeting_enemy_index_field = tg_camera_type_def:get_field("OldTargetingEmIndex");
function this.init(monster, enemy)
local enemy_type = enemy_type_field:get_data(enemy);
if enemy_type == nil then
error_handler.report("large_monster.init", "Failed to Access Data: enemy_type");
local monster_id = enemy_type_field:get_data(enemy);
if monster_id == nil then
error_handler.report("large_monster.init", "Failed to access Data: enemy_type");
return;
end
monster.id = enemy_type;
monster.id = monster_id;
if monster.id == 549 or monster.id == 25 or monster.id == 2073 then
if monster_id == this.monster_ids.lucent_nargacuga or monster_id == this.monster_ids.chameleos or monster_id == this.monster_ids.risen_chameleos then
monster.can_go_stealth = true;
end
local enemy_name = get_enemy_name_message_method:call(singletons.message_manager, enemy_type);
local enemy_name = get_enemy_name_message_method:call(singletons.message_manager, monster_id);
if enemy_name ~= nil then
monster.name = enemy_name;
else
error_handler.report("large_monster.init", "Failed to Access Data: enemy_name");
error_handler.report("large_monster.init", "Failed to access Data: enemy_name");
end
local set_info = get_set_info_method:call(enemy);
if set_info ~= nil then
local unique_id = get_unique_id_method:call(set_info);
if unique_id ~= nil then
monster.unique_id = unique_id;
if monster_id ~= this.monster_ids.toadversary then
local set_info = get_set_info_method:call(enemy);
if set_info ~= nil then
local unique_id = get_unique_id_method:call(set_info);
if unique_id ~= nil then
monster.unique_id = unique_id;
else
error_handler.report("large_monster.init", "Failed to access Data: unique_id");
end
else
error_handler.report("large_monster.init", "Failed to Access Data: unique_id");
error_handler.report("large_monster.init", "Failed to access Data: set_info");
end
else
error_handler.report("large_monster.init", "Failed to Access Data: set_info");
end
local size_info = find_enemy_size_info_method:call(singletons.enemy_manager, enemy_type);
if size_info ~= nil then
local small_border = get_small_border_method:call(size_info);
local big_border = get_big_border_method:call(size_info);
local king_border = get_king_border_method:call(size_info);
local size_info = find_enemy_size_info_method:call(singletons.enemy_manager, monster_id);
if size_info ~= nil then
local small_border = get_small_border_method:call(size_info);
local big_border = get_big_border_method:call(size_info);
local king_border = get_king_border_method:call(size_info);
local size = get_monster_list_register_scale_method:call(enemy);
local size = get_monster_list_register_scale_method:call(enemy);
if small_border ~= nil then
monster.small_border = small_border;
if small_border ~= nil then
monster.small_border = small_border;
else
error_handler.report("large_monster.init", "Failed to access Data: small_border");
end
if big_border ~= nil then
monster.big_border = big_border;
else
error_handler.report("large_monster.init", "Failed to access Data: big_border");
end
if king_border ~= nil then
monster.king_border = king_border;
else
error_handler.report("large_monster.init", "Failed to access Data: king_border");
end
if size ~= nil then
monster.size = size;
else
error_handler.report("large_monster.init", "Failed to access Data: size");
end
if monster.size <= monster.small_border then
monster.crown = language.current_language.UI.mini;
elseif monster.size >= monster.king_border then
monster.crown = language.current_language.UI.gold;
elseif monster.size >= monster.big_border then
monster.crown = language.current_language.UI.silver;
end
else
error_handler.report("large_monster.init", "Failed to Access Data: small_border");
error_handler.report("large_monster.init", "Failed to access Data: size_info");
end
if big_border ~= nil then
monster.big_border = big_border;
else
error_handler.report("large_monster.init", "Failed to Access Data: big_border");
end
if king_border ~= nil then
monster.king_border = king_border;
else
error_handler.report("large_monster.init", "Failed to Access Data: king_border");
end
if size ~= nil then
monster.size = size;
else
error_handler.report("large_monster.init", "Failed to Access Data: size");
end
if monster.size <= monster.small_border then
monster.crown = language.current_language.UI.mini;
elseif monster.size >= monster.king_border then
monster.crown = language.current_language.UI.gold;
elseif monster.size >= monster.big_border then
monster.crown = language.current_language.UI.silver;
end
else
error_handler.report("large_monster.init", "Failed to Access Data: size_info");
end
local is_capture_enable = true;
@@ -344,18 +357,16 @@ function this.init(monster, enemy)
if is_capture_enable_ ~= nil then
is_capture_enable = is_capture_enable_;
else
error_handler.report("large_monster.init", "Failed to Access Data: is_capture_enable_");
error_handler.report("large_monster.init", "Failed to access Data: is_capture_enable_");
end
else
error_handler.report("large_monster.init", "Failed to Access Data: capture_param");
error_handler.report("large_monster.init", "Failed to access Data: capture_param");
end
else
error_handler.report("large_monster.init", "Failed to Access Data: damage_param");
error_handler.report("large_monster.init", "Failed to access Data: damage_param");
end
--local curia_param = enemy:get_field("<CuriaParam>k__BackingField");
local mystery_param = get_mystery_param_method:call(enemy);
local is_anomaly = mystery_param ~= nil;
monster.is_anomaly = is_anomaly;
@@ -458,7 +469,7 @@ function this.update_position(enemy, monster)
local position = get_pos_field:call(enemy);
if position == nil then
error_handler.report("large_monster.update_position", "Failed to Access Data: position");
error_handler.report("large_monster.update_position", "Failed to access Data: position");
end
monster.position = position;
@@ -470,20 +481,20 @@ function this.update_all_riders()
-- get marionette rider
local mario_param = get_mario_param_method:call(enemy);
if mario_param == nil then
error_handler.report("large_monster.update_all_riders", "Failed to Access Data: mario_param");
error_handler.report("large_monster.update_all_riders", "Failed to access Data: mario_param");
goto continue;
end
local is_marionette = get_is_marionette_method:call(mario_param);
if is_marionette == nil then
error_handler.report("large_monster.update_all_riders", "Failed to Access Data: is_marionette");
error_handler.report("large_monster.update_all_riders", "Failed to access Data: is_marionette");
goto continue;
end
if is_marionette then
local player_id = get_mario_player_index_method:call(mario_param);
if player_id == nil then
error_handler.report("large_monster.update_all_riders", "Failed to Access Data: player_id");
error_handler.report("large_monster.update_all_riders", "Failed to access Data: player_id");
goto continue;
end
@@ -509,45 +520,45 @@ function this.update(enemy, monster)
if dead_or_captured ~= nil then
monster.dead_or_captured = dead_or_captured;
else
error_handler.report("large_monster.update", "Failed to Access Data: dead_or_captured");
error_handler.report("large_monster.update", "Failed to access Data: dead_or_captured");
end
local is_disp_icon_mini_map = is_disp_icon_mini_map_method:call(enemy);
if is_disp_icon_mini_map ~= nil then
monster.is_disp_icon_mini_map = is_disp_icon_mini_map;
else
error_handler.report("large_monster.update", "Failed to Access Data: is_disp_icon_mini_map");
error_handler.report("large_monster.update", "Failed to access Data: is_disp_icon_mini_map");
end
if monster.id == 549 or monster.id == 25 or monster.id == 2073 then
if monster.id == this.monster_ids.lucent_nargacuga or monster.id == this.monster_ids.chameleos or monster.id == this.monster_ids.risen_chameleos then
monster.can_go_stealth = true;
end
if monster.can_go_stealth then
-- Lucent Nargacuga
if monster.id == 549 then
if monster.id == this.monster_ids.lucent_nargacuga then
local is_stealth = is_stealth_method:call(enemy);
if is_stealth == nil then
monster.is_stealth = is_stealth;
else
error_handler.report("large_monster.update", "Failed to Access Data: is_stealth");
error_handler.report("large_monster.update", "Failed to access Data: is_stealth");
end
-- Chameleos and Risen Chameleos
elseif monster.id == 25 or monster.id == 2073 then
elseif monster.id == this.monster_ids.chameleos or monster.id == this.monster_ids.risen_chameleos then
local stealth_controller = get_stealth_ctrl_method:call(enemy);
if stealth_controller ~= nil then
local status = get_current_status_method:call(stealth_controller);
if status == nil then
error_handler.report("large_monster.update", "Failed to Access Data: status");
error_handler.report("large_monster.update", "Failed to access Data: status");
elseif status >= 2 then
monster.is_stealth = true;
else
monster.is_stealth = false;
end
else
error_handler.report("large_monster.update", "Failed to Access Data: stealth_controller");
error_handler.report("large_monster.update", "Failed to access Data: stealth_controller");
end
end
end
@@ -572,13 +583,13 @@ function this.update_health(enemy, monster)
local physical_param = get_physical_param_method:call(enemy);
if physical_param == nil then
error_handler.report("large_monster.update_health", "Failed to Access Data: physical_param");
error_handler.report("large_monster.update_health", "Failed to access Data: physical_param");
return nil;
end
local vital_param = get_vital_method:call(physical_param, 0, 0);
if vital_param == nil then
error_handler.report("large_monster.update_health", "Failed to Access Data: vital_param");
error_handler.report("large_monster.update_health", "Failed to access Data: vital_param");
return nil;
end
@@ -586,21 +597,21 @@ function this.update_health(enemy, monster)
if health ~= nil then
monster.health = health;
else
error_handler.report("large_monster.update_health", "Failed to Access Data: health");
error_handler.report("large_monster.update_health", "Failed to access Data: health");
end
local max_health = get_max_method:call(vital_param);
if max_health ~= nil then
monster.max_health = max_health;
else
error_handler.report("large_monster.update_health", "Failed to Access Data: max_health");
error_handler.report("large_monster.update_health", "Failed to access Data: max_health");
end
local capture_health = get_capture_hp_vital_method:call(physical_param);
if capture_health ~= nil then
monster.capture_health = capture_health;
else
error_handler.report("large_monster.update_health", "Failed to Access Data: capture_health");
error_handler.report("large_monster.update_health", "Failed to access Data: capture_health");
end
monster.missing_health = max_health - health;
@@ -630,7 +641,7 @@ function this.update_stamina(enemy, monster, stamina_param)
if stamina_param == nil then
stamina_param = get_stamina_param_method:call(enemy);
if stamina_param == nil then
error_handler.report("large_monster.update_stamina", "Failed to Access Data: stamina_param");
error_handler.report("large_monster.update_stamina", "Failed to access Data: stamina_param");
return;
end
end
@@ -639,7 +650,7 @@ function this.update_stamina(enemy, monster, stamina_param)
if is_tired ~= nil then
monster.is_tired = is_tired;
else
error_handler.report("large_monster.update_stamina", "Failed to Access Data: is_tired");
error_handler.report("large_monster.update_stamina", "Failed to access Data: is_tired");
return;
end
@@ -651,7 +662,7 @@ function this.update_stamina(enemy, monster, stamina_param)
if stamina ~= nil then
monster.stamina = stamina;
else
error_handler.report("large_monster.update_stamina", "Failed to Access Data: stamina");
error_handler.report("large_monster.update_stamina", "Failed to access Data: stamina");
return;
end
@@ -659,7 +670,7 @@ function this.update_stamina(enemy, monster, stamina_param)
if max_stamina ~= nil then
monster.max_stamina = max_stamina;
else
error_handler.report("large_monster.update_stamina", "Failed to Access Data: max_stamina");
error_handler.report("large_monster.update_stamina", "Failed to access Data: max_stamina");
return;
end
@@ -687,7 +698,7 @@ function this.update_stamina_timer(enemy, monster, stamina_param)
if stamina_param == nil then
stamina_param = get_stamina_param_method:call(enemy);
if stamina_param == nil then
error_handler.report("large_monster.update_stamina_timer", "Failed to Access Data: stamina_param");
error_handler.report("large_monster.update_stamina_timer", "Failed to access Data: stamina_param");
return;
end
end
@@ -696,7 +707,7 @@ function this.update_stamina_timer(enemy, monster, stamina_param)
if is_tired ~= nil then
monster.is_tired = is_tired;
else
error_handler.report("large_monster.update_stamina_timer", "Failed to Access Data: is_tired");
error_handler.report("large_monster.update_stamina_timer", "Failed to access Data: is_tired");
return;
end
@@ -708,7 +719,7 @@ function this.update_stamina_timer(enemy, monster, stamina_param)
if tired_timer ~= nil then
monster.tired_timer = tired_timer;
else
error_handler.report("large_monster.update_stamina_timer", "Failed to Access Data: tired_timer");
error_handler.report("large_monster.update_stamina_timer", "Failed to access Data: tired_timer");
return;
end
@@ -716,7 +727,7 @@ function this.update_stamina_timer(enemy, monster, stamina_param)
if tired_duration ~= nil then
monster.tired_duration = tired_duration;
else
error_handler.report("large_monster.update_stamina_timer", "Failed to Access Data: tired_duration");
error_handler.report("large_monster.update_stamina_timer", "Failed to access Data: tired_duration");
return;
end
@@ -751,7 +762,7 @@ function this.update_rage(enemy, monster, anger_param)
if anger_param == nil then
anger_param = get_anger_param_method:call(enemy);
if anger_param == nil then
error_handler.report("large_monster.update_rage", "Failed to Access Data: anger_param");
error_handler.report("large_monster.update_rage", "Failed to access Data: anger_param");
return;
end
end
@@ -760,7 +771,7 @@ function this.update_rage(enemy, monster, anger_param)
if is_in_rage ~= nil then
monster.is_in_rage = is_in_rage;
else
error_handler.report("large_monster.update_rage", "Failed to Access Data: is_in_rage");
error_handler.report("large_monster.update_rage", "Failed to access Data: is_in_rage");
return;
end
@@ -772,7 +783,7 @@ function this.update_rage(enemy, monster, anger_param)
if rage_point ~= nil then
monster.rage_point = rage_point;
else
error_handler.report("large_monster.update_rage", "Failed to Access Data: rage_point");
error_handler.report("large_monster.update_rage", "Failed to access Data: rage_point");
return;
end
@@ -780,7 +791,7 @@ function this.update_rage(enemy, monster, anger_param)
if rage_limit ~= nil then
monster.rage_limit = rage_limit;
else
error_handler.report("large_monster.update_rage", "Failed to Access Data: rage_limit");
error_handler.report("large_monster.update_rage", "Failed to access Data: rage_limit");
return;
end
@@ -807,7 +818,7 @@ function this.update_rage_timer(enemy, monster, anger_param)
if anger_param == nil then
anger_param = get_anger_param_method:call(enemy);
if anger_param == nil then
error_handler.report("large_monster.update_rage_timer", "Failed to Access Data: anger_param");
error_handler.report("large_monster.update_rage_timer", "Failed to access Data: anger_param");
return;
end
end
@@ -816,7 +827,7 @@ function this.update_rage_timer(enemy, monster, anger_param)
if is_in_rage ~= nil then
monster.is_in_rage = is_in_rage;
else
error_handler.report("large_monster.update_rage_timer", "Failed to Access Data: is_in_rage");
error_handler.report("large_monster.update_rage_timer", "Failed to access Data: is_in_rage");
return;
end
@@ -828,7 +839,7 @@ function this.update_rage_timer(enemy, monster, anger_param)
if rage_timer ~= nil then
monster.rage_timer = rage_timer;
else
error_handler.report("large_monster.update_rage_timer", "Failed to Access Data: rage_timer");
error_handler.report("large_monster.update_rage_timer", "Failed to access Data: rage_timer");
return;
end
@@ -836,7 +847,7 @@ function this.update_rage_timer(enemy, monster, anger_param)
if rage_duration ~= nil then
monster.rage_duration = rage_duration;
else
error_handler.report("large_monster.update_rage_timer", "Failed to Access Data: rage_duration");
error_handler.report("large_monster.update_rage_timer", "Failed to access Data: rage_duration");
return;
end
@@ -883,32 +894,32 @@ function this.update_parts(enemy, monster, physical_param)
if physical_param == nil then
physical_param = get_physical_param_method:call(enemy);
if physical_param == nil then
error_handler.report("large_monster.update_parts", "Failed to Access Data: physical_param");
error_handler.report("large_monster.update_parts", "Failed to access Data: physical_param");
return;
end
end
local damage_param = get_damage_param_method:call(enemy);
if damage_param == nil then
error_handler.report("large_monster.update_parts", "Failed to Access Data: damage_param");
error_handler.report("large_monster.update_parts", "Failed to access Data: damage_param");
return;
end
local enemy_parts_damage_info = enemy_parts_damage_info_field:get_data(damage_param);
if enemy_parts_damage_info == nil then
error_handler.report("large_monster.update_parts", "Failed to Access Data: enemy_parts_damage_info");
error_handler.report("large_monster.update_parts", "Failed to access Data: enemy_parts_damage_info");
return;
end
local core_parts_array = get_part_info_array_method:call(enemy_parts_damage_info);
if core_parts_array == nil then
error_handler.report("large_monster.update_parts", "Failed to Access Data: core_parts_array");
error_handler.report("large_monster.update_parts", "Failed to access Data: core_parts_array");
return;
end
local core_parts_array_length = length_method:call(core_parts_array);
if core_parts_array_length == nil then
error_handler.report("large_monster.update_parts", "Failed to Access Data: core_parts_array_length");
error_handler.report("large_monster.update_parts", "Failed to access Data: core_parts_array_length");
return;
end
@@ -917,7 +928,7 @@ function this.update_parts(enemy, monster, physical_param)
local enemy_parts_info = get_value_method:call(core_parts_array, i);
if enemy_parts_info == nil then
error_handler.report("large_monster.update_parts", "Failed to Access Data: enemy_parts_info No. " .. tostring(i));
error_handler.report("large_monster.update_parts", "Failed to access Data: enemy_parts_info No. " .. tostring(i));
goto continue;
end
@@ -941,19 +952,19 @@ function this.update_parts(enemy, monster, physical_param)
local part_current = get_current_method:call(part_vital);
if part_current == nil then
error_handler.report("large_monster.update_parts", string.format("Failed to Access Data: enemy_parts_info No. %d -> part_current", i));
error_handler.report("large_monster.update_parts", string.format("Failed to access Data: enemy_parts_info No. %d -> part_current", i));
end
local part_max = get_max_method:call(part_vital);
if part_max == nil then
error_handler.report("large_monster.update_parts", string.format("Failed to Access Data: enemy_parts_info No. %d -> part_max", i));
error_handler.report("large_monster.update_parts", string.format("Failed to access Data: enemy_parts_info No. %d -> part_max", i));
end
if part_current ~= nil and part_max ~= nil then
body_part.update_flinch(part, part_current, part_max);
end
else
error_handler.report("large_monster.update_parts", string.format("Failed to Access Data: enemy_parts_info No. %d -> part_vital", i));
error_handler.report("large_monster.update_parts", string.format("Failed to access Data: enemy_parts_info No. %d -> part_vital", i));
end
end
@@ -966,29 +977,29 @@ function this.update_parts(enemy, monster, physical_param)
local part_break_current = get_current_method:call(part_break_vital);
if part_break_current == nil then
error_handler.report("large_monster.update_parts", string.format("Failed to Access Data: enemy_parts_info No. %d -> part_break_current", i));
error_handler.report("large_monster.update_parts", string.format("Failed to access Data: enemy_parts_info No. %d -> part_break_current", i));
end
local part_break_max = get_max_method:call(part_break_vital);
if part_break_max == nil then
error_handler.report("large_monster.update_parts", string.format("Failed to Access Data: enemy_parts_info No. %d -> part_break_max", i));
error_handler.report("large_monster.update_parts", string.format("Failed to access Data: enemy_parts_info No. %d -> part_break_max", i));
end
local part_break_count = get_parts_break_damage_level_method:call(enemy_parts_info);
if part_break_count == nil then
error_handler.report("large_monster.update_parts", string.format("Failed to Access Data: enemy_parts_info No. %d -> part_break_count", i));
error_handler.report("large_monster.update_parts", string.format("Failed to access Data: enemy_parts_info No. %d -> part_break_count", i));
end
local part_break_max_count = get_parts_break_damage_max_level_method:call(enemy_parts_info);
if part_break_max_count == nil then
error_handler.report("large_monster.update_parts", string.format("Failed to Access Data: enemy_parts_info No. %d -> part_break_max_count", i));
error_handler.report("large_monster.update_parts", string.format("Failed to access Data: enemy_parts_info No. %d -> part_break_max_count", i));
end
if part_break_current ~= nil and part_break_max ~= nil and part_break_count ~= nil and part_break_max_count ~= nil then
body_part.update_break(part, part_break_current, part_break_max, part_break_count, part_break_max_count);
end
else
error_handler.report("large_monster.update_parts", string.format("Failed to Access Data: enemy_parts_info No. %d -> part_break_vital", i));
error_handler.report("large_monster.update_parts", string.format("Failed to access Data: enemy_parts_info No. %d -> part_break_vital", i));
end
end
@@ -1001,24 +1012,24 @@ function this.update_parts(enemy, monster, physical_param)
local part_loss_current = get_current_method:call(part_loss_vital);
if part_loss_current == nil then
error_handler.report("large_monster.update_parts", string.format("Failed to Access Data: enemy_parts_info No. %d -> part_loss_current", i));
error_handler.report("large_monster.update_parts", string.format("Failed to access Data: enemy_parts_info No. %d -> part_loss_current", i));
end
local part_loss_max = get_max_method:call(part_loss_vital);
if part_loss_max == nil then
error_handler.report("large_monster.update_parts", string.format("Failed to Access Data: enemy_parts_info No. %d -> part_loss_max", i));
error_handler.report("large_monster.update_parts", string.format("Failed to access Data: enemy_parts_info No. %d -> part_loss_max", i));
end
local is_severed = get_parts_loss_state_method:call(enemy_parts_info);
if is_severed == nil then
error_handler.report("large_monster.update_parts", string.format("Failed to Access Data: enemy_parts_info No. %d -> is_severed", i));
error_handler.report("large_monster.update_parts", string.format("Failed to access Data: enemy_parts_info No. %d -> is_severed", i));
end
if part_loss_current ~= nil and part_loss_max ~= nil and is_severed ~= nil then
body_part.update_loss(part, part_loss_current, part_loss_max, is_severed);
end
else
error_handler.report("large_monster.update_parts", string.format("Failed to Access Data: enemy_parts_info No. %d -> part_loss_vital", i));
error_handler.report("large_monster.update_parts", string.format("Failed to access Data: enemy_parts_info No. %d -> part_loss_vital", i));
end
end
@@ -1056,13 +1067,13 @@ function this.update_anomaly_parts(enemy, monster, mystery_param)
local core_parts_array = core_parts_array_field:get_data(mystery_param);
if core_parts_array == nil then
error_handler.report("large_monster.update_anomaly_parts", "Failed to Access Data: core_parts_array");
error_handler.report("large_monster.update_anomaly_parts", "Failed to access Data: core_parts_array");
return;
end
local core_parts_array_length = length_method:call(core_parts_array);
if core_parts_array_length == nil then
error_handler.report("large_monster.update_anomaly_parts", "Failed to Access Data: core_parts_array_length");
error_handler.report("large_monster.update_anomaly_parts", "Failed to access Data: core_parts_array_length");
return;
end
@@ -1071,7 +1082,7 @@ function this.update_anomaly_parts(enemy, monster, mystery_param)
local core_part = get_value_method:call(core_parts_array, i);
if core_part == nil then
error_handler.report("large_monster.update_anomaly_parts", "Failed to Access Data: core_part No. " .. tostring(i));
error_handler.report("large_monster.update_anomaly_parts", "Failed to access Data: core_part No. " .. tostring(i));
goto continue;
end
@@ -1088,13 +1099,13 @@ function this.update_anomaly_parts(enemy, monster, mystery_param)
local part_vital = core_parts_get_vital_method:call(core_part);
if part_vital == nil then
error_handler.report("large_monster.update_anomaly_parts", "Failed to Access Data: part_vital No. " .. tostring(i));
error_handler.report("large_monster.update_anomaly_parts", "Failed to access Data: part_vital No. " .. tostring(i));
return;
end
local part_is_active = core_parts_get_is_active_method:call(core_part);
if part_is_active == nil then
error_handler.report("large_monster.update_anomaly_parts", "Failed to Access Data: part_is_active No. " .. tostring(i));
error_handler.report("large_monster.update_anomaly_parts", "Failed to access Data: part_is_active No. " .. tostring(i));
return;
end
@@ -1102,19 +1113,19 @@ function this.update_anomaly_parts(enemy, monster, mystery_param)
local part_current = get_current_method:call(part_vital);
if part_current == nil then
error_handler.report("large_monster.update_anomaly_parts", "Failed to Access Data: part_current No. " .. tostring(i));
error_handler.report("large_monster.update_anomaly_parts", "Failed to access Data: part_current No. " .. tostring(i));
goto continue;
end
local part_max = get_max_method:call(part_vital);
if part_max == nil then
error_handler.report("large_monster.update_anomaly_parts", "Failed to Access Data: part_max No. " .. tostring(i));
error_handler.report("large_monster.update_anomaly_parts", "Failed to access Data: part_max No. " .. tostring(i));
goto continue;
end
local part_is_enabled = is_enable_method:call(part_vital);
if part_is_enabled == nil then
error_handler.report("large_monster.update_anomaly_parts", "Failed to Access Data: part_is_enabled No. " .. tostring(i));
error_handler.report("large_monster.update_anomaly_parts", "Failed to access Data: part_is_enabled No. " .. tostring(i));
goto continue;
end
@@ -1128,6 +1139,34 @@ function this.update_anomaly_parts(enemy, monster, mystery_param)
end
end
function this.update_highlighted_id()
if quest_status.flow_state <= quest_status.flow_states.IN_LOBBY
or quest_status.flow_state == quest_status.flow_states.LOADING_QUEST
or quest_status.flow_state == quest_status.flow_states.CUTSCENE
or quest_status.flow_state >= quest_status.flow_states.QUEST_END_ANIMATION then
return;
end
if singletons.gui_manager == nil then
error_handler.report("large_monster.update_highlighted_id", "Failed to access Data: gui_manager");
return;
end
local gui_hud_target_camera = get_tg_camera_method:call(singletons.gui_manager);
if gui_hud_target_camera == nil then
error_handler.report("large_monster.update_highlighted_id", "Failed to access Data: gui_hud_target_camera");
return;
end
local highlighted_id = get_targeting_enemy_index_field:get_data(gui_hud_target_camera);
if highlighted_id == nil then
error_handler.report("large_monster_UI.update_highlighted_id", "Failed to access Data: highlighted_id");
return;
end
this.highlighted_id = highlighted_id;
end
function this.draw(monster, type, cached_config, position_on_screen, opacity_scale)
local monster_UI;
@@ -1147,20 +1186,29 @@ function this.draw(monster, type, cached_config, position_on_screen, opacity_sca
end
if cached_config.monster_name_label.include.monster_id then
monster_name_text = monster_name_text .. tostring(monster.id) .. " ";
monster_name_text = string.format("%s%s ", monster_name_text, tostring(monster.id));
end
if cached_config.monster_name_label.include.crown and monster.crown ~= "" then
monster_name_text = monster_name_text .. string.format("%s ", monster.crown);
monster_name_text = string.format("%s%s ", monster_name_text, monster.crown);
end
if cached_config.monster_name_label.include.size then
monster_name_text = monster_name_text .. string.format("#%.0f ", 100 * monster.size);
if cached_config.monster_name_label.include.size and monster.size ~= -1 then
monster_name_text = string.format("%s#%.0f ", monster_name_text, 100 * monster.size);
end
if cached_config.monster_name_label.include.crown_thresholds then
if monster.small_border ~= -1 then
monster_name_text = string.format("%s<=%.0f ", monster_name_text, 100 * monster.small_border);
end
if cached_config.monster_name_label.include.scrown_thresholds then
monster_name_text = monster_name_text .. string.format("<=%.0f >=%.0f >=%.0f", 100 * monster.small_border,
100 * monster.big_border, 100 * monster.king_border);
if monster.big_border ~= -1 then
monster_name_text = string.format("%s>=%.0f ", monster_name_text, 100 * monster.big_border);
end
if monster.king_border ~= -1 then
monster_name_text = string.format("%s>=%.0f ", monster_name_text, 100 * monster.king_border);
end
end
if monster.is_capturable and monster.health < monster.capture_health then
@@ -1236,6 +1284,8 @@ function this.init_dependencies()
config = require("MHR_Overlay.Misc.config");
utils = require("MHR_Overlay.Misc.utils");
body_part = require("MHR_Overlay.Monsters.body_part");
quest_status = require("MHR_Overlay.Game_Handler.quest_status");
health_UI_entity = require("MHR_Overlay.UI.UI_Entities.health_UI_entity");
stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity");
rage_UI_entity = require("MHR_Overlay.UI.UI_Entities.rage_UI_entity");
@@ -1254,6 +1304,7 @@ function this.init_dependencies()
end
function this.init_module()
time.new_timer(this.update_highlighted_id, 1/30);
end
return this;

View File

@@ -129,7 +129,7 @@ function this.update_large_monster(enemy)
-- this is the VERY LEAST thing we should do all the time
-- so the position doesn't lag all over the place
-- due to how infrequently we update the monster(s).
large_monster.update_position(enemy, monster);
--large_monster.update_position(enemy, monster);
if not config.current_config.global_settings.performance.prioritize_large_monsters and updated_monsters[enemy] then
return;
@@ -154,7 +154,8 @@ function this.update_large_monster(enemy)
large_monster.update_stamina_timer(enemy, monster, nil);
large_monster.update_rage_timer(enemy, monster, nil);
if quest_status.is_online and players.myself.id ~= 0 then
if (quest_status.is_online and players.myself.id ~= 0)
or not monster.is_health_initialized then
local physical_param = large_monster.update_health(enemy, monster);
pcall(large_monster.update_parts, enemy, monster, physical_param);
pcall(large_monster.update_anomaly_parts, enemy, monster, nil);
@@ -173,7 +174,7 @@ function this.update_small_monster(enemy)
-- this is the VERY LEAST thing we should do all the time
-- so the position doesn't lag all over the place
-- due to how infrequently we update the monster(s).
small_monster.update_position(enemy, monster);
--small_monster.update_position(enemy, monster);
if updated_monsters[enemy] then
return;
@@ -195,7 +196,8 @@ function this.update_small_monster(enemy)
small_monster.update(enemy, monster);
if quest_status.is_online and players.myself.id ~= 0 then
if (quest_status.is_online and players.myself.id ~= 0)
or not monster.is_health_initialized then
small_monster.update_health(enemy, monster);
end
end
@@ -203,13 +205,13 @@ end
function this.update_health(enemy_damage_check)
local enemy = get_ref_enemy:call(enemy_damage_check);
if enemy == nil then
error_handler.report("monster_hook.update_health", "Failed to Access Data: enemy");
error_handler.report("monster_hook.update_health", "Failed to access Data: enemy");
return;
end
local is_large = is_boss_enemy_method:call(enemy);
if is_large == nil then
error_handler.report("monster_hook.update_health", "Failed to Access Data: is_large");
error_handler.report("monster_hook.update_health", "Failed to access Data: is_large");
return;
end
@@ -232,7 +234,7 @@ function this.update_stamina(stamina_param, stamina_sub)
local enemy = get_enemy_method:call(stamina_param);
if enemy == nil then
error_handler.report("monster_hook.update_stamina", "Failed to Access Data: enemy");
error_handler.report("monster_hook.update_stamina", "Failed to access Data: enemy");
return;
end

View File

@@ -71,7 +71,6 @@ function this.new(enemy)
this.init_UI(monster);
this.update_position(enemy, monster);
this.update_health(enemy, monster);
this.update(enemy, monster);
if this.list[enemy] == nil then
@@ -99,7 +98,7 @@ local get_enemy_name_message_method = message_manager_type_def:get_method("getEn
function this.init(monster, enemy)
local enemy_type = enemy_type_field:get_data(enemy);
if enemy_type == nil then
error_handler.report("small_monster.init", "Failed to Access Data: enemy_type");
error_handler.report("small_monster.init", "Failed to access Data: enemy_type");
return;
end
@@ -107,7 +106,7 @@ function this.init(monster, enemy)
local enemy_name = get_enemy_name_message_method:call(singletons.message_manager, enemy_type);
if enemy_name == nil then
error_handler.report("small_monster.init", "Failed to Access Data: enemy_name");
error_handler.report("small_monster.init", "Failed to access Data: enemy_name");
end
monster.name = enemy_name;
@@ -164,7 +163,7 @@ local vital_param_type = get_vital_method:get_return_type();
local get_current_method = vital_param_type:get_method("get_Current");
local get_max_method = vital_param_type:get_method("get_Max");
local get_pos_field = enemy_character_base_type_def:get_method("get_Pos");
local get_pos_method = enemy_character_base_type_def:get_method("get_Pos");
function this.update_position(enemy, monster)
local cached_config = config.current_config.small_monster_UI;
@@ -177,9 +176,10 @@ function this.update_position(enemy, monster)
return;
end
local position = get_pos_field:call(enemy);
local position = get_pos_method:call(enemy);
if position == nil then
error_handler.report("small_monster.update_position", "Failed to Access Data: position");
error_handler.report("small_monster.update_position", "Failed to access Data: position");
end
monster.position = position;
@@ -194,7 +194,7 @@ function this.update(enemy, monster)
if dead_or_captured ~= nil then
monster.dead_or_captured = dead_or_captured;
else
error_handler.report("small_monster.update", "Failed to Access Data: dead_or_captured");
error_handler.report("small_monster.update", "Failed to access Data: dead_or_captured");
end
pcall(ailments.update_ailments, enemy, monster);
@@ -207,13 +207,13 @@ function this.update_health(enemy, monster)
local physical_param = get_physical_param_method:call(enemy);
if physical_param == nil then
error_handler.report("small_monster.update_health", "Failed to Access Data: physical_param");
error_handler.report("small_monster.update_health", "Failed to access Data: physical_param");
return;
end
local vital_param = get_vital_method:call(physical_param, 0, 0);
if vital_param == nil then
error_handler.report("small_monster.update_health", "Failed to Access Data: vital_param");
error_handler.report("small_monster.update_health", "Failed to access Data: vital_param");
return;
end
@@ -221,7 +221,7 @@ function this.update_health(enemy, monster)
if health ~= nil then
monster.health = health;
else
error_handler.report("small_monster.update_health", "Failed to Access Data: health");
error_handler.report("small_monster.update_health", "Failed to access Data: health");
return;
end
@@ -229,7 +229,7 @@ function this.update_health(enemy, monster)
if max_health ~= nil then
monster.max_health = max_health;
else
error_handler.report("small_monster.update_health", "Failed to Access Data: max_health");
error_handler.report("small_monster.update_health", "Failed to access Data: max_health");
return;
end

View File

@@ -56,7 +56,7 @@ local displayed_directions = {};
function this.init()
local default = language.default_language.customization_menu;
local current = language.current_language.customization_menu;
outline_styles = {
default.inside,
default.center,
@@ -150,15 +150,13 @@ function this.draw(bar_name, bar)
bar.outline.offset, 0.1, -screen.height, screen.height, "%.1f");
bar_changed = bar_changed or changed;
changed, index = imgui.combo(cached_language.style,
utils.table.find_index(this.outline_styles,
bar.outline.style),
this.displayed_outline_styles);
utils.table.find_index(outline_styles, bar.outline.style),
displayed_outline_styles);
bar_changed = bar_changed or changed;
if changed then
bar.outline.style = this.outline_styles[index];
bar.outline.style = outline_styles[index];
end
imgui.tree_pop();

View File

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

View File

@@ -69,41 +69,30 @@ function this.draw(dynamic_enabled, static_enabled, highlighted_enabled)
and (cached_config.highlighted.auto_highlight.mode == "Closest" or cached_config.highlighted.auto_highlight.mode == "Furthest")
);
local highlighted_id = -1;
local monster_id_shift = 0;
local highlighted_monster = nil;
if not cached_config.highlighted.auto_highlight.enabled and singletons.gui_manager ~= nil then
local gui_hud_target_camera = get_tg_camera_method:call(singletons.gui_manager);
if gui_hud_target_camera ~= nil then
highlighted_id = get_targeting_enemy_index_field:get_data(gui_hud_target_camera);
if highlighted_id == nil then
error_handler.report("large_monster_UI.draw", "Failed to Access Data: highlighted_id");
highlighted_id = -1;
end
end
end
local enemy_count = get_boss_enemy_count_method:call(singletons.enemy_manager);
if enemy_count == nil then
error_handler.report("large_monster_UI.draw", "Failed to Access Data: enemy_count");
error_handler.report("large_monster_UI.draw", "Failed to access Data: enemy_count");
return;
end
for i = 0, enemy_count - 1 do
local enemy = get_boss_enemy_method:call(singletons.enemy_manager, i);
if enemy == nil then
error_handler.report("large_monster_UI.draw", "Failed to Access Data: enemy No. " .. tostring(i));
error_handler.report("large_monster_UI.draw", "Failed to access Data: enemy No. " .. tostring(i));
goto continue;
end
local monster = large_monster.list[enemy];
local monster = large_monster.get_monster(enemy);
if monster == nil then
error_handler.report("large_monster_UI.draw", "Missing Entry: monster No. " .. tostring(i));
error_handler.report("large_monster_UI.draw", "Failed to create Large Monster Entry No. " .. tostring(i));
goto continue;
end
large_monster.update_position(enemy, monster);
if update_distance then
monster.distance = (players.myself_position - monster.position):length();
end
@@ -126,7 +115,7 @@ function this.draw(dynamic_enabled, static_enabled, highlighted_enabled)
if monster.health > highlighted_monster.health then
highlighted_monster = monster;
end
elseif cached_config.highlighted.auto_highlight.mode == "Lowest Health Percentage" then
if monster.health_percentage < highlighted_monster.health_percentage then
highlighted_monster = monster;
@@ -146,11 +135,10 @@ function this.draw(dynamic_enabled, static_enabled, highlighted_enabled)
if monster.dead_or_captured or not monster.is_disp_icon_mini_map then
monster_id_shift = monster_id_shift + 1;
elseif i == highlighted_id + monster_id_shift then
elseif i == large_monster.highlighted_id + monster_id_shift then
highlighted_monster = monster;
end
end
table.insert(displayed_monsters, monster);
::continue::
end
@@ -168,7 +156,7 @@ function this.draw(dynamic_enabled, static_enabled, highlighted_enabled)
error_handler.report("large_monster_UI.draw", "Highlighted Large Monster drawing function threw an exception");
end
end
if static_enabled then
local success = pcall(this.draw_static, displayed_monsters, highlighted_monster, cached_config);
if not success then
@@ -212,7 +200,7 @@ function this.draw_dynamic(displayed_monsters, highlighted_monster, cached_confi
position_on_screen = draw.world_to_screen(monster.position + world_offset);
if position_on_screen == nil then
goto continue
goto continue;
end
position_on_screen.x = position_on_screen.x + cached_config.viewport_offset.x * global_scale_modifier;
@@ -220,7 +208,7 @@ function this.draw_dynamic(displayed_monsters, highlighted_monster, cached_confi
local opacity_scale = 1;
if monster.distance > cached_config.settings.max_distance then
goto continue
goto continue;
end
if cached_config.settings.opacity_falloff then

View File

@@ -58,20 +58,20 @@ function this.draw()
local enemy_count = get_zako_enemy_count_method:call(singletons.enemy_manager);
if enemy_count == nil then
error_handler.report("small_monster_UI.draw", "Failed to Access Data: enemy_count");
error_handler.report("small_monster_UI.draw", "Failed to access Data: enemy_count");
return;
end
for i = 0, enemy_count - 1 do
local enemy = get_zako_enemy_method:call(singletons.enemy_manager, i);
if enemy == nil then
error_handler.report("small_monster_UI.draw", "Failed to Access Data: enemy No. " .. tostring(i));
error_handler.report("small_monster_UI.draw", "Failed to access Data: enemy No. " .. tostring(i));
goto continue;
end
local monster = small_monster.list[enemy];
local monster = small_monster.get_monster(enemy);
if monster == nil then
error_handler.report("small_monster_UI.draw", "Missing Entry: monster No. " .. tostring(i));
error_handler.report("small_monster_UI.draw", "Failed to create Small Monster Entry No. " .. tostring(i));
goto continue;
end
@@ -79,6 +79,8 @@ function this.draw()
goto continue;
end;
small_monster.update_position(enemy, monster);
table.insert(displayed_monsters, monster);
::continue::
end

View File

@@ -65,7 +65,6 @@ local package = package;
this.font = nil;
this.full_font_range = {0x1, 0xFFFF, 0};
this.is_opened = false;
this.window_position = Vector2f.new(480, 200);
this.window_pivot = Vector2f.new(0, 0);
@@ -326,21 +325,33 @@ function this.init()
end
function this.draw()
imgui.set_next_window_pos(this.window_position, 1 << 3, this.window_pivot);
imgui.set_next_window_size(this.window_size, 1 << 3);
imgui.push_font(this.font);
this.is_opened = imgui.begin_window(
language.current_language.customization_menu.mod_name .. " v" .. config.current_config.version, this.is_opened,
this.window_flags);
if not this.is_opened then
imgui.pop_font();
imgui.end_window();
if not config.current_config.customization_menu.visible then
return;
end
local window_position = Vector2f.new(config.current_config.customization_menu.position.x, config.current_config.customization_menu.position.y);
local window_pivot = Vector2f.new(config.current_config.customization_menu.pivot.x, config.current_config.customization_menu.pivot.y);
local window_size = Vector2f.new(config.current_config.customization_menu.size.width, config.current_config.customization_menu.size.height);
imgui.set_next_window_pos(window_position, 1 << 3, window_pivot);
imgui.set_next_window_size(window_size, 1 << 3);
imgui.push_font(this.font);
config.current_config.customization_menu.visible = imgui.begin_window(
string.format("%s v%s", language.current_language.customization_menu.mod_name, config.current_config.version),
config.current_config.customization_menu.visible,
this.window_flags);
if not config.current_config.customization_menu.visible then
imgui.pop_font();
imgui.end_window();
config.save_current();
return;
end
local window_changed = false;
local config_changed = false;
local language_changed = false;
local modifiers_changed = false;
@@ -357,6 +368,25 @@ function this.draw()
local debug_changed = false;
local apply_font_requested = false;
local new_window_position = imgui.get_window_pos();
if window_position.x ~= new_window_position.x or window_position.y ~= new_window_position.y then
window_changed = window_changed or true;
config.current_config.customization_menu.position.x = new_window_position.x;
config.current_config.customization_menu.position.y = new_window_position.y;
end
local new_window_size = imgui.get_window_size();
if window_size.x ~= new_window_size.x or window_size.y ~= new_window_size.y then
window_changed = window_changed or true;
config.current_config.customization_menu.size.width = new_window_size.x;
config.current_config.customization_menu.size.height = new_window_size.y;
end
local new_window_size = imgui.get_window_size();
window_changed = window_changed or new_window_size.x ~= window_size.x or new_window_size.y ~= window_size.y;
config_changed, apply_font_requested = this.draw_config();
modules_changed = this.draw_modules();
this.draw_hotkeys();
@@ -446,11 +476,12 @@ function this.draw()
this.reload_font();
end
if modules_changed or global_settings_changed or small_monster_UI_changed or large_monster_dynamic_UI_changed or
if window_changed or modules_changed or global_settings_changed or small_monster_UI_changed or large_monster_dynamic_UI_changed or
large_monster_static_UI_changed or large_monster_highlighted_UI_changed or time_UI_changed or damage_meter_UI_changed or
endemic_life_UI_changed or buff_UI_changed or modifiers_changed or config_changed or debug_changed then
config.save_current();
end
end
function this.draw_config()
@@ -2143,7 +2174,7 @@ function this.draw_endemic_life_UI()
end
changed = label_customization.draw(
language.current_language.customization_menu.creature_name_label, cached_config.creature_name_label.visibility);
language.current_language.customization_menu.creature_name_label, cached_config.creature_name_label);
config_changed = config_changed or changed;
@@ -2273,13 +2304,13 @@ function this.draw_debug()
if imgui.tree_node(language.current_language.customization_menu.debug) then
imgui.text_colored(string.format("%s:", language.current_language.customization_menu.current_time), 0xFFAAAA66);
imgui.same_line();
imgui.text(string.format("%.3fs", time.total_elapsed_script_seconds));
if error_handler.is_empty then
imgui.text(language.current_language.customization_menu.everything_seems_to_be_ok);
else
imgui.text_colored("Current Script Time:", 0xFFAAAA66);
imgui.same_line();
imgui.text(string.format("%.3fs", time.total_elapsed_script_seconds));
for error_key, error in pairs(error_handler.list) do
imgui.button(string.format("%.3fs", error.time));
@@ -2288,10 +2319,9 @@ function this.draw_debug()
imgui.same_line();
imgui.text(error.message);
end
end
if imgui.tree_node(language.current_language.customization_menu.error_history) then
if imgui.tree_node(language.current_language.customization_menu.history) then
changed, cached_config.history_size = imgui.drag_int(
language.current_language.customization_menu.history_size, cached_config.history_size, 1, 0, 1024);

View File

@@ -104,6 +104,7 @@
"crown": "Crown",
"crown_thresholds": "Crown Thresholds",
"current_state": "Current State",
"current_time": "Current Time",
"current_value": "Current Value",
"cutscene": "Cutscene",
"damage": "Damage",
@@ -127,7 +128,6 @@
"enabled": "Enabled",
"endemic_life": "Endemic Life",
"endemic_life_UI": "Endemic Life UI",
"error_history": "Error History",
"everything_seems_to_be_ok": "Everything seems to be OK!",
"family": "Family",
"farthest": "Farthest",
@@ -178,6 +178,7 @@
"highlighted_buildup_bar": "Highlighted Buildup Bar",
"highlighted_damage_bar": "Highlighted Damage Bar",
"highlighted_targeted": "Highlighted (targeted)",
"history": "History",
"history_size": "History Size",
"horizontal": "Horizontal",
"hotkeys": "Hotkeys",

View File

@@ -104,6 +104,7 @@
"crown": "王冠",
"crown_thresholds": "王冠の閾値",
"current_state": "Current State",
"current_time": "Current Time",
"current_value": "Current Value",
"cutscene": "Cutscene",
"damage": "ダメージ",
@@ -127,7 +128,6 @@
"enabled": "有効",
"endemic_life": "Endemic Life",
"endemic_life_UI": "環境生物UI",
"error_history": "Error History",
"everything_seems_to_be_ok": "Everything seems to be OK!",
"family": "Family",
"farthest": "Farthest",
@@ -178,6 +178,7 @@
"highlighted_buildup_bar": "ハイライトされた蓄積値バー",
"highlighted_damage_bar": "ハイライトされたダメージバー",
"highlighted_targeted": "詳細表示 (ターゲット)",
"history": "History",
"history_size": "History Size",
"horizontal": "水平",
"hotkeys": "ホットキー",

View File

@@ -104,6 +104,7 @@
"crown": "금관",
"crown_thresholds": "금관 판정값",
"current_state": "현재 상태",
"current_time": "Current Time",
"current_value": "현재 값",
"cutscene": "컷신",
"damage": "대미지",
@@ -112,6 +113,7 @@
"damage_meter_UI": "대미지 미터 UI",
"damage_percentage_label": "대미지 비율 정보",
"damage_value_label": "대미지 값 정보",
"debug": "Debug",
"debug_errors": "Debug Errors",
"default_state": "기본 상태",
"delete": "삭제하기",
@@ -127,7 +129,6 @@
"enabled": "사용함",
"endemic_life": "환경생물",
"endemic_life_UI": "환경생물 UI",
"error_history": "Error History",
"everything_seems_to_be_ok": "Everything seems to be OK!",
"family": "글꼴",
"farthest": "가장 멀리있는",
@@ -178,6 +179,7 @@
"highlighted_buildup_bar": "주시대상 몬스터 누적치 막대",
"highlighted_damage_bar": "주시대상 몬스터 대미지 막대",
"highlighted_targeted": "주시대상 몬스터 표시",
"history": "History",
"history_size": "History Size",
"horizontal": "가로",
"hotkeys": "단축키",

View File

@@ -104,6 +104,7 @@
"crown": "Корона",
"crown_thresholds": "Лимиты корон",
"current_state": "Текущее состояние",
"current_time": "Current Time",
"current_value": "Текущее значение",
"cutscene": "Катсцена",
"damage": "Урон",
@@ -112,6 +113,7 @@
"damage_meter_UI": "Интерфейс модуля урона",
"damage_percentage_label": "Метка урона в процентах",
"damage_value_label": "Метка значений урона",
"debug": "Debug",
"debug_errors": "Debug Errors",
"default_state": "Состояние по умолчанию",
"delete": "Удалить",
@@ -127,7 +129,6 @@
"enabled": "Включить",
"endemic_life": "Местная живность",
"endemic_life_UI": "Интерфейс местной живности",
"error_history": "Error History",
"everything_seems_to_be_ok": "Everything seems to be OK!",
"family": "Семейство",
"farthest": "Самый дальний",
@@ -178,6 +179,7 @@
"highlighted_buildup_bar": "Помеченная шкала накопления",
"highlighted_damage_bar": "Помеченная шкала урона",
"highlighted_targeted": "Помеченный",
"history": "History",
"history_size": "History Size",
"horizontal": "Горизонтально",
"hotkeys": "Горячие клавиши",

View File

@@ -104,6 +104,7 @@
"crown": "皇冠",
"crown_thresholds": "皇冠阈值",
"current_state": "当前阶段",
"current_time": "Current Time",
"current_value": "当前值",
"cutscene": "过场动画",
"damage": "伤害",
@@ -112,6 +113,7 @@
"damage_meter_UI": "伤害统计UI",
"damage_percentage_label": "伤害百分比标签",
"damage_value_label": "伤害量标签",
"debug": "Debug",
"debug_errors": "Debug Errors",
"default_state": "默认阶段",
"delete": "删除",
@@ -127,7 +129,6 @@
"enabled": "开启",
"endemic_life": "环境生物",
"endemic_life_UI": "环境生物UI",
"error_history": "Error History",
"everything_seems_to_be_ok": "Everything seems to be OK!",
"family": "字体",
"farthest": "最远",
@@ -178,6 +179,7 @@
"highlighted_buildup_bar": "高亮积累值条",
"highlighted_damage_bar": "高亮伤害条",
"highlighted_targeted": "高亮目标[锁定目标的UI]",
"history": "History",
"history_size": "History Size",
"horizontal": "水平",
"hotkeys": "热键",

View File

@@ -104,6 +104,7 @@
"crown": "皇冠",
"crown_thresholds": "皇冠的大小判定範圍",
"current_state": "Current State",
"current_time": "Current Time",
"current_value": "Current Value",
"cutscene": "Cutscene",
"damage": "傷害",
@@ -112,6 +113,7 @@
"damage_meter_UI": "傷害量計算 UI",
"damage_percentage_label": "傷害量百分比",
"damage_value_label": "傷害量",
"debug": "Debug",
"debug_errors": "Debug Errors",
"default_state": "Default State",
"delete": "Delete",
@@ -127,7 +129,6 @@
"enabled": "啟用",
"endemic_life": "Endemic Life",
"endemic_life_UI": "環境生物 UI",
"error_history": "Error History",
"everything_seems_to_be_ok": "Everything seems to be OK!",
"family": "字體",
"farthest": "最遠的",
@@ -178,6 +179,7 @@
"highlighted_buildup_bar": "重點累積條",
"highlighted_damage_bar": "重點傷害條",
"highlighted_targeted": "鎖定的魔物資訊(目標)",
"history": "History",
"history_size": "History Size",
"horizontal": "水平",
"hotkeys": "快捷鍵",