Jump to content
Sign In to follow this  
Karybdis

DISCOVERY: File Formats, The Positioning formats (RUL, and Sc4path)

176 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Hmm... first post didn't work.  I'll try again.

I definately agree with you karyb about the necessity to decode before we go crazy trying to modd.  Could we have an updated list of the known and unknown parts of the formats?

Concerning your intersection idea, I think you may be onto something, but I'm not sure.  With intersections between roads, rail, and streets (not highway), only one direction of traffic may flow at a time, as well as turns, which means that there are two possibilities I can think of to handle this:

  • Multiple sc4path paths for intersection tiles, called by the automata simulator according to how much traffic there is on each road or street.
  • One sc4path path for each intersection, alternating travel in each direction.

It seems highly probable that it is the first option, since we don't observe cross street traffic on intersection tiles when there is minimal or no traffic on the cross street.  I suppose this would mean there would need to be some sort of key designating these different paths from each other so that the automata simulator would know which one to call.  Does that make sense?

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

----------------

On 8/25/2003 12:48:14 AM jman wrote:I went back and looked at the SC4Path entries again and think I've filled in a couple of holes.


From the section for moving transportation types the format should read:


# : Transportation type (1=road,2=sims,3=train,4=subway)

# : Path number (per type and direction)

# : Tile Entry side

# : Tile Exit side

## : Number of repeating coordinates for this block

#.#,#.#,#.# : repeating z,x,y coordinate


The description for the new fields:

Path number - For a given flow of traffic through the tile, this identifies each descrete path.  For example, there are three lanes of traffic in each direction on the highway.  So for each highway tile there are three of these in each direction.  On a typical road tile there is only one lane of traffic.  So for each road tile there in only one of these.

Tile Entry & Exit sides - These match the images in the FSH entries and follow the same format as the RUL files.



----------------


I'm having trouble understanding your 'path number' designation. I have seen values 1-8 and I have also seen car values of 9 and 15.  This seems like way more than the 3 lanes you proposed.

But, you are right, that the non-zero values always correspond to the associated letter being placed in the name of the path (-- car_b_2_0 = value of 2).  I am having trouble wrapping my brain around why walking sims could have 8 paths,  and why some highway tiles have path a, b, c, d, e, i, and o (1,2,3,4,5,9,15).

Any ideas?

 

Oh, well, here's an idea:

Some highway tiles have streets, roads, and railways crossing underneath them.  Perhaps the designation i, and o are for the car paths going underneath the freeway?

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

WOW!!! So much new work!! 9.gif Looks like if you give 7th a title, he'll work harder than the hard work he worked before. 22.gif I need to catch up. My job is getting back to normal, now, after a couple months of beeing "unusual". I should have more time to commit to SC4 stuff.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

I've run back through the paths again and looked at these other letters.

I'd seen them before and figured that they were special cases. After looking again, I'm even more convinced. Here's a pretty complete list.

car_i,o - there are highway cloverleaf ramps to switch between highways.

car_d,e,f - these are on and off ramps

sim_* - these are found in intersections. With the all the different street corners, I could imagine a large number of stops.

train_d,e - these are found when trains have a junction where all four tracks enter and exit from the same side of the tile.

I think this is all of the new letters. I've gone through a most of the tiles and that all seem to hold to this standard.

My questions of the moment:
- Still how do the plop buttons select the tile to place?
- Whats the unknown field in the path file?
- How does the game assign automata to the paths?

Any thoughts/updates?

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
Well, there appears to be an exemplar value which corresponds to the road tiles which need other props on them (intersections have streetlights or stopsigns,  high density have mailboxes, etc.)
 
The exemplar property is 0xC9A5A1BE - Networks-SC4NetworkAssociater Type.  I'm not sure who discovered or named this, perhaps they could shed some more light on the subject?
 
 
But, it does appear that there are transportation lots for any transportation tile needing props.  I don't have a running idea for how these or other textures are called when you lay roads yet though...  we'll see.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

..*raises hands*....that would be me9.gif...........

 

That property seems to be a little mysterious still, hence why I decided to give it that name (after some discussion with Kary). However, having said that though, I'm of the belief that that property ties in with the LotConfigPropertyLotObject properties in those exemplars containing this property (0xC9A5A1BE). That is, those items in the LotConfigProperty (for these particular exemplars) is what's shown on that network piece which is referenced by Networks-SC4NetworkAssociater property. Of course though, I have no doubts that the other unknown properties in those exemplars have an influence/bearing on how this is done (to some degree).

EDIT: I should probably clarify this a bit more: when I say show up on that network piece, I don't mean automata, I just mean the props/street/stop/lights etc, nothing else. It is more of a 'linking' item I believe for these particular exemplars and these props/items. Property 0xE974EAA1 probably behaves in a similar fashion somehow, but as of yet I've not found anything significant with that property. What I do find interesting though, is that one of the exemplars with property 0xE974EAA1 has a value of 0x00000100, which is/are one of the sets of road FSH files that don't have a SC4 Path file for them, which is understandable since that particular set of road/street FSH files (0x00000100) don't have/need any automata on them, which is what I find interesting.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Yup, Tropod is right. 0xC9A5A1BE links the type 21 exemplars to the network piece so it can have props.

However, that's all these type 21 exems seem to do. As I stated above, I deleted ALL of those exems and the only thing that happened was that any new road/street that I plopped no longer had props. They still had automata and such.

What I find really interesting... Is just how close the type 10 and the type 21 exems are. Hmm... after all, the games lets us make multi-function lots, right? Maybe, just maybe, if we made a lot, changed a whole bunch of stuff... Could we make straight ploppable network tiles? Interesting... I'm going to try that out tonight! I think I know how to do it too!

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

----------------

On 8/28/2003 1:07:29 PM Teirusu wrote:


What I find really interesting... Is just how close the type 10 and the type 21 exems are.  Hmm... after all, the games lets us make multi-function lots, right?  Maybe, just maybe, if we made a lot, changed a whole bunch of stuff...  Could we make straight ploppable network tiles?  Interesting... I'm going to try that out tonight!  I think I know how to do it too!

----------------


um, well no, not necessarily23.gif. Just to be able to lay any new (not modified, that's an entirely different thing) network pieces that we make, you would have to create the proper functions/rules in the/a RUL file to do this (to call upon the road FSH file to be laid), and have the accompaning FSH files as well, but even then that's no guarantee it'll work perfectly/properly (as something else may be needed).

It's pretty obvious already for a number of us I'm sure, that in order to have new proper functioning network pieces, we'll need at a minimum at least RUL rule(s), FSH file(s), and a SC4Path file (I'm not counting non-functional road pieces though [such as single non-connected tile cell roads/streets], for these we wouldn't need a SC4 Path file for them I believe, these non-functional sorts are just eye-candy really). I wouldn't be surprised though if something else may be needed in conjunction with this for any new network pieces to function properly like existing ones do (this would/may also depend on the sort of network piece we're trying to add)..............specs, we need a set of specs...........*Tropod grabs his glasses*2.gif3.gif

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Yes Tropod...

I am very much aware of what is needed for a new network piece/system. How do you think I did all that in the above screenshot, eh? 3.gif

Anyway, how I was thinking about doing it WAS by adding some rules to the RUL file for it. Then, see if I could associate a path file with a base texture... or change the base texture to that of a network tile via the reader. Something.

Anywho, it is just a thought. No need to talk down to me (Assumed by the way you bolded your text...) like I was a newbie...

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Yeah, I know that too 3.gif

Just seemed like when I first read it... it... I dunno. Argh! I don't even know anymore! *beats self with a 2x4*

Anywho, I think I read it wrong or something... I do that sometimes. 14.gif

Just forget it. I'm sorry.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

I'm pretty confident that you can add new road pieces. Your earlier experiment pretty well proved that.

In your experiment were you thinking about adding new pieces to an existing rul file, or were you thinking of adding a completly new type of road?

If you were thinking new road, have you figured out how to make the new button work?

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
Okay, I'm about to go out of town until Tuesday, but for those of you eager to make this project have some sort of result, here is my suggestion:
 
First of all, remember karyb's wise words, that we must fully decode these formats before we can attempt at creating entire new networks, or really have any hope at creating things that would be useful to the community.
 
With that said, I think it may be of some use to start by trying to add a new texture, with a new specific rule, and associated sc4path.  Keep it simple, and this may help us work out some of the things we don't know.  My suggestion would be a culdusac.  Simply add a section to a RUL file as a dat plugin, which includes a special instance where a tile will turn into a culdusac.
 
 
It's just an idea.  Any new discoveries about the formats or how all the RUL/sc4path/exemplar/pathfinding engine/FSH files are connected would be like gold, even better than creating a simple culdusac because it would open up a world of possibilities to us.
 
 
So, I'm out for now.  Good luck, and I'll check back with you guys on tuesday!

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
Another quick idea before I hit the sack and wake up early to drive away for the weekend:
 
 
This may be some time in the future, but if we can figure out how the exemplars which make streetlight props are called (by RUL files?) and how they function, then we may be able to use a combination of Raphael's knowledge of functional blank lots and our understanding of the RUL/sc4path/transit tile plopping system to create sidewalk bus stops.  But again, this is a ways off, just an encouragement to keep working on the decoding and figuring out how all these things link to each other.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Gah! Eyes... burn... too much... Soul Calibur 2... ;;O_o;;

What? Sidewalk bus stop? Good idea 7!!! That's exactly what I need is those ideas because I have none 3.gif

Keep them coming ppl! I already got a type 21 exem to plop 10.gif

And I'll work on a culdusac... plus some diagonal streets later 9.gif

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

----------------

On 8/29/2003 12:03:57 PM Teirusu wrote:Gah!  Eyes... burn... too much... Soul Calibur 2... ;;O_o;;


What?  Sidewalk bus stop?  Good idea 7!!!  That's exactly what I need is those ideas because I have none
3.gif

Keep them coming ppl!  I already got a type 21 exem to plop
10.gif

And I'll work on a culdusac... plus some diagonal streets later
9.gif
----------------

Well, I'm glad you've got somewhere to start.  I would caution however, that diagonal streets,  to do them right would be an enormous undertaking.  We would first need to understand all the RUL and sc4path files especially for intersections and then make almost 400 unique textures, plus all the 5 sizes of them.  It would be a huge project, maybe worthwhile eventually, but for now I think we should concentrate on smaller things for the purpose of understanding the formats.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Teirusu - from your last post it sounds like you can now plop down your new roads. Am I right?

If so, I'd love to hear how you solved it!

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Sadly no... It indeed seems like I can plop type 21 exems just like any normal lot. However, trying to get them to act like a newtwork piece doesn't work... After all, the game goes from RUL to FSH to Network lot. Trying to do it backwards is like trying to make a cow out of hamburger meat 3.gif

So, that means that a sidewalk bus stop is out... least until RH, heh.

Anywho, I'm still at a loss on the whole parent ID key issue. If I could just crack that I think I'd be set getting in a whole new trans system... *sigh*

Maybe the parent ID has something to do with this in LUA file# 4150?

---------------------------------------------------------------------
-- Used for combining IDs. Has use the same algorith the app uses.
-- This function is implemented by the application
if(not _combine_guids)
then
function _combine_guids (guid1, guid2)
return -1
end
end
---------------------------------------------------------------------



Before I finish this post, I won't leave on a sad note. I DID manage to get something I was working on to work! Check this screeny out 9.gif

wrongway.jpg

I'll admit it... it's doctored. And, by doctored, I mean the 0x00004B00 path file 2.gif

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

I should have also mentioned that road up there you see in the screenshot actually functions like a oneway road. So that definately means the SC4path files are used in path finding.

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    yes they are. Look at it this way.

    The variables in the sc4path describe what the allowed directions of travel are on any road.

    This is something that is lacking from the rules files. They simply tell what similar rule sections are allowed to connect to eachother and what the texture is.

    The purpose of the Sc4path is to in addition to visible automata, pass the direction and class/number variables on to the simulator

    In this way the sim will know that the automata is going in whichever direction since nothing else will tell it that and will therefore be able to calculate routes. Otherwise any two connecting segments of network tile would simply be considered a valid path for the simulator to use. 1.gif

    I believe you will find that the sc4paths will work correctly with nothing but the variable sets before the coordinate blocks since these are the only things that pass direction and class of travel on.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    I'm pretty sure the key to figuring out how the sc4paths are located is in the instance as with everything

    If you have a look at just the sc4paths there are specific groups for different types of automata and paths

    and different subgroups for different path info for same direction travel. IE the 0x0ac##### series of cars for 3 to 1 travel directions.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    ----------------

    On 8/26/2003 2:36:11 PM Teirusu wrote
    6.gif
    kay, I have come up with a Dat plugin that should have just about have everything we need to make a working transportation system.  I would attach it, but it's too big: 158KBs.  If anyone wants it just gimme your e-mail address or give me a buzz on AIM:  Mirai Teirusu


    It almost works too.  Half of it I'm nearly %100 positive it should.  (FSH files/SC4path files since I used them to replace the streets in the above screenshot.)  My only problem is getting anything to plop down.


    The button I created for it (still uses the street's icon)  seems to work (It doesn't crash my game).  However, when I click it, it will plop down roads.  (Odd since I used the street button as a template.)  If I click on it a second time it no longer works.


    Then, if I were to click either one of the road/street buttons THEN click the button I made it will plop down the road or street.  It's kinda difficult to describe.  You have to see it for yourself.


    But, I think I know what's going on, but I'm not sure how to solve it.  Basically, the button (With it's Parent ID) calls up the tuning file which defines how the said transportation type will be plopped. (diagonal and straight or just straight drags) I know this because there isn't anything else it CAN point to.


    It can't be the RUL file because when you rename the #stuff# to something else you can still click-and-drag but not plop anything.  I'm not getting that.  I'm getting a simulator that is confused about what my new button actually points to.


    Also, I'm not sure, but I think maybe the Parent ID key I gave the new button is correct. (That's why the game doesn't crash) It's 10 less then the street's parent ID.


    I came up with that number by looking at the Highway/overpass menu.  The overpasses/cloverleaf buttons all have Parent ID keys that are 10 less or more then eachother.  That's gotta mean something, but I don't know what at the moment.  So, maybe the problem is with the Instance ID I gave the tuning file...


    Also, when I first started changing out the street FSHes for my dirt ones. (My FSHes use the 090XXXXX instance ID series.) I found that Sims could no longer get to work.  It wasn't UNTIL I added SC4path files did all the 'No road connection' zots go away.  It seems the traffic sim ALSO uses the SC4path files, but in what way I dunno.  Something for you to chew on Trumpet
    2.gif

    I'll get online tonight around 6-7 central time. (7-8  Eastern)  In case you want to look at my .dat 
    1.gif
    ----------------


    I'm just wondering if you still have this dat plugin, and would you please attach it to a post here. I don't see how or why it would be to big to attach, after all you've said it is only 158Kbs, which is well under the limit, you just need to put it in a zip file before trying to attach it. I'm keen in seeing what you've actually done here, as it does sound interesting (I didn't really pick it up the first time I read it).

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Hmm... didn't know I could get a 3:1 compression on these dat files... or is 1:3? Oh well.

    Tis been attached. Have it Tropod! Hope you have better luck then I did!

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Just noticed something... I put the wrong support exems in that one. Sorry, my bad.

    I put them in there for the heck of it. From what I've seen they're not too important anyhow.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I'm sure you'll all see it, but I just created a seperate thread to focus some work on the plopping networks problem that is looming out there. We're bouncing around a few different topics in here and I get easily confused...

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Just refreshing this thread to remind everyone that we only need two things done to complete the purpose of this thread.

    1. Identify the value in the header of sc4paths formerly known as the 2d/3d key
    2. Create a table of the class values for sc4path stopped automata segments.

    I am working on these myself but could seriously use the help considering how close we are.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    Thanks for the kick upstream karyb.
     
    I have to admit though, with rush hour and all, I've gotten a little lost as to what we know, and what we need to know.  I feel like there's more than that we don't know (a link between the network types and the necissary values in the traffic parameters exemplar, for instance).  Have I missed something?
     
    But seriously, just let me know what I can do.  I'm just a little lost as to what has been discovered, and what needs to still be deciphered.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Yea I know the feeling

    Those types of things would fall under two different threads though I think.

    1. The file formats relationship threads for how files relate to eachother.
    2. The instance Naming scheme thread. Not sure if this thread actually exists yet

    All that this thread actually covers is physical structure of the two types, of which only the two things listed in my last post are needed any more.

    The class bit is the a-h alphabetical values seen in the stopped automata segment in my specification on the previous page. I know its the type of stop and the way the game handles it, how however requires a table

    The 2d/3d key is the last part of the sc4path header before any specific segments. It always has values of 0 or 1

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    turns out we really dont need to make a stopped automata class table.

    I've been researching them and what was said before is pretty much correct. Class is just a Path Type Number. the ones for Sims and the ones for Cars are basically just the various different places at an intersection a car or sim can stop at.

    I'm working on the last thing (2d/3d key right now and will get back to everyone)

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Apparently the 3d key is a 3d key of a sort

    What it does is marks scpaths where the 3d model if its used goes away from the terrain in some respect, IE non-terrain following.

    This applies to Highways(all sorts), and bridges(for cars),

    This also applies to rail bridges, and for most subway types although several subway pieces are noticibly devoid of a value of 1 here meaning they're not terrain variable somehow. Probably work on flat terrain only.

    And that concludes our broadcast day as the saying goes.

    Sc4paths and Rules specs are now complete, just in time for Rush Hour.

    Final SC4path spec

    ----------------------

    ---- Header

    SC4PATHS
    #.# : Version - 1.0 or 1.1 (formats will be covered following)
    (1.0 versions may not contain stopped automata detail)
    (1.1 versions have stop automata detail and an extra starting property)
    ## : Transportation paths in the file (sims and transport)
    ## : (1.1 only) Stop detail sections in file (for stopped automata)
    # : 3d model terrain variance for this path file?

    (terrain variance means model does not hold to terrain)

    ---- (Sections for a moving transportation type - road, sim, subway)

    -- Type_class(not present if not set)_EnS_ExS : Transport section internal name

    # : Transportation type (1=road,2=sims,3=train,4=subway)
    # : Path Class Number (see table)
    # : Entry Side (0-3 + 255 for start in tile)
    # : Exit Side (0-3 + 255 for end in tile)
    ## : Number of repeating coordinates for this block
    #.#,#.#,#.# : repeating z,x,y coordinate

    ---- (Sections for Stop Data - version 1.1 only)

    -- Stop(UK if UK stop)_Transittype_class(not present if not set)_EnS_ExS

    # : Type of Stop (1=normal,2=UK Stop. United Kingdom. IE other side.)
    # : Type of Transit (1=road,2=sim,3=train)
    # : Path Class Number (see table)
    # : Entry Side (0-3 + 255 for begin path in tile)
    # : Exit Side (0-3 + 255 for end path in tile)
    #.#,#.#,#.# : Coordinate for Stop

    ---- Tables

    ---Moving Automata Class/Number Table
    --
    -car_i,o - there are highway cloverleaf ramps to switch between highways.
    -car_d,e,f - these are on and off ramps
    -sim_* - these are found in intersections. With the all the different street corners, I could imagine a large number of stops.
    -train_d,e - these are found when trains have a junction where all four tracks enter and exit from the same side of the tile.
    -Car(stopped)_* - various car stopping positions for an intersection.
    --
    The different values for this are for various types of movement, IE high to low highway, what side and direction for onramps, what junction movement for trains.

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account

    Sign In to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections