Difference between pages "RUL File" and "Tutorial:Creating Puzzle Pieces"

From SC4D Encyclopaedia
(Difference between pages)
Jump to navigation Jump to search
sc4e>CasperVg
m (added navbox)
 
sc4e>CasperVg
 
Line 1: Line 1:
'''RUL Files''' are internal game files which control the placement of [[Transit Network]] items in-game. There are numerous RUL Files used by the game, each of which has its own particular function. There are three different types of RUL Files: [[Network-Specific|Network-Specific RUL Files]], Multi-Network, and [[Bridge RULs]]. In addition, the [[Network INI]] file effectively functions like a RUL File.
+
==Creating puzzle pieces==
 +
===What do you need?===
 +
*Basic understanding of the [[reader]]
 +
*Notepad(or equivalent, but I advise against Word)
 +
*Models and Path files for the [[puzzle piece]]
 +
===Exporting the RUL file===
 +
Skip this section if you are used to the reader and know how to export files from it.<br>
 +
Because the file RUL files are so large they can’t be modified in the reader, so we have to export them and open them in notepad. <br>
 +
To do this we first open the NetworkAddonMod_Controller.dat file ([[NAM Controller]]) in the [[reader]]. <br>
 +
You should see 4 files, 1 [[DIR]] and 3 [[RUL]] like below<br>
 +
http://i200.photobucket.com/albums/aa230/warriorST/Private/IMG1.jpg <br>
 +
Right click on the RUL file with the [[Instance ID]] (IID) of 10000000 (this is the puzzle piece RUL). This will bring up a fairly long context menu.<br>
 +
<br>
 +
http://i200.photobucket.com/albums/aa230/warriorST/Private/IMG2.jpg<br>
 +
<br>
 +
Click “Save decoded file”, the second option from the top.
 +
And this box will appear. Which tells you the name of the file and that it has been saved.<br>
 +
<br>
 +
http://i200.photobucket.com/albums/aa230/warriorST/Private/IMG3.jpg<br>
 +
<br>
 +
Now in Windows, browse to your Network Addon Mod folder and you should see the file you just saved along with another one with the same name except it has “.TGI” on the end.
 +
#Rename the file circled in red to “Puzzle Piece.rul”
 +
#Rename the file circled in green to “Puzzle Piece.rul.TGI”
 +
#The two file names must always match except for the “.TGI” on the TGI file.<br>
 +
<br>
 +
http://i200.photobucket.com/albums/aa230/warriorST/Private/IMG4.jpg<br>
 +
<br>
  
The [[Network Specs|Network Specs Folder]] written by many of the people who discovered the file formats is helpful for learning Transit [[Modding]] even if it is a few years old and a few things need to be updated
+
===Creating the puzzle piece===
 +
The first thing you need to do is get a HID (hex-ID), this is 4 digits long and identifies the puzzle piece.
  
The function of the RUL File is defined by its [[IID]].  It is not possible to add new RUL Files, though it is possible to define new Bridge RULs for networks that do not already have them.
+
For testing we use the range F###.
  
== Network-Specific RUL Files ==
+
So open the Puzzle Pieces.rul file you just saved. Now click at the very top of the document. Press Ctrl-F to open find and type in F000, there should be no results, this means it is available to use.
''Main article'': [[Network Specific RUL]]
 
  
Each in-game network has two Network-Specific RUL Files, one Main RUL which defines the basic placement of the network, and one Supplemental RUL, which defines same-network overrides.  There are 18 total Network Specific RULs.
 
  
== Multi-Network RUL Files ==
+
Now scroll down to the very bottom, and paste this template in.
There are three Multi-Network RUL Files, known by their IIDs: [[RUL 0x10000000]], [[RUL 0x10000001]] and [[RUL 0x10000002]]. These all handle situations that can handle multiple networks. RUL 0x10000000 is a particularly special case, since it deals exclusively with [[Puzzle Pieces]], ploppable network pieces, as opposed to Draggable Network items, the only such RUL to do so.
+
<pre>
 +
[HighwayIntersectionInfo_0x0000'''XXX'''0]
 +
;Added by '''USERNAME DATE'''.
 +
;'''DESCRIPTION'''
 +
Piece = 0.0, 0, 0, 0, '''PREVIEWIID'''
 +
PreviewEffect = '''PREVIEWNAME'''
  
== Bridge RULs ==
+
CellLayout =.......
''Main article'': [[Bridge RUL]]
+
CellLayout =......<
 +
CellLayout =..^....
  
Bridge RULs allow for more control over custom bridges.
+
'''CHECKTYPES'''
  
== Network INI ==
+
ConsLayout =.......
''Main article'': [[Network INI]]
+
ConsLayout =......<
 +
ConsLayout =..^....
  
The Network INI file, while technically not a RUL file, combines many functions of the various RUL files.  It also controls bridge shadows, Left-Hand Drive path substitution, Powerlines, and various Bugfixes.
+
AutoTileBase = '''ATBIID'''
 +
PlaceQueryID = '''PQIID'''
 +
Costs = 50
  
{{navbox/FORMAT}}
+
[HighwayIntersectionInfo_0x0000'''XXX'''1]
<br>
+
CopyFrom = 0x'''XXX'''0
{{expand}}
+
Rotate = 1
[[category:File_Formats/SC4|RUL]]
+
[HighwayIntersectionInfo_0x0000'''XXX'''2]
 +
CopyFrom = 0x'''XXX'''0
 +
Rotate = 2
 +
[HighwayIntersectionInfo_0x0000'''XXX'''3]
 +
CopyFrom = 0x'''XXX'''0
 +
Rotate = 3
 +
;Rotation Clones
 +
[HighwayIntersectionInfo_0x0000'''XXX'''4]
 +
CopyFrom = 0x'''XXX'''0
 +
[HighwayIntersectionInfo_0x0000'''XXX'''5]
 +
CopyFrom = 0x'''XXX'''1
 +
[HighwayIntersectionInfo_0x0000'''XXX'''6]
 +
CopyFrom = 0x'''XXX'''2
 +
[HighwayIntersectionInfo_0x0000'''XXX'''7]
 +
CopyFrom = 0x'''XXX'''3
 +
</pre>
 +
 
 +
First off, we need to replace all the words in Capital and with ''' surrounding them.
 +
 
 +
1) Replace '''XXX''' with the first 3 digits of your HID, in this case F00. This is what links the actual RULs to the Ordering Section  at the top.
 +
 
 +
2) Replace '''USERNAME''' with your Username. This is just for reference.
 +
 
 +
3) Replace '''DATE''' with the current date. This is just for reference. (To limit confusion, use the date format DD-MON-YEAR, eg 02-Oct-2008)
 +
 
 +
4)
 +
 
 +
preview_constructionmedium
 +
[[Category:Transit Networks]]

Revision as of 00:28, 1 January 2009

Creating puzzle pieces

What do you need?

  • Basic understanding of the reader
  • Notepad(or equivalent, but I advise against Word)
  • Models and Path files for the puzzle piece

Exporting the RUL file

Skip this section if you are used to the reader and know how to export files from it.
Because the file RUL files are so large they can’t be modified in the reader, so we have to export them and open them in notepad.
To do this we first open the NetworkAddonMod_Controller.dat file (NAM Controller) in the reader.
You should see 4 files, 1 DIR and 3 RUL like below
http://i200.photobucket.com/albums/aa230/warriorST/Private/IMG1.jpg
Right click on the RUL file with the Instance ID (IID) of 10000000 (this is the puzzle piece RUL). This will bring up a fairly long context menu.

http://i200.photobucket.com/albums/aa230/warriorST/Private/IMG2.jpg

Click “Save decoded file”, the second option from the top. And this box will appear. Which tells you the name of the file and that it has been saved.

http://i200.photobucket.com/albums/aa230/warriorST/Private/IMG3.jpg

Now in Windows, browse to your Network Addon Mod folder and you should see the file you just saved along with another one with the same name except it has “.TGI” on the end.

  1. Rename the file circled in red to “Puzzle Piece.rul”
  2. Rename the file circled in green to “Puzzle Piece.rul.TGI”
  3. The two file names must always match except for the “.TGI” on the TGI file.


http://i200.photobucket.com/albums/aa230/warriorST/Private/IMG4.jpg

Creating the puzzle piece

The first thing you need to do is get a HID (hex-ID), this is 4 digits long and identifies the puzzle piece.

For testing we use the range F###.

So open the Puzzle Pieces.rul file you just saved. Now click at the very top of the document. Press Ctrl-F to open find and type in F000, there should be no results, this means it is available to use.


Now scroll down to the very bottom, and paste this template in.

[HighwayIntersectionInfo_0x0000'''XXX'''0]
;Added by '''USERNAME DATE'''.
;'''DESCRIPTION'''
Piece = 0.0, 0, 0, 0, '''PREVIEWIID'''
PreviewEffect = '''PREVIEWNAME'''

CellLayout =.......
CellLayout =......<
CellLayout =..^....

'''CHECKTYPES'''

ConsLayout =.......
ConsLayout =......<
ConsLayout =..^....

AutoTileBase = '''ATBIID'''
PlaceQueryID = '''PQIID'''
Costs = 50

[HighwayIntersectionInfo_0x0000'''XXX'''1]
CopyFrom = 0x'''XXX'''0
Rotate	= 1
[HighwayIntersectionInfo_0x0000'''XXX'''2]
CopyFrom = 0x'''XXX'''0
Rotate	= 2
[HighwayIntersectionInfo_0x0000'''XXX'''3]
CopyFrom = 0x'''XXX'''0
Rotate	= 3
;Rotation Clones
[HighwayIntersectionInfo_0x0000'''XXX'''4]
CopyFrom = 0x'''XXX'''0
[HighwayIntersectionInfo_0x0000'''XXX'''5]
CopyFrom = 0x'''XXX'''1
[HighwayIntersectionInfo_0x0000'''XXX'''6]
CopyFrom = 0x'''XXX'''2
[HighwayIntersectionInfo_0x0000'''XXX'''7]
CopyFrom = 0x'''XXX'''3

First off, we need to replace all the words in Capital and with surrounding them.

1) Replace XXX with the first 3 digits of your HID, in this case F00. This is what links the actual RULs to the Ordering Section at the top.

2) Replace USERNAME with your Username. This is just for reference.

3) Replace DATE with the current date. This is just for reference. (To limit confusion, use the date format DD-MON-YEAR, eg 02-Oct-2008)

4)

preview_constructionmedium