Page 1 of 3 123 LastLast
Results 1 to 20 of 44

Thread: How-To: Add a New Climate Zone

  1. #1

    Default How-To: Add a New Climate Zone

    Tutorial: How To Add a New Climate:

    - You will need (V) Vercingetorix's PAK Extractor and (A) Alpaca's Strings.Bin Converter to access these files.

    1. First, gather up the files needed. Here's your shopping list:

    · ../data/descr_aerial_map_ground_types.txt (V)
    · ../data/descr_climates.txt (V)
    · ../data/descr_climates_lookup.txt (V)

    · ../data/text/climates.txt (A)

    · ../data/world/maps/base/map_climates.tga
    · ../data/world/maps/base/map_ground_types.tga

    2. Now, open descr_aerial_map_ground_types.txt and add your new climate to the bottom. Mine, for example, was:

    Code:
    climate frozen_arctic
    {
    	cultivated_low		snow_thick.tga	arctic.tga
    	cultivated_medium	snow_thick.tga	arctic.tga
    	cultivated_high		snow_thick.tga	arctic.tga
    	fertility_low		snow_thick.tga	arctic.tga
    	fertility_medium	snow_thick.tga	arctic.tga
    	fertility_high		snow_thick.tga	arctic.tga
    	forest_dense		snow_thick.tga	arctic.tga
    	forest_sparse		snow_thick.tga	arctic.tga
    	hills				snow_thick.tga	arctic.tga
    	mountains_high		snow_thick.tga	snow_mountain.tga
    	mountains_low		snow_thick.tga	snow_mountain.tga
    	swamp				snow_thick.tga	arctic.tga
    	beach				beach.tga
    	scorched			scorched.tga
    	impassable_land		impassable_land.tga
    	impassable_sea		impassable_sea.tga
    }
    The codename of your new climate zone, i.e. - frozen_arctic
    Ground type specified in ../data/world/maps/base/map_ground_types.tga
    *Ground type texture used in Summer strat map
    *Ground type used in Winter strat map

    *Notes:
    - These tga's can be found in ..\data\terrain\aerial_map\ground_types\ so you can choose which you want to use.
    - When setting your summer/winter texture, if you only set summer's that will used for both summer and winter.
    i.e.:
    Code:
    beach				beach.tga
    3. Now open descr_climates.txt. First, add your new climate to bottom of the list at the very top, for example:
    Code:
    climates
    {
    	mediterranean
    	sandy_desert
    	rocky_desert
    	unused1
    	steppe
    	temperate_deciduous_forest
    	temperate_coniferous_forest
    	unused2
    	highland
    	alpine
    	tropical
    	semi_arid
    	arctic
    	frozen_arctic
    }
    Now add your climate section to the very bottom of the file, for example:
    Code:
    climate frozen_arctic
    {
    	colour	207 132 255
    	heat	2
    	winter
    
    	strategy	summer	sparse_tree	conifer_a_winter.cas				7
    	strategy	summer	dense_tree	conifer_a_impassable_winter.cas		6
    	strategy	summer	canopy		conifer_a_canopy_winter.cas			15
    	
    	strategy	winter	sparse_tree	conifer_a_winter.cas				7
    	strategy	winter	dense_tree	conifer_a_impassable_winter.cas		6
    	strategy	winter	canopy		conifer_a_canopy_winter.cas			15
    	
    	battle_vegetation
    	dense_forest	highland_dense_forest_win
    	dense_scrub		highland_dense_scrub_win	
    
    	battle_winter_vegetation
    	dense_forest	highland_dense_forest_win
    	dense_scrub		highland_dense_scrub_win
    	env_map			data/battlefield/envmaps/grass.dds	
    }
    The codename of your new climate zone, i.e. - frozen_arctic
    The unique RGB color that will declare your new climate in ..\data\world\maps\base\map_climates.tga
    The effect (fatigue) value your climate will have on armored units. Ranges from 0-4, with zero being no effect at all.
    The summer/winter tree models used in the specified ground types (sparse trees, dense trees)
    I'm not sure what these numbers are for at the moment.
    This specifies the vegetation models used on a summer battle map.
    This specifies the vegetation models used on a winter battle map.

    4. Now open descr_climates_lookup.txt and add your new climate code name to the bottom of the list, for example:
    Code:
    mediterranean
    sandy_desert
    rocky_desert
    unused1
    steppe
    temperate_deciduous_forest
    temperate_coniferous_forest
    unused2
    highland
    alpine
    tropical
    volcanic
    semi_arid
    frozen_arctic
    5. Now open climates.txt and add your new climate code name and *in-game display name to the bottom of the list, for example:
    Code:
    {alpine}Alpine
    {highland}Highland
    {mediterranean}Mediterranean
    {rocky_desert}Rocky Desert
    {sandy_desert}Sandy Desert
    {semi_arid}Semi-arid
    {steppe}Steppe
    {temperate_coniferous_forest}Temperate Coniferous Forest
    {temperate_deciduous_forest}Temperate Deciduous Forest
    {tropical}Tropical
    {volcanic}Volcanic
    {frozen_arctic}Frozen Arctic
    *Notes:
    - I'm not sure where the in-game display name for a climate is used during play, but you should go ahead and put this in anyways.

    6. Now open map_climates.tga and add your new climate RGB to your map where you wish it to be used on the strat map. The strat map tree models and battle map tree/vegetation models you specified in descr_climates.txt will be displayed in the areas you paint in with your new RGB color.

    7. Finally, open up map_ground_types.tga and add in the ground types where you wish them to be displayed in the strat map. The .tga textures you specified in descr_aerial_map_ground_types.txt will be displayed where you paint your ground textures, depending upon the type used. Use this portion of Myrddraal's excellent mapping guide to select what ground types to use and where:
    Code:
    map_ground_types.tga
    - This is where you set the textures for your campaign map (i.e. Fertile, desert etc). There are 14 different ground types defined using different RGB values. The dimensions of this file should be twice the size of map_regions.tga + 1 pixel
    
    The RGB values are:
    Fertile Low - Grey-Blue (0, 128, 128)
    Fertile Medium - Light Green (96, 160, 64)
    Fertile High - Olive (101, 124, 0)
    Wilderness - Black (0, 0, 0)
    Mountains High - Light Brown (196, 128, 128)
    Mountains Low - Brown (98, 65, 65)
    Hills - Olive-Brown (128, 128, 64)
    Forest Dense - Dark Green (0, 64, 0)
    Forest Sparse - Green (0, 128, 0)
    Swamp - Bright Green (0, 255, 128)
    Ocean - Dark Maroon (64, 0, 0)
    Sea Deep - Dark Red (128, 0, 0)
    Sea Shallow - Red (196, 0, 0)
    Beach - White (0, 0, 0)
    Impassable Desert? - Grey (64, 64, 64)
    Now, fire your map up and take a look. You should see your new climate zone in the area you added it to. Hardcore mappers can design their own .tga ground textures to use in your new climate zone. Put them in ..\data\terrain\aerial_map\ground_types\ and reference them in descr_aerial_map_ground_types.txt. Hopefully this tutorial will help. Thanks again to all who helped me figure this one out. Special thanks to Vercingetorix and Alpaca for their excellent tools and Myrddraal for his invaluable mapping guide.
    Last edited by Bella; July 10, 2007 at 04:19 PM.
    /* Under the Patronage of the Honorable Garbarsardar */
    Graphic Designer, Husband, & Dad

  2. #2
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,844
    Blog Entries
    10

    Default Re: How-To: Add a New Climate Zone

    Great work Bella, I bet a lot of mappers use it. +1 rep

  3. #3
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,991

    Default Re: How-To: Add a New Climate Zone

    God Bella, where were you three months ago when I was squinting over every file in the dang game to figure out this very thing. I was thinking about writing a tutorial after I had finished, but you beat me to it and have done a much better job at it then I could have.

    Great Tutorial
    Under the Patronage of Lord Condormanius

  4. #4

    Default Re: How-To: Add a New Climate Zone

    Bella, excellent job with this - it falls into the category of the few threads I have printed out. I saw your screenshots for the permanent snow regions in the Bellamod preview and they look excellent. + Rep for all your hard work.
    Check out my Otherworld mod: A big fantasy map for Medieval 2, new playable factions and more! -Release 7 is now available-

  5. #5

    Default Re: How-To: Add a New Climate Zone

    Much thanks to those for the comments and rep.

    This method of adding new climate zones can also be utilized to add your own custom ground type textures as well. I asked around at one point about doing them directly, but someone suggested I try using the climates instead.

    Basically what you do is create your new climate as shown in the first post here, then point your tga references to your new ground type texture in ..\data\terrain\aerial_map\ground_types\

    I'm using several brand new ground textures in this way for BellaMod and one other. At this point, though, I'm not sure on the climate limit the game may have. So far, I've added 4 new ones and haven't any problems. I'll update this thread if I find there is a limit and post the number.
    /* Under the Patronage of the Honorable Garbarsardar */
    Graphic Designer, Husband, & Dad

  6. #6

    Default Re: How-To: Add a New Climate Zone

    Wow. This is incredible. Great work Bella! + rep. Well I can't give you anymore rep yet. So I will once I can

    Did you like my post? If so + rep please

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

    Default Re: How-To: Add a New Climate Zone

    Bella
    Nice tutorial a couple of questions though
    1) Why do you need Vercingetorix's PAK Extractor ? Those files are all available if you just run the unpacker tool which came with the patch.
    2) Don't you need to link back into descr_geography_new.db to get the effect in the battle map? I know Muzier said that those files could now be used and they have a reference the climate type. Or is it just that a default is still being picked up anyway for the battlemap?

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

    Default Re: How-To: Add a New Climate Zone

    As we were discussing before the site went back to an earlier state.

    Quote Originally Posted by Wilddog
    I thought it was mostly via the geography files as they do reference the climate.

    Have you tried going into a battle on a newly created Climate? I tried and I get a CTD every time which I'm presuming is because of the non updatable geography files. If you're able to get into the battle map from the campaign then I must have something wrong on my set up. Anyway if you could confirm that battles work then that would be great
    Quote Originally Posted by tommyknocker
    Yeh your right, I tried setting up a siege, when I clicked assault at the point it would normally zoom in it crashed. Same for you?
    Yes that's the same for me. So looks like if you add a new climate and then go to fight a battle the game will CTD because the geography file doesn't have the new climate in it... and if you don't delete the geography files in the first place you get a CTD (with patch 1.2) anyway...

    Does anyone know anything different?

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

    Default Re: How-To: Add a New Climate Zone

    Quote Originally Posted by wilddog View Post
    As we were discussing before the site went back to an earlier state.





    Yes that's the same for me. So looks like if you add a new climate and then go to fight a battle the game will CTD because the geography file doesn't have the new climate in it... and if you don't delete the geography files in the first place you get a CTD (with patch 1.2) anyway...

    Does anyone know anything different?
    Yeh I read about that deleting thing, but I haven't and don't get a CTD... or is it just when you initiate a battle? I can't test on vanilla as the installation is borked from playing around (yet strangely my mod works).

    Edit- Ah yes I've just tested with renaming all the tropical headings in the file to 'tropcial_rainforest' (the custom climate I was testing with) and it does still crash. What does the unpacker readme mean by 'timestamp error'? Is there any way to get round this? I'm actually beginning to think the devs put this error in on purpose so we can't make new climates, making them look bad.

    It's a bit annoying really as I've already completely redesigned my map with the new climates I've made, hopefully someone finds a fix soon.
    Last edited by Tominokar; July 30, 2007 at 10:34 AM.


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


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

    Join Date
    Apr 2005
    Location
    Netherlands
    Posts
    11,087

    Default Re: How-To: Add a New Climate Zone

    After M2TW came out I asked Caliban if they could make the files necessary to change climates (including battlemap texturing and vegetation) moddable. I believe they were at least going to try. So either you guys are missing something, or the whole thing fell through.
    "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 -

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

    Default Re: How-To: Add a New Climate Zone

    Quote Originally Posted by Muizer View Post
    After M2TW came out I asked Caliban if they could make the files necessary to change climates (including battlemap texturing and vegetation) moddable. I believe they were at least going to try. So either you guys are missing something, or the whole thing fell through.
    Hmm, maybe you could use your contacts to find out if it can be done, or if it ever will be fixed?


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


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

    Default Re: How-To: Add a New Climate Zone

    Quote Originally Posted by Muizer
    I believe they were at least going to try. So either you guys are missing something, or the whole thing fell through.
    Thats what we are trying to find out. Are we missing something or doesn't it work? Unless there's a way around the use of the Geography files I can't see that it works. As discussed I need to try loading a version 1.1 to at least see if that works as you got it to.

    NB As this is mostly an exercise in creating a different looking campaign map I don't really have an issue as I tend to use different coloured TGA's and use a more intermingled set of climates anyway.

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

    Default Re: How-To: Add a New Climate Zone

    Quote Originally Posted by wilddog View Post
    Thats what we are trying to find out. Are we missing something or doesn't it work? Unless there's a way around the use of the Geography files I can't see that it works. As discussed I need to try loading a version 1.1 to at least see if that works as you got it to.

    NB As this is mostly an exercise in creating a different looking campaign map I don't really have an issue as I tend to use different coloured TGA's and use a more intermingled set of climates anyway.
    It was really nice having those extra climates though, as my map stretches from the Amazon to Canadian Arctic.


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


  14. #14
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: How-To: Add a New Climate Zone

    Excellent tutorial. +rep


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  15. #15
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: How-To: Add a New Climate Zone

    Any indication as to how the game finds those tree models?

    There are actually two versions, the regular model, and the min_spec model. How do we know which one the game uses?


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  16. #16
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: How-To: Add a New Climate Zone

    One last thing -- I don't know how useful creating new climates may be after all. You not only have to edit the text files above, but provide all your own copies of all the textures.

    I think you have to edit descr_geography before adding new climates becomes viable.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  17. #17
    Nevada's Avatar Domesticus
    Join Date
    Jun 2007
    Location
    Bavaria
    Posts
    2,197

    Default Re: How-To: Add a New Climate Zone

    Ok, I changed all the files mentioned in the tutorial and I couldn't get it to work.

    Pasting all the tutorialfiles messed up the whole game and even unedited climates.

    I got the game working properly now again with an own climate, but it still doesn't show up!



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

    Default Re: How-To: Add a New Climate Zone

    @Nevada
    This only really covered the files relevant to the strat map. It covered all of them I think so you shouldn't of had any problemes there. However its main problem was you needed to change the geography files and for that you need to change you config file or you get a CTD.

    After that there are a few other files that need to change and some which can't (I posted on this a couple of months back partly to see if I'd missed anythign but no one semed to of tried properly). Essentialy though you cannot add any new NAMED climate. If you do it will NOT be read by the geography files (the .exe looks to be hard coded to use those names) and also any later climate will default to the default climate (because they aren't read). You can of course amend any of the existing climate 'names' including the unused1 and unused2 names. This can still be quite handy if you're doing a more localised map and want some variationseithe rin the battle map or in the strat map.

    Note I think you can add extra names at the end of the geography file whiuch sould take the default cilmate and then allows you just to add eye candy to the strat map (I tested to that far but no further).

  19. #19
    Nevada's Avatar Domesticus
    Join Date
    Jun 2007
    Location
    Bavaria
    Posts
    2,197

    Default Re: How-To: Add a New Climate Zone

    I replaced the Steppw climate file and now it works.

    On the geography-files:

    To have winter on the battlemap, I need to change these files, but I can't find them although I unpacked...



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

    Default Re: How-To: Add a New Climate Zone

    @Nevada - it depends if you deleted them like the unpacker says to otherwise they are in the data folder descr_geography_new.txt and descr_geography_new.db. The txt file regenerates the .db file if you set you cfg file up to use it - otherwise it causes a CTD. The .db file doesn't do any harm anyway.

Page 1 of 3 123 LastLast

Posting Permissions

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