Results 1 to 10 of 10

Thread: Any chance to parse in the map ???

  1. #1
    Member Member alexrain's Avatar
    Join Date
    Mar 2006
    Location
    Colonia Agrippinensium Germania Superior
    Posts
    6

    Default Any chance to parse in the map ???

    Hi guys,
    first, I would like to thank everyone for this beatiful mod !
    Its really astonishing what you have done already....

    At the moment I am currently trying to develop an internet based strategic game like www.ferion.com with a real map using the roman empire setting.
    I would like to use the map from EB. Is it possible to extract some kind of flat file (no picture !!!) with something like the tile information for each coordinate ?

    Does anyone knows a way to do that?

    I am planning to read it into an OracleXE DB using SVG for displaying a map....
    Also a way to extract the province, resource etc. would be helpful.


    At the moment I am using the map from gladius et pilum -> www.quirxel.de (in german) but that map is not realistic...

    any feedback or suggestion is welcome! Any format like csv/txt or and database format,even a sql dump would be helpfull...

  2. #2

    Default Re: Any chance to parse in the map ???

    Informations about map are stored in multiple TGA files.
    So its just a question of converting this data to format you need.
    Sorry but i dont know anything about OracleXE DB and SVG so i dont know what data it needs (and what you plan to use in your map).
    Last edited by LorDBulA; 03-15-2006 at 17:35.

  3. #3
    Member Member alexrain's Avatar
    Join Date
    Mar 2006
    Location
    Colonia Agrippinensium Germania Superior
    Posts
    6

    Default Re: Any chance to parse in the map ???

    Thanks for the information but I cant parse data out of an image file....
    at least I cant see a way to do that....
    What I just need is just a format to insert the information for tile xx:yy into a database. May I ask how you create your map? Do you use something like Coreldraw?

    What I am planning to do is to create some kind of EB online ... (ok, real time battles cant be done ;) but most of the rest ....

  4. #4

    Default Re: Any chance to parse in the map ???

    Well basically you would have to write program that would extract this data for you. I dont think you can find ready program that can do it for you (its very unusual task).
    How complicated you want to make your map?
    What data you need?
    City , Port positions, province positions (quite obvious), rivers, river crossings, ground height , climate, ground type, cliffs positions, volcanos etc...

  5. #5
    Member Member alexrain's Avatar
    Join Date
    Mar 2006
    Location
    Colonia Agrippinensium Germania Superior
    Posts
    6

    Default Re: Any chance to parse in the map ???

    I takle everything what I can get....
    But just the outlay with the basic terrain would be ok.
    To create a map on my own would take months.
    Who created the map in the EB team ?

  6. #6

    Default Re: Any chance to parse in the map ???

    When i joined EB eadings was working on map. But i dont know if he is the original creator of this map.

  7. #7
    EB Traiter Member Malrubius's Avatar
    Join Date
    Jan 2005
    Location
    On a tree-covered mountain in Anniston, Alabama, USA
    Posts
    2,633

    Default Re: Any chance to parse in the map ???

    I believe Dead Moroz was the original mapper, then eadingas and now Meneldil.

    Ah! the Generals! they are numerous, but not good for much (especially if they're Languorous)!
    -- Aristophanes, if he played EB

  8. #8
    Member Member alexrain's Avatar
    Join Date
    Mar 2006
    Location
    Colonia Agrippinensium Germania Superior
    Posts
    6

    Default Re: Any chance to parse in the map ???

    ok, I think I found a way to parse in the data....

    1. Get CorelDraw and load the Map file.
    2. save the map file as *.xwd (windows dump file format)
    3. open the file with something like ultraedit or so in HEX-Format
    4. in the first 10-20 blocks you will find the meta information (size in pixel etc)
    5. after that you get each pixel using RGB and the color strength...
    voila:
    now you can use something like C# or Java and read out the content ;)
    The result can be inserted into the database and then you can use it for some kind of online game....

    the only thing I need is now something like a description for the regions vegetation etc in the TGA pictures (map_regions.tga, map_climates.tga etc...)


    Do you have any information about this ????

    BTW: If anyone is a specialist in OracleXE 10g and /or .NET C# freak...
    i could need any help I can get...
    ;)

  9. #9

    Default Re: Any chance to parse in the map ???

    I dont get it why do you load it with CorelDraw?

    This is format of TGA file ( i looked it up some time ago when i needed to load RTW TGA province map so i can find positions of all cities)

    TGA File Format

    A .tga file is commonly used graphic file format that is easy to read and write.
    Format Notes

    * TGA files support 8,15,16,24,32 bit depths.
    * 8 bit can be grey scale
    * Runlength compression
    * Additional Footer information optional x/y origin relative to lower left with origin in lower left
    * descriptor: 00vhaaaa
    o h horizontal flip
    o v vertical flip
    o a alpha bits

    File Header (18 bytes)

    typedef struct
    {
    byte identsize; // size of ID field that follows 18 byte header (0 usually)
    byte colourmaptype; // type of colour map 0=none, 1=has palette
    byte imagetype; // type of image 0=none,1=indexed,2=rgb,3=grey,+8=rle packed

    short colourmapstart; // first colour map entry in palette
    short colourmaplength; // number of colours in palette
    byte colourmapbits; // number of bits per palette entry 15,16,24,32

    short xstart; // image x origin
    short ystart; // image y origin
    short width; // image width in pixels
    short height; // image height in pixels
    byte bits; // image bits per pixel 8,16,24,32
    byte descriptor; // image descriptor bits (vh flip bits)

    // pixel data follows header

    } TGA_HEADER

    Example File Header
    Here is the header of a 32 bit image with dimensions 1920x1080. Note that these hex rows are 18 bytes so the entire TGA header is on the top row. Also notice that even though the columapbits is set to 32 the bits is set to 24, thus the pixel data is actually 24 bpp.

    00000000 00 00 02 00 00 00 00 20 00 00 00 00 80 07 38 04 18 00 ....... ......8...
    00000018 31 52 41 18 52 10 10 6A 18 31 6A 5A 39 73 5A 41 73 6A 1RA.R..j.1jZ9sZAsj
    00000036 52 73 7B 52 73 9C 39 5A 7B 31 4A 6A 31 4A 73 41 6A 94 Rs{Rs.9Z{1Jj1JsAj.
    00000054 52 73 A4 29 20 18 20 18 10 10 10 10 18 18 18 29 29 29 Rs.) . ........)))
    00000072 20 29 29 29 31 31 29 31 31 29 39 39 39 39 39 31 31 39 )))11)11)99999119
    00000090 20 31 31 39 39 39 31 41 41 31 39 41 31 39 39 31 39 39 119991AA19A199199
    descr_regions.txt file in \Data\world\maps\campaign\imperial_campaign directory contains info about provinces internal names(rgb colour) and city internal names. Real visible names are stored inside Data\text\imperial_campaign_regions_and_settlement_names.txt.

    The rest i dont know.

    Maybe i could help you with c++ but not with c#.
    Last edited by LorDBulA; 03-16-2006 at 20:30.

  10. #10
    Member Member alexrain's Avatar
    Join Date
    Mar 2006
    Location
    Colonia Agrippinensium Germania Superior
    Posts
    6

    Default Re: Any chance to parse in the map ???

    hmm I dont think that I can use TGA because not every pixel is described...

    There is a map editor available where each region/vegetation/climate color code is described.

    Thanks for your help!!!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO