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,27 @@
[xcvb_arena_board]:physic_object
fixed_bones = link
visual = dynamics\arena_meshes\py_blackboard_short.ogf
[xcvb_arena_balcony]:physic_object
fixed_bones = floor
visual = dynamics\arena_meshes\metal_balcony.ogf
[arena_stalker_team_1]:online_offline_group
faction = stalker
npc_in_squad = 15
common = true
[arena_stalker_team_2]:online_offline_group
faction = stalker
npc_in_squad = 15
common = true
[arena_mutant_team_1]:online_offline_group
faction = monster
npc_in_squad = 15
common = true
[arena_mutant_team_2]:online_offline_group
faction = monster
npc_in_squad = 15
common = true
@@ -0,0 +1,6 @@
[logic]
active = ph_idle@use
[ph_idle@use]
tips = st_arena_use
on_use = %=open_arena_gui%
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="windows-1251"?>
<string_table>
<string id="st_arena_use">
<text>Open ($$ACTION_USE$$)</text>
</string>
<string id="st_arena_team1">
<text>Team 1</text>
</string>
<string id="st_arena_team2">
<text>Team 2</text>
</string>
<string id="st_arena_bet">
<text>Bet</text>
</string>
<string id="st_arena_gain">
<text>Gain</text>
</string>
<string id="st_arena_start">
<text>Start</text>
</string>
<string id="st_arena_kicked_out">
<text>You were kicked out for attacking contestants and your bet is lost.</text>
</string>
<string id="st_arena_team_1_won">
<text>Team 1 won!</text>
</string>
<string id="st_arena_team_2_won">
<text>Team 2 won!</text>
</string>
<string id="st_arena_your_reward">
<text>You won %s RU.</text>
</string>
<!-- MCM -->
<string id="ui_mcm_xcvb_arena_title">
<text>Arena DLC</text>
</string>
<string id="ui_mcm_menu_xcvb_arena">
<text>Arena DLC</text>
</string>
<string id="ui_mcm_xcvb_arena_fight_chance">
<text>Fight chance (for each time period)</text>
</string>
<string id="ui_mcm_xcvb_arena_stalker_team1_chance">
<text>Team 1 stalkers chance</text>
</string>
<string id="ui_mcm_xcvb_arena_stalker_team1_chance_desc">
<text>Chance for stalkers to appear in team 1. If roll fails - mutants will appear instead.</text>
</string>
<string id="ui_mcm_xcvb_arena_stalker_team2_chance">
<text>Team 2 stalkers chance</text>
</string>
<string id="ui_mcm_xcvb_arena_stalker_team2_chance_desc">
<text>Chance for stalkers to appear in team 2. If roll fails - mutants will appear instead.</text>
</string>
</string_table>
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="windows-1251"?>
<string_table>
<string id="st_arena_use">
<text>Îòêðûòü ($$ACTION_USE$$)</text>
</string>
<string id="st_arena_team1">
<text>Êîìàíäà 1</text>
</string>
<string id="st_arena_team2">
<text>Êîìàíäà 2</text>
</string>
<string id="st_arena_bet">
<text>Ñòàâêà</text>
</string>
<string id="st_arena_gain">
<text>Âûèãðûø</text>
</string>
<string id="st_arena_start">
<text>Íà àðåíó</text>
</string>
<string id="st_arena_kicked_out">
<text>Âàñ âûãíàëè çà íàïàäåíèå íà ó÷àñòíèêîâ è âàøà ñòàâêà ïîòåðÿíà.</text>
</string>
<string id="st_arena_team_1_won">
<text>Êîìàíäà 1 âûèãðàëà!</text>
</string>
<string id="st_arena_team_2_won">
<text>Êîìàíäà 2 âûèãðàëà!</text>
</string>
<string id="st_arena_your_reward">
<text>Âû âûèãðàëè %s ðóá.</text>
</string>
<!-- MCM -->
<string id="ui_mcm_xcvb_arena_title">
<text>Àðåíà DLC</text>
</string>
<string id="ui_mcm_menu_xcvb_arena">
<text>Àðåíà DLC</text>
</string>
<string id="ui_mcm_xcvb_arena_fight_chance">
<text>Øàíñ áîÿ (íà êàæäûé âðåìåí. ïðîìåæóòîê)</text>
</string>
<string id="ui_mcm_xcvb_arena_stalker_team1_chance">
<text>Êîìàíäà 1 ñòàëêåðû øàíñ</text>
</string>
<string id="ui_mcm_xcvb_arena_stalker_team1_chance_desc">
<text>Øàíñ íà ïîÿâëåíèå ñòàëêåðîâ â êîìàíäå 1. Åñëè áðîñîê ïðîâàëèòüñÿ - ïîÿâÿòñÿ ìóòàíòû.</text>
</string>
<string id="ui_mcm_xcvb_arena_stalker_team2_chance">
<text>Êîìàíäà 2 ñòàëêåðû øàíñ</text>
</string>
<string id="ui_mcm_xcvb_arena_stalker_team2_chance_desc">
<text>Øàíñ íà ïîÿâëåíèå ñòàëêåðîâ â êîìàíäå 2. Åñëè áðîñîê ïðîâàëèòüñÿ - ïîÿâÿòñÿ ìóòàíòû.</text>
</string>
</string_table>
@@ -0,0 +1,14 @@
<w>
<file name = "ui\xcvb_arena_bg">
<!-- Main background -->
<texture id="xcvb_arena_gui_bg" x="0" y="0" width="1093" height="688" />
<!-- Row frame -->
<texture id="xcvb_arena_gui_row_frame" x="0" y="690" width="906" height="70" />
<!-- vert line -->
<texture id="xcvb_arena_gui_row_vert_line" x="0" y="690" width="1" height="70" />
</file>
</w>
@@ -0,0 +1 @@
#include "ui\ui_xcvb_arena_16.xml"
@@ -0,0 +1,114 @@
<w>
<!-- main background -->
<bg x="100" y="40" width="820" height="688" stretch="1">
<!-- <texture r="15" g="15" b="15" a="220">none.dds</texture> -->
<texture>xcvb_arena_gui_bg</texture>
</bg>
<!-- start btn -->
<start_btn x="310" y="590" width="200" height="60" check_mode="0">
<text font="letterica18">st_arena_start</text>
<texture>ui_inGame2_Mp_bigbuttone</texture>
</start_btn>
<!-- titles -->
<title_cont x="70" y="35" width="680" height="25" stretch="1">
<title_time x="0" y="0" width="80" height="25" stretch="1">
<text complex_mode="1" r="190" g="190" b="190" vert_align="c" align="c" font="graffiti22">Time</text>
</title_time>
<title_team_1 x="80" y="0" width="180" height="25" stretch="1">
<text complex_mode="1" r="190" g="190" b="190" vert_align="c" align="c" font="graffiti22">st_arena_team1</text>
</title_team_1>
<title_team_2 x="260" y="0" width="180" height="25" stretch="1">
<text complex_mode="1" r="190" g="190" b="190" vert_align="c" align="c" font="graffiti22">st_arena_team2</text>
</title_team_2>
<title_bet x="440" y="0" width="180" height="25" stretch="1">
<text complex_mode="1" r="190" g="190" b="190" vert_align="c" align="c" font="graffiti22">st_arena_bet</text>
</title_bet>
<title_reward x="620" y="0" width="60" height="25" stretch="1">
<text complex_mode="1" r="190" g="190" b="190" vert_align="c" align="c" font="graffiti22">st_arena_gain</text>
</title_reward>
</title_cont>
<!-- row, gap 3 -->
<row_cont x="70" y="60" width="680" height="70" stretch="1">
<texture>xcvb_arena_gui_row_frame</texture>
<!-- time -->
<time x="0" y="0" width="80" height="70" stretch="1">
<text complex_mode="1" r="190" g="190" b="190" vert_align="c" align="c" font="letterica18"></text>
<texture r="40" g="40" b="0" a="0">none.dds</texture>
</time>
<!-- team 1 -->
<team_1 x="80" y="0" width="180" height="70" stretch="1">
<text complex_mode="1" r="190" g="190" b="190" vert_align="c" align="c" font="letterica18"></text>
<texture r="60" g="0" b="0" a="90">none.dds</texture>
</team_1>
<!-- team 2 -->
<team_2 x="260" y="0" width="180" height="70" stretch="1">
<text complex_mode="1" r="190" g="190" b="190" vert_align="c" align="c" font="letterica18"></text>
<texture r="0" g="60" b="60" a="90">none.dds</texture>
</team_2>
<!-- bet -->
<bet_cont x="440" y="0" width="180" height="70" stretch="1">
<!-- <texture r="0" g="60" b="0" a="140">none.dds</texture> -->
<!-- bet team1 -->
<bet_title1 x="0" y="0" width="90" height="20" stretch="1">
<text complex_mode="1" r="190" g="190" b="190" vert_align="c" align="c" font="letterica16">st_arena_team1</text>
</bet_title1>
<bet1 x="10" y="20" width="70" height="20" stretch="1">
<text complex_mode="1" r="190" g="190" b="190" vert_align="c" align="c" font="letterica18">0</text>
</bet1>
<bet_btn_min1 x="10" y="40" width="25" height="30" check_mode="0">
<texture>ui_beltbut_min</texture>
</bet_btn_min1>
<bet_btn_plus1 x="55" y="40" width="25" height="30" check_mode="0">
<texture>ui_beltbut_plus</texture>
</bet_btn_plus1>
<!-- bet team2 -->
<bet_title2 x="90" y="0" width="90" height="20" stretch="1">
<text complex_mode="1" r="190" g="190" b="190" vert_align="c" align="c" font="letterica16">st_arena_team2</text>
</bet_title2>
<bet2 x="100" y="20" width="70" height="20" stretch="1">
<text complex_mode="1" r="190" g="190" b="190" vert_align="c" align="c" font="letterica18">0</text>
</bet2>
<bet_btn_min2 x="100" y="40" width="25" height="30" check_mode="0">
<texture>ui_beltbut_min</texture>
</bet_btn_min2>
<bet_btn_plus2 x="145" y="40" width="25" height="30" check_mode="0">
<texture>ui_beltbut_plus</texture>
</bet_btn_plus2>
</bet_cont>
<!-- reward -->
<reward x="620" y="0" width="60" height="70" stretch="1">
<text complex_mode="1" r="190" g="190" b="190" vert_align="c" align="c" font="letterica18">0</text>
</reward>
</row_cont>
<!-- row vert lines -->
<vert_line1 x="80" y="0" width="1" height="70" stretch="1">
<texture>xcvb_arena_gui_row_vert_line</texture>
</vert_line1>
<vert_line2 x="440" y="0" width="1" height="70" stretch="1">
<texture>xcvb_arena_gui_row_vert_line</texture>
</vert_line2>
<vert_line3 x="620" y="0" width="1" height="70" stretch="1">
<texture>xcvb_arena_gui_row_vert_line</texture>
</vert_line3>
</w>
@@ -0,0 +1,208 @@
local squad_team_1_id
local squad_team_2_id
local HI = has_alife_info
local gt = game.translate_string
function start_arena_fight(cur_per)
-- teleport actor
local ac_pos, ac_lvid, ac_givd = xcvb_arena_utils.get_actor_arena_pos()
db.actor:set_actor_position(ac_pos, ac_lvid, ac_gvid)
db.actor:set_actor_direction(device().cam_dir:getH())
-- spawn squads
local main_t = xcvb_arena_main.arena_main_t[cur_per]
local type1 = string.find(main_t.team1[1], "sim_default") and "stalker" or "mutant"
local sec1 = "arena_" .. type1 .. "_team_1"
local pos1, lvid1, gvid1 = xcvb_arena_utils.get_team_pos(1)
local squad1 = alife_create(sec1, pos1, lvid1, gvid1)
for i, sec in ipairs(main_t.team1) do
-- this one somehow dies on alife():create() in _g
-- squad1:add_squad_member(sec, squad1.position, squad1.m_level_vertex_id, squad1.m_game_vertex_id)
squad1:add_squad_member(sec, pos1, lvid1, gvid1)
end
squad1:set_squad_relation()
squad1:refresh()
squad_team_1_id = squad1.id
local type2 = string.find(main_t.team2[1], "sim_default") and "stalker" or "mutant"
local sec2 = "arena_" .. type2 .. "_team_2"
local pos2, lvid2, gvid2 = xcvb_arena_utils.get_team_pos(2)
local squad2 = alife_create(sec2, pos2, lvid2, gvid2)
for i, sec in ipairs(main_t.team2) do
-- squad2:add_squad_member(sec, squad2.position, squad2.m_level_vertex_id, squad2.m_game_vertex_id)
squad2:add_squad_member(sec, pos2, lvid2, gvid2)
end
squad2:set_squad_relation()
squad2:refresh()
squad_team_2_id = squad2.id
-- change squad relations, hit and add "out" restrictor
CreateTimeEvent("allow_relation_update_e", "allow_relation_update_a", 1, function()
give_info("xcvb_arena_started")
setup_teams()
return true
end)
-- reset tables and period
iempty_table(xcvb_arena_main.arena_main_t[cur_per].team1)
iempty_table(xcvb_arena_main.arena_main_t[cur_per].team2)
iempty_table(xcvb_arena_main.arena_main_t[cur_per].pwrs)
xcvb_arena_main.current_period = 0
end
function setup_teams()
if not HI("xcvb_arena_started") then return end
xcvb_arena_utils.set_out_restrictors(squad_team_1_id, squad_team_2_id)
-- xcvb_arena_utils.hit_npcs(squad_team_1_id, squad_team_2_id)
local sq1 = alife_object(squad_team_1_id)
local sq2 = alife_object(squad_team_2_id)
if sq1 and sq2 then
sq1.scripted_target = squad_team_2_id
sq1.rush_to_target = true
sq2.scripted_target = squad_team_1_id
sq2.rush_to_target = true
end
end
function actor_on_update()
if not HI("xcvb_arena_started") then return end
xcvb_arena_utils.set_teams_relation(squad_team_1_id, squad_team_2_id)
end
function on_before_key_press(key, bind, dis, flags)
if not HI("xcvb_arena_started") then return end
local bind = dik_to_bind(key)
if bind == key_bindings.kFWD
or bind == key_bindings.kL_STRAFE
or bind == key_bindings.kR_STRAFE
or bind == key_bindings.kBACK
or bind == key_bindings.kCONSOLE -- console
or bind == key_bindings.kQUIT then -- esc
return
end
flags.ret_value = false
end
function on_enemy_eval(npc, enemy, flags)
if not HI("xcvb_arena_started") then return end
-- ignore enemy actor
if enemy:id() == 0 then
flags.override = true
flags.result = false
return
end
local npc_squad = get_object_squad(npc)
local enemy_squad = get_object_squad(enemy)
if not (npc_squad and enemy_squad) then return end
local npc_squad_is_arena = string.find(npc_squad:section_name(), "arena_")
local enemy_squad_is_arena = string.find(enemy_squad:section_name(), "arena_")
-- arena squad ignores everyone except enemy arena squad
if npc_squad_is_arena and (not enemy_squad_is_arena) then
flags.override = true
flags.result = false
end
-- and vice versa, regular npcs ignore arena squads
if (not npc_squad_is_arena) and enemy_squad_is_arena then
flags.override = true
flags.result = false
end
end
function npc_on_before_hit(npc, s_hit)
if not HI("xcvb_arena_started") then return end
local squad = get_object_squad(npc)
local arena_squad = squad and string.find(squad:section_name(), "arena_")
local draft_is_ac = s_hit.draftsman and s_hit.draftsman:id() == 0
if arena_squad and draft_is_ac then
-- message about ur disqualification
news_manager.send_tip(db.actor, gt("st_arena_kicked_out"), 0, nil, 15000)
xcvb_arena_utils.arena_fade_in_out()
CreateTimeEvent("xcvb_arena_end_fight_e", "xcvb_arena_end_fight_a", 2, end_arena_fight, 0)
end
end
function squad_on_npc_death(squad, se_obj, killer)
-- team 2 won
if squad_team_1_id and squad_team_1_id == squad.id and squad:npc_count() <= 1 then
-- message about team 2 winner
news_manager.send_tip(db.actor, gt("st_arena_team_2_won"), 0, nil, 10000)
xcvb_arena_utils.arena_fade_in_out(2)
CreateTimeEvent("xcvb_arena_end_fight_e", "xcvb_arena_end_fight_a", 4, end_arena_fight, 2)
-- team 1 won
elseif squad_team_2_id and squad_team_2_id == squad.id and squad:npc_count() <= 1 then
-- message about team 1 winner
news_manager.send_tip(db.actor, gt("st_arena_team_1_won"), 0, nil, 10000)
xcvb_arena_utils.arena_fade_in_out(2)
CreateTimeEvent("xcvb_arena_end_fight_e", "xcvb_arena_end_fight_a", 4, end_arena_fight, 1)
end
end
function end_arena_fight(winner_team)
-- teleport actor back
db.actor:set_actor_position(vector():set(151.9, 0.421, 68.6), 40590, 1684)
-- give money
local bet_team = xcvb_arena_main.team_bet
local reward = xcvb_arena_main.cur_reward
if bet_team == winner_team then
local str = string.format(gt("st_arena_your_reward"), reward)
news_manager.send_tip(db.actor, str, 0, nil, 15000)
db.actor:give_money(reward)
end
-- release squads
local squad1 = alife_object(squad_team_1_id)
if squad1 and string.find(squad1:section_name(), "arena_") then
alife_release(squad1)
end
local squad2 = alife_object(squad_team_2_id)
if squad2 and string.find(squad2:section_name(), "arena_") then
alife_release(squad2)
end
-- reset vars
disable_info("xcvb_arena_started")
xcvb_arena_main.cur_reward = 0
xcvb_arena_main.team_bet = 0
squad_team_1_id = nil
squad_team_2_id = nil
return true
end
function save_state(m_data)
m_data.xcvb_arena_squad_id_1 = squad_team_1_id
m_data.xcvb_arena_squad_id_2 = squad_team_2_id
end
function load_state(m_data)
squad_team_1_id = m_data.xcvb_arena_squad_id_1 or squad_team_1_id
squad_team_2_id = m_data.xcvb_arena_squad_id_2 or squad_team_2_id
end
function actor_on_first_update()
setup_teams()
end
function on_game_start()
RegisterScriptCallback("actor_on_update", actor_on_update)
RegisterScriptCallback("on_enemy_eval", on_enemy_eval)
RegisterScriptCallback("squad_on_npc_death", squad_on_npc_death)
RegisterScriptCallback("npc_on_before_hit", npc_on_before_hit)
RegisterScriptCallback("on_before_key_press", on_before_key_press)
RegisterScriptCallback("save_state", save_state)
RegisterScriptCallback("load_state", load_state)
RegisterScriptCallback("actor_on_first_update", actor_on_first_update)
end
@@ -0,0 +1,287 @@
local gt = game.translate_string
local bet_step = 1000
GUI = nil
xr_effects.open_arena_gui = function()
if (not GUI) then
GUI = XArena()
end
if (GUI) and (not GUI:IsShown()) then
GUI:ShowDialog(true)
Register_UI("XArena", "xcvb_arena")
GUI:Refresh()
end
end
class "XArena" (CUIScriptWnd)
function XArena:__init() super()
self:InitControls()
self:InitCallBacks()
end
function XArena:InitControls()
self:SetWndRect(Frect():set(0, 0, 1024, 768))
self:SetAutoDelete(true)
self.xml = CScriptXmlInit()
self.xml:ParseFile("ui_xcvb_arena.xml")
local xml = self.xml
self.bg = xml:InitStatic("bg", self)
self.arena_start_btn = xml:Init3tButton("start_btn", self.bg)
self:Register(self.arena_start_btn, "arena_start_btn")
-- titles
self.title_cont = xml:InitStatic("title_cont", self.bg)
self.title_time = xml:InitStatic("title_cont:title_time", self.title_cont)
self.title_team_1 = xml:InitStatic("title_cont:title_team_1", self.title_cont)
self.title_team_2 = xml:InitStatic("title_cont:title_team_2", self.title_cont)
self.title_bet = xml:InitStatic("title_cont:title_bet", self.title_cont)
self.title_reward = xml:InitStatic("title_cont:title_reward", self.title_cont)
-- rows
self.rows = {}
for i, t in ipairs(xcvb_arena_main.arena_main_t) do
self.rows[i] = {}
self.rows[i].main = xml:InitStatic("row_cont", self.bg)
-- adjust row pos
local gap_y = 5 * (i-1)
local y_offset = self.rows[i].main:GetHeight() * (i-1) + gap_y
local old_pos = self.rows[i].main:GetWndPos()
self.rows[i].main:SetWndPos(vector2():set(old_pos.x, old_pos.y + y_offset))
-- time
self.rows[i].time = xml:InitStatic("row_cont:time", self.rows[i].main)
local time_str = string.format("%02d:00-%02d:00", t.min, t.max)
self.rows[i].time:TextControl():SetText(time_str)
-- team 1
self.rows[i].team1 = xml:InitStatic("row_cont:team_1", self.rows[i].main)
-- team 2
self.rows[i].team2 = xml:InitStatic("row_cont:team_2", self.rows[i].main)
-- bet cont
self.rows[i].bet_cont = xml:InitStatic("row_cont:bet_cont", self.rows[i].main)
self.rows[i].bet_title1 = xml:InitStatic("row_cont:bet_cont:bet_title1", self.rows[i].bet_cont)
self.rows[i].bet_min_btn1 = xml:Init3tButton("row_cont:bet_cont:bet_btn_min1", self.rows[i].bet_cont)
self:Register(self.rows[i].bet_min_btn1, "bet_btn_min1_" .. i)
self.rows[i].bet1 = xml:InitStatic("row_cont:bet_cont:bet1", self.rows[i].bet_cont)
self.rows[i].bet_plus_btn1 = xml:Init3tButton("row_cont:bet_cont:bet_btn_plus1", self.rows[i].bet_cont)
self:Register(self.rows[i].bet_plus_btn1, "bet_btn_plus1_" .. i)
self.rows[i].bet_title2 = xml:InitStatic("row_cont:bet_cont:bet_title2", self.rows[i].bet_cont)
self.rows[i].bet_min_btn2 = xml:Init3tButton("row_cont:bet_cont:bet_btn_min2", self.rows[i].bet_cont)
self:Register(self.rows[i].bet_min_btn2, "bet_btn_min2_" .. i)
self.rows[i].bet2 = xml:InitStatic("row_cont:bet_cont:bet2", self.rows[i].bet_cont)
self.rows[i].bet_plus_btn2 = xml:Init3tButton("row_cont:bet_cont:bet_btn_plus2", self.rows[i].bet_cont)
self:Register(self.rows[i].bet_plus_btn2, "bet_btn_plus2_" .. i)
-- reward
self.rows[i].reward = xml:InitStatic("row_cont:reward", self.rows[i].main)
-- row vertical lines
self.rows[i].vert1 = xml:InitStatic("vert_line1", self.rows[i].main)
self.rows[i].vert2 = xml:InitStatic("vert_line2", self.rows[i].main)
self.rows[i].vert3 = xml:InitStatic("vert_line3", self.rows[i].main)
end
end
function XArena:InitCallBacks()
-- start btn
self:AddCallback("arena_start_btn", ui_events.BUTTON_CLICKED, self.OnClickArenaStart, self)
-- bet btns
for i = 1, #self.rows do
XArena["OnClickBetMinus1_".. i] = function(self)
self:OnClickBetMinus1(i)
end
self:AddCallback("bet_btn_min1_" .. i, ui_events.BUTTON_CLICKED, self["OnClickBetMinus1_" .. i], self)
XArena["OnClickBetPlus1_".. i] = function(self)
self:OnClickBetPlus1(i)
end
self:AddCallback("bet_btn_plus1_" .. i, ui_events.BUTTON_CLICKED, self["OnClickBetPlus1_" .. i], self)
XArena["OnClickBetMinus2_".. i] = function(self)
self:OnClickBetMinus2(i)
end
self:AddCallback("bet_btn_min2_" .. i, ui_events.BUTTON_CLICKED, self["OnClickBetMinus2_" .. i], self)
XArena["OnClickBetPlus2_".. i] = function(self)
self:OnClickBetPlus2(i)
end
self:AddCallback("bet_btn_plus2_" .. i, ui_events.BUTTON_CLICKED, self["OnClickBetPlus2_" .. i], self)
end
end
function XArena:OnClickBetMinus1(i)
local cur_bet = tonumber(self.rows[i].bet1:TextControl():GetText())
local new_bet = clamp(cur_bet - bet_step, 0, 100000)
self.rows[i].bet1:TextControl():SetText(tostring(new_bet))
self:UpdReward(i)
self:UpdStartButton(new_bet)
end
function XArena:OnClickBetPlus1(i)
local team2_bet = tonumber(self.rows[i].bet2:TextControl():GetText())
if team2_bet > 0 then return end
local cur_bet = tonumber(self.rows[i].bet1:TextControl():GetText())
local new_bet = clamp(cur_bet + bet_step, 0, 100000)
if db.actor:money() <= new_bet then return end
self.rows[i].bet1:TextControl():SetText(tostring(new_bet))
self:UpdReward(i)
self:UpdStartButton(new_bet)
end
function XArena:OnClickBetMinus2(i)
local cur_bet = tonumber(self.rows[i].bet2:TextControl():GetText())
local new_bet = clamp(cur_bet - bet_step, 0, 100000)
self.rows[i].bet2:TextControl():SetText(tostring(new_bet))
self:UpdReward(i)
self:UpdStartButton(new_bet)
end
function XArena:OnClickBetPlus2(i)
local team1_bet = tonumber(self.rows[i].bet1:TextControl():GetText())
if team1_bet > 0 then return end
local cur_bet = tonumber(self.rows[i].bet2:TextControl():GetText())
local new_bet = clamp(cur_bet + bet_step, 0, 100000)
if db.actor:money() <= new_bet then return end
self.rows[i].bet2:TextControl():SetText(tostring(new_bet))
self:UpdReward(i)
self:UpdStartButton(new_bet)
end
function XArena:UpdReward(i)
local pwr_ar = xcvb_arena_main.arena_main_t[i].pwrs
local team1_bet = tonumber(self.rows[i].bet1:TextControl():GetText())
local team2_bet = tonumber(self.rows[i].bet2:TextControl():GetText())
local new_reward = 0
if team1_bet > 0 then
-- printf("team 1 bet || team1 pwr: %s || team2 pwr: %s || koef: %s", pwr_ar[1], pwr_ar[2], pwr_ar[2] / pwr_ar[1])
local koef = pwr_ar[2] / pwr_ar[1]
new_reward = team1_bet + team1_bet * koef
elseif team2_bet > 0 then
-- printf("team 2 bet || team1 pwr: %s || team2 pwr: %s || koef: %s", pwr_ar[1], pwr_ar[2], pwr_ar[1] / pwr_ar[2])
local koef = pwr_ar[1] / pwr_ar[2]
new_reward = team2_bet + team2_bet * koef
end
self.rows[i].reward:TextControl():SetText(tostring(math.ceil(new_reward)))
end
function XArena:UpdStartButton(new_bet)
self.arena_start_btn:Show(new_bet > 0)
end
function XArena:Refresh()
-- reset all
local new_period = xcvb_arena_utils.get_new_period()
xcvb_arena_main.cur_reward = 0
xcvb_arena_main.team_bet = 0
for i, t in pairs(xcvb_arena_main.arena_main_t) do
self.arena_start_btn:Show(false)
self.rows[i].team1:TextControl():SetText("")
self.rows[i].team1:SetTextureColor(GetARGB(0, 90, 0, 0))
self.rows[i].team2:TextControl():SetText("")
self.rows[i].team2:SetTextureColor(GetARGB(0, 0, 90, 90))
self.rows[i].time:SetTextureColor(GetARGB(0, 160, 160, 0))
self.rows[i].bet_cont:Show(false)
self.rows[i].bet1:TextControl():SetText(0)
self.rows[i].bet2:TextControl():SetText(0)
self.rows[i].reward:Show(false)
self.rows[i].reward:TextControl():SetText(0)
-- empty tables for early teams
if new_period and new_period > i then
iempty_table(xcvb_arena_main.arena_main_t[i].team1)
iempty_table(xcvb_arena_main.arena_main_t[i].team2)
iempty_table(xcvb_arena_main.arena_main_t[i].pwrs)
end
end
for i, t in ipairs(xcvb_arena_main.arena_main_t) do
-- update teams
local team_alph = 0
local team1_str, team2_str = "", ""
if #t.team1 > 0 then
local s1 = "x" .. #t.team1 .. " " .. gt(xcvb_arena_utils.get_team_str(t.team1))
self.rows[i].team1:TextControl():SetText(s1)
self.rows[i].team1:SetTextureColor(GetARGB(120, 90, 0, 0))
local s2 = "x" .. #t.team2 .. " " .. gt(xcvb_arena_utils.get_team_str(t.team2))
self.rows[i].team2:TextControl():SetText(s2)
self.rows[i].team2:SetTextureColor(GetARGB(120, 0, 90, 90))
end
-- highlight / enable bet
local cur_per = xcvb_arena_main.current_period
if cur_per == i then
self.rows[i].time:SetTextureColor(GetARGB(90, 160, 160, 0))
self.rows[i].bet_cont:Show(true)
self.rows[i].reward:Show(true)
end
end
end
function XArena:OnClickArenaStart()
local cur_period = xcvb_arena_main.current_period
-- store team bet and reward and take actor money
local team1_bet = tonumber(self.rows[cur_period].bet1:TextControl():GetText())
local team2_bet = tonumber(self.rows[cur_period].bet2:TextControl():GetText())
if team1_bet > team2_bet then
db.actor:give_money(-team1_bet)
xcvb_arena_main.team_bet = 1
elseif team2_bet > team1_bet then
db.actor:give_money(-team2_bet)
xcvb_arena_main.team_bet = 2
end
xcvb_arena_main.cur_reward = tonumber(self.rows[cur_period].reward:TextControl():GetText())
-- fade in / out
xcvb_arena_utils.arena_fade_in_out()
-- start fight
CreateTimeEvent("xcvb_start_arena_fight_e", "xcvb_start_arena_fight_a", 3, function()
xcvb_arena_fight.start_arena_fight(cur_period)
return true
end)
-- close ui
self:Close()
end
function XArena:OnKeyboard(key, keyboard_action)
local res = CUIScriptWnd.OnKeyboard(self, key, keyboard_action)
if (res == false) then
if keyboard_action == ui_events.WINDOW_KEY_PRESSED then
if key == DIK_keys.DIK_ESCAPE then
self:Close()
end
end
end
return res
end
function XArena:Close()
if self:IsShown() then
self:HideDialog()
self:Show(false)
Unregister_UI("XArena")
end
end
function XArena:__finalize()
end
@@ -0,0 +1,152 @@
local ctime_to_t = utils_data.CTime_to_table
local t_to_ctime = utils_data.CTime_from_table
local reset_time
local gui_shown = false
current_period = 0
cur_reward = 0
team_bet = 0
-- current index teams is emptied on fight end
-- previous team indices lower than current index are emptied on gui refresh
-- all team indices are empties on schedule reset here
arena_main_t = {
[1] = { min= 9, max=11, team1={}, team2={}, pwrs={} },
[2] = { min= 11, max=13, team1={}, team2={}, pwrs={} },
[3] = { min= 13, max=15, team1={}, team2={}, pwrs={} },
[4] = { min= 15, max=17, team1={}, team2={}, pwrs={} },
[5] = { min= 17, max=19, team1={}, team2={}, pwrs={} },
[6] = { min= 19, max=21, team1={}, team2={}, pwrs={} },
[7] = { min= 21, max=23, team1={}, team2={}, pwrs={} },
}
function actor_on_first_update()
xcvb_arena_utils.handle_removed_teams()
if has_alife_info("arena_obj_spawned") then return end
xcvb_arena_utils.spawn_board()
xcvb_arena_utils.spawn_balcony()
give_info("arena_obj_spawned")
end
function generate_new_fights()
-- reset table
for i, t in ipairs(arena_main_t) do
iempty_table(arena_main_t[i].team1)
iempty_table(arena_main_t[i].team2)
iempty_table(arena_main_t[i].pwrs)
end
-- try to fill team 1
local fight_chance = xcvb_arena_mcm.get_config("fight_chance")
local team1_stalker_chance = xcvb_arena_mcm.get_config("stalker_team1_chance")
local team2_stalker_chance = xcvb_arena_mcm.get_config("stalker_team2_chance")
local team1_mutant_type = {}
for i, t in ipairs(arena_main_t) do
if fight_chance >= math.random() then
-- try to spawn stalkers first, else mutants
if team1_stalker_chance >= math.random() then
local amount = math.random(2, 5)
arena_main_t[i].team1, arena_main_t[i].pwrs[1] = xcvb_arena_utils.get_stalker_team(amount)
else
local amount = math.random(2, 5)
arena_main_t[i].team1, arena_main_t[i].pwrs[1], team1_mutant_type[i] = xcvb_arena_utils.get_mutant_team(amount)
end
end
end
-- fill team 2
for i, t in ipairs(arena_main_t) do
if #t.team1 > 0 then
if team2_stalker_chance >= math.random() then
local amount = math.random(2, 5)
arena_main_t[i].team2, arena_main_t[i].pwrs[2] = xcvb_arena_utils.get_stalker_team(amount)
else
local amount = math.random(2, 5)
arena_main_t[i].team2, arena_main_t[i].pwrs[2], valid_var = xcvb_arena_utils.get_mutant_team(amount, team1_mutant_type[i])
-- if enemies are empty - clear teams for this index
if not valid_var then
printf("~ xcvb arena, No mutant enemies found for i: %s | typ: %s", i, team1_mutant_type[i])
iempty_table(arena_main_t[i].team1)
iempty_table(arena_main_t[i].team2)
iempty_table(arena_main_t[i].pwrs)
end
end
end
end
end
function update_period()
local new_period = xcvb_arena_utils.get_new_period()
if new_period and #arena_main_t[new_period].team1 > 0 then
current_period = new_period
else
current_period = 0
end
end
local tmr = 0
function actor_on_update()
local tg = time_global()
if tmr > tg then return end
tmr = tg + 5000
-- do not reset/update when in gui
if gui_shown then return end
-- reset table
local cur_time = game.get_game_time()
if (not reset_time) or cur_time:diffSec(t_to_ctime(reset_time)) > 86400 then
local Y, M, D, h, m, s, ms = 0, 0, 0, 0, 0, 0, 0
Y, M, D, h, m, s, ms = cur_time:get(Y, M, D, h, m, s, ms)
cur_time:set(Y, M, D, 0, 1, 0, 0)
reset_time = ctime_to_t(cur_time)
generate_new_fights()
end
-- update period
update_period()
end
function GUI_on_show(gui)
if gui == "XArena" then
gui_shown = true
end
end
function GUI_on_hide(gui)
if gui == "XArena" then
gui_shown = false
end
end
function save_state(m_data)
m_data.xcvb_arena_main_t = arena_main_t
m_data.xcvb_arena_reset_time = reset_time
m_data.xcvb_arena_cur_period = current_period
m_data.xcvb_arena_cur_reward = cur_reward
m_data.xcvb_arena_team_bet = team_bet
end
function load_state(m_data)
arena_main_t = m_data.xcvb_arena_main_t or arena_main_t
reset_time = m_data.xcvb_arena_reset_time or reset_time
current_period = m_data.xcvb_arena_cur_period or current_period
cur_reward = m_data.xcvb_arena_cur_reward or cur_reward
team_bet = m_data.xcvb_arena_team_bet or team_bet
end
function on_game_start()
RegisterScriptCallback("actor_on_first_update", actor_on_first_update)
RegisterScriptCallback("actor_on_update", actor_on_update)
RegisterScriptCallback("GUI_on_show", GUI_on_show)
RegisterScriptCallback("GUI_on_hide", GUI_on_hide)
RegisterScriptCallback("save_state", save_state)
RegisterScriptCallback("load_state", load_state)
end
@@ -0,0 +1,23 @@
-- If you don't use MCM, change your defaults from here.
local defaults = {
["fight_chance"] = 0.7,
["stalker_team1_chance"] = 0.25,
["stalker_team2_chance"] = 0.25,
}
function get_config(key)
if ui_mcm then return ui_mcm.get("xcvb_arena/"..key) else return defaults[key] end
end
function on_mcm_load()
op = { id= "xcvb_arena",sh=true ,gr={
{ id= "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_xcvb_arena_title",size= {512,50},spacing= 20 },
{id = "fight_chance", type = "track", val = 2, min=0,max=1,step=0.05, def = 0.7},
{id = "stalker_team1_chance", type = "track", val = 2, min=0,max=1,step=0.05, def = 0.25},
{id = "stalker_team2_chance", type = "track", val = 2, min=0,max=1,step=0.05, def = 0.25},
}
}
return op
end
@@ -0,0 +1,364 @@
local ini_rel = ini_file("creatures\\game_relations.ltx")
function get_new_period()
local hrs = level.get_time_hours()
for i, t in ipairs(xcvb_arena_main.arena_main_t) do
if hrs >= t.min and hrs < t.max then
return i
end
end
end
function spawn_board()
local pos = vector():set(149.2, 1.40, 70.81)
local se_obj = alife_create("xcvb_arena_board", pos, 2^32-1, 1684)
if not se_obj then return end
local data = utils_stpk.get_physic_data(se_obj)
data.custom_data = [[
[collide]
ignore_static
ignore_small_objects
[logic]
cfg = scripts\arena_board_logic.ltx
]]
utils_stpk.set_physic_data(data, se_obj)
se_obj.angle = vector():set(0, -2.06, 0)
end
function spawn_balcony()
local pos = vector():set(140.1, -13.51, 102.2)
local se_obj = alife_create("xcvb_arena_balcony", pos, 2^32-1, 1710)
if not se_obj then return end
local data = utils_stpk.get_physic_data(se_obj)
data.custom_data = [[
[collide]
ignore_static
ignore_small_objects
]]
utils_stpk.set_physic_data(data, se_obj)
se_obj.angle = vector():set(0, -1.5708, 0)
end
function handle_removed_teams()
for i, t in ipairs(xcvb_arena_main.arena_main_t) do
if #t.team1 > 0 then
remove_teams = false
for j, sec in ipairs(t.team1) do
if string.find(sec, "zombied") then
remove_teams = true
break
end
end
for j, sec in ipairs(t.team2) do
if string.find(sec, "zombied") then
remove_teams = true
break
end
end
if remove_teams then
iempty_table(xcvb_arena_main.arena_main_t[i].team1)
iempty_table(xcvb_arena_main.arena_main_t[i].team2)
iempty_table(xcvb_arena_main.arena_main_t[i].pwrs)
end
end
end
end
local stalkers_t = {
stalker = { 0, 1, 2, 3, 4 }, bandit = { 0, 1, 2, 3, 4 }, killer = { 0, 1, 2, 3, 4 },
duty = { 0, 1, 2, 3, 4 }, freedom = { 0, 1, 2, 3, 4 }, army = { 0, 1, 2, 3, 4 },
ecolog = { 0, 1, 2, 3, 4 }, csky = { 0, 1, 2, 3, 4 }, monolith = { 0, 1, 2, 3, 4 },
greh = { 0, 1, 2, 3, 4 }, renegade = { 0, 1, 2 }, -- zombied = { 1, 2, 3, 4 }
}
local stalkers_power_t = {
-- stalkers by rank
[0] = 1, [1] = 3, [2] = 5, [3] = 8, [4] = 10,
}
function get_stalker_team(amount)
local ret_ar = {}
local pwr = 0
-- pick random comm and fill from it
local k = random_key_table(stalkers_t)
for i = 1, amount do
local rnd_idx = math.random(1, #stalkers_t[k])
local rank_val = stalkers_t[k][rnd_idx]
local new_k = k == "army" and "military" or k
local sec = "sim_default_" .. new_k .. "_" .. rank_val
ret_ar[#ret_ar + 1] = sec
pwr = pwr + stalkers_power_t[rank_val]
end
return ret_ar, pwr
end
local mutants_t = {
zombie = {"_weak", "_normal", "_strong", "_blind"},
boar = {"_normal", "_strong", "_01a_weak", "_02a_weak", "_02a_strong", "_01a_hard", "_02a_hard"},
dog = {"_normal_red", "_normal_white", "_normal_brown", "_normal_bulterier", "_weak_red", "_weak_white",
"_weak_brown", "_weak_bulterier", "_strong_red", "_strong_white", "_strong_brown", "_strong_bulterier", "_strong_black"},
pseudodog = {"_grey_weak", "_normal", "_strong", "_grey_strong"},
cat = {"_weak_a", "_weak_b", "_weak_c", "_weak_d", "_weak_e", "_normal_a", "_normal_b", "_normal_c", "_normal_d", "_normal_e",
"_strong_a", "_strong_b", "_strong_c", "_strong_d", "_strong_e"},
fracture = {"_weak", "_normal", "_strong", "_2", "_3"},
snork = {"_weak", "_weak2", "_weak3", "_weak4", "_normal", "_normal2", "_normal3", "_normal4", "_strong", "_strong2", "_strong3", "_strong4"},
lurker = {"_1_weak", "_2_weak", "_3_weak", "_1_normal", "_2_normal", "_3_normal", "_1_strong", "_2_strong", "_3_strong" },
bloodsucker = {"_red_weak", "_green_weak", "_black_weak", "_red_normal", "_green_normal", "_black_normal",
"_red_strong", "_green_strong", "_black_strong"},
psysucker = {"_2_weak", "_3_weak", "_2_normal", "_3_normal", "_2_strong", "_3_strong"},
psy_dog = {"_normal"},
chimera = {"_weak", "_normal", "_strong", "_strong2", "_strong3", "_strong4"},
}
local mutants_power_t = {
zombie = 1, boar = 3, dog = 2, pseudodog = 4, cat = 4, fracture = 5,
snork = 5, lurker = 5, bloodsucker = 8, psysucker = 8, psy_dog = 8, chimera = 12
}
local mutant_relation_order = {
"actor","human","zoo_monstr","boar","bloodsucker","flesh","dog","pseudodog","cat","chimera","giant","zombie","burer","controller","poltergeist","snork","fracture","bird","rat","tushkano","corpse","trader","arena_monstr","komar","tark","medwed","rotan","fly","mwolf","psysucker","lurker","karlik"
}
local mutant_relations_t = {}
function get_mutant_team(amount, team1_mutant_type)
local ret_ar = {}
local pwr = 0
local k
-- make relations table if not created
if is_empty(mutant_relations_t) then
fill_mutant_relations_table()
end
-- team1 is mutant - pick enemy mutant
if team1_mutant_type then
local team1_enemies_t = mutant_relations_t[team1_mutant_type]
local t_size = team1_enemies_t and size_table(team1_enemies_t) or 0
if t_size <= 0 then
return ret_ar, pwr, k
end
k = random_key_table(team1_enemies_t)
-- team1 is stalker - pick any mutant
else
k = random_key_table(mutants_t)
end
for i = 1, amount do
local rnd_idx = math.random(1, #mutants_t[k])
local sec = k .. mutants_t[k][rnd_idx]
ret_ar[#ret_ar + 1] = sec
pwr = pwr + mutants_power_t[k]
end
return ret_ar, pwr, k
end
function fill_mutant_relations_table()
-- collect and store mutants and their enemies
local n = ini_rel:line_count("monster_relations")
for i = 0, n - 1 do
local _, mutant, values = ini_rel:r_line_ex("monster_relations", i, "", "")
-- keep only possible fighters
if mutant and mutants_t[mutant] then
mutant_relations_t[mutant] = {}
-- fill it with enemies only
local rel_ar = str_explode(values, ",") -- {-1, 0, 1}
for idx, val in ipairs(rel_ar) do
local enemy_mutant = mutant_relation_order[idx]
if tonumber(val) < 0 and enemy_mutant and mutants_t[enemy_mutant] then
mutant_relations_t[mutant][enemy_mutant] = true
end
end
end
end
-- exclude mutants that are not enemies to each other
for mutant1, t1 in pairs(mutant_relations_t) do
for mutant2, t2 in pairs(mutant_relations_t) do
if mutant1 ~= mutant2 and t2[mutant1] and (not t1[mutant2]) then
mutant_relations_t[mutant2][mutant1] = nil
end
end
end
-- copy psy_dog from pseudodog
mutant_relations_t["psy_dog"] = {}
mutant_relations_t["psy_dog"] = dup_table(mutant_relations_t["pseudodog"])
end
function get_team_str(ar)
for _, sec in ipairs(ar) do
-- stalkers
for k, __ in pairs(stalkers_t) do
if string.find(sec, k) then
return k == "duty" and "dolg" or k
elseif string.find(sec, "military") then
return "army"
end
end
-- mutants
for k, __ in pairs(mutants_t) do
if string.find(sec, "^" .. k) then
if k == "dog" then
return "encyclopedia_mutants_blind_dog"
elseif k == "psy_dog" then
return "encyclopedia_mutants_psydog"
end
return "encyclopedia_mutants_" .. k
end
end
end
end
function get_actor_arena_pos()
-- local pos = vector():set(139.1, -13.37, 101.5)
local pos = vector():set(141.6, -13.35, 102.1)
local lvid = 37386
local gvid = 1710
return pos, lvid, gvid
end
function get_team_pos(n)
if n == 1 then
local pos = vector():set(151.2, -20.0543, 128.8)
local lvid = 40551
local gvid = 1796
return pos, lvid, gvid
elseif n == 2 then
local pos = vector():set(152.6, -20.0598, 81.2)
local lvid = 40761
local gvid = 1684
return pos, lvid, gvid
end
end
function arena_fade_in_out(in_dly)
local fade_in_delay = in_dly or 0
local fade_out_delay = fade_in_delay + 2
CreateTimeEvent("xcvb_arena_fade_in_e", "xcvb_arena_fade_in_a", fade_in_delay, function()
level.add_pp_effector("fade_in.ppe", 987123)
return true
end)
CreateTimeEvent("xcvb_arena_fade_out_e", "xcvb_arena_fade_out_a", fade_out_delay, function()
level.add_pp_effector("fade_out.ppe", 987124)
return true
end)
end
function set_teams_relation(squad_id1, squad_id2)
-- for stalkers only
local squad1 = squad_id1 and alife_object(squad_id1)
local squad2 = squad_id2 and alife_object(squad_id2)
if not (squad1 and squad1.commander_id and squad2 and squad2.commander_id) then return end
if string.find(squad1:section_name(), "mutant") or string.find(squad2:section_name(), "mutant") then return end
for m1 in squad1:squad_members() do
local npc1 = level.object_by_id(m1.id)
for m2 in squad2:squad_members() do
local npc2 = level.object_by_id(m2.id)
if npc1 and npc1:alive() and npc2 and npc2:alive() then
npc1:force_set_goodwill(-9999, npc2)
npc2:force_set_goodwill(-9999, npc1)
end
end
end
end
function set_out_restrictors(squad_id1, squad_id2)
local squad1 = squad_id1 and alife_object(squad_id1)
local squad2 = squad_id2 and alife_object(squad_id2)
if not (squad1 and squad1.commander_id and squad2 and squad2.commander_id) then return end
for m1 in squad1:squad_members() do
local npc1 = level.object_by_id(m1.id)
if npc1 and npc1:alive() then
npc1:add_restrictions("bar_arena_restrictor", "")
end
end
for m2 in squad2:squad_members() do
local npc2 = level.object_by_id(m2.id)
if npc2 and npc2:alive() then
npc2:add_restrictions("bar_arena_restrictor", "")
end
end
end
function hit_npcs(squad_id1, squad_id2)
local squad1 = squad_id1 and alife_object(squad_id1)
local squad2 = squad_id2 and alife_object(squad_id2)
if not (squad1 and squad1.commander_id and squad2 and squad2.commander_id) then return end
for m1 in squad1:squad_members() do
local npc1 = level.object_by_id(m1.id)
for m2 in squad2:squad_members() do
local npc2 = level.object_by_id(m2.id)
if npc1 and npc1:alive() and npc2 and npc2:alive() then
xcvb_arena_utils.scr_hit(npc1, npc2)
xcvb_arena_utils.scr_hit(npc2, npc1)
end
end
end
end
function scr_hit(npc, who)
if not (npc and who) then return end
-- printf("%s [%s] hits %s [%s]", npc:section(), npc:id(), who:section(), who:id())
local h = hit()
h.type = hit.wound
h.power = 0
h.impulse = 0
h.direction = VEC_Z
h.draftsman = npc
who:hit(h)
end
-- override to fix
function sim_squad_scripted.sim_squad_scripted.get_script_target(self)
--utils_data.debug_write("sim_squad_scripted:get_script_target")
local new_target
if (self.scripted_target) then
new_target = self.scripted_target
elseif (axr_task_manager.hostages_by_id[self:commander_id()]) then
return axr_task_manager.hostages_by_id[self:commander_id()]
elseif (self.random_targets) then
if (self.current_action == 0 and self.assigned_target_id == nil) then
new_target = self.random_targets[math.random(#self.random_targets)]
else
return self.assigned_target_id
end
elseif (self.action_condlist) then
new_target = xr_logic.pick_section_from_condlist(db.actor, self, self.action_condlist)
end
-- prevent companions from moving to actor if they cannot teleport and actor is not on same level
if (axr_companions.companion_squads[self.id]) then
local se_obj = alife_object(self:commander_id())
if (self.online ~= true) and (se_obj and se_load_var(se_obj.id,se_obj:name(),"companion_cannot_teleport")) then
return self.id
end
return 0
end
if (new_target == "actor") then
return 0
end
local smart = new_target and SIMBOARD.smarts_by_names[new_target]
if (smart) then
return smart.id
end
local new_id = tonumber(new_target)
local se_target = new_id and alife_object(new_id)
if se_target and (se_target:clsid() == clsid.online_offline_group_s or se_target:clsid() == clsid.smart_terrain) then
return new_id
end
end
Binary file not shown.
+28
View File
@@ -0,0 +1,28 @@
[General]
gameName=stalkeranomaly
modid=0
version=d2024.12.3.0
newestVersion=
category="-1,"
nexusFileStatus=1
installationFile=arena_dlc_0.16.zip
repository=Nexus
ignoredVersion=
comments=
notes=
nexusDescription=
url=
hasCustomURL=true
lastNexusQuery=
lastNexusUpdate=
nexusLastModified=2024-12-03T23:23:19Z
nexusCategory=0
converted=false
validated=false
color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0)
tracked=0
[installedFiles]
1\modid=0
1\fileid=0
size=1