Page 1 of 1

house items and other stuff

Posted: Sat Aug 12, 2017 10:58 am
by Ememjr
so i will take it based on the halas house i went in that had some items in it as spawn objects (looking for ideas here

that when we go to place a house item we will be creating a span for it which means that we will have to make sure our house item db includes the model type that will be displayed when placing the item

once that item is a placed house item(spawn) we also need a place to track what the item id was when he placed it, so we can pick it up and return the item to our bags

he other thing is i not sure how to go about creating a spawn that goes into the spawnlist on the fly when you do not have another spawn there to copy

ie i place a rug need to create a spawn programically, snd when rug is picked up delete the spawn( just not sure where in code it does that so i can call it.

Re: house items and other stuff

Posted: Sat Aug 12, 2017 3:44 pm
by Jabantiz
Like I said in your other post there is a program that lets you modify zone templates and that program documented the template file format, I believe it contained every thing you needed (owing player id, item id, model id) so that would be a good start for the table and we could add onto that as we need to.

Deleting a spawn is just zoneserver->removespawn.

Placing a house item would probably need to be started by lua as you need to right click the item to start it, though we will probably need to add server functionality to handle it. To create a spawn on the fly look at the command "/spawn create" to create the spawn and add it to the zone and "/spawn add" to save it, though to save it we will need to push it to the housing items table and not the spawn table.

Re: house items and other stuff

Posted: Sat Aug 12, 2017 3:48 pm
by Jabantiz
And a quick search I found the program, here is the file format for the template. It doesn't have model id, but that can be obtained from the item, player can be obtained from the unique id (db id is what they call it).

Re: house items and other stuff

Posted: Sat Sep 23, 2017 11:52 am
by Ememjr
And a quick search I found the program, here is the file format for the template. It doesn't have model id, but that can be obtained from the item, player can be obtained from the unique id (db id is what they call it).

i have been looking but do not seem to be able to find the model type in our items db, also can not find the model type in census
and with over 6600 house items in our DB thats alot of items to do 1 at a time lol

Re: house items and other stuff

Posted: Sat Sep 23, 2017 4:00 pm
by Jabantiz
It should be like armor, I believe it is the `item_appearances` table.

Re: house items and other stuff

Posted: Tue Sep 26, 2017 3:03 pm
by Ememjr
item_houe table appears to be designed for the different stats of house items i figured i would take a stab at adding to it for the additional items that will be required to place the items this includes

model_id
primary_command (manyitems have different commands when placed)
secondary_command
location_allowed ( some items can only be on floor, some wall, some ceiling, etc

this is all i can think of for now please let me know if i should change anything

Code: Select all

ALTER TABLE `eq2world6`.`item_details_house`   
  ADD COLUMN `model_id` INT(10) DEFAULT 0 NOT NULL AFTER `house_only`,
  ADD COLUMN `primary_command` INT(10) DEFAULT 0 NOT NULL AFTER `model_id`,
  ADD COLUMN `secondary_command` INT(10) DEFAULT 0 NOT NULL AFTER `primary_command`,
  ADD COLUMN `location_allowed` SMALLINT(5) DEFAULT 0 NOT NULL AFTER `secondary_command`;