example of adding NPCs & mutants to all.spawn

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

Postby EggChen on 08 Nov 2008 14:45

Yep, exactly, except your one off spawn should not have the following text :

Code: Select all
[respawn]
conditions = 50


I don't know if it would cause a problem or just be ignored by the game, but probably best to be safe.
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Postby ket on 09 Nov 2008 15:54

Alright. Lastly just to be absolutely sure, I can use a respawn approach to also have an inital spawn right? I'm lazy and don't want to have to make inital spawns as well you see :tongue:
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 09 Nov 2008 16:58

Nope, a respawn and an initial (or once only) spawn are totally seperate and controlled by different scripts. You will need separate entries in the all.spawn.

You see an initial spawn is one entity, or object, in the game. It can be given very specific logic in the all.spawn without heavy scripting. Think of that one flesh that suicides into the anomaly near Sid's bunker as a kind of lesson to Marked One. That is designed to spawn when you get near it, then has logic to run directly into the anomoly, it even has lower health than normal to ensure it dies!!

You could not make a respawned flesh do that. A respawn of a flesh would have many objects, so say respawning up to 8. Each one could have basic logic, like which smart_terrain it should go for. You could not as far as I am aware determine each entities starting health (in the all.spawn, you could in an ltx by creating a new "version" of a flesh). Also respawn positions are random in an area around that defined in all.spawn, so you cannot be very specific with their locations.

Every initial spawn of dogs and boars in Cordon start with about 20% health, ever notice they are easy to drop? Respawns have 100%, so after a few hours in Cordon it would seem to get harder, but you would have better equipment, it is a pretty clever way of giving an easy start without making Cordon too easy on return trips.

The good thing is though, I would say you only need to really worry about initial spawns in Cordon and maybe Garbage, by the time you get to other levels a respawn or two will have happened.

However remember initial spawns (probably more accurately called one off spawns) can be usefull for certain events, they can be called at any stage in the game. You could have lots of these individual spawns set up ready, and when a certain info-portion is activated, they all spawn (pardon the pun).

So, when Sid warns that the military will be more active after the Blockpost raid, you could use all.spawn to spawn a one off patrol chopper or APC on completion of that mission.
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Postby ket on 09 Nov 2008 17:05

Ah ok, I think I get it all now. Thanks mr.egg! :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 ket on 09 Nov 2008 18:23

Any idea why ACDC is acting like a tard? I really do hate ACDC sometimes, the only thing I've done to test things out is add this;

[872]
; cse_abstract properties
section_name = respawn
name = tushkano_0001
position = 138.99, -1.31, 262.13
direction = 0,0,0

; cse_alife_object properties
game_vertex_id = 402
distance = 300
level_vertex_id = 358534
object_flags = 0xffffffff
custom_data = <<END

[respawn]
conditions = 0
respawn_section = tushkano, 20
;max_count = 12
;min_count = 5
max_spawn = 20
idle_spawn = medium
[smart_terrains]
none = true
END


Error message is saying it "died" at somepoint.
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 09 Nov 2008 18:34

Looks OK, I cannot be sure until I can compare it with other respawns though, that would be tomorrow...

Couple of things I would check first, is that [872] definately a unique number? Also the name tushkano_0001 needs to be unique, so I tend to follow the naming convention that gsc used....

levelname_item_number

So for that example I would use esc_tushkano_respawn_0001

The reason for adding "respawn" is that if you were doing any one off spawns you would probably want to call that esc_tushkano_0001.

Finally it may even be the condition = 0 variable, try with a number between 1 and 100.

All.spawn and acdc is very much trial and error I am afraid, I always compile very often, so at least I know where to look!!
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Postby ket on 10 Nov 2008 00:50

Still no dice, ACDC is a real PITA at times. FYI I went back to a vanilla all.spawn and just added that one entry, so its deffinately ACDC being retarded about something. Thanks for your help so far Eggy :thumbright: :blob:
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 10 Nov 2008 00:57

I have added tushkano's like that, I'll compare what you have done to my entries tomorrow night, sorry not at home at the moment.

Will let you know if I work it out.

Oh, and, no problem :salute:
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Postby EggChen on 10 Nov 2008 20:21

Well a normal respawn looks like this, I think you may be having a problem because the shape and restrictor_type info is missing...

Code: Select all
[347]
; cse_abstract properties
section_name = respawn
name = esc2_farm_flesh_respawn
position = -141.150939941406,5.47297668457031,230.202789306641
direction = 0.0750908255577087,-0.00837768893688917,0.111214138567448

; cse_alife_object properties
game_vertex_id = 167
distance = 4.90000009536743
level_vertex_id = 109559
object_flags = 0xffffff3e
custom_data = <<END
[respawn]
respawn_section = flesh_weak,19, flesh_normal,14
;max_count = 8
;min_count = 3
max_spawn = 3
idle_spawn = medium
;conditions = {+agroprom_military_case_done} 80, 0
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_respawn properties


Also, the respawn in Darkvalley refers to this, so maybe try that first (unless you have added an entity called "tushkano" it would have a problem). Normally you see flesh_weak, boar_strong, etc, etc. The use of "tushkano" by itself would normally be for a smart terrain community.... You see the type of mutant (tushkano, boar, flesh) is not enough for a respawn, but is for a smart terrain.
Code: Select all
[respawn]
respawn_section = m_tushkano_e
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Postby ket on 10 Nov 2008 21:09

Thanks Egg. Looks like ACDC was throwing an epifit due to the shape stuff being missing. Now the riddle has been solved, some hardcore all.spawn editing is going to take place :D
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 10 Nov 2008 21:12

No worries (also I am sure you need m_tushkano_e, or tushkano_normal or something, not just tushkano)

You may already do this, but I compile often, and have a backup of the last all.spawn that did compile properly. In the event that something goes wrong, you have a safe point to start from.

Good luck.
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Postby ket on 11 Nov 2008 02:42

One last question, then hopefully all will go smoothly :tongue:

Do I need to add anything to any other file in order for the new respawns to work? I added some tushkanos and done a recompile to test them out, I went to the locations the tushkanos should of spawned at, but nothing. I also wondered the map looking for signs of them but nada.
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 11 Nov 2008 11:47

Problem is, if there is no smart terrain for them in Cordon, they will just wander off. Also respawns don't happen (I believe) within a certain distance of the actor. Try exiting the level, spending some time in Garbage and then coming back.

Couple of things to check....

Have you added them to smart_terrain_presets in config\misc?

Change a smart_terrain in all.spawn and in scripts\gulag_escape to accept them.... if you change one in all.spawn and it is also defined in the gulag_*levelname*.script file you should change both.

For testing purposes you could try esc_flesh_1 or esc_flesh_2. To change them in all.spawn, just find that smart terrain, and change the community to tushkano. Search for esc_flesh_1 and you will find it eventually.
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Postby ket on 11 Nov 2008 13:02

Ok. I have no problem with custom spawns having no smart terrains and just wandering where they feel like. It adds a very nice natural element IMO and truely means you never know where or when you may get attacked :thumbleft:
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 ket on 13 Nov 2008 23:22

*Runs to uncle Eggy* HELP ME! Two things are being a right nightmare to resolve, perhaps you have a solution :D

1. How can you add the cut mutants to all.spawn without ACDC fritzing?
2. Is there a way to make spawns happen at a specific time? Eg; making it so Poltergeists only spawn at night. Would upd: timestamp be the solution there?

So far the only thing I can think of to get the cut mutants into my mod is to script them, but thats not much of a tidy way once the player has died a few times in the same area...
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:33

Ah, did I gather from another thread that you are now using the perl version of acdc?? Good!!

Basically it won't compile becuase acdc does not know what these new sections are (eg: section_name = chimera_weak).

So right click the textfile called acdc.pl and edit, search for a mutant like dog_weak, and you will see somethign like :

Code: Select all
   m_dog_e               => 'se_monster',
   dog_weak            => 'se_monster',
   dog_normal            => 'se_monster',
   dog_strong            => 'se_monster',


Just add your mutants in the same way, same place. This also goes for any items (weapon, outfits, ammo), say you create a new outfit_military_m1 and spawn it behind the codelocked door in the Red Forest, acdc will not compile again. So this time search for another outfit, that you know is spawned somewhere like the basic Stalker suit, and add your outfit in the same way.

Sorry, I really don't know about the time thing. I know GSC originally planned this feature, but I have not seen any traces in the all.spawn. It seemed more likely it was a scripted feature, as you will find the times when it is considered day and night for a creature in the ltx files for that mutant. This is from m_bloodsucker.ltx

Code: Select all
DayTime_Begin               = 6
DayTime_End                  = 23
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Postby ket on 13 Nov 2008 23:44

Thanks uncle Eggy! :D Looks like for my latter issue I'll have to script in stuff like poltergeists, a simple chktime function will resolve it mostly.

ED - OT for a sec, a "cookie system" would be really cool here, instead of a rep or thanks system, each time somebody helps someone that person could "give them a cookie" :D
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 Nightwatch on 14 Nov 2008 00:19

In NEWSA+SIMBION there are quite good examples of both random spawns and checktime spawns, which are from both AMK and ABC. Though there a lot of cross-referencing done with many files particularly in regard to the application of the Horror-Times in the game (which even affects the repair kit and suits, weapons etc and behavioural functions), you can of course pinpoint the sections of scripts that you would feel useful for you. (At this point, I need to say -for my own sake :) - that I'm sure that you won't forget to give credit to AMK and/or ABC if their scripts used)
User avatar
Nightwatch
Site Admin
 
Posts: 2676
Joined: 13 Apr 2007 05:42
Location: London, United Kingdom

Postby ket on 14 Nov 2008 02:30

Thanks :D I'll probably stick to a checktime function though, quick, simple, and just as effective as a timed spawn without all the extra code bogging things down :tongue:

Does anyone have a stalker 1.0000 all.spawn kicking around? Theres some things I would like to look at in it, particularly in alife_l12_stancia and alife_l12_stancia_2.
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

PreviousNext

Return to Modding Techniques

Who is online

Users browsing this forum: No registered users and 20 guests

cron