Author Topic: Creating a new object and importing it into PS  (Read 4043 times)

Donari Tyndale

  • Hydlaa Notable
  • *
  • Posts: 748
    • View Profile
Creating a new object and importing it into PS
« 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?

Ralleyon

  • Hydlaa Citizen
  • *
  • Posts: 304
  • Protector in the Survivors of Vaern
    • View Profile
Re: Creating a new object and importing it into PS
« Reply #1 on: January 18, 2007, 05:48:50 pm »
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

To see the world in a grain of sand
And Heaven in a wild flower,
Hold Infinity in the palm of your hand
And Eternity in an hour.
     
   [William Blake - Auguries of Innocence]

Holdan

  • Hydlaa Resident
  • *
  • Posts: 67
    • View Profile
Re: Creating a new object and importing it into PS
« Reply #2 on: January 18, 2007, 05:51:49 pm »
A banana... a weapon...

whats someone gonna do slip on it's peal, fall down and break their leg?

Ralleyon

  • Hydlaa Citizen
  • *
  • Posts: 304
  • Protector in the Survivors of Vaern
    • View Profile
Re: Creating a new object and importing it into PS
« Reply #3 on: January 18, 2007, 05:57:51 pm »
* Ralleyon 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!!!!!
To see the world in a grain of sand
And Heaven in a wild flower,
Hold Infinity in the palm of your hand
And Eternity in an hour.
     
   [William Blake - Auguries of Innocence]

ThomPhoenix

  • Testers
  • Forum Addict
  • *
  • Posts: 2678
  • A Phoenix, what'd you expect?
    • View Profile
Re: Creating a new object and importing it into PS
« Reply #4 on: January 18, 2007, 06:19:56 pm »
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
We're not evil. We're simply amazing.

Donari Tyndale

  • Hydlaa Notable
  • *
  • Posts: 748
    • View Profile
Re: Creating a new object and importing it into PS
« Reply #5 on: January 18, 2007, 06:37:55 pm »
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?

Ralleyon

  • Hydlaa Citizen
  • *
  • Posts: 304
  • Protector in the Survivors of Vaern
    • View Profile
Re: Creating a new object and importing it into PS
« Reply #6 on: January 18, 2007, 07:04:38 pm »
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.

Code: [Select]
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.
« Last Edit: January 18, 2007, 07:13:28 pm by Ralleyon »
To see the world in a grain of sand
And Heaven in a wild flower,
Hold Infinity in the palm of your hand
And Eternity in an hour.
     
   [William Blake - Auguries of Innocence]

Donari Tyndale

  • Hydlaa Notable
  • *
  • Posts: 748
    • View Profile
Re: Creating a new object and importing it into PS
« Reply #7 on: January 18, 2007, 09:18:51 pm »
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:
Quote

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  :'(
Quote
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?
« Last Edit: January 19, 2007, 10:15:01 am by Donari Tyndale »

Donari Tyndale

  • Hydlaa Notable
  • *
  • Posts: 748
    • View Profile
Re: Creating a new object and importing it into PS
« Reply #8 on: January 20, 2007, 04:31:53 pm »
No one got any idea?

Induane

  • Veteran
  • *
  • Posts: 1287
  • What should I put here?
    • View Profile
    • Vaalnor Inc.
Re: Creating a new object and importing it into PS
« Reply #9 on: January 25, 2007, 04:54:11 pm »
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

novacadian

  • Hydlaa Notable
  • *
  • Posts: 962
    • View Profile
Re: Creating a new object and importing it into PS
« Reply #10 on: January 31, 2011, 05:02:49 pm »
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

weltall

  • Moderator
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Re: Creating a new object and importing it into PS
« Reply #11 on: January 31, 2011, 09:10:38 pm »
it's generated automatically

novacadian

  • Hydlaa Notable
  • *
  • Posts: 962
    • View Profile
Re: Creating a new object and importing it into PS
« Reply #12 on: February 01, 2011, 02:33:48 am »
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

« Last Edit: February 01, 2011, 02:41:30 am by novacadian »

Earowo

  • Veteran
  • *
  • Posts: 1463
    • View Profile
    • Guild Site
Re: Creating a new object and importing it into PS
« Reply #13 on: February 01, 2011, 03:46:13 am »
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
Dohmo: Please clean up your language immediately.
Me: as i just said, what i said, fits in the guidlines of rated PG, i was just explaining to the G guy
Dohmo: Sorry I tried to e nice
Dohmo: and i'm telling you to clean it up. last warning
Dohmo: now just do it
Dohmo: No more warnings

Abuse?