Results 1 to 14 of 14

Thread: Problem with editing the campmap

  1. #1
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Question Problem with editing the campmap

    I made this:



    No problem whatsover. The game runs for several turns. Note that the big pink area is part of northern britain. So it's just an extra island. Nothing wrong with that, I have done this before.

    Now I change it to:



    And it crashes before loading! Why? The only change I made was removing some landmass. I've done this quite a few times before and there was no problem. Does anyone have the same problem?

    I can only come up with either one of the following:
    1. The landmass of western europe is hardcoded to be there. Not very likely but possible.

    2. The map needs a certain amount of landmass. Not enough landmass and the game will crash. Perhaps it's a percentage of the total area. So a smaller area needs lesser landmass. Perhaps the game engine requires a certain amount of landtiles?

    Any ideas?

  2. #2
    Kanto Kanrei Member Marshal Murat's Avatar
    Join Date
    Aug 2003
    Location
    Eye of the Hurricane (FL)
    Posts
    3,372

    Default Re: Problem with editing the campmap

    Add Korea Pen.
    It would provide some signifigant landmass.
    "Nietzsche is dead" - God

    "I agree, although I support China I support anyone discovering things for Science and humanity." - lenin96

    Re: Pursuit of happiness
    Have you just been dumped?

    I ask because it's usually something like that which causes outbursts like this, needless to say I dissagree completely.

  3. #3
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: Problem with editing the campmap

    I tested it with the south-eastern corner:





    Again a crash when the testing with less landmass. I think there is indeed a certain amount of landmass needed. But your idea might work very well MM! Thanks for that, I can add cliffs to the coast so that it's impossible to land armies on that region. Hmmm, might work. Let this be a warning for all modders who work on the campmap.
    Last edited by Duke John; 10-21-2004 at 14:32.

  4. #4
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: Problem with editing the campmap

    Ok, I tested wether the required landmass is absolute or relative to the size of the map. I cropped the right landmass and sea of the image. It now worked without problems.

    I got a CTD after ending the first turn when the radar_map images were not also cropped. Once they were the campaign ran for several turns.

    Conclusion:
    The engine requires a certain amount of landmass that is relative to the size of the campaign map.

  5. #5
    Member Member Thoros of Myr's Avatar
    Join Date
    Feb 2004
    Location
    Arizona
    Posts
    605

    Default Re: Problem with editing the campmap

    Yes, the Korean pen. would actually make a nice addition. This may not be preferable but If required to remove any useless placeholder landmass the scale of Japan could be increased aswell.

    The engine requires a certain amount of landmass that is relative to the size of the campaign map.
    Ah, good find.

    Good work on the map so far DJ. It's difficult work :)
    Last edited by Thoros of Myr; 10-21-2004 at 14:20.

  6. #6
    CA CA JeromeGrasdyke's Avatar
    Join Date
    Dec 2002
    Location
    At a new top-secret (non-CA) location, surrounded by lots of steel and glass, high atriums, hordes of lovely marketing ladies, and with a new and spacious desk with plenty of room for body-moving.
    Posts
    257

    Default Re: Problem with editing the campmap

    Quote Originally Posted by Duke John
    Again a crash when the testing without less landmass. I think there is indeed a certain amount of landmass needed.
    As far as I know, the engine is not reliant on having any limited amount of landmass, and none of the map layout is hardcoded. Even the AI works only on data which is derived from the map layout. What's more likely is that some thing is still present on one of the other maps which shouldn't be - say a port on a sea tile, or a river in the sea, or resources.

    A few other caveats about regions:
    - they should be 'convex' (one landmass, no inaccessible areas)*
    - they should have only one settlement and only one port
    - all land tiles should be part of a known region
    - each non-sea region should contain at least some fertile tiles
    - continuous sea surfaces should form one region
    - the maximum number of regions supported is 200
    - the distance between the centers of any two adjacent regions should not exceed 50 tiles*

    *: not doing these things shouldn't cause a crash, but it may cause the AI to break (and yes, the problems which result can be seen in some places on the Imperial Campaign - the Balearics or Greek Isles for example).
    "All our words are but crumbs that fall down from the feast of the mind."
    -- from 'The Prophet' by Kahlil Gibran

  7. #7
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: Problem with editing the campmap

    I am 100% sure that I didn't leave out any pixel. I tested it multiple times and the sole difference was eliminating a landmass by changing map_height.tga and map_regions.tga.

    I did so before (otherwise I wouldn't been able to create the present map) and it always worked. But now I seem eliminate too much landmass and somehow the engine is not able to cope with that.

    But thanks for the other pointers

  8. #8

    Default Re: Problem with editing the campmap

    Duke John,

    I'm sure you missed this on your post - but the obvious problem is you didn't say anything about editing map_ground_types.tga which would cause a CTD if there is a particular ground type where the other map_heights.tga thinks there is sea.

  9. #9
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: Problem with editing the campmap

    No that is not a problem. I've tested this multiple times before I realised that to make the campmap work for several turns you only need to edit map_height and map_regions. All the other images can be left blank; most of them black, 1 pink and another green.

    But it doesn't matter... it's working! I've erased all left over provinces and now I've got just Japan on the campmap with only the necessary provinces. I'm now starting to add the heights, ground types and such.

  10. #10

    Default Re: Problem with editing the campmap

    That's interesting - I knew the others could be left as a single colour while you got the regions correct - but I had assumed that map_regions, map_heights and map_ground_types had to be edited together and kept in sync. I've even created landmasses (by editing map_heights and map_ground_types but not map_region) that aren't part of a region which has appeared to work ok - apart from the fact you can't move an army over those areas.
    What colour is your map_ground_types then?

  11. #11
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: Problem with editing the campmap

    map_regions.tga
    Size: x, y
    Edit using the RGB values as assigned in descr_regions.txt.
    Each province must at least a city. This pixel may not touch or corner a different province.
    single pixel with R:0 G:0 B:0

    Ports are not necessary, even for coast provinces.
    single pixel with R:255 G:255 B:255

    map_heights.tga
    Size: 2x+1, 2y+1
    Start with only editing landmass:
    R:1 G:1 B:1

    And sea:
    R:0 G:0 B:253

    map_ground_type.tga
    Size: 2x+1, 2y+1
    R:101 G:124 B:0

    map_climates.tga
    Size: 2x+1, 2y+1
    R:237 G:20 B:91

    map_roughness.tga
    Size: 2x, 2y
    R:0 G:0 B:0

    map_disasters.tga
    Size: x, y
    R:3 G:3 B:3

    map_features.tga
    Size: x, y
    R:0 G:0 B:0

    map_trade_routes.tga
    Size: x, y
    R:0 G:0 B:0

    water_surface.tga
    Size: 256, 256
    R:60 G:132 B:159

    radar_map1.tga
    Size: x, y
    This is the minimap for the campaign.

    radar_map2.tga
    Size: 2x, 2y
    This is the minimap for campaignselection. Don't know yet if it's used.

  12. #12

    Default Re: Problem with editing the campmap

    Looks pretty much where I'd got to - apart from the fact I hadn't figured that you didn't need to edit ground_types - tried making it totally black last night and everything still worked.

    Noticed one mistake you might want to edit in your post - should be disasters.tga, not map_disasters.tga - I currently have this one totally black too (R:0 G:0 B:0)

    map_trade_routes can be totally missing and it will still work.

    Also, you miight want to make it clear that disasters.tga, map_radar1.tga, map_radar2.tga and water_surface aren't used to make the map.rwm.

  13. #13
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: Problem with editing the campmap

    If you don't edit the radar maps after resizing/cropping the size of the campmap then the game will crash when ending the first turn.

  14. #14
    Head Hurlers Rule! Member Bacchon's Avatar
    Join Date
    Apr 2004
    Location
    Vancouver, BC
    Posts
    77

    Default Re: Problem with editing the campmap

    I've been attempting to build a scratch-made campmap, but have so far unsuccessful to get it past the campaign loading bar. My current attempt is 150x100 (majority landmass), with three provinces, one faction (gauls) and the rebels owning the other two settlements, although I've tested with the senate and one, two and all three roman factions. My map is just a bunch on conjoined squares, and they're all saved at 24bit tgas in Photoshop.

    I'm almost positive that there are no errors in the txt files, as I've made them as simplistic as possible, and get no messages from -show_err.

    I've tried making the various images that are larger sized than map_regions by resizing them right to 2x+1, 2y+1 and by resizing them 2x, 2y and then increasing the canvas size to the top and left, and bottom and left. I've even tried just redrawing them at x2 scale.

    I can add new provinces, landmasses, armies, etc to the existing maps with ease, so this is vastly frustrating. As far as I can see, there should be nothing wrong with the image files or the txt files, and would greatly appreciate some advice or suggestions. I've been through all the threads and guides here on the org and followed them to the letter after my own attempts met with failure.

    Thanks,

    Bacchon
    And I heard, as it were, the noise of thunder,
    One of the four beasts sang, "Come and see,"
    And I saw, and behold, a white horse.

    And I heard a voice in the midst of the four beasts,
    And I looked, and behold, a pale horse,
    And his name it said on him was Death,
    And Hell followed with him.

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