Download the latest (exe) (same as the jar, so you still need java runtime, but the exe loader gives more memory for the program, and checks for java version, and works when the run paths in system aren't set, and nothing happens on double click on jar)
If you did everything as written here, and you don't get any error message, but the application still not works, try running it in admin mode, especially if you want to open files in program files, because windows have a "fantastic" access right management, so it may deny the file writing of this application there.
If you have a good idea for a new function to this program, feel free to write it in a comment below, or send me an e-mail with your ideas (found below on the end of this article).
If you like this program, and you want to thank it:
Updates:
January 15:
- added a function to save and load the whole table with all cells (in case if you want to replace with same settings in different time, or just to save what you've modified to what)
- added table control icon at the right top corner of table, to hide columns, pack table
- some other cosmetic changes
- Added a version with fixed multithreading (multiple cpu core usage)
January 18:
- Fixed file choosing windows (now these store the last location) per session
- Added config file making/loading, so you can set a default directory for the application, which will be saved to config.cfg next to the application, and will be re loaded at each restart
January 19:
- Added "Assets" directory blueprint file tree view and file list caching
- Added function to double click on blueprint files in tree view to set them as desired blueprint in selected table row(s) which got now green highlight.
- Some optimizations
- Fixed file filter stacking bug at file choose
- Some optimizations, that causing 20x faster (really) replacing in big files (on smaller files fe. scenery you won't notice at much improvement, unless if you have SSD). Now serz-ing takes longer time than the replacing itself. (for example replacing all of the ~2500 signals and mileposts and speedsigns. on hagen-siegen before took ~2 min on my pc now it takes 10 sec.
- Some bug fixes
- Replaced backup saving code with a newer implementation (older java file libraries have problems with windows file locking)
- Added a tool to toggle, enable or disable shadow casting in light blueprints. Select a file or directory in assets file tree, then right click to open the popup menu. If a directory is selected, all light blueprints will be changed in directory, but not in it's subdirectories.
- Youtube video about the new function
- Fixed serz problems on filepaths that contain whitespace characters
- Fixed misaligned blueprint data fill when columns were hidden
- Added automatic online checking for new version at startup
- Added track network offsetting (raise/lower tracks, by setting an offset), this setting can be found in "Tracks" menu. It will only work if there are tracks.bin/xml file opened, otherwise, it won't have effect.
- Added object offsetting (raise/lower height per object types by setting an offset in table), these are found at heightoffset column in table.
- For both, if you don't want to change something, just leave it on 0. You can use negative numbers too.
- Now height changing works on simple lofts, and road lofts too
- Bug fix at height changing, and some optimizations
- Added new feature: dav file decoding to wav. It does the same as Ben Laws's Dav Decoder, but here you can select and convert multiple files at once, and you can select directories too (where the program will search for dav files and decode them). You can find this new feature in Assets/Decode Dav files menu
- Added a version that uses exe wrapper, to pre set max memory usage, and checks for required java runtime version.
- Added new feature: zip to rwp. With this you can convert plain zip addon releases to rwp format. It works similarly like the dav decoding feature. You can select multiple files, or directories to convert. This feature can be found at Assets/Zip to RWP.
I've wrote a simple Java application to mass replace blueprint references in railworks data xml/bin files. I'm tested it on scenery tiles, and tracks.xml(tracks.bin) to replace signals, and tracks and track rules. But it will probably work on any railworks xml/bin files that have blueprint references. (it will work on those too that haven't got blueprint references, just won't list anything though)
For example i've replaced all kind of german signals on Hagen-Siegen route, to hungarian signals, in 5 minutes.
Short tutorial with new function
Light shadow cast switch tutorial
Another tutorial
You can raise/lower track network, or objectst too, and you can bulk switch on/off the shadow casting of lights in game.
And yes you can do some of this with RWTools(like you can with any text editors), but with those you can do a lot of mistakes. Search for blueprint copy paste the tags, missing character mistakes, etc, and you cant replace multiple different blueprint references at once.
The application is pretty simple, for those who know what is provider, product, and blueprintID, so basically what is blueprint in RW.
Usage:
- File menu/Open files (you can select more but of course the processing will take longer time)
- Select one or more blueprint types (trackbedrumble, trackrule, etc)
- Click on Filter button to populate the table
- Find what you want to replace, and fill(double click to edit the cells) the desired<something> cells with the desired new blueprint reference. Or double click on blueprint file in the tree view. If you don't want to change something, then leave it's "desired" cells blank, so the application won't touch them.
- If you're done, then click on Replace items button, and the application will replace all of the blueprint references in the file(s) where you filled ALL the three cells (if desiredProvider/product/blueprintid is missing, it won't modify those references). The processing time will depend on how big is the xml you modify, how many things you want to replace, how many xml files do you modify. For example replacing around 30 different signal blueprint references and 2024 pcs of signal instances on Hagen siegen took about 30sec processing time.
- If you have multicore cpu, the program can use any cores if there are enough xml files opened, as every xml processing runs in seperate thread. So if you have a quad core cpu, with one opened xml it will use one core, but if you opened at least 4 files, it will use 4 cores (i hope :D ).
- Also you can sort the rows by columns, by clicking on column headers
It may have bugs, if you find any feel free to comment it here.
Important: this program calls serz.exe to convert bin to xml and back, so you need to put a copy of serz.exe(it can be found in railworks directory) next to this program. Otherwise you can only open .xml files, but not .bin.
Another important thing: Always make sure that you've loaded the appropriate blueprint libraries in editor that you going to use for replace, or the replaced object won't appear, or won't work correctly.
For the application, you need a Java 7 runtime Download
And here is the application itself: Download rw replacer (if java is correctly installed, you can run replacer.jar like any other executable file. If you can't you can try to open a command line where the .jar is, and execute "java -jar replacer.jar" command.
Tips:
- Tracks.bin in Networks directory of a route contains everything that is connected to track infrastructure (signals, tracks, track rules, track rumble sound, overhead wire blueprint references) other bins in there are self explanatory
- Scenery directory have the scenery objects per tile
- in scenario directories, by modifying scenario.bin you can replace rolling stocks too with this application.
- write the replacing texts in the table carefully. Just a missed character, and railworks will fail to load that object.
- you can search in table by pressing ctrl-f
- if you experiencing freezes and after some time "Out of memory" (on console) error messages loading huge bin files like Northern Europe route's track.bin/ or a lots of bin files you need to set the memory that can be used by java higher(actually for northern europe 2000 mbytes are enough). This can be done by starting the program from command line (or make a batch file for it) with java -XmxNUMBER -jar replacer.jar NUMBER is the max size of memory that can be used by java. -Xmx3000m means 3000 megabytes (of course the limits of os, and java runtime are still in effect, so you can use settings over 2100 megabytes only if you have 64bit OS and you've installed 64bit java) Example batch for 3000 mbyte max memory usage (copy this next to replacer.jar, and run this bat file) or use the alternative exe launcher, see the link on the top.
You can freely distribute this program, so you're allowed to upload it on any free sites, but not on pay to download sites like uktrainsim. If you upload the program somewhere, please make a link to this article too, as source.