Before the holidays, I was forced to put my AH3 projects aside. I'm only now getting the time and energy to work on them again and I thought some of you might like to follow along. I can't say how far I will get, and things may become a bit random in the process.
As I don't do this every day, I usually need to do some

to make things work.
This is not written for beginners.
Currently, I'm working two of several projects. I've always wanted to create a custom terrset from scratch and build a large railyard. Neither of these will be allowed in a main arena terrain but for some you, seeing what custom terrain builders go through and how the process works will be enough. Keep in mind it's meant for terrain builders with some experience.
Today, I'll discuss building a new terrset but using an existing default terrset as a template will make the work go faster.
As the TE no longer exports ground textures as the AH2 TE did, you'll need to download HTC's terrsettextures.zip from the top of this forum:
https://bbs.hitechcreations.com/smf/index.php/topic,387747.msg5152982.html#msg5152982While you're at it, also download the default swa tree and building files from the same post: tilesswa.zip
The second step is recognizing which trees and buildings you want, summer eto, winter eto, desert, or sunny tropical palm trees. The buildings and trees are a set, so no mixing palm trees with eto buildings, sorry.
In step 3 you must create a terrain. It can be a dummy, it's just a placeholder for your work, and you will move your terrset later. I recommend not using a terrain project you intend for the server and avoid the possibility of trashing your valuable work.
In the TE, select New and create 'myterr', don't care what size, but quickly pick your tree/building set from the available tilesets.
So now we have a terrain called myterr with the proper tileset. Save it and exit.
I'll pretend you want to modify or build a new ETO terrset.
You can use Windows Explorer (W.E.) to browse the zip file. Right click the zip and select W.E. Drag the terrset00 folder into the myterr folder. It contains 2 important text files and 4 optional files, also a spdtree folder.
(You need that terrset## folder along with its text files and spdtree folder.)
Using a text editor like Notepad, open atlas0.txt and modify the first line so AH will use the local directory path.
It reads:
atlas,C:\art\ah2\stdtexnew\atlas\terrset00
Truncate it before or after the coma: atlas,
and save it.
Do the same for atlas1: - atlas,C:\art\ah2\stdtexnew\atlas\terrset00 - becomes - atlas,
I can't imagine ever having a need to change the other 4 text files. Currently, I delete them and AH will use the defaults for the selected terrset.
You may have noticed that these 2 text files read something like "../508/sand.bmp".
Each of those lines is pointing at the 508 folder or the 1016 folder in the local terrset00 folder. That won't work even if you drag both folders over from the zip file. Use the recommended path. This requires more steps, changing the text lines, adding another texsrc folder, and moving the textures to the new texsrc folder.
Those "../508/sand.bmp" and "../1016/$$$" lines in the atlas' mentioned above all need changing to match the intended path. They can be written thus:
Ex:
../1016/farm1.bmp
- should become -
texsrc/farm1.bmp
- etc., and that line will now work. -
Inside your terrset00 folder, along side the atlas#.txt files, create a new texsrc folder.
This texsrc folder is for the terrset bitmaps only. Unless the editor has changed, the TE will incorporate every bitmap it sees inside the project folder. That increases the size of the res file, so limit your final terrain to a single terrset and no (or few) unused bitmaps. That means copying the terrain textures needed for terrset00 from the 508 and 1016 folders and pasting them into your new texsrc folder, or just drag them.
The important thing is to follow the directory path procedure used by your operating system. I don't find the ../ prefix necessary in Win7 but ymmv.
"But wait," you say, "I shouldn't need to make all these modifications just to play around with a few textures. Why not leave the bitmaps in the original 508 & 1016 folders?" Won't work, not as written.
Both atlas' have been modified to follow the correct directory paths, the 2 folders needed, terrset00 and texsrc exist inside your project folder, and the bitmap textures (usually a family of 4 bitmaps per tile) have been copied over into the texsrc folder.
Your directory structure should look like this:
myterr
>terrset00
>atlas'
>>texsrc
>>>terrain texture bitmaps
texsrc
>clipboard map if desired
.oba
etc.
Reopen the TE to your 'myterr' and if all went well, it will automatically build and update the necessary stb, sta and htx files each time it runs. Since these are still using the default textures, you won't notice any changes in the TE until you modify one of the diffuse textures.
Make your first test VERY quick and minimalist. Make a backup copy of the diffuse snow texture and draw a wide line across the original snow texture. Remember it needs to be index 256 color, but more than that, it needs to be the right version of 5 possibilities for an MS bitmat file. The internal headers vary. Your graphic program's indexed color output may not match that. If you followed along and drew lines in MS Paint and saved it, you might notice the snow texture might be a slightly different in color to the backup.
So great, you can see the change in the TE. What about those trees and buildings? Using W.E. again, navigate through tilesswa.zip > tilesswa > swa > terrset00. See the swa folder and copy it over into the spdtree folder inside your terrset00 folder.
To make sure it's working, notice there is no snow.swa file. For fun, make a copy of farm1.swa and rename it snow.swa and reopen the TE. Turn on the trees to see the change.
At this point, you can modify the diffuse textures to your heart's content. At some point, you want to experiment with the other three supporting textures which control things like lighting, ground surfaces, vegetation and bump mapping.
~~~~
There was no way to modify trees or buildings in the custom terrset before now.
Open the OE, select New, and select the matching terrset for the trees and buildings you want. It should match the terrset## folder name you decided on earlier. The OE uses the tile's texture as the starting point for trees. Open the same snow texture bitmap you modified and added farm1 trees to.
At this point you should see the diffuse texture but no trees or buildings. That's because the OE uses an input folder and a different output folder for trees. It loads swa files from the
terrset00\ spdtree\swa\spdtree\swa\ folder and writes to the
terrset00\swa folder. I suspect this is to afford an opportunity to make backup copies of previous versions before you commit to changes.
Until you rationalize why this is done this way, the confusing part comes from the fact you point the OE at the swa file in the output folder to load from the input folder. It won't work otherwise.
It's unlikely I will modify the swa files for the square tile objects in my new terrset work so I'll select only the swa files for the ground textures I intend to change, and copy them from the output folder to the input folder.
Now when the OE is pointed at an swa file in the output folder, it will actually load the same file name from the input folder.
~~~
Next time, more about the atlas and supporting textures for the diffuse bitmap, _a0, _b1,_n and clutter.
