example of adding NPCs & mutants to all.spawn

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

Postby DC- on 18 Sep 2008 20:04

Hm, no idea then sorry.
Never had that happen to me. Any errors I encountered gave me an error description and the corresponding line and file.
Come over here, let's have a little chat...
User avatar
DC-
Senior Resident
 
Posts: 40
Joined: 15 Sep 2008 21:00
Location: Bonn, Germany

Postby EggChen on 18 Sep 2008 20:30

If it opens and closes, you probably are getting an error message but it is too quick to see. In that case, don't use the shortcut.

Manually open a command prompt, navigate to the correct folder and type in the command (you can find this by right clicking and "editing" the shortcut.

That way the command window stays open and you can see the error.

I recompile very often, that way I know where the error is, as sometimes the message is not that descriptive.
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Postby ket on 18 Sep 2008 21:10

According to the CMD acdc "died" (lol) at line 214 <GEN1> line 30203, which leads me to the next thing, heres a dl link for anyone who may need to check the file I edited. The stuff I done starts at entry [872] and ends at [903]

ltx DL linky
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 18 Sep 2008 22:24

I can't see anything wrong, well nothing that I think would cause acdc to fail. :?

I checked your names, section numbers, and the individual sections, they all look correct in terms of their setup. A couple of things I did notice :-

1) Have you ensured that any new creatures you have added, have been added to the acdc.pl file? Example "tushkano_strong"? I don't think this is the problem however, as usually that gives a "cannot find section" error.

2) You have copied my example, including the zombie_rise script reference, this is not in vanilla. Again this should not crash acdc, but would crash the game if it compiled. Happy to send you the script, it basically makes zombies "play dead". They get up off the ground when you get near, or if they take damage.

3) This might crash acdc... I don't know. I noticed on a few occasions you use the game vertex id and level vertex from my example, but different positions. The game vertex and level id's match the position, I use ZRP debug options which display all these on screen for the purpose of getting position details.

Other than that I didn't see anything, but will have another look. I am definately an all.spawn hacker though, so I may have missed something.
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Postby ket on 18 Sep 2008 22:44

Zombies "play dead" anyway don't they? I figured that script related to when you shoot a zombie and they fall down they stay there for a bit before getting up again.
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 18 Sep 2008 22:49

ket wrote:Zombies "play dead" anyway don't they? I figured that script related to when you shoot a zombie and they fall down they stay there for a bit before getting up again.


Yep, but these play dead on spawn, so they are on the ground like a dead zombie :lol: until you get near, then they get up. I have added them to the lake in Yantar, its pretty neat when they just get up out of the water!!

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

Postby ket on 18 Sep 2008 23:01

That does look very cool :D could you email me that script so I could use it in TK1.1? seeing those screns has given me some rather creepy ideas for that script 8)
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 18 Sep 2008 23:13

Done, sent it to the hotmail address in your profile.

Edit: I have also posted a link to my icons in your KET thread.
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Postby ket on 18 Sep 2008 23:46

Thanks m8 :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 ket on 19 Sep 2008 00:26

I think.. I'm going to put a spanner through my monitor. I've tried just about all I can think of and gone through the acdc.pl file, everything seems to be in order, I can compile and decompile all.spaw, but the instant I add something to one of the ltx files, BAM! acdc craps out. angry9: angry9: angry9: angry9:

ED- it wouldn't matter that I'm not adding any new waypoints in the corresponding way_l01_escape.ltx file would it?

ED2- issue solved.. I THINK acdc wasn't liking the conditional respawner stuff being left out.
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 Kanyhalos on 26 Sep 2008 16:59

Don't waste your time with all.spawn, that's a horrible file.:)
You can spawn npc's with alife create, just make new section names for new npc's in m_stalker.ltx, attach the profile names to them, and spawn them from bind_stalker.script, function actor_binder:net_spawn(data) and block it with an infoportion to avoid the multiple spawning.
You don't have to add all params like "health" etc., the net_packet() will create them by itself on spawning.
Using this method doesn't need new game. That's all.
DOWNLOAD Oblivion Lost 2.2 for 1.0004
http://rapidshare.de/files/40226819/OL2 ... 04.7z.html

DOWNLOAD Oblivion Lost 2.2 for 1.0005
http://rapidshare.de/files/40226610/OL2 ... 05.7z.html
User avatar
Kanyhalos
Senior Resident
 
Posts: 312
Joined: 26 Sep 2008 09:46
Location: Auburn:)

Postby ket on 07 Nov 2008 03:14

Just a quick one, when setting a condition for respawn in all.spawn (yes I like all.spawn, I can "control" things much easier in one file vs many) would I be right in thinking if I done this;

[respawn]
conditions = 0

Respawns will happen at random intervals?
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 07 Nov 2008 12:48

I don't believe so Ket, I think that means they will never spawn.

You see I am fairly sure that the number there is compared with a math.random of 1 to 100 and if the number in all.spawn is higher the spawn happens.... I say fairly sure because I can't script very well, but that is the way I read the se-respawn script.

Also my understanding ties in with entries in the all.spawn. This is the respawn condition for the Army blockpost in Cordon.

Code: Select all
[respawn]
respawn_section = esc_soldier_respawn_1, 13, esc_soldier_respawn_specnaz, 4
;max_count = 17
;min_count = 3
max_spawn = 8
idle_spawn = medium
conditions = 100
END


Now some others don't have any condition, they have been commented out, so I wonder if that also means they always happen at the given interval??

Code: Select all
[respawn]
respawn_section = esc_bandit_respawn_2,12, esc_bandit_respawn_1,9
;max_count = 8
;min_count = 1
max_spawn = 6
idle_spawn = medium
;conditions = {+esc_kill_bandits_quest_kill} 80, 0
END


Edit: I prefer all.spawn too!
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Postby ket on 07 Nov 2008 12:59

Alright, I'll try a value of 50 to start with just to see if that gives them like a 50% chance of spawning on level entry. I'm looking for the most dynamic way possible of letting mutants spawn. Scripting them in works ok to an extent, but eventually the engine gets bogged down and WHAM, CTD.
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 07 Nov 2008 13:16

If I read the se-respawn script correctly it works like this.. in very bad pseudo code.

Has minimum time passed since last respawn (defined in seldom, medium, etc)
- Repeat next two stages for the max_spawn_number defined in all.spawn.
- Math.random check against condition in all.spawn.
- If math.random is lower, spawn.
- Store respawn time for use in first stage next time.

So you could use a high max spawn figure with your 50% to ensure you get some results in testing.

It certainly works for me, I respawn Mercs in Yantar, and every time I go there, there is a little battle going on with 3-5 mercs against the guards by the Bunker. The guards by the bunker usually win because I have their respawn chance set higher (90), so they repopulate more than the Mercs.
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Postby ket on 07 Nov 2008 15:51

Ok cool, so to clarify if I did something like this;

[1378]
; cse_abstract properties
section_name = tushkano
name = gar_tushkano_normal_0001
position = 138.99, -1.31, 262.13
direction = 0,0,0

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

[respawn]
conditions = 50
[smart_terrains]
none = true
END

; cse_visual properties
visual_name = monsters\tushkano\tushkano


It should work right?
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 07 Nov 2008 15:54

Nope, you have mixed up an initial spawn (section = tushkano) and a respawn.... Sorry buddy, I'm literally walking out the door now, but will post later tonight to clarify.
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Postby EggChen on 07 Nov 2008 20:19

Sorry about that ket, I don't have the examples on this PC to illustrate things so I will try to explain.

Where you have a section name of "section_name = tushkano" or any other single object or mutant/npc, that is a one off spawn, either at game start or on receipt of some info portion.

Search for "controller" in the Agroprom Underground file, and you will see a good example of this one time only spawn.

Now do a search for "section_name = respawn_section" in any of the levels and you will find respawns for the blue boxes, and for NPC's / mutants.

Your best bet would be to copy one of those, obviously replacing co-ordinates, level_vertex_id's, etc. Or another way, is if you want use an existing respawn, just add the mutant you want to the list of communities.

Hope this helps.
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Postby ket on 08 Nov 2008 11:59

Ahh ok so a one off spawn looks something like this;

[1378]
; cse_abstract properties
section_name = tushkano
name = gar_tushkano_normal_0001
position = 138.99, -1.31, 262.13
direction = 0,0,0

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

[spawner]
conditions = 50
[smart_terrains]
none = true
END

; cse_visual properties
visual_name = monsters\tushkano\tushkano


Where a respawn for what I'm doing would look something like this;

[2209]
; cse_abstract properties
section_name = respawn
name = val_bandit_respawn_1
position = 3.95,1.17,-10.36
direction = 0,0,0

; cse_alife_object properties
game_vertex_id = 1023
distance = 1.39999997615814
level_vertex_id = 179085
object_flags = 0xffffff3e
custom_data = <<END

[respawn]
conditions = 50
respawn_section = val_bandit_respawn_1,10,val_bandit_respawn_2,8,val_bandit_respawn_3,6,val_bandit_respawn_4,2
max_spawn = 4
idle_spawn = medium
[smart_terrains]
none = true
END
Last edited by ket on 10 Nov 2008 23:20, edited 1 time in total.
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 25 guests

cron