File Format Changes?

Project to create a new client based on new file formats and eventually a new 3D engine.

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

Re: File Format Changes?

Postby lmame on Mon Aug 09, 2010 3:30 pm

For now in osRose the loading process is doing by classes or separate C++/functions.
So writing another extension loader wouldn't really be a problem.

In fact it seems the only part that would change are the "official" tools we did to rip the NPCs, telegates, respawn data, monster spawns from clients (.Zon / .Ifo).
Or a special version of those tools should be done or the extensions would be loaded directly.

It's been a while I'd been thinking about directly loading those informations from osRose to avoid the "ripping" process anyway, perhaps in dev rev III. That would cancel the need of map_grid.csv too.

So my opinion is doing a special version of osRose Dev rev II would be ready far before the client ^_^
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: File Format Changes?

Postby Aukemon0NL on Mon Aug 09, 2010 3:42 pm

ok so that part is covered :)
We now only need to look into what files extensions we should use.
and what not.
Image
User avatar
Aukemon0NL
Pomic
Pomic
 
Posts: 107
Joined: Fri May 16, 2008 8:53 pm
Location: The Netherlands

Re: File Format Changes?

Postby lmame on Mon Aug 09, 2010 3:46 pm

Whatever organized format exists that's easy to load in c++.
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: File Format Changes?

Postby PurpleYouko on Mon Aug 09, 2010 8:25 pm

Best approach would be to design file structures that are easy to load into the server and client.
Don't worry if it is or isn't compatible with narose file structures.
We can easily throw together some conversion utilities from the old way to a new and hopefully more efficient way.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Re: File Format Changes?

Postby lmame on Mon Aug 09, 2010 10:08 pm

Someone talked about xml.
I quickly took a pick on MingW and xml. gtkmm does provide libxml++ and all includes, libs and dlls ready to use and recent (http://live.gnome.org/gtkmm/MSWindows) and it's "quite" easy to setup in a c++ project in codeblocks (took me 10 minutes since I just wanted to use the necessary files and not the whole gtkmm stuff).
It does provide also dlls and libs for Visual Studio (though only MingW was interesting for me atm).

It adds a whole bunch of includes, libs and dlls though (like 5 dlls :lol:).
It should be easy to add as "pre-configured" like we did with pthread and mysql.

So xml is possible quite easily. Now is it the easiest and best file format for IFO for example? I'm not sure of that... Sometimes crappy file formats like .csv or .ini or whatever are better. What do you think?
For now a map is sliced in a lot of "squares" that contains all informations like structures, events, sounds, NPCs, spawns and so on.

How the client would load those intel? In one big file or just like the usual client, sliced in small files?
Do we separate the Npcs in a files, struture in another or we keep them in a file?
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: File Format Changes?

Postby Aukemon0NL on Tue Aug 10, 2010 1:57 am

I talked about xml.
ini files are good but some times they are easy to be fucked.
But that's what I think.
But anyway xml will do the job for easy filling.
gonna think about using that.
We only need some "pro"graphic user to confirm some other file formats like zms to be changed.
hmmm where's Sethanye if you need her xD
Image
User avatar
Aukemon0NL
Pomic
Pomic
 
Posts: 107
Joined: Fri May 16, 2008 8:53 pm
Location: The Netherlands

Re: File Format Changes?

Postby lmame on Tue Aug 10, 2010 9:25 am

Perhaps we could split in several .xml the .ifo and .zon:

For one map:
-> 1 xml for npcs + objects + monster spawns,
-> 1 xml for telegates / respawnareas (or mix it with the one above though as they are coming from .zon... would be easier at first to make a separate one),
-> 1 xml for all that concerns only the client (constructions, trigger events, sounds and so on),

That would mean about 3 to 5 XMLs per map and though should be fast enough to read them and friendly enough rather than having 100s of files...


As for their filenames we should use different names for all maps, at least as "root" so people could copy them to the server.
That would avoid having to copy the whole folder structure and since people are lazy I can only imagine they would just copy everything leading to a 800 MB server thing...
I guess they would already copy all the xml rather than the ones actually needed if we left the ".xml" extension...
Or we could use several file extensions like ".serv" for files to be copied to server and ".cli" for files to be left to client?

The name could be "JPT01_xxxx.yyy" with JPT01 the folder name for example, the one we can find in the STB.
For now when they try to make several maps from one (like clan wars thing) they keep the same map structure so I guess we won't have a problem on this side. The difference is done server side with AIP and QSD summoning more or less strong monsters and so on.
At server loading server would load the stb at each map and would look for the according ".serv" files like "mapname_npc.serv" and would load it.

We shouldn't give the mapid directly in the xml so people can change it in the STB directly. The "name" (JPT01) though is usually only done once and for all and would be changed rarely.

Example for a xml "npc + object + monster spawns", named "JPT01_npc.serv":
  1.  
  2. <map id="JPT01" name="Junon Polis map">
  3.     <slice x="31" y="31">
  4.         <npclist>
  5.             <npc type="1024" x="5011" y="5052" dir="180" dialog="npc_1024.con">Judy</npc>
  6.             <npc type="1025" x="5000" y="5000" dir="0" dialog="npc_1025.con">Spero</npc>
  7.         </npclist>
  8.         <objlist>
  9.             <obj id="1" x="5051" y="5022" dir="180" qsd="hourglass_5067">hour glass</obj>
  10.         </objlist>
  11.         <spawnlist>
  12.             <spawn x="5200" y="5200" range="10" rtime="10" limit="10" tactic="200" day="0" active="1">
  13.                 <group monster="301" nb="2" tactic="0"/>
  14.                 <group monster="302" nb="1" tactic="0"/>
  15.                 <group monster="303" nb="1" tactic="0"/>
  16.                 <group monster="301" nb="4" tactic="1"/>
  17.                 <group monster="302" nb="3" tactic="1"/>
  18.             </spawn>
  19.         </spawnlist>       
  20.     </slice>
  21. <slice x="31" y="32">
  22.         <npclist>
  23.             <npc type="1024" x="5011" y="5052" dir="180" dialog="npc_1024.con">Judy</npc>
  24.             <npc type="1025" x="5000" y="5000" dir="0" dialog="npc_1025.con">Spero</npc>
  25.         </npclist>
  26.         <spawnlist>
  27.             <spawn x="5300" y="5300" range="10" rtime="10" limit="10" tactic="200" day="0" active="1">
  28.                 <group monster="301" nb="2" tactic="0"/>
  29.                 <group monster="302" nb="1" tactic="0"/>
  30.                 <group monster="303" nb="1" tactic="0"/>
  31.                 <group monster="301" nb="4" tactic="1"/>
  32.                 <group monster="302" nb="3" tactic="1"/>
  33.             </spawn>
  34.         </spawnlist>       
  35.     </slice>   
  36. </map>
  37.  


for telegates and respawn zones, named "JPT01_gates.serv":
  1.  
  2. <map id="JPT01" name="Junon Polis map">
  3.     <telegatelist>
  4.         <telegate id="2" x="5200" y="5200" dmap="10" dx="5100" dy="5100"/>
  5.     </telegatelist>
  6.     <respawnlist>
  7.         <respawn id="3" x="5000" y="5000" type="0">
  8.     </respawnlist>
  9. </map>
  10.  


If we want to continue the slice system instead of simply doing:
  1.     <slice x="31" y="31">


We could insert another entry so a generic XPath query would find the according data quickly, even in a single file (like "//slice_31_31" or even a root query "slice_31_31"):
  1.  
  2.     <slice_31_31>
  3.         <slice x="31" y="31">
  4.             <npclist>
  5.             </npclist>
  6.             <objlist>
  7.             </objlist>
  8.             <spawnlist>
  9.             </spawnlist>       
  10.         </slice>
  11.     </slice_31_31> 
  12.  


The other entry would be used by the server, I would need it to calculate map size or we would have to do this that could lead to confusions if someone puts wrong coordinates:
  1. <map id="JPT01" lx="4500" ly="4500" width="1024" height="600" name="Junon Polis map">

I know how to get real maps coordinates from slices so I would prefer that server fetches it rather than letting people do this. Experience shows lately that people just don't update the map_grid.csv so we'll have to do it for them.
So I guess they wouldn't do it for their xml...


Now that beeing said, the problem with xmls is that you can't go in database and tell "ok let's stop this event" or see the spawns that are overall on your server, making mysql queries for example.
It's especially true for the npcs who not only have a dialogid but also an eventid that subsets their dialogs...
That would mean keeping at least a list_npc mysql database storing the events for the npcs. Though instead of storing all npcs, we could just store the ones who have their eventid changed.
So I'll have to change that but shouldn't be a big deal.

Another possible issue is the ".serv" size for the file with monster spawns. Could be big.
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: File Format Changes?

Postby lmame on Tue Aug 10, 2010 10:31 am

Ok I made another thread listing all file formats I knew:
viewtopic.php?f=54&t=4314&start=0

I guess we should put there the "new" formats description or ideas and what they are about.
This would be a "store for later use"...
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: File Format Changes?

Postby Final on Mon Aug 23, 2010 11:55 pm

You don't particularly have to complete change a file type, perhaps just tweak certain things within the file type to make it better.
Image
Final
Pomic
Pomic
 
Posts: 79
Joined: Sat Nov 10, 2007 4:10 pm

Re: File Format Changes?

Postby Sethanye on Tue Aug 24, 2010 2:29 am

Aukemon0NL wrote:I talked about xml.
ini files are good but some times they are easy to be fucked.
But that's what I think.
But anyway xml will do the job for easy filling.
gonna think about using that.
We only need some "pro"graphic user to confirm some other file formats like zms to be changed.
hmmm where's Sethanye if you need her xD


depends really, u can use from something as simple as mqo which is like an open text file format, its not even encoded, u can actually change the numbers and itll change the model lol, to 3ds which is 3dsmaxes native format, to something like .x which is what directx uses as a direct model, anything that can use both bones and mesh structure in it is fine, in all fairness even the zms it self is a fine format if you bother to write a proper converter to import it with into whatever u might need, it does its job pretty well if its unpacked and packed back properly. ZMD falls into about the same as zms, normally u can do both as one file even, most games do that anyway. ZMO is where the issues comes in, there is no real conversion of it directly to anything, u can get it open in max and then reexport it back to zmo providing u got the necessary encoding, max has the ability to understand the structure, but you would need to dig about maxes sdk and zmo it self to see how they interact in between, i can animate but not really being a coder i never really bothered figuring out the actual mechanics of how it works in code lol. As for a more common file format, there really isnt one, even max it self in its sample files will provide like 30 different animation files each loading up different animation ways and ect, animating is a pretty complicated pain in the ass
~ Learning Flash ~ Anyone Know Any Good Tutorial DVDs? ~
Image
"Come Into My Dream, Let Me Show You Where I've Been.
Its You And Me I've Seen, Let Me Tell You What I Mean."
User avatar
Sethanye
Neko Chan
Neko Chan
 
Posts: 2603
Joined: Fri Jan 18, 2008 11:23 am
Location: ~ Resident Graphics Artist ~

Previous

Return to [Project] Custom client (new 3d engine, new files formats)

Who is online

Users browsing this forum: No registered users and 6 guests

cron