I did send you a PM with an overview of my approach. Currently I use 5 different methods for spawning monsters, which includes Bioware one, which I use sparingly about 10% of the time.
The others:
1. Random mobile spawners
2. Placed spawners
3. Moblile spawners (walking spawns).
4. My standard random list spawner.
Thanks for the mention TSM. There are a few spawners on the vault too. Mine is not a complete system, at least what I have on the vault, more of a template, or an add on to other spawning methods. One point is that since the standard Bioware spawner is so deficient, there was lots of room for developement there. Thus you have NESS and a number of others, or like TSM said mix and match or like FS said make your own, or any combitnation of the above.
My own personal favorite of the ones I did is the crowmaster, mostly because it's something you really don't see anywhere else, and because it adds a different element to the game. Of course he only calls in crows, but it's fun, and they have a purpose: to find you. If you can make a spawning method seem natural and at the same time have a certain functionality it really adds to the flavor of the game. The point being that the spawning method(s) you chose should be intergrated into your world in order to create the overall desired effect.
In further regard to your question in that you want specific monsters to show up in that case I would not use the Bioware spawner, as you can see it is very laggy. My approach using a for loop and merely creating copies/clones of creatures greatly reduces this lag effect. So perhaps some variation of that would help. Now if you want many varied creatures to show up at the same time my approach would not be as effective for that, but I made one where 2-4 creatures show up and then a single additional creature would be with them nearby. So say a few wolves and a goblin masterscout with it's own create line, to add some variation. Finally a resetting int which prevents the spawn from spawning continually until the resetting int is reset.
Here is an example of a triggered spawn in The Kemmering Forest:
#include "NW_I0_GENERIC"
void main()
{
int nCreature, nNumber;
string sCreature = "";
int iReset = GetLocalInt(OBJECT_SELF, "RESET");
if(iReset == 1)
return;
object oPC = GetEnteringObject();
object oArea = GetArea(oPC);
if (!GetIsPC(oPC))
return;
if (GetLocalInt(oPC,"Safe") == 1)
return;
if (GetLocalInt(oPC,"Run") > 3)
return;//script will only run 3 times, default would be 3
int iHdTemp = GetHitDice(oPC);
if (iHdTemp > 14)
return;
object oTarget = oPC;
float fDistance = 5.0 + (iHdTemp/2 + d4 (2));//higher levels notice things futher away
location lWP = GetRandomLocation(oArea,oTarget,fDistance);
location lTarget = GetLocation(oTarget);
location lWP1 = GetRandomLocation(oArea,oTarget,fDistance + iHdTemp/3);
if (GetIsSkillSuccessful(oPC, SKILL_LISTEN, 10) || (GetIsSkillSuccessful(oPC, SKILL_SPOT, 10)))//medium
{
SendMessageToPC(oPC, "Something is nearby!");
GiveXPToCreature(oPC, 15);
if ((GetStealthMode(oPC) == STEALTH_MODE_ACTIVATED)&&(GetIsSkillSuccessful(oPC, SKILL_SPOT, 10)))
SendMessageToPC(oPC, "Moving in Stealth in hostile area!");
GiveXPToCreature(oPC, 25);
switch (d4())
{
case 1: sCreature = "goblinraider"; break;//resref of creature
case 2: sCreature = "goblinarcher"; break;
case 3: sCreature = "moorwof"; break;
case 4: sCreature = "madcrow"; break;
}
for (nNumber = 0; nNumber < d3(); nNumber++)
CreateObject(OBJECT_TYPE_CREATURE, sCreature, lWP, FALSE);
object oCreature = GetNearestObjectToLocation(OBJECT_TYPE_CREATURE, lWP);
float fDistance1 = GetDistanceBetweenLocations(lWP, lTarget);
string sDistance = FloatToString(fDistance1, 2,0);
DelayCommand (1.0,SendMessageToPC(oPC, " Some movement, over there! " + sDistance + " metres away."));
DelayCommand (4.0, TurnToFaceObject(oCreature, oPC));
if (GetIsNight() || (GetStealthMode(oPC) == STEALTH_MODE_DISABLED) || (d100()> 80))
{
CreateObject(OBJECT_TYPE_CREATURE, "goblinscout", lWP1, FALSE);
}
if (GetIsNight() && (d100()>50))
{
CreateObject(OBJECT_TYPE_CREATURE, "goblinarcher001", lWP1, FALSE);
}
SetLocalInt(oPC,"Run", GetLocalInt(oPC,"Run")+1);
DelayCommand (60.0, ExecuteScript("randomspawnlisten",oArea));
//comment out the above if only useing spawn once.
DelayCommand (10.0,SetLocalInt(OBJECT_SELF, "RESET", 1));//make it untriggerable for a while.
DelayCommand (150.0, DeleteLocalInt(oPC,"Run"));
DelayCommand (200.0, SetLocalInt(OBJECT_SELF, "RESET", 0));//alter reset up or down.
}
}
Of course for your purposes you would want to get rid of the re-execute line, since you want them to spawn only once. But the idea is you select from a list of creatures wolves, goblins, and spawn some of them and then depending on conditions, night or PC not in stealth you add in a scout and perhaps another goblin archer.
This is just one example of the many I have made to fit various circumstances. Hope that helps. It's a big important question, imo, that's why I have spent so much time on it. The way this script is set up the scouts will call more creatures thus the execute script line which summons more goblins into the fight.
You can also see that I don't want this script to spawn for PC over 14 level since they are much too powerful for the encounter. You could do like wise for lower level PC to prevent a high level encounter from wiping them out if PC lower than 4th for instance return the script. Something to keep in mind.
Modifié par ffbj, 24 décembre 2010 - 05:45 .