|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Development::GeorgeS's Tools A forum just for GeorgeS's tools |
 |
|
 |

06-13-2009, 12:12 PM
|
Forum Guide
|
|
Join Date: Sep 2003
Location: California
Posts: 1,474
|
|
That sounds like a great challenge - great timing - I just came back from a business trip where I learned some pretty cool sql stuff, so I'm pretty prepared for writing this add-on.
Replication of a zone requires the following workflow (i'm just thinking out-loud)
easy parts
/1/ Creation of a replicate new zone entry in 'zone' table -- pretty easy.
/2/ Assign a new zone-id number in that table, and new shortname
moderately hard parts
/3/ Find NPC's from the zone - easy query (I already have this one made)
/4/ Replicate these NPC's with new id's -easy to do
/4a/ Ability to "wipe" zone clean of npc or it's loot - easy
Hard part
/5/ Find spawngroups from the zone (easy) but create new spawngroups with original npc's - brutal to write, but doable
That's the hard part because of the many table dependencies there. I'm confident i can manage the code. New Spawngroups are needed so as to create a distinct, and not a relational copy.
Easy
/6/ Have it re-use (if needed) grids - easy no issue there
/7/ Remove loot table IDs from the new copy or to carry over the existing ones - easy sql
I'll prototype this today, and start a progress log.
This can definitely be used for any zone, and assist in zone npc building better.
GeorgeS
|
 |
|
 |

06-13-2009, 12:21 PM
|
 |
Demi-God
|
|
Join Date: Mar 2009
Location: Umm
Posts: 1,492
|
|
I want to point out that a zone not nessesrily have to be a COPY of existing zone. It could be a stand alone instance zone which doesn't exist as mundane. It also also not nesesarily may have multyple versions of itself (unlike LDON)
|
 |
|
 |

06-13-2009, 01:19 PM
|
 |
The PEQ Dude
|
|
Join Date: Apr 2003
Location: -
Posts: 1,988
|
|
Quote:
Originally Posted by GeorgeS
/1/ Creation of a replicate new zone entry in 'zone' table -- pretty easy.
/2/ Assign a new zone-id number in that table, and new shortname
|
I just wanted to point out that those two aren't necessary. With instances, KLS has added a "version" column to spawn2 (and I've added it to npc_types, so I can keep track of which zone version the NPC is in.) That column allows us to have multiple versions of the same zone for instances. The basic point is, if you specify version 5 in the adventure template or instance quest functions, then only NPCs with a version 5 spawnpoint will spawn. So on your end, all you would need to do while copying is have an option to specify which version you want the copy to be. That would fill in version in both spawn2 and npc_types. Setting it to the same version as the source would be a 1:1 copy basically, for those wanting to copying spawns to other zones (which would be a cool thing to do I think as well) From there, the user could specify how they want the levels/stats/etc to adjust for the copy.
|
 |
|
 |
 |
|
 |

06-13-2009, 06:26 PM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Yeah, since the main thing we need is to make an exact copy of the current zone for use in the same zone, but maybe some different values for stats, I don't think it should be as bad as you think, GeorgeS. The idea to copy spawns to another zone is interesting, but there is no way to really handle the spawn2 locations for 2 separate zones easily. In those cases, it is easy enough to just use #npctypespawn in game and #npcspawn add the new spawns in. We just need exact copies of the current zone as far as spawn points go and then copies of the original NPCs in those spawn points. You could probably just append "v1" or "v2" or whatever version to the end of the existing spawngroup name.
Actually, it might make things more simple if you just made something that does an exact copy of the zone and sets it to be used in the new version, and then the other stats can be modified after the new copies are created. To do the modifications, you could add in a new percentage option for adjusting entire columns. It would be similar to the Propogate/Copy field function you already have, accept it would pop up a window that would let you adjust all fields by adding, subtracting, multiplying, or dividing from the original value in the field. So, if you set it to the divide option (radial button or something), then set it to divide all by 2, each field would be half of what it previously was set to. Of course, it would have to be able to use decimals when dividing or multiplying. But, this option would make it really quick to be able to adjust an entire zone column by column to scale exactly how you want to. It also might make your work a bit easier lol.
Thanks in advance as usual, GeorgeS!
|
 |
|
 |
 |
|
 |

06-13-2009, 10:50 PM
|
Forum Guide
|
|
Join Date: Sep 2003
Location: California
Posts: 1,474
|
|
I think I understand this better - and just to clarify , I would need to:
(I'm using an example zone -- mmca, The Forlorn Caverns)
(user specified version #1 as a starting source#)
(1) Find spawngroups from 'mmca' version#1, (I count 106) , and
make copies of these version#1 106 spawngroups.
-- Assign a new version # (user specified) into the 'spawn2' table field='version'.
(2) Find distinct NPC's in 'mmca' version#1,
-- Make copies of those NPC's.
-- Insert a version# in the version field. The user will specify which version# to use as a destination. (1-20 already exist in this case). Say the user selects a new version#21
(2a) Place these new npc's in the spawnentry table using the new spawngroup id's made before
--modify spawngroup with new spawngroup.id and add a new spawngroup.name
--spawn2.version=21, and add spawngroupID to = new 106 spawngroups
--spawnentry.spawngroupID set to new 106 spawngroups
--spawnentry.npcID change to new NPC's we made before
(3) Allow field editing as Trevius mentioned before in main tool
I think this looks right. The order of the workflow is/will be determined later, but I already looked at the db structure and see what's going on.
GeorgeS
|
 |
|
 |

06-13-2009, 11:00 PM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Yeah, that sounds right to me, but I haven't actually made any extra versions just yet. Cavedude would probably be the best to give the final verification on whether that is all that is needed or not.
One thing that might be worth mentioning is that I think spawning a zone initially will spawn it as version 0. So, you might need to have it copy version 0, or you could just set it to allow you to select which version to create the copy from and which version to save the new copy as. Again, CD would have to verify that to be 100% sure.
|

06-14-2009, 12:28 AM
|
 |
The PEQ Dude
|
|
Join Date: Apr 2003
Location: -
Posts: 1,988
|
|
Yep, that's correct.
Version 0 will always spawn, so an option is probably needed to tell the program whether to exclude version 0 entries or not.
|

06-14-2009, 04:25 AM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Oh, so if there is a version 0 of spawns in the zone, they will spawn in every instance version? I didn't know that lol. That being the case, it might be nice to also have a way to just change an entire zone to a different version as well. So, you could spawn a zone normally as version 0 with the normal commands and such and then once you are done, just use the tool to change them all over to whatever version number you chose. This would be an extra feature other than what was already listed. This one should be pretty easy though I think as it should just mean finding the mobs in the zone and then changing the version fields for them.
Oh, and that makes me think of another thing that you are probably already aware of, GeorgeS. When searching for the spawns in the zone, we would probably want an option to chose which version of the zone we are searching for, with the default being version 0.
|
 |
|
 |
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 11:27 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |