|
|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
| Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc. |
 |
|
 |

07-08-2009, 03:57 AM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
One thing that might be a possibility would be to see if we can get objects like that to spawn in real-time when they are created. I know for sure that any model can be set on an item and dropped on the ground to simulate a static object. It should just be sending an object packet to do that. With that being the case, we should be able to use a command to place a fake item on the ground where ever we want just by having the command send the packet for it. Now, that alone might not sound too useful, but by using a little trick, we might be able to make good use of it. Since any object would be clickable as you said, we could probably set those objects so when you click them, they disappear. This would allow you to move around adjusting the position of an object until you are at the perfect positioning for it. Then, once you have the perfect position, you add something to the end of the command like "perm" to make the next one get added to the database. Any of the ones added without perm would just be temporary and used only for finding the right positioning. By using the perm option, it would still generate a fake object in the zone like it was previously doing, but this time it would create an actual entry in the database. Instead of having it enter the object into the objects table, it could put them into the doors table. There could even be an option to chose which table you want it to be permanently added to, so you could place tradeskill containers this way. If this idea worked like I think it should, this would make adding/placing doors, tradeskill containers and any static object a piece of cake.
Another nice use for a command like this would be that you could examine each object/door type that a zone has available without having to zone each time to do so. The zoning part is the biggest pain when manually populating zones with objects and doors.
I have never tried it, but it may be possible to spawn a door in real-time without having to zone as well. I don't see why it wouldn't work, but I have just never tried it. The main reason I suggest spawning them as an object is because it is easy to be able to remove them by clicking on them. The client thinks that the object was picked up if it is set correctly. I don't know of any way to remove a door in a zone without having to zone first.
That is something to think about while expanding the possibilities with objects and doors, anyway. I will try to look the code over that you posted, Shendare. Hopefully I can get it added tomorrow night if I have time to check it out and stuff.
|
 |
|
 |

07-08-2009, 11:29 AM
|
|
Dragon
|
|
Join Date: Apr 2009
Location: California
Posts: 814
|
|
Coding doors and objects as a ground spawn item for moving them around until the user is satisfied with their placement is an intriguing idea.
My first thought had been to be to look into sending the DoorSpawn or ObjectSpawn packets in real-time when using a #door create or #object create command. The command would send the client a message containing the ID of the door/object it created, and the user could use a #door move or #object move command, passing the ID.
However, this hinged on the ability to send a DoorDespawn and ObjectDespawn packet as well, and I haven't looked yet to see if it looks like a DoorDespawn opcode and struct are available, or whether it's simply a toggled switch in the DoorSpawn opcode and struct.
Further investigation is needed, but there's certainly promise.
|

07-08-2009, 11:35 AM
|
 |
Demi-God
|
|
Join Date: Mar 2009
Location: Umm
Posts: 1,492
|
|
I have actualy been playing with this for a while. I mean original Doors table is full of things which not actualy doors. It has tents, barrels etc.
Of course geting them to sit just right was a little bit a pain =)
Here some of my tents and fires in West Karana

|

07-08-2009, 12:03 PM
|
|
Dragon
|
|
Join Date: Apr 2009
Location: California
Posts: 814
|
|
Awesome!
Once the object table based placement goes live, you would be able to migrate your objects out of the doors table with a couple of SQL commands if you wanted.
Code:
INSERT INTO object (zoneid, xpos, ypos, zpos, heading, objectname, `type`, unknown08, unknown10, unknown20)
SELECT zoneidnumber, pos_x, pos_y, pos_z, heading, `name`, 0, 1 - ((opentype - 9) / 22), size, incline
FROM doors
INNER JOIN zone on zone.short_name = doors.zone
WHERE doors.opentype IN (9, 31);
Then when you're confident they're all now in objects correctly...
Code:
DELETE FROM doors WHERE opentype IN (9, 31);
|
| 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 05:30 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |