Public API

Home Board Index » X3: Albion Prelude » Public API

Kozain

Kozain avatar
Level badge Skillguey (7)
Posted 11 years ago.

hmm.. im not sure. However if exported the tables, then basically ive done all the hard work of converting the gamefiles into a database for you (it took a lot of hours to do). I thought the project was to use the game-files themselves, and code it a better way?
- Roguey


Ya you did the work on it and that is awesome but making something that already exists would be silly yes? It was just an idea Big grin

Im in pretty much the same boat. From having read what is and is not offered with the freeware version, its a lot more than just the unit testing (which is phenomenally important, particularly with API software) and the Team stuff (less important, especially as I use subversion as a default for any new project).
- CuAnnan


For an API for this kind of project all you need is this freeware. I have a msdn sub anyway now so I use the full lol but it worked for what i needed to accomplish.

I think we are getting off the topic though of getting a central source of X3 data established so we can all draw from the same source instead of having a bunch of different sources.

As long as we can output something we can all consume, then that is all we need ya?

CuAnnan

CuAnnan avatar
Level badge Tropguey (5)
Posted 11 years ago.

I'm currently using Java to assay the x3_universe.xml and build sectors.
My system naming algorithm is wrong, but I now know how to resolve it I just haven't gotten around to it because I've been working on how to name stations, which involves parsing a CSV file and matching the ID in the nth column to an id in an XML node based on the s of the station node and using pattern recognition on the s to determine things like "M", "L" and "XL".
It is certainly possible that, once I'm finished my XML, you could write a script to ingest it into an MSSQL database, but I'm not sure how well semantic XML will translate in this instance, but only because I've given it absolutely no consideration.

Roguey

Roguey avatar
Level badge Trueguey (22)
Posted 11 years ago.

Sounds like its getting more developed. I did check your site out a day or so ago, although I clicked a few buttons and I couldnt get any data to come up. I guess its going to take a lot of development before you get fully detailed pages due to the complexity of the code. Is this project going to be a full site later on, or is it a sort-of test project?

Ya you did the work on it and that is awesome but making something that already exists would be silly yes? It was just an idea Big grin
- Kozain

I know, but ive spent a lot of time building these tables, which produce a lot of the information for the site. Some of the tables where even built by x itself, telling it to export a CSV file to a log file. This is how I made the sector maps and dock products, rather than read from the XML's. Doing it this way I was able to script something together within a few mins to produce a CSV file (with all the fields where I wanted them). The scripts worked for X3, TC and AP; with a tweak to the script version number within the xml. I guess I used formatting, large SQL updates and other ways to build the tables (which I spent a lot of time doing, so somewhat over-protective of them). Even some VB came into them to cross-reference fields.

With rebirth, I should be able to hopefully do it like you guys are doing - which would be much easier in the long-run. My way did the job but isnt how I want to do the next thing (ive learnt better way, as you do on a self-taught project). I guess for the time-being X2/3/TC/AP are kind-of finished now, so theres little point for me redoing the whole database. Maybe ego might release a few odd patches, but I cant them rebalancing the whole game now.

However I can help with an formulas etc. you need, as some of the ship ones are a pain to work out. You think you got it, only to find it wrong for another ship.

For an API for this kind of project all you need is this freeware. I have a msdn sub anyway now so I use the full lol but it worked for what i needed to accomplish.
- Kozain

I guess, but its never nice to know you can get a hit of what you can do, just because MS wants to make money out of you. For such a large company, you think they would be a bit more open with some technologies; after-all the net is all about sharing information.

CuAnnan

CuAnnan avatar
Level badge Tropguey (5)
Posted 11 years ago.

However I can help with an formulas etc. you need, as some of the ship ones are a pain to work out. You think you got it, only to find it wrong for another ship.
- Roguey

Damn Teladi and Split.

CuAnnan

CuAnnan avatar
Level badge Tropguey (5)
Posted 11 years ago.

Factories, Docks, Sectors, Wares
All building and storing sensibly.
Just gates and asteroids to add and I'm done with the data modelling.
Please, please tell me that gates and asteroids are as straight forward as they appear.

CuAnnan

CuAnnan avatar
Level badge Tropguey (5)
Posted 11 years ago.

Roguey, are the images you used for map generation in the cats?

Kozain

Kozain avatar
Level badge Skillguey (7)
Posted 11 years ago.

Ya I plan on it being a full blown website as well as the services. I have been having trouble finding time for this the last few days but I will keep major updates posted as they come into existence!

CuAnnan

CuAnnan avatar
Level badge Tropguey (5)
Posted 11 years ago.

And that's Asteroids done and dusted (if you'll forgive the pun).
Just gates left to do and my data structure is done.
And sure when you're data structure is done, the code almost writes itself.

Kozain

Kozain avatar
Level badge Skillguey (7)
Posted 11 years ago.

So CuAnnan are you going to be hosting this as a consumable resource at all? Something I could consume with jquery and whatever else? I'm not completely sure but it sounds like we are doing the same things lol which is crazy. Give me a more detailed breakdown about what you are trying to accomplish.

CuAnnan

CuAnnan avatar
Level badge Tropguey (5)
Posted 11 years ago.

So CuAnnan are you going to be hosting this as a consumable resource at all? Something I could consume with jquery and whatever else?
- Kozain

Why not just do what I've done and consume the core game files? Our XML styles are quite different, you seem to use nodes where I would use attributes for one.
In theory, as soon as I put eXist on my live server, the XML would be available to query via eXist's RPC, but you'd need to learn xQuery to do that or implement your system to use my XML as-is.

I'm not completely sure but it sounds like we are doing the same things lol which is crazy.
- Kozain

What if we are? In less than a week, I've created a semantic data model for the system and ingested 90% of the data I need as XML. I'm only missing gate linking and that's it, the data model is done and all I have to do is write the model and view, the view will take me a day at most, the model may take me another week.

Not only is it good practice for new ways of leveraging a technology I have only recently learned (that being xQuery) it is something that (frustrating as it is at times) has been an enjoyable experience.

Give me a more detailed breakdown about what you are trying to accomplish.
- Kozain

I haven't decided what I'm trying to accomplish, beyond a map that will work on my iPhone. I'll probably start building that tomorrow in HTML 5 and either Java Struts or PHP/Smarty (currently leaning towards Java, but who knows).

I need the XML for the map generation so I cleansed the game files and extracted their cross refs to give the cleansed XML sensible names. All I have done, thus far, is build an XML data structure representing the sectors, stations (factories, docks and their respective templated and individual wares), asteroids and gates.

Now, admittedly since I am using an XML database engine, that means I have almost my entire data layer finished and only need to write a data access object to allow sensible querying, but that's a task for tomorrow.

Roguey

Roguey avatar
Level badge Trueguey (22)
Posted 11 years ago.

Roguey, are the images you used for map generation in the cats?
- CuAnnan

Well if youre talking about ego's icons, they are found in one of the dats, under dds/gui_master I think.

Ya I plan on it being a full blown website as well as the services.
- Kozain

Sounds good, which games are you planning on supporting? X3/TC/AP, or all?

Please, please tell me that gates and asteroids are as straight forward as they appear.
- CuAnnan

Your be glad to hear they are Smile

I'm not completely sure but it sounds like we are doing the same things lol which is crazy.
- Kozain

Indeed, there been very few sites supporting the x-games, yet to hear of two of them may spring up within such a short time is crazy Smile When you get your sites up, ill of-course do a few news posts for you and hopefully do a link exchange and that. I do what I can to get you a few visitors Smile

CuAnnan

CuAnnan avatar
Level badge Tropguey (5)
Posted 11 years ago.

Well if youre talking about ego's icons, they are found in one of the dats, under dds/gui_master I think.
- Roguey

Much obliged.
Hi ho, hi ho, it's off to map I go.

CuAnnan

CuAnnan avatar
Level badge Tropguey (5)
Posted 11 years ago.

Your be glad to hear they are Smile
- Roguey

Actually, gates in one sector are causing me trouble, Aldrin has six gates, rather than the usual 4.
I'm not entirely sure how to process that.

Roguey

Roguey avatar
Level badge Trueguey (22)
Posted 11 years ago.

Actually, gates in one sector are causing me trouble, Aldrin has six gates, rather than the usual 4.
- CuAnnan

Well technically there is no limit to how many gates there are per sector, you could technically have 4 south gates for example. Each gate has a target gate id, and a x/y of which sector it will send the ship.

CuAnnan

CuAnnan avatar
Level badge Tropguey (5)
Posted 11 years ago.


Well technically there is no limit to how many gates there are per sector, you could technically have 4 south gates for example. Each gate has a target gate id, and a x/y of which sector it will send the ship.
- Roguey

Clearly I need to start a terran game and check out the Aldrin sectors.

« 1 2 3 4 5 »


You need to log-in to post here.