Skip to content
Swyter edited this page Aug 12, 2023 · 32 revisions

Mount&Blade Cartographer documentation

Welcome to the on-line manual for cartographer, a strategic map and party editor for the Mount&Blade game series. It is mean to work as a lean reference and quick start guide. Feedback and pull requests with enhancements are appreciated.

Downloading and first steps

Get the latest version of the tool at this page. Download the most recent zip and extract it wherever you want, it doesn't require any kind of installing or other prerequisites.

carto_wiki_startup.png

To start the software, double-click on cartographer.cmd, a command-line window will appear spitting the inner workings of the program, and from it the proper 3D editor window will spawn. The first time you start it without configuring it will use the example assets included in the package. To use it with your own mod you will have to point it to your own module system instead.

carto_wiki_a.png

Configuring the software

The configuration is done by the means of a tiny text file called cartographer.conf.ini, which you can open with any decent editor. By default it looks more or less like this:

-- swyter's cartographer
-- for those entertaining moments when you have to configure something, oh, so l33t!

cartographer.conf =
{
  --# use \\ or / for path separators but don't even thing about single backlashes like this one: \
  msysparties = "res\\msys\\module_parties.py",
  
  --# set to false if the extra comment at the right when saving parties bothers you, in case you're a neat freak
  sprevcoords = true
}

The important key here is pointing msysparties to your own module_parties.py.

Where do I specify my actual module folder, and the map.txt or parties.txt files, Swyter? You say, starry-eyed.

Well, the main difference between Thorgrim's Map Editor and this is that cartographer is meant to work directly with the module system, that is, the source *.py files, instead of the compiled *.txt files. And from the source files it can automatically figure out the rest.

Once we've cleared up possible misunderstandings we will proceed to navigate to our module system folder to later copy the path from the file browser. I'm my case R:\Juegos\swconquest\modules\tld-svn\ModuleSystem is where my module_parties.py is located.

To configure it just change the default local example folder...

  --# use \\ or / for path separators but don't even thing about single backlashes like this one: \
  msysparties = "res\\msys\\module_parties.py",

... into this, note the double backslashes ...

  --# use \\ or / for path separators but don't even thing about single backlashes like this one: \
  msysparties = "R:\\Juegos\\swconquest\\modules\\tld-svn\\ModuleSystem\\module_parties.py",

... save, and we are done. If your module_info.py output folder points to the right place cartographer will figure out where the actual mod is stored, and will find out map.txt, will open it and after some processing will display it to you. Well done!

carto_wiki_b.png

Using the software

Now that you know how to use it with your own mod, lets move to the actual functional part. cartographer was originally created as a personal tool to move parties in a precise and visual way, at a time where this was simply not possible due to the lack of decent alternatives.

Still, has gained its fair share of tricks along the years and now is regarded as a solid map editor, too. Even if the editing part is delegated to actual 3D modeling suites, where the spectrum of tools and operators is richer than anything that can be ever added to cartographer itself. With the vast amount of accessible, free and open source professional quality 3D software available today its just the only sane thing to do. Instead of constraining the modder to a few, limited, bug-ridden options.

Moving parties and settlements

  • To navigate through the world map you can either use the four directional arrow keys in your keyboard or the classical WASD combination frequently used in the FPS games of today.
  • To rotate the camera around the current position, keep the left mouse button pressed while you drag the cursor inside the cartographer window.
  • To move vertically use your mouse wheel, pretty intuitive, right?

Let's try to move a party icon, first navigate until you get close to it, point your cursor inside of the white sphere and click with your right mouse button to select it. It will change color, showing an orange-ish hue and a red rotation marker over it signaling the direction it is currently pointing to.

carto_wiki_c.png

Now that this party is selected you can do two things with it; move and rotate.

To rotate it, just keep the R key pressed while you horizontally move the cursor. Release the key once you are done.

carto_wiki_d.png

To move it around the ground plane, just keep the G key pressed while pointing with your mouse to the place you want to move the party. Sometimes is easier to point your cursor, targeting beforehand, and just briefly press G to move it in an instant.

carto_wiki_e.png

Once we've finished just press the F9 key and your changes will be saved down to module_parties.py, ready to be compiled into a parties.txt file and experienced in-game.

It's convenient to use some kind of version control system like Git, Mercurial or Subversion to revert in case something goes awry. Or at least having some kind of backup before saving with cartographer, just because.

If you have made a mistake you can press the F10 key to reload the module_parties.py, losing your unsaved changes. It can also be used to edit the text file directly and refresh cartographer to quickly visualize the latest changes without having to close and restart.

Editing the map geometry

To edit the map mesh itself what cartographer does is acting as a middleman between your 3D modeling software of choice and the proprietary map.txt format used by the Mount&Blade game engine.

Particularly, it exports an *.obj file with its respective *.mtl. Wavefront OBJ is the Rosetta stone of the 3D mesh formats, and can be opened by almost anything you can think of. Even if in this guide we are going to use the free and open source Blender 3D, keep in mind that you can use anything else you want, from Wings3D, to the proprietary Autodesk 3ds Max or Maya with a similar outcome. It all depends on personal preference.

carto_wiki_save.png

Now that we've talked about the overall process... lets go into detail. Open your already configured cartographer and once it has loaded press the F8 key to open the mesh export dialog. Save your exported map mesh with a descriptive name in a known location and open your 3D editor of choice, in my case, Blender.

carto_wiki_blender_import_obj.png

In Blender, open the mesh import dialog by choosing File > Import > Wavefront (.obj) in the main menu bar.

carto_wiki_blender_import_obj_select.png

Navigate to the folder where you previously saved the *.obj you exported from cartographer and select it.

carto_wiki_blender_import_obj_select_options.png

Before clicking in Import, take a look to the import options in the scrollable left side of the window, and make them match the screenshot above. You can save them as ready-to-use presets for the next time. Now you can import it.

carto_wiki_blender_mat_select.png

The mesh will appear in the 3D View, if you select the mesh object in the Outliner (panel with the tree-like icon) and enter Edit mode (the combobox is in the lower part of the 3D View panel) you will be able to edit its geometry and materials.

If you switch to the Materials tab in the Properties panel (the one with the two horizontal white bars icon) you will see the 14 hardcoded materials which you can assign to the triangles of the map mesh. You cannot use or create other materials, this is a game limitation.

carto_wiki_blender_mat_select_assign.png

To assign materials first change the selection mode to faces by clicking in the carto_mini_face_select.png icon. Then choose the triangles which you want to change by selecting them individually or using the Circle Select (C key) or Box select (B key) tools. Now that the triangles are marked as selected click in a material of the list, in my case deep_water, to subsequently click on the Assign button. The coloring of those triangles should instantaneously change

carto_wiki_blender_sculpt_mode.png

To alter the orography of our map we can take advantage of the powerful mesh sculpting tools coming with Blender. Switch from Edit mode to Sculpt mode in the 3D View combobox we talked earlier.

carto_wiki_blender_sculpting.png

The sculpting workflow is just a matter of choosing brush, radius and strength and start to sculpt. There's plenty of information around on the Internet if you want to learn more about this feature. The basics are moving the cursor with the left mouse button pressed, and holding Ctrl to invert the brush shape.

carto_wiki_blender_export_obj.png

Once you are done changing materials and sculpting, switch to Object Mode, ensuring you are only selecting the map mesh, and export it by going to File > Export > Wavefront (.obj).

carto_wiki_blender_export_obj_select_options.png

Similarly to the import menu, we should pay attention to the export options, as they are vital to make the resulting mesh Mount&Blade compatible. Specially important is checking the Selection Only, Triangulate Faces, Write Materials and Material Groups boxes. We don't care about UVs or normals, but checking them is harmless.

carto_wiki_blender_import_obj_name.png

So... set the name, and click on Export. Now we are ready to go back to cartographer and see the results of our exploits.

carto_wiki_open.png

In cartographer press the F7 key to import our delightfully made *.obj. Select it in the dialog that pops up and press Open.

carto_wiki_f_result.png

After a second of waiting we should be viewing our cataclysmic results on the renewed terrain. Notice how the parties stay ground aligned.

carto_wiki_g_output_log.png

If we are satisfied with our work we can overwrite the map.txt file by pressing F5. Don't forget that the progress is always displayed in the text window, so pay attention if you are unsure if worked. It's pretty verbose.

Eager to see the final appearance in-game? Me too.

Conclusion

If you don't quite get some of the functionalities, or have a killer feature/suggestion/bug report, don't be shy and head to the official thread in the Tools section of the Forge at the official Taleworlds forums, and Swyter will swiftly respond to your demands.

There's plenty of knowledge and little tricks in there since its inception in early 2012, so if you take a look to the previous pages there's a lot of questions which have been answered already. Try to search first to avoid redundancies, sometimes it gets a bit tiring to reply to the same question over and over. Hope you understand!

Have fun!