Results 1 to 6 of 6

Thread: Can edit regions but cannot add

  1. #1

    Default Can edit regions but cannot add

    I feel like I'm going crazy but maybe I'm just forgetting something really obvious. I've created a new, working campaign map based on vanilla but of my own creation. I didn't delete any regions nor added any in transferring to the new map. Now that everything is working, I have been able to modify all maps without any trouble, including map_regions. I can change the internal name of existing provinces by modifying descr_regions, descr_strat, and imperial_campaign_regions_and_settlement_names (along with map_regions of course), but when I try to modify the same four files to add a new region, I consistently get a KTM. I copy existing entries on all three files, using factions and rebels that I know are working. Is there another file that at minimum must be changed in order to add a new region? I didn't think there was, but like I said, maybe I'm just forgetting something really obvious.

    Thanks!

  2. #2
    Libertus
    Join Date
    Aug 2015
    Location
    North Carolina, USA
    Posts
    90

    Default Re: Can edit regions but cannot add

    Let me give you the same instructions for adding regions as Adelie Penguin gave me:

    Quote Originally Posted by adelie penguin View Post
    In order to add regions, you have to
    a) define that region's borders in map_regions.tga using a unique, non-black, non-white, non-sea-colour colour of a defined RGB value;
    b) create an entry in descr_regions.txt providing in eight lines followed by an empty line the 1. region's internal name 2. settlement's internal name 3. creator faction 4. rebel faction's internal name 5. RGB value as in map_regions.tga 6. resources and hidden resources, comma-separated 7. triumph value (always 5) 8. base farm level
    c) provide the region's and settlement's names in text\campaignname_regions_and_settlement_names.txt in this format: {internal name as in descr_regions.txt} name as shown ingame
    d) define that region's rebel faction in descr_rebel_factions.txt
    e) provide that region's rebel faction name in text\rebel_faction_descr.txt in this format:{internalname as in descr_rebel_factions.txt} name as shown ingame

    These are all the files you will need in order to make a region and settlement playable without errors. However, if you want mercenaries to be recruitable, you have to add your regions internal name to a pool in world\maps\campaigns\campaignname\descr_mercenaries.txt. You can also make up new pools with names of your choice, they are not used elsewhere. Also, if you want your settlement to be more than an empty village owned by the rebels, you have to provide suitable entries for that settlement and its garrison in descr_strat.txt.
    Also, you said you modified the "descr_regions, descr_strat, and imperial_campaign_regions_and_settlement_names" files? I believe you missed the "descr_regions_and_settlement_name_lookup.txt" file (I think Penguin missed it too in his instruction). For me, it's located in the main campaign folder.


    I would start with this:

    1. Double-check that you modified everything Penguin listed, especially if you recorded the new settlement and region name in the lookup file I pointed out.
    2. If you didn't modify a file (you said you are using rebel types already available), then ensure you correctly identified a pre-existing entry.
    3. Double-check, then triple-check your spelling in all files... that gets me more than anything.
    4. Ensure that the colors you added for the new region in your map_regions.tga are correct. If even 1 tile space has a color 1 RGB count off, it will not work. Also ensure your City (black pixel - RGB 0 0 0) and port (if applied - white pixel - RGB 255 255 255) are correctly colored.
    5. If you are getting a KTM error, do you have "-show_err" in your launcher so you get an error message? What does it say? Is an error produced?
    6. Also, just to cover everything obvious, make sure you delete your map.rwm after every single change.

    I believe that covers everything. You said thought it was something obvious, so... that's everything I can think of! I hope this helps you find your problem.

  3. #3

    Default Re: Can edit regions but cannot add

    Alright, humor me on this. So let's say I'm trying to add the following region.

    Step 1: Define new region in map_regions, with unique RGB, one 0,0,0 pixel for city and one 255,255,255 pixel for port (if needed; in this case, yes).

    The attached screenshot shows there are no errant pixels for this region, and that the selected RGB value is 90, 60, 180.

    Step 2: Create new region entry in descr_regions, following code used by existing regions.

    Spoiler Alert, click show to read: 

    Hellespont
    Lysimachia
    macedon
    Sithones
    90 60 180
    gold, timber, slaves, dogs, pigs
    5
    12




    Step 3: Add corresponding entries in imperial_campaign_regions_and_settlement_names in data/text.

    Spoiler Alert, click show to read: 

    {Hellespont} Hellespontos
    {Lysimachia} Lysimakheia


    Step 4: Add entry in descr_strat for new region/settlement (here, copied from vanilla Propontis)

    Spoiler Alert, click show to read: 

    settlement
    {
    level large_town
    region Hellespont


    year_founded 0
    population 2000
    plan_set default_set
    faction_creator macedon
    building
    {
    type core_building governors_villa
    }
    building
    {
    type defenses wooden_wall
    }
    building
    {
    type barracks muster_field
    }
    }




    Step 5: Add entries to descr_regions_and_settlement_names_lookup.

    Spoiler Alert, click show to read: 

    Hellespont
    Lysimachia


    Step 6: Check rebel faction Sithones in descr_rebel_factions (existing from vanilla)

    Spoiler Alert, click show to read: 

    rebel_type Sithones //Macedon
    category peasant_revolt
    chance 0
    description Sithones
    unit greek peasant
    unit greek peltast
    unit greek heavy peltast
    unit greek hoplite militia
    unit greek hoplite militia
    unit greek cavalry
    unit merc thracian
    unit generic rebel general


    Step 7: ensure map.rwm is deleted.

    So all those steps above followed, and I'm still getting KTM. I have -show_err enabled, but I'm not convinced it works on the mac because I've never gotten an error message. And I should be getting one every time I exit for non-CTD/KTM errors like a general on a river.

    What am I missing?
    Attached Thumbnails Attached Thumbnails Screen Shot 2015-09-07 at 12.18.11 PM.jpg  

  4. #4
    Libertus
    Join Date
    Aug 2015
    Location
    North Carolina, USA
    Posts
    90

    Default Re: Can edit regions but cannot add

    Quote Originally Posted by knin View Post
    Alright, humor me on this. So let's say I'm trying to add the following region.
    Well, let's see:

    Quote Originally Posted by knin View Post
    Step 1: Define new region in map_regions, with unique RGB, one 0,0,0 pixel for city and one 255,255,255 pixel for port (if needed; in this case, yes).

    The attached screenshot shows there are no errant pixels for this region, and that the selected RGB value is 90, 60, 180.
    Okay, assuming your colors are correct, your black pixel is on an acceptable pixel space, but are you sure you placed the white-port pixel inside the region? I cannot say for sure since I don't have your map, but make sure that your white-port pixel is INSIDE the regional color defined area (90, 60, 180). If you accidentally placed the white-port pixel inside the "sea region"... this would cause an error, just as placing a white-pixel off the coastline would. Please double-check your port is where it is suppose to be.

    Also, how many regions do you have on your map? If you have more than the 199 settlement regions and 1 sea region (therefore 200 total) on your map, then you would get a KTM error telling you that you have succeeded the number of regions allowed. Could this be it?

    Quote Originally Posted by knin View Post
    Step 2: Create new region entry in descr_regions, following code used by existing regions.

    Spoiler Alert, click show to read: 

    Hellespont
    Lysimachia
    macedon
    Sithones
    90 60 180
    gold, timber, slaves, dogs, pigs
    5
    12


    I don't know how you placed it inside your descr_regions.txt, but this spoiler entry (as is) is incorrect. After your "region's internal name" for the first line (Hellespont), every line should have a "tab space" before the next entry. For Example, this is the first region inside the file in RTW:

    Code:
    Britannia_Inferior
     Eburacum
     britons
     Brigantes
     232 41 198
     slaves, lead, dogs, pigs
     5
     5
    You may have it correct, but this is the correct "setup" for each entry.

    As for everything else, even listing 1 off RGB color for one of the 3 could cause it. Also, if you want a hidden resource to be attached to the region, you MUST list it here. Furthermore, unless you have modded the dogs/pigs resources from the vanilla game (such as in the descr_sm_resource.txt), the dogs, pigs entries are irrelevant... and therefore not necessary or useful. You can decide whether or not to keep them.

    Quote Originally Posted by knin View Post
    Step 3: Add corresponding entries in imperial_campaign_regions_and_settlement_names in data/text.

    Spoiler Alert, click show to read: 

    {Hellespont} Hellespontos
    {Lysimachia} Lysimakheia
    This appears correct to me.

    Quote Originally Posted by knin View Post
    Step 4: Add entry in descr_strat for new region/settlement (here, copied from vanilla Propontis)

    Spoiler Alert, click show to read: 

    settlement
    {
    level large_town
    region Hellespont


    year_founded 0
    population 2000
    plan_set default_set
    faction_creator macedon
    building
    {
    type core_building governors_villa
    }
    building
    {
    type defenses wooden_wall
    }
    building
    {
    type barracks muster_field
    }
    }


    Again, like the descry_regions.txt spoiler entry you provided, this is incorrect. You again lack proper tab spacing after the "{" line following the "settlement" line. The line "level large_town" should have a tab space before it. Also, I'm assuming you left out some of the entry to save space, so the final "}" that you have SHOULD NOT have any tab space, and should be just like the first 2 lines (no space at the beginning of the line).

    If you have it correctly "spaced" inside the descr_strat.txt file, you should be good to go.

    Quote Originally Posted by knin View Post
    Step 5: Add entries to descr_regions_and_settlement_names_lookup.

    Spoiler Alert, click show to read: 

    Hellespont
    Lysimachia
    This appears correct to me.

    Quote Originally Posted by knin View Post
    Step 6: Check rebel faction Sithones in descr_rebel_factions (existing from vanilla)

    Spoiler Alert, click show to read: 

    rebel_type Sithones //Macedon
    category peasant_revolt
    chance 0
    description Sithones
    unit greek peasant
    unit greek peltast
    unit greek heavy peltast
    unit greek hoplite militia
    unit greek hoplite militia
    unit greek cavalry
    unit merc thracian
    unit generic rebel general
    Again, assuming you have the correct amount of "tabs" spacing your file (like from "category" to "peasant_revolt"; "chance" to "0", etc), this should be right.

    Quote Originally Posted by knin View Post
    Step 7: ensure map.rwm is deleted.
    Good! Also, is a new map.rwm generated each time you attempt to load your campaign?

    Quote Originally Posted by knin View Post
    So all those steps above followed, and I'm still getting KTM. I have -show_err enabled, but I'm not convinced it works on the mac because I've never gotten an error message. And I should be getting one every time I exit for non-CTD/KTM errors like a general on a river.

    What am I missing?
    It's usually something stupid or obvious. I'm afraid I'm not very experienced with this at all. My guess would be your white-port tile isn't actually inside the "boundary" of the new region's color, but I won't go through and double-check all this as well.

    If you have the correct "spacing" in all your files, please use the "code" system to correctly display your coding after you copy/paste it into your reply box. It's the one that looks like a hash tag at the top of your reply box.

  5. #5

    Default Re: Can edit regions but cannot add

    It shouldn't be an error of too many regions - the current number is directly copied from that of an un-modded game which is somewhere in the low to mid-100s if I remember correctly.

    Oops, I used the wrong tags here, so the formatting didn't appear correct even though it was. But, for the sake of thoroughness, here it is again (I changed slightly from above):

    descr_regions
    Code:
    Hellespont
        Lysimachia
        macedon
        Achaeans
        90 60 180
        grain, slaves
        5
        4
    imperial_campaigns_regions_and_settlement_names
    Code:
    {Hellespont}            Hellespontos
    {Lysimachia}            Lysimakheia
    descr_strat
    Code:
    settlement
    {
        level large_town
        region Hellespont
    
    
        year_founded 0
        population 2000
        plan_set default_set
        faction_creator macedon
        building
        {
            type core_building governors_villa
        }
        building
        {
            type defenses wooden_wall
        }
        building
        {
            type barracks muster_field
        }
    }
    descr_regions_and_settlement_names_lookup
    Code:
    Hellespont
    Lysimachia
    descr_rebel_factions
    Code:
    rebel_type             Achaeans    //Macedon
    category            peasant_revolt 
    chance                0                    
    description            Achaeans
    unit                greek peasant
    unit                greek peltast
    unit                greek heavy peltast
    unit                greek heavy peltast
    unit                greek cavalry
    unit                generic rebel general
    I also took off the port altogether, so it wasn't the port placement.

    I'm wondering if it has something to do with blank lines - I think for some reason the mac is more sensitive to where blank lines are in some of the text files, but I have no idea. I will try that next.

  6. #6
    Libertus
    Join Date
    Aug 2015
    Location
    North Carolina, USA
    Posts
    90

    Default Re: Can edit regions but cannot add

    Unless your RGB color for the region (90 60 180) is too close to another regional color, I'm about out of ideas. As far as I can see from your provided code... it should work. For an "out-there" theory, if you've added other regions before this one, you copied a settlement or region name on accident.

    It could be that the Mac version of the game (I have never played RTW on a Mac) has it's own unique quirks. I would suggest searching through the forums for Mac related threads, like mod support threads that are based on the Mac version of the game.

    The only other thing I can tell you is to restore a backup of your files and restart completely. I can add regions to RTW in 5 minutes at most, but I would every once in a while get an error that I couldn't figure out, I would restore my backup, restart, and carefully redo everything... and that fixed it 95% percent of the time.

    Good luck, knin.

Posting Permissions

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