Results 1 to 18 of 18

Thread: So I have my heights map, now I'm confused

  1. #1
    Tominokar's Avatar Artifex
    Join Date
    Jul 2006
    Location
    Currently Cardiff.
    Posts
    1,192

    Default So I have my heights map, now I'm confused

    Here's what I've done so far. Made from satellite data, but I had to add the lakes and most of the Carribean islands by hand, which was a real *****.



    Firstly a bit of shameless advertising The mod will start in 1689 and finish just before the American war of Independence in 1775. It will focus on the conflicts between the European colonial powers (predominantly England, France and Spain) and Native Americans in North America. If you are interested in helping out, pm me, but development and recruitment will not 'officially' start until the expansion is released, which I will be basing it on.

    Now that's out the way, I have quite a few questions

    1. First I just want to make sure it's not too big- I can't seem to find what the hardcode is. It's 1001x856.

    2. Does the game take from this larger image when deciding where to place water/land or from the half-sized one? Just, when I halve it some islands are split in two, navigatable rivers become blocked etc.

    3. Does it matter how I reduce the size? I was thinking of resampling with pixel resize through paintshop, will this work fine? And I just make it 500x425 right?

    4. Is there somewhere which will tell me all the different terrains/climate/ground type RGBs? I can find them for RTW but not M2TW.

    5. I was thinking of doing a huge 'terra incognita' province that's split up to take several areas across the map, like RTR7. I was wondering if there's some special technique to doing this, and if it will actually work (as it's been said they have completely remade their map, so it could have been buggered somehow).

    6. What does the roughness image do? Add impassable mountains?

    7. What are the minimum files I need to test the map, and where should I put them?

    Thanks in advance
    Last edited by Tominokar; April 02, 2007 at 02:18 PM.

  2. #2

    Default Re: So I have my heights map, now I'm confused

    Well, map_regions has a limit of 512x512 pixels, so a heights map could be 1025x 1025. So, your heights map is fine.

    A regions map of 500x425 should be 1001x851 in climates,ground_types, and heights.

    Here is a file I made using various posts from threads around the forums. This file explains the size of the tga files, the colors used in them, and other various things. I believe it could help you.

    The minimum files to test the map are the files in the maps/base folder. Then, in the maps/imperial_campaign campaign, you need descr_strat and descr_regions_and_settlement_lookup. In the data/text folder, you need imperial_campaign_regions_and_settlement_names. It might be best to get Spurius's BigMapLabyrinth, as this removes all unnecessary data and is a good mapping foundation. I know I didn't answer all your questions, but I hope I helped. If you need further help, feel free to pm me. Nice map, btw. I'm looking forward to your progress!

  3. #3
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,337

    Default Re: So I have my heights map, now I'm confused

    1)Its not too big the heights map can be 1021*1021 as a square and others have got larger in one dimension but smaller in others.
    2) It takes from this one - you need to generate a map_regions yourself. if you have Photoshop elements or the full blown package the nearest neighbour resizing will generate a map_regions correctly.
    3) Watch out on paintshop I have an old version of paintshop pro and the resampling there with pixel resize does NOT tie in with the Photoshop one which works (I only have paintshop 5 but this may be differnt in later versions). I fell foul of this very early on!
    4) They're still basically the same for M2TW as they were for RTW.
    5) Watch out on big complex regions particularly with Rivers and mountains - the game will probably create the map but CTD on loading.
    6) Nothing as far as I know- you can make it all 1,1,1 colour.
    7) Set up a mod folder. You need a few regions and to edit the various map bits.
    follow these steps first and read the mapping tutorials see below for some basic steps to get started.


    1) Step 1.a – Set up Not actually required but best thing is to set up a MYMOD folder and run with a batch file.
    the batch file

    Open up Notepad and type in

    medieval2.exe @testing.cfg --io.file_first

    then save the file as a .bat file (eg Launch_test1.bat ) into the same directory that you have the medieval 2.exe

    Create a short cut of this and stick the shortcut on your desktop.

    When you double click to execute this batch file it will run themedieval2.exe using a config file called testing.cfg and then the command --io.file_first is required to execute unpacked changes prior to the packs. This command isn’t necessary for just amending the regions but you will find it useful if you do further modding.

    Step 1.b – set up the config file

    Create a copy of your cfg file

    Rename it to testing.cfg (or whatever name you want to use)

    Add in

    [misc]
    unlock_campaign = true

    [log]
    to = logs/system.log.txt
    level = * trace
    level = * error

    [features]
    mod = test1
    editor = true

    You may also find it useful to add in

    movies = false
    windowed = true

    in the section starting [video]
    These stop the introduction videos and allow a window setup so you can tab out of the game which can be useful while modding.

    To explain the other commands in order

    [misc]
    unlock_campaign = true

    unlocks the playable factions to allow you to choose the factions

    [log]
    to = logs/system.log.txt
    level = * trace
    level = * error

    This will write an error log to the directory using the detail of the last command in this section. (ie in this case the level * error.

    Trace gives a detailed set of info and will create a big file but can be useful for the unexpected error encountered issues.

    Error – means only the commands marked as error will get written to the file.

    This is VERY useful for debugging

    Finally the commands

    [features]
    mod = test1
    editor = true

    The mod = test1 says it will run the mod FIRST using the information in a modfolder called test1

    Editor = true is required if you ever want to use the battle editor.

    Step 1.c the mymod folder
    Create the mymod folder in this case
    called test1
    in the same directory as the medieval2.exe and the data folder etc

    now within the directory test1
    create a directory called data eg ..test1\data

    copy into this directory from the original data directory the following

    firstly the sounds directory (needed otherwise you don’t hear anything when running your mod).
    Next, the world directory (you don’t actually need all of it but you do need the same structure and the two essential directories
    data\world\maps\base and
    data\world\maps\campaign\imperial_campaign

    You will also need to create a text directory eg test1\data\text
    For this you need to add in the text files but these don’t come in the original game and also don’t get unpacked by the unpacker tool. If you are using the english version then these text files are available here

    http://forums.totalwar.org/vb/showthread.php?t=73971
    This is where you need the file imperial_campaign_regions_and_settlement_names.txt in particular.

    If you don’t have the english version you need to use the .bin extractor which is available here (written by alpaca)

    http://forums.totalwar.org/vb/showthread.php?t=75229

    (I haven’t used that). I believe that will then create a .txt file for you from the .bin whereas if you already have the .txt file you can edit that and it will recreate the .bin when you run it (no need to delete anything).

    Step 2 check things out before proceeding
    So now you just need to check it out. To do this simply go into the folder

    Step 2.a Check the rwm is created in the right folder
    test1\data\world\maps\base and delete the map.rwm file

    Now start you .bat short cut and if you’ve done everything as mentioned above the game should start and recreate a new map.rwm – so assuming you get into the campaign OK then come out and check the date of the rwm file. If no rwm file is present then you aren’t running as a mymod and so most likely you haven’t entered the lines correctly in the new .cfg file or the .bat file isn’t looking at the correct .cfg file. So re-check those.

    Step 2.b Change a name
    Go to the directory test1\data\text and open the file

    imperial_campaign_regions_and_settlement_names.txt

    this is set up with the information in the form

    {London_Province}London Region
    {London}London

    and so change to

    {London_Province}London Region
    {London}Londontest

    Now delete the .rwm and restart and you should see the name has changed. If not then you haven’t eddited the right file or you haven’t set up the directory correctly.

    Step3 – remove the .HGT file
    At this stage everything has been checked out for your mod file set up so now we start edditing.

    Go to
    test1\data\world\maps\base and delete both the map.rwm and the .hgt file

    Restart the game …. And it will crash. Come out of the game and go to your log file and you will see some messages complaining about ports.

    To correct this simply go into the file test1\data\world\maps\base and amend the heights.tga converting all pixels of RGB 0,0,0 to RGB 1,1,1. The problem is just because 0,0,0 without the heights.hgt file gets converted to water and some of the ports are now in the sea.

    Once converted delete the rwm and and restrat and you should eb OK.

    Step 4 –Finally start adding in regions

    You need to
    Add the region and town to
    test1\data\text\imperial_campaign_regions_and_settlement_names.txt

    add the region into

    test1\data\world\maps\base\descr_regions.txt (take an example and copy and paste and change the region and town name and the NEW UNIQUE RGB colour )

    The RGB colour must match the colour you used to add the region to the file

    test1\data\world\maps\base\map_regions.tga

    Note in this directory you may also have to amend descr_sounds_music_types.txt I haven’t tried this yet and its not necessary to get to a playable campaign but I haven’t tried any sieges etc with my new map (which is a completely different map) so don’t really know when this may be being used.

    Finally you need to make the amendments to the files in the folder

    test1\\data\world\maps\campaign\imperial_campaign

    add the new region into
    descr_strat.txt file – this must happen or you will get an error
    descr_mercenaries.txt – if you want to have mercenaries available there
    descr_regions_and_settlement_name_lookup.txt – Has them in but isn’t used as far as I know

    Note if you rename of delete a province then you must remove them from the first two files above also as well as any reference in the following files

    descr_win_conditions.txt
    campaign_script.txt
    descr_events.txt

    If you get any errors you should get an error message or the unexpected error and crash. If the latter sometimes you just need to delete the RWM again (which you should do each time you amend any regions) and restart. You may well get the same crash but sometimes this will generate an error log on the second attempt particularly if you were editing and simply tabbing out of the game.

    Max regions you can have as far s I could test is 199 plus 1 colour for the sea. You can have less regions and more sea colours the vanilla game uses 4 or 5 colours for sea for some reason.


    Thats the end of that section it was a bit of a copy and paste but I hope you find it useful.

    Watch out though this will take quite awhile and remember the satellite info gave you info on relative heights but that may not be best for the game and it may give very sheer cliff areas where you don't want so expect a lot of editing in the rockies!

    Not sure what the lake is that's there but remember the game treats all lakes and seas as though they are all at sea level - so any outward flowing rivers etc will flow uphill!

    Good luck

  4. #4
    Tominokar's Avatar Artifex
    Join Date
    Jul 2006
    Location
    Currently Cardiff.
    Posts
    1,192

    Default Re: So I have my heights map, now I'm confused

    Thanks very much guys, I got my mod folder set up, now I just need to finish the other png files. Think I'll do a rush job at first just to see how the heights works.

  5. #5
    Indefinitely Banned
    Join Date
    Jun 2006
    Location
    Calgary, Canada
    Posts
    13,967

    Default Re: So I have my heights map, now I'm confused

    Just a heads up, that heights map will *have* to be changed. Its satellite data and accuracy does not equal a good campaign map.

    What I did for my Broken Crescent map is that I used this sattelite data as a raw basis for the heights map. Then I whited out the sea, switched to grey scale and began using blur, smudge and etc to modify the regions.

    Trust me on this, just set up you mod folder, load that map up and you will realize that how much sattelite data sucks when translated to M2TW engine. It will be all jagged, and without form or beauty.

    Basically if you want a good map you will spend many more hours with that heights map.

  6. #6
    Tominokar's Avatar Artifex
    Join Date
    Jul 2006
    Location
    Currently Cardiff.
    Posts
    1,192

    Default Re: So I have my heights map, now I'm confused

    I've hit a snag when trying to test it (big surprise). It loads fine, but when the strat map should normally appear on the screen, all I see is a spinning hourglass. I get nothing new in the system.log. There seems to be no way of getting out of this, and I have to manually restart my PC.

    Is this possibly because I've got 1 giant province? If so, how many fake provinces will I have to make before it will display properly?

    Quote Originally Posted by mirage41 View Post
    Just a heads up, that heights map will *have* to be changed. Its satellite data and accuracy does not equal a good campaign map.

    What I did for my Broken Crescent map is that I used this sattelite data as a raw basis for the heights map. Then I whited out the sea, switched to grey scale and began using blur, smudge and etc to modify the regions.

    Trust me on this, just set up you mod folder, load that map up and you will realize that how much sattelite data sucks when translated to M2TW engine. It will be all jagged, and without form or beauty.

    Basically if you want a good map you will spend many more hours with that heights map.
    Yeh I realise that, luckily most of the Rockies will be in my terra incognita province, but Central America is going to be difficult.
    Last edited by Tominokar; April 02, 2007 at 05:12 PM.

  7. #7
    Muizer's Avatar member 3519
    Patrician Artifex Magistrate

    Join Date
    Apr 2005
    Location
    Netherlands
    Posts
    11,087

    Default Re: So I have my heights map, now I'm confused

    Quote Originally Posted by mirage41 View Post
    Trust me on this, just set up you mod folder, load that map up and you will realize that how much sattelite data sucks when translated to M2TW engine. It will be all jagged, and without form or beauty.

    Basically if you want a good map you will spend many more hours with that heights map.
    Well that's kind of the wrong end of the stick I'd say. I mean, the reason CA made the engine as it is is because they don't expect high resolution data input. So, they made it in such a way that the engine makes up the detail, especially on the battlemap. When you want to use high resolution data, you have to tone down the "creativity" of the engine. Had to in RTW, I doubt it's any different in M2TW. Furthermore, you have to scrupulously match ground types to heights. I mean, if you're taking real world elevation data and then just go paint the ground types with a brush or something...........well you might as well not bother at all.
    "Lay these words to heart, Lucilius, that you may scorn the pleasure which comes from the applause of the majority. Many men praise you; but have you any reason for being pleased with yourself, if you are a person whom the many can understand?" - Lucius Annaeus Seneca -

  8. #8
    Indefinitely Banned
    Join Date
    Jun 2006
    Location
    Calgary, Canada
    Posts
    13,967

    Default Re: So I have my heights map, now I'm confused

    Quote Originally Posted by Muizer View Post
    Well that's kind of the wrong end of the stick I'd say. I mean, the reason CA made the engine as it is is because they don't expect high resolution data input. So, they made it in such a way that the engine makes up the detail, especially on the battlemap. When you want to use high resolution data, you have to tone down the "creativity" of the engine. Had to in RTW, I doubt it's any different in M2TW. Furthermore, you have to scrupulously match ground types to heights. I mean, if you're taking real world elevation data and then just go paint the ground types with a brush or something...........well you might as well not bother at all.

    Well I found its best to actually just paint the ground types. The heights map is an excellent starting point of knowing what to paint. And sometimes matching real life is not the best thing. I found real life ground types data doesn't really look too great for a game. The resolution is so high and scattered that many important areas are lost in the "sizing down" process.

    I totally understand the deal with CA's engine. I'm not blaming it at all, I think its great. Its just a campaign map the satellite data needs a lot of modification to be "playable" - and its super time consuming.

  9. #9
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,337

    Default Re: So I have my heights map, now I'm confused

    Tommyknocker - If the RWM is being generated and its crashing - going nowhere on load its very very likely to be the region issue.

    best generate a new map heights jsut with sea and 1,1,1 and add a few more regions until you get that working. However you will struggle due to the heights an the thinness of the isthmus. This is sort of creating a diagonal no pass zone which the AI doesn't like.

    You may also find it better to mute down the heights data so its not so extreme. You can boost it back afterwards on the bits you really want.

    Amending the heights info etc will be very time consuming that's what I was hinting at and which Mirage41 added to. I've had a map of Britain working which I re-did several times until I was happier with the heights, rivers etc - but which I'm still fiddling with. You then have to watch out that you don't block paths with forests, rivers etc -if you don't want them blocked os it all takes time.

    Here's a view of part of the Great Glen - which shows some of the issues you need to overcome - particularly with rivers and lakes

    http://img67.imageshack.us/img67/9043/greatglenlk4.jpg

  10. #10
    Tominokar's Avatar Artifex
    Join Date
    Jul 2006
    Location
    Currently Cardiff.
    Posts
    1,192

    Default Re: So I have my heights map, now I'm confused

    I tried cutting out most of the map (leaving Central America) and it worked. So then to try and get it all in, I've added 19 provinces, making it 20. Now it crashes when I click 'start' for the campaign, and because I have to reset my PC I don't get a log file made. Pretty sure this isn't the same issue though, as before it loaded completely before crashing.

    I've double checked everything and am sure I have edited all the necassary text files, so am at a complete loss. So was wondering if someone could download it:

    http://www.twcenter.net/forums/downl...o=file&id=1272

    And have a look to see if it's okay. I've only included the files which came with Alpaca's stripped down map (which I based it on- hence the little island in bottom left) and those which I've edited, I guess you guys know where to put 'em and all that.

    Also, is it necassary to have a faction leader and heir on the map? 'Cos I wanna get rid of Alpacas little island, but that's where they're currently situated.

  11. #11
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,337

    Default Re: So I have my heights map, now I'm confused

    The download had no relevant files from the Imperial Campaign folder only a bunch of TGA's.

    Also you missed adding your Fifteen_Province to the to imperial_campaign_regions_and_settlement_names.txt file.
    Last edited by wilddog; April 03, 2007 at 08:11 AM.

  12. #12
    Tominokar's Avatar Artifex
    Join Date
    Jul 2006
    Location
    Currently Cardiff.
    Posts
    1,192

    Default Re: So I have my heights map, now I'm confused

    Quote Originally Posted by wilddog View Post
    The download had no relevant files from the Imperial Campaign folder only a bunch of TGA's.
    Sorry, not quite sure how those got there Updated download with correct files.

    Quote Originally Posted by wilddog View Post
    Also you missed adding your Fifteen_Province to the to imperial_campaign_regions_and_settlement_names.txt file.
    Ah yes, thanks very much. I still get the crashes though. If someone could manage to close down M2 properly to get the log file, that would be a great help.

  13. #13
    Tominokar's Avatar Artifex
    Join Date
    Jul 2006
    Location
    Currently Cardiff.
    Posts
    1,192

    Default Re: So I have my heights map, now I'm confused

    Woooo! Got it working. So nice after hours of problem solving you finally get it I'll post some pics once I get it looking a bit nicer, the heights isn't as bad as I thought, but I obviously gotta get all the ground types and climate in. Thanks again for help guys.

    A few things I learned that might be helpful to any beginners like me:

    -Double check there's not a single pixel of colour that's not meant to be there in map_regions.

    -Replace all 0,0,0 land in map_heights with 1,1,1 , not only does it make coastlines look awful but I think this was preventing me from placing Cities in most places.

    -It takes 7 provinces at least on a large map to keep it stable. Any less and it either won't load or will crash when panning about.

    - (this is with PSP, maybe other programs) If you need co-ordinates for any reason, reverse the image before holding your mouse over the pixel. The engine takes it from bottom-left instead of top-left.

    - In text files check everything soon as you typed it, saving a lot of hassle double checking later.

    All probably quite obvious, but hope it helps someone.

  14. #14
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,337

    Default Re: So I have my heights map, now I'm confused

    Tommyknocker
    Glad you got there with it. Now next bit of advice - although others may disagree. Its quite a big map so sort out the river features next. Its time consuming but they are a major feature. Add lots of fords at this stage to stop crashes as before.

    Then once you've added the rivers you then add more regions (If you've completed an area then add the regions on at that point). Remember the object is playability so if some cities move around slightly it doesn't matter.

  15. #15
    Tominokar's Avatar Artifex
    Join Date
    Jul 2006
    Location
    Currently Cardiff.
    Posts
    1,192

    Default Re: So I have my heights map, now I'm confused

    I've added rivers but it seems to crash if I have over a certain amount, and sometimes when panning around the map if I do get it working. Is there a limit to the number of rivers, length of a river, or complexity? Just the Mississipi basin has loads of other large rivers as tributories, so I was thinking maybe this is the problem. If so, well pretty annoying really, as they are quite important.

    I've tried adding 4 new provinces as this has solved my crashes in the past, but it doesn't look like it's helping.


    "Maps encourage boldness. They're like cryptic love letters. They make anything seem possible." - Mark Jenkins


  16. #16
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,337

    Default Re: So I have my heights map, now I'm confused

    There isn't really a limit for rivers that I'm aware of. The issues on rivers are
    1) Never form a 4 square river this will CTD.
    2) You have multiple sources (white) but must have one clear end pixel for a river.
    3) If you have few regions then put in a lot of Fords. Adding in more regions as you go along will help.
    4) The only graphic glitch I've seen which may be due to number of rivers is that from time to time depending on how you pan in or out of the map some of the rivers look like dry beds (the river reappears as you move the view around though).

    See below - Unless you already look like you've got more rivers this should show that numbers of rivers isn't really a problem. (I was thinking of adding in some more for Ireland).


  17. #17
    Tominokar's Avatar Artifex
    Join Date
    Jul 2006
    Location
    Currently Cardiff.
    Posts
    1,192

    Default Re: So I have my heights map, now I'm confused

    Woah that is a lotta rivers. I don't have anywhere near as many, but I do have one massive basin for the mississipi. I've managed to stop the crash on loading, which was an rogue pixel making a square, but I still get crashes panning. Guess I'll try even more fords


    "Maps encourage boldness. They're like cryptic love letters. They make anything seem possible." - Mark Jenkins


  18. #18
    Tominokar's Avatar Artifex
    Join Date
    Jul 2006
    Location
    Currently Cardiff.
    Posts
    1,192

    Default Re: So I have my heights map, now I'm confused

    Here is a preview of the map. Thanks again for all your help guys, it's been invaluable.

    http://www.twcenter.net/forums/showt...47#post1730347


    "Maps encourage boldness. They're like cryptic love letters. They make anything seem possible." - Mark Jenkins


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •