Well, I'm not sure at all when I can get to work at this, but the design I had in mind is:
- These "monster hunting areas" are separate crevices from rest of the server backbone, covering known dangerous areas so that each module area is representative of "combat map" for encounters - ICly always a different place between visits. (So this logic won't be used to spawns at/near roads and stuff) There will be no more than 10 or so areas on the server using this logic. And each area is dedicated to the encounter it has (composed of several spawnpoints, maybe).
- PCs enter these areas to hunt monsters; If monsters get the initiative (determined by skill checks), they flee and PCs find nothing. (So the party of all heavy-armor tanks will very likely walk around wondering why it's all so empty)
http://www.giantitp.com/comics/oots0024.html
Would be a nice touch to do an additional skill check that the scout notices hints of something having fled them when scouting check for initiative fails.
- Every time the area is entered, a "master encounter logic" should kick in to control spawnpoints. (A typical setup might be to use 4 spawnpoints of a goblin, with (independent) 60% probability for each to spawn, to get a number of goblins between 0 and 4, with average on 2. So on top of this, the encounter logic determines "are any goblins found", and if yes, kick in the spawnpoints as normal.
- The encounter area should reset itself relatively quickly after one round of "master encounter logic" for the next party. (Say, 30mins)
- The encounter area should not reset itself for this party to have another go until after a much longer time (Say, 5 hours)
To this effect, my plan has been this:
- Use ALFA spawns with 30min respawn timer.
- Hook the "master encounter logic" on the on_spawn_in script. This script checks for conditions, and if not met, will remove the spawn(s). These conditions are:
- Party scout beats the check of appropriate skills. (Say, party leader is the dedicated scout, need to tell players ooc to arrange it so.)
- None of the PCs in the party have had an encounter here in the last 5 hours.
- The party has more than one PC. (Yes, we always say to everybody they should never solo spawns, so here's coding that in.)
- The encounter logic will need to use variables that are stored per encounter, and ID PCs that have been here and when. For example, skillchecks are made per party per encounter, so one check is made and the result stored for every spawnpoint to use. Perhaps store this on a waypoint of a particular name in the area? Server resets should be rare enough that if it resets encounters for every PC, it doesn't matter.
The hard part seems to be that when the spawns activate and these spaw_in_scripts run, to have the script determine "Am I the first script of my kind running for this encounter? If yes, set parameters on the local variable storage, and then check if I should remove myself. If not, check from local varaible store if I should remove myself." The checking and writing parameters needs to be done in an atomic block for this to work, so that the "yes" part runs only once.
As long as there's a safety check that spawns won't pop up right on top of PCs (this should exist in the ALFA spawnpoint logic), that should cover it, as I'm think right now at least...
A troublesome issue might be the PCs coming in, and how they are set as a party. It's plausible the encounter logic script runs before all party members have ATd into the area. There's also the cases of the players partying up or not, which might be solved by telling the players how to organize to tell their automated encounter helper script what they're doing. (Give players an error report if the PCs present are eligible for an encounter cooldown-wise, but two party leaders are found (no dedicated scout))
It's getting long, but here's one more thing to consider:
If the encounter is set up of several spawnpoints, (the upto 4 goblins above), AND we still want to randomize the position within the area, we need some though. Else odds are each goblin is far away from each other, easy pickings one by one (since spawnpoints determine random positions within their range independently). A very nice solution would be to be able to hook it to the AI: The encounter logic makes every hostile in the area run towards the PCs and attack (same as "switch faction hostile" in the DMFI interface, only not stopping pursuit after awhile). Then the party attacking the 2 goblins they saw might be surprised by 3 ogres running in from outside their detection range! So use those sneaks and try to scope the area before engaging!
(Run script every 6 seconds: Cycle through all PCs: find which of them are in combat, and if anyone is, then cycle through all creatures: if this creature is hostile and not in combat, pick a random target from PCs that are in combat, and attack.)
Riotnrdd, are your encounters run from a single spawnpoint?
Well, the project is not quite insignificant. But one of these days...