Added Some Mods; Updated Starting Loadout

This commit is contained in:
2024-03-20 02:23:24 -04:00
parent 57e0746fe6
commit 7f0caa168b
496 changed files with 52772 additions and 125 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,474 @@
---remove spawn zaton_mercenary_1_squad
local HI = has_alife_info
local GI = give_info
local DI = disable_info
function NI(str)
return not (has_alife_info(str))
end
local spawn_squad = dialogs_brotherhood.spawn_squad
------- GENERAL Functions --------
function actor_on_first_update()
marlo_stanfield_init()
chris_partlow_init()
---flavio_becca_init()
---nr_ecologist_rydzyk_init()
---nr_ecologist_1_init()
---nr_ecologist_2_init()
---nr_ecologist_3_init()
vybegallo_init()
sasha_tolstoy_init()
bellerophon_init()
---erast_fandorin_init()
---ac_pri_medic_monolith_init()
end
function on_game_start()
RegisterScriptCallback("actor_on_first_update",actor_on_first_update)
RegisterScriptCallback("npc_on_net_spawn", npc_on_net_spawn_1)
RegisterScriptCallback("npc_on_net_spawn", npc_on_net_spawn_2)
RegisterScriptCallback("npc_on_net_spawn", npc_on_net_spawn_3)
RegisterScriptCallback("npc_on_net_spawn", npc_on_net_spawn_4)
RegisterScriptCallback("npc_on_net_spawn", npc_on_net_spawn_5)
RegisterScriptCallback("npc_on_net_spawn", npc_on_net_spawn_6)
RegisterScriptCallback("npc_on_net_spawn", npc_on_net_spawn_7)
end
function ac_pri_medic_monolith_init()
if (NI("ac_pri_medic_monolith_init")) then
local pos_1 = vector():set( -14.302313804626,0.84455877542496,198.07749938965 )
if not (get_story_se_object("ac_pri_medic_monolith_squad")) then
local se_squad = spawn_squad("ac_pri_medic_monolith_squad", pos_1, 85652, 2985)
end
if (get_story_se_object("ac_pri_medic_monolith_squad")) then
GI("ac_pri_medic_monolith_init")
end
end
end
function marlo_stanfield_init()
if HI("bar_deactivate_radar_done") then
if (NI("marlo_stanfield_init")) then
if not (get_story_se_object("marlo_stanfield")) then
local pos = vector():set( -7.0992422103882,23.103616714478,245.94242858887 )
local se_obj = alife_create( "marlo_stanfield", pos, 703991, 4556 )
end
if (get_story_se_object("marlo_stanfield")) then
GI("marlo_stanfield_init")
end
end
end
end
function chris_partlow_init()
if HI("bar_deactivate_radar_done") then
if (NI("chris_partlow_init")) then
if not (get_story_se_object("chris_partlow")) then
local pos = vector():set( -9.5265302658081,23.103614807129,245.18560791016 )
local se_obj = alife_create( "chris_partlow", pos, 699550, 4556 )
end
if (get_story_se_object("chris_partlow")) then
GI("chris_partlow_init")
end
end
end
end
function bellerophon_init()
if (NI("bellerophon_init")) then
if not (get_story_se_object("bellerophon_squad")) then
local smart = SIMBOARD.smarts_by_names["gar_smart_terrain_3_5"]
local squad = SIMBOARD:create_squad(smart,"bellerophon_squad")
end
if (get_story_se_object("bellerophon_squad")) then
GI("bellerophon_init")
end
end
end
function erast_fandorin_init()
if (NI("erast_fandorin_init")) then
if not (get_story_se_object("erast_fandorin_squad")) then
local smart = SIMBOARD.smarts_by_names["yan_smart_terrain_6_4"]
local squad = SIMBOARD:create_squad(smart,"erast_fandorin_squad")
end
if (get_story_se_object("erast_fandorin_squad")) then
GI("erast_fandorin_init")
end
end
end
function flavio_becca_init()
if (NI("flavio_becca_init")) then
if not (get_story_se_object("flavio_becca_squad")) then
local smart = SIMBOARD.smarts_by_names["jup_b41"]
local squad = SIMBOARD:create_squad(smart,"flavio_becca_squad")
end
if (get_story_se_object("flavio_becca_squad")) then
GI("flavio_becca_init")
end
end
end
function nr_ecologist_rydzyk_init()
if (NI("nr_ecologist_rydzyk_init")) then
if not (get_story_se_object("nr_ecologist_rydzyk_squad")) then
local smart = SIMBOARD.smarts_by_names["yan_smart_terrain_6_4"]
local squad = SIMBOARD:create_squad(smart,"nr_ecologist_rydzyk_squad")
end
if (get_story_se_object("nr_ecologist_rydzyk_squad")) then
GI("nr_ecologist_rydzyk_init")
end
end
end
function nr_ecologist_1_init()
if (NI("nr_ecologist_1_init")) then
if not (get_story_se_object("nr_ecologist_1_squad")) then
local smart = SIMBOARD.smarts_by_names["yan_smart_terrain_6_4"]
local squad = SIMBOARD:create_squad(smart,"nr_ecologist_1_squad")
end
if (get_story_se_object("nr_ecologist_1_squad")) then
GI("nr_ecologist_1_init")
end
end
end
function nr_ecologist_2_init()
if (NI("nr_ecologist_2_init")) then
if not (get_story_se_object("nr_ecologist_2_squad")) then
local smart = SIMBOARD.smarts_by_names["yan_smart_terrain_6_4"]
local squad = SIMBOARD:create_squad(smart,"nr_ecologist_2_squad")
end
if (get_story_se_object("nr_ecologist_2_squad")) then
GI("nr_ecologist_2_init")
end
end
end
function nr_ecologist_3_init()
if (NI("nr_ecologist_3_init")) then
if not (get_story_se_object("nr_ecologist_3_squad")) then
local smart = SIMBOARD.smarts_by_names["jup_b41"]
local squad = SIMBOARD:create_squad(smart,"nr_ecologist_3_squad")
end
if (get_story_se_object("nr_ecologist_3_squad")) then
GI("nr_ecologist_3_init")
end
end
end
function sasha_tolstoy_init()
if (NI("sasha_tolstoy_init")) then
if not (get_story_se_object("sasha_tolstoy_squad")) then
local smart = SIMBOARD.smarts_by_names["mar_smart_terrain_base"]
local squad = SIMBOARD:create_squad(smart,"sasha_tolstoy_squad")
end
if (get_story_se_object("sasha_tolstoy_squad")) then
GI("sasha_tolstoy_init")
end
end
end
function vybegallo_init()
if (NI("vybegallo_init")) then
if not (get_story_se_object("vybegallo_squad")) then
local smart = SIMBOARD.smarts_by_names["agr_smart_terrain_4_4"]
local squad = SIMBOARD:create_squad(smart,"vybegallo_squad")
end
if (get_story_se_object("vybegallo_squad")) then
GI("vybegallo_init")
end
end
end
function zaton_mercenary_1_init()
if (NI("zaton_mercenary_1_init")) then
if not (get_story_se_object("zaton_mercenary_1_squad")) then
local smart = SIMBOARD.smarts_by_names["zat_b40_smart_terrain"]
local squad = SIMBOARD:create_squad(smart,"zaton_mercenary_1_squad")
end
if (get_story_se_object("zaton_mercenary_1_squad")) then
GI("zaton_mercenary_1_init")
end
end
end
function npc_on_net_spawn_1(npc,se_obj)
local chris_partlow = get_story_object("chris_partlow")
if chris_partlow and npc:id() == chris_partlow:id() then
setup_npc_logic_brotherhood_1()
end
end
function npc_on_net_spawn_2(npc,se_obj)
local marlo_stanfield = get_story_object("marlo_stanfield")
if marlo_stanfield and npc:id() == marlo_stanfield:id() then
setup_npc_logic_brotherhood_2()
end
end
function setup_npc_logic_brotherhood_1()
local npc = get_story_object("chris_partlow")
npc:give_info_portion("npc_not_move")
local ltx_name = "scripts\\brotherhood_npc_control_chris.ltx"
local ltx = ini_file(ltx_name)
if not (ltx) then
log("ERROR: do not have access to scripts\\brotherhood_npc_control_chris.ltx! Make sure you installed properly!")
return
end
local id = npc:id()
local sim = alife()
local se_npc = sim:object(id)
local unreg_id = se_npc and se_npc.m_smart_terrain_id
if (unreg_id and unreg_id ~= 65535) then
local unreg = sim:object(unreg_id)
if (unreg) then
unreg:unregister_npc(se_npc)
end
end
xr_logic.configure_schemes(npc, ltx, ltx_name, modules.stype_stalker, loaded and st.loaded_section_logic or "logic", "")
local section = loaded and st.loaded_active_section or xr_logic.determine_section_to_activate(npc, ltx, "logic", db.actor)
xr_logic.activate_by_section(npc, ltx, section, "", loaded)
--printf("setup complete")
end
function setup_npc_logic_brotherhood_2()
local npc = get_story_object("marlo_stanfield")
npc:give_info_portion("npc_not_move")
local ltx_name = "scripts\\brotherhood_npc_control_marlo.ltx"
local ltx = ini_file(ltx_name)
if not (ltx) then
log("ERROR: do not have access to scripts\\brotherhood_npc_control.ltx! Make sure you installed properly!")
return
end
local id = npc:id()
local sim = alife()
local se_npc = sim:object(id)
local unreg_id = se_npc and se_npc.m_smart_terrain_id
if (unreg_id and unreg_id ~= 65535) then
local unreg = sim:object(unreg_id)
if (unreg) then
unreg:unregister_npc(se_npc)
end
end
xr_logic.configure_schemes(npc, ltx, ltx_name, modules.stype_stalker, loaded and st.loaded_section_logic or "logic", "")
local section = loaded and st.loaded_active_section or xr_logic.determine_section_to_activate(npc, ltx, "logic", db.actor)
xr_logic.activate_by_section(npc, ltx, section, "", loaded)
--printf("setup complete")
end
function npc_on_net_spawn_3(npc,se_obj)
local nr_ambush_1 = get_story_object("nr_ambush_1")
if nr_ambush_1 and npc:id() == nr_ambush_1:id() then
setup_nr_ambush_logic_brotherhood_1()
end
end
function npc_on_net_spawn_4(npc,se_obj)
local nr_ambush_2 = get_story_object("nr_ambush_2")
if nr_ambush_2 and npc:id() == nr_ambush_2:id() then
setup_nr_ambush_logic_brotherhood_2()
end
end
function npc_on_net_spawn_5(npc,se_obj)
local nr_ambush_3 = get_story_object("nr_ambush_3")
if nr_ambush_3 and npc:id() == nr_ambush_3:id() then
setup_nr_ambush_logic_brotherhood_3()
end
end
function npc_on_net_spawn_6(npc,se_obj)
local nr_ambush_4 = get_story_object("nr_ambush_4")
if nr_ambush_4 and npc:id() == nr_ambush_4:id() then
setup_nr_ambush_logic_brotherhood_4()
end
end
function npc_on_net_spawn_7(npc,se_obj)
local nr_ambush_5 = get_story_object("nr_ambush_5")
if nr_ambush_5 and npc:id() == nr_ambush_5:id() then
setup_nr_ambush_logic_brotherhood_5()
end
end
function setup_nr_ambush_logic_brotherhood_1()
local npc = get_story_object("nr_ambush_1")
npc:give_info_portion("npc_not_move")
local ltx_name = "scripts\\brotherhood\\brotherhood_npc_nr_ambush_logic_1.ltx"
local ltx = ini_file(ltx_name)
if not (ltx) then
log("ERROR: do not have access to scripts\\brotherhood\\brotherhood_npc_nr_ambush_logic_1! Make sure you installed properly!")
return
end
local id = npc:id()
local sim = alife()
local se_npc = sim:object(id)
local unreg_id = se_npc and se_npc.m_smart_terrain_id
if (unreg_id and unreg_id ~= 65535) then
local unreg = sim:object(unreg_id)
if (unreg) then
unreg:unregister_npc(se_npc)
end
end
xr_logic.configure_schemes(npc, ltx, ltx_name, modules.stype_stalker, loaded and st.loaded_section_logic or "logic", "")
local section = loaded and st.loaded_active_section or xr_logic.determine_section_to_activate(npc, ltx, "logic", db.actor)
xr_logic.activate_by_section(npc, ltx, section, "", loaded)
--printf("setup complete")
end
function setup_nr_ambush_logic_brotherhood_2()
local npc = get_story_object("nr_ambush_2")
npc:give_info_portion("npc_not_move")
local ltx_name = "scripts\\brotherhood\\brotherhood_npc_nr_ambush_logic_2.ltx"
local ltx = ini_file(ltx_name)
if not (ltx) then
log("ERROR: do not have access to scripts\\brotherhood_npc_nr_ambush_logic.ltx! Make sure you installed properly!")
return
end
local id = npc:id()
local sim = alife()
local se_npc = sim:object(id)
local unreg_id = se_npc and se_npc.m_smart_terrain_id
if (unreg_id and unreg_id ~= 65535) then
local unreg = sim:object(unreg_id)
if (unreg) then
unreg:unregister_npc(se_npc)
end
end
xr_logic.configure_schemes(npc, ltx, ltx_name, modules.stype_stalker, loaded and st.loaded_section_logic or "logic", "")
local section = loaded and st.loaded_active_section or xr_logic.determine_section_to_activate(npc, ltx, "logic", db.actor)
xr_logic.activate_by_section(npc, ltx, section, "", loaded)
--printf("setup complete")
end
function setup_nr_ambush_logic_brotherhood_3()
local npc = get_story_object("nr_ambush_3")
npc:give_info_portion("npc_not_move")
local ltx_name = "scripts\\brotherhood\\brotherhood_npc_nr_ambush_logic_3.ltx"
local ltx = ini_file(ltx_name)
if not (ltx) then
log("ERROR: do not have access to scripts\\brotherhood_npc_nr_ambush_logic.ltx! Make sure you installed properly!")
return
end
local id = npc:id()
local sim = alife()
local se_npc = sim:object(id)
local unreg_id = se_npc and se_npc.m_smart_terrain_id
if (unreg_id and unreg_id ~= 65535) then
local unreg = sim:object(unreg_id)
if (unreg) then
unreg:unregister_npc(se_npc)
end
end
xr_logic.configure_schemes(npc, ltx, ltx_name, modules.stype_stalker, loaded and st.loaded_section_logic or "logic", "")
local section = loaded and st.loaded_active_section or xr_logic.determine_section_to_activate(npc, ltx, "logic", db.actor)
xr_logic.activate_by_section(npc, ltx, section, "", loaded)
--printf("setup complete")
end
function setup_nr_ambush_logic_brotherhood_4()
local npc = get_story_object("nr_ambush_4")
npc:give_info_portion("npc_not_move")
local ltx_name = "scripts\\brotherhood\\brotherhood_npc_nr_ambush_logic_4.ltx"
local ltx = ini_file(ltx_name)
if not (ltx) then
log("ERROR: do not have access to scripts\\brotherhood_npc_nr_ambush_logic.ltx! Make sure you installed properly!")
return
end
local id = npc:id()
local sim = alife()
local se_npc = sim:object(id)
local unreg_id = se_npc and se_npc.m_smart_terrain_id
if (unreg_id and unreg_id ~= 65535) then
local unreg = sim:object(unreg_id)
if (unreg) then
unreg:unregister_npc(se_npc)
end
end
xr_logic.configure_schemes(npc, ltx, ltx_name, modules.stype_stalker, loaded and st.loaded_section_logic or "logic", "")
local section = loaded and st.loaded_active_section or xr_logic.determine_section_to_activate(npc, ltx, "logic", db.actor)
xr_logic.activate_by_section(npc, ltx, section, "", loaded)
--printf("setup complete")
end
function setup_nr_ambush_logic_brotherhood_5()
local npc = get_story_object("nr_ambush_5")
npc:give_info_portion("npc_not_move")
local ltx_name = "scripts\\brotherhood\\brotherhood_npc_nr_ambush_logic_5.ltx"
local ltx = ini_file(ltx_name)
if not (ltx) then
log("ERROR: do not have access to scripts\\brotherhood_npc_nr_ambush_logic.ltx! Make sure you installed properly!")
return
end
local id = npc:id()
local sim = alife()
local se_npc = sim:object(id)
local unreg_id = se_npc and se_npc.m_smart_terrain_id
if (unreg_id and unreg_id ~= 65535) then
local unreg = sim:object(unreg_id)
if (unreg) then
unreg:unregister_npc(se_npc)
end
end
xr_logic.configure_schemes(npc, ltx, ltx_name, modules.stype_stalker, loaded and st.loaded_section_logic or "logic", "")
local section = loaded and st.loaded_active_section or xr_logic.determine_section_to_activate(npc, ltx, "logic", db.actor)
xr_logic.activate_by_section(npc, ltx, section, "", loaded)
--printf("setup complete")
end
@@ -0,0 +1,682 @@
--- Original Author(s) : xcvb, ComradeCatilina
--- Edited : NLTP_ASHES
--- Date : 15/05/2023
---
--- Timer script for Brotherhood. Courtesy of xcvb
-- ---------------------------------------------------------------------------------------------------------------------
-- Constants, global variables and imported functions
-- ---------------------------------------------------------------------------------------------------------------------
-- Imported functions
local HI = has_alife_info
local GI = give_info
local DI = disable_info
local NI = function(str) return not (has_alife_info(str)) end
local ctime_to_t = utils_data.CTime_to_table
local ctime_from_t = utils_data.CTime_from_table
-- Variables
local time_to_poof_1
local time_to_poof_2
local time_to_poof_3
local time_to_poof_4
local time_to_poof_5
local time_to_poof_6
local time_to_poof_7
local time_to_poof_8
local time_to_poof_9
local time_to_poof_10
local time_to_poof_11
local time_to_poof_12
local time_to_poof_13
local time_to_poof_14
local time_to_poof_15
local time_to_poof_16
local time_to_poof_17
local time_to_poof_18
local time_to_poof_19
local time_to_poof_20
local time_to_poof_21
local time_to_poof_22
local tmr_1 = 0
local tmr_2 = 0
local tmr_3 = 0
local tmr_4 = 0
local tmr_5 = 0
local tmr_6 = 0
local tmr_7 = 0
local tmr_8 = 0
local tmr_9 = 0
local tmr_10 = 0
local tmr_11 = 0
local tmr_12 = 0
local tmr_13 = 0
local tmr_14 = 0
local tmr_15 = 0
local tmr_16 = 0
local tmr_17 = 0
local tmr_18 = 0
local tmr_19 = 0
local tmr_20 = 0
local tmr_21 = 0
local tmr_22 = 0
-- ---------------------------------------------------------------------------------------------------------------------
-- General functions
-- ---------------------------------------------------------------------------------------------------------------------
-- Alyosha Karmov
-- Help 1
function alyosha_shyogolov_help_random()
if not time_to_poof_1 then
time_to_poof_1 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_1()
local poof_timer_1 = 86400
local tg = time_global()
if tg < tmr_1 then return end
tmr_1 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_1 and cur_time:diffSec(ctime_from_t(time_to_poof_1)) > poof_timer_1 then
DI("help_alyosha_shyogolov_random")
time_to_poof_1 = nil
end
end
-- What a night
-- Time 2
function create_stash_1()
if not time_to_poof_2 then
time_to_poof_2 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_2()
local poof_timer_2 = 0.5
local tg = time_global()
if tg < tmr_2 then return end
tmr_2 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_2 and cur_time:diffSec(ctime_from_t(time_to_poof_2)) > poof_timer_2 then
dialogs_brotherhood.create_stash_and_transfer_items()
dialogs_brotherhood.blackout_drink()
dialogs_brotherhood.give_what_a_night()
this.blackout_drink_time()
time_to_poof_2 = nil
end
end
-- Time 3
function blackout_drink_time()
if not time_to_poof_3 then
time_to_poof_3 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_3()
local poof_timer_3 = 1
local tg = time_global()
if tg < tmr_3 then return end
tmr_3 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_3 and cur_time:diffSec(ctime_from_t(time_to_poof_3)) > poof_timer_3 then
dialogs_brotherhood.blackout_teleportation()
time_to_poof_3 = nil
end
end
-- Time 4 and 5
-- Calydonian Boar Hunting Season
function butcher_legendary_hunting_season_1()
if not time_to_poof_7 then
time_to_poof_7 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_7()
local poof_timer_7 = math.random(4500,200000)
local tg = time_global()
if tg < tmr_7 then return end
tmr_7 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_7 and cur_time:diffSec(ctime_from_t(time_to_poof_7)) > poof_timer_7 then
news_manager.send_tip(db.actor, game.translate_string("st_butcher_legendary_hunting_season_1"), 0, "stalker", 11000, 1)
dialogs_brotherhood.give_butcher_legendary_1()
time_to_poof_7 = nil
end
end
function dolg_bloodsucker_voronin_1()
if not time_to_poof_4 then
time_to_poof_4 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_4()
local poof_timer_4 = 86400
local tg = time_global()
if tg < tmr_4 then return end
tmr_4 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_4 and cur_time:diffSec(ctime_from_t(time_to_poof_4)) > poof_timer_4 then
news_manager.send_tip(db.actor, game.translate_string("st_dolg_voronin_bloodsucker_news_0"), 0, "dolg", 11000, 1)
dialogs_brotherhood.give_meet_voronin_quest_1()
dialogs_brotherhood.spawn_artyom_bloodsucker_wounded()
GI("voronin_bloodsucker_botched_start")
time_to_poof_4 = nil
end
end
-- Dolg snitches get stitches
function dolg_bloodsucker_aspirin_1()
if not time_to_poof_5 then
time_to_poof_5 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_5()
local poof_timer_5 = 86400
local tg = time_global()
if tg < tmr_5 then return end
tmr_5 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_5 and cur_time:diffSec(ctime_from_t(time_to_poof_5)) > poof_timer_5 then
news_manager.send_tip(db.actor, game.translate_string("st_dolg_aspirin_bloodsucker_news_0"), 0, "dolg", 11000, 1)
dialogs_brotherhood.give_meet_aspirin_quest_2()
GI("meet_aspirin_snitches_stitches")
time_to_poof_5 = nil
end
end
function dolg_bloodsucker_aspirin_2()
if not time_to_poof_6 then
time_to_poof_6 = ctime_to_t(game.get_game_time())
end
end
-- Dolg Aspirin quest 2
function actor_on_update_6()
local poof_timer_6 = 86400
local tg = time_global()
if tg < tmr_6 then return end
tmr_6 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_6 and cur_time:diffSec(ctime_from_t(time_to_poof_6)) > poof_timer_6 then
news_manager.send_tip(db.actor, game.translate_string("st_dolg_aspirin_bloodsucker_news_1"), 0, "dolg", 11000, 1)
dialogs_brotherhood.give_meet_aspirin_quest_2()
time_to_poof_6 = nil
end
end
-- Vybegallo Satisfied Man
function vybegallo_help_satisfied_man()
if not time_to_poof_8 then
time_to_poof_8 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_8()
local poof_timer_8 = 86400*7
local tg = time_global()
if tg < tmr_8 then return end
tmr_8 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_8 and cur_time:diffSec(ctime_from_t(time_to_poof_8)) > poof_timer_8 then
if NI("vybegallo_dead") then
news_manager.send_tip(db.actor, game.translate_string("st_vybegallo_help_satisfied_man_info"), 0, "ecolog", 11000, 1)
dialogs_brotherhood.give_meet_vybegallo_quest()
GI("vybegallo_request_help_satisfied_man")
end
time_to_poof_8 = nil
end
end
-- Brotherhood Quest 5
function butcher_brotherhood_help()
if not time_to_poof_9 then
time_to_poof_9 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_9()
local poof_timer_9 = 86400*3
local tg = time_global()
if tg < tmr_9 then return end
tmr_9 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_9 and cur_time:diffSec(ctime_from_t(time_to_poof_9)) > poof_timer_9 then
if NI("bellerophon_dead") then
news_manager.send_tip(db.actor, game.translate_string("st_butcher_5_help_info"), 0, "stalker", 11000, 1)
dialogs_brotherhood.give_rescue_orion_quest()
dialogs_brotherhood.relocation_ilya_1()
GI("butcher_5_help")
elseif HI("bellerophon_dead") then
news_manager.send_tip(db.actor, game.translate_string("st_butcher_5_alt_help_info"), 0, "stalker", 11000, 1)
dialogs_brotherhood.give_rescue_orion_quest()
GI("butcher_5_help")
dialogs_brotherhood.spawn_sarpedon()
end
time_to_poof_9 = nil
end
end
--- Market Share Quests ---
-- An ominous invitation--
function market_share_beginning_1()
if not time_to_poof_10 then
time_to_poof_10 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_10()
local poof_timer_10 = 56400
local tg = time_global()
if tg < tmr_10 then return end
tmr_10 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_10 and cur_time:diffSec(ctime_from_t(time_to_poof_10)) > poof_timer_10 then
news_manager.send_tip(db.actor, game.translate_string("st_marlo_chris_invitation_info"), 0, "stalker", 11000, 1)
dialogs_brotherhood.give_meet_marlo_chris_quest_1()
GI("market_share_the_beginning")
time_to_poof_10 = nil
end
end
-- The courriers are on their way --
function market_share_quest_2()
if not time_to_poof_11 then
time_to_poof_11 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_11()
local poof_timer_11 = 86400
local tg = time_global()
if tg < tmr_11 then return end
tmr_11 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_11 and cur_time:diffSec(ctime_from_t(time_to_poof_11)) > poof_timer_11 then
news_manager.send_tip(db.actor, game.translate_string("st_chris_key_interception_info"), 0, "stalker", 11000, 1)
dialogs_brotherhood.give_meet_marlo_chris_quest_2()
GI("market_share_quest_2_init")
time_to_poof_11 = nil
end
end
-- The resupply is on their way --
function market_share_quest_3()
if not time_to_poof_12 then
time_to_poof_12 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_12()
local poof_timer_12 = 86400*3
local tg = time_global()
if tg < tmr_12 then return end
tmr_12 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_12 and cur_time:diffSec(ctime_from_t(time_to_poof_12)) > poof_timer_12 then
news_manager.send_tip(db.actor, game.translate_string("st_chris_asset_interception_info"), 0, "stalker", 11000, 1)
dialogs_brotherhood.give_meet_marlo_chris_quest_3()
GI("market_share_quest_3_init")
time_to_poof_12 = nil
end
end
--- Timer 13 NOT USED ---
function calydonian_boar_reinforcment_init()
if not time_to_poof_13 then
time_to_poof_13 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_13()
local poof_timer_13 = 10
local tg = time_global()
if tg < tmr_13 then return end
tmr_13 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_13 and cur_time:diffSec(ctime_from_t(time_to_poof_13)) > poof_timer_13 then
GI("calydonian_boar_reinforcment_init")
time_to_poof_13 = nil
end
end
--- Timer 14 reset Bezsonik timer
function bezsonik_init_random()
if not time_to_poof_14 then
time_to_poof_14 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_14()
local poof_timer_14 = 80000
local tg = time_global()
if tg < tmr_14 then return end
tmr_14 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_14 and cur_time:diffSec(ctime_from_t(time_to_poof_14)) > poof_timer_14 then
DI("nr_bezsonik_init_random")
time_to_poof_14 = nil
end
end
--- Timer 15 reset Butcher Timer
function butcher_troubble_init_random()
if not time_to_poof_15 then
time_to_poof_15 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_15()
local poof_timer_15 = 80000
local tg = time_global()
if tg < tmr_15 then return end
tmr_15 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_15 and cur_time:diffSec(ctime_from_t(time_to_poof_15)) > poof_timer_15 then
DI("butcher_troubble_init_random")
time_to_poof_15 = nil
end
end
--- Timer 16 reset Gutalin Timer
function meet_gutalin_init_random()
if not time_to_poof_16 then
time_to_poof_16 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_16()
local poof_timer_16 = 80000
local tg = time_global()
if tg < tmr_16 then return end
tmr_16 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_16 and cur_time:diffSec(ctime_from_t(time_to_poof_16)) > poof_timer_16 then
DI("meet_gutalin_init_random")
time_to_poof_16 = nil
end
end
--- Timer 17 Trapper Chimera 2 recroding
function trapper_chimera_2_recording()
if not time_to_poof_17 then
time_to_poof_17 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_17()
local poof_timer_17 = 100
local tg = time_global()
if tg < tmr_17 then return end
tmr_17 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_17 and cur_time:diffSec(ctime_from_t(time_to_poof_17)) > poof_timer_17 then
GI("trapper_chimera_2_recording_done")
time_to_poof_17 = nil
end
end
--- Timer 18 Calydonian Boar spawns
function butcher_calydonian_init()
if not time_to_poof_18 then
time_to_poof_18 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_18()
local poof_timer_18 = math.random(50000,100000)
local tg = time_global()
if tg < tmr_18 then return end
tmr_18 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_18 and cur_time:diffSec(ctime_from_t(time_to_poof_18)) > poof_timer_18 then
GI("butcher_calydonian_init")
news_manager.send_tip(db.actor, game.translate_string("st_butcher_legendary_hunting_season_1"), 0, "stalker", 11000, 1)
news_manager.send_tip(db.actor, game.translate_string("st_butcher_legendary_hunting_season_2"), 5, "stalker", 11000, 1)
news_manager.send_tip(db.actor, game.translate_string("st_butcher_legendary_hunting_season_3"), 10, "stalker", 11000, 1)
news_manager.send_tip(db.actor, game.translate_string("st_butcher_legendary_hunting_season_4"), 15, "stalker", 11000, 1)
time_to_poof_18 = nil
end
end
---- reset Controller Ambush random event
function nr_primakov_random()
if not time_to_poof_19 then
time_to_poof_19 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_19()
local poof_timer_19 = 24000
local tg = time_global()
if tg < tmr_19 then return end
tmr_19 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_19 and cur_time:diffSec(ctime_from_t(time_to_poof_19)) > poof_timer_19 then
DI("nr_primankov_random")
time_to_poof_19 = nil
end
end
---- Shlitzer 1 Fail
function bh_shlitzer_fail_1()
if not time_to_poof_20 then
time_to_poof_20 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_20()
local poof_timer_20 = 518400
local tg = time_global()
if tg < tmr_20 then return end
tmr_20 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_20 and cur_time:diffSec(ctime_from_t(time_to_poof_20)) > poof_timer_20 then
if NI("bh_badger_smuggling_transfer_done") then
GI("bh_shlitzer_fail_1")
end
time_to_poof_20 = nil
end
end
--- Baltun random reset
function nr_baltunov_init_random()
if not time_to_poof_21 then
time_to_poof_21 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_21()
local poof_timer_21 = 24000
local tg = time_global()
if tg < tmr_21 then return end
tmr_21 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_21 and cur_time:diffSec(ctime_from_t(time_to_poof_21)) > poof_timer_21 then
DI("nr_baltunov_init_random")
time_to_poof_21 = nil
end
end
--- Murdered Starik random reset
function nr_starik_1_init_random()
if not time_to_poof_22 then
time_to_poof_22 = ctime_to_t(game.get_game_time())
end
end
function actor_on_update_22()
local poof_timer_22 = 24000
local tg = time_global()
if tg < tmr_22 then return end
tmr_22 = tg + 1000
local cur_time = game.get_game_time()
if time_to_poof_22 and cur_time:diffSec(ctime_from_t(time_to_poof_22)) > poof_timer_22 then
DI("nr_starik_1_init_random")
time_to_poof_22 = nil
end
end
-- ---------------------------------------------------------------------------------------------------------------------
-- Data persistence
-- ---------------------------------------------------------------------------------------------------------------------
--- Function used to store information in the save file.
--- @param m_data table
--- @return nil
function save_state(m_data)
m_data.time_to_poof_1 = time_to_poof_1
m_data.time_to_poof_2 = time_to_poof_2
m_data.time_to_poof_3 = time_to_poof_3
m_data.time_to_poof_4 = time_to_poof_4
m_data.time_to_poof_5 = time_to_poof_5
m_data.time_to_poof_6 = time_to_poof_6
m_data.time_to_poof_7 = time_to_poof_7
m_data.time_to_poof_8 = time_to_poof_8
m_data.time_to_poof_9 = time_to_poof_9
m_data.time_to_poof_10 = time_to_poof_10
m_data.time_to_poof_11 = time_to_poof_11
m_data.time_to_poof_12 = time_to_poof_12
m_data.time_to_poof_13 = time_to_poof_13
m_data.time_to_poof_14 = time_to_poof_14
m_data.time_to_poof_15 = time_to_poof_15
m_data.time_to_poof_16 = time_to_poof_16
m_data.time_to_poof_17 = time_to_poof_17
m_data.time_to_poof_18 = time_to_poof_18
m_data.time_to_poof_19 = time_to_poof_19
m_data.time_to_poof_20 = time_to_poof_20
m_data.time_to_poof_21 = time_to_poof_21
m_data.time_to_poof_22 = time_to_poof_22
end
--- Function used to load information stored in the save file.
--- @param m_data table
--- @return nil
function load_state(m_data)
time_to_poof_1 = m_data.time_to_poof_1
time_to_poof_2 = m_data.time_to_poof_2
time_to_poof_3 = m_data.time_to_poof_3
time_to_poof_4 = m_data.time_to_poof_4
time_to_poof_5 = m_data.time_to_poof_5
time_to_poof_6 = m_data.time_to_poof_6
time_to_poof_7 = m_data.time_to_poof_7
time_to_poof_8 = m_data.time_to_poof_8
time_to_poof_9 = m_data.time_to_poof_9
time_to_poof_10 = m_data.time_to_poof_10
time_to_poof_11 = m_data.time_to_poof_11
time_to_poof_12 = m_data.time_to_poof_12
time_to_poof_13 = m_data.time_to_poof_13
time_to_poof_14 = m_data.time_to_poof_14
time_to_poof_15 = m_data.time_to_poof_15
time_to_poof_16 = m_data.time_to_poof_16
time_to_poof_17 = m_data.time_to_poof_17
time_to_poof_18 = m_data.time_to_poof_18
time_to_poof_19 = m_data.time_to_poof_19
time_to_poof_20 = m_data.time_to_poof_20
time_to_poof_21 = m_data.time_to_poof_21
time_to_poof_22 = m_data.time_to_poof_22
end
-- ---------------------------------------------------------------------------------------------------------------------
-- Callbacks registration
-- ---------------------------------------------------------------------------------------------------------------------
--- Function used to register callbacks.
--- @return nil
function on_game_start()
RegisterScriptCallback("save_state", save_state)
RegisterScriptCallback("load_state", load_state)
RegisterScriptCallback("actor_on_update", actor_on_update_1)
RegisterScriptCallback("actor_on_update", actor_on_update_2)
RegisterScriptCallback("actor_on_update", actor_on_update_3)
RegisterScriptCallback("actor_on_update", actor_on_update_4)
RegisterScriptCallback("actor_on_update", actor_on_update_5)
RegisterScriptCallback("actor_on_update", actor_on_update_6)
RegisterScriptCallback("actor_on_update", actor_on_update_7)
RegisterScriptCallback("actor_on_update", actor_on_update_8)
RegisterScriptCallback("actor_on_update", actor_on_update_9)
RegisterScriptCallback("actor_on_update", actor_on_update_10)
RegisterScriptCallback("actor_on_update", actor_on_update_11)
RegisterScriptCallback("actor_on_update", actor_on_update_12)
RegisterScriptCallback("actor_on_update", actor_on_update_13)
RegisterScriptCallback("actor_on_update", actor_on_update_14)
RegisterScriptCallback("actor_on_update", actor_on_update_15)
RegisterScriptCallback("actor_on_update", actor_on_update_16)
RegisterScriptCallback("actor_on_update", actor_on_update_17)
RegisterScriptCallback("actor_on_update", actor_on_update_18)
RegisterScriptCallback("actor_on_update", actor_on_update_19)
RegisterScriptCallback("actor_on_update", actor_on_update_20)
end
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,151 @@
------- GENERAL Functions --------
local HI = has_alife_info
local GI = give_info
local DI = disable_info
function NI(str)
return not (has_alife_info(str))
end
local spawn_squad = dialogs_brotherhood.spawn_squad
function give_task(name)
task_manager.get_task_manager():give_task(name)
end
--- money conditions and effects
function transfer_money_to_actor_4000(first_speaker, second_speaker)
dialogs.relocate_money_to_actor(first_speaker, second_speaker, 4000)
end
--- time conditions and effects
function set_time_after_22h()
local hrs = level.get_time_hours()
local zeit = (22 - hrs)
if hrs > 0 and hrs < 22 then
level.change_game_time(0,zeit,0)
end
end
function is_it_night_22_3_yes()
local hrs = level.get_time_hours()
if (hrs >= 22) or (hrs < 3) then
return true
end
return false
end
function is_it_night_22_3_no()
local hrs = level.get_time_hours()
if (hrs >= 22) or (hrs < 3) then
return false
end
return true
end
-------Stories from the Zone --------
function give_task_father_charon_quest_1()
dialogs_brotherhood_ac.give_task('give_task_father_charon_quest_1')
end
function spawn_ac_blue_winter_init()
if (NI("ac_blue_winter_init")) then
local pos_1 = vector():set( -13.764570236206,0.84513801336288,201.52365112305 )
if not (get_story_se_object("ac_blue_winter_squad")) then
local se_squad = spawn_squad("ac_blue_winter_squad", pos_1, 85657, 2985)
end
if (get_story_se_object("ac_blue_winter_squad")) then
GI("ac_blue_winter_init")
end
end
end
function spawn_ac_balthazar_init()
if (NI("ac_balthazar_init")) then
local pos_1 = vector():set( -14.980568885803,0.84502762556076,204.65113830566 )
if not (get_story_se_object("ac_balthazar_squad")) then
local se_squad = spawn_squad("ac_balthazar_squad", pos_1, 84928, 2985)
end
if (get_story_se_object("ac_balthazar_squad")) then
GI("ac_balthazar_init")
end
end
end
function give_task_blue_winter_quest_1()
dialogs_brotherhood_ac.give_task('give_task_blue_winter_quest_1')
end
function set_ac_blue_winter_and_balthazar_as_companion_1(a,b)
local squad = get_story_squad("ac_blue_winter_squad")
local squad_2 = get_story_squad("ac_balthazar_squad")
axr_companions.add_special_squad(squad)
axr_companions.add_special_squad(squad_2)
end
function ac_spawn_pri_a25_guards()
local smart = SIMBOARD.smarts_by_names["pri_a25_smart_terrain"]
local squad_1 = SIMBOARD:create_squad(smart,"pri_ac_a25_guard_1")
end
function dismiss_ac_blue_winter_and_balthazar_as_companion_1(a,b)
local squad = get_story_squad("ac_blue_winter_squad")
local squad_2 = get_story_squad("ac_balthazar_squad")
axr_companions.dismiss_special_squad(squad)
axr_companions.dismiss_special_squad(squad_2)
end
function give_task_blue_winter_quest_3()
dialogs_brotherhood_ac.give_task('give_task_blue_winter_quest_3')
end
function ac_task_3_blue_winter_relocation()
local squad = get_story_se_object("ac_blue_winter_squad")
local pos = vector():set( -131.57495117188,-0.50764739513397,-199.29406738281 )
if (pos and squad) then
TeleportSquad(squad,pos,67093,4888)
GI("relocated_ac_task_3_blue_winter")
GI("ac_task_3_active")
end
end
function ac_task_3_balthazar_relocation()
local squad = get_story_se_object("ac_balthazar_squad")
local pos = vector():set( -138.35227966309,-0.25803527235985,-211.60403442383 )
if (pos and squad) then
TeleportSquad(squad,pos,61814,4888)
GI("relocated_ac_task_3_balthazar")
GI("ac_task_3_active")
end
end
function ac_task_3_melchior_relocation()
local squad = get_story_se_object("ac_melchior_squad")
local pos = vector():set( -139.3289642334,-0.42204529047012,-204.6999206543 )
if (pos and squad) then
TeleportSquad(squad,pos,61274,4888)
GI("relocated_ac_task_3_melchior")
GI("ac_task_3_active")
end
end
function ac_task_3_caspar_relocation()
local squad = get_story_se_object("ac_caspar_squad")
local pos = vector():set( -135.96295166016,-0.37012958526611,-198.35459899902 )
if (pos and squad) then
TeleportSquad(squad,pos,63912,4888)
GI("relocated_ac_task_3_caspar")
GI("ac_task_3_active")
end
end
@@ -0,0 +1,49 @@
---Custom parts inject for Brotherhood
cached_r_string_ex = itms_manager.ini_parts.r_string_ex
cached_parse_list = _G.parse_list
parts_custom = {}
parts_custom_ini = {
["nor_parts_list"] = ini_file_ex("items\\settings\\parts_brotherhood.ltx")
}
itms_manager.ini_parts.r_string_ex = function(self, s, k)
--printf("Override [%s] [%s]", s, k)
return parts_custom[s] and parts_custom[s][k] or cached_r_string_ex(self, s, k)
end
_G.parse_list = function(ini, key, val, convert)
if parts_custom[key] then
--printf("Override [%s] [%s]", key, val)
local str = parts_custom[key][val]
local t = str and str ~= "" and str_explode(str,",") or {}
if (convert and #t > 0) then
local l = {}
for i=1,#t do
l[t[i]] = true
end
return l
end
return t
end
return cached_parse_list(ini, key, val, convert)
end
function collect_parts(ini, t)
local sections = ini:get_sections()
parts_custom[t] = {}
for _, section in pairs(sections) do
--printf("Section: [%s]", section)
local _section = ini:collect_section(section)
for k, v in pairs(_section) do
--printf("Inserted into [%s]: [%s], [%s]", t, k, v)
parts_custom[t][k] = v
end
end
end
function on_game_start()
for section, ini in pairs(parts_custom_ini) do
collect_parts(ini, section)
end
end
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,334 @@
------- GENERAL Functions --------
local HI = has_alife_info
local GI = give_info
local DI = disable_info
local spawn_squad = dialogs_brotherhood.spawn_squad
function NI(str)
return not (has_alife_info(str))
end
function on_game_start()
RegisterScriptCallback("actor_on_update",actor_on_update)
RegisterScriptCallback("actor_on_first_update",actor_on_first_update)
end
function actor_on_update()
end
function actor_on_first_update()
---atomic_crusader_start()
end
function atomic_crusader_start()
if NI("atomic_crusader_start") then
if get_actor_true_community() == "monolith" then
GI("atomic_crusader_start")
dialogs_brotherhood_ac.give_task_father_charon_quest_1()
end
end
end
function task_status_functor.give_task_blue_winter_quest_1_status_f(tsk,task_id)
local pos_1 = vector():set( -94.356330871582,-0.46535187959671,-53.193744659424 ) --- caspar
local pos_2 = vector():set( -96.955108642578,-0.46410083770752,-53.258888244629 ) ---melchior
local pos_3 = vector():set( -56.787971496582,2.5227835178375,-96.418365478516 ) --- snorks 1 trigger
local pos_4 = vector():set( -50.74377822876,4.2098917961121,-101.90814208984 ) --- snorks 1
local pos_5 = vector():set( -75.341384887695,4.2088317871094,-91.308197021484 ) --- snorks 2 trigger
local pos_6 = vector():set( -80.527206420898,4.2104706764221,-105.93899536133 ) --- snorks 2
local pos_7 = vector():set( -99.864273071289,0.84025031328201,-91.754333496094 ) ---poltergeist trigger
local pos_8 = vector():set( -107.9713973999,4.2113361358643,-101.23147583008 ) ---poltergeist spawn
local npc = get_story_se_object("ac_blue_winter_squad")
local dist_1 = 7
local dist_2 = 3
local smart = SIMBOARD.smarts_by_names["pri_sim_3"]
if (tsk.stage == 0) then
if HI("ac_blue_winter_1_done") then
if level.name() == "pripyat" then
xr_effects.clear_smart_terrain(nil,nil,{"pri_a25_smart_terrain","true"})
xr_effects.clear_smart_terrain(nil,nil,{"pri_sim_9","true"})
xr_effects.clear_smart_terrain(nil,nil,{"pri_b307","true"})
xr_effects.clear_smart_terrain(nil,nil,{"pri_sim_3","true"})
xr_effects.clear_smart_terrain(nil,nil,{"pri_sim_5","true"})
xr_effects.clear_smart_terrain(nil,nil,{"pri_sim_7","true"})
xr_effects.clear_smart_terrain(nil,nil,{"pri_a22_smart_terrain","true"})
tsk.stage = 1
end
end
end
if (tsk.stage == 1) then
if NI("ac_melchior_caspar_spawn_init") then
local squad_1 = SIMBOARD:create_squad(smart,"ac_caspar_squad")
local squad_2 = SIMBOARD:create_squad(smart,"ac_melchior_squad")
GI("ac_melchior_caspar_spawn_init")
tsk.stage = 2
end
end
if (tsk.stage == 2) then
if npc and (npc.position:distance_to(pos_2) < dist_1) then
if NI("st_ac_task_1_init") then
actor_menu.set_msg(1, game.translate_string("st_ac_task_1_0"), 10)
CreateTimeEvent("st_ac_task_1_init_1","st_ac_task_1_init_1", 4,st_ac_task_1_init_1)
CreateTimeEvent("st_ac_task_1_init_2","st_ac_task_1_init_2", 8,st_ac_task_1_init_2)
CreateTimeEvent("st_ac_task_1_init_3","st_ac_task_1_init_3", 12,st_ac_task_1_init_3)
CreateTimeEvent("st_ac_task_1_init_4","st_ac_task_1_init_4", 16,st_ac_task_1_init_4)
CreateTimeEvent("st_ac_task_1_init_5","st_ac_task_1_init_5", 20,st_ac_task_1_init_5)
CreateTimeEvent("st_ac_task_1_init_6","st_ac_task_1_init_6", 24,st_ac_task_1_init_6)
GI("st_ac_task_1_init")
tsk.stage = 3
end
end
end
if (tsk.stage == 3) then
if HI("ac_blue_winter_task_1_stage_3") then
if (db.actor:position():distance_to(pos_3) < dist_2) then
if NI("ac_blue_winter_task_1_spawn_init_1") then
local se_squad_3 = spawn_squad("pack_ac_snorks_1", pos_4, 138716, 4947)
local se_squad_4 = spawn_squad("ac_pri_a25_poltergeist_1_squad", pos_8, 85234, 4948)
GI("ac_blue_winter_task_1_spawn_init_1")
end
end
if (db.actor:position():distance_to(pos_5) < dist_2) then
if NI("ac_blue_winter_task_1_spawn_init_2") then
local se_squad_5 = spawn_squad("pack_ac_snorks_2", pos_6, 109339, 4948)
GI("ac_blue_winter_task_1_spawn_init_2")
end
end
if HI("ac_blue_winter_task_1_spawn_init_2") and HI("ac_blue_winter_task_1_spawn_init_1") then
tsk.stage = 4
end
end
end
if (tsk.stage == 4) then
if HI("pack_ac_snorks_1_dead") and HI("pack_ac_snorks_2_dead") and HI("ac_pri_a25_poltergeist_1_squad_dead") then
GI("ac_task_1_everyone_dead")
end
end
end
function st_ac_task_1_init_1()
actor_menu.set_msg(1, game.translate_string("st_ac_task_1_1"), 10)
return true
end
function st_ac_task_1_init_2()
actor_menu.set_msg(1, game.translate_string("st_ac_task_1_2"), 10)
return true
end
function st_ac_task_1_init_3()
actor_menu.set_msg(1, game.translate_string("st_ac_task_1_3"), 10)
return true
end
function st_ac_task_1_init_4()
actor_menu.set_msg(1,string.format(game.translate_string("st_ac_task_1_4"), alife():actor():character_name()), 10)
return true
end
function st_ac_task_1_init_5()
actor_menu.set_msg(1, string.format(game.translate_string("st_ac_task_1_5"), alife():actor():character_name()), 10)
GI("ac_blue_winter_task_1_stage_3")
return true
end
function st_ac_task_1_init_6()
actor_menu.set_msg(1, game.translate_string("st_ac_task_1_6"), 10)
return true
end
function task_status_functor.give_task_blue_winter_quest_1_status_f(tsk,task_id)
local pos_1 = vector():set( 65.763290405273,14.580019950867,-133.64477539063 ) --- trigger
local pos_2 = vector():set( 49.821727752686,-0.49124795198441,-177.17810058594 ) --- path 1
local pos_3 = vector():set( -7.3301563262939,-0.17000591754913,-182.1794128418 ) --- path 2
local pos_4 = vector():set( 141.32060241699,-0.096420645713806,-176.77297973633 ) --- spawn squad
local pos_5 = vector():set( -100.89275360107,0.4929051399231,-246.49229431152 ) --- destination
local pos_6 = vector():set( -116.92031860352,-7.8898968696594,-232.40341186523 ) --- trigger assault
local pos_7 = vector():set( -99.864273071289,0.84025031328201,-91.754333496094 ) ---poltergeist trigger
local pos_8 = vector():set( -107.9713973999,4.2113361358643,-101.23147583008 ) ---poltergeist spawn
local dist_1 = 3
local dist_2 = 5
local dist_3 = 20
local dist_4 = 10
local npc = get_story_se_object("ac_task_3_stalker_squad")
local name = alife():actor():character_name()
local se = strformat("%s",name)
local squad = get_story_se_object("ac_blue_winter_squad")
local commander_id = squad and squad:commander_id()
local commander = commander_id and db.storage[commander_id] and db.storage[commander_id].object
local squad_2 = get_story_se_object("ac_melchior_squad")
local commander_id_2 = squad_2 and squad_2:commander_id()
local commander_2 = commander_id_2 and db.storage[commander_id_2] and db.storage[commander_id_2].object
if (tsk.stage == 0) then
if NI("ac_task_3_smart_clear") then
xr_effects.clear_smart_terrain(nil,nil,{"pri_a28_shop","true"})
xr_effects.clear_smart_terrain(nil,nil,{"pri_a28_base","true"})
xr_effects.clear_smart_terrain(nil,nil,{"pri_a15","true"})
xr_effects.clear_smart_terrain(nil,nil,{"pri_b305_dogs","true"})
xr_effects.clear_smart_terrain(nil,nil,{"pri_b35_military","true"})
xr_effects.clear_smart_terrain(nil,nil,{"pri_b35_mercs","true"})
xr_effects.clear_smart_terrain(nil,nil,{"pri_sim_5","true"})
xr_effects.clear_smart_terrain(nil,nil,{"pri_b304_monsters_smart_terrain","true"})
GI("ac_task_3_smart_clear")
end
if (db.actor:position():distance_to(pos_1) < dist_1) then
CreateTimeEvent("ac_task_3_spawn_1","ac_task_3_spawn_1", 5,ac_task_3_spawn_init)
tsk.stage = 1
end
end
if (tsk.stage == 1) then
if HI("ac_task_3_spawn_init") then
if NI("ac_task_3_spawn_done") then
local se_squad = spawn_squad("ac_task_3_stalker_squad", pos_4, 370570, 4922)
GI("ac_task_3_spawn_done")
tsk.stage = 2
end
end
end
if (tsk.stage == 2) then
if NI("ac_task_3_sight_1") then
if npc and (npc.position:distance_to(pos_2) < dist_4) then
local actor_dir = device().cam_dir
local npc_dir = vec_sub(npc:position(),db.actor:position())
local yaw = yaw_degree3d(actor_dir, npc_dir)
if yaw < 35 then
dynamic_news_helper.send_tip(game.translate_string("st_ac_task_3_0"), se, 0, 10, db.actor:character_icon(), nil, "npc")
dynamic_news_helper.send_tip(game.translate_string("st_ac_task_3_1"), commander:character_name(), 5, 10, commander:character_icon(), nil, "npc" )
GI("ac_task_3_sight_1")
end
end
end
if npc and (npc.position:distance_to(pos_2) < dist_2) then
GI("ac_task_3_pos_2")
tsk.stage = 3
end
end
if (tsk.stage == 3) then
if NI("ac_task_3_sight_2") then
if npc and (npc.position:distance_to(pos_3) < dist_2) then
local actor_dir = device().cam_dir
local npc_dir = vec_sub(npc:position(),db.actor:position())
local yaw = yaw_degree3d(actor_dir, npc_dir)
if yaw < 35 then
dynamic_news_helper.send_tip(game.translate_string("st_ac_task_3_2"), se, 0, 10, db.actor:character_icon(), nil, "npc")
dynamic_news_helper.send_tip(game.translate_string("st_ac_task_3_3"), commander:character_name(), 5, 10, commander:character_icon(), nil, "npc" )
dynamic_news_helper.send_tip(game.translate_string("st_ac_task_3_4"), se, 10, 10, db.actor:character_icon(), nil, "npc")
dynamic_news_helper.send_tip(game.translate_string("st_ac_task_3_5"), commander:character_name(), 15, 10, commander:character_icon(), nil, "npc" )
GI("ac_task_3_sight_2")
end
end
end
if npc and (npc.position:distance_to(pos_3) < dist_2) then
GI("ac_task_3_pos_3")
tsk.stage = 4
end
end
if (tsk.stage == 4) then
if NI("ac_task_3_sight_3") then
if npc and (npc.position:distance_to(pos_5) < dist_2) then
local actor_dir = device().cam_dir
local npc_dir = vec_sub(npc:position(),db.actor:position())
local yaw = yaw_degree3d(actor_dir, npc_dir)
if yaw < 35 then
dynamic_news_helper.send_tip(game.translate_string("st_ac_task_3_6"), commander_2:character_name(), 0, 10, commander_2:character_icon(), nil, "npc" )
dynamic_news_helper.send_tip(game.translate_string("st_ac_task_3_7"), commander:character_name(), 5, 10, commander:character_icon(), nil, "npc" )
dynamic_news_helper.send_tip(string.format(game.translate_string("st_ac_task_3_8"), alife():actor():character_name()), commander:character_name(), 7, 10, commander:character_icon(), nil, "npc" )
GI("ac_task_3_sight_3")
end
end
end
if npc and (npc.position:distance_to(pos_5) < dist_3) then
GI("ac_task_3_pos_5")
tsk.stage = 5
end
end
if (tsk.stage == 5) then
CreateTimeEvent("ac_task_3_reloc_1","ac_task_3_reloc_1", 15,ac_task_3_reloc_init)
xr_effects.clear_smart_terrain(nil,nil,{"pri_a21_smart_terrain","true"})
xr_effects.clear_smart_terrain(nil,nil,{"pri_sim_8","true"})
xr_effects.clear_smart_terrain(nil,nil,{"pri_sim_11","true"})
xr_effects.clear_smart_terrain(nil,nil,{"pri_b305_dogs","true"})
xr_effects.clear_smart_terrain(nil,nil,{"pri_sim_4","true"})
xr_effects.clear_smart_terrain(nil,nil,{"pri_sim_5","true"})
tsk.stage = 6
end
if (tsk.stage == 6) then
if HI("ac_task_3_reloc_init") then
if NI("relocated_ac_task_3_blue_winter") then
dialogs_brotherhood_ac.ac_task_3_blue_winter_relocation()
end
if NI("relocated_ac_task_3_balthazar") then
dialogs_brotherhood_ac.ac_task_3_balthazar_relocation()
end
if NI("relocated_ac_task_3_melchior") then
dialogs_brotherhood_ac.ac_task_3_melchior_relocation()
end
if NI("relocated_ac_task_3_caspar") then
dialogs_brotherhood_ac.ac_task_3_caspar_relocation()
end
end
if HI("ac_task_3_convo") then
tsk.stage = 7
end
end
if (tsk.stage == 7) then
if (db.actor:position():distance_to(pos_6) < dist_1) then
if NI("ac_task_3_sight_4") then
dynamic_news_helper.send_tip(game.translate_string("st_ac_task_3_9"), se, 0, 10, db.actor:character_icon(), nil, "npc")
dynamic_news_helper.send_tip(game.translate_string("st_ac_task_3_10"), commander:character_name(), 5, 10, commander:character_icon(), nil, "npc" )
CreateTimeEvent("ac_task_3_assault_1","ac_task_3_assault_1", 5,ac_task_3_assault_init)
GI("ac_task_3_sight_4")
end
end
end
end
function ac_task_3_spawn_init()
GI("ac_task_3_spawn_init")
return true
end
function ac_task_3_reloc_init()
GI("ac_task_3_reloc_init")
return true
end
function ac_task_3_assault_init()
GI("ac_task_3_checkpoint")
return true
end
@@ -0,0 +1,32 @@
---Custom conditions for Stories from the Zone
function on_game_start()
RegisterScriptCallback("actor_on_first_update", actor_on_first_update)
end
function actor_on_first_update()
for i = 1, 65534 do
local se_obj = alife_object(i)
-- make sure its on agroprom ug level and door name matches
local lid = se_obj and game_graph():vertex(se_obj.m_game_vertex_id):level_id()
local lname_fits = lid and alife():level_name(lid) and alife():level_name(lid) == "l03u_agr_underground"
if lname_fits and se_obj:name() == "kat_physic_object_0013" then
local data = utils_stpk.get_physic_data(se_obj)
data.custom_data = [[
[collide]
ignore_static
ignore_small_objects
[logic]
cfg = scripts\brotherhood_agr_u_door_logic.ltx
]]
utils_stpk.set_physic_data(data, se_obj)
return
end
end
end
File diff suppressed because it is too large Load Diff