Difference between revisions of "Terrain Texture File"

From SC4D Encyclopaedia
Jump to navigation Jump to search
sc4e>Whatevermind
(Created page)
 
m (1 revision imported)
 
(One intermediate revision by the same user not shown)
(No difference)

Latest revision as of 21:41, 3 August 2019


The Terrain Textures File is located at TGI 0x00000000,0x8a5971c5,0xaa597172, and contains information the game uses to figure out which terrain textures to display where. This file is an integral part of any terrain mod as well. Most of the file specification is spelled out in the file itself.

Specification

This file contains several sections. Almost all of the file is commented out, and all but two of the sections are irrelevant. The two that are used are : TropicalMiscTextures and TropicalTextureMapTable. The TerrainMiscTextures section contains some cliff textures, but these are not used due to the Tropical ones accounting for everything used in the game. The Terrain Simulation and Water Simulation parts of the file are just mock up data that was never completely implemented.

TropicalMiscTextures contains the data that relates to the various nonstandard elevation textures. Format is three lines only:

HighCliff=(Texture Instance ID)
LowCliff=(Texture Instance ID)
Beach=(Texture Instance ID)

HighCliff is not known to be used, however LowCliff is all cliffs in-game, and Beach is our beaches. These can be changed as needed to create new effects.

TropicalTextureMapTable

TropicalTextureMapTable is a table of texture Instance IDs that maps out each moisture and temperature condition to a particular terrain texture. Only the last two digits of the Instance ID are used in this table (i.e. 0x32 = 0x00000032). Exactly how the game defines moisture and temperature is not completely understood, however one can get a basic visualization of these two parameters by equating temperature to elevation (higher = colder), and moisture to slope. For example, the game would assign a drier texture to a point in the rainshadow of a mountain, and a wetter texture to the opposite.

The default TropicalTextureMapTable is reproduced below. Different lines correspond to different temperatures. They are listed in the order of increasing temperature(i.e., coldest to warmest). Items within a line correspond to different moistures. They are ordered from driest to wettest.

00=0x32,0x32,0x32,0x32,0x32,0x33,0x32,0x33,0x33,0x36,0x33,0x36,0x36,0x37,0x36,0x37,
01=0x32,0x32,0x32,0x32,0x32,0x33,0x32,0x33,0x33,0x36,0x33,0x36,0x36,0x37,0x36,0x37,
02=0x32,0x32,0x32,0x32,0x32,0x33,0x32,0x33,0x33,0x36,0x33,0x36,0x36,0x37,0x36,0x37,
03=0x32,0x32,0x32,0x32,0x32,0x33,0x32,0x33,0x33,0x36,0x33,0x36,0x36,0x37,0x36,0x37,
04=0x32,0x32,0x32,0x32,0x32,0x33,0x32,0x33,0x33,0x36,0x33,0x36,0x36,0x37,0x36,0x37,
05=0x32,0x32,0x32,0x32,0x32,0x33,0x32,0x33,0x33,0x36,0x33,0x36,0x36,0x37,0x36,0x37,
06=0x32,0x32,0x32,0x32,0x32,0x33,0x32,0x33,0x33,0x36,0x33,0x36,0x36,0x37,0x36,0x37,
07=0x32,0x32,0x32,0x32,0x32,0x33,0x32,0x33,0x33,0x36,0x33,0x36,0x36,0x37,0x36,0x37,
08=0x32,0x32,0x32,0x32,0x32,0x33,0x32,0x33,0x33,0x36,0x33,0x36,0x36,0x37,0x36,0x37,
09=0x32,0x32,0x32,0x32,0x32,0x33,0x32,0x33,0x33,0x36,0x33,0x36,0x36,0x37,0x36,0x37,
10=0x32,0x32,0x32,0x32,0x32,0x33,0x32,0x33,0x33,0x36,0x33,0x36,0x36,0x37,0x36,0x37,
11=0x32,0x32,0x32,0x32,0x32,0x33,0x32,0x33,0x33,0x36,0x33,0x36,0x36,0x37,0x36,0x37,
12=0x32,0x32,0x32,0x32,0x32,0x33,0x32,0x33,0x33,0x36,0x33,0x36,0x36,0x37,0x36,0x37,
13=0x32,0x32,0x32,0x32,0x32,0x33,0x32,0x33,0x33,0x36,0x33,0x36,0x36,0x37,0x36,0x37,
14=0x32,0x32,0x32,0x32,0x32,0x33,0x32,0x33,0x33,0x36,0x33,0x36,0x36,0x37,0x36,0x37,
15=0x32,0x32,0x32,0x32,0x32,0x33,0x32,0x33,0x33,0x36,0x33,0x36,0x36,0x37,0x36,0x37,
16=0x32,0x32,0x32,0x32,0x32,0x33,0x32,0x33,0x33,0x36,0x33,0x36,0x36,0x37,0x36,0x37,
17=0x32,0x32,0x32,0x32,0x32,0x33,0x32,0x33,0x33,0x36,0x33,0x36,0x36,0x37,0x36,0x37,
18=0x33,0x33,0x36,0x33,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x37,0x36,0x37,0x37,0x37,
19=0x36,0x36,0x36,0x37,0x36,0x37,0x36,0x37,0x36,0x37,0x37,0x37,0x37,0x37,0x37,0x38,
20=0x36,0x36,0x37,0x36,0x37,0x36,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x38,0x38,
21=0x36,0x36,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x38,0x37,0x38,0x38,0x38,0x38,
22=0x37,0x37,0x37,0x37,0x37,0x38,0x37,0x38,0x37,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
23=0x37,0x37,0x37,0x37,0x38,0x37,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x35,0x35,
24=0x37,0x37,0x38,0x38,0x37,0x38,0x38,0x38,0x38,0x35,0x38,0x38,0x35,0x38,0x35,0x35,
25=0x37,0x37,0x38,0x37,0x38,0x37,0x38,0x38,0x38,0x35,0x38,0x35,0x35,0x35,0x35,0x34,
26=0x37,0x37,0x37,0x38,0x37,0x38,0x38,0x38,0x35,0x38,0x35,0x35,0x35,0x35,0x34,0x34,
27=0x37,0x37,0x38,0x38,0x38,0x38,0x35,0x38,0x35,0x38,0x35,0x35,0x35,0x34,0x35,0x34,
28=0x38,0x38,0x38,0x35,0x35,0x34,0x35,0x34,0x35,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
29=0x38,0x38,0x35,0x35,0x34,0x35,0x34,0x34,0x35,0x34,0x34,0x35,0x34,0x34,0x31,0x31,
30=0x38,0x38,0x35,0x35,0x34,0x35,0x34,0x34,0x31,0x34,0x31,0x34,0x31,0x31,0x31,0x31,
31=0x38,0x38,0x35,0x35,0x34,0x35,0x34,0x31,0x34,0x31,0x31,0x31,0x31,0x31,0x31,0x31,

These values combine to let you produce pretty much any terrain you want, with any variety of textures, and control over where the textures are placed. There are other texture map tables in the file, however they are commented out. While it is possible to mod these tables, no code in the game can currently make any use of them. It is also important to note that this file alone does not make a complete terrain mod. In addition to any custom textures, the terrain is also controlled by a few exemplars that set important variables.