Page 1 of 2 12 LastLast
Results 1 to 20 of 32

Thread: map_regions map_height conflict

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default map_regions map_height conflict

    I'm trying make a map for an Avatar mod. Below is a map_regions.tga file that works file.



    However when I try to use this map_region.tga the mod crashes without creating a map.rwm.



    But when I modify the map_heights.tga, so that half the sea is now land the problematic map_region.tga works fine. Does anyone have any idea what is causing this error or how to fix it?
    Last edited by uanime5; January 24, 2009 at 06:19 PM.
    Morning Sun (adds Korea and China to the Shogun 2 map)
    http://www.twcenter.net/forums/forum...28-Morning-Sun

    Expanded Japan mod (97 new regions and 101 new factions)
    http://www.twcenter.net/forums/showt...ew-factions%29

    How to split a region in TWS2
    http://www.twcenter.net/forums/showt...split-a-region

    Eras Total Conquest 2.3 (12 campaigns from 970-1547)

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

    Default Re: map_regions map_height conflict

    I'm unclear how the top and the bottom images differ.


    "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

  3. #3

    Default Re: map_regions map_height conflict

    I've reuploaded the top image.

    Basically some of the regions in the bottom one are slightly larger than the top one. If I try to add more land to the regions in the top version, so it's more like the bottom one, the mod crashes without generating a map.rmw file. I'm really confused as to why this is happening.
    Morning Sun (adds Korea and China to the Shogun 2 map)
    http://www.twcenter.net/forums/forum...28-Morning-Sun

    Expanded Japan mod (97 new regions and 101 new factions)
    http://www.twcenter.net/forums/showt...ew-factions%29

    How to split a region in TWS2
    http://www.twcenter.net/forums/showt...split-a-region

    Eras Total Conquest 2.3 (12 campaigns from 970-1547)

  4. #4
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: map_regions map_height conflict

    Quote Originally Posted by uanime5 View Post
    I've reuploaded the top image.

    Basically some of the regions in the bottom one are slightly larger than the top one. If I try to add more land to the regions in the top version, so it's more like the bottom one, the mod crashes without generating a map.rmw file. I'm really confused as to why this is happening.
    the best way to make map_regions match with map_heights is to resize map_heights


    open map_heights

    convert the image to Indexed Colours

    resize to half, -1 pixel

    and then just paint the regions



    but now that you already have lots of regions, it hard to do it

    :hmmm:
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  5. #5
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,681
    Blog Entries
    35

    Default Re: map_regions map_height conflict

    You can fill the whole of map_regions with color, it will only have an effect if it is supported by map_heights.

    Matching has never been easier with the layer mode. Do as Swagger describes. Then use 'open as layer' for map_regions and reduce the opacity. That way you will see where your missing parts are.

    But that will not be the reason either for your problem. Your problem sounds like a messed map_features file or a RGB code mismatch.










  6. #6

    Default Re: map_regions map_height conflict

    I did make the map_regions by shrinking the map heights. I made the bottom map_heights exactly as Swagger described (I made the top one by pasting the sea from the new map_heights onto the old map_regions to check that all the settlements were inland).

    If it was an RBG mismatch then it wouldn't work even if I made half the sea into land (either half works fine). Currently the map_features is completely blank (though it is the right size).

    Would it be easier if I uploaded this the whole base folder so you can examine it?
    Morning Sun (adds Korea and China to the Shogun 2 map)
    http://www.twcenter.net/forums/forum...28-Morning-Sun

    Expanded Japan mod (97 new regions and 101 new factions)
    http://www.twcenter.net/forums/showt...ew-factions%29

    How to split a region in TWS2
    http://www.twcenter.net/forums/showt...split-a-region

    Eras Total Conquest 2.3 (12 campaigns from 970-1547)

  7. #7
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: map_regions map_height conflict

    Would it be easier if I uploaded this the whole base folder so you can examine it?
    that's probably the best solution
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  8. #8
    B. Ward's Avatar ★★★★ RockNRolla ★★★★
    Join Date
    Feb 2007
    Location
    East Coast, United States
    Posts
    4,376

    Default Re: map_regions map_height conflict

    I have a theory, but if the top map_regions.tga file is working, it pretty much negates it. I ran into a similar problem trying to add a region, but I think I had too many islands. If Swagger doesn't find anything, I'll take a look. Going to see if I can reproduce your problem on my map first.

  9. #9

    Default Re: map_regions map_height conflict

    Attached is a lite version of this mod. The map_regions is the one that isn't working and the map_heights is the one that isn't half land. I've also included the old version of the map_regions (WORKING map_regions.tga) that works with the current map_heights and some map_heights that work with the current map_regions (WORKING map_heights.tga and WORKING map_heights2.tga).

    B. Ward the top map regions works fine but the borders are wrong on some islands (they overlap). If I try to fix this the map will no longer work. I have not tested whether turning these islands into one land mass will fix this problem.
    Morning Sun (adds Korea and China to the Shogun 2 map)
    http://www.twcenter.net/forums/forum...28-Morning-Sun

    Expanded Japan mod (97 new regions and 101 new factions)
    http://www.twcenter.net/forums/showt...ew-factions%29

    How to split a region in TWS2
    http://www.twcenter.net/forums/showt...split-a-region

    Eras Total Conquest 2.3 (12 campaigns from 970-1547)

  10. #10
    B. Ward's Avatar ★★★★ RockNRolla ★★★★
    Join Date
    Feb 2007
    Location
    East Coast, United States
    Posts
    4,376

    Default Re: map_regions map_height conflict

    Ok, I'll check these out when I leave the office today and let you know my findings.

  11. #11
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default Re: map_regions map_height conflict

    have been trying to have a look at this and must say its the weirdest map problem I've seem for a long while.... RTW had a few problems linked to having a lot of inaccessible areas (sea/forest and sometimes rivers) that could stop .rwm being formed if you were near critical point and just changed a few pixels either way... I'd come to the conclusion that was to do with an obscure pathfinding problem but not sure many people ever agreed

    this one's odd because normally the map_heights completely over-rules the map_regions - ie. you get land where ever the black bits on heights are regardless of other maps. Your map_regions looks technically fine in terms of number of colours etc, so all I can think of is that somewhere that you're trying to tell it to have a region border in the non-working version is causing it a problem

    suggestions: try making very gradual changes to map_regions from the working towards the non-working version (or copying in quarters of the existing non_working map to see if you can isolate which bit breaks it)

    when you find a point in the alteration that tips it try loading each map with a map_heights with no water so you can see where the game is trying to project the region boundaries, like:

    compare what it does for the working and non-working and see if anything stands out


    At the moment when you do get the game to load you find that a lot of armies are parked in the sea... that generally only gives an error message in the log rather that CTD, but I've found sometimes in TW games if you get enough things wrong in one go that normally should just give error message you can get CTD instead. Try moving / deleting them, just to rule them out of the equation.

    The very large bright green region that forms most of the large eastern landmass looks like something the ai won't like in terms of pathfinding - too large and concave. Unless it really needs to be like that I'd suggest dividing that into smaller simpler shaped regions. (have tested that and it alone doesn't fix problem, but would be good idea for long term and to rule out as contributing factor)

    I've also tested loading with map_ground_types converted to flat green - that again didn't fix problem, but it can be a good idea when trying to get rest of map working as it takes mountains out of equation, till you know regions and heights work together.

  12. #12
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,681
    Blog Entries
    35

    Default Re: map_regions map_height conflict

    This is having me stumped. I took the Working_Regions file and added the region mass step by step. I must have added about a third of the required overall area when I got the CTD. Replacing the sea area in map_heights with 1,1,1 solved that.
    It appears to be a matter of the percentage of land mass to total area. Maybe the fact that it is at max size aggravates this.
    And that huge region will most likely not help either.










  13. #13
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default Re: map_regions map_height conflict

    Quote Originally Posted by gigantus View Post
    It appears to be a matter of the percentage of land mass to total area. Maybe the fact that it is at max size aggravates this.
    Yeah but map_regions doesn't control the land mass. Just which region the land is assigned to (actual land area is defined by map_heights).

    so why on earth does re-assigning bits of land that's already in there make it CTD?! It's own re-arrangement of the regions to fit the heights can't be all that different from what he's trying to draw....

    I'm just as stumped

  14. #14
    B. Ward's Avatar ★★★★ RockNRolla ★★★★
    Join Date
    Feb 2007
    Location
    East Coast, United States
    Posts
    4,376

    Default Re: map_regions map_height conflict



    Working My theory was correct on the islands.

    Last edited by B. Ward; January 27, 2009 at 08:58 AM.

  15. #15
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default Re: map_regions map_height conflict

    B. Ward congrats!

    can you explain your theory a bit more - is that to do with the number of single region islands then?

  16. #16

    Default Re: map_regions map_height conflict

    B.Ward we can't expand the top image, so we can't see how you altered the map_regions.
    Morning Sun (adds Korea and China to the Shogun 2 map)
    http://www.twcenter.net/forums/forum...28-Morning-Sun

    Expanded Japan mod (97 new regions and 101 new factions)
    http://www.twcenter.net/forums/showt...ew-factions%29

    How to split a region in TWS2
    http://www.twcenter.net/forums/showt...split-a-region

    Eras Total Conquest 2.3 (12 campaigns from 970-1547)

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

    Default Re: map_regions map_height conflict

    I think he simply removed some islands, since this seemed to be his theory...



  18. #18
    B. Ward's Avatar ★★★★ RockNRolla ★★★★
    Join Date
    Feb 2007
    Location
    East Coast, United States
    Posts
    4,376

    Default Re: map_regions map_height conflict

    All the islands are still intact. Just "connected" some of them with a pixel. I came upon this when I first started my own map. In the end the land masses I had deleted where better off deleted, but at the time I just couldn't understand why when I added a region one place it worked, but in another it didn't. Then I realized something; CA made hard codes for just about everything, so maybe there was one for independent land masses. I think you can have up to 18 before the engine starts kicking out CTD's. This makes it seem like having a map with many island regions is impossible, but there is a way around it. I think I shared this with GED a while ago and just forgot about it. From my conclusion, once you begin a region area, it creates the beginning of an independent land mass. And as long as you have another region bordering it, they continue the land mass. This holds true even if there is a break in land. Look at the following image, and you will see 7 individual islands, but the engine will read them as 3 land masses. Why? Simple the purple region contains 2 of the islands, the orange region contains 1, and the blue region connects the islands at the bottom.


    Now using the same land area, we'll turn it from 3 land masses to 6. Now looking at the new image, you can see none of the islands have ties to any other island except the 2 at the very bottom.


    So if you had 10 islands on a map that were 10 separate regions, you would have 10 independent land masses. But by adding 1 miscellaneous pixel from one island to the next, preferably on the coast, you join land masses. You can see from this image from my regions map for my mod, I have a stray blue pixel. This joins both of those islands as one "continuous" land mass.


    I hope I'm making sense. The only downfall as far as aesthetics goes, is sometimes the miscellaneous pixel will cause a short region border to show up on the strat map, but I have faction borders invisible on my strat map, so it's not a big issue. Also, by connecting land masses, it helps the AI a bit with actually traveling to islands and other areas since they are technically "bordering" them.

  19. #19
    B. Ward's Avatar ★★★★ RockNRolla ★★★★
    Join Date
    Feb 2007
    Location
    East Coast, United States
    Posts
    4,376

    Default Re: map_regions map_height conflict

    Also here's the map_regions.tga file for you to examine. Just look at the coast closely and you'll see how I connected the islands together.

    Click Me.

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

    Default Re: map_regions map_height conflict

    @B. ward - good find. I'd rep you if I could for that one.

    I was going to have a look at this tonight but probably wouldn't of remembered that limit as I've never hit the problem.

    This post mentions the limit as 20 (I've never tested it).

    http://forums.totalwar.org/vb/showpo...2&postcount=11

Page 1 of 2 12 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
  •