se_respawn

Discussions and Support on S.T.A.L.K.E.R. Mods

se_respawn

Postby Grump642 on 07 Jan 2009 04:27

I have been test-playing Cordon with my new files. Everything was fine, but something seemed lacking. Sooo, I added my new se_respawn. What a difference!! I left the respawn rate alone, and increased the amount of Military. By the time we cleared out the car park, and I got the flash drive from Nimble, the Military showed up and wiped out everyone. I barely got out. They were everywhere. I had trouble just getting back to Sid with the flash drive. I love it!! Seems the added population greatly affected their sense of humor. For the worse! =D>
User avatar
Grump642
Senior Resident
 
Posts: 501
Joined: 20 Dec 2008 05:07
Location: Mississippi, USA

Re: se_respawn

Postby jamie1992 on 07 Jan 2009 04:32

Care to share exactly what settings its on and what you changed, sometimes i reckon we should make a HUGE modding resource contributed by everyone, so that it covers most if not all aspects of modding, so that it can be like a guide to modding, i think it would be cool.
Wu Tang! Wu Tang! Wu Tang!
User avatar
jamie1992
Senior Resident
 
Posts: 802
Joined: 12 Sep 2008 23:04
Location: Oxford, Oxfordshire, United Kingdom

Re: se_respawn

Postby Grump642 on 07 Jan 2009 05:43

Sure, here is the file, from scripts

-- Òàáëèöà îãðàíè÷åíèé íà ñïàóí: âñåãî â ñèìóëÿöèè íå äîëæíî áûòü áîëüøå, ÷åì óêàçàíî.
local simMaxCount = {
stalker_novice = 43, stalker_regular = 48, stalker_veteran = 49, stalker_master = 20,
monolith_novice = 20, monolith_regular = 40, monolith_veteran = 40, monolith_master = 35,
military_novice = 10, military_regular = 42, military_veteran = 32, military_master = 15,
killer_novice = 20, killer_regular = 28, killer_veteran = 30, killer_master = 50,
ecolog_novice = 1, ecolog_regular = 1, ecolog_veteran = 1, ecolog_master = 1,
dolg_novice = 0, dolg_regular = 33, dolg_veteran = 36, dolg_master = 17,
freedom_novice = 50, freedom_regular = 20, freedom_veteran = 26, freedom_master = 41,
bandit_novice = 40, bandit_regular = 65, bandit_veteran = 35, bandit_master = 25,
zombied_novice = 30, zombied_regular = 45, zombied_veteran = 30, zombied_master = 30,

rat_weak = 0,
tushkano_weak = 150,
flesh_weak = 14, flesh_normal = 38, flesh_strong = 22,
boar_weak = 52, boar_normal =58, boar_strong = 37,
dog_weak = 53, dog_normal = 146, dog_strong = 150,
pseudodog_weak = 59, pseudodog_normal = 90, pseudodog_strong = 70,
psy_dog_weak = 15, psy_dog_normal = 45, psy_dog_strong = 35,
zombie_weak = 61, zombie_normal = 50, zombie_strong = 35,
snork_weak = 50, snork_normal = 61, snork_strong = 15,
poltergeist_weak = 10,
pseudo_gigant_weak = 23,
controller_weak = 18,
burer_weak = 20,
bloodsucker_weak = 7, bloodsucker_normal = 50, bloodsucker_strong = 20
}

local idle_spawn_preset = {
seldom = 60*60,
medium = 60*60,
often = 60*60
}
User avatar
Grump642
Senior Resident
 
Posts: 501
Joined: 20 Dec 2008 05:07
Location: Mississippi, USA

Re: se_respawn

Postby Grump642 on 08 Jan 2009 03:47

Damn, this time the military are hiding. No where to be seen. I don't get it.
User avatar
Grump642
Senior Resident
 
Posts: 501
Joined: 20 Dec 2008 05:07
Location: Mississippi, USA

Re: se_respawn

Postby NatVac on 08 Jan 2009 07:41

Actually, simMaxCount is not used in the vanilla game -- all the references to this local (file-specific) array are commented out except for some statistics stuff, and even that uses printf() functions which are NOPs (no operation) in vanilla -- unless you enabled some other stuff and neglected to post it, Grump642...

There are a couple of factors re the military in the Cordon.

1) If you deal with the army blockpost at the south in any way (e.g., even just attract the attention of the trio on the road with your gunfire), then they will come after you. If that is the case, then when you kill them, they'll be replaced by soldiers migrating in from the north, and you'll encounter them in real time if you linger long enough.

(Same is true of the west Pripyat soldiers -- kill them and their replacements then move through the Bar on the way north.)

So you'll see them after a suitable time...

2) There are three Cordon military groups, the bridge guys, the blockpost guys, and some special "specnaz" guys. These last might go on patrol from time to time; check out gulag_escape.ltx in gamedata\config\misc\.
NatVac
Resident
 
Posts: 152
Joined: 16 Sep 2008 00:13
Location: Texas

Re: se_respawn

Postby Grump642 on 26 Jan 2009 15:53

I did not know that. Any way this can be put back in? I have seen lots of people use it, and I never saw other files that might script it back in. Damn, you're good. I can change scripts some, and understand them some, but I am NOT a script guy.
User avatar
Grump642
Senior Resident
 
Posts: 501
Joined: 20 Dec 2008 05:07
Location: Mississippi, USA

Re: se_respawn

Postby EggChen on 26 Jan 2009 21:15

The se_respawn file is used, but as Natvac mentions, not for that purpose..... here is some extracts from my se_respawn and entries made to adjust respawn times and communities.... without the new community lines I got CTD's.

When adding new communities I recall I had to add these lines or I got a CTD, I presume some form of check is made, but may not have any impact on actual numbers in game. So maybe those checks that Natvac mention use printf still create a CTD if it cannot find the entry for that community and level of experience.

Code: Select all
   stranger_novice = 25, stranger_regular = 20, stranger_veteran = 15, stranger_master = 10,
   hunter_novice = 0, hunter_regular = 0, hunter_veteran = 5, hunter_master = 5,


These following lines are referenced in all.spawn, and determine the respawn rates.... you will see seldom, medium or often defined for respawn entries (though the vast majority are defined as "medium").

Code: Select all
local idle_spawn_preset = {
   seldom = 240*60,
   medium = 210*60,
   often = 180*60
}


It is probably the latter why most people use this file in their mods. I seem to remember one of the patches stated it decreased respawn rates, and included this file, with changes to these values.

Oh and yes, he is good ;)

Edit: I guess many people who edit the numbers of NPC's believe these have an effect, much like people believed changing m_bandit and m_army had an effect.
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Re: se_respawn

Postby Grump642 on 27 Jan 2009 02:33

If these values are set in all.spawn, then why does changing them in se_respawn make a difference? I know it does, because increasing the rate too much was very obvious in Garbage. Every time you passed certain points, you had to kill 4 or 5 Bandits. Without this change it did not happen. So...can the max numbers be increased outside of all.spawn? Also, the numbers you show for all.spawn, look like the numbers for se_respawn in the earlier patches. - the *60.
User avatar
Grump642
Senior Resident
 
Posts: 501
Joined: 20 Dec 2008 05:07
Location: Mississippi, USA

Re: se_respawn

Postby EggChen on 27 Jan 2009 22:56

Changing those numbers does make a difference, I agree. Although the actual values for medium, seldom, etc are set in se_respawn, which one a certain respawn uses is determined in the all.spawn. Here is a respawn from the Rostok part of all.spawn, relevant part in bold.

[3946]
; cse_abstract properties
section_name = respawn
name = rostok_respawn_killer
position = -236.765853881836,4.55808687210083,57.7308731079102
direction = -4.83787857774587e-007,-4.05385794377544e-013,-8.37941229292483e-007

; cse_alife_object properties
game_vertex_id = 1389
distance = 12.5999994277954
level_vertex_id = 15520
object_flags = 0xffffff3e
custom_data = <<END
[respawn]
respawn_section = ros_killer_respawn_1,3,ros_killer_respawn_2,6,ros_killer_respawn_3,2,ros_killer_respawn_4,1
;min_count = 10
max_spawn = 6
idle_spawn = seldom
;conditions = {+yan_find_scientist_done} 100, 0
END

; cse_shape properties
shapes = shape0
shape0:type = sphere
shape0:offset = 0,0,0
shape0:radius = 3.40120029449463

; cse_alife_space_restrictor properties
restrictor_type = 0

; se_respawn properties

Most of them use "medium", but a few use "seldom" or "often". Don't worry about those values in my earlier example, that was from my se_respawn file, I increased idle spawn times a lot! Its just a way of showing the times in a way easily interpreted... 60*60 = 1 hour (60 seconds x 60).

I think what Natvac meant is that the SimMaxCount part of se_respawn is not used for determining the maximum number of Stalkers from a given community that can be alive. An example is that in vanilla one setting is :

monolith_master = 30

There are well over 30 spread out over Red Forest, Prypriat, Stancia 1, Stancia 2 and the Monolith Control.

The idle_spawn time is defo worth tweaking, and is how the devs altered respawn times in one of the earlier patches.
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Re: se_respawn

Postby Grump642 on 28 Jan 2009 01:30

OK, I think what I was trying to do would not be done this way anyhow. To increase the number of, say bandits, would have to be done in the all.spawn. If so, how high can you take it before causing issues? And what determines this number?
User avatar
Grump642
Senior Resident
 
Posts: 501
Joined: 20 Dec 2008 05:07
Location: Mississippi, USA

Re: se_respawn

Postby NatVac on 28 Jan 2009 06:53

Grump642, EggChen is "right on the money" about idle_spawn_preset. You can also dynamically spawn NPCs yourself, outside of the all.spawn file. See the links in the "Important Links to Modding Questions and Answers" thread, as well as the STALKER Mod Wiki articles on spawning.

There will be automatic limits on the number you can spawn via all.spawn: the capacities of the smart terrains associated with those communities. When vacancies open up (e.g., you kill the bandits attacking the vehicle graveyard) you can expect them to be filled shortly. This is determined by a) idle_spawn_preset, b) going_speed and maybe current_level_going_speed for the NPC (this is how fast they move while offline; see the m_*.ltx files except for the unused ones EggChen mentioned), and c) distance from the spawning place to the destination smart terrain.

Dynamically spawned NPCs that don't have jobs/smart terrains assigned are not subject to this limit, although there may be a limit of about 65,534 objects extant at one time.

Yes, I meant exactly what I said; EggChen has it right. The local array simMaxCount is not used in vanilla unless one changes it, "except for some statistics stuff, and even that uses printf() functions which are NOPs (no operation) in vanilla."

While that is true, a qualification (a "technicality" per Don Reba) might be in order. The statistics functions don't affect the vanilla game other than to waste time doing some useless processing -- but that processing can be affected by adding non-vanilla entity types as EggChen did. More below.

And I don't know everything about the engine. I don't see how se_respawn.script changes could impact your game beyond idle_spawn_preset -- but that is not saying that it can't.

EggChen, some items that might be related: Even though printf() statements themselves are NOPs in our non-dev environment, the parameters enclosed in parentheses might reference something during evaluation that results in a CTD error like trying to index a nil value.

And all.spawn entries that have respawn_sections defined (or any invocation of se_respawn functions) may require an entry in the array to avoid using an invalid index. Because simMaxCount is local, nothing outside of the script file knows about it, and the only active instance in there is within the lstats() function -- which is not referenced elsewhere in the *.script, *.xml, or *.ltx files. This implies that it is called by the DLL-based engine, if your se_respawn.script is otherwise vanilla.

So what happened? Well, the can_spawn array grew with your new entries automatically. But now the variable k, the count of entries in can_spawn, is greater than the number of entries in simMaxCount.

And that can_spawn array is also local. I'll bet you could just comment out the contents of that function (i.e., have an empty function body) and all of simMaxCount, and you still would not crash.

Side note: My "stranger" class doesn't have an entry in this file, but it works just fine. You'll see shortly, if interested. :)
NatVac
Resident
 
Posts: 152
Joined: 16 Sep 2008 00:13
Location: Texas

Re: se_respawn

Postby EggChen on 28 Jan 2009 21:08

NatVac wrote:[EggChen, some items that might be related: Even though printf() statements themselves are NOPs in our non-dev environment, the parameters enclosed in parentheses might reference something during evaluation that results in a CTD error like trying to index a nil value.


Yep, your "right on the money" too :thumbright:

I'm pretty sure it was an "index nil value" error that I got.
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Re: se_respawn

Postby Grump642 on 29 Jan 2009 00:00

Ya'll keep talking, I'm trying to learn something.
User avatar
Grump642
Senior Resident
 
Posts: 501
Joined: 20 Dec 2008 05:07
Location: Mississippi, USA


Return to Mods & Discussions

Who is online

Users browsing this forum: No registered users and 30 guests

cron