Spawned squad always follows actor

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

Spawned squad always follows actor

Postby mnn on 17 Nov 2009 03:11

Hello. I can successfully spawn a squad through script, but it always follows actor. The squad is spawned on a predefined smart terrain, but those stalkers just don't stay in that smart terrain!

How do I give them "job" to stay there? Just as other simulation squads do?

Thanks for help.
mnn
New Member
 
Posts: 7
Joined: 04 Nov 2009 18:21

Re: Spawned squad always follows actor

Postby Nightwatch on 17 Nov 2009 19:55

Hi mnn, thanks for the post.

The situation that you describe is difficult to comment on without seeing the script that spawns them; however, -although the most common and maybe the best way of spawning groups who are needed to stay on a predefined territory is considered to be through the all.spawn- you can check how the jobs are defined and assigned in various gulag_ ..... .script files, such as gulag_pripyat.script, gulag_military.script, etc. Though, as I said, although I haven't seen the script, but I'd assume that there may be difficulties to assign them to those jobs if they are created by simple alife():create orders, and without assigning them to other scripts that would govern their behavior.
Still, I would think that the newly created Stalkers not necessarily should follow the actor, as we know neutral Stalkers does not follow the actor even after he speaks with them. Or, have you used parts of the scripts from other mods, in which sections you ask those Stalkers to follow you and he;p you in fights? So they would follow if this is the case.
NEWSA.SIMBION_TWEAK 3.0
Mod Website= Features, Video, Tips & Download Link: NEWSA.SIMBION_Tweak

Watch the Trailer: http://www.youtube.com/watch?v=1Ajw_f8K ... re=channel
Please Do Not download and install any files from links other than those on the Mod's Website
User avatar
Nightwatch
Site Admin
 
Posts: 2676
Joined: 13 Apr 2007 05:42
Location: London, United Kingdom

Re: Spawned squad always follows actor

Postby mnn on 17 Nov 2009 20:15

Code: Select all
local squad = smart.board:create_squad(smart, squad)
smart.board:enter_smart(squad, smart.id)
squad:update()

squad:set_squad_relation("neutral")


This was taken from smart_terrain.script's respawn function (se_smart_terrain:call_respawn). squad:update() was from Faction Commander 2.5.

Just heads up: this is not SoC, but Call of Pripyat 1.6.01, but that shouldn't be a difference.
mnn
New Member
 
Posts: 7
Joined: 04 Nov 2009 18:21

Re: Spawned squad always follows actor

Postby mnn on 18 Nov 2009 22:12

This board seems pretty empty. Or lacking pro-modders :D

I solved this! Squad community defined in configs\misc\squad_descr_jupiter.ltx can't be killer (or at least should be stalker). I set it to stalker and viola! They don't follow me and stay at smart terrain :)

Downside is that get_object_community() on squad returns monster :D weird, I think that's a bug, because everywhere I defined squad or squad members to be killer except in squad_descr_jupiter.ltx, where squad is stalker.

btw. I do this script way, because it is more to my taste than those "ugly" configs :) and I hate all.spawn editing. And I like control I get in LUA. It is more "verbose" to create task, but it works! at least for now :D
mnn
New Member
 
Posts: 7
Joined: 04 Nov 2009 18:21

Re: Spawned squad always follows actor

Postby Nightwatch on 19 Nov 2009 01:18

You're quite right there mnn, this board lacks pro-modders :D I for one am a amateur modding enthusiast who mods games just for fun, and like many other modders, trying to put some colour (sometimes stability and functionality maybe, too) into the games that cost millions of dollars and created by building full of real professional developers. :D :mozilla_wink: I can never even dream to compare myself with those pros; (although I've had a reasonable enough programming education -forced to do so- like Cobol and Fortran) I've never worked as a software person and I don't care even the slightest for making a name for myself to increase my employability chances in software industry, which I have no intention whatsoever. So, like all modders ( I guess it's fair to say all ) it's just fun & fun for me. :)
( and everyone is quite busy, really, with their lives and can't be always available for answer in a few hours response time. I would think allowing one day at least would be reasonable)

On the real matter, you've done a great job, no doubt about it. :thumbright: And thank you also posting the result of your work, which not everybody does after they've found a solution. So, you deserve twice of a recognition. :thumbright:

Here, I don't think anyone has fully played the Call of Pripyat, though some guys started playing and progressed in the game. their initial verdicts, as far as I remember, was not favourable for the game, which echoes many professional reviews. Seems like SoC is still the king. Anyway, tastes differ, of course. But, I haven't even touch, nor even seen the box of Call of Pripyat, let alone playing or in fact attempting to mod it. I hardly think it'll be attractive enough for me; though still early days, of course. :mozilla_smile:
NEWSA.SIMBION_TWEAK 3.0
Mod Website= Features, Video, Tips & Download Link: NEWSA.SIMBION_Tweak

Watch the Trailer: http://www.youtube.com/watch?v=1Ajw_f8K ... re=channel
Please Do Not download and install any files from links other than those on the Mod's Website
User avatar
Nightwatch
Site Admin
 
Posts: 2676
Joined: 13 Apr 2007 05:42
Location: London, United Kingdom

Re: Spawned squad always follows actor

Postby mnn on 19 Nov 2009 15:24

Well the difference is that I like programming :-) However I write in languages like C#, which are different compared to LUA. But I managed to handle syntax, although when I look at C# code I usually understand what it means, but when I look at smart terrain job parsing function, it looks like bloat with tables :-)

Yeah I know that I can't know for sure, but I think on this board, no one will need this kind of information. Everybody wants mod with new weapons, skins, sounds, cars etc :) Nobody is (really) interested in scripting, about which is pretty much whole game (scripted :D).

I finished game, and I'm much more satisfied with it than with Clear Sky. It is very short compared to SoC but story is good. Simple but good. SoC still rules though :D My ranking would be: 1. SoC, 2. CoP, 3. CS. Although I liked CS it was fast-paced FPS shooter, than the usual Stalker game :D
mnn
New Member
 
Posts: 7
Joined: 04 Nov 2009 18:21

Re: Spawned squad always follows actor

Postby ket on 04 Dec 2009 18:11

In addition to what nightwatch says (hi fella :d) just adding your spawns to all.spawn may not be enough to keep them on their smart terrains. In each NPC file is a paramater that lets the spawns wander off and do their own thing ala "a-life", or stick them like glue to a predefined area. Check the individual NPC files to make sure the option for them to follow smart terrain presets only is enabled. :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


Return to Modding Techniques

Who is online

Users browsing this forum: No registered users and 19 guests

cron