--- Создание гулага --- Для
начала подумаем где мы хотим зделать ГУЛАГ.
В этом примере я
сделал гулаг на Кордоне в лагери новичков.
Начну из создания
smart_terrain.
Копируем вот это в alife_l01_escape.ltx
(предварительно распаковав all.spawn).
---------------------------------------------------------------------
[870]
; cse_abstract properties
section_name = smart_terrain
name = esc_new_gulag
position =
-208.03184509277,-20.361660003662,-170.2882232666
direction =
0.062321275472641,0.00316426996141672,0.0140644172206521
;
cse_alife_object properties
game_vertex_id = 50
distance = 0
level_vertex_id = 45245
object_flags = 0xffffffbe
custom_data
= <<END
[smart_terrain]
type = esc_new_gulag
capacity = 5
communities = stalker
stay = medium
END
; cse_shape properties
shapes = shape0
shape0:type = sphere
shape0:offset = 0,0,0
shape0:radius = 1
;
cse_alife_space_restrictor properties
restrictor_type = 0
;
se_smart_terrain properties
-------------------------------------------------------------------
type = esc_new_gulag - тип smart_terrain.
capacity = 5 -
количество НПС или мутантов.
communities = stalker - групировка.
-------------------------------------------------------------------
Теперь создадим 5 сталкерив. Здесь в подробности вникать нестану
так как все уже описано в статье о создании уникального НПС.
Единственное что ненужно так вот это:
[logic]
cfg =
scripts\news\escape\esc_rembo.ltx
story_id = 93
ну и впишем
тип smart_terrains:
[smart_terrains]
esc_new_gulag = true
Незабиваем о:
[871]...[875]
name =
esc_new_lager1...esc_new_lager5
проследить нумерацию в
последовательности.
(Например так.Еще 4 создадите сами!!!):
[871]
; cse_abstract properties
section_name = stalker
name = esc_new_lager1
position =
-208.0147857666,-20.364423751831,-170.70080566406
direction = 0,0,0
; cse_alife_trader_abstract properties
money = 5000
character_profile = esc_new_stalkery
; cse_alife_object
properties
game_vertex_id = 50
distance = 9.80000019073486
level_vertex_id = 45244
object_flags = 0xffffffbf
custom_data
= <<END
[smart_terrains]
esc_new_gulag = true
END
; cse_visual properties
visual_name =
actors\novice\green_stalker_2
; cse_alife_creature_abstract
properties
g_team = 0
g_squad = 12
g_group = 9
health = 1
dynamic_out_restrictions =
dynamic_in_restrictions =
upd:health = 1
upd:timestamp = 0x617a6b75
upd:creature_flags = 0x6b
upd:position =
-208.0147857666,-20.364423751831,-170.70080566406
upd:o_model = 0
upd:o_torso = 0,0,0
upd:g_team = 0
upd:g_squad = 12
upd:g_group = 9
; cse_alife_monster_abstract properties
upd:next_game_vertex_id = 65535
upd:prev_game_vertex_id = 65535
upd:distance_from_point = 0
upd:distance_to_point = 0
;
cse_alife_human_abstract properties
predicate5 = 2,2,0,1,1
predicate4 = 0,2,0,2
; cse_ph_skeleton properties
upd:start_dialog =
; se_stalker properties
--------------------------------------------------------------------
Теперь создадим в gamedata\config\gameplay новый файл
character_desc_new.xml
Его еще нужно добавить в system.ltx в
specific_characters_files = ...
вконце после
character_desc_sarcofag, character_desc_new
Теперь вставляем в
character_desc_new ето:
--------------------------------------------------------------------
<xml>
<!----------------------------------- STALKER NEW
----------------------------->
<specific_character
id="esc_new_stalkery_default1" team_default = "1">
<name>GENERATE_NAME_stalker</name>
<icon>ui_npc_u_green_stalker_2</icon>
<bio>esc_stalker_novice_bio</bio>
<class>esc_new_stalkery</class>
<community>stalker</community>
<terrain_sect>stalker_terrain</terrain_sect>
<rank>143</rank>
<reputation>12</reputation>
<money min="200"
max="600" infinitive="0"/>
<snd_config>characters_voice\human_01\newbie\</snd_config>
<crouch_type>-3</crouch_type>
<visual>actors\novice\green_stalker_2</visual>
<supplies>
[spawn] \n
wpn_pm \n
ammo_9x18_fmj = 1
\n
wpn_bm16 \n
ammo_12x70_buck \n
#include
"gameplay\character_items.xml" \n
#include
"gameplay\character_food.xml"
</supplies>
#include
"gameplay\character_criticals_3.xml"
<start_dialog>hello_dialog</start_dialog>
#include
"gameplay\character_dialogs.xml"
</specific_character>
<specific_character id="esc_new_stalkery_default2" team_default =
"1">
<name>GENERATE_NAME_stalker</name>
<icon>ui_npc_u_green_stalker_2</icon>
<bio>esc_stalker_novice_bio</bio>
<class>esc_new_stalkery</class>
<community>stalker</community>
<terrain_sect>stalker_terrain</terrain_sect>
<rank>121</rank>
<reputation>-7</reputation>
<money min="200"
max="600" infinitive="0"/>
<snd_config>characters_voice\human_01\newbie\</snd_config>
<crouch_type>-1</crouch_type>
<visual>actors\novice\green_stalker_2</visual>
<supplies>
[spawn] \n
wpn_pm \n
ammo_9x18_fmj = 1
\n
device_torch \n
#include "gameplay\character_items.xml" \n
#include "gameplay\character_food.xml"
</supplies>
#include "gameplay\character_criticals_3.xml"
<start_dialog>hello_dialog</start_dialog>
#include
"gameplay\character_dialogs.xml"
</specific_character>
</xml>
--------------------------------------------------------------------
Дальше в этой папке создаем еще npc_profile_new.xml и также прописиваем
в system.ltx
Вот так:
files = npc_profile,
npc_profile_new
И вставляем ето:
<?xml version='1.0'
encoding="UTF-8"?>
<xml>
<!-- STALKER NEW
-->
<character id="esc_new_stalkery">
<class>esc_new_stalkery</class>
</character>
</xml>
--------------------------------------------------------------------
Теперь в папку gamedata\scripts копируем xr_gulag.script и находим
вот ето:
--' в работах поле object хранит id объекта
level_gulags = {gulag_general, gulag_escape, gulag_garbage,
gulag_agroprom, gulag_agroprom_underground, gulag_dark_valley,
gulag_labx18, gulag_bar,
gulag_military, gulag_radar,
gulag_radar_u, gulag_yantar, gulag_pripyat, gulag_kishka,
gulag_sarcofag,
gulag_deadcity, gulag_new}
после
gulag_deadcity пишем: , gulag_new
Дальше в этой же папке создаем
gulag_new.script и вставляем в него ето:
--------------------------------------------------------------------
local t = {}
function load_job(sj, gname, type, squad, groups)
-- STALKERY NEW
if type == "esc_new_gulag" then
t = { section
= "logic@esc_new_gulag_kamp",
idle = 0,
prior = 9, state =
{0, 1},
online = true,
in_rest = "", out_rest = "",
predicate = function(obj_info)
return
obj_info.rank <= 800
end
}
table.insert(sj, t)
t = { section =
"logic@esc_new_gulag_kamp",
idle = 0,
prior = 9, state = {0,
1},
online = true,
in_rest = "", out_rest = "",
predicate
= function(obj_info)
return
obj_info.rank <= 800
end
}
table.insert(sj, t)
t = { section =
"logic@esc_new_gulag_guard1",
idle = 0,
prior = 11, state =
{0, 1},
online = true,
in_rest = "", out_rest = "",
predicate = function(obj_info)
return
obj_info.rank <= 800
end
}
table.insert(sj, t)
t = { section =
"logic@esc_new_gulag_guard2",
idle = 0,
prior = 11, state =
{0, 1},
online = true,
in_rest = "", out_rest = "",
predicate = function(obj_info)
return
obj_info.rank <= 800
end
}
table.insert(sj, t)
t = { section =
"logic@esc_new_gulag_guard3",
idle = 0,
prior = 11, state =
{0, 1},
online = true,
in_rest = "", out_rest = "",
predicate = function(obj_info)
return
obj_info.rank <= 800
end
}
table.insert(sj, t)
end
end
function
load_states(gname, type)
if type == "esc_new_gulag" then
return function(gulag)
return 0
end
end
end
function load_ltx(gname, type)
return nil
end
function
checkStalker(npc_community, gulag_type)
if gulag_type ==
"esc_new_gulag" then
return npc_community == "stalker"
end
return false
end
function checkMonster(npc_community,
gulag_type)
return false
end
------------------------------------------------------------------
Теперь в папке config\misc\ создаем файл gulag_new.ltx.
Открываем
gulag_tasks.ltx и прописываем свой gulag_new.ltx
вот так до
остальных #include "gulag_new.ltx"
И вставляем в него этот текст:
------------------------------------------------------------------
;---------------------------------------
;-- НОВИЙ ГУЛАГ
;---------------------------------------
[logic@esc_new_gulag_kamp]
active = kamp@esc_new_gulag_kamp
[kamp@esc_new_gulag_kamp]
center_point = kamp
[logic@esc_new_gulag_guard1]
active = walker@esc_new_gulag_guard1_stay
[walker@esc_new_gulag_guard1_stay]
path_walk = guard1_stay
path_look = guard1_look
[logic@esc_new_gulag_guard2]
active
= walker@esc_new_gulag_guard2_stay
[walker@esc_new_gulag_guard2_stay]
path_walk = guard2_stay
path_look = guard2_look
[logic@esc_new_gulag_guard3]
active
= walker@esc_new_gulag_guard3_stay
[walker@esc_new_gulag_guard3_stay]
path_walk = guard3_stay
path_look = guard3_look
------------------------------------------------------------------
Ну и в way_l01_escape.ltx вставляем ето:
------------------------------------------------------------------
[esc_new_gulag_kamp]
points = p0
p0:name = wp00
p0:position = -223.39497375488,-19.687782287598,-129.3963470459
p0:game_vertex_id = 63
p0:level_vertex_id = 30995
[esc_new_gulag_guard1_look]
points = p0
p0:name = wp00|s=state
p0:flags = 0x1
p0:position =
-204.4189453125,-20.532506942749,-145.22052001953
p0:game_vertex_id
= 57
p0:level_vertex_id = 48482
[esc_new_gulag_guard1_stay]
points = p0
p0:name = wp00
p0:flags = 0x1
p0:position =
-205.25961303711,-19.871799468994,-132.56860351563
p0:game_vertex_id = 58
p0:level_vertex_id = 47854
[esc_new_gulag_guard2_stay]
points = p0,p1,p2
p0:name =
wp00|p=100|t=30000
p0:flags = 0x1
p0:position =
-185.18380737305,-20.208131790161,-167.6314239502
p0:game_vertex_id
= 52
p0:level_vertex_id = 65568
p0:links = p1(1)
p1:name = wp01
p1:position =
-165.30274963379,-20.16362953186,-143.88339233398
p1:game_vertex_id
= 45
p1:level_vertex_id = 84668
p1:links = p2(1)
p2:name = wp02|p=100|t=30000
p2:flags = 0x2
p2:position =
-126.54725646973,-9.5130100250244,-150.33459472656
p2:game_vertex_id = 44
p2:level_vertex_id = 125463
p2:links =
p0(1)
[esc_new_gulag_guard2_look]
points = p0,p1,p2
p0:name = wp00|p=100|t=30000
p0:flags = 0x1
p0:position =
-185.89582824707,-20.203666687012,-155.79675292969
p0:game_vertex_id = 52
p0:level_vertex_id = 64929
p1:name =
wp01
p1:position =
-165.30274963379,-20.16362953186,-143.88339233398
p1:game_vertex_id
= 45
p1:level_vertex_id = 84668
p2:name =
wp02|p=100|t=30000
p2:flags = 0x2
p2:position =
-129.72200012207,-21.661985397339,-205.64596557617
p2:game_vertex_id = 105
p2:level_vertex_id = 122241
[esc_new_gulag_guard3_stay]
points = p0
p0:name =
wp00|p=100|t=30000
p0:flags = 0x1
p0:position =
-219.13510131836,-19.931188583374,-158.81829833984
p0:game_vertex_id = 47
p0:level_vertex_id = 34720
[esc_new_gulag_guard3_look]
points = p0
p0:name =
wp00|p=100|t=30000
p0:flags = 0x1
p0:position =
-227.1178894043,-20.305515289307,-158.93872070313
p0:game_vertex_id
= 48
p0:level_vertex_id = 27832
-------------------------------------------------------------------
Все. Можно запаков. all.spawn и смотреть как работает!!!
Если все
сделали без ошибок то повино зявитись 5 новых сталкерив:
2 сидячих в
разрушенном доме (kamp) 1 слева, стоячие на месте 1 около
Волка а 2
в доме второй справа, патрульний в конце деревни под деревом
Он
еще выходит из деревни на дорогу и смотрит нет ли гостей из КПП.