Open Rails Shape Packer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pwillard
    3000 Post Veteran



    • Nov 1999
    • 3070
    • Cumming Ga
    • ORTS

    #16
    1) I appreciate ALL Feedback. Let me see what I can do. I can add .T and .W to the .S file search since ORZIP understands those.

    2) I'll also work on improvements to the selection options.

    3) I'm not sure why you feel it's not great for doing just a single file, though. Using the GUI doesn't have a long lead time, and you can quickly pare down your searches to exact matches if you like. But you can always use ORZIP directly from the command line for single files (it needs to be on your system path) , but I made the GUI so you don't have to remember the --HELP options. I also updated Paul's ShapeFileManager (SFM3) with a more minimal interface for that, but it's limited to S files.

    Anyway... I'll give it a shot.

    http://www.railsimstuff.com
    Just Blender now, 3DCrafter only when I have to.
    Formerly The Keystone Works (All Permissions Granted)
    Things I work on: https://github.com/pwillard

    Comment

    • pschlik
      Senior Member



      • Jun 2011
      • 289
      • Missouri
      • MSOR

      #17
      Originally posted by pwillard
      3) I'm not sure why you feel it's not great for doing just a single file, though. Using the GUI doesn't have a long lead time, and you can quickly pare down your searches to exact matches if you like. But you can always use ORZIP directly from the command line for single files (it needs to be on your system path) , but I made the GUI so you don't have to remember the --HELP options. I also updated Paul's ShapeFileManager (SFM3) with a more minimal interface for that, but it's limited to S files.
      The reason I don't want to use the GUI for a single shape is that the GUI seems to always open up set to use the previously entered file path, not the file path of the folder I'm currently working in. So I have to scroll through the list of >1,000 folders (hence why I think a folder search would help) to change from the previous folder I was working in to the folder I'm currently working in...and that just takes a lot of extra clicks and a lot of extra time when I just want to quickly uncompress a file. The time "invested" to change folders is fine if I'm going to modify half a dozen files though.

      What would make the GUI/SFM more useful in this case (really, in a lot of cases) is if opening a file with the GUI/SFM automatically changed the directory to the directory the selected file is inside. So if I right click -> open with -> SFM3.exe on E:\OR Content\MiniRoutes\AllCommon\TRAINS\trainset\SP_SH ASTA_EMD_ENGINES\DRGW_GP60_3156.s, I would like SFM3 to open up with the directory preconfigured to E:\OR Content\MiniRoutes\AllCommon\TRAINS\trainset\SP_SH ASTA_EMD_ENGINES\ (instead of whatever directory was open last time). That could be helpful even when I want to update just one file, though I'd still prefer an instant option with no GUI or confirmation buttons to click.

      Contributing to ORTS since 2023
      Find me on GitHub @SteelFill

      Like what I do? Join my Patreon to help me do more!

      Comment

      • pwillard
        3000 Post Veteran



        • Nov 1999
        • 3070
        • Cumming Ga
        • ORTS

        #18
        In the shapefile manager, I would like to be able to search the folder list. There's a search for shapefiles, but usually there are few enough shapefiles in a folder to see them all at once. That's not true for the folder list; it gets long and annoying to scroll through. Being able to narrow down that folder list with a search would make things a lot faster.
        Shapefile Manager 3, has far fewer niceties and features because the goal was to mimic the original HTA file as closely as possible. How it handled files was always a bit clunky to me, but I didn't want to alienate people who were very accustomed to how it worked.

        Certainly, I could do a future release with a more intuitive/helpful interface.

        Re Shape PACKER

        Example: Select the "trainset" folder; for search criteria, select "BNSF" and press the SCAN button. The shapefile list will now contain any shapefile with BNSF, and the folder it's in is shown in the list. What else should this functionality include?

        image.png

        I also found multiple instances where I'd like to be able to apply the same action to multiple shapes simultaneously. One can attempt to select multiple shapes in the list, but when right-clicking all other selections are cleared and the selected action applies only to the single shape that was right-clicked. After doing the set-up for a pack of reskins, you'll probably have a good few uncompressed shapes that could do with re-compression, and it's a bit tedious to either do them one at a time or to open up an entirely different program to do bulk processing.
        Currently, the app lets you select your entire trainset folder, for example, then select "Select uncompressed" and process them all when you ask. But I think I see what you mean: additional CTRL-CLICK choices will clear the list, assuming you want to start fresh with file choices. That does seem like something I missed (aka a bug). I've already fixed it, and it's available in the next release.

        ====
        Lastly...

        When you choose a new folder, it updates and scans the selected folder. At this point, it knows which files are S files and which are compressed or not. That's why "Select compressed" or "Select uncompressed" are there for bulk operations.

        But I reiterate... if ORZIP is in your system path... (It should be, for convenience)

        Code:
        $ orzip --help
        usage: orzip.py [-h] [--version] [--advanced-help]
                        info,check,test,convert,text,binary,raw,wrap,repack,defs,blocks,values ...
        
        Standalone MSTS/Open Rails SIMISA zlib compressor/decompressor for compressed binary .s containers.
        
        positional arguments:
          info,check,test,convert,text,binary,raw,wrap,repack,defs,blocks,values
            info                identify file type
            check               validate shape files without writing output
            test                test binary/text conversion round-trips without writing output
            convert             auto-convert binary .s/raw s1b to text, or text s1t to compressed binary
            text                make a binary/compressed shape file editable text
            binary              make an editable text shape file compressed binary
            raw                 extract raw JINX0... binary payload
            wrap                wrap raw JINX0... binary payload as compressed SIMISA@F
            repack              inflate and recompress a compressed SIMISA@F file
            defs                inspect embedded token and shape grammar definitions
            blocks              dump binary block headers from compressed or raw files
            values              decode binary blocks into named values
        
        options:
          -h, --help            show this help message and exit
          --version             show program's version number and exit
          --advanced-help       show all compatibility and technical commands
        You can avoid the GUI altogether.

        Code:
        c:\dev\shapes orzip convert barrier1.s
        [convert] barrier1.s -> barrier1.s (text -> compressed binary, 3106 bytes)
        Will change the compressed status in place. Running it again will reverse the conversion.

        Code:
        orzip info barrier1.s
         barrier1.s: compressed; compressed SIMISA binary container; declared=14250
        orzip convert barrier1.s
         [convert] barrier1.s -> barrier1.s (binary -> text, 52946 bytes)
        orzip info barrier1.s
         barrier1.s: unicode-text; uncompressed UTF-16LE SIMISA text file
        Last edited by pwillard; 09-10-2026, 05:11.
        http://www.railsimstuff.com
        Just Blender now, 3DCrafter only when I have to.
        Formerly The Keystone Works (All Permissions Granted)
        Things I work on: https://github.com/pwillard

        Comment

        • pwillard
          3000 Post Veteran



          • Nov 1999
          • 3070
          • Cumming Ga
          • ORTS

          #19
          Also, I'm trying to optimize the layout to use a little less screen real estate. I know some people might still have smaller screens, so I should be more mindful of how much screen space the app takes up.

          image.png
          http://www.railsimstuff.com
          Just Blender now, 3DCrafter only when I have to.
          Formerly The Keystone Works (All Permissions Granted)
          Things I work on: https://github.com/pwillard

          Comment

          • EldoradoRailroad
            Senior Member

            • May 2010
            • 212

            #20
            If anything, if the font size is adjustable that would be a plus. I am having more and more trouble with "grain of sand" fonts on many devices. Cranking up the display DPI helps, but often breaks visually other programs. As I recall SFM takes up the whole screen, at least the default size I have used for a decade or more.

            Thanks,
            Steve

            Comment

            • pwillard
              3000 Post Veteran



              • Nov 1999
              • 3070
              • Cumming Ga
              • ORTS

              #21
              I'll see if I can figure that out without breaking everything... lol.

              So far, I've broken it pretty good trying this. But I recovered and here we are.

              Open Rails Shape Packer. Contribute to pwillard/ORSP development by creating an account on GitHub.
              Last edited by pwillard; 09-10-2026, 08:21.
              http://www.railsimstuff.com
              Just Blender now, 3DCrafter only when I have to.
              Formerly The Keystone Works (All Permissions Granted)
              Things I work on: https://github.com/pwillard

              Comment

              Working...