Suggestion: Spawn limits

It Does What It Says on the Tin: Resolved Issues

Moderators: Moderator, Developer, DM

Post Reply
User avatar
khaevil
Posts: 136
Joined: Thu Sep 03, 2009 7:00 pm
Location: East Coast USA

Suggestion: Spawn limits

Unread post by khaevil »

I'd like to see a spawn rate reduction over time specific to each area. It feels like a finite dungeon has an infinite supply of enemies. The place should be packed when first entered, maybe ramp up as they get a little organized in their defenses, but eventually they should run out of warriors.

I suggest using a local variable stored on the party leader that counts up the roaming encounter kills his party has made for each area. Thus players don't decimate the population until reset for others also trying to enjoy the area. Some encounters could also be tracked separately and be once per reset for that party.

Clarification Update:

I wasn't trying to suggest some system of instance dungeons. For some reason the responses to my suggestion went off on that tangent. I thought my description was clear, but, I know that I have difficulty communicating effectivly.
So, here is a rough code example of what I suggest.
I'm not trying to claim this code is compatible with the spawn system. It is merely intended to clearify my suggestion.

Note the complete lack of the CreateInstancedAreaFromSource function.


object oPC = GetEnteringObject(); // PC entering area
// assume OBJECT_SELF is the spawn trigger area

int nDailyLimit = GetLocalInt(OBJECT_SELF,"DailyLimit"); // the daily spawn limit per person
string sSpawnGroup = GetLocalString(OBJECT_SELF,"SpawnGroup"); // name of the spawn group

// this section would be the lightest weight, considering only the entering PC
/*
int nMaxSpawned = GetLocalInt(oPC,sSpawnGroup);
*/

// this section would limit spawns based on the group
int nMaxSpawned = 0;
object oLeader = GetFactionLeader(oPC);
object oMember = GetFirstFactionMember(oLeader);
while (GetIsObjectValid(oMember)) {
int nMemberSpawned = GetLocalInt(oMember,sSpawnGroup); // count of spawns member has triggered
if (nMemberSpawned>nMaxSpawned) nMaxSpawned = nMemberSpawned;
oMember=GetNextFactionMember(oLeader);
}

// spawn limit reached, stop script
if (nMaxSpawned>nDailyLimit) return;


// daily limit not exceeded
// some spawn code goes here that spawns nSpawnCount monsters

// this would be for the lightweight version where only the entering PC is used
/*
SetLocalInt(oPC,sSpawnGroup,nMaxSpawned+nSpawnCount);
*/

// this would be for the party based version
oMember = GetFirstFactionMember(oLeader);
while (GetIsObjectValid(oMember)) {
SetLocalInt(oMember,sSpawnGroup,GetLocalInt(oMember,sSpawnGroup)+nSpawnCount); // update spawn count member has been present for
oMember=GetNextFactionMember(oLeader);
}
Last edited by khaevil on Wed May 04, 2016 4:33 pm, edited 3 times in total.
Kurvallaxion Brax - Knight of the Baldur's Gate Thayan Enclave
NegInfinity
Posts: 2449
Joined: Wed Feb 05, 2014 11:24 am

Re: Suggestion: Spawn limits

Unread post by NegInfinity »

khaevil wrote:I'd like to see a spawn rate reduction over time specific to each area. It feels like a finite dungeon has an infinite supply of enemies. The place should be packed when first entered, maybe ramp up as they get a little organized in their defenses, but eventually they should run out of warriors.

I suggest using a local variable stored on the party leader that counts up the roaming encounter kills his party has made for each area. Thus players don't decimate the population until reset for others also trying to enjoy the area. Some encounters could also be tracked separately and be once per reset for that party.
I don't think there's a good way to make it work in NWN2 engine. Also, this kind of system will be very easy to abuse: break party/switch leader, or just split party make one guy exit and reenter area and you have spawn rate reset.
User avatar
Theodore01
Recognized Donor
Posts: 2927
Joined: Wed Feb 16, 2011 5:32 pm

Re: Suggestion: Spawn limits

Unread post by Theodore01 »

And what about the second player/party that enters such a dungeon - do they find it empty then?
User avatar
khaevil
Posts: 136
Joined: Thu Sep 03, 2009 7:00 pm
Location: East Coast USA

Re: Suggestion: Spawn limits

Unread post by khaevil »

It should be pretty straight forward. Just find the object that leads the faction of the object that activated the trigger and use local variables stored on that object to calculate rather or not to spawn the encounter.

The only thing I'm not positive about is how GetFactionLeader works, as I've never used it on a persistent world. I believe it returns the object that is the leader of the party the object it is passed is a member of. There are experience scripts that alter experience reward based on party size and levels. There are quest scripts that use information about other members of the party as well. If GetFactionLeader doesn't do what I think it does then there must be another way those scripts access party information, so it must be possible.

Entering and exiting wouldn't matter, and another party wouldn't be affected. It would be like the chests in that regard. A player can open a chest and spawn loot once per reset, but other players can still get loot from the chest even if someone else opened it before them.

Transferring leadership would be a way around it. That could easily be prevented by storing the variables on all party members and using the highest value, though I personally wouldn't bother just to preventing grinders from grinding so much, as that doesn't harm others ability to enjoy the server. I do think that's a good idea though, as it would prevent people from grinding in an area all day and inhibiting others trying to use it.
Kurvallaxion Brax - Knight of the Baldur's Gate Thayan Enclave
NegInfinity
Posts: 2449
Joined: Wed Feb 05, 2014 11:24 am

Re: Suggestion: Spawn limits

Unread post by NegInfinity »

khaevil wrote:It should be pretty straight forward.
No, sorry.

That'll be a maintenance nightmare, and to do it right you'll need instancing support in the engine (so each party gets their own dungeon). NWN2 doesn't have anything like this.

I see why you'd want it, though.
User avatar
khaevil
Posts: 136
Joined: Thu Sep 03, 2009 7:00 pm
Location: East Coast USA

Re: Suggestion: Spawn limits

Unread post by khaevil »

Actually NWN2 does support instances, and that's not even close to what I'm suggesting.

I feel like I'm getting trolled.
Kurvallaxion Brax - Knight of the Baldur's Gate Thayan Enclave
tfunke
Retired Staff
Posts: 2305
Joined: Sat May 07, 2011 9:09 pm
Location: Australia- GMT+10

Re: Suggestion: Spawn limits

Unread post by tfunke »

I don't think you are being trolled mate.
While I admit, it might be a nice addition, I couldn't imagine something like this being implemented, without causing more unnecessary strain on server resources. Sorry.
Per aspera ad astra
NegInfinity
Posts: 2449
Joined: Wed Feb 05, 2014 11:24 am

Re: Suggestion: Spawn limits

Unread post by NegInfinity »

khaevil wrote:Actually NWN2 does support instances,
Wanna throw a link to that?

INstances mean that several parties can same dungeon at the same time, and every party will get their own dungeon , where they won't see the other party. As far as I know, this is simply not how NWN2 works. A map is a place, and everybody who enters the place, end up on the same map.

And the suggestion is trouble.
One party enters dungeon -> dungeon resets. Great. Simple so far, right?
Another party enters dungeon at the same time -> now what? You get problems in this case. Either dungeon spawns extra monsters for the new party (boosting number of monsters in the area beyond limit), or fail to do so, and the other party does not get the spawns.
Another potential trouble is empty dungeon.
Tracking down of multiple party leaders will be a headache as well.

The dungeon is not a chest, you see. Chest remains open for few seconds, and dungeon requires few (dozen) minutes to clear it. So you can't apply to dungeons what works on a chest.

Another issue is that it will quickly result in empty dungeons for a player. While "having unlimited spawns" is bad, having empty dungeon is worse.

As of now, server is lacking of sources of gold, and one of the few reliable remaining sources of gold is monster spawns (those rare monsters that actually drop something). By adding limits you'll shut those sources down. There are also people that enjoy combat.

So... many difficulties, and potential big trouble.

That's why I think it is not a good idea. As I said, I do understand why you want that. It is just not going to fly on this game engine.
User avatar
khaevil
Posts: 136
Joined: Thu Sep 03, 2009 7:00 pm
Location: East Coast USA

Re: Suggestion: Spawn limits

Unread post by khaevil »

I edited my original post. Hopefully that clarified my suggestion. No instances. No parties affecting each other. Merely prevent players/groups who have already spawned the maximum numbers of mobs in a group from spawning more.
Kurvallaxion Brax - Knight of the Baldur's Gate Thayan Enclave
User avatar
Planehopper
Posts: 2297
Joined: Sun Oct 09, 2011 4:50 pm

Re: Suggestion: Spawn limits

Unread post by Planehopper »

As far as feasibility, I still have a hard time understanding how it would work with multiple parties. If this variable is tied to party leader, what happens when another party, with another leader, enters the same area? If Party A has met its roaming encounter kills quota, but Party B has not, won't it still spawn creatures for Party B? Either answer to that question seems exploitable.

Regardless of possibility, and I have my doubts there, I disagree with the premise of the idea which seems to be that there is an issue worth fiddling with, with the spawning mechanics as they stand.

I don't think they are perfect, but adding additional layers of complexity to a system for the sake of complexity seems counterproductive to me.

Count me as a -1, I will leave it at that.
User avatar
Aspect of Sorrow
Custom Content
Posts: 2688
Joined: Fri Mar 28, 2014 7:11 pm
Location: Reliquary

Re: Suggestion: Spawn limits

Unread post by Aspect of Sorrow »

NegInfinity wrote:
khaevil wrote:Actually NWN2 does support instances,
Wanna throw a link to that?
He's probably thinking of the nwnx2 resman which did accomplish that in NWN1.

You could pull this request off, but you'll need to use skywing's .NET CLR integration. Cobbling it in nwscript is too much overhead.
NegInfinity
Posts: 2449
Joined: Wed Feb 05, 2014 11:24 am

Re: Suggestion: Spawn limits

Unread post by NegInfinity »

I'll side with Planehopper with this one. I don't see how it will work with multiple parties, and I don't see it as an issue that needs fixing.

The request reminds me what I once read about ultima online:
Nearly everything in the world, from grass to goblins, has a purpose, and not just as cannon fodder either. The 'virtual ecology' affects nearly every aspect of the game world, from the very small to the very large. If the rabbit population suddenly drops (because some gung-ho adventurer was trying out his new mace) then wolves may have to find different food sources (e.g., deer). When the deer population drops as a result, the local dragon, unable to find the food he’s accustomed to, may head into a local village and attack. Since all of this happens automatically, it generates numerous adventure possibilities.
However, this feature never made it beyond the game's beta stage. As Richard Garriott explained:
We thought it was fantastic. We'd spent an enormous amount of time and effort on it. But what happened was all the players went in and just killed everything; so fast that the game couldn't spawn them fast enough to make the simulation even begin. And so, this thing that we'd spent all this time on, literally no-one ever noticed – ever – and we eventually just ripped it out of the game, you know, with some sadness.
NeOmega
Posts: 769
Joined: Fri Feb 17, 2012 12:13 pm
Location: Seattle

Re: Suggestion: Spawn limits

Unread post by NeOmega »

This is a great opportunity for the "mechanical server impact" and the "player driven quests" that I keep saying will boost player driven RP.

The malaar beast in the gibberling caves only appears, I assume, if you put the unpurified heart in the altar. Conversely, if you put the purified heart in the altar, then the mushrooms grow to be picked.

Sooo....

What if many areas had these types of options/effects?

Necromancers could make the fields of the dead or even the graveyard spawn CR +1 and CR +2 upon completing a quest, (with only a token XP award, if), whilst paladins could do the opposite, and tame such areas.

For example, the undead remains. Instead of gold, make them worth (5 - level)XP each, and turn them into a necromancer or a paladin. With the paladin, when he accrues a certain amount, the fields of the dead get a little safer, with lowered CR spawns, whilst the necromancer will make them a little more dangerous, with higher CR spawns. Even more fun may be to make the spawns go higher and higher, or lower and lower. Limit the level that can go see the paladin or necromancer, and have a group be able to open a battle dialogue with them, and try to kill them, give them CR +6 or so... ...and let the challenge attract questers itself.


Then you would have "server impact" as well as "player driven quests".

It won't break lore, because at reset, everything will reset with it, but for 8 or nine hours, one or a group can change a landscape, and do so intentionally.
Post Reply

Return to “Solved Problems”