[WB] Thorgrim's Editor Terrain [HELP]

Users who are viewing this thread

I changed the Wercheg peninsula to the "Ocean" texture in Thorgrim's editor, and whenever I try to lower the water level so it is equal with the other water it simply flattens and increases outwards, making it worse.

Is there any way I can entirely flatten this ocean water so it is equal with the rest?

hD2eWDu.png
 
NPC99 said:
cwr said:
Is there an easy way to set a group of vertexes I highlight to all be the same height? I made some islands but I want to get rid of them and return that area to the ocean and it seems very tedious to do manually.

I did make a backup before starting- but I only want to delete about half the islands I made. So perhaps there is a way to combine the maps (even by directly editing the text file- I looked at it and it looks like a sequence of x,y,z coordinates? Is that correct?)

map.txt is organised as follows:
A. The first row is a single number, which is the number of vertices,
B. The next set of rows are of three numbers each, being the x,y,z coordinates of each vertex listed in order (but unnumbered) running from zero to the total number of vertices minus one,
C. The next row is a single number, which is the number of polys,
D. The final set of rows are of six reference numbers, each for each poly, listed in order (but unnumbered) running from zero to the total number of polys minus one. The reference numbers are:
1. Terrain code (i.e. 8 = river etc).
2. Zero - presumably unused.
3. Three - I assume this confirms that each poly is composed of three vertices.
4-6. The list numbers of the three vertices making up that particular poly.

To change vertex heights you need to:
A. Paint the terrain to be adjusted a unique terrain so it can be searched for. If your map has no snow, use that.
B. Import map.txt into excel. When asked the fields are delimited by a space, not fixed length.
C. Add vertex list numbers (0 to total-1).
D. Search the last poly section for terrain code 4 if using snow as an identifier and note all that poly’s vertex numbers.
E. Change the z coordinate for each vertex of each snow poly.
F. Reformat map.txt and export from excel.

This can be partially automated using lookup tables etc.
That can let you reset the height of your redundant islands back to sea level, or I could do it for you if you tell me what unique terrain code you’ve painted them with to identify the polys to be lowered.

I don’t know how to combine maps by txt edits. That needs tedious mesh edits in blender.
 
map.txt is organised as follows:
A. The first row is a single number, which is the number of vertices,
B. The next set of rows are of three numbers each, being the x,y,z coordinates of each vertex listed in order (but unnumbered) running from zero to the total number of vertices minus one,
C. The next row is a single number, which is the number of polys,
D. The final set of rows are of six reference numbers, each for each poly, listed in order (but unnumbered) running from zero to the total number of polys minus one. The reference numbers are:
1. Terrain code (i.e. 8 = river etc).
2. Zero - presumably unused.
3. Three - I assume this confirms that each poly is composed of three vertices.
4-6. The list numbers of the three vertices making up that particular poly.
^^^ This information is very helpful!
To change vertex heights you need to:
A. Paint the terrain to be adjusted a unique terrain so it can be searched for. If your map has no snow, use that.
B. Import map.txt into excel. When asked the fields are delimited by a space, not fixed length.
C. Add vertex list numbers (0 to total-1).
D. Search the last poly section for terrain code 4 if using snow as an identifier and note all that poly’s vertex numbers.
E. Change the z coordinate for each vertex of each snow poly.
F. Reformat map.txt and export from excel.

However this one I was stumped on for a while. I set the area of which I would like to be flat to all sand - the only sand on my entire map.
I've never used excel in my life, but I set it to delimited and all looked fine. Yet I'm at a loss as to what "Add vertex list numbers ( 0 to total-1)." means.

Then, also, I don't know how to do this "Search the last poly section for terrain code 4 if using snow as an identifier and note all that poly’s vertex numbers," nor do I know how to do this "Change the z coordinate for each vertex of each snow poly," and finally this " Reformat map.txt and export from excel."

Sorry to have all these questions, but when it comes to Mount & Blade modding I'm a newbie. Is there any way you could explain it more thoroughly? :lol:
 
NoChar said:
map.txt is organised as follows:
A. The first row is a single number, which is the number of vertices,
B. The next set of rows are of three numbers each, being the x,y,z coordinates of each vertex listed in order (but unnumbered) running from zero to the total number of vertices minus one,
C. The next row is a single number, which is the number of polys,
D. The final set of rows are of six reference numbers, each for each poly, listed in order (but unnumbered) running from zero to the total number of polys minus one. The reference numbers are:
1. Terrain code (i.e. 8 = river etc).
2. Zero - presumably unused.
3. Three - I assume this confirms that each poly is composed of three vertices.
4-6. The list numbers of the three vertices making up that particular poly.
^^^ This information is very helpful!
To change vertex heights you need to:
A. Paint the terrain to be adjusted a unique terrain so it can be searched for. If your map has no snow, use that.
B. Import map.txt into excel. When asked the fields are delimited by a space, not fixed length.
C. Add vertex list numbers (0 to total-1).
D. Search the last poly section for terrain code 4 if using snow as an identifier and note all that poly’s vertex numbers.
E. Change the z coordinate for each vertex of each snow poly.
F. Reformat map.txt and export from excel.

However this one I was stumped on for a while. I set the area of which I would like to be flat to all sand - the only sand on my entire map.
I've never used excel in my life, but I set it to delimited and all looked fine. Yet I'm at a loss as to what "Add vertex list numbers ( 0 to total-1)." means.

The three vertices making up each triangle are only referred to in map.txt by their position (D4-6) in its list of vertices (B). To find an individual vertex, to edit it, you need to add position/index numbers. This is just a number sequence 0,1,2,3,4....total-1, running down beside the columns of vertices coordinates. First cell=0, second cell= first cell + 1 then copy formula in second cell all the way down to the end of the list. This list will need to be deleted, after editing before saving map.txt as an msdos text file, but it allows you to jump to or search for each vertex you want to edit.

Then, also, I don't know how to do this "Search the last poly section for terrain code 4 if using snow as an identifier and note all that poly’s vertex numbers," nor do I know how to do this

Terrain codes (D1) are as follows:
terrain codes are
0 = sea or ocean
1 = mountain (impassable)
2 = steppe
3 = plain
4 = snow
5 = desert
7 = ford/bridge (walkable water) use sparingly to avoid crashes
8 = river
9= steppe mountain (impassable)
10 = steppe forest
11 = forest
12 = snow forest
13 = desert forest (not paintable in Thorgrims)
15 = deep ocean (walkable water) has blending issues if adjacent to non-water terrain

As you’ve used sand you need to search the first column of the second list of numbers (D1 terrain codes) for all instances of 5 (desert/sand). The fourth, fifth and sixth column number for each of the instances of terrain code 5 are the vertex list numbers of the vertices that need to be edited.

"Change the z coordinate for each vertex of each snow poly," and finally this " Reformat map.txt and export from excel."

Search for the vertex list/position number of any sand triangle in the index added above to the first list of numbers. The third column is the z coordinate which gives height. That just needs to be changed to the height you’ve used elsewhere for sea terrain (look up terrain code 0 in the second list and check the z coordinate height of one of its vertices in the first list, then reuse that height for all your sand terrain).
 
Back
Top Bottom