Oolite Bulletins

For information and discussion about Oolite.
It is currently Fri Dec 15, 2017 7:42 pm

All times are UTC




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Tue Nov 14, 2017 12:49 pm 
Offline
Deadly
Deadly
User avatar

Joined: Mon Feb 20, 2017 2:14 pm
Posts: 131
So I just finished what I wanted to do quite some time ago. I created a PHP script aiding you in the fantastic task of inserting Oolite's entire solar system information (planetinfo.plist) into a MySQL database of your choosing.

I'm sure this opens the door to quite some interesting 3rd party web-based tool creation possibilities.

Here it is:
https://github.com/thepleiadian/convert_planetinfo

The repo contains the current planetinfo.plist as well as a .sql file of the finished result.

Obviously open-sourced. Enjoy!


// EDIT:
I know the script is not perfect, but probably a good starting point. The defaults are - database: oolite_data, table: oolite_maps

_________________
DeeperSpace HUD | pleiadian's Oolite GitHub


Top
   
PostPosted: Wed Nov 15, 2017 12:44 pm 
Offline
Deadly
Deadly
User avatar

Joined: Mon Feb 20, 2017 2:14 pm
Posts: 131
Updated the script so that each solar system now has a unique ID. This might be useful for other tools such as trade, or item databases. GitHub includes updated script and new version of the SQL-file.

_________________
DeeperSpace HUD | pleiadian's Oolite GitHub


Top
   
PostPosted: Wed Nov 15, 2017 1:31 pm 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5028
I think that what might be useful here could be the ability to re-export the SQL file as a planetinfo.plist, after changes have been applied. This could help with changing large chunks of the plist or per-system-specific changes. One could use database software to make queries and maybe changes, then export back the result to a format understandable by Oolite. An example could be the relatively recent change where we reduced the default ambient light in all systems to 0.25. I had to write a quick'n'dirty little program to do it, but that could have been handled maybe as described above.

Possible?


Top
   
PostPosted: Wed Nov 15, 2017 2:09 pm 
Offline
Deadly
Deadly
User avatar

Joined: Mon Feb 20, 2017 2:14 pm
Posts: 131
That shouldn't present too much of a problem. Simply perform the changes in the SQL DB, and then hit the button... I think I can manage that

_________________
DeeperSpace HUD | pleiadian's Oolite GitHub


Top
   
PostPosted: Mon Nov 20, 2017 10:14 am 
Offline
Deadly
Deadly
User avatar

Joined: Mon Feb 20, 2017 2:14 pm
Posts: 131
I have added a script that does what you asked for. It pumps out a valid planetinfo.plist file inside your browser... just save it as that file and you're good to go.

https://github.com/thepleiadian/convert ... _plist.php

_________________
DeeperSpace HUD | pleiadian's Oolite GitHub


Top
   
PostPosted: Mon Nov 20, 2017 1:36 pm 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5028
Can't test it right now, but thanks for doing that. It should hopefully make editing of the tricky planetinfo datafile much easier.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited