• 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 4 Guests are viewing this topic.

mtg

Found this in RUL2

Quote;Small 90-Curve
0x5de4b100,1,0,0x5e000f00,1,0=0x5de4d100,1,0,0x5de0f100,1,0
0x5de4b100,3,0,0x5e000f00,1,0=0x5de5d100,1,0,0x5de1f100,1,0
0x5de4b100,1,0,0x5e000f00,2,0=0x5de5d100,3,1,0x5de1f100,2,0
0x5de4b100,3,0,0x5e000f00,2,0=0x5de4d100,3,1,0x5de0f100,2,0
0x5de0f100,0,0,0x5e004b00,1,0=0x5de0f100,0,0,0x5de4d100,1,1
0x5de0f100,0,0,0x5e004b00,3,0=0x5de0f100,0,0,0x5de4d100,1,1
0x5de1f100,0,0,0x5e004b00,1,0=0x5de1f100,0,0,0x5de5d100,1,1
0x5de1f100,0,0,0x5e004b00,3,0=0x5de1f100,0,0,0x5de5d100,1,1
0x5de0f100,3,0,0x5e004b00,1,0=0x5de0f100,3,0,0x5de4d100,3,0
0x5de0f100,3,0,0x5e004b00,3,0=0x5de0f100,3,0,0x5de4d100,3,0
0x5de1f100,3,0,0x5e004b00,1,0=0x5de1f100,3,0,0x5de5d100,3,0
0x5de1f100,3,0,0x5e004b00,3,0=0x5de1f100,3,0,0x5de5d100,3,0

I think this is the code for a small 90 degree curve for EMIS
Should I just copy the code, and elevate the pieces to 30m?
If the answer is yes I can't find some of the S3d pieces in the RHW dat.

Jonathan

All the RHW-2 are textures it does not have S3Ds.


To me that section of RULs you have taken is too long there should only be about 4 lines of RUl for a 90degree curve (though I've only been involved in rail RULs which dont have 90 corners). But there should only be 3 different IIDs in total you need to create the corner.


The RHW IID follows a similar pattern to the Road IID, but AFAIK the easiest way to find an IID is to ask someone for it, or sort all the files in the dat file type and scroll through all the FSH files by holding down the arrow key.

Jonathan


mtg

If I'm not mistaking, to get my network to curve
I need the texture IID's of 3 RHW2 pieces
I think they are :
1= 5e004d04
2= 5e000c04
3= 5e000a04

-EDIT-
ARE THESE S3D'S THE RIGHT ONES FOR THE EMIS
1= 5de4d200
2= 5de0c200
3=5de1a200


Then I need the s3d IID's of the EMIS models 1,2 and 3 (or I create them  ;))



Then I write the following code (without any rotations)

Ortho30mMIS   next to    5e004d04      =     Ortho30m Mis     next to    Piece 1 HEMIS
piece 1 HEMIS  next to   5e000c04       =     piece 1 HEMIS    next to    piece 2 HEMIS
piece 2 HEMIS  next to   5e000a04       =     piece 2 HEMIS    next to    piece 3 HEMIS

piece 3 HEMIS  next to   5e000a04       =     piece 3 HEMIS    next to    piece 3 HEMIS (with different rotations to get the diagonal parts to line up)

The rotations I'm not sure of jet, do I have to write code for every possible bending? like
a code for south to north/west, south to nort/east, east to north/west and so one? 



It's very hard to put this in words (and I hope it makes sense) but I hope you guys understand want I wanna ask??

Jonathan

You will not need to use the EMIS IIDs in the RUL, so what you have written in your post is right.

You will need 4 lines of code (for just the first tile of the curve, number 1 in your picture), as RUL2 doesn't care about orientation

1.  [left with yellow line on the outside]
2.  [right with yellow line on the outside]
3.  [left with white line on the outside]
4.  [right with white line on the outside]

Does that answer you question?

Try writing the RULs, and post them here and try them in game in every possible direction

Jonathan

mtg

QuoteDoes that answer you question?

Don't they always do!?

hmm 16 lines of code for one piece that means 64 codes to get the turn??
I'll write them at work tomorrow  ;D

Jonathan

no &ops, sorry I got that wrong ignore my post. lol. of course 64 is just way to much for one turn.
Let me just go correct that. EDIT: All corrected now :)
Jonathan

mtg

 ;D Now my boss will be happy! I'll show him these posts when he asks me what the hell i'm doing! ( It could be worse)  :D

mtg

I wrote this code, but it doesn't work. Do I have the rotations wrong or is the code wrong??
0x5de4d500 = the EMIS piece, elevated to HEMIS it used to be 0x5de4d200


Korot

You've once again got the rotations wrong:

0x5de4b500,1,0,0x5e004d04,1,0=0x5de4b500,1,0,0x5de4d500,1,0
0x5de4b500,3,0,0x5e004d04,1,0=0x5de4b500,3,0,0x5de4d500,1,0
0x5de4b500,1,0,0x5e004d04,2,0=0x5de4b500,1,0,0x5de4d500,2,0
0x5de4b500,3,0,0x5e004d04,2,0=0x5de4b500,3,0,0x5de4d500,2,0

Regards,
Korot

mtg

QuoteYou've once again got the rotations wrong:

Will I ever learn  :bomb:
Thanks I'll try it!

mtg

I think there's something more wrong, it still doesn't work

Korot

To which model does the IID 0x5de4d500 refer? Is that the IID for the HEMIS, or do you yet have to make the model? I ask you, since the IID for the EMIS curve piece is 0x5de4d200
Also, without having added part 2 and 3, I doubt it will work.

That would result in (for 1 to 2):
0x5de4d200,1,0,5e000c04,1,0=0x5de4d200,1,0,0x5de0c200,1,0
0x5de4d200,3,0,5e000c04,1,0=0x5de4d200,3,0,0x5de0c200,1,0
0x5de4d200,1,0,5e000c04,2,0=0x5de4d200,1,0,0x5de0c200,2,0
0x5de4d200,3,0,5e000c04,2,0=0x5de4d200,3,0,0x5de0c200,2,0

And for 2 to 3:
0x5de0c200,1,0,0x5e000a04,1,0=0x5de0c200,1,0,0x5de1a200,1,0
0x5de0c200,3,0,0x5e000a04,1,0=0x5de0c200,3,0,0x5de1a200,1,0
0x5de0c200,1,0,0x5e000a04,2,0=0x5de0c200,1,0,0x5de1a200,2,0
0x5de0c200,3,0,0x5e000a04,2,0=0x5de0c200,3,0,0x5de1a200,2,0

And 3 onwards;
0x5de1a200,1,0,0x5e000a04,1,0=0x5de1a200,1,0,0x5de1a200,1,0
0x5de1a200,3,0,0x5e000a04,1,0=0x5de1a200,3,0,0x5de1a200,1,0
0x5de1a200,1,0,0x5e000a04,2,0=0x5de1a200,1,0,0x5de1a200,2,0
0x5de1a200,3,0,0x5e000a04,2,0=0x5de1a200,3,0,0x5de1a200,2,0

That will (hopefully) work.

Regards,
Korot

Jonathan

Both Korot and Maarten: Your second IID ends in 4, it must end in 0.

Korot, you forgot the 0x in front of the 2nd IID on th first chunk of RULs you posted.

btw, while RULs are not case sensitive, it is easier to stick with either lower case or upper case, as if you look at 2 identical IIDs but one in Uppercase, they will look different on first glance. And it's just easier to read.


btw, the rotations on the first half of the RUL 9before the = sign) are crucial, get these wrong and the RUL line will not work at all. However get the rotations on the second half of the line wrong and the first half correct, the RUL will show just the piece will be in the wrong rotation which you will be able to see and then work out in game.

You have something wrong though:
0x5de4b500,1,0,0x5e004d04,1,0=0x5de4b500,1,0,0x5de4d500,1,0
0x5de4b500,3,0,0x5e004d04,1,0=0x5de4b500,3,0,0x5de4d500,1,0
0x5de4b500,1,0,0x5e004d04,2,0=0x5de4b500,1,0,0x5de4d500,2,0
0x5de4b500,3,0,0x5e004d04,2,0=0x5de4b500,3,0,0x5de4d500,2,0

The rotations are completely wrong, you definetly do not need 2 (the ones I've bolded) as if you rotate the RHW-2 Texture90 degrees twice then that does not appear in game.

Also the 1 should be a 3. Hopefully this picture explains more:


These are the rotations of the 2 textures in question:
RULs are done in a left > right fashion. So the texture need to make up the road going from left to right.
Because orth HEMIS tile are vertically symetrical (all orth tiles for all networks are vertically symmetrical, I can't think of one that isn't)
In that picture on the right of the vertical black line is how the first 2 lines of the RUL should be. You'll notice there's no way to using those rotations to make the curve, curve to the right. That is because you will need to involve mirrors but for the time being just try to get the EHMIS to curve left, then we can worry about the curving right when you've got that to work.


btw, Korot the RULs are done tile by tile, your eyes may see the curve as one curve, but the game doesn't so you would not need parts 2 and 3 for part 1 to convert.

EDIT: There's a tutorial here by JPlumbley (SAM creator)http://sc4devotion.com/forums/index.php?topic=2500.0

Jonathan

Korot

Quote
btw, Korot the RULs are done tile by tile, your eyes may see the curve as one curve, but the game doesn't so you would not need parts 2 and 3 for part 1 to convert.

Yes, but this would also have implemented the diagonals. About the last digit being wrong: I used his (mtg's) IID's, and rotations. Oh well, at least you learn most from your mistakes.

Regards,
Korot

Jonathan

Quote from: Korot on March 17, 2010, 12:50:16 PM
Yes, but this would also have implemented the diagonals. About the last digit being wrong: I used his (mtg's) IID's, and rotations. Oh well, at least you learn most from your mistakes.

Regards,
Korot

Well as the rotations were wrong it wouldn't have. Once you get the first few tiles done then it becomes simpler and you can do many tiles at once, but the first few it's best just do one tile, check in game, fix, check in game, etc until you get it right :)

Jonathan

mtg

QuoteTo which model does the IID 0x5de4d500 refer? Is that the IID for the HEMIS, or do you yet have to make the model? I ask you, since the IID for the EMIS curve piece is 0x5de4d200

The IID is indeed the one from the HEMISpart, I took the 0x5de4d200 and elevated it to 30m and reIIDed it to 0x5de4d500

Jonathan once more you've proven your self to be able to make things very clear!

mtg

0x5de4b500,1,0,0x5e004d04,3,0=0x5de4b500,1,0,0x5de4d500,1,0
0x5de4b500,3,0,0x5e004d04,3,0=0x5de4b500,3,0,0x5de4d500,1,0

These first two lines should be right, shouldn't they? (can't try it in game now, don't have SC4 installed on my pc at work)

Jonathan

Yes that's right apart from the second IID Needs to end in 0 not 4.

Also i see that you've got the last IIDs rotation correct, I was going to come to that but you've got it worked out.

Jonathan

mtg

Now look at this! ;D I think I'm getting it finally  :D (I know It's the wrong S3D this one should be for the right turn, but what the heck it shows in game ()stsfd())


mtg

Oh yeah BTW this is the corresponding code

;HEMIS Corner
0x5de4b500,1,0,0x5e004d00,3,0=0x5de4b500,1,0,0x5de4d500,1,0
0x5de4b500,3,0,0x5e004d00,3,0=0x5de4b500,3,0,0x5de4d500,1,0
0x5de4b500,0,0,0x5e004d00,0,0=0x5de4b500,0,0,0x5de4d500,3,0
0x5de4b500,2,0,0x5e004d00,0,0=0x5de4b500,2,0,0x5de4d500,3,0