Tutorial 7 : A very useful little file
The .TRN file is a handy file that allows you to change a vast array of the parameters for your map, most of these settings are also available through the console, so I will only be covering a few of the uses of the .TRN in this particular tutorial.
Editing BZ II .TRN files is incredibly easy because they are text based, they can be edited by using a normal text editor such as notepad. This also means that you can copy sections from one .TRN file and paste them into another.
Note:
Some .TRN files can be incredibly complex, such as the one pictured on the left, taken from my IA map "Cornered". The truth is that most map makers only tend to edit a couple of sections of this file.
The .TRN file for the map featured in this set of tutorials is shown to the left, as you can see this one is far simpler than the one above. The two main aspects of the .TRN file that you'll need to change are :
1) The width and depth settings in the [Size] section of the .TRN, these settings control the size of the play area of your map. The values increase in increments of 1024, from 1024 x 1024 (small), to 7168 x 7168 (huge). If you edit these values you will have to delete the .TER and .WAT files for the map in order for the changes to take place, DON'T attempt this on maps where you've already started modelling the terrain as all terrain data will be lost, this should be done before work on the map has started.
2) The [Texture] section of the .TRN is where you can specify which textures you wish to use on your map, you can use a maximum of 15 different textures. Simply replace the texture names in the quotes with the names of the textures you wish to use.
The .TRN File Lizard's BZ2 Mapmaking Tutorials
Moderators: GSH, VSMIT, Red Devil, Commando
Re: The .TRN File Lizard's BZ2 Mapmaking Tutorials
The texture max is actually 16, but you REALLY shouldn't put anything on texture 0.
1.3 removes the ability to have transparency on the bottom texture layer preventing 'wall hacks'. However, for maps that wish to remove the terrain from visibility, (space maps) there is a way around this. So thus the map maker must decide that he wants the map to have transparent ground in the TRN, someone cannot simply drop in a texture and do it.
Check the 1.3 changelog for mentions of the TRN for this if you need it.
Someone else can comment on the Min and Max settings (depth and width or something), or whatever they were. It was something TJ and I had to fix on some 100 old maps to reduce pathing looping forever errors.
TRNs being in ODF format, can be read by the DLL as an ODF can be. Thus a DLL can read custom lines from a TRN if so coded. If I recall, the TRN may also list the gravity value for the map. Check the 1.3 changelog for info on this.
1.3 removes the ability to have transparency on the bottom texture layer preventing 'wall hacks'. However, for maps that wish to remove the terrain from visibility, (space maps) there is a way around this. So thus the map maker must decide that he wants the map to have transparent ground in the TRN, someone cannot simply drop in a texture and do it.
Check the 1.3 changelog for mentions of the TRN for this if you need it.
Someone else can comment on the Min and Max settings (depth and width or something), or whatever they were. It was something TJ and I had to fix on some 100 old maps to reduce pathing looping forever errors.
TRNs being in ODF format, can be read by the DLL as an ODF can be. Thus a DLL can read custom lines from a TRN if so coded. If I recall, the TRN may also list the gravity value for the map. Check the 1.3 changelog for info on this.