World map

From Mount&Blade Modding Wiki
Revision as of 09:33, 22 December 2011 by Swyter (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

[edit] Introduction

The Strategic Map (don't confuse with Scenes) is a big card where you can move to all the different locations, interact with the rest of parties (groups of agents, also named troops). It's generated based on the 3D data contained in Map.txt, located into the currently selected module.

[edit] Internal Workings

You can open it with any text editor, as the rest of module files, isn't saved as binary format. Instead of that the game reads the triangle arrays from every line and generates a representation of the data.

It also defines what texture is used in every triangle. There's a hard-coded limit for that values and no extra textures can be added.

[edit] Map.txt Detailed Structure

Originally discovered By Drago.

Is just a simple mesh, the first number is the vertex count, then a list of them all. After that is the face count, followed by. TextureID, unknown, numVerts, vert,..vert+numVerts ie:

1 0 3 2 3 1 equates to texture 1, ?, 3 verts, v1, v2, v3
1 0 4 2 3 1 5  equates to texture 1, ?, 4 verts, v1, v2, v3, v4


map.txt consists of 2 parts. 1st part lists all vertices with {x,y,z} coords 2nd part lists all triangles with {terrain_code,0,3,vertex1,vertex,vertex3}

[edit] cmpxchg8b's Map.txt reverse engineered Structure

As seen in here...

I called them polygons because poly_n_number_of_points suggests that there can be more than 3 points, but map.txt only uses triangles. By poly_1_point_1_index I mean the index of the point in the first list.


point_count
point_1_x point_1_y point_1_z
point_2_x point_2_y point_2_z
...
point_n_x point_n_y point_n_z
polygon_count
poly_1_terrain_type unused poly_1_number_of_points poly_1_point_1_index poly_1_point_2_index poly_1_point_3_index
poly_2_terrain_type unused poly_2_number_of_points poly_2_point_1_index poly_2_point_2_index poly_2_point_3_index
...
poly_n_terrain_type unused poly_n_number_of_points poly_n_point_1_index poly_n_point_2_index poly_n_point_3_index


--81.172.59.124 17:14, 22 March 2011 (CET) Needs Formatting


[edit] Terrain Codes (from header_terrain_types.py):

rt_water = 0
rt_mountain = 1
rt_steppe = 2
rt_plain = 3
rt_snow = 4
rt_desert = 5
rt_bridge = 7
rt_river  = 8
rt_mountain_forest = 9
rt_steppe_forest = 10
rt_forest = 11
rt_snow_forest = 12
rt_desert_forest = 13

[edit] Native Warband Strategic Map

MapCalradiaWarband.jpg

High resolution Official Poster version: Click Here


[edit] Original Native Mount&Blade Strategic Map

Mount%26Blade_world_map.jpg

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox