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:  
 
Hardcoded the data that used to be in the INI file, governing intersections and conversions between different network types?  I highly doubt it, for two reasons
 
The INI before, which consisted almost completely of these rules for tiles including more than one network type, weighed in at 12.7KB.  Doubling the number of networks above ground, I would not be surpised if the size of these rules is now up to about 500KB, since the number of intersections has been drastically increased.  Each new network would approxomately double the number of rules, so 12.7*2^5 = just under 500KB.  The exe has actually decreased in size, not increased, so squeezing an extra 500KB of data into the exe would be contrary to the convention, and difficult to do.
 
Second reason, in the Rush Hour networks INI, it describes that all the paths are reversed for the UK version, and for that reason, additional manually reversed paths are written so that when the UK version reverses them, they are still going in the right direction.  If one way's were hardcoded, there would be no reason to go to this trouble.
 
 
but thanks for the idea 2.gif
 
Has anyone seen new text formatted files which could include our missing data?

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
The only new text format I have seen in RH is the BSPEC files, and then the two new binary files, AB and AE. There are quite a few AB files, and I'm also thinking that these could be our mystery file.
 
Do you guys want a "search for text in files" feature added to datgen? I can add one fairly easily, just let me know what kinds of features you want in it. It might help find these references your looking for.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
hmmm... well, a search for text feature would be great.  I'm just anxious to find these missing intersection designation files.
 
So the new filetypes (other than BSPEC) are binary?  Do we have any clue how to interpret them yet?

Share this post


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

    for AB and AE I'm afraid not. Those are the two new binary formats

    Other than those, new stuff is: A modified TRK format, BSPEC format, Sc4path 1.2, several new types of INI currently registered as RUL, and AB and AE.

    They used almost everything from the old formats really.

    ==========

    For search in file, just search by binary, or search by text. We want to be able to search an individual file, or all files, or all files of a specific type. At least that's what I think this needs.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    Ok. I'll add a search feature. Will have the following features:
     
    Search text or binary
    Search at offset x for length y in files
    Search multiple patterns at a time
    Search in specified file types/TGI ranges
     
    I think that should give you guys the ability to narrow it down as finely as you need. 1.gif

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    You've got your search engine, 7th. 1.gif The latest DatGen is uploaded.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    Ok...just so you know, to get to the search tool, you need to go to the browser, and right-click on a file in the browser tree. The search option is at the bottom of the menu.

    Share this post


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

    Oh, another thing about the search engine. To search in binary, you have to enter strings of hex. For example, to search for "HEAD" in files, you would enter the string (I think this is right) "48444145". Don't put the 0x in, just the value in hex. The length of the hex string should always be even, but if you forget to make it even, the engine will automatically add a zero to the beginning of the hex string.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    DarkMatter, you and DatGen ROCK!!!
     
    Not only is the search tool awesome, but for some reason DatGen already had some INI files classified in the Pathing section which are exactly what we're looking for.
     
     
    So, I guess there is a bug in the reader not loading the INI files at intanceID 0, 1, and 2.
     
    [edit]
    They were under my nose the whole time!!!
    There was no bug in the reader.  They were listed as RUL files instaed of INI files, and I didn't look at the last RUL files since the ones right before that were governing bridges.  Shame on me!
    [/edit]
     
    I'll report with more info on the new INI formats after I'm done salavating 1.gif

    Share this post


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

    hehehe 1.gif

    I actually started the DST project last night
    I was able to successfully import diagonal rules into the streets files meaning that diagonal streets are possible

    The problem is that it wont allow you to draw them even with proper rules. Maxis switched off diagonal drawing somewhere and I cant find it. if the switch for diagonal drawing of networks can be found so that it wont only draw at a 90 degree angle, then diagonal streets become a reality

    (even bridges can draw on a diagonal just not plop, so I assume there has to be a switch somewhere for streets)

    Share this post


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

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

    On 10/7/2003 1:11:23 AM Karybdis wrote:hehehe
    1.gif


    The problem is that it wont allow you to draw them even with proper rules. Maxis switched off diagonal drawing somewhere and I cant find it. if the switch for diagonal drawing of networks can be found so that it wont only draw at a 90 degree angle, then diagonal streets become a reality


    (even bridges can draw on a diagonal just not plop, so I assume there has to be a switch somewhere for streets)

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


    Try the "[network name here] placement tuning parameters" exemplars.  That would be the first place I'd look.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    "Not only is the search tool awesome, but for some reason DatGen already had some INI files classified in the Pathing section which are exactly what we're looking for."
     - 7th
     
    !!! Oooohhh!! I posted that I found these the day I got RH!! I think its just a little higher up in this thread. 7.gif I forgot about them, otherwise I would have told you all about them 7th! :O I'm sorry. I made sure they were listed correctly (as .INI files) because they were listed as RUL files at first. I made a special note of making all the new files in RH list properly day one of RH's release.
     
    I hope to have two plugins ready for DatGen soon. Maybe even three, but I don't know how soon the third will come out. The first is the SC4Path viewer/editor, you all know about that. Second is a RUL viewer/editor/tweaker tool. This will let you view rules on a grid...pick from another rule and see how they match up by plopping them on the grid next to each other, and will let you create/edit rules in a different view. You'll be able to set the connection type for each side of a tile, and set the kind of tile itself (flat, sloped, etc.). The third plugin will be a combination viewer for both rul and sc4path files. This will let you plop test networks, and see the textures, will take into account rules when plopping tiles, and will show SC4Paths on the network you plop. This third one is going to take a while to write though, so no promises on when it will be out. Hopefully, with these tools, you'll be able to create and test new RUL and SC4Path files much quicker than you would otherwise.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    As promised,  here's what I've gleaned so far about the formats of the three RUL or INI files governing network tiles which change from one network to another:
     
     
     
    The 0x10000000 file contains all things freeway intersection related.  The first part of the file is the order which the builder searches for matches, and the order which you can tab through the options.  The rest of the file follows the same format that the original cloverleaf portion of the original INI file did.  It is a bit confusing,  and I haven't digested the format totally yet, but the comments are fairly good, and we won't be able to add anything to this section until we can import 3dm files anyway.
     
     
     
    The 0x10000001 file is pretty much the same as the original INI file's main body, which Teirusu has already described on the first page of this thread.  There is a section at the very end of it though which I'm not sure of:
     

    [AllowedOverrides]
    1=Road,Street
    2=Avenue,Road
    3=Avenue,Street
    4=Avenue,GroundHighway
    5=Highway,GroundHighway
    6=OneWayRoad,Road

     
     
    The 0x10000002 file is all the overrides.  It replaces necissary tiles, and looks like it is mostly used to fix bugs and prevent construction in some instances.  It seems to have something like the following format:
     
    (tile 1)InstanceID,rot,flip,(tile 2)InstanceID,rot,flip=resultant string
     
    The resulting string is the same format as the first half of the line.
     
    A 0 in the InstanceID places after the '=' indicate prevents, where it does not allow you to build.  I don't really know what the relation between the two successive tiles are.  My current idea is that they are two consecutive tiles in the network builder (before you let go of the mouse).  I'll have to do some crazy digging to figure that out though.

    Share this post


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

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

    On 9/24/2003 8:25:49 PM Karybdis wrote:Here is the new SC4path 1.2 filetype
    1.gif


    ----Header


    SC4PATHS

    1.2 - vers

    3 - Blocks in file

    0 - Sim/Stop blocks in file

    1- terrainvariance


    ---- Blocks


    1 - Transport type

    1 - Class/Path type.

    2 - Entry side

    3 - Exit Side

    0 - U1

    4 - Coordinate lines

    8,4.093335,15.843066

    4.371101,0.485801,15.843198

    -2.012599,-5.977500,15.843198

    -3.939568,-8,15.843173


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


    This specification is not tested so dont take it as word of course since I dont have a copy of the game. It should be correct however based on what I've seen so far.


    U1 is the only currently unknown value. Of course I've never seen it with a value of anything but 0 so I have no way of judging
    1.gif
    ----------------

    Ok, I am lacking some info that I need to parse SC4Path files. What are the possible values and their meanings for the Transport Type, Class/Path type, and the Junction Key values? Karybdis's spec says there is a table that defines them, but there isn't one. I need to know the possible values and their meanings to write the path viewer.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    WHEEEEE!!!!!! We now have a PATH VIEWER!!!!! Its nothing fancy, rather quite miserable, but its such an accomplishment. I still need to know what those values are to make this thing display paths properly, but anyway, here ya go:
     
    /idealbb/files/pathplug.jpg

    Share this post


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

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

    On 10/11/2003 6:31:34 PM DarkMatter wrote:

    Ok, I am lacking some info that I need to parse SC4Path files. What are the possible values and their meanings for the Transport Type, Class/Path type, and the Junction Key values? Karybdis's spec says there is a table that defines them, but there isn't one. I need to know the possible values and their meanings to write the path viewer.


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


    Transport Type:

    1. Car
    2. Sim
    3. Train (surface rail)
    4. Subway
    5. *not used*
    6. Elevated Train
    7. Monorail

    Class/Path Type:
    This is actually slightly misnamed.  Usually a, b, and c are used for the three lanes, but it doesn't necissarily have to be that way.

    Each letter corresponds to a number, a=1, b=2, etc.  For each pair of tile entry/tile exit sides, the class/path type must be unique.  So, if there are 4 paths which go from side 2 to side 3, each path must have a unique class/path designation.  I am not 100% sure that they have to be consecutive (no numbers or letters skipped), but they do have to be unique.  Also, a zero in this value defines it as the only path with the said entry/exit sides.  So, if you add a path to a 1.1 or 1.2 file which has a zero as the path type for the tile entry/exit combination you want to use, you must change the existing path's class/path type to something other than zero.

    The letters are purely arbitrary since they are only in the comments, but associating a=1, b=2, etc. is the standard maxis has followed.  Also, it was previously thought that these paths had some sort of significance to what type of path it was.  This is not true.  Any correlation is purely for keeping programmers minds straight, or a pure coincidence.  You can change a path type, or swap two path type values for symilar paths (same entry and exit side) without messing anything up.

     

    Junction Key (this is the tricky one):
    Basically 0 denotes no junction and 1 defines the path as a junction (one entry point to more than one exit point).  However, I have not totatlly understood what this property actually does as far as the simulator is concerned.  I will let you know if I find any more out though.

    Share this post


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

    class/path type as was originally designated by jman

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

    And as mentioned A,b,c are lane values, for both avenues and highways as far as I know. Better to adhere to these really if possible

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

    NOTE: do NOT put these down as their current values. We NEED to see how they look in the composite viewer to make sure of exactly what each one is 1.gif

    I wouldnt really call it misnamed, however if you want a better one, Try Path Identifier 1.gif

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    LOL 7th. :D
     
    Ok, have a question. In the RUL spec, it says this:
     
    0 (no connection)
    1 (sloped connection)
    2 (strait connection)
    3 (sloped connection)
    4 (shared median)
    11 (sloped connection from an intersection)
    13 (sloped connection from an intersection)
     
    What is the difference between 1 and 3? Whats the difference between 11 and 13? Is there a difference? I need to find out so I can finish the rul editor.

    Share this post


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

    To be honest we dont know. ~_~ I wish I could say we did.

    those are just the values that the guys who originally decoded that property gave me. I would guess that they are varying degrees of angle 1.gif

    Share this post


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

    00 - no connection

    01 - symetrical 45 degree angle, centered in the tile.  Angle of road is -45 degrees from the direct line from the center of the tile to the center of the edge in question.

    02 - straight transit piece, centered in tile.

    03 - symetrical 45 degree angle, centered in the tile.  Angle of road is +45 degrees from the direct line from the center of the tile to the center of the edge in question.

    11 - non symetrical 45 degree angle, not centered in tile.  The center point hits the edge about 10 pixels to the right of the tile side if you are standing in the center of the tile looking toward the edge in question.  Angle is -45 degrees from the straight line between tile center and the center of the edge.

    13 - non symetrical 45 degree angle, not centered in tile.  The center point hits the edge about 10 pixels to the left of the tile side if you are standing in the center of the tile looking toward the edge in question.  Angle is +45 degrees from the straight line between tile center and the center of the edge.

     

    Just so you know, there are quite a few more for rails (22,23,32,42,52,62, and 72).  There might be even more lying around,  I'll keep checking.

    more later....gotta go to work 2.gif

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    I honestly don't know what you just said, 7th. These angles....are these in the z direction, or on the x/y plane? Are we talking slope or something else?

    Share this post


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

    Yeeesss....piiictuuurres......a picture is worth ten billion words right now. 22.gif

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    Okay, here are the specs for RUL tile sides for roads and streets.  There are a few more for rails that I haven't had time to nail down yet.
     
     
    /idealbb/files/Diagram1.jpg
     
    The Setup:

    Imagine yourself at the center of this transit tile at point E, looking North to point 2.  Segment AB is the side for which we are trying to determine the border type.
    Explination:
     
    These RUL entries dictate the center point of the network (in this case, roads) along segment AB, and the direction the network is going, in comparison to segment E2.  If the vector of the transportation tile is paralel with EA, the angle would be -45

    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