Difference between pages "Network Specs/INI Network & Bridges" and "Network Specs/Individual Network RULs"

From SC4D Encyclopaedia
< Network Specs(Difference between pages)
Jump to navigation Jump to search
sc4e>CasperVg
m (addcat)
 
sc4e>Warrior
(New page: {{NetSpecsNav}} This file contains information related to the individual Network RULs.<br> <br> =Network specific RULs= Each individual network, including waterpipes (but not powerpoles), ...)
 
Line 1: Line 1:
 
{{NetSpecsNav}}
 
{{NetSpecsNav}}
This file covers items related to the INI Network file & Bridge RUL files. Not all aspects of these files will be covered though.<br>
+
This file contains information related to the individual Network RULs.<br>
INI Network file – 0x00000000/8A5971C5/8A5993B9<br>
+
<br>
Bridge RULs 0x0A5BCF4B/AA5BCF57/00001000 to 0x0A5BCF4B/AA5BCF57/000010##<br>
+
=Network specific RULs=
* Note: The game originally only came with 5 Bridge RUL files. Other Bridge RULs other than the original 5 have been known to be valid though, hence where there is ‘##’ at the end.<br>
+
Each individual network, including waterpipes (but not powerpoles), has two RUL files. One is the main RUL file for a given network, while the other is a supplementary RUL for a given network. RULs ending in odd values are the main network-specific RUL. While RULs ending in even values are the supplementary Rul for a given network. This covers RUL files from (address) 0x0A5BCF4B/AA5BCF57/00000001 to 0x0A5BCF4B/AA5BCF57/00000018.<br>
 +
  
==Remapping==
+
=Format=
===Paths===
+
<font color="green" face="Courier New">#HighwayRules#</font>
<font face="Courier New">
+
[UK path remapping]<br>
+
<font color="green">#Header#</font> -This basically contains <font color="green">#NetworkTypeRules# </font>here name. The engine recognises the different names used in the header section here, and does have an impact/influence on the network tool(s) used.<br>
<font color="green">
+
A typical sample portion of rul code for individual networks may look something like the following (this was taken from a Highway RUL file)<br>
<nowiki>;</nowiki> Format:<br>
+
<font color="green" face="Courier New">1,0,0,1,3<br>
<nowiki>;</nowiki><br>
+
2,5,1,0,2,4<br>
<nowiki>;</nowiki>   <anything> = <match-id>, <match-mask>, <new-id>, <add-mask><br>
+
3,0,0x2001800,0,0</font><br>
</font>
+
<br>
1     = 0x09201000,0xFFFFF000,0x09209000,0x00000FFF<br>
+
Version/Type:Value1/Value2/Value3<br>
 +
Different Versions/Types have different number of Values following after them, with differing purposes.<br>
 +
Format is broken up into parts below, and is as follows;<br>
 +
<br>
 +
==For Type 1 lines==
 +
<font color="green" face="Courier New">1,0,0,1,3<br></font>
 +
1[Type],West,North,East,South<br>
 +
West/North/East/South use the following CheckFlag values;<br>
 +
00 -no connection          <br>
 +
01 -sloped connection-to the left<br>
 +
02 -straight connection<br>
 +
03 -sloped connection-to the right<br>
 +
04 -shared median<br>
 +
11 -sloped connection from an intersection<br>
 +
13 -sloped from an intersection<br>
 +
<nowiki>## ~</nowiki> There is quite a lot more number designations for some of the more complex stuff (such as Rail). The above ones are just the basic types that cover & work with most networks.<br>
 +
<br>
 +
==For Type 2 lines==
 +
<font color="green" face="Courier New">2,5,1,0,2,4<br></font>
 +
2[Type],X,W,N,E,S<br>
 +
X = See table further below.<br>
 +
WNES = West/North/East/South ~ uses the same CheckFlag values as above. “?” (without quotes) is also valid though for Type2 lines as a wildcard.<br>
 +
<br>
 +
==For Type 3 lines==
 +
<font color="green" face="Courier New">3,0,0x2001800,0,0<br></font>
 +
3[Type],X,FSH/Path/ExemplarReference,Rotation,Flip<br>
 +
X = See table further below.<br>
 +
Rotation: 0-3. Rotate piece:<br>
 +
0=No change<br>
 +
1=90 Degrees right<br>
 +
2=180 Degrees<br>
 +
3=270 degrees right/-90 degrees left. <br>
 +
Where an Exemplar exists for the reference, the Exemplar subsequently points to a S3D file [NOTE: Referenced Exemplar files follow a specific GroupID format, for the different network types].<br>
 
<br>
 
<br>
1      = 0x09209000,0xFFFFF000,0x09201000,0x00000FFF<br>
+
==Table for Type2 & Type3 lines==
</font>
+
X = Reference in relation to the tile being referenced. For Type3 lines, zero is also valid reference & denotes that the image being loaded into the tile. The same also applies to other (non-zero neighbouring) tiles as well. Zero is the centre point, or the primary tile being coded for for the Type1 line, to which all other tiles are referenced in relation to.<br>
 +
(each box/number here represents an in-game tile)<br>
 +
[[Image:NSINR1.jpg]]<br>
 +
Further explanation of CheckFlags:<br>
 +
[[Image:NSINR2.jpg]]<br>
  
 +
===Setup===
 +
Imagine yourself at the centre of this transit tile at point E, looking North to point 2. Segment AB is the side for which we are trying to determine the border type.<br>
  
This section is mostly used in conjunction with the IntersectionOrdering RUL file. Basically, this section is used to replace particular path file or sets of path files at run-time for any given in-game tiles. Each line contains 2 main parts.<br>
+
===Explanation===
<font face="Courier New">
+
The RUL entries dictate the centre point of the network (in this case, roads) along segment AB, and the direction the network is going, in comparison to segment E2. If the vector of the transportation tile is parallel with EA, the angle would be -45° in comparison to E2. Likewise, if the vector of the transportation tile is parallel to EB, the angle would be +45° in comparison to E2.<br>
1      = 0x09201000,0xFFFFF000,0x09209000,0x00000FFF<br>
 
</font>
 
This says; any Path files with IDs of 0x09201### be replaced with the Path files that exist in 0x09209###, for UK (or left hand side) driving orientated games. The “F”s denote masking of an ID. These, as too the IIDs, can be changed &/or shifted over, but in practise are not. The following would also be a valid & work (assuming the Path files are in place for these)<br><font face="Courier New">
 
1    = 0x09210000,0xFFFF0000,0x0929000,0x0000FFFF<br>
 
</font>
 
===Textures===
 
<font face="Courier New">[Texture remapping]<br></font>
 
This particular section controls the texture remapping of an item when the network is being drawn. Or in other words; the '''Preview''' of an ordinary in-game tile of the network before you release the mouse button. This does not cover Bridges & interchange items.<br>
 
  
==Bridges==
+
===Table===
===Exemplar files===
+
The Pixel position is based on the 128 pixel wide zoom 5 textures, with pixel points 0-127. Also, the pixel values might be off slightly due to anti-aliasing in the textures.<br>
Bridges are a little different from other network items in the game. Unlike normal network aspects, Bridges are first called from the INI Network file.<br>
 
<font color="green" face="Courier New">
 
[RoadBridgeExemplars]<br>
 
; 0x2821ED93<br>
 
1 = 0x6534284a, 0xa82ca30f, 0x00000001, level road bridge<br>
 
2 = 0x6534284a, 0xa82ca30f, 0x00000002, raised road bridge<br>
 
3 = 0x6534284a, 0xa82ca30f, 0x00000003, undertruss road bridge<br>
 
4 = 0x6534284a, 0xa82ca30f, 0x00000005, wooden covered road bridge<br>
 
5 = 0x6534284a, 0xa82ca30f, 0x00000006, medium suspension road bridge<br>
 
6 = 0x6534284a, 0xa82ca30f, 0x00000007, stone arch road bridge<br>
 
7 = 0x6534284a, 0xa82ca30f, 0x00000008, small steel arch road bridge<br>
 
8 = 0x6534284a, 0xa82ca30f, 0x00000009, cantilever truss road bridge<br>
 
9 = 0x6534284a, 0xa82ca30f, 0x0000000a, overdeck truss road bridge<br>
 
</font>
 
This section here is the starting point for bridges. Each of the different networks that have bridges contains entries similar to this.<br>
 
Format;<br>
 
<font color="green" face="Courier New">[RoadBridgeExemplars]</font><br>
 
This is the header for this section, & the network names are engine specific.<br>
 
<font color="green" face="Courier New">1 = 0x6534284a, 0xa82ca30f, 0x00000001, level road
 
bridge</font><br>
 
Number = TypeID, GroupID, InstanceID, Name<br>
 
 
<br>
 
<br>
Number – These should be unique, as they can & are used as a point of reference in the Bridge RUL files.<br>
+
The simpler table, showing absolute positions only:<br>
Name - insignificant. Name can be anything.<br>
+
[[Image:NSINR3.jpg]]<br>
Type/Group/InstanceID; this is an actual Bridge Parent-Exemplar file that this is pointing to. This referenced Bridge Parent-Exemplar file then follows on to reference Child-Exemplar files. These Child-Exemplar files not only fall under the GroupID specific format, but also a specific InstanceID format as well (which is believed to subsequently be controlled by the INI file itself, namely the section under Shadow Remappings).<br>
+
The more complex table, showing the relative offsets as well as absolute positions:<br>
If you have a look at the <font color="green">Level_Road_Bridge</font> Exemplar file (find the Exemplar file using the above referenced TGI ID, level road bridge), you’ll notice it contains many properties, among them the following properties;<br>
+
[[Image:NSINR4.jpg]]<br>
0x482CB443<br>
+
That about covers it. As mentioned, there are more rul designations than just those mentioned here. Most other rul designations though are more complex. For this reason it’s advised to try & grasp the concepts of the above items first.<br>
0x482CB445<br>
 
0x482CB449<br>
 
(not all of these three will be in every Bridge Exemplar)<br>
 
 
 
 
 
These properties contain the pointers, or InstanceIDs, of the Child-Exemplar files mentioned above. Essentially, the INI Network file & the referenced Bridge Parent-Exemplar file, controls the “ability” to actually build a bridge (Hint: A bridge can be built, carry commuters, & still not be visible. This would indicate a GroupID &/or InstanceID problem with the files involved, &/or possibly a S3D file problem). The Bridge RUL files are only supplementary after this; most of the bridges work this way.
 
 
 
 
 
===RUL files===
 
Bridge RULs have a format all to themselves, & are very different from all the other RULs. The Bridge RULs have their format within them.
 
 
{{NetSpecsNav}}
 
{{NetSpecsNav}}
 
[[Category:Transit Modding]]
 

Revision as of 13:46, 12 November 2008

This file contains information related to the individual Network RULs.

Network specific RULs

Each individual network, including waterpipes (but not powerpoles), has two RUL files. One is the main RUL file for a given network, while the other is a supplementary RUL for a given network. RULs ending in odd values are the main network-specific RUL. While RULs ending in even values are the supplementary Rul for a given network. This covers RUL files from (address) 0x0A5BCF4B/AA5BCF57/00000001 to 0x0A5BCF4B/AA5BCF57/00000018.


Format

#HighwayRules#

#Header# -This basically contains #NetworkTypeRules# here name. The engine recognises the different names used in the header section here, and does have an impact/influence on the network tool(s) used.
A typical sample portion of rul code for individual networks may look something like the following (this was taken from a Highway RUL file)
1,0,0,1,3
2,5,1,0,2,4
3,0,0x2001800,0,0


Version/Type:Value1/Value2/Value3
Different Versions/Types have different number of Values following after them, with differing purposes.
Format is broken up into parts below, and is as follows;

For Type 1 lines

1,0,0,1,3
1[Type],West,North,East,South
West/North/East/South use the following CheckFlag values;
00 -no connection
01 -sloped connection-to the left
02 -straight connection
03 -sloped connection-to the right
04 -shared median
11 -sloped connection from an intersection
13 -sloped from an intersection
## ~ There is quite a lot more number designations for some of the more complex stuff (such as Rail). The above ones are just the basic types that cover & work with most networks.

For Type 2 lines

2,5,1,0,2,4
2[Type],X,W,N,E,S
X = See table further below.
WNES = West/North/East/South ~ uses the same CheckFlag values as above. “?” (without quotes) is also valid though for Type2 lines as a wildcard.

For Type 3 lines

3,0,0x2001800,0,0
3[Type],X,FSH/Path/ExemplarReference,Rotation,Flip
X = See table further below.
Rotation: 0-3. Rotate piece:
0=No change
1=90 Degrees right
2=180 Degrees
3=270 degrees right/-90 degrees left.
Where an Exemplar exists for the reference, the Exemplar subsequently points to a S3D file [NOTE: Referenced Exemplar files follow a specific GroupID format, for the different network types].

Table for Type2 & Type3 lines

X = Reference in relation to the tile being referenced. For Type3 lines, zero is also valid reference & denotes that the image being loaded into the tile. The same also applies to other (non-zero neighbouring) tiles as well. Zero is the centre point, or the primary tile being coded for for the Type1 line, to which all other tiles are referenced in relation to.
(each box/number here represents an in-game tile)
NSINR1.jpg
Further explanation of CheckFlags:
NSINR2.jpg

Setup

Imagine yourself at the centre of this transit tile at point E, looking North to point 2. Segment AB is the side for which we are trying to determine the border type.

Explanation

The RUL entries dictate the centre point of the network (in this case, roads) along segment AB, and the direction the network is going, in comparison to segment E2. If the vector of the transportation tile is parallel with EA, the angle would be -45° in comparison to E2. Likewise, if the vector of the transportation tile is parallel to EB, the angle would be +45° in comparison to E2.

Table

The Pixel position is based on the 128 pixel wide zoom 5 textures, with pixel points 0-127. Also, the pixel values might be off slightly due to anti-aliasing in the textures.

The simpler table, showing absolute positions only:
NSINR3.jpg
The more complex table, showing the relative offsets as well as absolute positions:
NSINR4.jpg
That about covers it. As mentioned, there are more rul designations than just those mentioned here. Most other rul designations though are more complex. For this reason it’s advised to try & grasp the concepts of the above items first.