No categories assigned

DBEditor:MigrateZone

DBEditor - Migrate Zone

The Migrate Zone script is meant as a controlled method of populating a zone, versus throwing everything the Parser has into it.


The Grid

A quick overview of the main components of this screen are as follows.

DBE Admin4.jpg

The Selectors:

1. The Zone Selector
2. The Spawn "Type" Selector (NPC, Object, Widget, Sign, Groundspawn)
3. Single-spawn filter optional
4. Migrate the entire zone as-is disabled
5. Show/Hide the Hidden spawns/locations


The Data Elements:

SpawnID           : The zone_id (470) + spawn # (00357) for this spawn (it's spawn.id value)
Name              : Spawn Name
Sub-Title         : The title/guild name that appears under the spawn's name in-game
Race              : Race ID
Model             : Model Type (appearance_id)
Levels            : Min Level / Max Level / Difficulty
New SpawnID       : unused
Spawn These button: Spawn ALL placements for this one spawnID
Hide These button : Hide ALL placements for this one spawnID

LocationID        : The spawn_location_id of this placement
X                 : X coordinate
Y                 : Y coordinate (vertical)
Z                 : Z coordinate
H                 : Heading
group_id          : whether or not the spawn is grouped with another spawn - careful!!!
Spawn This button : Spawn this ONE placement for this one spawnID
Hide This button  : Hide this ONE placement for this one spawnID


Spawn Types

The grid data changes slightly when you select different Spawn Types to migrate. The changes are minor, so I won't get into much detail. An example is that for NPCs, we show the group_id (which is no longer needed anyway). For Objects and Groundspawns, we show the visual_state value. And for Signs and Widgets, the widget_id.


None of these should matter to choosing what to spawn, however.

The Messy Way

If we simply populated our worlds from our raw data with the PacketParser -populate eq2world, the outcome might look something like this --

DBE Admin4a.jpg

Yowza, huh? Besides there being thousands of unnecessary spawns of a single type, there are probably thousands of every type, because the Collector is not picky about what it collects.


This is what the tainted sapswill invaders records look like in the Migrate Zone script, before they are popped --

DBE Admin4b.jpg


If you think that's ugly, you should see Antonica...

But anyway, we chose to pop our zones in a more controlled manner that does not end up with us crashing our clients, or unable to maneuver the zone at 0fps.


Spawn This

Instead, we'll select individual Sapswills from that god-awful list and pop only the dozen or so we need, basesd on their x,y,z coordinates. You do not have to be precise, because you can pick them up and move them once they are in-game. For our example, we'll pop just 1 lonely sapswill.

DBE Admin4c.jpg

Here, we're picking a single spawn location that is near where our character is standing in the zone (I did a /loc, then searched for nearby coordinates). Since I just want this ONE SINGLE record, I will click "Spawn This", and the script will insert a new spawn record (if it doesn't already exist), and place the spawn at the location defined.

Doing a quick

/reload spawns

shows us our results.

DBE Admin4d.jpg

Now isn't that much nicer?


Spawn These

The Spawn Theseoption merely takes the current spawn ID and every one of it's spawn placements, and loops through the whole batch spawning them all just as they were in the Raw Data. This is helpful if you know there are minimal duplicates in your spawn (like objects, doors, signs, etc) and you just want to pop them as-is.


I usually use Spawn These for all Groundspawns, because I like to see patterns in how they are spawning in order to make Spawn Templates out of them to make my job easier.


When you are done with Spawn These, the entire batch is "processed" and no longer shows up in the Migrate Zone list.


Hide This/These

Hiding This or These is just a way to get excess garbage out of your way. For example, if you see a Named spawn (like a broker) and there are 12 spawn locations for that same exact spawn, you can choose to "Spawn This" on one of the entries, then "Hide These" on the rest of them. They will no longer show on the Migrate Zone list.


They are not removed or deleted, only marked Hidden. There may be a case where you need them again!


Show Hidden

Use this button to display a listing of spawns you previously hid. If you wish, you can Unhide This or Unhide These to add them back to the list of possible Migration spawns.

Note: You cannot Spawn This/These from Hidden! You must un-hide it first.


Migrate All

Migrate All has recently been put back in, because some zones were collected "clean" enough to warrant populating everything at once. After you pick the zone, pick the spawn type to populate. If the list looks nice and clean, click Migrate All and all those spawn (types) will be send to the destination DB.


Note: Be sure to Migrate All for NPCs, Objects, Signs, Widgets and Groundspawns, or you'll be missing stuff.

The Process

A quick explanation of what these scripts are doing. When you spawn anything, the first thing to happen is the Spawn record is inserted into the destination DB, along with all it's related data (npcs, objects, widgets, spawns, groundspawns).


SPAWN THIS

After the spawn's main data has been inserted (or verified it already exists), 
the single location you selected to spawn gets inserted into the spawn_location* tables. 

SPAWN THESE

After the spawn's main data has been inserted (or verified it already exists), 
The script takes all the locations for that NPC and inserts them all without prejudice.


Also at this time, if the spawn belongs to a Spawn Group (a linked group of more than 1 spawn), the spawn group entries are also inserted.


When everything inserted into the destination DB without error, the last thing the script does is reach back into the RAW database and mark the spawn as "processed", with the value of "1" in the spawn.processed and spawn_location_placement.processed fields.


Spawn Group IDs

Spawn "groups" are those spawns you target in game and more than 1 NPC will light up, attack, etc. Parser does a pretty good job of determining spawns that are in groups when the collector runs passed them. There are many cases where it does not, however - so this is not a 100% fool-proof option. Some editing will need to be done.


Because of this, when you Migrate a spawn to the destination DB, *if* it is part of a spawn group, then all of it's spawn "buddies" get migrated and processed as well. Keep this in mind if you are Spawning an NPC that has a group_id value. *NEW* In the editor, you should see similarly colored backgrounds for matching spawn groups for easier identification.


The Results

Once you spawn what you need for your zone, you can enter the world and do a quick

/reload spawns

to see your results; a much cleaner, more controlled zone to work with.