Templates for adding spawns to all.spawn

Discussions on Modding of S.T.A.L.K.E.R. SoC & Clear Sky

Templates for adding spawns to all.spawn

Postby ket on 13 Nov 2008 16:12

This thread is to simplify all.spawn editing. It will be updated as I progress through my own all.spawn editing.. so basically a template for every kind of NPC and vehicle will end up in here :tongue:

Template for a NPC

[874]
; cse_abstract properties
section_name = stalker
name = esc_bandit_0001
position = -169.59,-28.17,-322.55
direction = 0,0,0

; cse_alife_trader_abstract properties
money = 5000
character_profile = esc_bandit_novice

; cse_alife_object properties
game_vertex_id = 73
distance = 15
level_vertex_id = 168210
object_flags = 0xffffffbf
custom_data = <<END
[smart_terrains]
none = true
END

; cse_visual properties
visual_name = actors\bandit\stalker_bandit_master

; cse_alife_creature_abstract properties
g_team = 0
g_squad = 0
g_group = 0
health = 1
dynamic_out_restrictions =
dynamic_in_restrictions =

upd:health = 1
upd:timestamp = 0
upd:creature_flags = 0
upd:position = -169.59,-28.17,-322.55
upd:o_model = 0
upd:o_torso = 0,0,0
upd:g_team = 0
upd:g_squad = 0
upd:g_group = 0

; 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 = 0,1,0,2,1
predicate4 = 2,1,0,0

upd:start_dialog =



Template for a mutant

[873]
; cse_abstract properties
section_name = bloodsucker_weak
name = esc_bloodsucker_0001
position = -220.88,-18.31,-168.64
direction = 0,0,0

; cse_alife_object properties
game_vertex_id = 73
distance = 4
level_vertex_id = 168210
object_flags = 0xffffffbf
custom_data = <<END
[smart_terrains]
none = true
END

; cse_visual properties
visual_name = monsters\krovosos\krovosos

; cse_alife_creature_abstract properties
g_team = 0
g_squad = 0
g_group = 0
health = 1
dynamic_out_restrictions =
dynamic_in_restrictions =

upd:health = 1
upd:timestamp = 0
upd:creature_flags = 0
upd:position = -166.77,-18.39,-128.83
upd:o_model = 0
upd:o_torso = 0,0,0
upd:g_team = 0
upd:g_squad = 0
upd:g_group = 0

; 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


So whats what then?

This is a simple breakdown of the "need to know" aspects of these templates.

section_name - Definition of the type of spawn. IE; bandit, stalker, controller, bloodsucker, etc.

Name - Not particularly any relation to the above but equally important. In the template esc_bloodsucker_0001 breaks into level>mutant>"ID" of mutant. The last point must always be different if adding more than a single one off spawn entry of a particular mutant\NPC in a level. IE; if adding 2 bloodsucker one off spawns the names would look like so;

esc_bloodsucker_0001
esc_bloodsucker_0002

Position - The co-ordinates the mutant\NPC will spawn around.

Direction - What way a NPC\mutant will face when spawned. Best left at 0,0,0.

Distance - How far the NPC\mutant is allowed to "wander". I'm unsure of the maximum value, I assume 300.

[smart_terrains] - Allows you to define a specific path. In the template none = true lets the NPC\mutant wander wherever they feel like and do whatever they want.

cse_visual_properties - Directory of the mutant\NPCs skin texture.

g_team\g_squad\g_group - Experimenting seems to show that these options do the following;

Allows NPC\mutant to decide randomly if they want to join another of their "kind"

Allows NPC\mutant to not act so "civillian" in a team. In other words, they seem to help eachother more not just follow eachother around.

A friendly sort of gathering. Seems to be a mix of the former two.

Other options such as game_vertex_id should be taken from the all.spawn file your editing and changing accordingly.

upd:position - Set this the same as Position.

upd:g_team\upd:g_squad\upd:g_group - Your probably supposed to set these the same as g_team\g_squad\g_group paramaters.

Hopefull this helps all.spawn first-timers out :thumbleft: More templates will come as and when I get to doing them.
Mobo: MSI X570 Tomahawk
CPU: R7 3700X @ 4.4GHz 1.3v
RAM: 2x16GB Klevv BoltX 3600MHz 16-20-20-35
GPU: Powercolor 6800XT Red Devil
Sound: Asus Xonar DX 7.1 PCI-E, Realtek ALC1200
HDD: 250GB & 500GB nVME 3.0 M.2 drives, 2TB Seagate Barracuda, Sata3 64MB Cache, 250GB Hynix SL301
Opticals: DVD-RW, Blu-Ray
PSU: eVGA 1000w G2 Supernova
Case: NZXT Phantom 530

STALKER: Singularity (SIN) homepage
User avatar
ket
Senior Resident
 
Posts: 1262
Joined: 14 Sep 2008 11:57
Location: The solar system

Postby EggChen on 13 Nov 2008 23:09

Only thing I would mention here ket is the game_vertex_id, you should collect these when collecting co-ordinates (you can use ZRP for this), rather than copying those already in all.spawn.

In some cases where I just used position, the position of the item was not exactly where it should have been. This also applies to level_vertex_id, they should all match each other.... you can see an example of the ZRP co-ordinates in this screenshot.

http://www.mediafire.com/imageview.php? ... x2&thumb=6

ket - If you want to keep the thread fairly tidy, I can delete this post for you after, you can update your original post if you wish. Just let me know :salute:
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Postby ket on 13 Nov 2008 23:17

ZRP is a pain in the arse, I could never get it to work like it should, but your right, those who can use ZRP do as eggchen says, it just makes things more precise :thumbright:
Mobo: MSI X570 Tomahawk
CPU: R7 3700X @ 4.4GHz 1.3v
RAM: 2x16GB Klevv BoltX 3600MHz 16-20-20-35
GPU: Powercolor 6800XT Red Devil
Sound: Asus Xonar DX 7.1 PCI-E, Realtek ALC1200
HDD: 250GB & 500GB nVME 3.0 M.2 drives, 2TB Seagate Barracuda, Sata3 64MB Cache, 250GB Hynix SL301
Opticals: DVD-RW, Blu-Ray
PSU: eVGA 1000w G2 Supernova
Case: NZXT Phantom 530

STALKER: Singularity (SIN) homepage
User avatar
ket
Senior Resident
 
Posts: 1262
Joined: 14 Sep 2008 11:57
Location: The solar system

Postby Victim on 24 Nov 2008 06:24

Just to add that the "custom_data" section is also the key to creating unique NPCs with a purpose:

custom_data = <<END
[logic]
cfg = scripts\darkvalley\your_own_stalker.ltx
END


"your_own_stalker.ltx":

[logic]
active = walker
suitable = {=check_npc_name(your_own_stalker)} true
on_combat = combat
on_meet = meet
on_death = death

[walker]
path_walk = your_own_stalker_walk
path_look = your_own_stalker_look
invulnerable = true
meet = meet
no_retreat = true
on_info = {+cs_valley_stalker_relax} walker@wait
danger = danger_condition
combat_ignore_cond = {=fighting_dist_ge(5)}
def_state_campering = threat
def_state_campering_fire = threat_fire

[walker@wait]
path_walk = your_own_stalker_go
path_look = your_own_stalker_go
invulnerable = false
meet = meet@meet
on_info = {+cs_valley_stalker_freedom} walker@freedom
def_state = sit_ass


"way_darkvalley.ltx":

[your_own_stalker_go]
points = p0
p0:name = name00|a=sit_ass
p0:position = -111.564636230469,0.766271710395813,-501.856811523438
p0:game_vertex_id = 805
p0:level_vertex_id = 46509


[your_own_stalker_look]
points = p0
p0:name = name00|a=hide_na
p0:position = -97.4005889892578,0.976510286331177,-524.08251953125
p0:game_vertex_id = 805
p0:level_vertex_id = 61043


[your_own_stalker_walk]
points = p0
p0:name = name00|a=hide_na
p0:position = -98.4005889892578,0.976510286331177,-520.08251953125
p0:game_vertex_id = 805
p0:level_vertex_id = 61043


Hopefully it's ok to post this here. Delete/move if you need to.

EDIT/ Just to clarify that I'm not sure if this stuff has already been covered here but if not, then the above info just gets the NPC to move to another position by using an info_portion to move to the [walker@wait] section which activates the your_own_stalker_go portion of the way_darkvalley file.
Victim
Senior Resident
 
Posts: 19
Joined: 22 Nov 2008 11:57


Return to Modding Techniques

Who is online

Users browsing this forum: No registered users and 27 guests

cron