Difference between revisions of "Bridge RUL"

From SC4D Encyclopaedia
Jump to navigation Jump to search
sc4e>Blue Lightning
(In progress...)
sc4e>Blue Lightning
(In progress...)
(No difference)

Revision as of 08:42, 3 July 2012

TGI Info
Name Bridge Specialization RUL
Format RUL File
Type

Group

Instance

0x0A5BCF4B

0xAA5BCF57

Varies. See below

Bridge Specialization RULs (often shortened to just "bridge RULs") are special files that contain layout information for complex bridges such as arch bridges. They are not like the other RUL files, as their syntax is not INI based.

History

Instances

The bridge RULs have one instance per network. They have the general format 0x0000100N where N is the network ID.
0x00001000: Road
0x00001001: Rail
0x00001002: Elevated Maxis Highway
0x00001003: Street
0x00001004: Pipe (Unused)
0x00001005: PowerLine (Unused)
0x00001006: Avenue
0x00001007: Subway (Unused)
0x00001008: Light Rail
0x00001009: Monorail
0x0000100A: OneWayRoad
0x0000100B: Dirt Road/RHW
0x0000100C: Ground Maxis Highway

Note that some networks currently do not have bridge RULs. The game does not require that a bridge RUL exists to draw bridges. Instead, any complex bridge will be drawn using simple rules dictated by the bridge exemplar.

Game Mechanics

Once the game has decided that a network draw is suitable for bridge placement, the game picks a bridge (the first one that appears in the bridge selection menu) and evaluates it. The game knows the internal ID of the bridge (defined in the Network INI) and checks to see if a bridge RUL for that network exists. If the file exists, it looks inside of it to see if it has an entry for that bridge ID. If one is found, then it evaluates the RUL. The game looks for a layout line that has the same length as the bridge being drawn and produces the output. If the bridge RUL, entry, or layout line with the proper length does not exist the game evaluates the bridge using the exemplar and internal layout system.

Format

The format of bridge RULs differ greatly from the other RULs as they are not INI based. Instead, bridge RULs use start declarations and end tags.

Comments begin with #.

   bridge ID


This begins a bridge section. The ID is the same one in the Network INI.

   section SECTION_NAME
       piece <IID, ROTATION>
       ...
   end


This defines a named segment of the bridge, consisting of one or more piece lines. Piece lines have 4 versions:
1. <IID, rotation>: Simple piece
2. <IID, rotation, deltaHeight, yOffset>: Piece that has a slope. deltaHheight is the change in height across the tile (along the network) and yOffset is how far the model should be offset vertically.
3. 1 or 2 followed by :Depth : Piece with a support column. Depth defines how far down the support column goes.
4. SectionName_1 SectionName_2 ... SectionName_n: Import all the piece lines from SectionName. This type of segment can contain one or multiple section references.

When a section contains multiple piece lines, the evaluation depends on the tile width of the network. For single tile networks, each line