Spawn System (ALFA / ACR)

Ideas and suggestions for game mechanics and rules.
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

The new spawner goes great guns AL. Well done.

Just a quick note to testers...the RANDOM_RADIUS integer is defaulted to 2, which can play havoc with NPCs who have been placed in a specific spot. Before you lay down any number of spawns, you might want to reset it to 0 in the template.
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 »

Ahh, I'd been doing a lot of group spawns, which look somewhat absurd when they're all piled up shoulder-to shoulder at the same location, hence the default on there.

I'll set it back to zero on the spawn example waypoints before official release, well spotted.
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

Code: Select all

location lLoc = _SPAWN_CHILD_COUNT(
        240.0,  // 240 degrees, put this one at 8 o'clock.
        6.0,    // Six meters out, so the radius of the circle is 6m.
        60.0); // Turned 180 + 240 degrees, so it faces the center.
    ACR_SpawnObjectAtLocation("c_chicken_acr", OBJECT_TYPE_CREATURE, lLoc);
Hey AL. Can you explain what ACR_SpawnObjectAtLocation is?

I'm in the custom spawn script example and am just trying to work out if I need to spawn a chicken to spawn the orcs.
Image
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

Well, I don't need the chicken to spawn the orcs, but the question remains...just what is the chicken doing in that script, and do you have a thing for chickens?
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 »

Hah! Had forgotten that was still in there.

In my original mod, I made two creature templates to demonstrate things with, just copies of the standard pallete ones that called acf_spawndeath in their on_death events (for respawn behaviour). They were c_badger_acr (in honor of the timeless spawn badgers), and c_chicken_acr (inspired by the death chicken of shadowdale).

Originally I tested the group-file spawns using chickens and badgers as well, then switched back to orcs and goblins so I could better see if the case switches were working. Looks like I left one chicken behind... Didn't notice because they'd eaten it by the time I got there to see.

:roll:
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

lol

Ok...quick testing update.

I've got about 7 mob groups of 5 mobs each spawning into the opening area (24x24). Fow now each is an infinite respawn (until Live) with a Min Delay of 4 and Max Delay of 8. I've got 7 minutes/game hour set in Mod Props.

Your simple group script is real genius. It makes variety so incredibly easy, and it's as reliable as all get-go. Thanks for those templates.

There's no discernible lag or delay entering the area..no more than usually existed. Combat is not CPU intensive at all (admittedly with 1 player).

In other words, I've got about 50 mobs (including NPCs) and my server CPU, running SQLite and NWN2server, is sitting on 0%, barely fluctuating to 1% on the module heartbeat.

Very happy.
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 »

The spawn group templates are Ronan's, he was hoping they'd let people get particular about their spawning options without having to know all the internal machinations of the system. Glad to hear they're doing their job well.

Also quite gratifying to hear the system is performing so well, helps justify the time spent working out how all Ronan's optimizations worked to get them set to go.
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

AL, the ACR_SPAWN_WITH_PC_IN_AREA variable...it differs from the documentation. Can you outline what its values are?
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 »

That variable was renamed, as it's function was counter-intuitive and likely to cause confusion for most builders (confused me, at least).

The replacement variable, with its associated documentation are in the current wiki manual version, quoted here:
ACR_SPAWN_ONLY_WHEN_NO_PC_IN_AREA (Local int)
If nonzero, this spawn will not respawn or activate at all if a PC is already in the area when it tries to do so. This is used to prevent creatures from re-appearing where they were after a PC just killed them, or something similar. (not tested, should work)
So, think of this variable as an additional control against respawns while a PC is in an area- say they kill off a group of orcs and make camp for several RL hours in the same area. Even if the respawn timer runs out (and the spawn point allows respawns), the spawn would not be repopulated until the PCs had left the area, if this were set to 1 (TRUE). The basic default of SPAWN_IN_SIGHT = 0 (FALSE) would protect the PC/party against the mob respawning right on top of them, but this setting would also keep the mob from respawning nearby in the same area (may be more important once we have the AI controls to make our mobs wander).

The other time I can imagine this setting might be used is for fast-respawning mobs- keeping them from repopulating while a PC is in the area makes them less obvious to a player looking for a lucrative area to linger in, waiting for the respawns.

I thought i'd removed all reference to the old "ACR_SPAWN_WITH_PC_IN_AREA " variable from the acrtest2.mod, so if you're still seeing it in any of the templates please let me know, so I can clear it out before we package the ACR up. I'm trying to make sure all of these are carved in stone before we release the ACR to the builders- there are few things more tedious than changing variable names across every spawn waypoint in a module.
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

Cool bananas.

Next question: ACR Random Resref Spawn

This is an example waypoint, but it contains the following variable: ACR_SPAWN_RESREF_1, and ACR_SPAWN_RESREF_MIN and ACR_SPAWN_RESREF_MAX

Should that be resname?

I'm about to test it and find out myself, but as I'd added about 40 treasure items, it's going to take me 15 minutes or so before I know for sure.
Image
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

Ok...you're right, the wiki documentation is updated. I needed to refresh my browser. It's probably worth amending the waypoint for the sake of consistency.
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 »

Yeah, looks like I missed one when updating all 30+ waypoints in that module (blueprints and instances). All should use the currently documented ACR_SPAWN_RESNAME_xxxx format (figured it would be best to be consistent for the future, since the "Template Resref" is ignored by all the creation functions. I'll be over those example waypoints with a fine-toothed comb before they go into an ABR ERF.
Locked