The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
October 15, 2024, 04:54:41 pm
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  General UQM Discussion (Moderator: Death 999)
| | |-+  Hey, it's somebody else asking about map data!
« previous next »
Pages: [1] Print
Author Topic: Hey, it's somebody else asking about map data!  (Read 3535 times)
xolotl
Zebranky food
*
Offline Offline

Posts: 9



View Profile
Hey, it's somebody else asking about map data!
« on: February 08, 2007, 07:10:20 am »

Hello all.  I've been digging around and I know that this topic has been explored a bunch of times already, but so far I haven't found a working link to the data I'm looking for.  SO:

I'm looking for one of the following:
  • A CSV (or anything that could be turned into a CSV) of very detailed planet data for every planet in UQM.  Specifically I want something which has a breakdown of the various mineral types in addition to the usual stuff (ie: X many radioactives, Y many base metals, etc).  Ideally this'd take into account the "special" systems which are overriden with the gen* files, and also contain data about lifeforms, tectonic activity, temperature, and all that jazz.
  • OR (and this would be preferred, actually), the sourcecode that somebody used to generate that data.  I've been digging around the source for UQM myself for a very brief time now, and it's apparent that while I could spend a bunch of time getting all this data out of the system, it'd be a lot quicker just to reuse what somebody else has already done.  Ideally this would be something that could be run on a UNIXy system, though if someone's written something in VB or whatever, I certainly wouldn't say no.

So, yeah.  If anybody could furnish a link to either one of those things, I'd be greatly appreciative.  So far, the only working links I've been able to find don't have the actual element breakdown like I'm hoping for.

Thanks!
-CJ
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Hey, it's somebody else asking about map data!
« Reply #1 on: February 08, 2007, 02:22:12 pm »

Stuff to dump this data is present in the UQM source itself. See doc/devel/debug and src/sc2code/uqmdebug.{c,h}.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
xolotl
Zebranky food
*
Offline Offline

Posts: 9



View Profile
Re: Hey, it's somebody else asking about map data!
« Reply #2 on: February 08, 2007, 03:41:28 pm »

Hah, guess I should have looked for that, then.  Thanks a bunch!
Logged
xolotl
Zebranky food
*
Offline Offline

Posts: 9



View Profile
Re: Hey, it's somebody else asking about map data!
« Reply #3 on: February 08, 2007, 05:19:19 pm »

Yeah, there's some very good stuff in there.  Thanks for pointing it out.

For the record, in case anyone else was interested as well, the following patch provides me with the extra info that I was looking for (ie: the mineral breakdown):

http://apocalyptech.com/linux/uqm/uqm-mineraldata.patch

The code to generate it was already there, just wasn't in-use by anything yet.  Great fun.  Thanks again!
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Hey, it's somebody else asking about map data!
« Reply #4 on: February 08, 2007, 05:47:22 pm »

Yeah, that code was intended to be customised to output the data that one needs.
No need for hard-coding those element type names btw; they can be accessed from the content. Something like "GAME_STRING(ELEMENTS_STRING_BASE + type)" probably would have done the trick.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
xolotl
Zebranky food
*
Offline Offline

Posts: 9



View Profile
Re: Hey, it's somebody else asking about map data!
« Reply #5 on: February 08, 2007, 08:30:32 pm »

Good call.  It ends up being CARGO_STRING_BASE, and you'd have to add 2 as well (0 is "cargo" and 1 is "Free").  Thanks for the pointers!
Logged
aspirin
Zebranky food
*
Offline Offline

Posts: 2



View Profile
Re: Hey, it's somebody else asking about map data!
« Reply #6 on: April 18, 2009, 06:06:09 pm »

I would really appreciate if someone could post the PlanetInfo file generated with xolotl's patch. I don't have the UQM source set up so I cannot use the patch. I'm pretty sure it would take me at least half a day just to get the source to compile.
Logged
xolotl
Zebranky food
*
Offline Offline

Posts: 9



View Profile
Re: Hey, it's somebody else asking about map data!
« Reply #7 on: April 18, 2009, 06:33:47 pm »

I would really appreciate if someone could post the PlanetInfo file generated with xolotl's patch.
Hello, sure - I've uploaded it to http://apocalyptech.com/linux/uqm/

I had actually done a bit of work to import the data into a MySQL database so it'd be easier to work with.  If you've got access to one of those, you may be interested in some of the other files I uploaded there just now, as well:
  • PlanetInfo-withmineral.zip - the text file itself
  • table.sql - SQL Table for holding the data
  • import.pl - A lame little Perl script to import the text file into the tables from table.sql (also creates some aggregate tables for holding "relatively safe" and "definitely safe" planet info)
  • uqm-dump.zip - A mysqldump output of the resultant table from that process
Hope that helps!  It's been ages since I've looked at this, so hopefully everything in there is kosher.
« Last Edit: April 18, 2009, 06:38:25 pm by xolotl » Logged
aspirin
Zebranky food
*
Offline Offline

Posts: 2



View Profile
Re: Hey, it's somebody else asking about map data!
« Reply #8 on: April 19, 2009, 01:04:01 pm »

Thanks a million! This is just what I was looking for. Your version has even better formatting compared to the basic PlanetInfo output. Tabs instead of thousands of spaces.

I don't know how to use the database stuff, but maybe someone else will.

I will post about the project I'm using the data for when I have a functional version. Yet another stellar map, I'm afraid. Wink
Logged
Angelfish
Enlightened
*****
Offline Offline

Posts: 568



View Profile
Re: Hey, it's somebody else asking about map data!
« Reply #9 on: July 23, 2009, 10:58:09 pm »

hehe, belated, much, but thanks for this! Cheesy
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!