No categories assigned

ContentDesigner:NPCs

Designing NPCs is probably one of the most important tasks in the Content project. Getting the zones to look awesome is most of the battle. This article describes the many tasks behind getting your zone to look "just right".


Entering the Zone

I wanted to point out one very important hint; before entering a Raw zone for the first time, I advise you to drop your client's Graphics settings to Very High Performance (the lowest gfx setting possible). Reason being, most of these zones might have thousands of spawns within eyesite of your client, and you will most definitely run out of resources, memory, and crash your client. Or, movement will be near to impossible.


Trust me on this. Now, let's log in.


Verify Locations

Players familiar with Everquest II will expect to find their NPCs in the right place in our database because it is meant to mimick Live. Verifying an NPC is in the right place is a simple task, because 90% of the time, Collector found a static spawn standing where they belong. Most of the rest we have wanderers (NPCs that walk around), dead NPCs that got collected before they depopped, or situations where an NPC was chasing someone as you ran by with your collector going.

There is a very small percentage of spawns that are simply facing the wrong way due to a math glitch in the PacketParser being unable to determine heading.


For these cases, we need to verify spawn locations. Below are two examples:

VerifyLocation1.jpg

In this example, I moved a spawn completely to the wrong place just to show you that a Formidable Sparring Partner should not be standing by the tent. Since that guy is in the wrong place, you'll need to move him. Execute the command

/spawn move

while you have the NPC targeted, and move to where you think he should go (by the other sparring partners in this case). Using the mouse-wheel, you can spin his heading too, just like placing furniture in your house!


VerifyLocation2.jpg

The more common case are heading issues. NPCs, and other spawn types, can be facing the wrong way a bad parsing of data. The simple fix would be to grab the spawn, twirl it around and set it in the right place. But because we would like to be precise, it would be better to simply edit the spawns Heading parameter in the DB Editor->Spawns menu.

VerifyLocation3.jpg

Since you know the spawn is facing the wrong way, and you see his Heading is currently 0 (zero), simply type in 180 (for 180 degrees, 1/2 a circle) and save the row, then execute the

/reload spawns

command in-game and you'll see your sparring partner is now facing the right direction!


Verify Appearance

Recent changes to our Parsing process have resulted in much more dynamic Appearance options for our NPCs. Utilizing the EQ2Emulator's powerful randomize feature, we can spawn NPCs of many shapes and sizes and appearances (hair, beards, color of skin, shape of face/body, etc) all from a single spawn ID.

Check out the WIKI article on Randomize for more information about this option. For the purpose of this discussion, we will assume all NPCs are spawned properly and their randomize options are not set.


VerifyAppearance1.jpg

Take our poor naked Sparring Partner for example. In EQ2 Live, he is definitely dressed in armor! If you check his npc_appearance_equip page in the DBEditor->Spawns menu, you'll see he has no entries, when he should. You can either dress him yourself, or return to the raw data to see what went wrong.


A more familiar Appearance problem would be bald heads, mis-shapen faces, incorrect races (evil races in good city areas), or missing skin (ewww!)

By missing skin, of course I just mean the color is lost. Spawns without skin_color settings are given 0,0,0 - or Black. They are pretty obvious to see, because no spawn should be 0,0,0 color - that is just too dark to even make out features.


Fixing these is important to the player's experience and the accuracy of our database.


Wanderers

Wanderers are those NPCs that spawn at a certain x,y,z and move down a certain path towards another location. While they are moving through the zone, various Collectors might have caught that same spawn in 20 different locations. You might think this is bad (oh no, dupes!!!) but these are actually the good kind of dupes!

Seeing visually in the data what an NPC's wandering path is can greatly assist you in developing the MovementLoops necessary to mimick that activity in our zone. It is recommended that, if you know an NPC is apt to wander, you should spawn ALL of their placements (Spawn THESE)! The reason is clear by looking at the following two screen shots;


Screenshot 1 - detecting patterns:

Wanderers1.jpg

If you stare at raw data for as long as I have, you start noticing patterns in the spawn process. Note in this screenshot above, the spawns literally form a grid along the X/Z axis in the zone. This tells me (a seasons Content guru) that the "tainted sapswill invader" NPC is set to spawn in a specific location, with a slight offset to both X and Z.

Not only do I know this spawn has a slight offset, but I also know (from playing EQ2) that this particular spawn - just a few, not all - wander from their starting point up to the Defenders who engage them in battle.

Screenshot 2 - seeing pathing:

Wanderers2.jpg

The arrows in the 2nd screenshot are definitely not "fact", but just to give you an example that you can see where a spawn might pop into the zone, then note the clusters of itself, or directions it is facing, as it moves it's way towards our stalwart Defenders.


Once you begin to see these patterns, creating MovementLoops becomes a no-brainer, and determining which of these 1600 sapswill spawns are really dupes, and can be permanently deleted.


Consolidation

As of DB Milestone 2 (Jan 2012), manually consolidating NPCs is no longer necessary. The Parser takes care of that on the raw data side. The only time you should have to manually consolidate any NPC is if you feel the parser made a mistake, and you want to see a different min/max level or size, or alter the types of Randomize features for a static spawn.


Linked Spawn Groups

As of DB Milestone 2 (Jan 2012), Parser now uses the SOE-provided flags on NPCs as to whether or not they belong to a linked spawn group. A Linked Spawn Group are those groups of NPCs, 2 or more, that when you engage one, they all come out fighting.


Simple Spawn Groups

If there is ever a case where you see two spawns standing near each other, and you know for certain they are supposed to be linked but are not, you can build your own spawn group to correct that problem. Here's how:

Target the first spawn you wish to group and type

/spawn group create PriestSapswill (or whatever name fits what you are creating)

The client will return a message that is very important right now!

Successfully created new spawn group with id: 27823

This ID happens to be the next spawn_location_group.id in our database.

Now target the second spawn and type

/spawn group add 27823

and you should see

Successfully added 'a tainted Sapswill fighter' to group id: 27823

Test it out! Type

/reload spawns

and target either one of the NPCs in that spawn group. They should both "light up".

To verify for sure, target both and type

/spawn details

and verify they both belong to spawn group ID 27823.


Missing Spawns

Parser can only work with the data it was given from Collector though, so I'd give these a 50/50 chance of being accurate. Meaning, sometimes you'll find a spawn area that you know is supposed to have 2 or more spawns linked in a group, but there is only one. In these cases, Collector probably ran by after the entire group was killed, except for one who survived (and you can laugh quietly to yourself that the player and their party was probably wiped out emoticon


In this case, you'll need to build your own Linked Spawn Groups.

LSG1.jpg

In the above example, we know that each of the 4 spawn "locations" in this encounter have at least 2 spawns linked in a group. The priest on the right is linked to the sapswill on the left, and the two in the tent are linked together (meaning, they both target when you target one or the other).

However, see how there is not a sapswill associated with the targeted defiled priest? That's because likely the sapswill was dead when this packet got collected. We can fix that by simply spawning another sapswill at the right-side priests location, then building them into a group. Here's how:


Target the defiled priest who stands alone, and type

/goto

You are now standing on his spawn location, facing his direction. Perfect.

Now target the sapswill out front standing with the other defiled priest and type

/spawn details

Note his SpawnID, then wherever you are standing, type

/spawn 2530019 (that is the number of the spawn we're creating)

A new sapswill spawn should appear at your feet. Finally, type

/spawn add new Sapswill

to save it to the database. Reload your spawns with

/reload spawns

and verify your new spawn is now in place.


Now that you have the spawns you need, build the spawn group the same as you did above in Simple Spawn Groups.

Your new spawn + spawn grouping should look similar to this:

LSG2.jpg


Spawn Group Associations

Spawn Group Associations is the joining of 2 or more individual Linked Spawn Groups to make a truly dynamic encounter. This is where things get a little more complex.


Taking the same Sapswill/Priest camp you see above, something you cannot see in the static screen shot is that the front 2 locations have 3 spawns each, standing at the exact same x,y,z (so they are hard to see). You can see them in-game, because they animate slightly and you can catch glimpses of the multiple spawns. You can also use your TAB key to cycle through targeting to see the names change in your target bar.


Note: This would be a good time to bump up your graphics settings to as high as your computer will allow - to see much more detail


A rough example:

LSG3.jpg

If you look closely, you'll see I have the level 5 defiled priest targeted, but in front of me the level 4 defiled priest keeps popping into view. This is because both the level 4 and 5 (and the Sapswill fighter) are at the exact same x,y,z. This is because this encounter has multiple linked spawn groups in it.


Since the spawn groups are already set up, all you have to do is "associate" them with each other, and then only 1 of the groups will appear during any one spawn cycle.


Note: When spawn groups are associated in this way, a random chance is rolled as to which of the (max groups associated) will get to spawn. There are ways to chance the randomness of this. See Spawn Group Chances below.


To get started, I first have to verify all the spawns I need to complete the encounter are spawned and in the database. Because I am familiar with this encounter, I will design it as follows:

LSG4.jpg

Take a close look at this screenshot.

Group 1: There is a Sapswill on the left linked to a priest on the right.
Group 2: There is a priest on the left linked to a Sapswill on the right.
Group 3: In the back, the two are linked.
 Solo  : There is a level 5 priest without a partner - for this example, this is okay


I want to associate Group 1 with Group 2 --AND-- the Solo priest, because at any one time, I only want the left/right combos or the single priest to appear at the same time. To do this, I target the first spawn group (the left Sapswill) and type

/spawn details

so I can identify the Spawn Group he belongs to. I see it is 14564 from my screenshot:

LSG5.jpg

Knowing this number, I now target my SECOND spawn group (hit TAB til the level 4 priest and his partner light up) and type

/spawn group associate 14564

and you should see

Successfully associated group id 27823 with group id 14564

Wait, we're not done yet! We have to get that solo priest in the group association still!


Target that last spawn, the level 5 solo priest. You first have to be sure he is in a group, even though he has no partner, so again type

/spawn details

and check his Spawn Group ID value. If it is not zero, then proceed to type

/spawn group associate 14564

again, and once again see the success message. If all went according to plan, you can now type

/reload spawns

and see only the 2 spawns up front linked together, or the solo priest spawn. Type

/repop

a few times to see them change!


LSG6.jpg

LSG7.jpg

LSG8.jpg


Spawn Group Chances

Using the above example of the 2 Linked Spawn Groups and the solo priest spawn, let's now say that you want the 2 linked groups showing up 75% of the time, and the solo priest showing up only 25% of the time. Because you know the solo priests spawn group ID was 20860(you checked it earlier), you can target that level 5 solo priest and type

/spawn group chance 25

and the client should tell you

Successfully set group spawn chance to 25.000 for group id 20860

Wait! You're not done yet!


Since you have now told this one encounter that you want some NPCs spawning more often than others, you can no longer leave the other 2 groups in this encounter up to random chance! You know your second group id was 27823 and the main one you associated everyone with was 14564. You can now decide if you want the two balanced equally, or more dynamic still. Try targeting a spawn in the 27823 group and type

/spawn group chance 35

Then repop to find a spawn in the 14564 group, target it and type

/spawn group chance 40

Now, your encounter has a 40% chance one group will spawn, a 35% chance the second group will spawn, and a 25% chance for the solo priest. Cool, huh?


Spawn Group Placeholders

Okay, so you know how a single spawn in the zone can have it's own "spawn_percentage" chance to pop? Eg., one location could have a skelly one time, or a gobbie the next, or even a dog the next... all based on random chance and the mighty /spawn combine command.


Well, it's true. Linked Spawn Groups could have placeholder spawns, on top of linked spawn groups, associations AND chances. Whew. Lucky for you, the spawn groups and their associations do not care what percentage a single spawn point might pop... they are focused on the point itself - not the spawn. So you can pile up 100 spawns, 1% chance each, and group them to death... and it will be one helluva dynamic spawn.


Psst, turn on /randomize for those spawns and watch it blow your mind emoticon


For my best use case of a linked spawn group that contains placeholder (percentile) spawns, might be a boss encounter where the boss(es) are very rare. You could have a single spawn point where the boss is, contain the boss at 10%, while some other trash mob is at 90%. Group that with 2 other spawns on either side (minions) in multiple groups and/or chances, and there you go... a nice, fat rare spawn encounter. The options are endless.

Entity Commands

Spawn Customization

Spawn Scripts

SpawnScripts are what gives your NPC's life. The emulator uses LUA as its scripting engine, and combined with spawnscripts a NPC can preform actions like move, attack, and have conversations.

There is a standard for our scripts that can be found onthis post. The post will be moved to the wiki at some point with some revisions.


Back to Content