Tutorial:Creating Puzzle Pieces

From SC4D Encyclopaedia
Jump to navigation Jump to search

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
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.


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.


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.


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.

;Added by '''USERNAME DATE'''.
Piece = 0.0, 0, 0, 0, '''PREVIEWIID'''
PreviewEffect = '''PREVIEWNAME'''

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


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

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

CopyFrom = 0x'''XXX'''0
Rotate	= 1
CopyFrom = 0x'''XXX'''0
Rotate	= 2
CopyFrom = 0x'''XXX'''0
Rotate	= 3
;Rotation Clones
CopyFrom = 0x'''XXX'''0
CopyFrom = 0x'''XXX'''1
CopyFrom = 0x'''XXX'''2
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)