PlaneShift
Development => Development Deliberation => Topic started by: Donari Tyndale on January 18, 2007, 05:26:10 pm
-
I have created a new item, a banana (category weapons), but now I am wondering how to import it into one\'s local server without overwriting existing objects?
-
If you mean you created the mesh for it and then added it in the food.zip folder, all you have to do is:
- edit common_strings table and put the name of the mesh in there
- edit item_stats table and add everything about the item in there
You should be good to go to summon it up after that in your inventory with the /item command
-
A banana... a weapon...
whats someone gonna do slip on it's peal, fall down and break their leg?
-
/me laughs heartily
That reminds me of someone who said that one fought armed with a carrot.
All you have to do then is put it in the weapons.zip folder and tweak item_stats a little and make the most vicious banana in the world!!!!!
-
Yup, something like:
"INSERT INTO common_strings VALUES("222","/planeshift/food/banana.dds");
Put the Banana in /planeshift/art/things/food in that case.
And into item_stats:
INSERT INTO `item_stats` VALUES (4817,'B','Banana',7,5,100,0,'BULK LEFTHAND RIGHTHAND','MELEEWEAPON',0.1,0,-1,-1,'0','0','0',0,0,0,4,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0.2,0.2,0.2,0,0,0,0,0,0,0,0,0,0,0,0,222,162,0,0,0,'Sabre',1,150,'SWORD','',0,'',0,'0',0,0,0,0,0,0,0,1,'0','nosound',50,'','',NULL);
Should give you a somewhat workable item, I think. I didn't test it :P
-
INSERT INTO common_strings VALUES("222","/planeshift/food/banana.dds");
Shouldn't it be Banana.spr?
And no, it does not work. Where do I find a list for all these parameters?
-
There is no such list, it's a try and guess thing. As for the lines... just go by example:
INSERT INTO common_strings VALUES("2000","items#banana"); --> this is the name of the .spr file
INSERT INTO common_strings VALUES("2001","/planeshift/food/banana_icon.dds");
And do not forget to match the cstr_id_gfx mesh (-> 2000) and cstr_id_gfx_icon (->2001) with the number in the common_strings table.
INSERT INTO `item_stats` VALUES (4817,'B','Banana',7,5,100,0,'BULK LEFTHAND RIGHTHAND','MELEEWEAPON',0.1,0,-1,-1,'0','0','0',0,0,0,4,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0.2,0.2,0.2,0,0,0,0,0,0,0,0,0,0,0,0,2000,2001,0,0,0,'Sabre',1,150,'SWORD','',0,'',0,'0',0,0,0,0,0,0,0,1,'0','nosound',50,'','',NULL);
If you don't have an icon for it (it shows in the inventory), you can use another just as well. Instead of 2001 in the line above use 37 for example.
-
I just copy and pasted ... made sure the .spr file was correctly placed and linked claymore_icon as icon.
Still not working though... :(
Edit:
Found the answer :D
You need to set the database again, just repeat the following steps from the compiling guide:
cd c:\development\planeshift\src\server\database\mysql\
mysql -u planeshift -pplaneshift
mysql> use planeshift;
mysql> source create_all.sql;
mysql> quit
But he doesn't take my icon :'(
INSERT INTO common_strings VALUES("2001","/planeshift/food/banana_icon.dds");
I made sure the link in Item_stats was set and the file was in the food folder (64*64 pixels). Any ideas what to do about it?
-
No one got any idea?
-
Try installing phpmyadmin. It will let you administer teh planeshift database in a visual fashion. It might help you see exactly what fields you need and also compare it to other weapons so you know good values to use.
Here is a shot of the web interface. Its really quite nice:
http://vaalnor.mine.nu/Screenshot.png (http://vaalnor.mine.nu/Screenshot.png)
-
INSERT INTO common_strings VALUES("2001","/planeshift/food/banana_icon.dds");
Is common_strings table no longer in use? It is not included in the *.sql files provided with the server release.
- Nova
-
it's generated automatically
-
it's generated automatically
Thanks, as always, weltall. With that in mind mention of it was tracked down in upgrade_schema.sql, planeshift_db.xml and drop.sql. ;)
- Nova
-
A banana... a weapon...
whats someone gonna do slip on it's peal, fall down and break their leg?
Naa, but I do remember a long while back, I drunkily 'Mugged' and ulbernuat if you know what i mean