Added New Mods and Profiles Folders

This is a complete rebuild of the modpack, with all new mods and updates for 1.5.3 of Anomaly.
This commit is contained in:
2025-01-14 05:07:53 -05:00
parent 85c665b107
commit 376b4b9689
21217 changed files with 546254 additions and 0 deletions
@@ -0,0 +1,14 @@
-- BoltBeGone - Nitpicker's Modpack
-- Last modified: 2021.09.06
-- https://github.com/Ishmaeel/NitpickerModpack
function my_keep_item(npc, item)
og_keep_item(npc, item)
if IsBolt(item) then
--printf("! Be gone, %s #%s!", item:section(), item:id())
item:destroy_object()
end
end
og_keep_item = death_manager.keep_item
death_manager.keep_item = my_keep_item
@@ -0,0 +1,88 @@
-- CharacterNameSaves - Nitpicker's Modpack
-- Last modified: 2021.07.26
-- https://github.com/Ishmaeel/NitpickerModpack
local base_user_name = nil
local fs = getFS()
local function actor_character_name()
return db.actor:character_name()
end
local function news(str)
printf("# " .. str)
end
if d and d.news then
news = d.news
end
function on_game_start()
if new_name then
news("not compatible with 'new_name.script'.")
return
end
RegisterScriptCallback("on_game_load", on_game_load)
base_user_name = _G.user_name
_G.user_name = actor_character_name
end
function on_game_load()
rename_saves()
end
function rename_saves()
-- This forces a refresh of file system cache I guess.
fs:file_list_open_ex("$game_saves$", bit_or(FS.FS_ListFiles, FS.FS_RootOnly), "*")
local user_save = fs:update_path('$game_saves$', base_user_name() .. " - autosave")
local char_save = fs:update_path('$game_saves$', actor_character_name() .. " - autosave")
local level_name = level.name()
if level_name then
local level_title = game.translate_string(level_name)
if level_title then
level_title = string.lower(level_title:gsub("[()]", ""))
char_save = char_save .. " - " .. level_title
end
end
rename_save(user_save, char_save)
return true
end
function rename_save(first, second)
local ready = check(first, ".scop") and check(first, ".scoc")
if not ready then
news("Autosave not found.")
return
end
rename(first, second, ".scop")
rename(first, second, ".scoc")
printf("# Renaming %s -> %s", first, second)
local done = check(second, ".scop") and check(second, ".scoc")
news(done and "Autosave updated." or "Autosave update failed.")
end
function check(first, ext)
first = first .. ext
local exists = fs:exist(first) and true or false
return exists
end
function rename(first, second, ext)
first = first .. ext
second = second .. ext
fs:file_rename(first, second, true)
end
@@ -0,0 +1,53 @@
-- FastTransfer - Nitpicker's Modpack
-- Last modified: 2021.08.29
-- https://github.com/Ishmaeel/NitpickerModpack
--
last_url = nil
enabled = {actor_bag = true, npc_bag = true, actor_trade = true, actor_trade_bag = true, npc_trade = true, npc_trade_bag = true}
function Ishy_On_Hover(self, idx)
if idx and enabled[self.ID] then
local shift = key_state(DIK_keys.DIK_LSHIFT) ~= 0 or key_state(DIK_keys.DIK_RSHIFT) ~= 0
if shift then
local move_info = {bag = self.ID, idx = idx, ts = math.floor(time_global() / 1000)}
new_url = move_info.bag .. "_" .. move_info.idx .. "_" .. move_info.ts
if last_url == new_url then
return
end
last_url = new_url
CreateTimeEvent("Ishy_On_Hover", "Move_Items_Delayed", 0, Move_Items_Delayed, move_info)
return
end
end
Base_On_Hover(self, idx)
end
function Move_Items_Delayed(move_info)
if move_info then
bag = move_info.bag
idx = move_info.idx
self = ui_inventory.GUI
local obj = self.CC[bag]:GetObj(idx)
bag, idx = self:Picker_Ownership(bag, idx, obj)
if self:Cond_Move(obj, bag) then
if self:Cond_Childs(obj, bag) then
self:Action_Move_All(obj, bag)
else
self:Action_Move(obj, bag)
end
end
end
return true
end
function on_game_start()
Base_On_Hover = utils_ui.UICellContainer.On_Hover
utils_ui.UICellContainer.On_Hover = Ishy_On_Hover
end
@@ -0,0 +1,25 @@
-- BoltManager - Nitpicker's Modpack
-- Last modified: 2021.07.26
-- https://github.com/Ishmaeel/NitpickerModpack
function itms_manager.bolt_manager() -- limit bolt count in actor inventory
ResetTimeEvent("cycle", "bolt_manager", 60)
local sim = alife()
local bolt_max_num = itms_manager.ini_manager:r_float_ex("settings", "bolt_max_num") or 99
local cnt = 0
local id, sec, se_obj
local function itr(temp, obj)
sec = obj:section()
if (sec == "bolt") or (sec == "bolt_bullet") then
cnt = cnt + 1
if (cnt > bolt_max_num) then
obj:destroy_object()
end
end
end
db.actor:iterate_ruck(itr, nil)
return false
end
@@ -0,0 +1,19 @@
-- KeepBolts - Nitpicker's Modpack
-- Last modified: 2021.07.26
-- https://github.com/Ishmaeel/NitpickerModpack
local Base_Action_Move = nil
function Ishy_Action_Move(sender, obj, bag, another, fourth, fifth)
obj = sender:CheckItem(obj, "Action_Move")
if sender.mode == "loot" and (bag == "actor_bag" or bag == "actor_equ") and IsBolt(obj) then
return
end
Base_Action_Move(sender, obj, bag)
end
function on_game_start()
Base_Action_Move = ui_inventory.UIInventory.Action_Move
ui_inventory.UIInventory.Action_Move = Ishy_Action_Move
end
@@ -0,0 +1,32 @@
function level_input.action_quick_load(self, dik, bind)
local flags = {}
-- You must check in your callback, and set flags.ret = true if an action took place
flags.ret = false
SendScriptCallback("on_before_load_input", dik, bind, flags)
if (flags.ret == true) then
return true
end
if not (device():is_paused()) then
device():pause(true)
end
local flist = getFS():file_list_open_ex("$game_saves$", bit_or(FS.FS_ListFiles, FS.FS_RootOnly), "*" .. ui_load_dialog.saved_game_extension)
local f_cnt = flist and flist:Size() or 0
if (f_cnt > 0) then
flist:Sort(FS.FS_sort_by_modif_down)
for it = 0, f_cnt - 1 do
local file_name = flist:GetAt(it):NameFull():sub(0, -6):lower()
-- grab last modified save
if true then
exec_console_cmd("load " .. file_name)
return true
end
end
end
return true
end
@@ -0,0 +1,85 @@
-- UnloadAll - Nitpicker's Modpack
-- Last modified: 2023.07.30
-- https://github.com/Ishmaeel/NitpickerModpack
--
local Base_OnKeyboard = nil
local E_RELEASE = ui_events.WINDOW_KEY_RELEASED
local unload_strategies = {}
function on_game_start()
item_weapon.unload_all_weapons = no_stop_what_are_you_doing
Base_OnKeyboard = ui_inventory.UIInventory.OnKeyboard
ui_inventory.UIInventory.OnKeyboard = Ishy_OnKeyboard
table.insert(unload_strategies, validate)
if magazines and magazine_binder and magazines.eject_magazine and magazine_binder.is_supported_weapon then
table.insert(unload_strategies, eject_magazine)
end
table.insert(unload_strategies, unload_vanilla)
end
function Ishy_OnKeyboard(self, dik, keyboard_action)
Base_OnKeyboard(self, dik, keyboard_action)
if keyboard_action == E_RELEASE then
local bind = dik_to_bind(dik)
if bind == key_bindings.kCUSTOM15 then
unload_all_the_things(self)
end
end
end
function unload_all_the_things(self)
if self.mode == "inventory" then
db.actor:iterate_ruck(unload_weapon)
end
if self.mode == "loot" then
local npc = self.npc_id and get_object_by_id(self.npc_id)
if npc then
if npc.iterate_inventory then
npc:iterate_inventory(unload_weapon)
end
if npc.iterate_inventory_box then
npc:iterate_inventory_box(unload_weapon)
self.update_info = true
end
end
end
end
function unload_weapon(_, obj)
for _, strategy in ipairs(unload_strategies) do
local handled = strategy(obj)
if handled then
return
end
end
end
function validate(obj)
if not IsWeapon(obj) or IsItem("fake_ammo_wpn", obj:section()) then
return true
end
end
function eject_magazine(obj)
if magazine_binder.is_supported_weapon(obj) then
magazines.eject_magazine(obj)
return true
end
end
function unload_vanilla(obj)
obj:force_unload_magazine(true)
return true
end
function no_stop_what_are_you_doing()
-- stop doing things the wrong way.
end
@@ -0,0 +1,47 @@
-- TotalWeights - Nitpicker's Modpack
-- Last modified: 2021.10.19
-- https://github.com/Ishmaeel/NitpickerModpack
local Base_Add_Counter = nil
local Base_Item_Update = nil
function Ishy_Add_Counter(cell_item, xml, obj, sec)
Base_Add_Counter(cell_item, xml, obj, sec)
calculate_weights(cell_item, obj)
end
function Ishy_Item_Update(info_item, obj, sec, flags)
Base_Item_Update(info_item, obj, sec, flags)
update_weight_display(info_item, flags)
end
function calculate_weights(cell_item, obj)
if obj then
local objw8 = obj:weight()
local childw8 = 0
local has_childs = cell_item:HasChild()
if has_childs then
for id, _ in pairs(cell_item.childs) do
local cobj = get_object_by_id(id)
local itemw8 = cobj and cobj:weight() or 0
childw8 = childw8 + itemw8
end
end
cell_item.flags.totalw8 = ((childw8 > 0) and (childw8 + objw8)) or false
end
end
function update_weight_display(info_item, flags)
if flags and flags.totalw8 then
info_item.weight:SetText(round_100(flags.totalw8) .. " " .. game.translate_string("st_kg") .. " " .. game.translate_string("st_tw8_total"))
end
end
function on_game_start()
Base_Add_Counter = utils_ui.UICellItem.Add_Counter
utils_ui.UICellItem.Add_Counter = Ishy_Add_Counter
Base_Item_Update = utils_ui.UIInfoItem.Update
utils_ui.UIInfoItem.Update = Ishy_Item_Update
end
@@ -0,0 +1,21 @@
-- SkinningWithSpace - Nitpicker's Modpack
-- Last modified: 2022.04.10
-- https://github.com/Ishmaeel/NitpickerModpack
function Ishy_OnKeyboard(sender, dik, keyboard_action)
local res = CUIScriptWnd.OnKeyboard(sender, dik, keyboard_action)
if (res == false) then
sender.CC:OnKeyboard(dik, keyboard_action)
if (dik == DIK_keys.DIK_RETURN or dik == DIK_keys.DIK_SPACE) then
sender:OnButton_LootAll()
elseif (dik == DIK_keys.DIK_ESCAPE) then
sender:Close()
end
end
return res
end
function on_game_start()
ui_mutant_loot.UIMutantLoot.OnKeyboard = Ishy_OnKeyboard
end
@@ -0,0 +1,37 @@
-- NoInventoryCloseDisassembly - Nitpicker's Modpack
-- Last modified: 2021.07.26
-- https://github.com/Ishmaeel/NitpickerModpack
function on_game_start()
xr_effects.disable_ui_lite_with_imput = disable_ui_lite_with_imput_neu
xr_effects.disable_ui_inventory = disable_ui_inventory_neu
xr_effects.enable_ui_lite = enable_ui_lite_neu
xr_effects.enable_imput = enable_imput_neu
end
function disable_ui_lite_with_imput_neu(actor, npc)
if db.actor:is_talking() then
db.actor:stop_talk()
end
level.disable_input()
end
function disable_ui_inventory_neu(actor, npc)
-- Haha, no, that's the point!
end
function enable_ui_lite_neu(actor, npc, p)
if not p or (p and p[1] ~= "true") then
if ui_active_slot ~= 0 and db.actor:item_in_slot(ui_active_slot) ~= nil then
db.actor:activate_slot(ui_active_slot)
end
end
ui_active_slot = 0
level.enable_input()
level.show_weapon(true)
end
function enable_imput_neu(actor, npc, p)
level.enable_input()
end
@@ -0,0 +1,152 @@
-- CrashesToRiches - Nitpicker's Modpack
-- Last modified: 2021.11.08
-- https://github.com/Ishmaeel/NitpickerModpack
---@diagnostic disable: redundant-return
function xr_effects.make_a_wish(actor, npc, p)
-- ///////////////////////////////////////////////////////////////////////////////////////////////
--
-- End Find Wish Granter Storyline Task
--
-- Added by DoctorX, fixed for 1.5.1 by Ishmaeel
-- October 13, 2016
--
-- -----------------------------------------------------------------------------------------------
-- Remove on find wish granter infoportion:
disable_info("drx_sl_on_find_wish_granter")
-- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
local action_list = {}
action_list[1] = function()
local str = game.translate_string("st_zone_disappeared")
error(str, 2)
return
end
action_list[2] = function()
give_info("actor_made_wish")
give_info("actor_made_wish_for_control")
return
end
action_list[3] = function()
local sim = alife()
local function remove_this_squad(id)
local squad = id and sim:object(id)
if not (squad) then
return true
end
-- printf("DEBUG: removing squad %s from the game", squad:name())
SIMBOARD:assign_squad_to_smart(squad, nil)
squad:remove_squad()
return true
end
local squad
for i = 1, 65534 do
squad = sim:object(i)
if (squad and squad:clsid() == clsid.online_offline_group_s) then
CreateTimeEvent("remove_this_squad", squad.id, math.random(1, 10), remove_this_squad, squad.id)
end
end
give_info("actor_made_wish_for_peace")
give_info("actor_made_wish")
return
end
action_list[4] = function()
local sim = alife()
local s_find = string.find
local ltx = ini_file("plugins\\spawner_blacklist.ltx")
local pos = db.actor:position()
local lid = db.actor:level_vertex_id()
local gid = db.actor:game_vertex_id()
ini_sys:section_for_each(function(section)
if s_find(section, "_old$") or s_find(section, "^mp_") or s_find(section, "_script_") then
-- printf("! no, not a %s!", section)
return
end
local weight = ini_sys:r_float_ex(section, "inv_weight")
if (weight and not ltx:line_exist("ignore_sections", section)) then
local x = ini_sys:r_float_ex(section, "inv_grid_x")
local y = ini_sys:r_float_ex(section, "inv_grid_y")
if (x and x ~= 0) and (y and y ~= 0) then
sim:create(section, pos, lid, gid, AC_ID)
end
end
end)
local function iterate_func(obj)
if (obj and obj:section()) then
printf("near: %s", obj:section())
if obj:section() == "inv_backpack" then
for i = 1, 65535 do
local se_obj = sim:object(i)
if se_obj and (not simulation_objects.is_on_the_actor_level(se_obj)) then
alife():teleport_object(obj:id(), se_obj.m_game_vertex_id, se_obj.m_level_vertex_id, se_obj.position)
break
end
end
end
end
end
level.iterate_nearest(pos, 15, iterate_func)
local function remove_backpack(id)
local function itr(npc, itm)
if (itm:section() == "itm_actor_backpack" or itm:section() == "itm_backpack") then
alife_release_id(itm:id())
return
end
end
db.actor:iterate_inventory(itr, db.actor)
return true
end
CreateTimeEvent(0, "remove_backpack", 1, remove_backpack, 0)
give_info("actor_made_wish_for_riches")
give_info("actor_made_wish")
return
end
action_list[5] = function()
local se_actor = alife():actor()
local data = utils_stpk.get_actor_data(se_actor)
if (data) then
data.specific_character = "actor_zombied"
utils_stpk.set_actor_data(data, se_actor)
end
set_actor_true_community("zombied")
give_info("actor_made_wish_immortal")
give_info("actor_made_wish")
-- Teleports the player to a smashed open grave in the Great Swamp.
-- Goodwill is increased with the Monolith and Zombified faction to ensure they aren't hostile.
inc_faction_goodwill_to_actor(db.actor, nil, {"monolith", 5000})
inc_faction_goodwill_to_actor(db.actor, nil, {"zombied", 5000})
ChangeLevel(vector():set(266.99, 0.00, -131.07), 310937, 181, VEC_ZERO)
return
end
-- Hide and disable the immortality wish if actor is in Zombified or Monolith factions.
if (character_community(db.actor) == "actor_zombied" or character_community(db.actor) == "actor_monolith") then
action_list[5] = nil
ui_dyn_msg_box.multi_choice(action_list, "st_wish_1", "st_wish_2", "st_wish_3", "st_wish_4", "st_wish_99")
else
ui_dyn_msg_box.multi_choice(action_list, "st_wish_1", "st_wish_2", "st_wish_3", "st_wish_4", "st_wish_5", "st_wish_99")
end
end