Various Changes; Updated and Added Mods
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
Extra Level Transitions - Bonus Transitions + Transitions for new maps Promzone, Grimwood & Yushniy
|
||||
|
||||
This is a set of new coordinates for extra transition points using Demonized's transition script (https://www.moddb.com/mods/stalker-anomaly/addons/extra-cordon-darkscape-transition).
|
||||
-> needs be loaded with lower PRIORITY in MO2 than the new extra transitions.
|
||||
|
||||
It adds most of the available routes from the "New routes" mod (https://www.moddb.com/mods/stalker-anomaly/addons/anomaly-new-routes) but using Demonized's transition script.
|
||||
I left out the Radar <-> Jupiter UG route.
|
||||
-> whereas it wont show you conflicts, this mod and the new extra routes are highly incompatible
|
||||
|
||||
Also included is the "Extra level transitions - Rostok to Garbage and Yantar facing fix" mod (https://www.moddb.com/mods/stalker-anomaly/addons/extra-level-transitions-rostok-to-garbage-and-yantar-facing-fix).
|
||||
-> disable in Mo2.
|
||||
|
||||
All extra routes will be available for free and can be used on game start.
|
||||
|
||||
|
||||
MCM is strongly suggested to easily access the remove/update function for the new transitions.
|
||||
|
||||
|
||||
Install: (Mod Organizer2 is suggested)
|
||||
|
||||
- drop included /gamedata folder into Anomaly root folder
|
||||
|
||||
Uninstall:
|
||||
|
||||
- to disable the new transition 1st use the attached MCM menu provided by Demonized to delete the transition
|
||||
- remove files with the name "items_extra_level_transitions_*.ltx" from \gamedata\configs\items\items
|
||||
- remove lc_extra_transitions.script & txr_routes.script from \gamedata\scripts
|
||||
|
||||
*Configuration:
|
||||
|
||||
Each of the new transitions can be disabled by simply commenting it out in the corresponding *.ltx file. You need to do this from outside of the game tho
|
||||
E.g. you don't like the upper transition between Red Forest <-> Dead City then you'd find the "items_extra_level_transitions_deadcity.ltx" and disable (comment out) everything related to !one! transition point. You disable lines by putting a " ; " infront of the line.
|
||||
The transition between Dead City to Red Forest via the sewer pipe is disabled, in case you want to make it go to Red Forest again (like in New Routes mod) you can do this by re-enabling the transition and disabling the transition from Dead city to yantar in the config file for Yantar. The transition zones should be apptly named and easily identifyable.
|
||||
|
||||
|
||||
|
||||
Credits: Demonized, AlphaLion, Cpt. Gunner, GhenTuong, Jurkonov, Qball, Solais, xcvb, TheSmersh
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
; Bar -> Garbage (one way)
|
||||
[lc_rostok_west_garbage_north]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_rostok_west_garbage_north
|
||||
pos = 56.2870, -0.0015, 122.7513
|
||||
gvid = 1752
|
||||
spot = level_changer_down
|
||||
hint = esc_space_restrictor_to_garbage_descr
|
||||
to_pos = -194.6798, 2.4084, 205.5613
|
||||
dir = 0,30,0 ;; actor facing
|
||||
to_gvid = 869
|
||||
|
||||
|
||||
; Bar <-> Garbage new immmersified shortcut transition
|
||||
[lc_rostok_south_garbage_north]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true ;; mandatory field
|
||||
story_id = lc_rostok_south_garbage_north ;; story_id, without it the item wont be added
|
||||
pos = 191.1017, 6.7427, -151.0793 ;; position of item
|
||||
gvid = 1786 ;; Gvid of item
|
||||
spot = level_changer_down ;; texture to use for spot on the map
|
||||
hint = esc_space_restrictor_to_garbage_descr ;; string id for hint description, defined in xml files
|
||||
to_pos = -16.1229,0.4275,260.8406 ;; position where to teleport actor
|
||||
dir = 0,80,0 ;; actor facing, **alternate 'dir = 0,230,0'
|
||||
to_gvid = 865 ;; Gvid where to teleport actor
|
||||
|
||||
[lc_garbage_north_rostok_south]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_garbage_north_rostok_south
|
||||
pos = -34.3015,3.9882,274.2156
|
||||
gvid = 783
|
||||
spot = level_changer_up
|
||||
hint = space_restrictor_to_bar_desc
|
||||
to_pos = 200.1739, 6.0103, -150.7833
|
||||
dir = 0,95,0
|
||||
to_gvid = 1786
|
||||
|
||||
; ; Truck cemetery <-> Bar removed new levels dont agree
|
||||
; [lc_bar_truck_south]:lc_extra_level_transition_base
|
||||
; lc_extra_level_transition = true
|
||||
; story_id = lc_bar_truck_south
|
||||
; pos = 379.8, 13.4, -144.9
|
||||
; gvid = 1790
|
||||
; spot = level_changer_right
|
||||
; hint = space_restrictor_to_tc_desc
|
||||
; to_pos = -316.351, 15.7484, -165.6453 ;-319.5008, 15.5684, -172.5969
|
||||
; dir = 0.789, -0.587, 0.180
|
||||
; to_gvid = 5262 ;5291
|
||||
|
||||
; [lc_truck_south_bar]:lc_extra_level_transition_base
|
||||
; lc_extra_level_transition = true
|
||||
; story_id = lc_truck_south_bar
|
||||
; pos = -324.4734, 15.8919, -173.9903
|
||||
; gvid = 5291
|
||||
; spot = level_changer_left
|
||||
; hint = space_restrictor_to_bar_desc
|
||||
; to_pos = 373.5, 12.3, -150.4
|
||||
; to_gvid = 1790
|
||||
; trigger_radius = 1.5
|
||||
|
||||
|
||||
; Truck cemetery <-> Bar original suggestion by TheSmersh
|
||||
;[lc_bar_truck_south]:lc_extra_level_transition_base
|
||||
;lc_extra_level_transition = true
|
||||
;story_id = lc_bar_truck_south
|
||||
;pos = 379.8, 13.4, -144.9
|
||||
;gvid = 1790
|
||||
;spot = level_changer_right
|
||||
;hint = space_restrictor_to_tc_desc
|
||||
;to_pos = -318.7, 20.2, -393.9
|
||||
;to_gvid = 5286
|
||||
|
||||
;[lc_truck_south_bar]:lc_extra_level_transition_base
|
||||
;lc_extra_level_transition = true
|
||||
;story_id = lc_truck_south_bar
|
||||
;pos = -325.5, 21.2, -398.1
|
||||
;gvid = 5286
|
||||
;spot = level_changer_left
|
||||
;hint = space_restrictor_to_bar_desc
|
||||
;to_pos = 373.5, 12.3, -150.4
|
||||
;to_gvid = 1790
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
; CNPP South <-> CNPP North
|
||||
[lc_cnpp_east_cnpp2_east]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true ;; mandatory field
|
||||
story_id = lc_cnpp_east_cnpp2_east ;; story_id, without it the item wont be added
|
||||
pos = 1062.1354, -0.0985, -0.0381 ;; position of item
|
||||
gvid = 3223 ;; Gvid of item
|
||||
spot = level_changer_up ;; texture to use for spot on the map
|
||||
hint = gen_space_restrictor_to_aes2_descr ;; string id for hint description, defined in xml files
|
||||
to_pos = 999.8849, -0.0999, 109.8474 ;; position where to teleport actor
|
||||
;dir = 0,80,0 ;; actor facing, **alternate 'dir = 0,230,0'
|
||||
to_gvid = 3445 ;; Gvid where to teleport actor
|
||||
|
||||
[lc_cnpp2_east_cnpp_east]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_cnpp2_east_cnpp1_east
|
||||
pos = 1000.2069, -0.0999, 95.0695
|
||||
gvid = 3445
|
||||
spot = level_changer_down
|
||||
hint = gen_space_restrictor_to_aes2_descr
|
||||
to_pos = 1056.7258, -0.0993, -15.0864
|
||||
dir = 0,90,0
|
||||
to_gvid = 3087
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
; Dead City <-> Grimwood
|
||||
[lc_dead_city_road_grim_west]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_dead_city_road_grim_west
|
||||
pos = 175.71, 2.99, 2.29
|
||||
gvid = 2327
|
||||
spot = level_changer_right
|
||||
text = st_level_changer_descr
|
||||
hint = space_restrictor_to_grim_desc
|
||||
to_pos = -292.03, 7.46, 46.53 ;-294.8082, 7.4105, 46.3330 ;-284.1106, 7.3163, 42.7623
|
||||
dir = 0,60,0
|
||||
to_gvid = 5560
|
||||
|
||||
[lc_grim_west_dead_city_road]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_grim_west_dead_city_road
|
||||
pos = -298.7502, 7.2873, 47.1749 ;-288.6048, 7.2686, 46.0168
|
||||
gvid = 5560
|
||||
spot = level_changer_left
|
||||
text = st_level_changer_descr
|
||||
hint = space_restrictor_to_deadcity_desc
|
||||
to_pos = 165.4732, 2.9781, 4.4394
|
||||
dir = 0,90,0
|
||||
to_gvid = 2327
|
||||
;trigger_radius = 1.5
|
||||
|
||||
|
||||
; Dead City <-> Red Forest
|
||||
[lc_dead_city_west_red_forest west]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_dead_city_west_red_forest west
|
||||
pos = 174.9990, -2.6538, -50.3010 ;155.4070, -2.5587, -40.9181
|
||||
gvid = 2390
|
||||
spot = level_changer_up
|
||||
hint = mil_space_restrictor_to_red_1_descr
|
||||
to_pos = -132.8405, -6.1449, -289.3477 ;-156.6639, 0.6579, -312.9990
|
||||
dir = 0,30,0
|
||||
to_gvid = 2792 ;2847
|
||||
;trigger_radius = 1.3
|
||||
|
||||
[lc_red_forest sewer_dead_city_west]:lc_extra_level_transition_base ; on sewer pipe
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_red_forest sewer_dead_city_west
|
||||
pos = -147.0433, -4.1619, -288.1351
|
||||
gvid = 2837
|
||||
spot = level_changer_down
|
||||
hint = space_restrictor_to_deadcity_desc
|
||||
to_pos = 168.1035, -2.6257, -49.6608 ; 154.8109, -2.6685, -28.3135
|
||||
dir = 0,90,0
|
||||
to_gvid = 2390 ; 2204
|
||||
; trigger_radius = 2.0
|
||||
|
||||
; [lc_red_forest west_dead_city_west]:lc_extra_level_transition_base ; door on bridge level
|
||||
; lc_extra_level_transition = true
|
||||
; story_id = lc_red_forest west_dead_city_west
|
||||
; pos = -165.9319, 0.9899, -313.1411
|
||||
; gvid = 2847
|
||||
; spot = level_changer_down
|
||||
; hint = space_restrictor_to_deadcity_desc
|
||||
; to_pos = 154.8109, -2.6685, -28.3135
|
||||
; ;dir = 0,60,0
|
||||
; to_gvid = 2404
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
; Cordon <-> Darkscape Traintunnel
|
||||
[lc_cordon_east_darkscape_train_tunnel]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_cordon_east_darkscape_train_tunnel
|
||||
pos = 394.1906, 20.1711, 290.3670
|
||||
gvid = 638
|
||||
spot = level_changer_right
|
||||
hint = esc_space_restrictor_to_darkscape_descr
|
||||
to_pos = 349.5786, 20.1163, 285.8858
|
||||
dir = 0,30,0
|
||||
to_gvid = 1398
|
||||
trigger_radius = 1.2
|
||||
|
||||
[lc_darkscape_train_tunnel_cordon_east]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_darkscape_train_tunnel_cordon_east
|
||||
pos = 336.9702, 20.1165, 285.9505
|
||||
gvid = 1407
|
||||
spot = level_changer_left
|
||||
hint = ds_space_restrictor_to_escape_descr
|
||||
to_pos = 382.9006, 20.1699, 283.7180
|
||||
dir = 0,90,0
|
||||
to_gvid = 638
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
; Military Warehouse <-> Promzone
|
||||
[lc_warehouse_south_promzone_south]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_warehouse_south_promzone_south
|
||||
pos = -217.1257, 0.7621, -64.3403
|
||||
gvid = 2175
|
||||
spot = level_changer_right
|
||||
hint = st_space_restrictor_to_prom_descr
|
||||
to_pos = -170.8769, -23.7598, -167.3539 ;-171.0050, -21.9115, -172.8518
|
||||
dir = 0.222, -0.238, 0.946 ;0.474, -0.031, 0.880
|
||||
to_gvid = 5429
|
||||
trigger_radius = 1.5
|
||||
|
||||
[lc_promzone_south_warehouse_south]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_promzone_south_warehouse_south
|
||||
pos = -171.8078, -21.2987, -174.2657
|
||||
gvid = 5429
|
||||
spot = level_changer_left
|
||||
hint = space_restrictor_to_military_desc
|
||||
to_pos = -217.1697, -0.0484, -55.7299 ;-217.5727, 0.4712, -59.8789
|
||||
dir = -0.048, -0.115, 0.992 ;0.142, -0.148, 0.979
|
||||
to_gvid = 2175
|
||||
; trigger_radius = 1.5
|
||||
|
||||
|
||||
; Freedom Tunnel <-> Promzone
|
||||
[lc_warehouse_east_promzone_west]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_warehouse_east_promzone_west
|
||||
pos = 105.8052, -13.2056, 50.7543
|
||||
gvid = 2041
|
||||
spot = level_changer_right
|
||||
hint = st_space_restrictor_to_prom_descr
|
||||
to_pos = -432.7729, -28.7318, 69.9320 ;-445.0133, -28.7352, 69.9898
|
||||
dir = 0,30,0
|
||||
to_gvid = 5415
|
||||
;trigger_radius = 3.5
|
||||
|
||||
[lc_promzone_west_warehouse_east]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_promzone_west_warehouse_east
|
||||
pos = -449.4893, -28.8232, 73.1100
|
||||
gvid = 5415
|
||||
spot = level_changer_left
|
||||
hint = space_restrictor_to_military_desc
|
||||
to_pos = 98.8238, -13.2057, 50.8360 ;101.3890, -13.2054, 50.7779
|
||||
dir = 0,90,0
|
||||
to_gvid = 2041
|
||||
;trigger_radius = 0.9
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
; Wild Territory -> Grimwood
|
||||
[lc_rostok_west_grim_south]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_rostok_west_grim_south
|
||||
pos = -289.78, 0.09, 192.05
|
||||
gvid = 1958
|
||||
spot = level_changer_up
|
||||
hint = space_restrictor_to_grim_desc
|
||||
to_pos = -49.7924, -5.1809, -194.5892 ;-49.6707, -4.5634, -196.0035 ;-47.9382, -1.1408, -200.4666
|
||||
to_gvid = 5604
|
||||
|
||||
[lc_grim_south_rostok_west]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_grim_south_rostok_west
|
||||
pos = -49.7952, -1.4925, -200.5192
|
||||
gvid = 5604
|
||||
spot = level_changer_down
|
||||
hint = space_restrictor_to_rostok_desc
|
||||
to_pos = -283.7832, 0.0969, 192.5535
|
||||
dir = 0,30,0
|
||||
to_gvid = 1849
|
||||
|
||||
|
||||
; Agroprom -> Wild Territory (one way)
|
||||
[lc_agro_north_rostok_south]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_agro_north_rostok_south
|
||||
pos = 69.3176, 11.3754, 210.5387
|
||||
gvid = 883
|
||||
spot = level_changer_up
|
||||
hint = space_restrictor_to_rostok_desc
|
||||
to_pos = -27.1096, -3.4129, -179.7765
|
||||
;dir = 0,95,0
|
||||
to_gvid = 1953
|
||||
|
||||
|
||||
; Yantar <-> Wild Territory
|
||||
[lc_yantar_north_rostok_west]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_yantar_north_rostok_west
|
||||
pos = 163.10, 1.71, 82.70
|
||||
gvid = 2213
|
||||
spot = level_changer_up_right
|
||||
hint = space_restrictor_to_rostok_desc
|
||||
to_pos = -289.9959, 0.0235, 107.0288
|
||||
dir = 0,30,0
|
||||
to_gvid = 1958
|
||||
trigger_radius = 0.9
|
||||
|
||||
[lc_rostok_west_yantar_north]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_rostok_west_yantar_north
|
||||
pos = -292.0420, 0.1472, 106.6506 ;-289.78, 0.09, 192.05
|
||||
gvid = 1958 ;1849
|
||||
spot = level_changer_down_left
|
||||
hint = space_restrictor_to_yantar_desc
|
||||
to_pos = 165.2181, 1.2656, 70.9240
|
||||
dir = 0,90,0
|
||||
to_gvid = 2213
|
||||
trigger_radius = 0.9
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
; Zaton <-> Jupiter
|
||||
[lc_jupiter_north_zaton_south]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true ;; mandatory field
|
||||
story_id = lc_jupiter_north_zaton_south ;; story_id, without it the item wont be added
|
||||
pos = -340.5847, 3.5741, 415.0195 ;; position of item
|
||||
gvid = 4581 ;; Gvid of item
|
||||
spot = level_changer_up ;; texture to use for spot on the map
|
||||
hint = space_restrictor_to_zaton_desc ;; string id for hint description, defined in xml files
|
||||
to_pos = -275.5266, 38.8298, -476.3330 ;; position where to teleport actor
|
||||
dir = 0,30,0 ;; actor facing, **alternate 'dir = 0,230,0'
|
||||
to_gvid = 4167 ;; Gvid where to teleport actor
|
||||
trigger_radius = 1.5
|
||||
|
||||
[lc_zaton_south_jupiter_north]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_zaton_south_jupiter_north
|
||||
pos = -288.8179, 40.9423, -475.7296
|
||||
gvid = 4167
|
||||
spot = level_changer_down
|
||||
hint = space_restrictor_to_jupiter_desc
|
||||
to_pos = -352.3163, 27.6663, 442.2489
|
||||
dir = 0,60,0 ;; actor facing, **alternate 'dir = 0,230,0'
|
||||
to_gvid = 4822
|
||||
trigger_radius = 2.0
|
||||
|
||||
; Zaton <-> Outskirts questionable very long teleport
|
||||
[lc_zaton_east_outskirts_north]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_zaton_east_outskirts_north
|
||||
pos = 476.7127, 35.0672, 51.0224
|
||||
gvid = 4433
|
||||
spot = level_changer_right
|
||||
hint = space_restrictor_to_cop_pripyat_desc
|
||||
to_pos = -8.0005, -0.3025, 386.8188
|
||||
dir = 0,60,0
|
||||
to_gvid = 5007
|
||||
|
||||
[lc_outskirts_north_zaton_east]:lc_extra_level_transition_base
|
||||
lc_extra_level_transition = true
|
||||
story_id = lc_outskirts_north_zaton_east
|
||||
pos = -22.1619, -0.5085, 383.1399
|
||||
gvid = 4907
|
||||
spot = level_changer_left
|
||||
hint = space_restrictor_to_zaton_desc
|
||||
to_pos = 462.8077, 35.3672, 47.6661
|
||||
dir = 0,90,0
|
||||
to_gvid = 4433
|
||||
trigger_radius = 1.5
|
||||
+245
@@ -0,0 +1,245 @@
|
||||
-- UTILS
|
||||
-- Load the defaults
|
||||
local function load_defaults()
|
||||
local t = {}
|
||||
local op = lc_extra_transitions_mcm.op
|
||||
for i, v in ipairs(op.gr) do
|
||||
if v.def ~= nil then
|
||||
t[v.id] = v.def
|
||||
end
|
||||
end
|
||||
return t
|
||||
end
|
||||
local settings = load_defaults()
|
||||
|
||||
local function on_option_change()
|
||||
settings = load_defaults()
|
||||
if ui_mcm then
|
||||
for k, v in pairs(settings) do
|
||||
settings[k] = ui_mcm.get("extra_level_transitions/" .. k)
|
||||
end
|
||||
end
|
||||
end
|
||||
local function str_coords_to_vector(str)
|
||||
local t = str_explode(str, ",")
|
||||
if #t < 3 then
|
||||
error("str_coords_to_vector, missing %s coords", 3 - #t)
|
||||
end
|
||||
return vector():set(tonumber(t[1]), tonumber(t[2]), tonumber(t[3]))
|
||||
end
|
||||
|
||||
-- Transitions
|
||||
lc_pool = (function()
|
||||
local res = {}
|
||||
ini_sys:section_for_each(function(section)
|
||||
if SYS_GetParam(1, section, "lc_extra_level_transition", false) and SYS_GetParam(0, section, "story_id") then
|
||||
local n = ini_sys:section_exist(section) and ini_sys:line_count(section) or 0
|
||||
if (n > 0) then
|
||||
res[section] = {}
|
||||
for i = 0,n-1 do
|
||||
local _,id,val = ini_sys:r_line(section,i,"","")
|
||||
res[section][id] = val
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
return res
|
||||
end)()
|
||||
|
||||
local saved_spots = {}
|
||||
local change_triggered = false
|
||||
|
||||
local function find_save_spot(vid, gid)
|
||||
for k, v in pairs(saved_spots) do
|
||||
if v.vid == vid and
|
||||
v.gid == gid
|
||||
then
|
||||
return v
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function xr_conditions.is_actor_inside_lc(actor, npc, p)
|
||||
local lc = actor:id() == AC_ID and npc or actor
|
||||
local d = SYS_GetParam(2, lc:section(), "trigger_radius", 6)
|
||||
d = d * d
|
||||
return npc:position():distance_to_sqr(actor:position()) <= d
|
||||
end
|
||||
|
||||
function actor_on_first_update()
|
||||
on_option_change()
|
||||
if ui_mcm and ui_mcm.get("extra_level_transitions/delete_level_transitions") then
|
||||
ui_mcm.set("extra_level_transitions/delete_level_transitions", false)
|
||||
end
|
||||
|
||||
for sec,v in pairs(lc_pool) do
|
||||
local se = get_story_se_item(sec)
|
||||
local pos = str_coords_to_vector(v.pos)
|
||||
local vid = level.vertex_id(pos)
|
||||
local gid = tonumber(v.gvid)
|
||||
|
||||
if not (se) then
|
||||
se = alife():create(sec,pos,vid,gid)
|
||||
end
|
||||
|
||||
if (se.position:distance_to_sqr(pos) > 0.1) then
|
||||
TeleportObject(se.id,pos,vid,gid)
|
||||
end
|
||||
|
||||
if saved_spots[se.id] and saved_spots[se.id].spot and level.map_has_object_spot(se.id,saved_spots[se.id].spot) ~= 0 then
|
||||
level.map_remove_object_spot(se.id, saved_spots[se.id].spot)
|
||||
end
|
||||
|
||||
if (level.map_has_object_spot(se.id,v.spot) == 0) then
|
||||
level.map_add_object_spot_ser(se.id,v.spot,game.translate_string(v.hint))
|
||||
end
|
||||
saved_spots[se.id] = {
|
||||
spot = v.spot,
|
||||
sec = sec,
|
||||
id = se.id,
|
||||
vid = vid,
|
||||
gid = gid,
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
function delete_level_transitions()
|
||||
if ui_mcm and ui_mcm.get("extra_level_transitions/delete_level_transitions") then
|
||||
ui_mcm.set("extra_level_transitions/delete_level_transitions", false)
|
||||
local sim = alife()
|
||||
for i = 1, 65534 do
|
||||
local obj = sim:object(i)
|
||||
if obj then
|
||||
local sec = obj:section_name()
|
||||
if lc_pool[sec] then
|
||||
sim:release(obj)
|
||||
if level.map_has_object_spot(obj.id,saved_spots[obj.id].spot) ~= 0 then
|
||||
level.map_remove_object_spot(obj.id, saved_spots[obj.id].spot)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
empty_table(saved_spots)
|
||||
end
|
||||
end
|
||||
|
||||
--global distance calculation
|
||||
function get_travel_cost(se_obj)
|
||||
if not se_obj then return end
|
||||
|
||||
local sim = alife()
|
||||
local actor = db.actor
|
||||
local closest_smart_id
|
||||
for name,smart in pairs( SIMBOARD.smarts_by_names ) do
|
||||
if simulation_objects.is_on_the_same_level(sim:actor(), smart) then
|
||||
local dist = smart.position:distance_to(actor:position())
|
||||
local smrt = SIMBOARD.smarts[smart.id]
|
||||
if (smrt) and (not closest_smart_id or (dist < closest_smart_id[1])) then
|
||||
closest_smart_id = { dist, smart.id }
|
||||
end
|
||||
end
|
||||
end
|
||||
local closest_smart = alife_object(closest_smart_id[2])
|
||||
local dist = math.sqrt(warfare.distance_to_xz_sqr(global_position.from(closest_smart), global_position.from(se_obj)))
|
||||
return dist
|
||||
end
|
||||
|
||||
function is_gvid_on_the_actor_level(gvid)
|
||||
return game_graph():vertex(alife():actor().m_game_vertex_id):level_id() == game_graph():vertex(gvid):level_id()
|
||||
end
|
||||
|
||||
function teleport_actor(actor,obj)
|
||||
local sec = obj and obj:section()
|
||||
local v = sec and lc_pool[sec]
|
||||
|
||||
if (v and v.to_pos and v.to_gvid and not change_triggered) then
|
||||
local pos = str_coords_to_vector(v.to_pos)
|
||||
local dir = v.dir and str_coords_to_vector(v.dir) or VEC_ZERO
|
||||
local vid = level.vertex_id(pos)
|
||||
local gid = tonumber(v.to_gvid)
|
||||
|
||||
if settings.enable_time_advance then
|
||||
-- local saved_spot = find_save_spot(vid, gid)
|
||||
-- local d = saved_spot and get_travel_cost(alife_object(saved_spot.id)) or 1000
|
||||
local d = math.random(800, 1600)
|
||||
local dist = math.floor(d / SYS_GetParam(2, "actor", "walk_accel", 11.5) * random_float(0.75, 1.25))
|
||||
local hours = math.floor(dist / 60)
|
||||
local minutes = dist % 60
|
||||
|
||||
printf("advance time by %s, %s, distance %s, speed %s", hours, minutes, d, dist)
|
||||
level.change_game_time(0, hours, minutes)
|
||||
surge_manager.get_surge_manager().time_forwarded = true
|
||||
psi_storm_manager.get_psi_storm_manager().time_forwarded = true
|
||||
level_weathers.get_weather_manager():forced_weather_change()
|
||||
end
|
||||
|
||||
change_triggered = true
|
||||
|
||||
if v.snd then
|
||||
utils_obj.play_sound(v.snd)
|
||||
end
|
||||
|
||||
if v.on_teleport then
|
||||
local condlist = xr_logic.parse_condlist(obj, obj:section(), "on_teleport", v.on_teleport)
|
||||
xr_logic.pick_section_from_condlist(actor, obj, condlist)
|
||||
end
|
||||
|
||||
if is_gvid_on_the_actor_level(gid) then
|
||||
level.add_pp_effector("sleep_fade.ppe", 1313, false)
|
||||
|
||||
CreateTimeEvent(0,"delay_travel",3,function()
|
||||
db.actor:set_actor_position(pos)
|
||||
db.actor:set_actor_direction((dir.y * 180) / math.pi)
|
||||
change_triggered = false
|
||||
return true
|
||||
end)
|
||||
return
|
||||
end
|
||||
|
||||
ChangeLevel(pos,vid,gid,dir,true)
|
||||
-- level.disable_input()
|
||||
end
|
||||
end
|
||||
|
||||
function handle_nearby_actor(actor, obj)
|
||||
local sec = obj and obj:section()
|
||||
local v = sec and lc_pool[sec]
|
||||
|
||||
if not v then return end
|
||||
if change_triggered then return end
|
||||
|
||||
-- Evaluate precondition before enabling transition
|
||||
if (v.precondition and v.precondition ~= "") then
|
||||
local precond_list = xr_logic.parse_condlist(obj, nil, "precondition", v.precondition)
|
||||
if (precond_list == "false") then
|
||||
return
|
||||
end
|
||||
if (actor and xr_logic.pick_section_from_condlist(actor, obj, precond_list) == "false") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if v.disable_dialog then
|
||||
teleport_actor(actor, npc)
|
||||
else
|
||||
local dialog = lc_extra_transitions_ui.create_dialog()
|
||||
dialog:SetObj(obj)
|
||||
dialog:Show()
|
||||
end
|
||||
end
|
||||
|
||||
function save_state(m_data)
|
||||
m_data.lc_extra_transitions_saved_spots = saved_spots
|
||||
end
|
||||
|
||||
function load_state(m_data)
|
||||
saved_spots = m_data.lc_extra_transitions_saved_spots or {}
|
||||
end
|
||||
|
||||
function on_game_start()
|
||||
RegisterScriptCallback("actor_on_first_update",actor_on_first_update)
|
||||
RegisterScriptCallback("on_option_change", on_option_change)
|
||||
RegisterScriptCallback("on_option_change", delete_level_transitions)
|
||||
RegisterScriptCallback("save_state",save_state)
|
||||
RegisterScriptCallback("load_state",load_state)
|
||||
end
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
local to_del = {
|
||||
["grim_level_changer_to_cit"] = true,
|
||||
["grim_space_restrictor_to_cit"] = true,
|
||||
["cit_level_changer_to_grim"] = true,
|
||||
["cit_space_restrictor_to_grim"] = true,
|
||||
["mil_level_changer_to_prom"] = true,
|
||||
["mil_space_restrictor_to_prom"] = true,
|
||||
["prom_level_changer_to_military"] = true,
|
||||
["prom_space_restrictor_to_military"] = true,
|
||||
}
|
||||
|
||||
function actor_on_first_update()
|
||||
for i = 1, 65534 do
|
||||
local se_obj = alife_object(i)
|
||||
if se_obj and se_obj.name and se_obj:name() and to_del[se_obj:name()] then
|
||||
alife_release(se_obj)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function on_game_start()
|
||||
RegisterScriptCallback("actor_on_first_update", actor_on_first_update)
|
||||
end
|
||||
@@ -0,0 +1,31 @@
|
||||
[General]
|
||||
gameName=stalkeranomaly
|
||||
modid=0
|
||||
version=d2024.3.25.0
|
||||
newestVersion=
|
||||
category="-1,"
|
||||
nexusFileStatus=1
|
||||
installationFile=Extra_level_transitions_bonus_transitions.2.zip
|
||||
repository=
|
||||
ignoredVersion=
|
||||
comments=
|
||||
notes=
|
||||
nexusDescription=
|
||||
url=
|
||||
hasCustomURL=false
|
||||
lastNexusQuery=
|
||||
lastNexusUpdate=
|
||||
nexusLastModified=2024-03-25T08:52:53Z
|
||||
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
|
||||
size=1
|
||||
1\fileid=0
|
||||
|
||||
[Plugins]
|
||||
BAIN%20Installer\option0=Extra_Transitions_new_maps
|
||||
Reference in New Issue
Block a user