This necessity arises because when the Content team is building zones, sometimes the data we collected is very busy, and we have to delete a ton of excess spawns to clean the areas up. I started thinking about how to make this job easier, and spawn templates was the easiest solution. I will walk you through a typical Content Team cleanup process now using Templates, and you can see it is much easier.
First, identify an area that "looks like" it could be a single spawn point with multiple types of spawns in it, or even a single spawn type that scoots around the area slightly: In this photo, you see 2 unnatural gardens and a felled wood relatively close together (within 10' of each other). Only because I've stared at data for 4 years, I immediately know this is likely redundant, and I will want to clean up this mess.
I use the /spawn combine 10 command, because there are no other ground spawns within 10' of the center, so I know these all belong to this one Spawn Location.
I then use the /spawn combine save command which analyzes all selected spawns, does some fancy math to determine the spawnpercentage for each individual type in the group, then removes all the selected spawns, re-creating a new Spawn Location with the 2 different types set at 67% spawn chance for gardens (because there were 2) and 33% spawn chance for wood (because there was 1... 1 of 3 = 33%
Once my new Spawn Location is saved, I can /reload spawns and see it appear at the center location. If I /repop a few times, I should be able to see both gardens and wood at this location.
Going to my DB Editor (or MySQL tables directly), I can now set up "offsets" so that 1 spawn location appears to spawn in different spots each time. I can identify my new spawn_location_id because World told me it was 1258 when I did the /spawn combine save
Looking at the spawn_location_placement table, I find the x_offset and z_offset fields (we don't care about y_offset unless you are randomly spawning vertically) and I first try a offset of 5 in the x and z axis, save the data, and try a few more /reload spawns. Now, I should see the garden spawning within 5 of the center radius (total of 10 each x,z distance). You can also set other parameters like the respawn timer, expire timer (when the node depops) etc.
If I like what I see, I am ready to save this as a template. Note that I used the new /spawn template save DLW_GardenWood command to save my new template. In this example, the resulting template ID is 4.
To use this new template somewhere else, I simply walk to a new location (in my case, a new messy area filled with gardens and logs) and use the /spawn template create DLW_GardenWood command. But first, let's look at my situation. I have nodes all over the place. Since I plan to use this template right here, I no longer need any of these, so I can target each garden and wood, and use the /spawn remove 1 command to delete the spawns from the zone.
With my area nice and clean, I go stand in the exact spot I want the new spawn to appear, and I issue the /spawn template create DLW_GardenWood command (or I can use /spawn template create 4 since that is the template ID). Now there a new ground spawn node at that location, with an x and z offset of 5, and a 33% chance of wood and 67% chance of gardens... and this makes me very happy!
This code should hit public SVN on our scheduled Monday weekly update (Jan 9, 2012).
Content Team Warning:
While this is good to use on random, single spawns - right now, you cannot store or create templates based on more than a single spawn grouping (parties of 2 or more). Be very careful which spawns you are removing from your zones, or you might accidentally break a spawn_location_group up. We can talk more about this in the content forums or on IRC.