The Ur-Quan Masters Discussion Forum

The Ur-Quan Masters Re-Release => General UQM Discussion => Topic started by: xolotl on February 08, 2007, 07:10:20 am



Title: Hey, it's somebody else asking about map data!
Post by: xolotl 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


Title: Re: Hey, it's somebody else asking about map data!
Post by: meep-eep 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}.


Title: Re: Hey, it's somebody else asking about map data!
Post by: xolotl on February 08, 2007, 03:41:28 pm
Hah, guess I should have looked for that, then.  Thanks a bunch!


Title: Re: Hey, it's somebody else asking about map data!
Post by: xolotl 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!


Title: Re: Hey, it's somebody else asking about map data!
Post by: meep-eep 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.


Title: Re: Hey, it's somebody else asking about map data!
Post by: xolotl 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!


Title: Re: Hey, it's somebody else asking about map data!
Post by: aspirin 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.


Title: Re: Hey, it's somebody else asking about map data!
Post by: xolotl 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.


Title: Re: Hey, it's somebody else asking about map data!
Post by: aspirin 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. ;)


Title: Re: Hey, it's somebody else asking about map data!
Post by: Angelfish on July 23, 2009, 10:58:09 pm
hehe, belated, much, but thanks for this! :D