<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.swganh.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Powerking</id>
		<title>SWGANH Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.swganh.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Powerking"/>
		<link rel="alternate" type="text/html" href="https://wiki.swganh.org/index.php/Special:Contributions/Powerking"/>
		<updated>2026-05-14T04:54:59Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.4</generator>

	<entry>
		<id>https://wiki.swganh.org/index.php?title=TRN_(FileFormat)&amp;diff=72297</id>
		<title>TRN (FileFormat)</title>
		<link rel="alternate" type="text/html" href="https://wiki.swganh.org/index.php?title=TRN_(FileFormat)&amp;diff=72297"/>
				<updated>2010-05-24T03:18:58Z</updated>
		
		<summary type="html">&lt;p&gt;Powerking: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageHeader|FileFormat|TRN}}&lt;br /&gt;
='''&amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;File Header&amp;lt;/font&amp;gt;'''=&lt;br /&gt;
&lt;br /&gt;
The general map parameters, as well as flora parameters are defined here&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
4A 3A 5C 73 77 67 5C 63 75 72 72 65 6E 74 5C 64 61 74 61 5C 	J..swg.current.data.&lt;br /&gt;
73 6B 75 2E 30 5C 73 79 73 2E 73 68 61 72 65 64 5C 62 75 69 	sku.0.sys.shared.bui&lt;br /&gt;
6C 74 5C 67 61 6D 65 5C 74 65 72 72 61 69 6E 5C 64 61 6E 74 	lt.game.terrain.dant&lt;br /&gt;
6F 6F 69 6E 65 2E 74 72 6E 00 00 00 80 46 00 00 00 41 02 00 	ooine.trn....F...A..&lt;br /&gt;
00 00 01 00 00 00 CD CC CC BD 00 00 00 40 77 74 65 72 5F 64 	..............wter.d&lt;br /&gt;
61 6E 74 5F 6C 61 6B 65 00 00 30 04 46 00 00 00 00 00 00 00 	ant.lake..0.F.......&lt;br /&gt;
43 00 00 00 41 00 00 00 40 00 00 00 00 00 00 00 00 00 00 80 	C...A...............&lt;br /&gt;
42 00 00 80 40 00 00 00 3F 00 00 00 00 00 00 00 00 00 00 F0 	B...................&lt;br /&gt;
41 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 43 00 00 00 	A...............C...&lt;br /&gt;
44 00 00 00 42 00 00 00 41 00 00 00 00 	                        D...B...A....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
='''&amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;TGEN&amp;lt;/font&amp;gt;''' - Terrain Generator =&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The rules in the terrain generation system are also referred to as affectors,and&lt;br /&gt;
are organized into layers. Boundaries refer to terrain designer- or artist-defined&lt;br /&gt;
regions of virtual terrain for which the desired rules have effect. Filters refer &lt;br /&gt;
to conditions to be considered when applying affectors. Layers can be arranged &lt;br /&gt;
in a hierarchy with a parent-child or tree-leaf relationship. Examples of boundaries &lt;br /&gt;
include circles, rectangles, and polygons. Examples of filters include filtering &lt;br /&gt;
by slope, height, shader, direction and fractal. Examples of affectors include &lt;br /&gt;
those that affect height, color, shader, flora, and radial flora. Boundaries, filters &lt;br /&gt;
and layers are described in greater detail below.&lt;br /&gt;
&lt;br /&gt;
The terrain generation system also includes families, which refer to groups of &lt;br /&gt;
assets such as textures, geometry or even algorithms. Families can include children &lt;br /&gt;
with weights. This could involve choosing an asset by selecting a one weighted child. &lt;br /&gt;
For example, this could allow the users to choose a &amp;quot;grass&amp;quot; family for a region, but &lt;br /&gt;
when the terrain system generates the grass family, it can choose one of the children &lt;br /&gt;
of the grass family, which results in the rendering of a single grass shader.&lt;br /&gt;
&lt;br /&gt;
Examples of families include shader families, blend families, flora families, &lt;br /&gt;
radial flora families, and fractal families. Shader families refer to grouping &lt;br /&gt;
shaders for placing textures. Blend families refer to grouping shaders for selecting &lt;br /&gt;
alpha blend masks. Flora families refer to grouping geometry for selecting flora. &lt;br /&gt;
Radial flora families refer to grouping shaders for placing radial flora. &lt;br /&gt;
Fractal families refer to grouping fractals for reuse within different rules.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Terrain generator (form name : TGEN)&lt;br /&gt;
There are 6 different sections.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- The Shader family          (SGRP)&lt;br /&gt;
- The Flora family           (FRGP)&lt;br /&gt;
- The Radial Flora family    (RGRP)&lt;br /&gt;
- The Environment family     (EGRP)&lt;br /&gt;
- The Fractal family         (MGRP)&lt;br /&gt;
- The Layers family          (LYRS)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;SGRP&amp;lt;/font&amp;gt;''' - Shader Family Group==&lt;br /&gt;
&lt;br /&gt;
Shader families refer to grouping shaders for placing textures&lt;br /&gt;
&lt;br /&gt;
It's sub-divied into multiple surface families (SFAM).&lt;br /&gt;
&lt;br /&gt;
Each one of them declare mutliple shaders using a surface file. &lt;br /&gt;
&lt;br /&gt;
SGRP has x children (SFAM), SFAM has x children (Shaders)&lt;br /&gt;
&lt;br /&gt;
'''Family break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
53 46 41 4D 00 00 00 55 22 00 00 00 73 6E 6F 77 5F 6D 74 6E 	SFAM...U....snow.mtn&lt;br /&gt;
73 70 65 61 6B 00 61 62 73 74 72 61 63 74 2F 74 65 72 72 61 	speak.abstract.terra&lt;br /&gt;
69 6E 5F 73 75 72 66 61 63 65 2F 73 6E 6F 77 2E 69 66 66 00 	in.surface.snow.iff.&lt;br /&gt;
FF FF 00 00 00 00 40 00 00 80 3F 01 00 00 00 	                ...............&lt;br /&gt;
&lt;br /&gt;
(int)              Family ID   (This ID is user by the layers to select this family)&lt;br /&gt;
(String)           File Name&lt;br /&gt;
(byte)(byte)(byte) unk  ?Color?&lt;br /&gt;
(float)            unk&lt;br /&gt;
(float)            unk&lt;br /&gt;
(int)              Child Count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
73 6E 6F 77 5F 6D 74 6E 73 70 65 61 6B 00 00 00 80 3F 	       snow.mtnspeak.....&lt;br /&gt;
&lt;br /&gt;
(string)           Shader Name&lt;br /&gt;
(float)            unk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;FGRP&amp;lt;/font&amp;gt;''' - Flora Family Group==   &lt;br /&gt;
&lt;br /&gt;
Flora families refer to grouping geometry -apt files- for selecting flora. (Select flora group properties, including flora family data)&lt;br /&gt;
&lt;br /&gt;
Each one of them decalre one flora group using  multiple appearance files.&lt;br /&gt;
&lt;br /&gt;
FGRP has x children (FFAM), FFAM has x children (Appearance Files)&lt;br /&gt;
&lt;br /&gt;
'''Family break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
46 46 41 4D 00 00 00 9D 01 00 00 00 66 65 72 6E 73 00 FF 80 	FFAM........ferns...&lt;br /&gt;
40 00 00 80 3F 00 00 00 00 02 00 00 00 	                        .............&lt;br /&gt;
&lt;br /&gt;
(int)              Family ID   (This ID is user by the layers to select this family)&lt;br /&gt;
(String)           Family Name&lt;br /&gt;
(byte)(byte)(byte) ukn  ?Color?&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              Child Count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
70 74 63 68 5F 65 6E 64 72 5F 66 72 73 74 5F 63 6C 75 73 74 	ptch.endr.frst.clust&lt;br /&gt;
65 72 5F 61 31 2E 61 70 74 00 00 00 80 3F 00 00 00 00 0A D7 	er.a1.apt...........&lt;br /&gt;
23 3C CD CC CC 3D 01 00 00 00 01 00 00 00 00 00 40 3F 00 00 	....................&lt;br /&gt;
20 40 	                                                        ..&lt;br /&gt;
&lt;br /&gt;
(String)           Appearance File Name &lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;RGRP&amp;lt;/font&amp;gt;''' - Radial Flora Family Group==   &lt;br /&gt;
Radial flora families refer to grouping shaders for placing radial flora. &lt;br /&gt;
&lt;br /&gt;
'''Family break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
52 46 41 4D 00 00 01 06 01 00 00 00 67 72 61 73 73 79 20 70 	RFAM........grassy.p&lt;br /&gt;
6C 61 69 6E 73 00 FF FF 00 00 00 80 3F 04 00 00 00 	        lains............&lt;br /&gt;
&lt;br /&gt;
(int)              Family ID   (This ID is user by the layers to select this family)&lt;br /&gt;
(String)           Family Name&lt;br /&gt;
(byte)(byte)(byte) ukn  ?Color?&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              Child Count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(String)           Shader Name (dds file)&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(?)                ukn&lt;br /&gt;
TODO..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;EGRP&amp;lt;/font&amp;gt;''' - Environment Family Group==  &lt;br /&gt;
                                &lt;br /&gt;
Declares the environement&lt;br /&gt;
&lt;br /&gt;
EGRP has x children (EFAM)&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
01 00 00 00 6D 61 69 6E 5F 62 61 73 65 00 FF FF 00 00 00 80 3F  	....main.base........&lt;br /&gt;
	&lt;br /&gt;
(int)                 Environment ID   (This ID is user by the layers to select this environment)&lt;br /&gt;
(String)              Environment Name                                                    &lt;br /&gt;
(byte)(byte)(byte)    ukn ?Color?&lt;br /&gt;
(float)               ukn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;MGRP&amp;lt;/font&amp;gt;''' - Fractal Family Group==  &lt;br /&gt;
&lt;br /&gt;
Fractal families refer to grouping fractals for reuse within different rules.&lt;br /&gt;
It's sub-divied into multiple groups (MFAM).&lt;br /&gt;
Each one of them declare a labelled fractal. &lt;br /&gt;
&lt;br /&gt;
MGRP has x children (MFAM)&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
4D 46 41 4D 44 41 54 41 00 00 00 1C 01 00 00 00 41 66 66 65 	MFAMDATA........Affe&lt;br /&gt;
63 74 6F 72 48 65 69 67 68 74 46 72 61 63 74 61 6C 5F 31 00 	ctorHeightFractal.1.&lt;br /&gt;
46 4F 52 4D 00 00 00 4C 4D 46 52 43 46 4F 52 4D 00 00 00 40 	FORM...LMFRCFORM....&lt;br /&gt;
30 30 30 31 44 41 54 41 00 00 00 34 00 00 00 00 00 00 00 00 	0001DATA...4........&lt;br /&gt;
00 00 00 3F 00 00 00 00 33 33 33 3F 02 00 00 00 00 00 80 40 	........333.........&lt;br /&gt;
00 00 00 3F 0A D7 23 3C 0A D7 23 3C 00 00 00 00 00 00 00 00 	....................&lt;br /&gt;
00 00 00 00 	&lt;br /&gt;
&lt;br /&gt;
(int)          Fractal ID (This ID is user by the layers to select this family)&lt;br /&gt;
(String)       Fractal Label&lt;br /&gt;
&lt;br /&gt;
MFRC FORM [...] DATA, byte count&lt;br /&gt;
&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(?)            ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;LYRS&amp;lt;/font&amp;gt;''' - Layers==&lt;br /&gt;
&lt;br /&gt;
=== Layers &amp;amp; Affectors ===&lt;br /&gt;
&lt;br /&gt;
Basically the role of layers is to affect the data contained in the different families.&lt;br /&gt;
They can contain any number of other sub-layers. Their order is important.&lt;br /&gt;
&lt;br /&gt;
[[Image:trn_layers.jpg]]&lt;br /&gt;
&lt;br /&gt;
A layer deals with the families trough Affectors. There are different types of them, each one has it's own role.&lt;br /&gt;
Can have Affector for texturing, flora,  areas...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Boundaries, filters, and affectors can be defined in layers and sublayers,&lt;br /&gt;
such that a single location in the terrain can have multiple terrain rules.&lt;br /&gt;
A layer without boundaries (or filters) is &amp;quot;unbounded,&amp;quot; and can affect as much&lt;br /&gt;
as the entire landscape. A layer with a boundary allows the affectors in the&lt;br /&gt;
layer and sublayers to be applied to the region specified by the boundary.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Affectors'''==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
46 4F 52 4D 00 00 00 70 41 46 53 43 46 4F 52 4D 00 00 00 64 	FORM...pAFSCFORM...d&lt;br /&gt;
30 30 30 34 46 4F 52 4D 00 00 00 3C 49 48 44 52 46 4F 52 4D 	0004FORM....IHDRFORM&lt;br /&gt;
00 00 00 30 30 30 30 31 44 41 54 41 00 00 00 24 01 00 00 00 	...00001DATA........&lt;br /&gt;
41 66 66 65 63 74 6F 72 46 6C 6F 72 61 43 6F 6C 6C 69 64 61 	AffectorFloraCollida&lt;br /&gt;
62 6C 65 43 6F 6E 73 74 61 6E 74 00 44 41 54 41 00 00 00 14 	bleConstant.DATA....&lt;br /&gt;
05 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 80 3F 	....................&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Every Affector has an IHDR child wich is holding the user-custom name of the affector (here AffectorFloraCollidableConstant).&lt;br /&gt;
&lt;br /&gt;
The 4 bytes Before the name is a Bool wich enable/disable the affector.&lt;br /&gt;
&lt;br /&gt;
The affector-specific data is conatined After the IHDR in the last DATA form, it always starts with a byte counter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+ '''Boundaries'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BREC&amp;lt;/font&amp;gt;'''||Boundary Rectangle||Delimits a rectangle using 4 float: X1, Y1, X2, Y2 (Select rectangle boundary rule properties, including feathering distance, boundary left/right and near/far coords and local water table height, shader and sahder size.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 00 7A 44 00 00 7A 44 00 00 AF 44 &lt;br /&gt;
00 00 AF 44 00 00 00 00 00 00 80 3F &lt;br /&gt;
&lt;br /&gt;
(float)   X1&lt;br /&gt;
(float)   Y1&lt;br /&gt;
(float)   X2&lt;br /&gt;
(float)   Y2&lt;br /&gt;
(int)     Feathering Type&lt;br /&gt;
(float)   Feathering Amount&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BCIR&amp;lt;/font&amp;gt;'''||Boundary Circle||Delimits a circle using 3 float: Xo, Yo, Radius  (Select circle boundary rule properties, including feathering distance, boundary center coords, and boundary radius.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 00 48 43 00 00 48 43 00 00 48 43 &lt;br /&gt;
01 00 00 00 CD CC CC 3D &lt;br /&gt;
&lt;br /&gt;
(float)   X&lt;br /&gt;
(float)   Y&lt;br /&gt;
(float)   Radius&lt;br /&gt;
(int)     Feathering Type&lt;br /&gt;
(float)   Feathering Amount&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BPOL&amp;lt;/font&amp;gt;'''||Boundary Polygon||Delimits a n-sided closed polygon area using 2 floats (Xo,Yo) for each point.  (Select polygon boundary rule properties, includibng feathering distance  and including local water table height, shader and shader size.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Water Area example&lt;br /&gt;
&lt;br /&gt;
04 00 00 00 00 00 00 00 00 00 00 00 00 00 15 C3 00 00 00 00 	....................&lt;br /&gt;
00 00 15 C3 00 00 15 C3 00 00 00 00 00 00 15 C3 03 00 00 00 	....................&lt;br /&gt;
00 00 48 42 01 00 00 00 00 00 20 C1 00 00 00 40 77 74 65 72 	..HB............wter&lt;br /&gt;
5F 73 70 65 63 00 	                                        .spec.&lt;br /&gt;
&lt;br /&gt;
(int)    Point Count&lt;br /&gt;
&lt;br /&gt;
- List -----------&lt;br /&gt;
(float)  X&lt;br /&gt;
(float)  Y&lt;br /&gt;
------------------&lt;br /&gt;
&lt;br /&gt;
(int)    Fethering Type&lt;br /&gt;
(float)  Shore smoothness  (0 is vertical, 50 looks normal. I don't know what scale mesurement is used) &lt;br /&gt;
(int)    Bool Water On/Off&lt;br /&gt;
(float)  Water Height&lt;br /&gt;
(float)  Water Shader Size (Common size = 2)&lt;br /&gt;
(string) Water Shader  (wter_spec = Look in the file header??)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BPLN&amp;lt;/font&amp;gt;'''||Boundary PolyLine||Delimits a n-sided line area using 2 floats (Xo,Yo) for each point and a float for the width.  (Select polyline boundary rule properties, including feathering distance and width.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
08 00 00 00 00 00 80 3E 00 00 00 3F 00 00 00 00 00 00 74 41 &lt;br /&gt;
00 00 0C C1 00 00 E8 41 00 00 0C C1 00 00 50 42 00 00 78 C1 &lt;br /&gt;
00 80 85 42 00 00 D8 C1 00 80 91 42 00 00 12 C2 00 00 93 42 &lt;br /&gt;
00 00 41 C2 00 00 94 42 01 00 00 00 00 00 80 3F 00 00 20 41 &lt;br /&gt;
&lt;br /&gt;
(int)    Point Count&lt;br /&gt;
&lt;br /&gt;
- List -----------&lt;br /&gt;
(float)  X&lt;br /&gt;
(float)  Y&lt;br /&gt;
------------------&lt;br /&gt;
&lt;br /&gt;
(int)     Feathering Type&lt;br /&gt;
(float)   Feathering Amount&lt;br /&gt;
(float)   Line Width&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: '''Boundaries can have a special footer allowing them to behave as a water area.'''(TODO)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+ '''Filters'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FDIR&amp;lt;/font&amp;gt;'''||Filter Direction||Select filter direction rule properties, including feathering distance, and min and max angle settings for filter setting to have effect.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FFRA&amp;lt;/font&amp;gt;'''||Filter Fractal||Delimits an area generated by a 2d fractal on the ground.  (Select filter fractal rule properties incuding fractal family, low and high fractal settings and feathering distance.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FHGT&amp;lt;/font&amp;gt;'''||Filter Height||Select filter height rule properties, including feathering, distance, filter low height, and filter high height.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FSLP&amp;lt;/font&amp;gt;'''||Filter Slope||Select filter slope rule properties, including feathering distance, filter min angle, and filter max angle.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 00 00 00 00 00 C8 41 01 00 00 00 CD CC 8C &lt;br /&gt;
          &lt;br /&gt;
(float)   Minimum Angle&lt;br /&gt;
(float)   Maximum Angle&lt;br /&gt;
(int)     Type?&lt;br /&gt;
(byte)    ?&lt;br /&gt;
(byte)    ?&lt;br /&gt;
(byte)    ?&lt;br /&gt;
Note the 3 last bytes may be a color.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Texture / Shaders Affectors'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ASCN&amp;lt;/font&amp;gt;'''||Affector Shader Constant||Affect a shader using the family_id and the shader_id this family. (Select rule shader and family and feathering parameters.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ASRP&amp;lt;/font&amp;gt;'''||Affector Shader Replace||Replace a shader with another shader (Select rule shader replace families, including source family (the family to be replaced), destination family (the family to replace with), and feathering parameters.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ACCN&amp;lt;/font&amp;gt;'''||Affector Color Constant||Select color for rule.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FSHD&amp;lt;/font&amp;gt;'''||Filter Shader||Select filter shader rule properties, including shader family.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Terrain Affectors'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AHCN&amp;lt;/font&amp;gt;'''||Affector Height Constant||Raises or lowers the ground using float for delta and float(scalar?) for slope-smooting. (Select terrain height value for rule.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
01 00 00 00 00 00 C8 C2 &lt;br /&gt;
&lt;br /&gt;
(int)     ukn&lt;br /&gt;
(float)   Final Height&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AHFR&amp;lt;/font&amp;gt;'''||Affector Height Fractal||Raises or lowers the ground irregulary using a fractal type from the Fractal Family. Float for delta and float(scalar?) (Select terrain height value for rule for fractal family.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
50 41 52 4D 00 00 00 0C 02 00 00 00 00 00 00 00 00 00 48 C2 &lt;br /&gt;
          &lt;br /&gt;
(String)  PARAM&lt;br /&gt;
(int)     Byte Count&lt;br /&gt;
(int)     Index of a Fractal Family in MGRP -non regular-&lt;br /&gt;
(?) ukn&lt;br /&gt;
(float)   Height Delta, can be negative&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AHTR&amp;lt;/font&amp;gt;'''||Affector Height Terrace||Select terrace height and flat ratio values for rule.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Flora Affectors'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFSC&amp;lt;/font&amp;gt;'''||Affector Flora Static Collidable||Sets the amount of collidable flora. (Select to add/remove flora, specify flora type and set flora density for static collidable flora.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
05 00 00 00 01 00 00 00 00 00 00 00&lt;br /&gt;
01 00 00 00 00 00 80 3F&lt;br /&gt;
&lt;br /&gt;
(int)   Index of a family in FGRP -not regular-&lt;br /&gt;
(int)   ukn&lt;br /&gt;
(?)     ukn&lt;br /&gt;
(int)   ukn&lt;br /&gt;
(float) Feathering&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFSN&amp;lt;/font&amp;gt;'''||Affector Flora Static Non-Collidable||Sets the amount of Non-collidable flora. (Select to add/remove flora, specify flora type and set flora density for static non-collidable flora.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFDN&amp;lt;/font&amp;gt;'''||Affector Flora Dynamic Near||I don't know much about those yet. Seems like they change the near/far radial displaying. They're often coupled to the flora affectors, for instance when cleaning an area for a city.  (Select to add/remove flora, specify flora type and set flora destiny for dynamic near flora.)&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFDF&amp;lt;/font&amp;gt;'''||Affector Flora Dynamic Far|| (Select to add/remove flora, specify flora type and set flora density for dynamic far flora.)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Unknown'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AENV&amp;lt;/font&amp;gt;'''||Environment||Select enviroment group rule properties.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AEXC&amp;lt;/font&amp;gt;'''||Affector Exclude||This one shows up on the Patent App.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AROA&amp;lt;/font&amp;gt;'''||Affector Road||Select road rule properties, including width, shader, feathering height distance, and feathering shader distance.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ARIV&amp;lt;/font&amp;gt;'''||Affector River||Select river rule properties, including width, trench depth, flow velocity, bank and bottom shaders, water shader, water depth, water width, feathering distance.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ACRF&amp;lt;/font&amp;gt;'''||Affector Color Ramp Fractal||Select rule family and color ramp.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ACRH&amp;lt;/font&amp;gt;'''||Affector Color Ramp Height||Select rule color ramp and height low/high values.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Layer&lt;br /&gt;
&lt;br /&gt;
    a. AffectorHeightConstant, 10&lt;br /&gt;
&lt;br /&gt;
    b. AffectorShaderConstant, Rock&lt;br /&gt;
&lt;br /&gt;
2. Layer&lt;br /&gt;
&lt;br /&gt;
    a. BoundaryCircle, x=500, y=500, r=500, feather=InOut&lt;br /&gt;
&lt;br /&gt;
    b. AffectorHeightConstant, 0&lt;br /&gt;
&lt;br /&gt;
    c. AffectorShaderConstant, Mud&lt;br /&gt;
&lt;br /&gt;
    d. Layer&lt;br /&gt;
&lt;br /&gt;
        i. FilterHeightmin=13,max=17&lt;br /&gt;
&lt;br /&gt;
        ii. AffectorColorConstant, BLACK&lt;br /&gt;
&lt;br /&gt;
3. Layer&lt;br /&gt;
&lt;br /&gt;
    a. BoundaryRectangle, min=-500, -500, max=500, 500&lt;br /&gt;
&lt;br /&gt;
    b. AffectorFloraStaticCollidableConstant, Conifer&lt;br /&gt;
&lt;br /&gt;
    c. AffectorFloraDynamicNearConstant, Dead grass&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Description'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Using the example rules listed above, the corresponding rule &lt;br /&gt;
description can perform the following:&lt;br /&gt;
&lt;br /&gt;
1. Set the height of the terrain everywhere to 10 meters(1a) and assign the rock shader(1b). &lt;br /&gt;
&lt;br /&gt;
2. Then, in a 500 meter circle(2a) originating from coordinates (500, 500),&lt;br /&gt;
gradually decrease the height from 10 meters to 0 meters(2b), place the mud shader(2c),&lt;br /&gt;
and create a black band where the height of the terrain at a given sample point is between 13 and 17 meters.(2d, 2di, 2dii) &lt;br /&gt;
&lt;br /&gt;
3. Finally, in a rectangle(3a) from coordinates (-500, -500) to (500, 500), place &lt;br /&gt;
conifer trees(3b) and dead grass(3c) within the rectangle.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Powerking</name></author>	</entry>

	<entry>
		<id>https://wiki.swganh.org/index.php?title=TRN_(FileFormat)&amp;diff=72294</id>
		<title>TRN (FileFormat)</title>
		<link rel="alternate" type="text/html" href="https://wiki.swganh.org/index.php?title=TRN_(FileFormat)&amp;diff=72294"/>
				<updated>2010-05-23T05:46:11Z</updated>
		
		<summary type="html">&lt;p&gt;Powerking: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageHeader|FileFormat|TRN}}&lt;br /&gt;
='''&amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;File Header&amp;lt;/font&amp;gt;'''=&lt;br /&gt;
&lt;br /&gt;
The general map parameters, as well as flora parameters are defined here&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
4A 3A 5C 73 77 67 5C 63 75 72 72 65 6E 74 5C 64 61 74 61 5C 	J..swg.current.data.&lt;br /&gt;
73 6B 75 2E 30 5C 73 79 73 2E 73 68 61 72 65 64 5C 62 75 69 	sku.0.sys.shared.bui&lt;br /&gt;
6C 74 5C 67 61 6D 65 5C 74 65 72 72 61 69 6E 5C 64 61 6E 74 	lt.game.terrain.dant&lt;br /&gt;
6F 6F 69 6E 65 2E 74 72 6E 00 00 00 80 46 00 00 00 41 02 00 	ooine.trn....F...A..&lt;br /&gt;
00 00 01 00 00 00 CD CC CC BD 00 00 00 40 77 74 65 72 5F 64 	..............wter.d&lt;br /&gt;
61 6E 74 5F 6C 61 6B 65 00 00 30 04 46 00 00 00 00 00 00 00 	ant.lake..0.F.......&lt;br /&gt;
43 00 00 00 41 00 00 00 40 00 00 00 00 00 00 00 00 00 00 80 	C...A...............&lt;br /&gt;
42 00 00 80 40 00 00 00 3F 00 00 00 00 00 00 00 00 00 00 F0 	B...................&lt;br /&gt;
41 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 43 00 00 00 	A...............C...&lt;br /&gt;
44 00 00 00 42 00 00 00 41 00 00 00 00 	                        D...B...A....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
='''&amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;TGEN&amp;lt;/font&amp;gt;''' - Terrain Generator =&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The rules in the terrain generation system are also referred to as affectors,and&lt;br /&gt;
are organized into layers. Boundaries refer to terrain designer- or artist-defined&lt;br /&gt;
regions of virtual terrain for which the desired rules have effect. Filters refer &lt;br /&gt;
to conditions to be considered when applying affectors. Layers can be arranged &lt;br /&gt;
in a hierarchy with a parent-child or tree-leaf relationship. Examples of boundaries &lt;br /&gt;
include circles, rectangles, and polygons. Examples of filters include filtering &lt;br /&gt;
by slope, height, shader, direction and fractal. Examples of affectors include &lt;br /&gt;
those that affect height, color, shader, flora, and radial flora. Boundaries, filters &lt;br /&gt;
and layers are described in greater detail below.&lt;br /&gt;
&lt;br /&gt;
The terrain generation system also includes families, which refer to groups of &lt;br /&gt;
assets such as textures, geometry or even algorithms. Families can include children &lt;br /&gt;
with weights. This could involve choosing an asset by selecting a one weighted child. &lt;br /&gt;
For example, this could allow the users to choose a &amp;quot;grass&amp;quot; family for a region, but &lt;br /&gt;
when the terrain system generates the grass family, it can choose one of the children &lt;br /&gt;
of the grass family, which results in the rendering of a single grass shader.&lt;br /&gt;
&lt;br /&gt;
Examples of families include shader families, blend families, flora families, &lt;br /&gt;
radial flora families, and fractal families. Shader families refer to grouping &lt;br /&gt;
shaders for placing textures. Blend families refer to grouping shaders for selecting &lt;br /&gt;
alpha blend masks. Flora families refer to grouping geometry for selecting flora. &lt;br /&gt;
Radial flora families refer to grouping shaders for placing radial flora. &lt;br /&gt;
Fractal families refer to grouping fractals for reuse within different rules.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Terrain generator (form name : TGEN)&lt;br /&gt;
There are 6 different sections.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- The Shader family          (SGRP)&lt;br /&gt;
- The Flora family           (FRGP)&lt;br /&gt;
- The Radial Flora family    (RGRP)&lt;br /&gt;
- The Environment family     (EGRP)&lt;br /&gt;
- The Fractal family         (MGRP)&lt;br /&gt;
- The Layers family          (LYRS)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;SGRP&amp;lt;/font&amp;gt;''' - Shader Family Group==&lt;br /&gt;
&lt;br /&gt;
Shader families refer to grouping shaders for placing textures&lt;br /&gt;
&lt;br /&gt;
It's sub-divied into multiple surface families (SFAM).&lt;br /&gt;
&lt;br /&gt;
Each one of them declare mutliple shaders using a surface file. &lt;br /&gt;
&lt;br /&gt;
SGRP has x children (SFAM), SFAM has x children (Shaders)&lt;br /&gt;
&lt;br /&gt;
'''Family break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
53 46 41 4D 00 00 00 55 22 00 00 00 73 6E 6F 77 5F 6D 74 6E 	SFAM...U....snow.mtn&lt;br /&gt;
73 70 65 61 6B 00 61 62 73 74 72 61 63 74 2F 74 65 72 72 61 	speak.abstract.terra&lt;br /&gt;
69 6E 5F 73 75 72 66 61 63 65 2F 73 6E 6F 77 2E 69 66 66 00 	in.surface.snow.iff.&lt;br /&gt;
FF FF 00 00 00 00 40 00 00 80 3F 01 00 00 00 	                ...............&lt;br /&gt;
&lt;br /&gt;
(int)              Family ID   (This ID is user by the layers to select this family)&lt;br /&gt;
(String)           File Name&lt;br /&gt;
(byte)(byte)(byte) unk  ?Color?&lt;br /&gt;
(float)            unk&lt;br /&gt;
(float)            unk&lt;br /&gt;
(int)              Child Count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
73 6E 6F 77 5F 6D 74 6E 73 70 65 61 6B 00 00 00 80 3F 	       snow.mtnspeak.....&lt;br /&gt;
&lt;br /&gt;
(string)           Shader Name&lt;br /&gt;
(float)            unk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;FGRP&amp;lt;/font&amp;gt;''' - Flora Family Group==   &lt;br /&gt;
&lt;br /&gt;
Flora families refer to grouping geometry -apt files- for selecting flora. (Select flora group properties, including flora family data)&lt;br /&gt;
&lt;br /&gt;
Each one of them decalre one flora group using  multiple appearance files.&lt;br /&gt;
&lt;br /&gt;
FGRP has x children (FFAM), FFAM has x children (Appearance Files)&lt;br /&gt;
&lt;br /&gt;
'''Family break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
46 46 41 4D 00 00 00 9D 01 00 00 00 66 65 72 6E 73 00 FF 80 	FFAM........ferns...&lt;br /&gt;
40 00 00 80 3F 00 00 00 00 02 00 00 00 	                        .............&lt;br /&gt;
&lt;br /&gt;
(int)              Family ID   (This ID is user by the layers to select this family)&lt;br /&gt;
(String)           Family Name&lt;br /&gt;
(byte)(byte)(byte) ukn  ?Color?&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              Child Count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
70 74 63 68 5F 65 6E 64 72 5F 66 72 73 74 5F 63 6C 75 73 74 	ptch.endr.frst.clust&lt;br /&gt;
65 72 5F 61 31 2E 61 70 74 00 00 00 80 3F 00 00 00 00 0A D7 	er.a1.apt...........&lt;br /&gt;
23 3C CD CC CC 3D 01 00 00 00 01 00 00 00 00 00 40 3F 00 00 	....................&lt;br /&gt;
20 40 	                                                        ..&lt;br /&gt;
&lt;br /&gt;
(String)           Appearance File Name &lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;RGRP&amp;lt;/font&amp;gt;''' - Radial Flora Family Group==   &lt;br /&gt;
Radial flora families refer to grouping shaders for placing radial flora. &lt;br /&gt;
&lt;br /&gt;
'''Family break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
52 46 41 4D 00 00 01 06 01 00 00 00 67 72 61 73 73 79 20 70 	RFAM........grassy.p&lt;br /&gt;
6C 61 69 6E 73 00 FF FF 00 00 00 80 3F 04 00 00 00 	        lains............&lt;br /&gt;
&lt;br /&gt;
(int)              Family ID   (This ID is user by the layers to select this family)&lt;br /&gt;
(String)           Family Name&lt;br /&gt;
(byte)(byte)(byte) ukn  ?Color?&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              Child Count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(String)           Shader Name (dds file)&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(?)                ukn&lt;br /&gt;
TODO..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;EGRP&amp;lt;/font&amp;gt;''' - Environment Family Group==  &lt;br /&gt;
                                &lt;br /&gt;
Declares the environement&lt;br /&gt;
&lt;br /&gt;
EGRP has x children (EFAM)&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
01 00 00 00 6D 61 69 6E 5F 62 61 73 65 00 FF FF 00 00 00 80 3F  	....main.base........&lt;br /&gt;
	&lt;br /&gt;
(int)                 Environment ID   (This ID is user by the layers to select this environment)&lt;br /&gt;
(String)              Environment Name                                                    &lt;br /&gt;
(byte)(byte)(byte)    ukn ?Color?&lt;br /&gt;
(float)               ukn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;MGRP&amp;lt;/font&amp;gt;''' - Fractal Family Group==  &lt;br /&gt;
&lt;br /&gt;
Fractal families refer to grouping fractals for reuse within different rules.&lt;br /&gt;
It's sub-divied into multiple groups (MFAM).&lt;br /&gt;
Each one of them declare a labelled fractal. &lt;br /&gt;
&lt;br /&gt;
MGRP has x children (MFAM)&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
4D 46 41 4D 44 41 54 41 00 00 00 1C 01 00 00 00 41 66 66 65 	MFAMDATA........Affe&lt;br /&gt;
63 74 6F 72 48 65 69 67 68 74 46 72 61 63 74 61 6C 5F 31 00 	ctorHeightFractal.1.&lt;br /&gt;
46 4F 52 4D 00 00 00 4C 4D 46 52 43 46 4F 52 4D 00 00 00 40 	FORM...LMFRCFORM....&lt;br /&gt;
30 30 30 31 44 41 54 41 00 00 00 34 00 00 00 00 00 00 00 00 	0001DATA...4........&lt;br /&gt;
00 00 00 3F 00 00 00 00 33 33 33 3F 02 00 00 00 00 00 80 40 	........333.........&lt;br /&gt;
00 00 00 3F 0A D7 23 3C 0A D7 23 3C 00 00 00 00 00 00 00 00 	....................&lt;br /&gt;
00 00 00 00 	&lt;br /&gt;
&lt;br /&gt;
(int)          Fractal ID (This ID is user by the layers to select this family)&lt;br /&gt;
(String)       Fractal Label&lt;br /&gt;
&lt;br /&gt;
MFRC FORM [...] DATA, byte count&lt;br /&gt;
&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(?)            ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;LYRS&amp;lt;/font&amp;gt;''' - Layers==&lt;br /&gt;
&lt;br /&gt;
=== Layers &amp;amp; Affectors ===&lt;br /&gt;
&lt;br /&gt;
Basically the role of layers is to affect the data contained in the different families.&lt;br /&gt;
They can contain any number of other sub-layers. Their order is important.&lt;br /&gt;
&lt;br /&gt;
[[Image:trn_layers.jpg]]&lt;br /&gt;
&lt;br /&gt;
A layer deals with the families trough Affectors. There are different types of them, each one has it's own role.&lt;br /&gt;
Can have Affector for texturing, flora,  areas...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Boundaries, filters, and affectors can be defined in layers and sublayers,&lt;br /&gt;
such that a single location in the terrain can have multiple terrain rules.&lt;br /&gt;
A layer without boundaries (or filters) is &amp;quot;unbounded,&amp;quot; and can affect as much&lt;br /&gt;
as the entire landscape. A layer with a boundary allows the affectors in the&lt;br /&gt;
layer and sublayers to be applied to the region specified by the boundary.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Affectors'''==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
46 4F 52 4D 00 00 00 70 41 46 53 43 46 4F 52 4D 00 00 00 64 	FORM...pAFSCFORM...d&lt;br /&gt;
30 30 30 34 46 4F 52 4D 00 00 00 3C 49 48 44 52 46 4F 52 4D 	0004FORM....IHDRFORM&lt;br /&gt;
00 00 00 30 30 30 30 31 44 41 54 41 00 00 00 24 01 00 00 00 	...00001DATA........&lt;br /&gt;
41 66 66 65 63 74 6F 72 46 6C 6F 72 61 43 6F 6C 6C 69 64 61 	AffectorFloraCollida&lt;br /&gt;
62 6C 65 43 6F 6E 73 74 61 6E 74 00 44 41 54 41 00 00 00 14 	bleConstant.DATA....&lt;br /&gt;
05 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 80 3F 	....................&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Every Affector has an IHDR child wich is holding the user-custom name of the affector (here AffectorFloraCollidableConstant).&lt;br /&gt;
&lt;br /&gt;
The 4 bytes Before the name is a Bool wich enable/disable the affector.&lt;br /&gt;
&lt;br /&gt;
The affector-specific data is conatined After the IHDR in the last DATA form, it always starts with a byte counter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+ '''Boundaries'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BREC&amp;lt;/font&amp;gt;'''||Boundary Rectangle||Delimits a rectangle using 4 float: X1, Y1, X2, Y2 (Select rectangle boundary rule properties, including feathering distance, boundary left/right and near/far coords and local water table height, shader and sahder size.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 00 7A 44 00 00 7A 44 00 00 AF 44 &lt;br /&gt;
00 00 AF 44 00 00 00 00 00 00 80 3F &lt;br /&gt;
&lt;br /&gt;
(float)   X1&lt;br /&gt;
(float)   Y1&lt;br /&gt;
(float)   X2&lt;br /&gt;
(float)   Y2&lt;br /&gt;
(int)     Feathering Type&lt;br /&gt;
(float)   Feathering Amount&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BCIR&amp;lt;/font&amp;gt;'''||Boundary Circle||Delimits a circle using 3 float: Xo, Yo, Radius  (Select circle boundary rule properties, including feathering distance, boundary center coords, and boundary radius.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 00 48 43 00 00 48 43 00 00 48 43 &lt;br /&gt;
01 00 00 00 CD CC CC 3D &lt;br /&gt;
&lt;br /&gt;
(float)   X&lt;br /&gt;
(float)   Y&lt;br /&gt;
(float)   Radius&lt;br /&gt;
(int)     Feathering Type&lt;br /&gt;
(float)   Feathering Amount&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BPOL&amp;lt;/font&amp;gt;'''||Boundary Polygon||Delimits a n-sided closed polygon area using 2 floats (Xo,Yo) for each point.  (Select polygon boundary rule properties, includibng feathering distance  and including local water table height, shader and shader size.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Water Area example&lt;br /&gt;
&lt;br /&gt;
04 00 00 00 00 00 00 00 00 00 00 00 00 00 15 C3 00 00 00 00 	....................&lt;br /&gt;
00 00 15 C3 00 00 15 C3 00 00 00 00 00 00 15 C3 03 00 00 00 	....................&lt;br /&gt;
00 00 48 42 01 00 00 00 00 00 20 C1 00 00 00 40 77 74 65 72 	..HB............wter&lt;br /&gt;
5F 73 70 65 63 00 	                                        .spec.&lt;br /&gt;
&lt;br /&gt;
(int)    Point Count&lt;br /&gt;
&lt;br /&gt;
- List -----------&lt;br /&gt;
(float)  X&lt;br /&gt;
(float)  Y&lt;br /&gt;
------------------&lt;br /&gt;
&lt;br /&gt;
(int)    Fethering Type&lt;br /&gt;
(float)  Shore smoothness  (0 is vertical, 50 looks normal. I don't know what scale mesurement is used) &lt;br /&gt;
(int)    Bool Water On/Off&lt;br /&gt;
(float)  Water Height&lt;br /&gt;
(float)  Water Shader Size (Common size = 2)&lt;br /&gt;
(string) Water Shader  (wter_spec = Look in the file header??)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BPLN&amp;lt;/font&amp;gt;'''||Boundary PolyLine||Delimits a n-sided line area using 2 floats (Xo,Yo) for each point and a float for the width.  (Select polyline boundary rule properties, including feathering distance and width.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
08 00 00 00 00 00 80 3E 00 00 00 3F 00 00 00 00 00 00 74 41 &lt;br /&gt;
00 00 0C C1 00 00 E8 41 00 00 0C C1 00 00 50 42 00 00 78 C1 &lt;br /&gt;
00 80 85 42 00 00 D8 C1 00 80 91 42 00 00 12 C2 00 00 93 42 &lt;br /&gt;
00 00 41 C2 00 00 94 42 01 00 00 00 00 00 80 3F 00 00 20 41 &lt;br /&gt;
&lt;br /&gt;
(int)    Point Count&lt;br /&gt;
&lt;br /&gt;
- List -----------&lt;br /&gt;
(float)  X&lt;br /&gt;
(float)  Y&lt;br /&gt;
------------------&lt;br /&gt;
&lt;br /&gt;
(int)     Feathering Type&lt;br /&gt;
(float)   Feathering Amount&lt;br /&gt;
(float)   Line Width&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: '''Boundaries can have a special footer allowing them to behave as a water area.'''(TODO)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+ '''Filters'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FDIR&amp;lt;/font&amp;gt;'''||Filter Direction||Select filter direction rule properties, including feathering distance, and min and max angle settings for filter setting to have effect.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FFRA&amp;lt;/font&amp;gt;'''||Filter Fractal||Delimits an area generated by a 2d fractal on the ground.  (Select filter fractal rule properties incuding fractal family, low and high fractal settings and feathering distance.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FHGT&amp;lt;/font&amp;gt;'''||Filter Height||Select filter height rule properties, including feathering, distance, filter low height, and filter high height.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FSLP&amp;lt;/font&amp;gt;'''||Filter Slope||Select filter slope rule properties, including feathering distance, filter min angle, and filter max angle.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 00 00 00 00 00 C8 41 01 00 00 00 CD CC 8C &lt;br /&gt;
          &lt;br /&gt;
(float)   Minimum Angle&lt;br /&gt;
(float)   Maximum Angle&lt;br /&gt;
(int)     Type?&lt;br /&gt;
(byte)    ?&lt;br /&gt;
(byte)    ?&lt;br /&gt;
(byte)    ?&lt;br /&gt;
Note the 3 last bytes may be a color.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Texture / Shaders Affectors'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ASCN&amp;lt;/font&amp;gt;'''||Affector Shader Constant||Affect a shader using the family_id and the shader_id this family. (Select rule shader and family and feathering parameters.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ASCR&amp;lt;/font&amp;gt;'''||Affector Shader Replace||Replace a shader with another shader (Select rule shader replace families, including source family (the family to be replaced), destination family (the family to replace with), and feathering parameters.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ACCN&amp;lt;/font&amp;gt;'''||Affector Color Constant||Select color for rule.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FSHD&amp;lt;/font&amp;gt;'''||Filter Shader||Select filter shader rule properties, including shader family.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Terrain Affectors'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AHCN&amp;lt;/font&amp;gt;'''||Affector Height Constant||Raises or lowers the ground using float for delta and float(scalar?) for slope-smooting. (Select terrain height value for rule.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
01 00 00 00 00 00 C8 C2 &lt;br /&gt;
&lt;br /&gt;
(int)     ukn&lt;br /&gt;
(float)   Final Height&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AHFR&amp;lt;/font&amp;gt;'''||Affector Height Fractal||Raises or lowers the ground irregulary using a fractal type from the Fractal Family. Float for delta and float(scalar?) (Select terrain height value for rule for fractal family.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
50 41 52 4D 00 00 00 0C 02 00 00 00 00 00 00 00 00 00 48 C2 &lt;br /&gt;
          &lt;br /&gt;
(String)  PARAM&lt;br /&gt;
(int)     Byte Count&lt;br /&gt;
(int)     Index of a Fractal Family in MGRP -non regular-&lt;br /&gt;
(?) ukn&lt;br /&gt;
(float)   Height Delta, can be negative&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AHTR&amp;lt;/font&amp;gt;'''||Affector Height Terrace||Select terrace height and flat ratio values for rule.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Flora Affectors'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFSC&amp;lt;/font&amp;gt;'''||Affector Flora Static Collidable||Sets the amount of collidable flora. (Select to add/remove flora, specify flora type and set flora density for static collidable flora.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
05 00 00 00 01 00 00 00 00 00 00 00&lt;br /&gt;
01 00 00 00 00 00 80 3F&lt;br /&gt;
&lt;br /&gt;
(int)   Index of a family in FGRP -not regular-&lt;br /&gt;
(int)   ukn&lt;br /&gt;
(?)     ukn&lt;br /&gt;
(int)   ukn&lt;br /&gt;
(float) Feathering&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFSN&amp;lt;/font&amp;gt;'''||Affector Flora Static Non-Collidable||Sets the amount of Non-collidable flora. (Select to add/remove flora, specify flora type and set flora density for static non-collidable flora.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFDN&amp;lt;/font&amp;gt;'''||Affector Flora Dynamic Near||I don't know much about those yet. Seems like they change the near/far radial displaying. They're often coupled to the flora affectors, for instance when cleaning an area for a city.  (Select to add/remove flora, specify flora type and set flora destiny for dynamic near flora.)&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFDF&amp;lt;/font&amp;gt;'''||Affector Flora Dynamic Far|| (Select to add/remove flora, specify flora type and set flora density for dynamic far flora.)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Unknown'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AENV&amp;lt;/font&amp;gt;'''||Environment||Select enviroment group rule properties.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AEXC&amp;lt;/font&amp;gt;'''||Affector Exclude||This one shows up on the Patent App.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AROA&amp;lt;/font&amp;gt;'''||Affector Road||Select road rule properties, including width, shader, feathering height distance, and feathering shader distance.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ARIV&amp;lt;/font&amp;gt;'''||Affector River||Select river rule properties, including width, trench depth, flow velocity, bank and bottom shaders, water shader, water depth, water width, feathering distance.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ACRF&amp;lt;/font&amp;gt;'''||Affector Color Ramp Fractal||Select rule family and color ramp.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ACRH&amp;lt;/font&amp;gt;'''||Affector Color Ramp Height||Select rule color ramp and height low/high values.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Layer&lt;br /&gt;
&lt;br /&gt;
    a. AffectorHeightConstant, 10&lt;br /&gt;
&lt;br /&gt;
    b. AffectorShaderConstant, Rock&lt;br /&gt;
&lt;br /&gt;
2. Layer&lt;br /&gt;
&lt;br /&gt;
    a. BoundaryCircle, x=500, y=500, r=500, feather=InOut&lt;br /&gt;
&lt;br /&gt;
    b. AffectorHeightConstant, 0&lt;br /&gt;
&lt;br /&gt;
    c. AffectorShaderConstant, Mud&lt;br /&gt;
&lt;br /&gt;
    d. Layer&lt;br /&gt;
&lt;br /&gt;
        i. FilterHeightmin=13,max=17&lt;br /&gt;
&lt;br /&gt;
        ii. AffectorColorConstant, BLACK&lt;br /&gt;
&lt;br /&gt;
3. Layer&lt;br /&gt;
&lt;br /&gt;
    a. BoundaryRectangle, min=-500, -500, max=500, 500&lt;br /&gt;
&lt;br /&gt;
    b. AffectorFloraStaticCollidableConstant, Conifer&lt;br /&gt;
&lt;br /&gt;
    c. AffectorFloraDynamicNearConstant, Dead grass&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Description'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Using the example rules listed above, the corresponding rule &lt;br /&gt;
description can perform the following:&lt;br /&gt;
&lt;br /&gt;
1. Set the height of the terrain everywhere to 10 meters(1a) and assign the rock shader(1b). &lt;br /&gt;
&lt;br /&gt;
2. Then, in a 500 meter circle(2a) originating from coordinates (500, 500),&lt;br /&gt;
gradually decrease the height from 10 meters to 0 meters(2b), place the mud shader(2c),&lt;br /&gt;
and create a black band where the height of the terrain at a given sample point is between 13 and 17 meters.(2d, 2di, 2dii) &lt;br /&gt;
&lt;br /&gt;
3. Finally, in a rectangle(3a) from coordinates (-500, -500) to (500, 500), place &lt;br /&gt;
conifer trees(3b) and dead grass(3c) within the rectangle.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Powerking</name></author>	</entry>

	<entry>
		<id>https://wiki.swganh.org/index.php?title=TRN_(FileFormat)&amp;diff=72287</id>
		<title>TRN (FileFormat)</title>
		<link rel="alternate" type="text/html" href="https://wiki.swganh.org/index.php?title=TRN_(FileFormat)&amp;diff=72287"/>
				<updated>2010-05-22T04:23:22Z</updated>
		
		<summary type="html">&lt;p&gt;Powerking: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageHeader|FileFormat|TRN}}&lt;br /&gt;
='''&amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;File Header&amp;lt;/font&amp;gt;'''=&lt;br /&gt;
&lt;br /&gt;
The general map parameters, as well as flora parameters are defined here&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
4A 3A 5C 73 77 67 5C 63 75 72 72 65 6E 74 5C 64 61 74 61 5C 	J..swg.current.data.&lt;br /&gt;
73 6B 75 2E 30 5C 73 79 73 2E 73 68 61 72 65 64 5C 62 75 69 	sku.0.sys.shared.bui&lt;br /&gt;
6C 74 5C 67 61 6D 65 5C 74 65 72 72 61 69 6E 5C 64 61 6E 74 	lt.game.terrain.dant&lt;br /&gt;
6F 6F 69 6E 65 2E 74 72 6E 00 00 00 80 46 00 00 00 41 02 00 	ooine.trn....F...A..&lt;br /&gt;
00 00 01 00 00 00 CD CC CC BD 00 00 00 40 77 74 65 72 5F 64 	..............wter.d&lt;br /&gt;
61 6E 74 5F 6C 61 6B 65 00 00 30 04 46 00 00 00 00 00 00 00 	ant.lake..0.F.......&lt;br /&gt;
43 00 00 00 41 00 00 00 40 00 00 00 00 00 00 00 00 00 00 80 	C...A...............&lt;br /&gt;
42 00 00 80 40 00 00 00 3F 00 00 00 00 00 00 00 00 00 00 F0 	B...................&lt;br /&gt;
41 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 43 00 00 00 	A...............C...&lt;br /&gt;
44 00 00 00 42 00 00 00 41 00 00 00 00 	                        D...B...A....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
='''&amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;TGEN&amp;lt;/font&amp;gt;''' - Terrain Generator =&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The rules in the terrain generation system are also referred to as affectors,and&lt;br /&gt;
are organized into layers. Boundaries refer to terrain designer- or artist-defined&lt;br /&gt;
regions of virtual terrain for which the desired rules have effect. Filters refer &lt;br /&gt;
to conditions to be considered when applying affectors. Layers can be arranged &lt;br /&gt;
in a hierarchy with a parent-child or tree-leaf relationship. Examples of boundaries &lt;br /&gt;
include circles, rectangles, and polygons. Examples of filters include filtering &lt;br /&gt;
by slope, height, shader, direction and fractal. Examples of affectors include &lt;br /&gt;
those that affect height, color, shader, flora, and radial flora. Boundaries, filters &lt;br /&gt;
and layers are described in greater detail below.&lt;br /&gt;
&lt;br /&gt;
The terrain generation system also includes families, which refer to groups of &lt;br /&gt;
assets such as textures, geometry or even algorithms. Families can include children &lt;br /&gt;
with weights. This could involve choosing an asset by selecting a one weighted child. &lt;br /&gt;
For example, this could allow the users to choose a &amp;quot;grass&amp;quot; family for a region, but &lt;br /&gt;
when the terrain system generates the grass family, it can choose one of the children &lt;br /&gt;
of the grass family, which results in the rendering of a single grass shader.&lt;br /&gt;
&lt;br /&gt;
Examples of families include shader families, blend families, flora families, &lt;br /&gt;
radial flora families, and fractal families. Shader families refer to grouping &lt;br /&gt;
shaders for placing textures. Blend families refer to grouping shaders for selecting &lt;br /&gt;
alpha blend masks. Flora families refer to grouping geometry for selecting flora. &lt;br /&gt;
Radial flora families refer to grouping shaders for placing radial flora. &lt;br /&gt;
Fractal families refer to grouping fractals for reuse within different rules.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Terrain generator (form name : TGEN)&lt;br /&gt;
There are 6 different sections.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- The Shader family          (SGRP)&lt;br /&gt;
- The Flora family           (FRGP)&lt;br /&gt;
- The Radial Flora family    (RGRP)&lt;br /&gt;
- The Environment family     (EGRP)&lt;br /&gt;
- The Fractal family         (MGRP)&lt;br /&gt;
- The Layers family          (LYRS)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;SGRP&amp;lt;/font&amp;gt;''' - Shader Family Group==&lt;br /&gt;
&lt;br /&gt;
Shader families refer to grouping shaders for placing textures&lt;br /&gt;
&lt;br /&gt;
It's sub-divied into multiple surface families (SFAM).&lt;br /&gt;
&lt;br /&gt;
Each one of them declare mutliple shaders using a surface file. &lt;br /&gt;
&lt;br /&gt;
SGRP has x children (SFAM), SFAM has x children (Shaders)&lt;br /&gt;
&lt;br /&gt;
'''Family break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
53 46 41 4D 00 00 00 55 22 00 00 00 73 6E 6F 77 5F 6D 74 6E 	SFAM...U....snow.mtn&lt;br /&gt;
73 70 65 61 6B 00 61 62 73 74 72 61 63 74 2F 74 65 72 72 61 	speak.abstract.terra&lt;br /&gt;
69 6E 5F 73 75 72 66 61 63 65 2F 73 6E 6F 77 2E 69 66 66 00 	in.surface.snow.iff.&lt;br /&gt;
FF FF 00 00 00 00 40 00 00 80 3F 01 00 00 00 	                ...............&lt;br /&gt;
&lt;br /&gt;
(int)              Family ID   (This ID is user by the layers to select this family)&lt;br /&gt;
(String)           File Name&lt;br /&gt;
(byte)(byte)(byte) unk  ?Color?&lt;br /&gt;
(float)            unk&lt;br /&gt;
(float)            unk&lt;br /&gt;
(int)              Child Count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
73 6E 6F 77 5F 6D 74 6E 73 70 65 61 6B 00 00 00 80 3F 	       snow.mtnspeak.....&lt;br /&gt;
&lt;br /&gt;
(string)           Shader Name&lt;br /&gt;
(float)            unk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;FGRP&amp;lt;/font&amp;gt;''' - Flora Family Group==   &lt;br /&gt;
&lt;br /&gt;
Flora families refer to grouping geometry -apt files- for selecting flora. (Select flora group properties, including flora family data)&lt;br /&gt;
&lt;br /&gt;
Each one of them decalre one flora group using  multiple appearance files.&lt;br /&gt;
&lt;br /&gt;
FGRP has x children (FFAM), FFAM has x children (Appearance Files)&lt;br /&gt;
&lt;br /&gt;
'''Family break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
46 46 41 4D 00 00 00 9D 01 00 00 00 66 65 72 6E 73 00 FF 80 	FFAM........ferns...&lt;br /&gt;
40 00 00 80 3F 00 00 00 00 02 00 00 00 	                        .............&lt;br /&gt;
&lt;br /&gt;
(int)              Family ID   (This ID is user by the layers to select this family)&lt;br /&gt;
(String)           Family Name&lt;br /&gt;
(byte)(byte)(byte) ukn  ?Color?&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              Child Count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
70 74 63 68 5F 65 6E 64 72 5F 66 72 73 74 5F 63 6C 75 73 74 	ptch.endr.frst.clust&lt;br /&gt;
65 72 5F 61 31 2E 61 70 74 00 00 00 80 3F 00 00 00 00 0A D7 	er.a1.apt...........&lt;br /&gt;
23 3C CD CC CC 3D 01 00 00 00 01 00 00 00 00 00 40 3F 00 00 	....................&lt;br /&gt;
20 40 	                                                        ..&lt;br /&gt;
&lt;br /&gt;
(String)           Appearance File Name &lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;RGRP&amp;lt;/font&amp;gt;''' - Radial Flora Family Group==   &lt;br /&gt;
Radial flora families refer to grouping shaders for placing radial flora. &lt;br /&gt;
&lt;br /&gt;
'''Family break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
52 46 41 4D 00 00 01 06 01 00 00 00 67 72 61 73 73 79 20 70 	RFAM........grassy.p&lt;br /&gt;
6C 61 69 6E 73 00 FF FF 00 00 00 80 3F 04 00 00 00 	        lains............&lt;br /&gt;
&lt;br /&gt;
(int)              Family ID   (This ID is user by the layers to select this family)&lt;br /&gt;
(String)           Family Name&lt;br /&gt;
(byte)(byte)(byte) ukn  ?Color?&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              Child Count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(String)           Shader Name (dds file)&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(?)                ukn&lt;br /&gt;
TODO..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;EGRP&amp;lt;/font&amp;gt;''' - Environment Family Group==  &lt;br /&gt;
                                &lt;br /&gt;
Declares the environement&lt;br /&gt;
&lt;br /&gt;
EGRP has x children (EFAM)&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
01 00 00 00 6D 61 69 6E 5F 62 61 73 65 00 FF FF 00 00 00 80 3F  	....main.base........&lt;br /&gt;
	&lt;br /&gt;
(int)                 Environment ID   (This ID is user by the layers to select this environment)&lt;br /&gt;
(String)              Environment Name                                                    &lt;br /&gt;
(byte)(byte)(byte)    ukn ?Color?&lt;br /&gt;
(float)               ukn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;MGRP&amp;lt;/font&amp;gt;''' - Fractal Family Group==  &lt;br /&gt;
&lt;br /&gt;
Fractal families refer to grouping fractals for reuse within different rules.&lt;br /&gt;
It's sub-divied into multiple groups (MFAM).&lt;br /&gt;
Each one of them declare a labelled fractal. &lt;br /&gt;
&lt;br /&gt;
MGRP has x children (MFAM)&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
4D 46 41 4D 44 41 54 41 00 00 00 1C 01 00 00 00 41 66 66 65 	MFAMDATA........Affe&lt;br /&gt;
63 74 6F 72 48 65 69 67 68 74 46 72 61 63 74 61 6C 5F 31 00 	ctorHeightFractal.1.&lt;br /&gt;
46 4F 52 4D 00 00 00 4C 4D 46 52 43 46 4F 52 4D 00 00 00 40 	FORM...LMFRCFORM....&lt;br /&gt;
30 30 30 31 44 41 54 41 00 00 00 34 00 00 00 00 00 00 00 00 	0001DATA...4........&lt;br /&gt;
00 00 00 3F 00 00 00 00 33 33 33 3F 02 00 00 00 00 00 80 40 	........333.........&lt;br /&gt;
00 00 00 3F 0A D7 23 3C 0A D7 23 3C 00 00 00 00 00 00 00 00 	....................&lt;br /&gt;
00 00 00 00 	&lt;br /&gt;
&lt;br /&gt;
(int)          Fractal ID (This ID is user by the layers to select this family)&lt;br /&gt;
(String)       Fractal Label&lt;br /&gt;
&lt;br /&gt;
MFRC FORM [...] DATA, byte count&lt;br /&gt;
&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(?)            ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;LYRS&amp;lt;/font&amp;gt;''' - Layers==&lt;br /&gt;
&lt;br /&gt;
=== Layers &amp;amp; Affectors ===&lt;br /&gt;
&lt;br /&gt;
Basically the role of layers is to affect the data contained in the different families.&lt;br /&gt;
They can contain any number of other sub-layers. Their order is important.&lt;br /&gt;
&lt;br /&gt;
[[Image:trn_layers.jpg]]&lt;br /&gt;
&lt;br /&gt;
A layer deals with the families trough Affectors. There are different types of them, each one has it's own role.&lt;br /&gt;
Can have Affector for texturing, flora,  areas...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Boundaries, filters, and affectors can be defined in layers and sublayers,&lt;br /&gt;
such that a single location in the terrain can have multiple terrain rules.&lt;br /&gt;
A layer without boundaries (or filters) is &amp;quot;unbounded,&amp;quot; and can affect as much&lt;br /&gt;
as the entire landscape. A layer with a boundary allows the affectors in the&lt;br /&gt;
layer and sublayers to be applied to the region specified by the boundary.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Affectors'''==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
46 4F 52 4D 00 00 00 70 41 46 53 43 46 4F 52 4D 00 00 00 64 	FORM...pAFSCFORM...d&lt;br /&gt;
30 30 30 34 46 4F 52 4D 00 00 00 3C 49 48 44 52 46 4F 52 4D 	0004FORM....IHDRFORM&lt;br /&gt;
00 00 00 30 30 30 30 31 44 41 54 41 00 00 00 24 01 00 00 00 	...00001DATA........&lt;br /&gt;
41 66 66 65 63 74 6F 72 46 6C 6F 72 61 43 6F 6C 6C 69 64 61 	AffectorFloraCollida&lt;br /&gt;
62 6C 65 43 6F 6E 73 74 61 6E 74 00 44 41 54 41 00 00 00 14 	bleConstant.DATA....&lt;br /&gt;
05 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 80 3F 	....................&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Every Affector has an IHDR child wich is holding the user-custom name of the affector (here AffectorFloraCollidableConstant).&lt;br /&gt;
&lt;br /&gt;
The 4 bytes Before the name is a Bool wich enable/disable the affector.&lt;br /&gt;
&lt;br /&gt;
The affector-specific data is conatined After the IHDR in the last DATA form, it always starts with a byte counter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+ '''Boundaries'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BREC&amp;lt;/font&amp;gt;'''||Boundary Rectangle||Delimits a rectangle using 4 float: X1, Y1, X2, Y2 (Select rectangle boundary rule properties, including feathering distance, boundary left/right and near/far coords and local water table height, shader and sahder size.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 00 7A 44 00 00 7A 44 00 00 AF 44 &lt;br /&gt;
00 00 AF 44 00 00 00 00 00 00 80 3F &lt;br /&gt;
&lt;br /&gt;
(float)   X1&lt;br /&gt;
(float)   Y1&lt;br /&gt;
(float)   X2&lt;br /&gt;
(float)   Y2&lt;br /&gt;
(int)     Feathering Type&lt;br /&gt;
(float)   Feathering Amount&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BCIR&amp;lt;/font&amp;gt;'''||Boundary Circle||Delimits a circle using 3 float: Xo, Yo, Radius  (Select circle boundary rule properties, including feathering distance, boundary center coords, and boundary radius.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 00 48 43 00 00 48 43 00 00 48 43 &lt;br /&gt;
01 00 00 00 CD CC CC 3D &lt;br /&gt;
&lt;br /&gt;
(float)   X&lt;br /&gt;
(float)   Y&lt;br /&gt;
(float)   Radius&lt;br /&gt;
(int)     Feathering Type&lt;br /&gt;
(float)   Feathering Amount&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BPOL&amp;lt;/font&amp;gt;'''||Boundary Polygon||Delimits a n-sided closed polygon area using 2 floats (Xo,Yo) for each point.  (Select polygon boundary rule properties, includibng feathering distance  and including local water table height, shader and shader size.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Water Area example&lt;br /&gt;
&lt;br /&gt;
04 00 00 00 00 00 00 00 00 00 00 00 00 00 15 C3 00 00 00 00 	....................&lt;br /&gt;
00 00 15 C3 00 00 15 C3 00 00 00 00 00 00 15 C3 03 00 00 00 	....................&lt;br /&gt;
00 00 48 42 01 00 00 00 00 00 20 C1 00 00 00 40 77 74 65 72 	..HB............wter&lt;br /&gt;
5F 73 70 65 63 00 	                                        .spec.&lt;br /&gt;
&lt;br /&gt;
(int)    Point Count&lt;br /&gt;
&lt;br /&gt;
- List -----------&lt;br /&gt;
(float)  X&lt;br /&gt;
(float)  Y&lt;br /&gt;
------------------&lt;br /&gt;
&lt;br /&gt;
(int)    Fethering Type&lt;br /&gt;
(float)  Shore smoothness  (0 is vertical, 50 looks normal. I don't know what scale mesurement is used) &lt;br /&gt;
(int)    Bool Water On/Off&lt;br /&gt;
(float)  Water Height&lt;br /&gt;
(float)  Water Shader Size (Common size = 2)&lt;br /&gt;
(string) Water Shader  (wter_spec = Look in the file header??)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BPLN&amp;lt;/font&amp;gt;'''||Boundary PolyLine||Delimits a n-sided line area using 2 floats (Xo,Yo) for each point and a float for the width.  (Select polyline boundary rule properties, including feathering distance and width.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
08 00 00 00 00 00 80 3E 00 00 00 3F 00 00 00 00 00 00 74 41 &lt;br /&gt;
00 00 0C C1 00 00 E8 41 00 00 0C C1 00 00 50 42 00 00 78 C1 &lt;br /&gt;
00 80 85 42 00 00 D8 C1 00 80 91 42 00 00 12 C2 00 00 93 42 &lt;br /&gt;
00 00 41 C2 00 00 94 42 01 00 00 00 00 00 80 3F 00 00 20 41 &lt;br /&gt;
&lt;br /&gt;
(int)    Point Count&lt;br /&gt;
&lt;br /&gt;
- List -----------&lt;br /&gt;
(float)  X&lt;br /&gt;
(float)  Y&lt;br /&gt;
------------------&lt;br /&gt;
&lt;br /&gt;
(int)     Feathering Type&lt;br /&gt;
(float)   Feathering Amount&lt;br /&gt;
(float)   Line Width&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: '''Boundaries can have a special footer allowing them to behave as a water area.'''(TODO)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+ '''Filters'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FDIR&amp;lt;/font&amp;gt;'''||Filter Direction||Select filter direction rule properties, including feathering distance, and min and max angle settings for filter setting to have effect.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FFRA&amp;lt;/font&amp;gt;'''||Filter Fractal||Delimits an area generated by a 2d fractal on the ground.  (Select filter fractal rule properties incuding fractal family, low and high fractal settings and feathering distance.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FHGT&amp;lt;/font&amp;gt;'''||Filter Height||Select filter height rule properties, including feathering, distance, filter low height, and filter high height.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FSLP&amp;lt;/font&amp;gt;'''||Filter Slope||Select filter slope rule properties, including feathering distance, filter min angle, and filter max angle.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 00 00 00 00 00 C8 41 01 00 00 00 CD CC 8C &lt;br /&gt;
          &lt;br /&gt;
(float)   Minimum Angle&lt;br /&gt;
(float)   Maximum Angle&lt;br /&gt;
(int)     Type?&lt;br /&gt;
(byte)    ?&lt;br /&gt;
(byte)    ?&lt;br /&gt;
(byte)    ?&lt;br /&gt;
Note the 3 last bytes may be a color.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Texture / Shaders Affectors'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ASCN&amp;lt;/font&amp;gt;'''||Affector Shader Constant||Affect a shader using the family_id and the shader_id this family. (Select rule shader and family and feathering parameters.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ASCR&amp;lt;/font&amp;gt;'''||Affector Shader Replace||Replace a shader with another shader (Select rule shader replace families, including source family (the family to be replaced), destination family (the family to replace with), and feathering parameters.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ACCN&amp;lt;/font&amp;gt;'''||Affector Color Constant||Select color for rule.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FSHD&amp;lt;/font&amp;gt;'''||Filter Shader||Select filter shader rule properties, including shader family.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Terrain Affectors'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AHCN&amp;lt;/font&amp;gt;'''||Affector Height Constant||Raises or lowers the ground using float for delta and float(scalar?) for slope-smooting. (Select terrain height value for rule.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
01 00 00 00 00 00 C8 C2 &lt;br /&gt;
&lt;br /&gt;
(int)     ukn&lt;br /&gt;
(float)   Final Height&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AHFR&amp;lt;/font&amp;gt;'''||Affector Height Fractal||Raises or lowers the ground irregulary using a fractal type from the Fractal Family. Float for delta and float(scalar?) (Select terrain height value for rule for fractal family.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
50 41 52 4D 00 00 00 0C 02 00 00 00 00 00 00 00 00 00 48 C2 &lt;br /&gt;
          &lt;br /&gt;
(String)  PARAM&lt;br /&gt;
(int)     Byte Count&lt;br /&gt;
(int)     Index of a Fractal Family in MGRP -non regular-&lt;br /&gt;
(?) ukn&lt;br /&gt;
(float)   Height Delta, can be negative&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AHFT&amp;lt;/font&amp;gt;'''||Affector Height Terrace||Select terrace height and flat ratio values for rule.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Flora Affectors'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFSC&amp;lt;/font&amp;gt;'''||Affector Flora Static Collidable||Sets the amount of collidable flora. (Select to add/remove flora, specify flora type and set flora density for static collidable flora.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
05 00 00 00 01 00 00 00 00 00 00 00&lt;br /&gt;
01 00 00 00 00 00 80 3F&lt;br /&gt;
&lt;br /&gt;
(int)   Index of a family in FGRP -not regular-&lt;br /&gt;
(int)   ukn&lt;br /&gt;
(?)     ukn&lt;br /&gt;
(int)   ukn&lt;br /&gt;
(float) Feathering&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFSN&amp;lt;/font&amp;gt;'''||Affector Flora Static Non-Collidable||Sets the amount of Non-collidable flora. (Select to add/remove flora, specify flora type and set flora density for static non-collidable flora.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFDN&amp;lt;/font&amp;gt;'''||Affector Flora Dynamic Near||I don't know much about those yet. Seems like they change the near/far radial displaying. They're often coupled to the flora affectors, for instance when cleaning an area for a city.  (Select to add/remove flora, specify flora type and set flora destiny for dynamic near flora.)&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFDF&amp;lt;/font&amp;gt;'''||Affector Flora Dynamic Far|| (Select to add/remove flora, specify flora type and set flora density for dynamic far flora.)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Unknown'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AENV&amp;lt;/font&amp;gt;'''||Environment||Select enviroment group rule properties.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AEXC&amp;lt;/font&amp;gt;'''||Affector Exclude||This one shows up on the Patent App.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AROA&amp;lt;/font&amp;gt;'''||Affector Road||Select road rule properties, including width, shader, feathering height distance, and feathering shader distance.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ARIV&amp;lt;/font&amp;gt;'''||Affector River||Select river rule properties, including width, trench depth, flow velocity, bank and bottom shaders, water shader, water depth, water width, feathering distance.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ACRF&amp;lt;/font&amp;gt;'''||Affector Color Ramp Fractal||Select rule family and color ramp.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ACRH&amp;lt;/font&amp;gt;'''||Affector Color Ramp Height||Select rule color ramp and height low/high values.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Layer&lt;br /&gt;
&lt;br /&gt;
    a. AffectorHeightConstant, 10&lt;br /&gt;
&lt;br /&gt;
    b. AffectorShaderConstant, Rock&lt;br /&gt;
&lt;br /&gt;
2. Layer&lt;br /&gt;
&lt;br /&gt;
    a. BoundaryCircle, x=500, y=500, r=500, feather=InOut&lt;br /&gt;
&lt;br /&gt;
    b. AffectorHeightConstant, 0&lt;br /&gt;
&lt;br /&gt;
    c. AffectorShaderConstant, Mud&lt;br /&gt;
&lt;br /&gt;
    d. Layer&lt;br /&gt;
&lt;br /&gt;
        i. FilterHeightmin=13,max=17&lt;br /&gt;
&lt;br /&gt;
        ii. AffectorColorConstant, BLACK&lt;br /&gt;
&lt;br /&gt;
3. Layer&lt;br /&gt;
&lt;br /&gt;
    a. BoundaryRectangle, min=-500, -500, max=500, 500&lt;br /&gt;
&lt;br /&gt;
    b. AffectorFloraStaticCollidableConstant, Conifer&lt;br /&gt;
&lt;br /&gt;
    c. AffectorFloraDynamicNearConstant, Dead grass&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Description'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Using the example rules listed above, the corresponding rule &lt;br /&gt;
description can perform the following:&lt;br /&gt;
&lt;br /&gt;
1. Set the height of the terrain everywhere to 10 meters(1a) and assign the rock shader(1b). &lt;br /&gt;
&lt;br /&gt;
2. Then, in a 500 meter circle(2a) originating from coordinates (500, 500),&lt;br /&gt;
gradually decrease the height from 10 meters to 0 meters(2b), place the mud shader(2c),&lt;br /&gt;
and create a black band where the height of the terrain at a given sample point is between 13 and 17 meters.(2d, 2di, 2dii) &lt;br /&gt;
&lt;br /&gt;
3. Finally, in a rectangle(3a) from coordinates (-500, -500) to (500, 500), place &lt;br /&gt;
conifer trees(3b) and dead grass(3c) within the rectangle.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Powerking</name></author>	</entry>

	<entry>
		<id>https://wiki.swganh.org/index.php?title=TRN_(FileFormat)&amp;diff=72286</id>
		<title>TRN (FileFormat)</title>
		<link rel="alternate" type="text/html" href="https://wiki.swganh.org/index.php?title=TRN_(FileFormat)&amp;diff=72286"/>
				<updated>2010-05-22T03:13:42Z</updated>
		
		<summary type="html">&lt;p&gt;Powerking: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageHeader|FileFormat|TRN}}&lt;br /&gt;
='''&amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;File Header&amp;lt;/font&amp;gt;'''=&lt;br /&gt;
&lt;br /&gt;
The general map parameters, as well as flora parameters are defined here&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
4A 3A 5C 73 77 67 5C 63 75 72 72 65 6E 74 5C 64 61 74 61 5C 	J..swg.current.data.&lt;br /&gt;
73 6B 75 2E 30 5C 73 79 73 2E 73 68 61 72 65 64 5C 62 75 69 	sku.0.sys.shared.bui&lt;br /&gt;
6C 74 5C 67 61 6D 65 5C 74 65 72 72 61 69 6E 5C 64 61 6E 74 	lt.game.terrain.dant&lt;br /&gt;
6F 6F 69 6E 65 2E 74 72 6E 00 00 00 80 46 00 00 00 41 02 00 	ooine.trn....F...A..&lt;br /&gt;
00 00 01 00 00 00 CD CC CC BD 00 00 00 40 77 74 65 72 5F 64 	..............wter.d&lt;br /&gt;
61 6E 74 5F 6C 61 6B 65 00 00 30 04 46 00 00 00 00 00 00 00 	ant.lake..0.F.......&lt;br /&gt;
43 00 00 00 41 00 00 00 40 00 00 00 00 00 00 00 00 00 00 80 	C...A...............&lt;br /&gt;
42 00 00 80 40 00 00 00 3F 00 00 00 00 00 00 00 00 00 00 F0 	B...................&lt;br /&gt;
41 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 43 00 00 00 	A...............C...&lt;br /&gt;
44 00 00 00 42 00 00 00 41 00 00 00 00 	                        D...B...A....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
='''&amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;TGEN&amp;lt;/font&amp;gt;''' - Terrain Generator =&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The rules in the terrain generation system are also referred to as affectors,and&lt;br /&gt;
are organized into layers. Boundaries refer to terrain designer- or artist-defined&lt;br /&gt;
regions of virtual terrain for which the desired rules have effect. Filters refer &lt;br /&gt;
to conditions to be considered when applying affectors. Layers can be arranged &lt;br /&gt;
in a hierarchy with a parent-child or tree-leaf relationship. Examples of boundaries &lt;br /&gt;
include circles, rectangles, and polygons. Examples of filters include filtering &lt;br /&gt;
by slope, height, shader, direction and fractal. Examples of affectors include &lt;br /&gt;
those that affect height, color, shader, flora, and radial flora. Boundaries, filters &lt;br /&gt;
and layers are described in greater detail below.&lt;br /&gt;
&lt;br /&gt;
The terrain generation system also includes families, which refer to groups of &lt;br /&gt;
assets such as textures, geometry or even algorithms. Families can include children &lt;br /&gt;
with weights. This could involve choosing an asset by selecting a one weighted child. &lt;br /&gt;
For example, this could allow the users to choose a &amp;quot;grass&amp;quot; family for a region, but &lt;br /&gt;
when the terrain system generates the grass family, it can choose one of the children &lt;br /&gt;
of the grass family, which results in the rendering of a single grass shader.&lt;br /&gt;
&lt;br /&gt;
Examples of families include shader families, blend families, flora families, &lt;br /&gt;
radial flora families, and fractal families. Shader families refer to grouping &lt;br /&gt;
shaders for placing textures. Blend families refer to grouping shaders for selecting &lt;br /&gt;
alpha blend masks. Flora families refer to grouping geometry for selecting flora. &lt;br /&gt;
Radial flora families refer to grouping shaders for placing radial flora. &lt;br /&gt;
Fractal families refer to grouping fractals for reuse within different rules.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Terrain generator (form name : TGEN)&lt;br /&gt;
There are 6 different sections.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- The Shader family          (SGRP)&lt;br /&gt;
- The Flora family           (FRGP)&lt;br /&gt;
- The Radial Flora family    (RGRP)&lt;br /&gt;
- The Environment family     (EGRP)&lt;br /&gt;
- The Fractal family         (MGRP)&lt;br /&gt;
- The Layers family          (LYRS)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;SGRP&amp;lt;/font&amp;gt;''' - Shader Family Group==&lt;br /&gt;
&lt;br /&gt;
Shader families refer to grouping shaders for placing textures&lt;br /&gt;
&lt;br /&gt;
It's sub-divied into multiple surface families (SFAM).&lt;br /&gt;
&lt;br /&gt;
Each one of them declare mutliple shaders using a surface file. &lt;br /&gt;
&lt;br /&gt;
SGRP has x children (SFAM), SFAM has x children (Shaders)&lt;br /&gt;
&lt;br /&gt;
'''Family break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
53 46 41 4D 00 00 00 55 22 00 00 00 73 6E 6F 77 5F 6D 74 6E 	SFAM...U....snow.mtn&lt;br /&gt;
73 70 65 61 6B 00 61 62 73 74 72 61 63 74 2F 74 65 72 72 61 	speak.abstract.terra&lt;br /&gt;
69 6E 5F 73 75 72 66 61 63 65 2F 73 6E 6F 77 2E 69 66 66 00 	in.surface.snow.iff.&lt;br /&gt;
FF FF 00 00 00 00 40 00 00 80 3F 01 00 00 00 	                ...............&lt;br /&gt;
&lt;br /&gt;
(int)              Family ID   (This ID is user by the layers to select this family)&lt;br /&gt;
(String)           File Name&lt;br /&gt;
(byte)(byte)(byte) unk  ?Color?&lt;br /&gt;
(float)            unk&lt;br /&gt;
(float)            unk&lt;br /&gt;
(int)              Child Count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
73 6E 6F 77 5F 6D 74 6E 73 70 65 61 6B 00 00 00 80 3F 	       snow.mtnspeak.....&lt;br /&gt;
&lt;br /&gt;
(string)           Shader Name&lt;br /&gt;
(float)            unk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;FGRP&amp;lt;/font&amp;gt;''' - Flora Family Group==   &lt;br /&gt;
&lt;br /&gt;
Flora families refer to grouping geometry -apt files- for selecting flora. (Select flora group properties, including flora family data)&lt;br /&gt;
&lt;br /&gt;
Each one of them decalre one flora group using  multiple appearance files.&lt;br /&gt;
&lt;br /&gt;
FGRP has x children (FFAM), FFAM has x children (Appearance Files)&lt;br /&gt;
&lt;br /&gt;
'''Family break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
46 46 41 4D 00 00 00 9D 01 00 00 00 66 65 72 6E 73 00 FF 80 	FFAM........ferns...&lt;br /&gt;
40 00 00 80 3F 00 00 00 00 02 00 00 00 	                        .............&lt;br /&gt;
&lt;br /&gt;
(int)              Family ID   (This ID is user by the layers to select this family)&lt;br /&gt;
(String)           Family Name&lt;br /&gt;
(byte)(byte)(byte) ukn  ?Color?&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              Child Count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
70 74 63 68 5F 65 6E 64 72 5F 66 72 73 74 5F 63 6C 75 73 74 	ptch.endr.frst.clust&lt;br /&gt;
65 72 5F 61 31 2E 61 70 74 00 00 00 80 3F 00 00 00 00 0A D7 	er.a1.apt...........&lt;br /&gt;
23 3C CD CC CC 3D 01 00 00 00 01 00 00 00 00 00 40 3F 00 00 	....................&lt;br /&gt;
20 40 	                                                        ..&lt;br /&gt;
&lt;br /&gt;
(String)           Appearance File Name &lt;br /&gt;
(float)            ukn&lt;br /&gt;
(?)                ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;RGRP&amp;lt;/font&amp;gt;''' - Radial Flora Family Group==   &lt;br /&gt;
Radial flora families refer to grouping shaders for placing radial flora. &lt;br /&gt;
&lt;br /&gt;
'''Family break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
52 46 41 4D 00 00 01 06 01 00 00 00 67 72 61 73 73 79 20 70 	RFAM........grassy.p&lt;br /&gt;
6C 61 69 6E 73 00 FF FF 00 00 00 80 3F 04 00 00 00 	        lains............&lt;br /&gt;
&lt;br /&gt;
(int)              Family ID   (This ID is user by the layers to select this family)&lt;br /&gt;
(String)           Family Name&lt;br /&gt;
(byte)(byte)(byte) ukn  ?Color?&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              Child Count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(String)           Shader Name (dds file)&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(?)                ukn&lt;br /&gt;
TODO..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;EGRP&amp;lt;/font&amp;gt;''' - Environment Family Group==  &lt;br /&gt;
                                &lt;br /&gt;
Declares the environement&lt;br /&gt;
&lt;br /&gt;
EGRP has x children (EFAM)&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
01 00 00 00 6D 61 69 6E 5F 62 61 73 65 00 FF FF 00 00 00 80 3F  	....main.base........&lt;br /&gt;
	&lt;br /&gt;
(int)                 Environment ID   (This ID is user by the layers to select this environment)&lt;br /&gt;
(String)              Environment Name                                                    &lt;br /&gt;
(byte)(byte)(byte)    ukn ?Color?&lt;br /&gt;
(float)               ukn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;MGRP&amp;lt;/font&amp;gt;''' - Fractal Family Group==  &lt;br /&gt;
&lt;br /&gt;
Fractal families refer to grouping fractals for reuse within different rules.&lt;br /&gt;
It's sub-divied into multiple groups (MFAM).&lt;br /&gt;
Each one of them declare a labelled fractal. &lt;br /&gt;
&lt;br /&gt;
MGRP has x children (MFAM)&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
4D 46 41 4D 44 41 54 41 00 00 00 1C 01 00 00 00 41 66 66 65 	MFAMDATA........Affe&lt;br /&gt;
63 74 6F 72 48 65 69 67 68 74 46 72 61 63 74 61 6C 5F 31 00 	ctorHeightFractal.1.&lt;br /&gt;
46 4F 52 4D 00 00 00 4C 4D 46 52 43 46 4F 52 4D 00 00 00 40 	FORM...LMFRCFORM....&lt;br /&gt;
30 30 30 31 44 41 54 41 00 00 00 34 00 00 00 00 00 00 00 00 	0001DATA...4........&lt;br /&gt;
00 00 00 3F 00 00 00 00 33 33 33 3F 02 00 00 00 00 00 80 40 	........333.........&lt;br /&gt;
00 00 00 3F 0A D7 23 3C 0A D7 23 3C 00 00 00 00 00 00 00 00 	....................&lt;br /&gt;
00 00 00 00 	&lt;br /&gt;
&lt;br /&gt;
(int)          Fractal ID (This ID is user by the layers to select this family)&lt;br /&gt;
(String)       Fractal Label&lt;br /&gt;
&lt;br /&gt;
MFRC FORM [...] DATA, byte count&lt;br /&gt;
&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(?)            ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;LYRS&amp;lt;/font&amp;gt;''' - Layers==&lt;br /&gt;
&lt;br /&gt;
=== Layers &amp;amp; Affectors ===&lt;br /&gt;
&lt;br /&gt;
Basically the role of layers is to affect the data contained in the different families.&lt;br /&gt;
They can contain any number of other sub-layers. Their order is important.&lt;br /&gt;
&lt;br /&gt;
[[Image:trn_layers.jpg]]&lt;br /&gt;
&lt;br /&gt;
A layer deals with the families trough Affectors. There are different types of them, each one has it's own role.&lt;br /&gt;
Can have Affector for texturing, flora,  areas...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Boundaries, filters, and affectors can be defined in layers and sublayers,&lt;br /&gt;
such that a single location in the terrain can have multiple terrain rules.&lt;br /&gt;
A layer without boundaries (or filters) is &amp;quot;unbounded,&amp;quot; and can affect as much&lt;br /&gt;
as the entire landscape. A layer with a boundary allows the affectors in the&lt;br /&gt;
layer and sublayers to be applied to the region specified by the boundary.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Affectors'''==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
46 4F 52 4D 00 00 00 70 41 46 53 43 46 4F 52 4D 00 00 00 64 	FORM...pAFSCFORM...d&lt;br /&gt;
30 30 30 34 46 4F 52 4D 00 00 00 3C 49 48 44 52 46 4F 52 4D 	0004FORM....IHDRFORM&lt;br /&gt;
00 00 00 30 30 30 30 31 44 41 54 41 00 00 00 24 01 00 00 00 	...00001DATA........&lt;br /&gt;
41 66 66 65 63 74 6F 72 46 6C 6F 72 61 43 6F 6C 6C 69 64 61 	AffectorFloraCollida&lt;br /&gt;
62 6C 65 43 6F 6E 73 74 61 6E 74 00 44 41 54 41 00 00 00 14 	bleConstant.DATA....&lt;br /&gt;
05 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 80 3F 	....................&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Every Affector has an IHDR child wich is holding the user-custom name of the affector (here AffectorFloraCollidableConstant).&lt;br /&gt;
&lt;br /&gt;
The 4 bytes Before the name is a Bool wich enable/disable the affector.&lt;br /&gt;
&lt;br /&gt;
The affector-specific data is conatined After the IHDR in the last DATA form, it always starts with a byte counter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+ '''Boundaries'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BREC&amp;lt;/font&amp;gt;'''||Boundary Rectangle||Delimits a rectangle using 4 float: X1, Y1, X2, Y2 (Select rectangle boundary rule properties, including feathering distance, boundary left/right and near/far coords and local water table height, shader and sahder size.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 00 7A 44 00 00 7A 44 00 00 AF 44 &lt;br /&gt;
00 00 AF 44 00 00 00 00 00 00 80 3F &lt;br /&gt;
&lt;br /&gt;
(float)   X1&lt;br /&gt;
(float)   Y1&lt;br /&gt;
(float)   X2&lt;br /&gt;
(float)   Y2&lt;br /&gt;
(int)     Feathering Type&lt;br /&gt;
(float)   Feathering Amount&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BCIR&amp;lt;/font&amp;gt;'''||Boundary Circle||Delimits a circle using 3 float: Xo, Yo, Radius  (Select circle boundary rule properties, including feathering distance, boundary center coords, and boundary radius.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 00 48 43 00 00 48 43 00 00 48 43 &lt;br /&gt;
01 00 00 00 CD CC CC 3D &lt;br /&gt;
&lt;br /&gt;
(float)   X&lt;br /&gt;
(float)   Y&lt;br /&gt;
(float)   Radius&lt;br /&gt;
(int)     Feathering Type&lt;br /&gt;
(float)   Feathering Amount&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BPOL&amp;lt;/font&amp;gt;'''||Boundary Polygon||Delimits a n-sided closed polygon area using 2 floats (Xo,Yo) for each point.  (Select polygon boundary rule properties, includibng feathering distance  and including local water table height, shader and shader size.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Water Area example&lt;br /&gt;
&lt;br /&gt;
04 00 00 00 00 00 00 00 00 00 00 00 00 00 15 C3 00 00 00 00 	....................&lt;br /&gt;
00 00 15 C3 00 00 15 C3 00 00 00 00 00 00 15 C3 03 00 00 00 	....................&lt;br /&gt;
00 00 48 42 01 00 00 00 00 00 20 C1 00 00 00 40 77 74 65 72 	..HB............wter&lt;br /&gt;
5F 73 70 65 63 00 	                                        .spec.&lt;br /&gt;
&lt;br /&gt;
(int)    Point Count&lt;br /&gt;
&lt;br /&gt;
- List -----------&lt;br /&gt;
(float)  X&lt;br /&gt;
(float)  Y&lt;br /&gt;
------------------&lt;br /&gt;
&lt;br /&gt;
(int)    Fethering Type&lt;br /&gt;
(float)  Shore smoothness  (0 is vertical, 50 looks normal. I don't know what scale mesurement is used) &lt;br /&gt;
(int)    Bool Water On/Off&lt;br /&gt;
(float)  Water Height&lt;br /&gt;
(float)  Water Shader Size (Common size = 2)&lt;br /&gt;
(string) Water Shader  (wter_spec = Look in the file header??)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BPLN&amp;lt;/font&amp;gt;'''||Boundary PolyLine||Delimits a n-sided line area using 2 floats (Xo,Yo) for each point and a float for the width.  (Select polyline boundary rule properties, including feathering distance and width.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
08 00 00 00 00 00 80 3E 00 00 00 3F 00 00 00 00 00 00 74 41 &lt;br /&gt;
00 00 0C C1 00 00 E8 41 00 00 0C C1 00 00 50 42 00 00 78 C1 &lt;br /&gt;
00 80 85 42 00 00 D8 C1 00 80 91 42 00 00 12 C2 00 00 93 42 &lt;br /&gt;
00 00 41 C2 00 00 94 42 01 00 00 00 00 00 80 3F 00 00 20 41 &lt;br /&gt;
&lt;br /&gt;
(int)    Point Count&lt;br /&gt;
&lt;br /&gt;
- List -----------&lt;br /&gt;
(float)  X&lt;br /&gt;
(float)  Y&lt;br /&gt;
------------------&lt;br /&gt;
&lt;br /&gt;
(int)     Feathering Type&lt;br /&gt;
(float)   Feathering Amount&lt;br /&gt;
(float)   Line Width&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: '''Boundaries can have a special footer allowing them to behave as a water area.'''(TODO)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+ '''Filters'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FDIR&amp;lt;/font&amp;gt;'''||Filter Direction||Select filter direction rule properties, including feathering distance, and min and max angle settings for filter setting to have effect.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FFRA&amp;lt;/font&amp;gt;'''||Filter Fractal||Delimits an area generated by a 2d fractal on the ground.  (Select filter fractal rule properties incuding fractal family, low and high fractal settings and feathering distance.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FHGT&amp;lt;/font&amp;gt;'''||Filter Height||Select filter height rule properties, including feathering, distance, filter low height, and filter high height.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FSLP&amp;lt;/font&amp;gt;'''||Filter Slope||Select filter slope rule properties, including feathering distance, filter min angle, and filter max angle.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 00 00 00 00 00 C8 41 01 00 00 00 CD CC 8C &lt;br /&gt;
          &lt;br /&gt;
(float)   Minimum Angle&lt;br /&gt;
(float)   Maximum Angle&lt;br /&gt;
(int)     Type?&lt;br /&gt;
(byte)    ?&lt;br /&gt;
(byte)    ?&lt;br /&gt;
(byte)    ?&lt;br /&gt;
Note the 3 last bytes may be a color.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Texture / Shaders Affectors'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ASCN&amp;lt;/font&amp;gt;'''||Affector Shader Constant||Affect a shader using the family_id and the shader_id this family. (Select rule shader and family and feathering parameters.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ASCR&amp;lt;/font&amp;gt;'''||Affector Shader Replace||Replace a shader with another shader (Select rule shader replace families, including source family (the family to be replaced), destination family (the family to replace with), and feathering parameters.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ACCN&amp;lt;/font&amp;gt;'''||Affector Color Constant||Select color for rule.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FSHD&amp;lt;/font&amp;gt;'''||Filter Shader||Select filter shader rule properties, including shader family.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Terrain Affectors'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AHCN&amp;lt;/font&amp;gt;'''||Affector Height Constant||Raises or lowers the ground using float for delta and float(scalar?) for slope-smooting. (Select terrain height value for rule.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
01 00 00 00 00 00 C8 C2 &lt;br /&gt;
&lt;br /&gt;
(int)     ukn&lt;br /&gt;
(float)   Final Height&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AHFR&amp;lt;/font&amp;gt;'''||Affector Height Fractal||Raises or lowers the ground irregulary using a fractal type from the Fractal Family. Float for delta and float(scalar?) (Select terrain height value for rule for fractal family.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
50 41 52 4D 00 00 00 0C 02 00 00 00 00 00 00 00 00 00 48 C2 &lt;br /&gt;
          &lt;br /&gt;
(String)  PARAM&lt;br /&gt;
(int)     Byte Count&lt;br /&gt;
(int)     Index of a Fractal Family in MGRP -non regular-&lt;br /&gt;
(?) ukn&lt;br /&gt;
(float)   Height Delta, can be negative&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AHFT&amp;lt;/font&amp;gt;'''||Affector Height Terrace||Select terrace height and flat ratio values for rule.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Flora Affectors'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFSC&amp;lt;/font&amp;gt;'''||Affector Flora Static Collidable||Sets the amount of collidable flora. (Select to add/remove flora, specify flora type and set flora density for static collidable flora.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
05 00 00 00 01 00 00 00 00 00 00 00&lt;br /&gt;
01 00 00 00 00 00 80 3F&lt;br /&gt;
&lt;br /&gt;
(int)   Index of a family in FGRP -not regular-&lt;br /&gt;
(int)   ukn&lt;br /&gt;
(?)     ukn&lt;br /&gt;
(int)   ukn&lt;br /&gt;
(float) Feathering&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFSN&amp;lt;/font&amp;gt;'''||Affector Flora Static Non-Collidable||Sets the amount of Non-collidable flora. (Select to add/remove flora, specify flora type and set flora density for static non-collidable flora.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFDN&amp;lt;/font&amp;gt;'''||Affector Flora Dynamic Near||I don't know much about those yet. Seems like they change the near/far radial displaying. They're often coupled to the flora affectors, for instance when cleaning an area for a city.  (Select to add/remove flora, specify flora type and set flora destiny for dynamic near flora.)&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFDF&amp;lt;/font&amp;gt;'''||Affector Flora Dynamic Far|| (Select to add/remove flora, specify flora type and set flora density for dynamic far flora.)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Unknown'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AENV&amp;lt;/font&amp;gt;'''||Environment||Select enviroment group rule properties.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AEXC&amp;lt;/font&amp;gt;'''||Affector Exclude||This one shows up on the Patent App.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AROA&amp;lt;/font&amp;gt;'''||Affector Road||Select road rule properties, including width, shader, feathering height distance, and feathering shader distance.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ARIV&amp;lt;/font&amp;gt;'''||Affector River||Select river rule properties, including width, trench depth, flow velocity, bank and bottom shaders, water shader, water depth, water width, feathering distance.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ACRF&amp;lt;/font&amp;gt;'''||Affector Color Ramp Fractal||Select rule family and color ramp.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ACRH&amp;lt;/font&amp;gt;'''||Affector Color Ramp Height||Select rule color ramp and height low/high values.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Layer&lt;br /&gt;
&lt;br /&gt;
    a. AffectorHeightConstant, 10&lt;br /&gt;
&lt;br /&gt;
    b. AffectorShaderConstant, Rock&lt;br /&gt;
&lt;br /&gt;
2. Layer&lt;br /&gt;
&lt;br /&gt;
    a. BoundaryCircle, x=500, y=500, r=500, feather=InOut&lt;br /&gt;
&lt;br /&gt;
    b. AffectorHeightConstant, 0&lt;br /&gt;
&lt;br /&gt;
    c. AffectorShaderConstant, Mud&lt;br /&gt;
&lt;br /&gt;
    d. Layer&lt;br /&gt;
&lt;br /&gt;
        i. FilterHeightmin=13,max=17&lt;br /&gt;
&lt;br /&gt;
        ii. AffectorColorConstant, BLACK&lt;br /&gt;
&lt;br /&gt;
3. Layer&lt;br /&gt;
&lt;br /&gt;
    a. BoundaryRectangle, min=-500, -500, max=500, 500&lt;br /&gt;
&lt;br /&gt;
    b. AffectorFloraStaticCollidableConstant, Conifer&lt;br /&gt;
&lt;br /&gt;
    c. AffectorFloraDynamicNearConstant, Dead grass&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Description'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Using the example rules listed above, the corresponding rule &lt;br /&gt;
description can perform the following:&lt;br /&gt;
&lt;br /&gt;
1. Set the height of the terrain everywhere to 10 meters(1a) and assign the rock shader(1b). &lt;br /&gt;
&lt;br /&gt;
2. Then, in a 500 meter circle(2a) originating from coordinates (500, 500),&lt;br /&gt;
gradually decrease the height from 10 meters to 0 meters(2b), place the mud shader(2c),&lt;br /&gt;
and create a black band where the height of the terrain at a given sample point is between 13 and 17 meters.(2d, 2di, 2dii) &lt;br /&gt;
&lt;br /&gt;
3. Finally, in a rectangle(3a) from coordinates (-500, -500) to (500, 500), place &lt;br /&gt;
conifer trees(3b) and dead grass(3c) within the rectangle.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Powerking</name></author>	</entry>

	<entry>
		<id>https://wiki.swganh.org/index.php?title=TRN_(FileFormat)&amp;diff=72285</id>
		<title>TRN (FileFormat)</title>
		<link rel="alternate" type="text/html" href="https://wiki.swganh.org/index.php?title=TRN_(FileFormat)&amp;diff=72285"/>
				<updated>2010-05-22T02:05:57Z</updated>
		
		<summary type="html">&lt;p&gt;Powerking: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageHeader|FileFormat|TRN}}&lt;br /&gt;
='''&amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;File Header&amp;lt;/font&amp;gt;'''=&lt;br /&gt;
&lt;br /&gt;
The general map parameters, as well as flora parameters are defined here&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
4A 3A 5C 73 77 67 5C 63 75 72 72 65 6E 74 5C 64 61 74 61 5C 	J..swg.current.data.&lt;br /&gt;
73 6B 75 2E 30 5C 73 79 73 2E 73 68 61 72 65 64 5C 62 75 69 	sku.0.sys.shared.bui&lt;br /&gt;
6C 74 5C 67 61 6D 65 5C 74 65 72 72 61 69 6E 5C 64 61 6E 74 	lt.game.terrain.dant&lt;br /&gt;
6F 6F 69 6E 65 2E 74 72 6E 00 00 00 80 46 00 00 00 41 02 00 	ooine.trn....F...A..&lt;br /&gt;
00 00 01 00 00 00 CD CC CC BD 00 00 00 40 77 74 65 72 5F 64 	..............wter.d&lt;br /&gt;
61 6E 74 5F 6C 61 6B 65 00 00 30 04 46 00 00 00 00 00 00 00 	ant.lake..0.F.......&lt;br /&gt;
43 00 00 00 41 00 00 00 40 00 00 00 00 00 00 00 00 00 00 80 	C...A...............&lt;br /&gt;
42 00 00 80 40 00 00 00 3F 00 00 00 00 00 00 00 00 00 00 F0 	B...................&lt;br /&gt;
41 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 43 00 00 00 	A...............C...&lt;br /&gt;
44 00 00 00 42 00 00 00 41 00 00 00 00 	                        D...B...A....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
='''&amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;TGEN&amp;lt;/font&amp;gt;''' - Terrain Generator =&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The rules in the terrain generation system are also referred to as affectors,and&lt;br /&gt;
are organized into layers. Boundaries refer to terrain designer- or artist-defined&lt;br /&gt;
regions of virtual terrain for which the desired rules have effect. Filters refer &lt;br /&gt;
to conditions to be considered when applying affectors. Layers can be arranged &lt;br /&gt;
in a hierarchy with a parent-child or tree-leaf relationship. Examples of boundaries &lt;br /&gt;
include circles, rectangles, and polygons. Examples of filters include filtering &lt;br /&gt;
by slope, height, shader, direction and fractal. Examples of affectors include &lt;br /&gt;
those that affect height, color, shader, flora, and radial flora. Boundaries, filters &lt;br /&gt;
and layers are described in greater detail below.&lt;br /&gt;
&lt;br /&gt;
The terrain generation system also includes families, which refer to groups of &lt;br /&gt;
assets such as textures, geometry or even algorithms. Families can include children &lt;br /&gt;
with weights. This could involve choosing an asset by selecting a one weighted child. &lt;br /&gt;
For example, this could allow the users to choose a &amp;quot;grass&amp;quot; family for a region, but &lt;br /&gt;
when the terrain system generates the grass family, it can choose one of the children &lt;br /&gt;
of the grass family, which results in the rendering of a single grass shader.&lt;br /&gt;
&lt;br /&gt;
Examples of families include shader families, blend families, flora families, &lt;br /&gt;
radial flora families, and fractal families. Shader families refer to grouping &lt;br /&gt;
shaders for placing textures. Blend families refer to grouping shaders for selecting &lt;br /&gt;
alpha blend masks. Flora families refer to grouping geometry for selecting flora. &lt;br /&gt;
Radial flora families refer to grouping shaders for placing radial flora. &lt;br /&gt;
Fractal families refer to grouping fractals for reuse within different rules.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Terrain generator (form name : TGEN)&lt;br /&gt;
There are 6 different sections.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- The Shader family          (SGRP)&lt;br /&gt;
- The Flora family           (FRGP)&lt;br /&gt;
- The Radial Flora family    (RGRP)&lt;br /&gt;
- The Environment family     (EGRP)&lt;br /&gt;
- The Fractal family         (MGRP)&lt;br /&gt;
- The Layers family          (LYRS)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;SGRP&amp;lt;/font&amp;gt;''' - Shader Family Group==&lt;br /&gt;
&lt;br /&gt;
Shader families refer to grouping shaders for placing textures&lt;br /&gt;
&lt;br /&gt;
It's sub-divied into multiple surface families (SFAM).&lt;br /&gt;
&lt;br /&gt;
Each one of them declare mutliple shaders using a surface file. &lt;br /&gt;
&lt;br /&gt;
SGRP has x children (SFAM), SFAM has x children (Shaders)&lt;br /&gt;
&lt;br /&gt;
'''Family break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
53 46 41 4D 00 00 00 55 22 00 00 00 73 6E 6F 77 5F 6D 74 6E 	SFAM...U....snow.mtn&lt;br /&gt;
73 70 65 61 6B 00 61 62 73 74 72 61 63 74 2F 74 65 72 72 61 	speak.abstract.terra&lt;br /&gt;
69 6E 5F 73 75 72 66 61 63 65 2F 73 6E 6F 77 2E 69 66 66 00 	in.surface.snow.iff.&lt;br /&gt;
FF FF 00 00 00 00 40 00 00 80 3F 01 00 00 00 	                ...............&lt;br /&gt;
&lt;br /&gt;
(int)              Family ID   (This ID is user by the layers to select this family)&lt;br /&gt;
(String)           File Name&lt;br /&gt;
(byte)(byte)(byte) unk  ?Color?&lt;br /&gt;
(float)            unk&lt;br /&gt;
(float)            unk&lt;br /&gt;
(int)              Child Count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
73 6E 6F 77 5F 6D 74 6E 73 70 65 61 6B 00 00 00 80 3F 	       snow.mtnspeak.....&lt;br /&gt;
&lt;br /&gt;
(string)           Shader Name&lt;br /&gt;
(float)            unk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;FGRP&amp;lt;/font&amp;gt;''' - Flora Family Group==   &lt;br /&gt;
&lt;br /&gt;
Flora families refer to grouping geometry -apt files- for selecting flora. (Select flora group properties, including flora family data)&lt;br /&gt;
&lt;br /&gt;
Each one of them decalre one flora group using  multiple appearance files.&lt;br /&gt;
&lt;br /&gt;
FGRP has x children (FFAM), FFAM has x children (Appearance Files)&lt;br /&gt;
&lt;br /&gt;
'''Family break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
46 46 41 4D 00 00 00 9D 01 00 00 00 66 65 72 6E 73 00 FF 80 	FFAM........ferns...&lt;br /&gt;
40 00 00 80 3F 00 00 00 00 02 00 00 00 	                        .............&lt;br /&gt;
&lt;br /&gt;
(int)              Family ID   (This ID is user by the layers to select this family)&lt;br /&gt;
(String)           Family Name&lt;br /&gt;
(byte)(byte)(byte) ukn  ?Color?&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              Child Count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
70 74 63 68 5F 65 6E 64 72 5F 66 72 73 74 5F 63 6C 75 73 74 	ptch.endr.frst.clust&lt;br /&gt;
65 72 5F 61 31 2E 61 70 74 00 00 00 80 3F 00 00 00 00 0A D7 	er.a1.apt...........&lt;br /&gt;
23 3C CD CC CC 3D 01 00 00 00 01 00 00 00 00 00 40 3F 00 00 	....................&lt;br /&gt;
20 40 	                                                        ..&lt;br /&gt;
&lt;br /&gt;
(String)           Appearance File Name &lt;br /&gt;
(float)            ukn&lt;br /&gt;
(?)                ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;RGRP&amp;lt;/font&amp;gt;''' - Radial Flora Family Group==   &lt;br /&gt;
Radial flora families refer to grouping shaders for placing radial flora. &lt;br /&gt;
&lt;br /&gt;
'''Family break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
52 46 41 4D 00 00 01 06 01 00 00 00 67 72 61 73 73 79 20 70 	RFAM........grassy.p&lt;br /&gt;
6C 61 69 6E 73 00 FF FF 00 00 00 80 3F 04 00 00 00 	        lains............&lt;br /&gt;
&lt;br /&gt;
(int)              Family ID   (This ID is user by the layers to select this family)&lt;br /&gt;
(String)           Family Name&lt;br /&gt;
(byte)(byte)(byte) ukn  ?Color?&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              Child Count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(String)           Shader Name (dds file)&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(?)                ukn&lt;br /&gt;
TODO..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;EGRP&amp;lt;/font&amp;gt;''' - Environment Family Group==  &lt;br /&gt;
                                &lt;br /&gt;
Declares the environement&lt;br /&gt;
&lt;br /&gt;
EGRP has x children (EFAM)&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
01 00 00 00 6D 61 69 6E 5F 62 61 73 65 00 FF FF 00 00 00 80 3F  	....main.base........&lt;br /&gt;
	&lt;br /&gt;
(int)                 Environment ID   (This ID is user by the layers to select this environment)&lt;br /&gt;
(String)              Environment Name                                                    &lt;br /&gt;
(byte)(byte)(byte)    ukn ?Color?&lt;br /&gt;
(float)               ukn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;MGRP&amp;lt;/font&amp;gt;''' - Fractal Family Group==  &lt;br /&gt;
&lt;br /&gt;
Fractal families refer to grouping fractals for reuse within different rules.&lt;br /&gt;
It's sub-divied into multiple groups (MFAM).&lt;br /&gt;
Each one of them declare a labelled fractal. &lt;br /&gt;
&lt;br /&gt;
MGRP has x children (MFAM)&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
4D 46 41 4D 44 41 54 41 00 00 00 1C 01 00 00 00 41 66 66 65 	MFAMDATA........Affe&lt;br /&gt;
63 74 6F 72 48 65 69 67 68 74 46 72 61 63 74 61 6C 5F 31 00 	ctorHeightFractal.1.&lt;br /&gt;
46 4F 52 4D 00 00 00 4C 4D 46 52 43 46 4F 52 4D 00 00 00 40 	FORM...LMFRCFORM....&lt;br /&gt;
30 30 30 31 44 41 54 41 00 00 00 34 00 00 00 00 00 00 00 00 	0001DATA...4........&lt;br /&gt;
00 00 00 3F 00 00 00 00 33 33 33 3F 02 00 00 00 00 00 80 40 	........333.........&lt;br /&gt;
00 00 00 3F 0A D7 23 3C 0A D7 23 3C 00 00 00 00 00 00 00 00 	....................&lt;br /&gt;
00 00 00 00 	&lt;br /&gt;
&lt;br /&gt;
(int)          Fractal ID (This ID is user by the layers to select this family)&lt;br /&gt;
(String)       Fractal Label&lt;br /&gt;
&lt;br /&gt;
MFRC FORM [...] DATA, byte count&lt;br /&gt;
&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(?)            ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;LYRS&amp;lt;/font&amp;gt;''' - Layers==&lt;br /&gt;
&lt;br /&gt;
=== Layers &amp;amp; Affectors ===&lt;br /&gt;
&lt;br /&gt;
Basically the role of layers is to affect the data contained in the different families.&lt;br /&gt;
They can contain any number of other sub-layers. Their order is important.&lt;br /&gt;
&lt;br /&gt;
[[Image:trn_layers.jpg]]&lt;br /&gt;
&lt;br /&gt;
A layer deals with the families trough Affectors. There are different types of them, each one has it's own role.&lt;br /&gt;
Can have Affector for texturing, flora,  areas...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Boundaries, filters, and affectors can be defined in layers and sublayers,&lt;br /&gt;
such that a single location in the terrain can have multiple terrain rules.&lt;br /&gt;
A layer without boundaries (or filters) is &amp;quot;unbounded,&amp;quot; and can affect as much&lt;br /&gt;
as the entire landscape. A layer with a boundary allows the affectors in the&lt;br /&gt;
layer and sublayers to be applied to the region specified by the boundary.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Affectors'''==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
46 4F 52 4D 00 00 00 70 41 46 53 43 46 4F 52 4D 00 00 00 64 	FORM...pAFSCFORM...d&lt;br /&gt;
30 30 30 34 46 4F 52 4D 00 00 00 3C 49 48 44 52 46 4F 52 4D 	0004FORM....IHDRFORM&lt;br /&gt;
00 00 00 30 30 30 30 31 44 41 54 41 00 00 00 24 01 00 00 00 	...00001DATA........&lt;br /&gt;
41 66 66 65 63 74 6F 72 46 6C 6F 72 61 43 6F 6C 6C 69 64 61 	AffectorFloraCollida&lt;br /&gt;
62 6C 65 43 6F 6E 73 74 61 6E 74 00 44 41 54 41 00 00 00 14 	bleConstant.DATA....&lt;br /&gt;
05 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 80 3F 	....................&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Every Affector has an IHDR child wich is holding the user-custom name of the affector (here AffectorFloraCollidableConstant).&lt;br /&gt;
&lt;br /&gt;
The 4 bytes Before the name is a Bool wich enable/disable the affector.&lt;br /&gt;
&lt;br /&gt;
The affector-specific data is conatined After the IHDR in the last DATA form, it always starts with a byte counter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+ '''Boundaries'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BREC&amp;lt;/font&amp;gt;'''||Boundary Rectangle||Delimits a rectangle using 4 float: X1, Y1, X2, Y2 (Select rectangle boundary rule properties, including feathering distance, boundary left/right and near/far coords and local water table height, shader and sahder size.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 00 7A 44 00 00 7A 44 00 00 AF 44 &lt;br /&gt;
00 00 AF 44 00 00 00 00 00 00 80 3F &lt;br /&gt;
&lt;br /&gt;
(float)   X1&lt;br /&gt;
(float)   Y1&lt;br /&gt;
(float)   X2&lt;br /&gt;
(float)   Y2&lt;br /&gt;
(int)     Feathering Type&lt;br /&gt;
(float)   Feathering Amount&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BCIR&amp;lt;/font&amp;gt;'''||Boundary Circle||Delimits a circle using 3 float: Xo, Yo, Radius  (Select circle boundary rule properties, including feathering distance, boundary center coords, and boundary radius.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 00 48 43 00 00 48 43 00 00 48 43 &lt;br /&gt;
01 00 00 00 CD CC CC 3D &lt;br /&gt;
&lt;br /&gt;
(float)   X&lt;br /&gt;
(float)   Y&lt;br /&gt;
(float)   Radius&lt;br /&gt;
(float)   Y2&lt;br /&gt;
(int)     Feathering Type&lt;br /&gt;
(float)   Feathering Amount&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BPOL&amp;lt;/font&amp;gt;'''||Boundary Polygon||Delimits a n-sided closed polygon area using 2 floats (Xo,Yo) for each point.  (Select polygon boundary rule properties, includibng feathering distance  and including local water table height, shader and shader size.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Water Area example&lt;br /&gt;
&lt;br /&gt;
04 00 00 00 00 00 00 00 00 00 00 00 00 00 15 C3 00 00 00 00 	....................&lt;br /&gt;
00 00 15 C3 00 00 15 C3 00 00 00 00 00 00 15 C3 03 00 00 00 	....................&lt;br /&gt;
00 00 48 42 01 00 00 00 00 00 20 C1 00 00 00 40 77 74 65 72 	..HB............wter&lt;br /&gt;
5F 73 70 65 63 00 	                                        .spec.&lt;br /&gt;
&lt;br /&gt;
(int)    Point Count&lt;br /&gt;
&lt;br /&gt;
- List -----------&lt;br /&gt;
(float)  X&lt;br /&gt;
(float)  Y&lt;br /&gt;
------------------&lt;br /&gt;
&lt;br /&gt;
(int)    Fethering Type&lt;br /&gt;
(float)  Shore smoothness  (0 is vertical, 50 looks normal. I don't know what scale mesurement is used) &lt;br /&gt;
(int)    Bool Water On/Off&lt;br /&gt;
(float)  Water Height&lt;br /&gt;
(float)  Water Shader Size (Common size = 2)&lt;br /&gt;
(string) Water Shader  (wter_spec = Look in the file header??)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BPLN&amp;lt;/font&amp;gt;'''||Boundary PolyLine||Delimits a n-sided line area using 2 floats (Xo,Yo) for each point and a float for the width.  (Select polyline boundary rule properties, including feathering distance and width.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
08 00 00 00 00 00 80 3E 00 00 00 3F 00 00 00 00 00 00 74 41 &lt;br /&gt;
00 00 0C C1 00 00 E8 41 00 00 0C C1 00 00 50 42 00 00 78 C1 &lt;br /&gt;
00 80 85 42 00 00 D8 C1 00 80 91 42 00 00 12 C2 00 00 93 42 &lt;br /&gt;
00 00 41 C2 00 00 94 42 01 00 00 00 00 00 80 3F 00 00 20 41 &lt;br /&gt;
&lt;br /&gt;
(int)    Point Count&lt;br /&gt;
&lt;br /&gt;
- List -----------&lt;br /&gt;
(float)  X&lt;br /&gt;
(float)  Y&lt;br /&gt;
------------------&lt;br /&gt;
&lt;br /&gt;
(int)     Feathering Type&lt;br /&gt;
(float)   Feathering Amount&lt;br /&gt;
(float)   Line Width&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: '''Boundaries can have a special footer allowing them to behave as a water area.'''(TODO)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+ '''Filters'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FDIR&amp;lt;/font&amp;gt;'''||Filter Direction||Select filter direction rule properties, including feathering distance, and min and max angle settings for filter setting to have effect.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FFRA&amp;lt;/font&amp;gt;'''||Filter Fractal||Delimits an area generated by a 2d fractal on the ground.  (Select filter fractal rule properties incuding fractal family, low and high fractal settings and feathering distance.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FHGT&amp;lt;/font&amp;gt;'''||Filter Height||Select filter height rule properties, including feathering, distance, filter low height, and filter high height.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FSLP&amp;lt;/font&amp;gt;'''||Filter Slope||Select filter slope rule properties, including feathering distance, filter min angle, and filter max angle.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 00 00 00 00 00 C8 41 01 00 00 00 CD CC 8C &lt;br /&gt;
          &lt;br /&gt;
(float)   Minimum Angle&lt;br /&gt;
(float)   Maximum Angle&lt;br /&gt;
(int)     Type?&lt;br /&gt;
(byte)    ?&lt;br /&gt;
(byte)    ?&lt;br /&gt;
(byte)    ?&lt;br /&gt;
Note the 3 last bytes may be a color.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Texture / Shaders Affectors'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ASCN&amp;lt;/font&amp;gt;'''||Affector Shader Constant||Affect a shader using the family_id and the shader_id this family. (Select rule shader and family and feathering parameters.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ASCR&amp;lt;/font&amp;gt;'''||Affector Shader Replace||Replace a shader with another shader (Select rule shader replace families, including source family (the family to be replaced), destination family (the family to replace with), and feathering parameters.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ACCN&amp;lt;/font&amp;gt;'''||Affector Color Constant||Select color for rule.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FSHD&amp;lt;/font&amp;gt;'''||Filter Shader||Select filter shader rule properties, including shader family.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Terrain Affectors'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AHCN&amp;lt;/font&amp;gt;'''||Affector Height Constant||Raises or lowers the ground using float for delta and float(scalar?) for slope-smooting. (Select terrain height value for rule.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
01 00 00 00 00 00 C8 C2 &lt;br /&gt;
&lt;br /&gt;
(int)     ukn&lt;br /&gt;
(float)   Final Height&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AHFR&amp;lt;/font&amp;gt;'''||Affector Height Fractal||Raises or lowers the ground irregulary using a fractal type from the Fractal Family. Float for delta and float(scalar?) (Select terrain height value for rule for fractal family.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
50 41 52 4D 00 00 00 0C 02 00 00 00 00 00 00 00 00 00 48 C2 &lt;br /&gt;
          &lt;br /&gt;
(String)  PARAM&lt;br /&gt;
(int)     Byte Count&lt;br /&gt;
(int)     Index of a Fractal Family in MGRP -non regular-&lt;br /&gt;
(?) ukn&lt;br /&gt;
(float)   Height Delta, can be negative&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AHFT&amp;lt;/font&amp;gt;'''||Affector Height Terrace||Select terrace height and flat ratio values for rule.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Flora Affectors'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFSC&amp;lt;/font&amp;gt;'''||Affector Flora Static Collidable||Sets the amount of collidable flora. (Select to add/remove flora, specify flora type and set flora density for static collidable flora.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
05 00 00 00 01 00 00 00 00 00 00 00&lt;br /&gt;
01 00 00 00 00 00 80 3F&lt;br /&gt;
&lt;br /&gt;
(int)   Index of a family in FGRP -not regular-&lt;br /&gt;
(int)   ukn&lt;br /&gt;
(?)     ukn&lt;br /&gt;
(int)   ukn&lt;br /&gt;
(float) Feathering&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFSN&amp;lt;/font&amp;gt;'''||Affector Flora Static Non-Collidable||Sets the amount of Non-collidable flora. (Select to add/remove flora, specify flora type and set flora density for static non-collidable flora.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFDN&amp;lt;/font&amp;gt;'''||Affector Flora Dynamic Near||I don't know much about those yet. Seems like they change the near/far radial displaying. They're often coupled to the flora affectors, for instance when cleaning an area for a city.  (Select to add/remove flora, specify flora type and set flora destiny for dynamic near flora.)&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFDF&amp;lt;/font&amp;gt;'''||Affector Flora Dynamic Far|| (Select to add/remove flora, specify flora type and set flora density for dynamic far flora.)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Unknown'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AENV&amp;lt;/font&amp;gt;'''||Environment||Select enviroment group rule properties.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AEXC&amp;lt;/font&amp;gt;'''||Affector Exclude||This one shows up on the Patent App.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AROA&amp;lt;/font&amp;gt;'''||Affector Road||Select road rule properties, including width, shader, feathering height distance, and feathering shader distance.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ARIV&amp;lt;/font&amp;gt;'''||Affector River||Select river rule properties, including width, trench depth, flow velocity, bank and bottom shaders, water shader, water depth, water width, feathering distance.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ACRF&amp;lt;/font&amp;gt;'''||Affector Color Ramp Fractal||Select rule family and color ramp.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ACRH&amp;lt;/font&amp;gt;'''||Affector Color Ramp Height||Select rule color ramp and height low/high values.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Layer&lt;br /&gt;
&lt;br /&gt;
    a. AffectorHeightConstant, 10&lt;br /&gt;
&lt;br /&gt;
    b. AffectorShaderConstant, Rock&lt;br /&gt;
&lt;br /&gt;
2. Layer&lt;br /&gt;
&lt;br /&gt;
    a. BoundaryCircle, x=500, y=500, r=500, feather=InOut&lt;br /&gt;
&lt;br /&gt;
    b. AffectorHeightConstant, 0&lt;br /&gt;
&lt;br /&gt;
    c. AffectorShaderConstant, Mud&lt;br /&gt;
&lt;br /&gt;
    d. Layer&lt;br /&gt;
&lt;br /&gt;
        i. FilterHeightmin=13,max=17&lt;br /&gt;
&lt;br /&gt;
        ii. AffectorColorConstant, BLACK&lt;br /&gt;
&lt;br /&gt;
3. Layer&lt;br /&gt;
&lt;br /&gt;
    a. BoundaryRectangle, min=-500, -500, max=500, 500&lt;br /&gt;
&lt;br /&gt;
    b. AffectorFloraStaticCollidableConstant, Conifer&lt;br /&gt;
&lt;br /&gt;
    c. AffectorFloraDynamicNearConstant, Dead grass&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Description'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Using the example rules listed above, the corresponding rule &lt;br /&gt;
description can perform the following:&lt;br /&gt;
&lt;br /&gt;
1. Set the height of the terrain everywhere to 10 meters(1a) and assign the rock shader(1b). &lt;br /&gt;
&lt;br /&gt;
2. Then, in a 500 meter circle(2a) originating from coordinates (500, 500),&lt;br /&gt;
gradually decrease the height from 10 meters to 0 meters(2b), place the mud shader(2c),&lt;br /&gt;
and create a black band where the height of the terrain at a given sample point is between 13 and 17 meters.(2d, 2di, 2dii) &lt;br /&gt;
&lt;br /&gt;
3. Finally, in a rectangle(3a) from coordinates (-500, -500) to (500, 500), place &lt;br /&gt;
conifer trees(3b) and dead grass(3c) within the rectangle.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Powerking</name></author>	</entry>

	<entry>
		<id>https://wiki.swganh.org/index.php?title=TRN_(FileFormat)&amp;diff=72284</id>
		<title>TRN (FileFormat)</title>
		<link rel="alternate" type="text/html" href="https://wiki.swganh.org/index.php?title=TRN_(FileFormat)&amp;diff=72284"/>
				<updated>2010-05-22T01:16:39Z</updated>
		
		<summary type="html">&lt;p&gt;Powerking: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageHeader|FileFormat|TRN}}&lt;br /&gt;
='''&amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;File Header&amp;lt;/font&amp;gt;'''=&lt;br /&gt;
&lt;br /&gt;
The general map parameters, as well as flora parameters are defined here&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
4A 3A 5C 73 77 67 5C 63 75 72 72 65 6E 74 5C 64 61 74 61 5C 	J..swg.current.data.&lt;br /&gt;
73 6B 75 2E 30 5C 73 79 73 2E 73 68 61 72 65 64 5C 62 75 69 	sku.0.sys.shared.bui&lt;br /&gt;
6C 74 5C 67 61 6D 65 5C 74 65 72 72 61 69 6E 5C 64 61 6E 74 	lt.game.terrain.dant&lt;br /&gt;
6F 6F 69 6E 65 2E 74 72 6E 00 00 00 80 46 00 00 00 41 02 00 	ooine.trn....F...A..&lt;br /&gt;
00 00 01 00 00 00 CD CC CC BD 00 00 00 40 77 74 65 72 5F 64 	..............wter.d&lt;br /&gt;
61 6E 74 5F 6C 61 6B 65 00 00 30 04 46 00 00 00 00 00 00 00 	ant.lake..0.F.......&lt;br /&gt;
43 00 00 00 41 00 00 00 40 00 00 00 00 00 00 00 00 00 00 80 	C...A...............&lt;br /&gt;
42 00 00 80 40 00 00 00 3F 00 00 00 00 00 00 00 00 00 00 F0 	B...................&lt;br /&gt;
41 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 43 00 00 00 	A...............C...&lt;br /&gt;
44 00 00 00 42 00 00 00 41 00 00 00 00 	                        D...B...A....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
='''&amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;TGEN&amp;lt;/font&amp;gt;''' - Terrain Generator =&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The rules in the terrain generation system are also referred to as affectors,and&lt;br /&gt;
are organized into layers. Boundaries refer to terrain designer- or artist-defined&lt;br /&gt;
regions of virtual terrain for which the desired rules have effect. Filters refer &lt;br /&gt;
to conditions to be considered when applying affectors. Layers can be arranged &lt;br /&gt;
in a hierarchy with a parent-child or tree-leaf relationship. Examples of boundaries &lt;br /&gt;
include circles, rectangles, and polygons. Examples of filters include filtering &lt;br /&gt;
by slope, height, shader, direction and fractal. Examples of affectors include &lt;br /&gt;
those that affect height, color, shader, flora, and radial flora. Boundaries, filters &lt;br /&gt;
and layers are described in greater detail below.&lt;br /&gt;
&lt;br /&gt;
The terrain generation system also includes families, which refer to groups of &lt;br /&gt;
assets such as textures, geometry or even algorithms. Families can include children &lt;br /&gt;
with weights. This could involve choosing an asset by selecting a one weighted child. &lt;br /&gt;
For example, this could allow the users to choose a &amp;quot;grass&amp;quot; family for a region, but &lt;br /&gt;
when the terrain system generates the grass family, it can choose one of the children &lt;br /&gt;
of the grass family, which results in the rendering of a single grass shader.&lt;br /&gt;
&lt;br /&gt;
Examples of families include shader families, blend families, flora families, &lt;br /&gt;
radial flora families, and fractal families. Shader families refer to grouping &lt;br /&gt;
shaders for placing textures. Blend families refer to grouping shaders for selecting &lt;br /&gt;
alpha blend masks. Flora families refer to grouping geometry for selecting flora. &lt;br /&gt;
Radial flora families refer to grouping shaders for placing radial flora. &lt;br /&gt;
Fractal families refer to grouping fractals for reuse within different rules.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Terrain generator (form name : TGEN)&lt;br /&gt;
There are 6 different sections.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- The Shader family          (SGRP)&lt;br /&gt;
- The Flora family           (FRGP)&lt;br /&gt;
- The Radial Flora family    (RGRP)&lt;br /&gt;
- The Environment family     (EGRP)&lt;br /&gt;
- The Fractal family         (MGRP)&lt;br /&gt;
- The Layers family          (LYRS)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;SGRP&amp;lt;/font&amp;gt;''' - Shader Family Group==&lt;br /&gt;
&lt;br /&gt;
Shader families refer to grouping shaders for placing textures&lt;br /&gt;
&lt;br /&gt;
It's sub-divied into multiple surface families (SFAM).&lt;br /&gt;
&lt;br /&gt;
Each one of them declare mutliple shaders using a surface file. &lt;br /&gt;
&lt;br /&gt;
SGRP has x children (SFAM), SFAM has x children (Shaders)&lt;br /&gt;
&lt;br /&gt;
'''Family break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
53 46 41 4D 00 00 00 55 22 00 00 00 73 6E 6F 77 5F 6D 74 6E 	SFAM...U....snow.mtn&lt;br /&gt;
73 70 65 61 6B 00 61 62 73 74 72 61 63 74 2F 74 65 72 72 61 	speak.abstract.terra&lt;br /&gt;
69 6E 5F 73 75 72 66 61 63 65 2F 73 6E 6F 77 2E 69 66 66 00 	in.surface.snow.iff.&lt;br /&gt;
FF FF 00 00 00 00 40 00 00 80 3F 01 00 00 00 	                ...............&lt;br /&gt;
&lt;br /&gt;
(int)              Family ID   (This ID is user by the layers to select this family)&lt;br /&gt;
(String)           File Name&lt;br /&gt;
(byte)(byte)(byte) unk  ?Color?&lt;br /&gt;
(float)            unk&lt;br /&gt;
(float)            unk&lt;br /&gt;
(int)              Child Count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
73 6E 6F 77 5F 6D 74 6E 73 70 65 61 6B 00 00 00 80 3F 	       snow.mtnspeak.....&lt;br /&gt;
&lt;br /&gt;
(string)           Shader Name&lt;br /&gt;
(float)            unk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;FGRP&amp;lt;/font&amp;gt;''' - Flora Family Group==   &lt;br /&gt;
&lt;br /&gt;
Flora families refer to grouping geometry -apt files- for selecting flora. (Select flora group properties, including flora family data)&lt;br /&gt;
&lt;br /&gt;
Each one of them decalre one flora group using  multiple appearance files.&lt;br /&gt;
&lt;br /&gt;
FGRP has x children (FFAM), FFAM has x children (Appearance Files)&lt;br /&gt;
&lt;br /&gt;
'''Family break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
46 46 41 4D 00 00 00 9D 01 00 00 00 66 65 72 6E 73 00 FF 80 	FFAM........ferns...&lt;br /&gt;
40 00 00 80 3F 00 00 00 00 02 00 00 00 	                        .............&lt;br /&gt;
&lt;br /&gt;
(int)              Family ID   (This ID is user by the layers to select this family)&lt;br /&gt;
(String)           Family Name&lt;br /&gt;
(byte)(byte)(byte) ukn  ?Color?&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              Child Count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
70 74 63 68 5F 65 6E 64 72 5F 66 72 73 74 5F 63 6C 75 73 74 	ptch.endr.frst.clust&lt;br /&gt;
65 72 5F 61 31 2E 61 70 74 00 00 00 80 3F 00 00 00 00 0A D7 	er.a1.apt...........&lt;br /&gt;
23 3C CD CC CC 3D 01 00 00 00 01 00 00 00 00 00 40 3F 00 00 	....................&lt;br /&gt;
20 40 	                                                        ..&lt;br /&gt;
&lt;br /&gt;
(String)           Appearance File Name &lt;br /&gt;
(float)            ukn&lt;br /&gt;
(?)                ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;RGRP&amp;lt;/font&amp;gt;''' - Radial Flora Family Group==   &lt;br /&gt;
Radial flora families refer to grouping shaders for placing radial flora. &lt;br /&gt;
&lt;br /&gt;
'''Family break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
52 46 41 4D 00 00 01 06 01 00 00 00 67 72 61 73 73 79 20 70 	RFAM........grassy.p&lt;br /&gt;
6C 61 69 6E 73 00 FF FF 00 00 00 80 3F 04 00 00 00 	        lains............&lt;br /&gt;
&lt;br /&gt;
(int)              Family ID   (This ID is user by the layers to select this family)&lt;br /&gt;
(String)           Family Name&lt;br /&gt;
(byte)(byte)(byte) ukn  ?Color?&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              Child Count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(String)           Shader Name (dds file)&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(float)            ukn&lt;br /&gt;
(int)              ukn&lt;br /&gt;
(?)                ukn&lt;br /&gt;
TODO..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;EGRP&amp;lt;/font&amp;gt;''' - Environment Family Group==  &lt;br /&gt;
                                &lt;br /&gt;
Declares the environement&lt;br /&gt;
&lt;br /&gt;
EGRP has x children (EFAM)&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
01 00 00 00 6D 61 69 6E 5F 62 61 73 65 00 FF FF 00 00 00 80 3F  	....main.base........&lt;br /&gt;
	&lt;br /&gt;
(int)                 Environment ID   (This ID is user by the layers to select this environment)&lt;br /&gt;
(String)              Environment Name                                                    &lt;br /&gt;
(byte)(byte)(byte)    ukn ?Color?&lt;br /&gt;
(float)               ukn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;MGRP&amp;lt;/font&amp;gt;''' - Fractal Family Group==  &lt;br /&gt;
&lt;br /&gt;
Fractal families refer to grouping fractals for reuse within different rules.&lt;br /&gt;
It's sub-divied into multiple groups (MFAM).&lt;br /&gt;
Each one of them declare a labelled fractal. &lt;br /&gt;
&lt;br /&gt;
MGRP has x children (MFAM)&lt;br /&gt;
&lt;br /&gt;
'''Child break-down:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
4D 46 41 4D 44 41 54 41 00 00 00 1C 01 00 00 00 41 66 66 65 	MFAMDATA........Affe&lt;br /&gt;
63 74 6F 72 48 65 69 67 68 74 46 72 61 63 74 61 6C 5F 31 00 	ctorHeightFractal.1.&lt;br /&gt;
46 4F 52 4D 00 00 00 4C 4D 46 52 43 46 4F 52 4D 00 00 00 40 	FORM...LMFRCFORM....&lt;br /&gt;
30 30 30 31 44 41 54 41 00 00 00 34 00 00 00 00 00 00 00 00 	0001DATA...4........&lt;br /&gt;
00 00 00 3F 00 00 00 00 33 33 33 3F 02 00 00 00 00 00 80 40 	........333.........&lt;br /&gt;
00 00 00 3F 0A D7 23 3C 0A D7 23 3C 00 00 00 00 00 00 00 00 	....................&lt;br /&gt;
00 00 00 00 	&lt;br /&gt;
&lt;br /&gt;
(int)          Fractal ID (This ID is user by the layers to select this family)&lt;br /&gt;
(String)       Fractal Label&lt;br /&gt;
&lt;br /&gt;
MFRC FORM [...] DATA, byte count&lt;br /&gt;
&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(float)        ukn&lt;br /&gt;
(?)            ukn&lt;br /&gt;
(int)          ukn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;LYRS&amp;lt;/font&amp;gt;''' - Layers==&lt;br /&gt;
&lt;br /&gt;
=== Layers &amp;amp; Affectors ===&lt;br /&gt;
&lt;br /&gt;
Basically the role of layers is to affect the data contained in the different families.&lt;br /&gt;
They can contain any number of other sub-layers. Their order is important.&lt;br /&gt;
&lt;br /&gt;
[[Image:trn_layers.jpg]]&lt;br /&gt;
&lt;br /&gt;
A layer deals with the families trough Affectors. There are different types of them, each one has it's own role.&lt;br /&gt;
Can have Affector for texturing, flora,  areas...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Boundaries, filters, and affectors can be defined in layers and sublayers,&lt;br /&gt;
such that a single location in the terrain can have multiple terrain rules.&lt;br /&gt;
A layer without boundaries (or filters) is &amp;quot;unbounded,&amp;quot; and can affect as much&lt;br /&gt;
as the entire landscape. A layer with a boundary allows the affectors in the&lt;br /&gt;
layer and sublayers to be applied to the region specified by the boundary.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Affectors'''==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
46 4F 52 4D 00 00 00 70 41 46 53 43 46 4F 52 4D 00 00 00 64 	FORM...pAFSCFORM...d&lt;br /&gt;
30 30 30 34 46 4F 52 4D 00 00 00 3C 49 48 44 52 46 4F 52 4D 	0004FORM....IHDRFORM&lt;br /&gt;
00 00 00 30 30 30 30 31 44 41 54 41 00 00 00 24 01 00 00 00 	...00001DATA........&lt;br /&gt;
41 66 66 65 63 74 6F 72 46 6C 6F 72 61 43 6F 6C 6C 69 64 61 	AffectorFloraCollida&lt;br /&gt;
62 6C 65 43 6F 6E 73 74 61 6E 74 00 44 41 54 41 00 00 00 14 	bleConstant.DATA....&lt;br /&gt;
05 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 80 3F 	....................&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Every Affector has an IHDR child wich is holding the user-custom name of the affector (here AffectorFloraCollidableConstant).&lt;br /&gt;
&lt;br /&gt;
The 4 bytes Before the name is a Bool wich enable/disable the affector.&lt;br /&gt;
&lt;br /&gt;
The affector-specific data is conatined After the IHDR in the last DATA form, it always starts with a byte counter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+ '''Boundaries'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BREC&amp;lt;/font&amp;gt;'''||Boundary Rectangle||Delimits a rectangle using 4 float: X1, Y1, X2, Y2 (Select rectangle boundary rule properties, including feathering distance, boundary left/right and near/far coords and local water table height, shader and sahder size.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 00 7A 44 00 00 7A 44 00 00 AF 44 &lt;br /&gt;
00 00 AF 44 00 00 00 00 00 00 80 3F &lt;br /&gt;
&lt;br /&gt;
(float)   X1&lt;br /&gt;
(float)   Y1&lt;br /&gt;
(float)   X2&lt;br /&gt;
(float)   Y2&lt;br /&gt;
(int)     Feathering Type&lt;br /&gt;
(float)   Feathering Amount&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BCIR&amp;lt;/font&amp;gt;'''||Boundary Circle||Delimits a circle using 3 float: Xo, Yo, Radius  (Select circle boundary rule properties, including feathering distance, boundary center coords, and boundary radius.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 00 48 43 00 00 48 43 00 00 48 43 &lt;br /&gt;
01 00 00 00 CD CC CC 3D &lt;br /&gt;
&lt;br /&gt;
(float)   X&lt;br /&gt;
(float)   Y&lt;br /&gt;
(float)   Radius&lt;br /&gt;
(float)   Y2&lt;br /&gt;
(int)     Feathering Type&lt;br /&gt;
(float)   Feathering Amount&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BPOL&amp;lt;/font&amp;gt;'''||Boundary Polygon||Delimits a n-sided closed polygon area using 2 floats (Xo,Yo) for each point.  (Select polygon boundary rule properties, includibng feathering distance  and including local water table height, shader and shader size.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Water Area example&lt;br /&gt;
&lt;br /&gt;
04 00 00 00 00 00 00 00 00 00 00 00 00 00 15 C3 00 00 00 00 	....................&lt;br /&gt;
00 00 15 C3 00 00 15 C3 00 00 00 00 00 00 15 C3 03 00 00 00 	....................&lt;br /&gt;
00 00 48 42 01 00 00 00 00 00 20 C1 00 00 00 40 77 74 65 72 	..HB............wter&lt;br /&gt;
5F 73 70 65 63 00 	                                        .spec.&lt;br /&gt;
&lt;br /&gt;
(int)    Point Count&lt;br /&gt;
&lt;br /&gt;
- List -----------&lt;br /&gt;
(float)  X&lt;br /&gt;
(float)  Y&lt;br /&gt;
------------------&lt;br /&gt;
&lt;br /&gt;
(int)    Fethering Type&lt;br /&gt;
(float)  Shore smoothness  (0 is vertical, 50 looks normal. I don't know what scale mesurement is used) &lt;br /&gt;
(int)    Bool Water On/Off&lt;br /&gt;
(float)  Water Height&lt;br /&gt;
(float)  Water Shader Size (Common size = 2)&lt;br /&gt;
(string) Water Shader  (wter_spec = Look in the file header??)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;BPLN&amp;lt;/font&amp;gt;'''||Boundary PolyLine||Delimits a n-sided line area using 2 floats (Xo,Yo) for each point and a float for the width.  (Select polyline boundary rule properties, including feathering distance and width.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
08 00 00 00 00 00 80 3E 00 00 00 3F 00 00 00 00 00 00 74 41 &lt;br /&gt;
00 00 0C C1 00 00 E8 41 00 00 0C C1 00 00 50 42 00 00 78 C1 &lt;br /&gt;
00 80 85 42 00 00 D8 C1 00 80 91 42 00 00 12 C2 00 00 93 42 &lt;br /&gt;
00 00 41 C2 00 00 94 42 01 00 00 00 00 00 80 3F 00 00 20 41 &lt;br /&gt;
&lt;br /&gt;
(int)    Point Count&lt;br /&gt;
&lt;br /&gt;
- List -----------&lt;br /&gt;
(float)  X&lt;br /&gt;
(float)  Y&lt;br /&gt;
------------------&lt;br /&gt;
&lt;br /&gt;
(int)     Feathering Type&lt;br /&gt;
(float)   Feathering Amount&lt;br /&gt;
(float)   Line Width&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: '''Boundaries can have a special footer allowing them to behave as a water area.'''(TODO)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+ '''Filters'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;????&amp;lt;/font&amp;gt;'''||Filter Direction||Select filter direction rule properties, including feathering distance, and min and max angle settings for filter setting to have effect.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FFRA&amp;lt;/font&amp;gt;'''||Filter Fractal||Delimits an area generated by a 2d fractal on the ground.  (Select filter fractal rule properties incuding fractal family, low and high fractal settings and feathering distance.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FHGT&amp;lt;/font&amp;gt;'''||Filter Height||Select filter height rule properties, including feathering, distance, filter low height, and filter high height.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FSLP&amp;lt;/font&amp;gt;'''||Filter Slope||Select filter slope rule properties, including feathering distance, filter min angle, and filter max angle.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 00 00 00 00 00 C8 41 01 00 00 00 CD CC 8C &lt;br /&gt;
          &lt;br /&gt;
(float)   Minimum Angle&lt;br /&gt;
(float)   Maximum Angle&lt;br /&gt;
(int)     Type?&lt;br /&gt;
(byte)    ?&lt;br /&gt;
(byte)    ?&lt;br /&gt;
(byte)    ?&lt;br /&gt;
Note the 3 last bytes may be a color.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Texture / Shaders Affectors'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ASCN&amp;lt;/font&amp;gt;'''||Affector Shader Constant||Affect a shader using the family_id and the shader_id this family. (Select rule shader and family and feathering parameters.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ASCR&amp;lt;/font&amp;gt;'''||Affector Shader Replace||Replace a shader with another shader (Select rule shader replace families, including source family (the family to be replaced), destination family (the family to replace with), and feathering parameters.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ACCN&amp;lt;/font&amp;gt;'''||Affector Color Constant||Select color for rule.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;FSHD&amp;lt;/font&amp;gt;'''||Filter Shader||Select filter shader rule properties, including shader family.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Terrain Affectors'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AHCN&amp;lt;/font&amp;gt;'''||Affector Height Constant||Raises or lowers the ground using float for delta and float(scalar?) for slope-smooting. (Select terrain height value for rule.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
01 00 00 00 00 00 C8 C2 &lt;br /&gt;
&lt;br /&gt;
(int)     ukn&lt;br /&gt;
(float)   Final Height&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AHFR&amp;lt;/font&amp;gt;'''||Affector Height Fractal||Raises or lowers the ground irregulary using a fractal type from the Fractal Family. Float for delta and float(scalar?) (Select terrain height value for rule for fractal family.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
50 41 52 4D 00 00 00 0C 02 00 00 00 00 00 00 00 00 00 48 C2 &lt;br /&gt;
          &lt;br /&gt;
(String)  PARAM&lt;br /&gt;
(int)     Byte Count&lt;br /&gt;
(int)     Index of a Fractal Family in MGRP -non regular-&lt;br /&gt;
(?) ukn&lt;br /&gt;
(float)   Height Delta, can be negative&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AHFT&amp;lt;/font&amp;gt;'''||Affector Height Terrace||Select terrace height and flat ratio values for rule.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Flora Affectors'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFSC&amp;lt;/font&amp;gt;'''||Affector Flora Static Collidable||Sets the amount of collidable flora. (Select to add/remove flora, specify flora type and set flora density for static collidable flora.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
05 00 00 00 01 00 00 00 00 00 00 00&lt;br /&gt;
01 00 00 00 00 00 80 3F&lt;br /&gt;
&lt;br /&gt;
(int)   Index of a family in FGRP -not regular-&lt;br /&gt;
(int)   ukn&lt;br /&gt;
(?)     ukn&lt;br /&gt;
(int)   ukn&lt;br /&gt;
(float) Feathering&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFSN&amp;lt;/font&amp;gt;'''||Affector Flora Static Non-Collidable||Sets the amount of Non-collidable flora. (Select to add/remove flora, specify flora type and set flora density for static non-collidable flora.)&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFDN&amp;lt;/font&amp;gt;'''||Affector Flora Dynamic Near||I don't know much about those yet. Seems like they change the near/far radial displaying. They're often coupled to the flora affectors, for instance when cleaning an area for a city.  (Select to add/remove flora, specify flora type and set flora destiny for dynamic near flora.)&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AFDF&amp;lt;/font&amp;gt;'''||Affector Flora Dynamic Far|| (Select to add/remove flora, specify flora type and set flora density for dynamic far flora.)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ '''Unknown'''&lt;br /&gt;
|- &lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AENV&amp;lt;/font&amp;gt;'''||Environment||Select enviroment group rule properties.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AEXC&amp;lt;/font&amp;gt;'''||Affector Exclude||This one shows up on the Patent App.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;AROA&amp;lt;/font&amp;gt;'''||Affector Road||Select road rule properties, including width, shader, feathering height distance, and feathering shader distance.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ARIV&amp;lt;/font&amp;gt;'''||Affector River||Select river rule properties, including width, trench depth, flow velocity, bank and bottom shaders, water shader, water depth, water width, feathering distance.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ACRF&amp;lt;/font&amp;gt;'''||Affector Color Ramp Fractal||Select rule family and color ramp.&lt;br /&gt;
|-&lt;br /&gt;
||'''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;ACRH&amp;lt;/font&amp;gt;'''||Affector Color Ramp Height||Select rule color ramp and height low/high values.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Layer&lt;br /&gt;
&lt;br /&gt;
    a. AffectorHeightConstant, 10&lt;br /&gt;
&lt;br /&gt;
    b. AffectorShaderConstant, Rock&lt;br /&gt;
&lt;br /&gt;
2. Layer&lt;br /&gt;
&lt;br /&gt;
    a. BoundaryCircle, x=500, y=500, r=500, feather=InOut&lt;br /&gt;
&lt;br /&gt;
    b. AffectorHeightConstant, 0&lt;br /&gt;
&lt;br /&gt;
    c. AffectorShaderConstant, Mud&lt;br /&gt;
&lt;br /&gt;
    d. Layer&lt;br /&gt;
&lt;br /&gt;
        i. FilterHeightmin=13,max=17&lt;br /&gt;
&lt;br /&gt;
        ii. AffectorColorConstant, BLACK&lt;br /&gt;
&lt;br /&gt;
3. Layer&lt;br /&gt;
&lt;br /&gt;
    a. BoundaryRectangle, min=-500, -500, max=500, 500&lt;br /&gt;
&lt;br /&gt;
    b. AffectorFloraStaticCollidableConstant, Conifer&lt;br /&gt;
&lt;br /&gt;
    c. AffectorFloraDynamicNearConstant, Dead grass&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Description'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Using the example rules listed above, the corresponding rule &lt;br /&gt;
description can perform the following:&lt;br /&gt;
&lt;br /&gt;
1. Set the height of the terrain everywhere to 10 meters(1a) and assign the rock shader(1b). &lt;br /&gt;
&lt;br /&gt;
2. Then, in a 500 meter circle(2a) originating from coordinates (500, 500),&lt;br /&gt;
gradually decrease the height from 10 meters to 0 meters(2b), place the mud shader(2c),&lt;br /&gt;
and create a black band where the height of the terrain at a given sample point is between 13 and 17 meters.(2d, 2di, 2dii) &lt;br /&gt;
&lt;br /&gt;
3. Finally, in a rectangle(3a) from coordinates (-500, -500) to (500, 500), place &lt;br /&gt;
conifer trees(3b) and dead grass(3c) within the rectangle.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Powerking</name></author>	</entry>

	<entry>
		<id>https://wiki.swganh.org/index.php?title=Creature_Factor_(Game_Mechanics)&amp;diff=69863</id>
		<title>Creature Factor (Game Mechanics)</title>
		<link rel="alternate" type="text/html" href="https://wiki.swganh.org/index.php?title=Creature_Factor_(Game_Mechanics)&amp;diff=69863"/>
				<updated>2010-03-05T01:35:23Z</updated>
		
		<summary type="html">&lt;p&gt;Powerking: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageCleanup}}&lt;br /&gt;
{{PageHeader|Game Mechanics|Mechanics Category}}&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot; cellpadding=6&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|valign=top|&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot; cellpadding=6&lt;br /&gt;
|-&lt;br /&gt;
|valign=top|&lt;br /&gt;
== Description ==&lt;br /&gt;
Template (Game Messages)&lt;br /&gt;
|valign=top|&lt;br /&gt;
&lt;br /&gt;
== Related Tags ==&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
||{{D50%}}&lt;br /&gt;
|-&lt;br /&gt;
||{{GameMechanics}}&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
Completion Guide -&lt;br /&gt;
&lt;br /&gt;
* 0% - No substantive information available on game feature&lt;br /&gt;
* 25% - page has been started but not completed&lt;br /&gt;
* 50% - page is as complete as possible with the currently available information but probably needs more research done on the subject matter&lt;br /&gt;
* 75% - page is probably complete but needs to be reviewed for accuracy of the page content and to make sure that no information is missing about the game feature&lt;br /&gt;
* 100% - page has been reviewed and compared against enough sources to the extent that there is reasonable confidence that the game feature is completely documented.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Game Mechanics ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The creature factor is a value assigned to each creature based on its current challenge level. These values are used in the calculation of trapping experience, harvesting experience as well as harvesting yields. A creature level can be an integer or float depending on if it is an adult or baby. Baby creatures spawn as a fractional amount of their adult cl and as a result, this value carries over into the creature factor as a decimal. The amount of difference between the previous creature factor level and next nearest whole number creature factor level is what the creature factor will be for the baby. Creator Factors cap at 2000 somewhere between challenge level 80 and 95. Beyond CL 95, creatures presumably gain no further bonuses to their harvest yield or scouting experience amount.&lt;br /&gt;
&lt;br /&gt;
Note: much of this chart was improvised using known trapping and harvest exp values and then predicting reasonable incrementation.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The equation that the ANH core will use will be something along the order of:&lt;br /&gt;
&lt;br /&gt;
Creature Factor = 0.1322(Challenge Level)^2 + 9.6078(Challenge Level) - 28.103&amp;lt;br/&amp;gt;&lt;br /&gt;
Baby Creature Factor = (Adult Creature Factor)/2&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With modifiers to ensure that it never goes beyond 2000. Some of the lower values are also modified as such:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
{| class=&amp;quot;anhsmalltable&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#ffffcc;&amp;quot;&lt;br /&gt;
|width=&amp;quot;100px&amp;quot;|'''Challenge Levels'''||'''Experience'''&lt;br /&gt;
|----&lt;br /&gt;
|1&lt;br /&gt;
|7&lt;br /&gt;
|----&lt;br /&gt;
|2&lt;br /&gt;
|16&lt;br /&gt;
|----&lt;br /&gt;
|3&lt;br /&gt;
|23&lt;br /&gt;
|----&lt;br /&gt;
|4&lt;br /&gt;
|27&lt;br /&gt;
|----&lt;br /&gt;
|5&lt;br /&gt;
|34&lt;br /&gt;
|----&lt;br /&gt;
|6&lt;br /&gt;
|42&lt;br /&gt;
|----&lt;br /&gt;
|7&lt;br /&gt;
|50&lt;br /&gt;
|----&lt;br /&gt;
|8&lt;br /&gt;
|59&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Source References==&lt;br /&gt;
&lt;br /&gt;
{{SourceReferences&lt;br /&gt;
| SourcePage01 = &lt;br /&gt;
| OriginalPageLink01 = &lt;br /&gt;
| SourcePage02 = &lt;br /&gt;
| OriginalPageLink02 = &lt;br /&gt;
| SourcePage03 = &lt;br /&gt;
| OriginalPageLink03 = &lt;br /&gt;
| SourcePage04 = &lt;br /&gt;
| OriginalPageLink04 = &lt;br /&gt;
| SourcePage05 = &lt;br /&gt;
| OriginalPageLink05 = &lt;br /&gt;
| SourcePage06 = &lt;br /&gt;
| OriginalPageLink06 = &lt;br /&gt;
| SourcePage07 = &lt;br /&gt;
| OriginalPageLink07 = &lt;br /&gt;
| SourcePage08 = &lt;br /&gt;
| OriginalPageLink08 = &lt;br /&gt;
| SourcePage09 = &lt;br /&gt;
| OriginalPageLink09 = &lt;br /&gt;
| SourcePage10 = &lt;br /&gt;
| OriginalPageLink10 = &lt;br /&gt;
| SourcePage11 = &lt;br /&gt;
| OriginalPageLink11 = &lt;br /&gt;
| SourcePage12 = &lt;br /&gt;
| OriginalPageLink12 = &lt;br /&gt;
| SourcePage13 = &lt;br /&gt;
| OriginalPageLink13 = &lt;br /&gt;
| SourcePage14 = &lt;br /&gt;
| OriginalPageLink14 = &lt;br /&gt;
| SourcePage15 = &lt;br /&gt;
| OriginalPageLink15 = &lt;br /&gt;
| SourcePage16 = &lt;br /&gt;
| OriginalPageLink16 = &lt;br /&gt;
| SourcePage17 = &lt;br /&gt;
| OriginalPageLink17 = &lt;br /&gt;
| SourcePage18 = &lt;br /&gt;
| OriginalPageLink18 = &lt;br /&gt;
| SourcePage19 = &lt;br /&gt;
| OriginalPageLink19 = &lt;br /&gt;
| SourcePage20 = &lt;br /&gt;
| OriginalPageLink20 = &lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Powerking</name></author>	</entry>

	<entry>
		<id>https://wiki.swganh.org/index.php?title=Using_Forage_(Game_Mechanics)&amp;diff=69536</id>
		<title>Using Forage (Game Mechanics)</title>
		<link rel="alternate" type="text/html" href="https://wiki.swganh.org/index.php?title=Using_Forage_(Game_Mechanics)&amp;diff=69536"/>
				<updated>2010-03-01T05:03:34Z</updated>
		
		<summary type="html">&lt;p&gt;Powerking: /* Formulas */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageCleanup}}&lt;br /&gt;
{{PageHeader|Game Mechanics|Mechanics Category}}&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot; cellpadding=6&lt;br /&gt;
|-&lt;br /&gt;
|valign=top|&lt;br /&gt;
=Navigation=&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;280px&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
{{Auction (Mess)}}&lt;br /&gt;
{{Banking (Mess)}}&lt;br /&gt;
{{Combat (Mess)}}&lt;br /&gt;
{{Crafting (Mess)}}&lt;br /&gt;
{{Creatures / Pets / Mounts (Mess)}}&lt;br /&gt;
{{General Shared Messages (Mess)}}&lt;br /&gt;
{{Dungeons (Mess)}}&lt;br /&gt;
{{GCW (Mess)}}&lt;br /&gt;
{{Games (Mess)}}&lt;br /&gt;
{{Healing (Mess)}}&lt;br /&gt;
{{JTL (Mess)}}&lt;br /&gt;
{{Logout Event (Mess)}}&lt;br /&gt;
{{Items and Objects (Mess)}}&lt;br /&gt;
{{Force Sensitive / Jedi (Mess)}}&lt;br /&gt;
{{Player Interactions (Mess)}}&lt;br /&gt;
{{Player Structures (Mess)}}&lt;br /&gt;
{{Player Cities (Mess)}}&lt;br /&gt;
{{Quests / Missions (Mess)}}&lt;br /&gt;
{{Resources (Mess)}}&lt;br /&gt;
{{Skills (Mess)}}&lt;br /&gt;
{{Stat Migration (Mess)}}&lt;br /&gt;
{{Travel (Mess)}}&lt;br /&gt;
{{Tutorials (Mess)}}&lt;br /&gt;
{{Unknown (Mess)}}&lt;br /&gt;
{{Using Innate Species Ability (Mess)}}&lt;br /&gt;
{{Waypoint / Datapad (Mess)}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|valign=top|&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot; cellpadding=6&lt;br /&gt;
|-&lt;br /&gt;
|valign=top|&lt;br /&gt;
== Description ==&lt;br /&gt;
Template (Game Messages)&lt;br /&gt;
|valign=top|&lt;br /&gt;
&lt;br /&gt;
== Related Tags ==&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
||{{D50%}}&lt;br /&gt;
|-&lt;br /&gt;
||{{GameMechanics}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Game Mechanics =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Using Forage'''&lt;br /&gt;
&lt;br /&gt;
Foraging must be done outside and can only be initiated while not moving. Forage zones are pockets made 20 meters from the next one. In these pockets, a player may forage for goods and when successful, the pocket is depleted. If the player wishes to gain more foraged items they will have to move to the next pocket to forage. Players can begin forage through using the /forage command. After this is done, a 10 second period will elapse before they receive a notification of the event's success or failure. When you get the &amp;quot;There is nothing to forage in this area.&amp;quot; message, you must move at least 20m off to get a new area. These pockets will regenerate over time.&lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;area&amp;quot; has 4 forage slots. You can only have 4 successful forage attempts in an area. Multiple items collected during a forage success do not count against the forage attempts as each forage attempt is counted seperately. Once you hit the 4th success that area is dry. The area will regenerate items at a rate of roughly 1 per 5min. So if you say get 4 successes in a row, you will not get a success for another 2mins or so.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Forage success increases as the player gains more forage skill. At master scout, the forage success is higher and the the number of items the player is supposed to receive is increased to a maximum of 3 in a single forage. Items are chosen randomly although fishing bait seems to be rather commonly obtained.  Successes include discards (items not added to inventory because the inventory is full) and multiple-item forages (which count as one success.) Your failure rate doubles (no matter what planet you're on) when you're around cities or structures (player or NPC).&lt;br /&gt;
&lt;br /&gt;
Foraging skill also plays a role in determining the unit amount of fishing bait is recovered during a forage attempt. Scouts with survival one can forage bait units between 1 -2 where as master rangers can recover units between 4-5.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Formulas ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Forage Success Rate'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Formula created by Powerking for use in the ANH core is as follows:&lt;br /&gt;
&lt;br /&gt;
Chance of success = sqrt(Skill Modifier)/20 + 0.15&lt;br /&gt;
&lt;br /&gt;
Chance of success in town municipal zone =  (sqrt(Skill Modifier)/20 + 0.15)/2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Bait Recovered'''&lt;br /&gt;
&lt;br /&gt;
Only the min and max range is known for bait recovered. The rest will have to be extrapolated. I propose we issue bait ranges as follows:&lt;br /&gt;
&lt;br /&gt;
* Foraging Mod 0-25: 1-2 units&lt;br /&gt;
* Foraging Mod 26-50: 2-3 units&lt;br /&gt;
* Foraging Mod 51-75: 3-4 units &lt;br /&gt;
* Foraging Mod 75-100: 4-5 units&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Forage Area Regeneration Rate'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1 item regenerates every 5 minutes into the forage pool for that 20 meter radius &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Maximum items:'''&lt;br /&gt;
&lt;br /&gt;
* 1 Item at Foraging Mod +5&amp;lt;br&amp;gt;&lt;br /&gt;
* 2 Items at Foraging Mod +25&amp;lt;br&amp;gt;&lt;br /&gt;
* 3 Items at Foraging Mod +50&lt;br /&gt;
* Rare items at Ranger: Foraging +55 (not implemented)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Multiple Item Forage Odds'''&lt;br /&gt;
&lt;br /&gt;
These are the odds of a multiple item forage occuring when a player is successful in their forage attempt. These odds will assume that the behavior observed on multi-item forages is attributed to differences between starting planets and advanced planets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = 1&lt;br /&gt;
|-&lt;br /&gt;
||Planet Type&lt;br /&gt;
||Odds&lt;br /&gt;
|-&lt;br /&gt;
||Starting Planet&lt;br /&gt;
||1:33&lt;br /&gt;
|-&lt;br /&gt;
||Advanced Planet&lt;br /&gt;
||1:20&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Starting planets consist of the worlds:&lt;br /&gt;
&lt;br /&gt;
* Rori&lt;br /&gt;
* Corellia&lt;br /&gt;
* Talus&lt;br /&gt;
* Tatooine&lt;br /&gt;
* Naboo&lt;br /&gt;
&lt;br /&gt;
Advanced planets consist of the worlds:&lt;br /&gt;
&lt;br /&gt;
* Lok&lt;br /&gt;
* Endor&lt;br /&gt;
* Dantooine&lt;br /&gt;
* Dathomir&lt;br /&gt;
* Yavin IV&lt;br /&gt;
&lt;br /&gt;
==Source References==&lt;br /&gt;
&lt;br /&gt;
{{SourceReferences&lt;br /&gt;
| SourcePage01 = &lt;br /&gt;
| OriginalPageLink01 = &lt;br /&gt;
| SourcePage02 = &lt;br /&gt;
| OriginalPageLink02 = &lt;br /&gt;
| SourcePage03 = &lt;br /&gt;
| OriginalPageLink03 = &lt;br /&gt;
| SourcePage04 = &lt;br /&gt;
| OriginalPageLink04 = &lt;br /&gt;
| SourcePage05 = &lt;br /&gt;
| OriginalPageLink05 = &lt;br /&gt;
| SourcePage06 = &lt;br /&gt;
| OriginalPageLink06 = &lt;br /&gt;
| SourcePage07 = &lt;br /&gt;
| OriginalPageLink07 = &lt;br /&gt;
| SourcePage08 = &lt;br /&gt;
| OriginalPageLink08 = &lt;br /&gt;
| SourcePage09 = &lt;br /&gt;
| OriginalPageLink09 = &lt;br /&gt;
| SourcePage10 = &lt;br /&gt;
| OriginalPageLink10 = &lt;br /&gt;
| SourcePage11 = &lt;br /&gt;
| OriginalPageLink11 = &lt;br /&gt;
| SourcePage12 = &lt;br /&gt;
| OriginalPageLink12 = &lt;br /&gt;
| SourcePage13 = &lt;br /&gt;
| OriginalPageLink13 = &lt;br /&gt;
| SourcePage14 = &lt;br /&gt;
| OriginalPageLink14 = &lt;br /&gt;
| SourcePage15 = &lt;br /&gt;
| OriginalPageLink15 = &lt;br /&gt;
| SourcePage16 = &lt;br /&gt;
| OriginalPageLink16 = &lt;br /&gt;
| SourcePage17 = &lt;br /&gt;
| OriginalPageLink17 = &lt;br /&gt;
| SourcePage18 = &lt;br /&gt;
| OriginalPageLink18 = &lt;br /&gt;
| SourcePage19 = &lt;br /&gt;
| OriginalPageLink19 = &lt;br /&gt;
| SourcePage20 = &lt;br /&gt;
| OriginalPageLink20 = &lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Powerking</name></author>	</entry>

	</feed>