Post tutorial RSS Removing Native Locations and Adding and Assigning Map Icons

This is a two part tutorial about Removing Native Locations and Adding and Assigning Map Icons so check it out if your interested in modding mount and blade.

Posted by on - Intermediate Other

Ok here is a two part tutorial that you should find useful, removing native locations and adding and assigning map icons. I took me a while to type it up and then again quite a bit to add it onto this topic with the text and code for the pics everywhere so I hope you enjoy this tutorial.

Removing Native Locations by xPearse (P.S. This isn’t what I look like)

police officer moddb 256x256

At the moment I’m removing native locations for HOTD so I can then move onto the new map and since there hasn’t been a tutorial on this subject I wanted to show you guys how it is done. If you know your way about the module system you possibly will already know how to do this but not everyone and especially those who haven’t done anything like this before like those getting into modding M&B.

Ok removing locations in mount and blade can really be a drag and it does take long to do so hopefully you will find this tutorial useful. There are many different module files you need to go into to remove locations and here is a list of which ones we will be editing.

• Module parties
• Module troops
• Module scenes
• Module scripts
• Module Presentations
• Module Constants

First off here are the locations which I will be removing, I know a lot but I’m removing most of the native faction’s location so it will be easier to do stuff with a lower number of locations.

• Halmar (Town 14)
• Narra (Town 18)

• Malayurg Castle (Castle 2)
• Sungetche Castle (Castle 7)
• Distar Castle (Castle 17)
• Unuzdaq Castle (Castle 22)
• Tulbuk Castle (Castle 38)
• Uhhun Castle (Castle 40)

• Dusturil (Village 11)
• Dashbigha (Village 25)
• Tash Kulun (Village 28)
• Ada Kulun (Village 37)
• Zagush (Village 43)
• Bulugur (Village 45)
• Kedelke (Village 76)
• Tulbuk (Village 88)

Module Parties
Ok first off I start removing the locations in module parties so open that up and we’ll get started. Start off at the top and work your way down, remember your location ids such as Halmar (Town 14).

tutorial pic 1

Just delete the highlighted line in the pic and after deleting the town party it should look like this.

tutorial pic 2

See it is now gone and make sure you only delete the entry’s you going for as you don’t want errors if you make mistakes. Now after deleting the town’s you want then go onto the castles and remove those and then the villages.

Module Troops
Ok that’s all in module parties so onto module troops. Open that up and I’ll tell you what to do, ok this bit may be tricky but you have to delete all the troops relating to the locations you removed, here is a list of the people you may need to remove.

• Seneschals
• Arena Masters
• Armourers
• Weaponsmiths
• Tavern Keepers
• Merchants
• Horse Merchants
• Guild Masters

• Seneschals

• Village Elders

Make sure you remove all these for the types of locations and remember which town id’s you removed so write them down like the way I did and preferably in order of number to makes it easier.

• Dusturil (Village 11)
• Dashbigha (Village 25)
• Tash Kulun (Village 28)
• Ada Kulun (Village 37)

Example of what your screen should look like just encase since you kinda don’t need pics for this section.

tutorial pic 3

Module Scenes
This section like the troops part can also be tricky as there are many sections you need to remove for the locations but as before I’ll list them to help you out. Start off at the town centers and work your way down and remember to remove only the entries of the locations you want gone so don’t remove town 4 if you only want town 5 gone.

Basically in this part you will remove the scene part of the locations so you will know what to do if you’ve been in this area before.

• Centers
• Castles
• Taverns
• Stores
• Arenas
• Prisons
• Walls
• Alleys

(Castles) (Each Castle scenes are together unlike the towns where they are spread apart in categories)
• Exterior
• Interior
• Prison

Just the village entry as there is only one scene in a village but here’s an example

("village_11",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000220029c4400077de100002dcc00002edf00003925",

Image example of what it looks like

tutorial pic 4

Module Scripts
After here we’re onto the scripts so open up module scripts. For the scripts section you may find it more complex since there is a ton of text in this file so try not to mess up as it may cause problems. Basically you will have to ctrl+f and type in the id of the locations you removed and remove them or change them to something else.

tutorial pic 5

See got my first result and on this screen is the script that makes trade routes between the cities/towns in the game so remove the lines for the towns you deleted and for the towns that it send to the ones you deleted then delete that line or change it to another town to be safe.

Below this script will be a tournament script of some sort so delete it if it’s one of the towns you’re removing.

tutorial pic 6

Also if you’ve removed a town which was the first entry then you will have to edit this here, it’s right below that tournament section so you should easily see it.

It looks like this
tutorial pic 7

What you do here is change the starting center, tavern and what sort to the now first entry which for me is four since I already deleted the 1,2,3 before this tutorial so remember this section when removing locations.

Then below this is the same thing except for the castles so if you’ve removed the first entry of the castles then you will have to edit this section.

tutorial pic 8

So just change the starting number of it loading the exteriors, interiors and prisons of the castles.

Below this is
# Set which castles need to be attacked with siege towers.
So delete the entries which are the locations you removed.

Also check out the (call_script, "script_center_change_trade_good_production", "p_village_36", "itm_smoked_fish", 60, 0), part as you may need to remove some there as I have and I only have village 36 left there as the rest were removed since the locations were gone.

After go down and check this out
#Reassigning the cattle production in the village
And make sure you change the numbers of the village and village elder if you have deleted the first village entry, see in bold.

(store_add, ":exterior_scene_no", "scn_village_1", ":offset"),
(party_set_slot,":village_no", slot_castle_exterior, ":exterior_scene_no"),

(store_add, ":store_troop_no", "trp_village_1_elder", ":offset"),
(party_set_slot,":village_no", slot_town_elder, ":store_troop_no"),

You’ll find all this if you search for your location ids such as town_14 and more but just encase type this into your find box and below you will see the script section which gives locations to lords and such so delete the entry’s which have locations which you have removed. Again remember the id’s you removed.

#Correcting banners according to the player banner
Your screen should look like this.

tutorial pic 9

Now find this
#NPC companion changes begin
And it should lead you to a section which relates to the companions, mostly here you should check out the entries and make sure their home towns aren’t any of the locations you removed and if so change it so you won’t have any errors.

Also be sure to check out the kingdom pretenders and make sure their slot_troop_support_base isn’t any of which you removed so a lot of checking to do.
Search with this to find the location #Rebellion changes begin

Use the search dialogue in python and type in all the locations you entered just to be sure you didn’t miss anything.

Module Constants
Check through here and check out these parts, it tells the game where the towns begin and so forth, obviously you can tell what it does by looking at it but just encase.

• towns_begin = "p_town_4"
• castles_begin = "p_castle_2"
• villages_begin = "p_village_1"

Also where scenes begin since you went about deleting some
• scenes_begin = "scn_town_4_center"
• scenes_end = "scn_castle_2_exterior"

Arena masters begin, armour merchants and so forth.
• arena_masters_begin = "trp_town_4_arena_master"
• arena_masters_end = "trp_town_4_armorer"
• armor_merchants_begin = "trp_town_4_armorer"
• armor_merchants_end = "trp_town_4_weaponsmith"
• weapon_merchants_begin = "trp_town_4_weaponsmith"
• weapon_merchants_end = "trp_town_4_tavernkeeper"
• tavernkeepers_begin = "trp_town_4_tavernkeeper"
• tavernkeepers_end = "trp_town_4_merchant"
• goods_merchants_begin = "trp_town_4_merchant"
• goods_merchants_end = "trp_town_4_horse_merchant"
• horse_merchants_begin = "trp_town_4_horse_merchant"
• horse_merchants_end = "trp_town_4_mayor"
• mayors_begin = "trp_town_4_mayor"
• mayors_end = "trp_village_1_elder"
• village_elders_begin = "trp_village_1_elder"
• village_elders_end = "trp_merchants_end"

When you export and get errors don’t worry because that will lead you to more places where you will fix errors and all sorts so this is a good thing.

I just exported and got some errors so now I know where else to look.

tutorial pic 10

Ok I got errors in
• Presentations
• Scripts
• Game Menu’s
• Simple Triggers
• Triggers
• Dialogs

Ok I check them over and found out that while I was doing this tutorial I forgot to change where the castles start so that’s why I got errors in the above but I only had to edit the constants as the other files link to there.

Also had to change where scenes end in module constants as my now first entry in castles is 13 where the old one for me was 2 so now no errors when I exported.

Ok so if you got errors then you will need to go and fix them, obviously I can’t know your errors here as they may be different from mine but you get the overall drift on how to go about removing native locations from the game.

There are possibly some things that I may have missed in this tutorial about removing native locations but this more or less covers it and what you need to do so should prove very useful for those starting to mod M&B.

Now onto adding and assigning map icons

Adding and Assigning Map Icons
This is very easy to do and really doesn’t require a tutorial but not everyone knows how to go about doing all this because you have to learn so even though this is easy to do I’ll show you how.

Here are the files in which we will be editing
• Module Parties
• Module Map Icons
• ID Map Icons

First off head into module map icons and we’ll create a map icon entry, ok basically copy another entry and edit it to be your own such as below. I just add the HOTD map icons at the bottom.

Map icon id below Tags Model in a brf 0.45 is the model scale
("glass_high_rise_map_icon",mcn_no_shadow,"glass_high_rise_map_icon", 0.45, 0),

Now onto id map icons and just copy another entry like before and make it your own, here’s an example, just see the bottom entry and you’ll know what to do

tutorial pic 11

Just continue with the numbers and make sure that the name is the same as in module map icons.
icon_glass_high_rise_map_icon = 177
("glass_high_rise_map_icon",mcn_no_shadow,"glass_high_rise_map_icon", 0.45, 0),

Now onto module parties to assign it to a location
("village_2", "City_Streets", icon_glass_high_rise_map_icon|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(12,-20),[], 110),

See where it says icon_glass_high_rise_map_icon that’s the part where you assign the map icon so just make sure it’s the same as it is in the id and module map icons. That’s really it and easy to do so thanks for reading this tutorial and good luck.

I hope you really appreciate this tutorial as it took me around 2 hours to get the pics, type this up and just to make sure that the information is right, you should find this very useful so I hope you thank me for doing this as it’s always good to know that people have learned from this.


Thanks! Im adding a castle to this mod (not removing any). Hopefully i can get this right!

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.