Difference between revisions of "Network Specs/IntersectionSolutions RUL"

From SC4D Encyclopaedia
Jump to navigation Jump to search
sc4e>Warrior
(New page: {{Infobox TGI | name = RUL Overrides | format = RUL File | type = 0x0A5BCF4B | group = 0xAA5BCF57 | instance = 0x10000001 | comments = {{also|RUL_0x1000...)
 
m (5 revisions imported)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
{{NetSpecsNav}}
 
{{Infobox TGI  
 
{{Infobox TGI  
 
| name        = RUL Overrides
 
| name        = RUL Overrides
Line 6: Line 7:
 
| instance    = 0x10000001
 
| instance    = 0x10000001
 
| comments    = {{also|RUL_0x10000001}}}}
 
| comments    = {{also|RUL_0x10000001}}}}
This is the file which dictates what happens when one network type is drawn over a different network (note the use of the word “different”; this is important). The network building engine calculates how network piece(s) are laid, as if no other networks are present. Then it looks to see if there are other network tiles of a different network in the way.  If there are, it searches for a solution in this file and thus the intersecting piece(s)’ Rules are applied. If no Rules are found for the two different networks to intersect though, it results in an impossible network draw (red line). Format is as follows:
 
 
  
==Maxis' comments==
+
This is the file which dictates what happens when one network type is drawn over a different network (note the use of the word "different"; this is important). The network building engine calculates how network piece(s) are laid, as if no other networks are present. Then it looks to see if there are other network tiles of a different network in the way.  If there are, it searches for a solution in this file and thus the intersecting piece(s)’ Rules are applied. If no Rules are found for the two different networks to intersect though, it results in an impossible network draw (red line). Format is as follows.
 +
 
 +
==Maxis' Comments==
 
<font color="green" face="Courier New">
 
<font color="green" face="Courier New">
 
<nowiki>;</nowiki> format:<br>
 
<nowiki>;</nowiki> format:<br>
Line 16: Line 17:
 
<nowiki>;</nowiki> name is really not used and is just for our reference. <br>
 
<nowiki>;</nowiki> name is really not used and is just for our reference. <br>
 
<nowiki>;</nowiki> the flag byte order is SENW (I think?)<br>
 
<nowiki>;</nowiki> the flag byte order is SENW (I think?)<br>
<nowiki>;</nowiki><br>
 
 
</font>
 
</font>
  
Line 24: Line 24:
 
<font color="green" face="Courier New">['''''Network1Network2'''''IntersectionSolutions]</font>
 
<font color="green" face="Courier New">['''''Network1Network2'''''IntersectionSolutions]</font>
 
   
 
   
Network1 and Network2 are the two networks which are being overlapped. Valid network names are: DirtRoad, Street, Road, OneWayRoad, Avenue, GroundHighway, Highway, Rail, LightRail [aka EI-train], & MonoRail [& some others]. There must be no spaces or punctuation of any kind in the title.
+
'''Network1''' and '''Network2''' are the two networks which are being overlapped. Valid network names are: DirtRoad, Street, Road, OneWayRoad, Avenue, GroundHighway, Highway, Rail, LightRail (aka El-train), and MonoRail (and some others). There must be no spaces or punctuation of any kind in the title.
  
*A note about Loading order; the IntersectionSolutions header for each intersection section needs to have its network names in a proper order, otherwise any rules created under that section may not work at all. For example; [OneWayRoadGroundHighwayIntersectionSolutions] header is valid, but the [GroundHighwayOneWayRoadIntersectionSolutions] header is not. So if a set of rules doesn’t seem to be working (& no other rules exist in the section), then this may be something to look closer at.
+
A note about loading order, the IntersectionSolutions header for each intersection section needs to have its network names in a proper order, otherwise any rules created under that section may not work at all. For example: [OneWayRoadGroundHighwayIntersectionSolutions] header is valid, but the [GroundHighwayOneWayRoadIntersectionSolutions] header is not. So if a set of rules doesn’t seem to be working (and no other rules exist in the section), then this may be something to look closer at.
  
Within each section, there are lines which describe the tile to place in the case where tiles of network1 and network2 are placed on top of each other, with the defined RUL edge values. The format of these lines is as follows:
+
Within each section, there are lines which describe the tile to place in the case where tiles of Network1 and Network2 are placed on top of each other, with the defined RUL edge values. The format of these lines is as follows:
  
 
<font color="green" face="Courier New">
 
<font color="green" face="Courier New">
 
<nowiki>;</nowiki>straight road, diagonal rail<br>
 
<nowiki>;</nowiki>straight road, diagonal rail<br>
 
rot0flip0=0x02000200,0x00030100,0x03010200,0,0</font>
 
rot0flip0=0x02000200,0x00030100,0x03010200,0,0</font>
 
  
 
==Format==
 
==Format==
 
<font color="green" face="Courier New">name=<font color="black">0x</font><font color="blue">N1s</font><font color="orange">N1e</font>N1n<font color="purple">N1e</font>,<font color="black">0x</font><font color="blue">N2s</font><font color="orange">N2e</font>N2n<font color="purple">N2e</font>,texture/path/ExemplarID,Rotation,Flip</font>
 
<font color="green" face="Courier New">name=<font color="black">0x</font><font color="blue">N1s</font><font color="orange">N1e</font>N1n<font color="purple">N1e</font>,<font color="black">0x</font><font color="blue">N2s</font><font color="orange">N2e</font>N2n<font color="purple">N2e</font>,texture/path/ExemplarID,Rotation,Flip</font>
  
name = doesn't matter, generally anything is valid.<br>
+
*name = doesn't matter, generally anything is valid
N1=Network1<br>
+
*N1=Network1<
N2=Network2<br>
+
*N2=Network2
s,e,n,w = South, East, North, West<br>
+
*s,e,n,w = South, East, North, West
Each S/E/N/W holds the RUL edge values for each network, which are:<br>
+
Each S/E/N/W holds the RUL edge values for each network, which are:
00 - no connection<br>
 
01 - left at 45degree angle<br>
 
02 - straight<br>
 
03 - right at 45degree angle<br>
 
04 – median
 
Texture/PathID/ExemplarID = the InstanceID of the resulting transit tile put in this spot.
 
Where an Exemplar file is referenced, this Exemplar file subsequently references an S3D (or Model) file.<br>
 
'''Rotation = the rotation of the new transit tile 0-3'''<br>
 
'''Flip = the flip of the new transit tile 0-1'''<br>
 
  
*Note; Some in-game network intersections rely on having various IntersectionSolution rules in place in order for them to work. Some intersections/junctions may need two different sets of intersectionsolution rules, that effectively work together for an intersection to work. Some intersections/junctions rely on the RuleOverrides rul in order to work effectively. Some examples of this can be seen in these files themselves.
+
00 - no connection
 +
01 - left at 45degree angle
 +
02 - straight
 +
03 - right at 45degree angle
 +
04 – median
 +
 
 +
*Texture/PathID/ExemplarID = the InstanceID of the resulting transit tile put in this spot.
 +
 
 +
Where an [[Exemplar]] file is referenced, this Exemplar file subsequently references an [[S3D]] (or Model) file.
 +
 
 +
*Rotation = the rotation of the new transit tile 0-3
 +
*Flip = the flip of the new transit tile 0-1
 +
 
 +
Note: Some in-game network intersections rely on having various IntersectionSolution rules in place in order for them to work. Some intersections/junctions may need two different sets of intersectionsolution rules, that effectively work together for an intersection to work. Some intersections/junctions rely on the RuleOverrides RUL in order to work effectively. Some examples of this can be seen in these files themselves.
  
 
==Allowed Overrides Section==
 
==Allowed Overrides Section==
Line 62: Line 65:
 
4=Avenue,GroundHighway<br>
 
4=Avenue,GroundHighway<br>
 
5=Highway,GroundHighway<br>
 
5=Highway,GroundHighway<br>
6=OneWayRoad,Road<br></font>
+
6=OneWayRoad,Road<br>
 +
</font>
 +
 
 +
This controls what networks may be drawn on top of other networks. Unfortunately, the rules here in this last section are also read in reverse by the EXE. And because of the hierarchy that exists with the networks, a lower hierarchical network can't replace a higher hierarchical network when actively dragging one network over another (in a parallel overlapping fashion). So having X=Street,Road won't force Street to replace Road as the Street tool is dragged over a stretch of road. Rather, X=Street,Road will effectively be read as X=Road,Street at run-time and thus allow Road to replace Street if the Road tool is dragged over a section of Street.
 +
 
  
This controls what networks may be drawn on top of other networks. Unfortunately, the rules here in this last section are also read in reverse by the exe. And because of the hierarchy that exists with the networks, a lower hierarchical network can’t replace a higher hierarchical network when actively dragging one network over another (in a parallel overlapping fashion). So having X=Street,Road won’t force Street to replace Road as the Street tool is dragged over a stretch of road. Rather, X=Street,Road will effectively be read as X=Road,Street at run-time & thus allow Road to replace Street if the Road tool is dragged over a section of Street.
+
{{NetSpecsNav}}
 +
[[Category:Network Specs]]

Latest revision as of 21:45, 3 August 2019

TGI Info
Name RUL Overrides
Format RUL File
Type

Group

Instance

0x0A5BCF4B

0xAA5BCF57

0x10000001

Comments
See also: RUL_0x10000001

This is the file which dictates what happens when one network type is drawn over a different network (note the use of the word "different"; this is important). The network building engine calculates how network piece(s) are laid, as if no other networks are present. Then it looks to see if there are other network tiles of a different network in the way. If there are, it searches for a solution in this file and thus the intersecting piece(s)’ Rules are applied. If no Rules are found for the two different networks to intersect though, it results in an impossible network draw (red line). Format is as follows.

Maxis' Comments

; format:
; name=roadMajorTypesFlag,streetMajorTypesFlag,textureId,rotation,flip
;
; name is really not used and is just for our reference.
; the flag byte order is SENW (I think?)

Translation

The file is separated into sections by titles in [brackets]. The title has the following format:

[Network1Network2IntersectionSolutions]

Network1 and Network2 are the two networks which are being overlapped. Valid network names are: DirtRoad, Street, Road, OneWayRoad, Avenue, GroundHighway, Highway, Rail, LightRail (aka El-train), and MonoRail (and some others). There must be no spaces or punctuation of any kind in the title.

A note about loading order, the IntersectionSolutions header for each intersection section needs to have its network names in a proper order, otherwise any rules created under that section may not work at all. For example: [OneWayRoadGroundHighwayIntersectionSolutions] header is valid, but the [GroundHighwayOneWayRoadIntersectionSolutions] header is not. So if a set of rules doesn’t seem to be working (and no other rules exist in the section), then this may be something to look closer at.

Within each section, there are lines which describe the tile to place in the case where tiles of Network1 and Network2 are placed on top of each other, with the defined RUL edge values. The format of these lines is as follows:

;straight road, diagonal rail
rot0flip0=0x02000200,0x00030100,0x03010200,0,0

Format

name=0xN1sN1eN1nN1e,0xN2sN2eN2nN2e,texture/path/ExemplarID,Rotation,Flip

  • name = doesn't matter, generally anything is valid
  • N1=Network1<
  • N2=Network2
  • s,e,n,w = South, East, North, West

Each S/E/N/W holds the RUL edge values for each network, which are:

00 - no connection
01 - left at 45degree angle
02 - straight
03 - right at 45degree angle
04 – median
  • Texture/PathID/ExemplarID = the InstanceID of the resulting transit tile put in this spot.

Where an Exemplar file is referenced, this Exemplar file subsequently references an S3D (or Model) file.

  • Rotation = the rotation of the new transit tile 0-3
  • Flip = the flip of the new transit tile 0-1

Note: Some in-game network intersections rely on having various IntersectionSolution rules in place in order for them to work. Some intersections/junctions may need two different sets of intersectionsolution rules, that effectively work together for an intersection to work. Some intersections/junctions rely on the RuleOverrides RUL in order to work effectively. Some examples of this can be seen in these files themselves.

Allowed Overrides Section

[AllowedOverrides]
1=Road,Street
2=Avenue,Road
3=Avenue,Street
4=Avenue,GroundHighway
5=Highway,GroundHighway
6=OneWayRoad,Road

This controls what networks may be drawn on top of other networks. Unfortunately, the rules here in this last section are also read in reverse by the EXE. And because of the hierarchy that exists with the networks, a lower hierarchical network can't replace a higher hierarchical network when actively dragging one network over another (in a parallel overlapping fashion). So having X=Street,Road won't force Street to replace Road as the Street tool is dragged over a stretch of road. Rather, X=Street,Road will effectively be read as X=Road,Street at run-time and thus allow Road to replace Street if the Road tool is dragged over a section of Street.