PlaneShift

Development => PlaneShift Mods => Topic started by: apalazzi on May 18, 2013, 05:30:09 pm

Title: Adding new assets to a server
Post by: apalazzi on May 18, 2013, 05:30:09 pm
Hi,

first a little presentation: we are an italian team who already runs two shards based on nwn1 and nwn2, you can see our site at http://www.ladiun.it .

However the nwn2 shard has a bunch of problems, so we would like to setup a new world using the Planeshift engine.

So far we managed to compile everything under Linux and the server and client run fine; however the other tools have some issues, but we didn't dig into this yet.

We're also having some trouble in adding new assets to the server, the documentation (we're mainly looking at the wiki) doesn't explain deeply what needs to be done and which files or tables in the database need to be updated and how when you add some new asset... is there maybe some tool that takes care of doing all the needed changes when a new content is added?
Also, which programs (and which version) are you using to create new assets?

Thanks
Andrea
Title: Re: Adding new assets to a server
Post by: gonger on May 19, 2013, 12:38:25 pm
Why not simply join the PS Developpers? Better one big community, than two small ones...
Title: Re: Adding new assets to a server
Post by: hulla on May 19, 2013, 12:49:20 pm
hello
i am not a "specialist" i just know the name of the 3d engine of ps
it is  crystal space
http://www.crystalspace3d.org/main/Main_Page
i dont know what is an "asset" but i know the 3 d art is making whit blender
http://www.blender.org/ ( whit a special export mode for crystal space )
perhaps you can found more help on the irc ?
planeshift on freenode
manny dev are on the irc manny time
( and i think making a game only in italian is perhaps not the best choice for a game )
Title: Re: Adding new assets to a server
Post by: LigH on May 19, 2013, 07:09:28 pm
I believe the kernel of the question is handling the database, knowing where to register meshes, textures etc. to make "items".
Title: Re: Adding new assets to a server
Post by: apalazzi on May 19, 2013, 07:33:50 pm
Why not simply join the PS Developpers? Better one big community, than two small ones...

Hi,

I understand your point of view and we also discussed about joining the PS effort, however our project has enough differences with Planeshift to make us choose to setup a new server.
This however will not prevent us to contribute to Planeshift with testing, debugging, maybe some documentations and maybe other tasks.

Bye
Andrea
Title: Re: Adding new assets to a server
Post by: apalazzi on May 19, 2013, 07:39:54 pm
I believe the kernel of the question is handling the database, knowing where to register meshes, textures etc. to make "items".

Thanks LigH, you are right: the core of the question is how to register meshes, sectors, music, effects, materials not only in the database but also in the varios xml files around.
However also the other part of the question is important, especially with the 3dsmax exporter: the exporter is said to work with 3ds V5 or V6, but the current version is 2013, ant thus my curiosity to know the tools (and versions) used to actually make the contents in PS.

Bye
Andrea
Title: Re: Adding new assets to a server
Post by: novacadian on May 19, 2013, 08:40:20 pm
You used to have to use an old unsupported tool called b2c yet the latest version of Blender has a supported tool which is said to handle new content handling much better. b2c was working for me some time ago and just read about the newer somewhere on the http://osgrid.org forum or something. Best try googling on "b2c blender" and you may find it mentioned in discussions about the newer setup.

Will try to follow your project with the help of a translator. :)

- Nova
Title: Re: Adding new assets to a server
Post by: LigH on May 19, 2013, 10:30:20 pm
The current and rather completely rewritten "b2c" (blender2crystal) exporter script is contained in the CrystalSpace library package. Do not try to use the outdated separate sources which were compatible to blender older than 2.5.
Title: Re: Adding new assets to a server
Post by: Eonwind on May 20, 2013, 10:23:57 am
hi apalazzi,
I'm the PS rules department developer. For adding new assets to the server we mainly use SQL instructions and we load them in the database. If you look at SVN you will find a wealth of examples on how to do things, including spells, weapons and such.
Another way to add content is trough the server WebConsole. You will find the tool in SVN as well, it's mainly a web interface that allow developers to access the game resources and add/modify them. This include adding quests, NPCs (adding, modifying, ...). Last but not least assets can be added in game directly with a high enough permission level. This include: waypoint paths, NPCs, Action Locations and more.
About how to handle the npcclient, and the crafting I suggest to look at: http://planeshift.top-ix.it/pswiki/index.php?title=Main_Page (http://planeshift.top-ix.it/pswiki/index.php?title=Main_Page) which contains many informations as well.
Title: Re: Adding new assets to a server
Post by: apalazzi on May 20, 2013, 11:43:57 am
Hi,

hi apalazzi,
I'm the PS rules department developer. For adding new assets to the server we mainly use SQL instructions and we load them in the database. If you look at SVN you will find a wealth of examples on how to do things, including spells, weapons and such.
You mean the folder src/server/database/mysql/ ? Well it has some data, but it's not always obvious what's the meaning of the various fields in the tables...

Moreover it's not only the database: e.g. when I add a sector, I also need to update the zoneinfo.xml, and maybe also soundlib.xml and a bunch of other files around; if I add a new race for the players, besides the database there are at least  data/races/descriptions.xml and quickpaths.xml... do you update all these files by hand, or you have some helper tool for the task? Is there a document describing the procedure for each kind of content added? The available documentation explains many things, but many others are not documented and it's not always easy to find out what's missing when things doesn't work as expected...

Thanks
Andrea
Title: Re: Adding new assets to a server
Post by: Chetty on June 13, 2013, 05:42:04 pm
I am pretty much in the same boat trying to figure out how to add things to planeshift. The database doesn't seem too difficult, phpmyadmin helps to look around and see how the tables work but graphics are a mystery. Blender makes files that are useable in crystalspace (at least with viewmesh) but planeshift file format for a lot of things is not at all clear (no extensions) for meshes and other things in the world.zip and meshes.zip files.
Title: Re: Adding new assets to a server
Post by: Eonwind on June 14, 2013, 12:41:48 am
I am pretty much in the same boat trying to figure out how to add things to planeshift. The database doesn't seem too difficult, phpmyadmin helps to look around and see how the tables work but graphics are a mystery. Blender makes files that are useable in crystalspace (at least with viewmesh) but planeshift file format for a lot of things is not at all clear (no extensions) for meshes and other things in the world.zip and meshes.zip files.

I'm not an expert about graphic but I how this link can help a bit http://www.crystalspace3d.org/main/Creating_Art (http://www.crystalspace3d.org/main/Creating_Art)
Title: Re: Adding new assets to a server
Post by: Chetty on June 14, 2013, 05:56:05 am
Yes I used that some, but its for crystalspace and planeshift seems to have done something more.
Title: Re: Adding new assets to a server
Post by: LigH on June 14, 2013, 08:31:03 am
Yes, PlaneShift does indeed use variants of the file format. One point is using data files converted from a readable XML based format to a packed binary format (docconv (http://www.crystalspace3d.org/docs/online/manual/Binary-XML.html)). Another point is the use of factories of mesh objects in rather complex worlds to efficiently store e.g. houses with the same design but different locations, while handling them also in different configuration files for dynamically generated items. And furthermore, former closely related files (mesh factories, textures) get separated by type and stored in different ZIP archives which are later logically re-united in the Virtual File System.

This whole concept may be too complex to be thoroughly discussed in a forum. Also it may not be the intention of the development team to support any kind of modification, especially not if it changes the game balance: The engine is public, but "the game" (consisting of audio-visual as well as logical game data) is copyrighted; if you want to "change the world", you will make "a different game".

The above mentioned may not exactly be the official opinion of the development team; but I hope I didn't miss it completely...
Title: Re: Adding new assets to a server
Post by: Chetty on June 14, 2013, 11:02:04 am
Well if the engine is public the formats for the art should be public ... if for instance someone wants to throw out all the proprietary parts (art and rules) and replace it - otherwise its not really public.
The rules and quests and stuff are pretty clear in the database but some of the art is not defined anywhere I can find.
Title: Re: Adding new assets to a server
Post by: LigH on June 14, 2013, 11:21:43 am
I don't know much about all required details; but you may find it useful too look into e.g. data/zoneinfo.xml or art/skins/base/clientbase.zip:imagelist.xml and other XML/CFG/CSLib files contained in the ZIP archives mounted via vfs.cfg. To read e.g. art/materials.zip:materials.cslib, you will have to convert it from binary back to text XML format using the CrystalSpace tool docconv; using the binary format is a kind of "content protection", I believe.
Title: Re: Adding new assets to a server
Post by: apalazzi on June 18, 2013, 12:31:58 pm
Hi,

LigH, thanks for the hints :)

In fact it's not mandatory to store the data in binary format, the text .xml wil also work.
There's not even the need to zip all the files together in world.zip, meshes.zip etc.: you can put all the files in a directory and then change the vfs.cfg file to point to that directory instead of the zip file; the .zip file and the binary formats give better performance while loading the contents, but at the moment we're using text formats and directories for easier testing and modifications.

Regarding the "public" concept, I can understand that the PS team wants to prevent others to put up clones of their shard and encourage people to join PS, however I don't see problems if someone creates a new and different world using the same engine; in fact this would be beneficial also for PS as there will be more people working on the code, and bug fixes could be shared.

Chetty: even if the file format is not documented one can figure out thing by looking at the code... I know that a good documentation is more convenient, however the "open" license requires only to share the code and not to document it, and if the developers aren't willing to document something there's nothing we can do (except to document it ourselves).

Back to my original question: the various xml files are updated by hand when a new content is added? Also other operations are done by hand or there's a helper tool for this?

Bye
Andrea

PS: chetty, maybe we can somehow cooperate? Is there a site about your effort to setup a PS world? Or maybe you can send me an email? My address should be visible on my profile.
Title: Re: Adding new assets to a server
Post by: Eonwind on June 18, 2013, 01:25:09 pm
Regarding the "public" concept, I can understand that the PS team wants to prevent others to put up clones of their shard and encourage people to join PS, however I don't see problems if someone creates a new and different world using the same engine; in fact this would be beneficial also for PS as there will be more people working on the code, and bug fixes could be shared.

while we encourage joining the dev team to expand the PS world I think it's surely a good thing if more peoples work on the code base. I'm sorry but I cannot offer much helps regarding graphics (scripting is my domain) but if you find out the way to do it and you feel like updating the documentation (http://planeshift.top-ix.it/pswiki/index.php?title=Tools_pipeline) that would be great and surely appreciated.
Title: Re: Adding new assets to a server
Post by: Chetty on June 20, 2013, 05:55:55 am
Thanks for the help both here and on irc I am making progress. Didn't mean to complain, I know documentation is way down on the list. I am sumbling my way thru, and its is on my list to go back and contribute to the documentation when I am sure I have enough figured out for it to be useful. (haha maybe a diary of my adventures)