Welcome

Please register for Total War Access to use the forums. If you're an existing user, your forum details will be merged with Total War Access if you register with the same email or username. For more information please read our FAQ’s here.

Categories

Problems with Medieval II Region Editing

I recently decided to start modding Medieval II. So, I started on some Youtube tutorials and soon wanted to do more - for instance, create new regions for the vanilla map. So, I hit up some tutorials on these forums and got straight to work, setting out borders on map_regions.TGA and working out the text files. After I had finished the tutorial, I tried the game and it failed. I tried to troubleshoot, but kept getting this message -

[script.err] [error] Script Error in data/world/maps/base/descr_regions.txt, at line 1014, column 1
Couldn't find region name 'Lubeck_Province' in stringtable
[system.rpt] [error] Medieval 2: Total War encountered an unspecified error and will now exit.

This was a puzzle to me, as I had followed the guide perfectly. So, for the next few days, I tried on and off to get it to work. I even deleted all my progress and began again twice. So, after trying for quite a while, I have turned to here. Now, my descr_regions file is perfectly fine. I have checked it over often, but nothing seems to work. Here is the Lubeck entry in its entirety -

Lubeck_Province
Lubeck
hre
German_Rebels
247 223 111
furs, atlantic, explorers_guild, teutonic_knights_chapter_house
5
3
religions { catholic 70 orthodox 10 islam 0 pagan 15 heretic 5 }

Now, I have also used the trace function in the preference file to see what is going on, and I have worked out the file that must have the issue is descr_regions. We cycle through imperial_campaign_regions_and_settlements and then just before the failure is the file opening up descr_regions. Then we have the error. I am totally stumped. It ought to be working properly.

Please, if anyone knows the solution, please help! Thank you.

Comments

  • dge1dge1 Registered Users, Moderators, Knights Posts: 23,893
    This area is not very active on this forum at this time. I recommend checking out the TWC forum. They have a section for Med II mods. You might have better luck getting a response if you check in there.

    https://www.twcenter.net/forums/forum.php
    "The two most common things in the universe are Hydrogen and Stupidity." - Harlan Ellison
    "The right to be heard does not automatically include the right to be taken seriously." - Hubert H. Humphrey
    "Never argue with an idiot. They will only bring you down to their level and beat you with experience.” - George Carlin/Mark Twain
    “Those who cannot remember the past are condemned to repeat it.”–George Santayana, The Life of Reason, 1905.

  • FritzvomWald#8248FritzvomWald#8248 Registered Users Posts: 168
    edited January 27
    You forgot to add the names to the corresponding text file (imperial_campaign_regions_and_settlement_names.txt) in the data\text directory or the corresponding string.bin file did not regenerate (only use Notepad to edit TXT files). I recommend to have a look at my 'basic mapping' tutorial to understand the file interactions and to use my Bare Geomd modding set up for editing. The latter has a number of pitfalls removed - like the Segusa port bug that you will otherwise run into in your endeavor and it saves you from trying to figure out how to get the game to read your edited files as well as getting the required (packed) files in the first place.

    For other modding relating tutorials simply click on the link in my signature

    Edit: would you mind linking me to the guide you mention - it does look as if it is incomplete or maybe difficult to grasp.
    author.png
  • Hanseatic1241#5685Hanseatic1241#5685 Registered Users Posts: 7
    Thank you for the reply! The guide in question is one from 2006 on the Total War Center site. Here is the link -

    https://www.twcenter.net/forums/showthread.php?73660-How-To-Create-A-New-Region/page1

    and I also redid my work following other tutorials on the same site. I only posted on this forum as compared to Total War Center as this forum seems like it has more active users. What is Geomod? I have seen it mentioned on other posts but I don't know what it is. Thank you again.
  • FritzvomWald#8248FritzvomWald#8248 Registered Users Posts: 168
    edited January 28
    The tutorial is fine - I am guessing you had an issue at #9, eg the associated string.bin file (which the game reads from) did not regenerate. There is a fancy symbol at the top of the txt file - it has to remain in the first line for the file to work,
    Using an editor other then Notepad or it's ++ version may result in hidden formatting that results in an error.

    Bare Geomod is a basic mod set up in an easy to use installer - it contains the most commonly edited files plus all the sound txt files required to edit sound. Essentially it is the main game in a mod folder, plus a number of fixes which are listed in the history\read me file.
    The original name was 'Bare Kingdoms' but was changed when the set up was adjusted to work with the Geomod tool (hence the name).
    I wrote a manual for the tool in case you are interested to try it out.

    This forum might seem active, but in this sub part of it I am pretty much the only one to respond - this game version is simply old and most of it's modders have migrated to discord channels for easier communication and use TWC as repository for information\guides. You'll find me there as well.as 'Gigantus'.
    author.png
  • Hanseatic1241#5685Hanseatic1241#5685 Registered Users Posts: 7
    It worked! The Bare Geomod setup worked and I have added Lubeck! I followed your old 'creating a world - basic mapping' tutorial and worked with the Bare Geomod file to add it! Now, I can finally make my mod! Thank you very much!
  • Hanseatic1241#5685Hanseatic1241#5685 Registered Users Posts: 7
    edited January 29
    But, however, I am having a problem in **** with splitting Antwerp's territory into two - one for Amsterdam, the other for Antwerp. Whenever I split the two and try to bucket the eastern half (Amsterdam's) the western half also gets bucketed. I have to surround the ocean around Antwerp with Amsterdam's colouration and then bucket Amsterdam. But when I do this, the game boots me back to the campaign screen after a pick a faction. Is this a common issue?
    Post edited by Hanseatic1241#5685 on
  • FritzvomWald#8248FritzvomWald#8248 Registered Users Posts: 168
    edited January 29
    It's not common, for sure. I am puzzled by the phrase 'surround the ocean' - the normal way would be to draw a continuous line through Antwerp's region before filling one side with Amsterdam's color. You should do this while displaying 'settlements and ports' to avoid either being included in the latter's region.

    A crash to menu (CTM) is a sure sign that something went wrong with the descr_strat file side of things and normally you will find a specific message at the bottom of the game's log.
    One thing you have to religiously do in Geomod: VALIDATE. Validating transfers\writes data to files and needs to be done whenever you finish editing in one specific main setting. Paint the region - validate. Place settlement and port - validate. Edit settlement buildings - validate. Validating also returns error messages if something went wrong.
    author.png
  • Hanseatic1241#5685Hanseatic1241#5685 Registered Users Posts: 7
    I have managed to fix the issue with Antwerp now! Amsterdam is good and placed. However, a problem with region creating in the middle east vexes me. I attempt to create Babylon (in a position 6 below, two pixels to the right of Baghdad and fill out the Strat file, campaign_names and validate it with Geomod. It checks out fine, and so I go to Medieval II to check and when I pick a faction, I get a CTM. The strat file is as follows -

    }

    settlement
    {
    level large_town
    region Babylon_Province

    year_founded 0
    population 2000
    plan_set default_set
    faction_creator turks
    building
    {
    type core_building wooden_wall
    }
    building
    {
    type barracks town_guard
    }
    }

    This is the only region I have added in this go, and all other files check out. Geomod validates it. I don't see what the problem is. Thank you!
  • FritzvomWald#8248FritzvomWald#8248 Registered Users Posts: 168
    edited January 31
    Remove the entry from descr_strat and see if the error persists - the settlement should get created as minimal village belonging to the rebels if everything else is fine.

    Also check in the log for messages containing [error] - a CTM usually leaves a fairly clear message.

    Is the first bracket in the code the last bracket from the previous settlement?

    That said: picking a faction and getting an immediate crash is usually an error in the win conditions - do validate those for all factions with Geomod: factions\campaign\victory tabs
    author.png
  • Hanseatic1241#5685Hanseatic1241#5685 Registered Users Posts: 7
    I fixed it! I raked through the system log file for errors and found this -

    [script.err] [error] Script Error in mods/Bare_Geomod/data/world/maps/campaign/imperial_campaign/descr_mercenaries.txt, at line 304, column 60
    Unrecognised region name found: 'Babylon_Province'

    I had put in Babylon_Province to both imperial_campaign_regions_and_settlement_names and Descr_Regions and the and was rather confuddled at this response. But, when I rewrote Babylon province into the descr_mercenaries file, it actually worked! Now Jedda's space has been filled up with Mecca, Medina, Al-Rahba and good old Babylon! Thank you very much for the advice!
  • FritzvomWald#8248FritzvomWald#8248 Registered Users Posts: 168
    edited February 1
    Congratulations, you have advanced to bug hunter level 2!

    The clue was the file's name (descr_mercenaries) and 'unrecognized' then either means not present in the data\text file (the befuddlement) or an inconsistent spelling in descr_mercenaries (the solution).

    As to giving advice:

    https://www.youtube.com/watch?v=T3iYzyDQ3hQ
    author.png
  • Hanseatic1241#5685Hanseatic1241#5685 Registered Users Posts: 7
    Lol. Indeed!
  • FritzvomWald#8248FritzvomWald#8248 Registered Users Posts: 168
    edited February 2
    You'll find a fair number of tutorials\guides - mainly about mapping - when clicking the link in my signature.

    Tip: make it a habit to have consistent capitalization of terms - the engine is fairly forgiving but a deviation from that will prove fatal when scripting: no mercy then.

    Examples:
    Rus_Province <--> rus_province -- will most likely be ok or at worst result in your favorite error message
    I_CompareCounter <--> I_comparecounter -- will bust the whole script and the log will give no indication
    author.png
Sign In or Register to comment.