MPWC spawn system

Scripted ALFA systems & related tech discussions (ACR)

Moderators: ALFA Administrators, Staff - Technical

Locked
Ronan
Dungeon Master
Posts: 4611
Joined: Sun Feb 20, 2005 9:48 am

MPWC spawn system

Post by Ronan »

http://nwvault.ign.com/View.php?view=NW ... tail&id=20

A manual (pdf) is included in the .zip file. Anyone think this is usable alternative to NESS? It doesn't have population control or anything, but it seems like a good spawn system. It might, however, be too complex for builders to set up.

I talked with the author about spawn system design a while back, and the guy sounded like he really knew what he was doing.
Rick7475
Haste Bear
Posts: 2097
Joined: Tue Jan 06, 2004 1:59 am
Location: Ottawa
Contact:

Post by Rick7475 »

Can we add to it? Take the code and modify to our requirements?
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

Sounds promising, Ronan. Can you work with the author to add all the features we're after? Probably too late to work to a common standard at this point.
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

I'm going to give this a spin tonight..it looks very promising, although there is a fundamental need for any spawn system within ALFA for an NPC to spawn only when a condition is met when a PC enters the area (the variable is set on the PC when they are given the quest). This allows for quest persistence. Currently this system is limited (from my first read of the documentation) to the following:
Set up a trigger with gdr_trigger as it’s onEnter script. Set
gdr_skill to 500 (auto fail) and set
gdr_fail_activate_spawn_group to the name of a spawn
group.
When a PC enters the trigger, the spawn group will activate
and immediately spawn. It’ll keep spawning until it gets
deactivated or the area gets quiesced.
But it certainly looks thorough otherwise.
Image
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

I can't remember if NESS was ever so involved...it must have been. While headachy, this spawner is solid, but it does not have persistent RP worlds in mind so much as persistent Hack n Slashers. With a few modifications this could be made very useful and I'll give it my vote to be made the default spawner (the documentation is impressive) in preference to NESS (which I'll miss).

Its advanced features allow for sophisticated group spawns, area cleaning and trap, item and placeable spawns. But it will need some PW-style additions from what I can tell.
Image
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

So, in retrospect, I can't find ways to recommend this system to the same extent I can recommend NESS. The trouble with any new spawn system is that will include the basics, but overlook the amazing features that NESS came to incorporate over the years, especially under Cereborn.

Spawning Unseen, Spawn within certain radius of PC, the conditional spawns, these features made NESS invaluable. I'm not sure where the Tech Team is at with a spawner, but my preference is that we stick with NESS.
Image
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

Ronan had his spawn system for the ACR2 at a testable stage, I think, before the RL monster tackled him. I know it was performing extremely favorably in comparison with NESS, in terms of lag and such: I'm not sure what derailed it, or if it just lost out to other projects like the ABR. I know he'd designed it to do most everything NESS did, and do it more efficiently.

In the meantime, has anyone tried to import NESS to a NWN2 mod and test it?
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

Well from the looks of his posts in this thread, it may be that Ronan doesn't want to commit to the enormous undertaking of creating and updating a spawner...understandable. I'll install NESS tonight and give it a whirl.
Image
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

http://www.chunkychode.com/Ness/links.aspx

Some guys have already ported it to NWN2. I tried it in our module and it works fine, first time.

As I've said above, NESS is really a spawner for populating a PW, not for creating encounters for an MMO. What is lacks in performance it makes up for in suiting our needs. The newer features of NESS are pseudo heartbeats which allow the 6 second/round processing time to be pulled back to pulled back to 10 seconds or longer. As Cereborn points out in the history file, this is a 40% CPU utilization saving.

Anyway, I'll play around with NESS a little longer and see how it handles large spawn numbers.
Image
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

I think mostly the concern was avoiding the continuing problem with NESS, namely, having spawns finish firing in the midst of a lag spike about 8-20 seconds after a PC enters an area, often putting them right on top or (or, behind) a PC who normally wouldn't have gotten near them.

Perhaps this is more a problem with overburdened CPUs, but I've seen it on several NWN1 servers, my understanding was that NESS code bloat was somewhat to blame.

Sounds like this is the way to go for now though, maybe if it's used judiciously from the start, it will work better.

Still, would be nifty if we could pre-spawn like Ronan's system was supposed to.
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

One thing working for us is that all modules will have far fewer areas (possibly in the order of several hundred), meaning the NESS overhead is significantly reduced from the outset. I'm in the middle of tests now and will post when I have some results.
Image
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

NESS probably won't help us. The lag upon entering an area, with staggered spawns of 4 groups of 5 mobs each, is pretty bad. Once they're up and running it's better and it's quite smooth even when respawning 10 mobs every 2 rounds. Still, we can probably do better.

Time to learn more about this new system I'd say.
Image
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

It doesn't hurt to evaluate another system, but I'd like to know for certain where Ronan left the spawn system he was developing. I was under the impression that Ronan built the bare essentials - spawning - which leaves the sophistication, like encounter and population control, for later. Retrofitting a module's spawn system will be horribly painful so I'd rather get the facts straight before we move to adopt alternatives. I'll PM Ronan.
Ronan
Dungeon Master
Posts: 4611
Joined: Sun Feb 20, 2005 9:48 am

Post by Ronan »

Mostly RL and the ABR, yeah. I never expected to have to (poorly, in hindsight) manage the ABR stuff myself. It was testable in NWN1, in NWN2 there is a minor bug somewhere that results in nothing being spawned.

Its about 10 times faster than NESS last I checked, though likely gets slower as I add more features. The basic goals were ease of configuration and use (by builders), more complex and sharable spawn groups (each in their own seperate file), more spawning options which work (random spawn chance works, day/night spawns, weather spawns, etc), and eventually some sort of population control.

I'm more concerned with what is easier for the builders to use. This spawn system is documented, and there is documentation on how to use mine here (along with some example spawn group code):
http://www.alandfaraway.org/phpbbforum/ ... hp?t=32017

ALFA's needs, in terms of spawn systems, are quite different from the rest of the community's, IMO. I don't think its likely we'll be able to take an off-the-shelf one and use it any more successfully than we used NESS.
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

Glad to hear the update, Ronan! If you like I could try to look for the nonspawning bug, though my time is limited ATM as well, and you'll likely have an easier time navigating it since it's your code. I haven't run into any NWN2-specific nwscript quirks yet that jump to mind as potential port problems- the only significant hurdles I had with porting my seamless scripts were in the "unwalkable" gutter around all exteriors, which still has coordinates.

Actually, coming to think of it, I don't think the local ints I added to areas via the toolset are being read properly by my scripts. I seem to remember seeing them analyzing the area dimentions, even though I'd defined them in the toolset with LocalInt's. When the scripts set a LocalInt, it reads fine. Could a similar thing be buggering the spawn system? I recall you were going to use Local Ints pretty extensively.

Under the current setup I've got for the seamless ATs, my scripts have the soon-to-AT PC's destination location and a pointer to the target area 3-6 seconds before the clients actually begin loading the new area. (allows for the PC to back out of the trigger to avoid ATing). As such, seems an ideal time to trigger the spawn system in the putative destination area with a prespawn call. Between that delay period and the client load time, I'm hopeful we can avoid the server-side spawn lag completely.

Good to hear from you, though: let me know if there is anything I can do to help, I'll try to carve the time out where I can.
Locked