• Welcome to SC4 Devotion Forum Archives.
 

News:

The SC4 Devotion Forums are no longer active, but remain online in an archived, read-only "museum" state.  It is not possible for regular members to post or use the private messaging system, and no technical support will be provided for any issues pertaining to the forums in their current state.  Attachments (those that still work) are accessible without login.

The LEX has been replaced with SC4Evermore (SC4E), and SC4E maintains an active Discord server.  For traditional forums, we recommend Simtropolis.

Main Menu

Making Models for Transit Networks: Some General Specifications

Started by Tarkus, February 22, 2008, 05:33:12 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Jonathan

remember the IID of the exemplar?
The exemplar IID must be the same as the ATB (the values in the table) (but dont use the example as thats already in use)

For now use 5FFF0000 as the ATB.

Jonathan

mtg


Jonathan

Quote[HighwayIntersectionInfo_0x00005100]
;Added by MTG textures by Tarkus Tutored by Jonathan and Blue Lightning 02/16/2010.
;RHW double-elevated-ramp
Piece = 0.0, 0.0, 0, 0, 0, 0x55267100
PreviewEffect =

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

CheckType = a – Dirtroad: 0x02000200

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

AutoTileBase = 0x5FFF0000
PlaceQueryID =
Costs = 150

Right, so that what you should have so far.

The PlaceQueryID:
This links to an LTEXT file, which usually has the same IID as the ATB

The LTEXT it links to contains the text that appears in the speech bubble that appears when you are hovering with the puzzle piece (the text the appears over the preview of the puzzle piece)
Just find an existing LTEXT file in NAM_Locale_English.dat and then copy one of the files with a GID of 2A592FD1 and ReIID it to the same as the ATB.



Now Rotations:

Puzzle pieces don't automatically do the rotations this is because in some instances the user wants to make the puzzle pieces different for each rotation.

But thankfully you dont have to manually create the rotations.

Quote[HighwayIntersectionInfo_0x00015100]
CopyFrom = 0x5100
Rotate   = 1
[HighwayIntersectionInfo_0x00025100]
CopyFrom = 0x5100
Rotate   = 2
[HighwayIntersectionInfo_0x00035100]
CopyFrom = 0x5100
Rotate   = 3

The above code is what you need to add (this is usally called the rotation clones).
The first line is exactly the same as the first line of the original puzzle piece, this makes each rotation clone technically its own puzzle piece (but when someone says puzzle piece they mean both the original and the rotation clones)
Quote[HighwayIntersectionInfo_0x00015100]

Note how the HID in the line is 5 digits long, this is a new discovery made by Daeley and means the maximum number of puzzle pieces is vastly increased. Before the discovery was made the line would have been:
Quote[HighwayIntersectionInfo_0x00005101]
A lot of puzzle pieces don't use this system which is called 5 digit HIDs or 5-HID.

The next line:
QuoteCopyFrom = 0x5100
This copies the RULs from the original piece, so if the next line wasn't put in then the 15100 piece would identical to to the 5100 piece. NOTE: You can only copy from puzzle pieces that are above the puzzle piece which contains the CopyFrom line.

The next line rotates the piece by 90 degrees (1 * 90)
QuoteRotate   = 1

The next lines are the same except they do the other rotations.


In some instances you will need to flip the puzzle piece, this can be done using a Transpose line. But I think for you ramp when you have to create the flip of it you will need to do it manually as the paths will be going in the opposite direction.

I'll get onto PreviewEffect soemtime as well. But I'll answer question you have about this post now :)

Jonathan





mtg

Thanks again! I'm now working on something I should have don already,  &ops creating every piece of the puzzle piece.  I see that you chanced something
QuoteCosts = 150[/tt]
why did you add [/tt] ?

Jonathan

The EffectDir is actually quite simple, but I've found it hard to explain so I just made a simple generator which will do it for you.

The EffectDir basically links the Puzzle piece RUL with the model of the preview. It does a similar job as the exemplar that connect the ATB to the model.

You need to create a S3D with the entire ramp in it. The IID of this S3D is usually the ATB + 5, so for you it would be 5FFF0005. Then using the tool I attached here, type in the first IID textbox the IID of the complete model (5FFF0005). Then in the next box called name type in a name of the preview (at the moment it must 27 characters long, no less or no more), generally preview names start with preview_

I'd suggest "preview_doubleheightMIS_000"(no quotes). or something like that

Then in the next box, IID of EffDir type in the same IID as the first IID box. They can be different which is why they are separate boxes, but it makes it easier if they are the same.

When the EffDir is inserted into the dat it will be given this IID.

Hit generate button and then select somewhere to save it.

Now in the reader in your dat right click in the list of file and select Insert & compress file.
Browse to the file you just generated above. Click Ok and if another box pops up click Yes.


Then in your RUL code where it says PreviewEffect = type the name of the preview which you put into the generator

And at the end of the Piece line, change the IID that's there to the IID of EffDir. (this doesn't affect anything in game but makes it easier to find things.)

That should be it.

EDIT: The [/tt] is a mistake it's forum code to make it line up properly for the ConsLayout and CellLayout, I was just about to fix it after posting this.

Jonathan

mtg

This is what I have right now



[HighwayIntersectionInfo_0x00005100]
;Added by MTG textures by Tarkus Tutored by Jonathan and Blue Lightning 02/16/2010.
;RHW double-elevated-ramp
Piece = 0.0, 0.0, 0, 0, 0, 0x55267100
PreviewEffect =

CellLayout = a.
CellLayout = a.
CellLayout = a.
CellLayout = a.
CellLayout = a <
CellLayout = a.
CellLayout = a.
CellLayout = a.
CellLayout = a.
CellLayout = a.
CellLayout = ^
CheckType = a - Dirtroad: 0x02000200

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

AutoTileBase = 0x5FFF0000
PlaceQueryID =
Costs = 150

[HighwayIntersectionInfo_0x00015100]
CopyFrom = 0x5100
Rotate   = 1
[HighwayIntersectionInfo_0x00025100]
CopyFrom = 0x5100
Rotate   = 2
[HighwayIntersectionInfo_0x00035100]
CopyFrom = 0x5100
Rotate   = 3




Any comments are very welcome!

But how do I get this RUL in the reader? (wrote it in MSWord)

Blue Lightning

You need to open up RUL0 in the Reader. Right click the file, hit Save Decoded File. Save it as a txt file. Once that's done, open it in notepad (or whatever raw text editor (NOT a rich text)). Find a nice spot for the RUL (in your case, below the experimental section at the end) and paste it from word. Also don't forget to include your AddTypes line under the correct RotationRing.
Also known as Wahrheit

Occasionally lurks.

RHW Project

mtg

I'm trying to use the generator but my pc gives me this screen



Little translation, it says that I have to install .Net 4.0.21006? I was looking for it on the net but without succes.. &mmm


mtg


mtg

QuoteYou need to open up RUL0 in the Reader. Right click the file, hit Save Decoded File. Save it as a txt file.

Blue how do i save my decoded file as a text file?

Jonathan

You are not saving any of your files as a text file.
You need to save the RUL file (the IID is 10000000, in NAM_Controller.dat).

To do this open the NAM_Controller.dat, right click the RUL file with IID 10000000 and click Save Decoded File.
Then go to the Network Addon Mod folder in your Plugins and there should be a file called file_dec00000000.rul This is the saved RUL file which you put the RUL code you wrote at the very bottom (In the experiment/testing section)

Jonathan

Blue Lightning

Well I forgot to mention that its only if you have manual save on :'(

But yeah, Jon's method works pretty much similarly. Though the decoded .rul file is technically the same as a .txt file (both are raw text formats) Then just add in your RUL, like Jon said.

Once you want to reinsert the RUL, open the controller dat, remove the current RUL0 from the dat (right click on file > remove file), then right click > insert and compress file...
Select the file, yes to "append to end?", and viola.
Also known as Wahrheit

Occasionally lurks.

RHW Project

Jonathan

QuoteWell I forgot to mention that its only if you have manual save on
There's another way to do it?

This is one of things I dislike about the reader, you choose where to put exported files each time you export.

Jonathan

mtg

Like this??




QuoteAlso don't forget to include your AddTypes line under the correct RotationRing.

What should I add where?

Jonathan

Yes, You need to add the previewEffect name though.

Right now I'd add your puzzle piece to the end of the pedmalls section, why all the AddTypes in a RotationRing must have the same number of Rotations (each line must be the same length (excluding the comment))
So Right at the top of the RUL file there are the RotationRings. You are looking for the pedmall section. To find this without scrolling through it just Find the text "PEDESTRIAN BUTTON SECTION" (without quotes).

You will see below that there is a line which starts with RotationRing and then below that line are many other lines which start with AddTypes. Copy the last AddTypes line and Paste it just below the last AddTypes.
Change the first HID to 5100, the second to 15100 and so on So the HIDs match your puzzle piece.

Post a screenshot of what end up with here so we can see if it's right :)

Also you should open find (Ctrl+F) and type in 00005100 (the HID of your puzzle piece) and see if finds any other puzzle pieces if it does you need to change the HID to something else.


MandelSoft

I spotted a few more errors:

- There shouldn't be a space between "a" and "<". The same goes for "|" and "<"
- Also, the bottom line of both the CellLayout as ConsLayout should have the same width as the lines above. "CellLayout = ^" should be "CellLayout = ^.", and the same goes for ConsLayout.
- Your model misses a PlaceQueryID. Fill in something, like the IID of your Puzzle Piece.

Best,
Maarten
Lurk mode: ACTIVE

mtg


MandelSoft

This means that you should change the H3ID of you Puzzle Piece, because 5100 is already used by the RHW Exit Ramp Style A. Try 5480 instead.
Lurk mode: ACTIVE

mtg

QuoteI spotted a few more errors:

- There shouldn't be a space between "a" and "<". The same goes for "|" and "<"
- Also, the bottom line of both the CellLayout as ConsLayout should have the same width as the lines above. "CellLayout = ^" should be "CellLayout = ^.", and the same goes for ConsLayout.
- Your model misses a PlaceQueryID. Fill in something, like the IID of your Puzzle Piece.

thanks i'll fix that!

QuoteThis means that you should change the H3ID of you Puzzle Piece, because 5100 is already used by the RHW Exit Ramp Style A. Try 5480 instead.

Yes I already thought so, I'll try 5480.