What path is it taking in order to get to "workfile.bin"? I may be able to create the file manually there
all the working out should happen inside c:\temp\ - so you need to run as admin or have overall admin control so you can directly address that folder. If you don't then it will beat its head against the permissions brick wall for every tile it tries to do.
I've been running as administrator every time (Seeing as that's what needed to happen for the other merge tool to work). And it makes no difference. Is there a folder within my temp folder that I need to create? Is there a Railworks temp folder that's normally created automatically but hasn't because my install is on an external drive? Is there a file that I might be missing? The silver lining is that it keeps coming up with the exact same error: It is missing "part of the path to c:\temp\workfile.bin". c:\temp is shortened so is there a folder missing in that description?
To be fair that was a bit of an overextension of questions. Given I’ve copied the dev’s temp folder into mine (which come to think of it only had files in), if there’s a file missing, it’d be in a folder that I don’t have. So I reckon Railworks might create a temp folder automatically which the program is trying to find but can’t because the install is on an external drive. I could, when I get home, check the external drive for a temp folder, though I doubt I’d be successful.
Because other than serz.exe and SerzMaster.exe I don’t have anything railworks related in the temp folder (at least I don’t think so)
I presume you mean the serz and serzmaster files. 12 May, but that’s when I copied them into the temp folder.
I'm a bit foxed on this. The c:\temp folder is the only extra folder involved.You need read/write/create rights across the whole TS folder structure of course - and wherever you are trying to create the new tiles.
I have attempted to make as many of the files not read only as I can, the box immediately gets a single horizontal line after attempting to get a single unchecked box, which doesn’t appear to be a huge issue. I did the same with the Temp folder. The route folders themselves are completely writable. Ran the program as administrator again. Exactly the same story. The program seems to be looking for a file I simply don’t have and when I try to create it manually it rejects it. The program is looking for a “workfile.bin” in the temp folder somewhere. I don’t know if this file is automatically created by the game or the program. What exactly is it trying to do with this file?
The workfile.bin is (repeatedly) created during the process - it is failing to write it each time it handles a tile. It sounds very much like a permissions error though I realise that you have tried to work round it. Are you still getting the original set of error msgs in debug? (Exception thrown: 'System.IO.DirectoryNotFoundException' in mscorlib.dll Exception thrown: 'System.IO.DirectoryNotFoundException' in Microsoft.VisualBasic.dll Exception thrown: 'System.IO.FileNotFoundException' in Microsoft.VisualBasic.dll) If so then the program isn't seeing the c:\temp folder and can't, therefore, create the working files within it. It might be a Win11 security feature about not accessing the root of c?
Ok that makes more sense. I’ve been bashing my head against a wall trying to work out where that file would be. I ran as administrator, even turned off settings that would ensure windows protection (real time protection was briefly disabled) then ran it and still exactly the same errors. Read it off of Visual Studio aswell. Exactly the same errors.
And no new files are being created in c:\temp ? Can you go to that folder in file mangler and try creating a new file?
I can write, create and even edit files in the temp folder so I have no idea why your program can't even when I run as administrator.
When you say "run as administrator" are you right clicking the .exe and choosing "Run as....." or are you logged on to the PC as Administrator?
My account is also an administrator. At least I’m pretty sure it is. When I go to profile, my profile is administrator so I assume that means I am
That's fine, was just making sure that the elevation of privileges routine had been run. Do you have UAC disabled, and what happens if you run it as a Standard User?
Right. I’m a little embarrassed. There’s no need to panic anymore as I just found the solution and it is so stupid that I cannot believe I didn’t think of it before/ it took me over a week to work it out. For future reference, if you try to run the program and you are met with: “error in TileCopy Could not find a part of the path “c:\temp\workfile.bin” or something like that, the program is QUITE LITERALLY LOOKING FOR THE TEMP FOLDER IMMEDIATELY IN THE C DRIVE. This message was not shortened even though most people’s temp folders are in the same spot. It was looking for the directory: C:\Temp NOT C:\Users\<name>\AppData\Local\Temp I copy pasted my Temp folder to OS C:\ and it worked on the first try. I think it was done like this because the directory to the original temp folder changes with user as different names are used. So to get around this, it simply looks for the temp folder in a place anyone could have it: OS C:\ I do really want to thank you all for taking the time out of your days to help me with this issue. It really meant a lot.
Sorry...I've tried to be polite and all that, but.... can you explain why you took the instructions to look in C:\temp to mean look in C:\Users\<account name>\AppData\Local\Temp? The correct path was posted many times, you were even instructed to try creating a file in that folder with Windows File Explorer
Because I don’t know anything about code nor terminology and assumed it meant C:\Users\<name>\AppData\Local\Temp given that was already a temp folder technically within the c drive and so I assumed that was the directory. I was too scared to ask what exactly a “root” folder was because I would probably look stupid. Not to mention I was probably so focused on that workfile file that I didn’t pay full attention to the entire answers given. I understand (at least now) that assuming with code is pretty much a cardinal sin. And I also understand because of my blindness and incompetence (I was told 5 times about this), I’ve wasted all of your time. With regards to that, I can only say I’m very sorry.
Don't worry about it. You stuck at the problem and have learned an important lesson in the best way possible - through pain. I was a professional IT wonk for over thirty years and I've lost count of the number of times that an assumption cost me (and the project) time and money. As you say - with coding it pays to be VERY literal-minded ;-)
This has been a handy tool I've been using it to copy track and it has worked well till now, I copied 6 tiles today and then another 6 worked came back later on and now I'm getting an error after I click run, the first command box pops up then this error appears the only thing I did in between was check the tool worked in TSC I made no edits. I've change nothing routes are fine in TSC, attributes are clear, permissions ok, TSC file structure ok, tried different routes including a 2x2 tile to a blank target, configured ini file to use different disk\folder, delete C:\temp and re-extract........ nothing has worked. Moved project to a different pc trying the above and still get this error. It seems the tool can't find the target route\folder. Would like to get it working again saved me hours with not having to use the easements tool. Any ideas? Thanks
Not seen that one before - looks like a filename issue on the surface but may be a corruption somewhere. I'd suggest that you delete the RWKlon folder and reinstall though I'm not convinced. If you haven't already done so then try re-doing the tiles you did successfully before (on a clean version).
Thanks for your reply yea I tried starting anew cloning the routes again blank routes different pc even a fresh win 10 vm, no matter what I tried it just kept throwing me that error. I came back to it later this morn to try and do some more troubleshooting tried track copy with 4x4 tiles about ten miles west and it worked! Went back to original tile that threw the error and it worked but TSC crashed Track.bin was corrupted. After much trial and error there is 1 track tile the program doesn't like, I manually laid the track all is good. I did notice the tool partially worked track copying 2x2 it moved 1 tile and the adjacent tile in the first input box then it threw the error I think it was having trouble resolving the path to the target directory. The tool has worked fine since saved me many hours thanks a lot for making the tool available! Cheers Higgsy
Greetings, i'm Luigi from Milan, Italy, i apologize in advance for my English First of all, thanks Neil for developing and sharing the tool! I'm creating with my team the route Ivrea-Chivasso-Novara, and i wanted to include the stretch from Chivasso to Turin from the route "SFM Torino". I've downloaded the tool (selected "run as administrator") and the TEMP folder you shared a couple post above (installed in c and made a merging try (well, several tries) selecting the 4 tiles where the Turin Porta Nuova station is located, inserted coordinates and offsets, with the parameter shown below. "Initialize" phase, as well as "run" did not prompt any error and every time the tool reached the "complete" message. However, RWInfo doesn't show any track in the target area, and upon entering the game, everything but the tracks is there. It seems to me that the merging has indeed been successful, but only regarding the flags selected in the UI (terrain, scenery, mixmap, loft and road) Can you please help me understanding what i'm doing wrong? It's like being a few feet away from the holy Grail of Railworks Thanks for your answers! Skapheus
You need to run the tool with 'track copy' as the selected option after running the merge. Good luck.
Hello, what do i need to insert in Src (x.y) top-left to bot-right and gOffset - x, gOffset - y please help me! thanks!
It is explained in the manual (so RTFM). But the principle is simple (I hope): you define a rectangle of tiles to act as the source (these are the parts of the route that you want to copy or clone) you define the offset (in whole number of tiles) in each direction (up/down, left/right) to tell it where to put them in the target route. NB - there isn't much error trapping and one potential pitfall is that your 'starting tile (top left of your defined rectangle) is an empty tile. So go to that tile in your source route and stick a big, grey, ugly chimney in it. This gives the routine something to deal with and should make it happy. When it's worked (fingers crossed) you can delete the ugly chimney ;-)
I'm glad this thread is going strong! Thanks for keeping it alive and the support to merge routes is really helpful
Hello guys. I came across this thread some time ago when searching for a way to merge routes and so i download the tool presented in the first page. I must say it was a bit difficult at first but i managed to merge two routes together with a diference of less than 500 hundred meters. But one thing that i didn't realize then was that the textures weren't correct so i dicided to use the mixmap conversion feature, that with no avail. I followed the guide but every thing i did the textures never came back like the original source. So i leave my setup here for the mixmap conversion to see if somebody can help me. Thanks to the creator of the tool and every one else that can help me. Routes Mixmap guide: https://docs.google.com/spreadsheets/d/1XEyypzeg6RHaO5NTVSvoEDBOmyKojPepkzFtGUTo64A/edit?usp=sharing Ini configuration: Thank you.
Berto. First thing - read the manual section on mixmapping. Second - if you have unique textures in your source route (ie textures that don't exist in the target route) then you need to copy the definitions from the source terrain bin to the target terrain bin - making a note of the new ordinal position in that file. THEN you can add those items to the conversion table so that the old ordinal number is replaced by the new ordinal number in the target route and the textures appear correctly. An example. Your source route has a texture called dingus-grass in the source route's terrain file - in ordinal position 13. This isn't present in your target terrain file so you copy the definition from the source file and add it to the end of the target terrain file - making sure to note it's new and different ordinal number (57). Then on the mixmap conversion table you go to position 13 and put '57' in. This should convert all source mixmap tiles looking for texture defined in position 13 to use the terrain defined at position 57 (in the target terrain file).
I feel daft for asking but is there a secret tool to "mass change mixmaps from one route to another" (i've got one merged route that's stuck on workshop thanks to that, and didn't want to repaint everything on one route ) (Mixmaps = Terrain Textures for those that don't know ) (I had one from Matt P but that sadly doesn't work anymore - and he's (Rightfully) always busy - although equally the only time i used it was for South London & Thameslink - because of Bedford's route being different, and then that route was used to start the Chatham Route )
Thanks for the reply. Yes, i read the guide countless times, english isn't my native language, maybe i'm misunderstanding something. Yes all the numbers after the 34 that you can see in the image and sheet that i provided are textures added to the end of the target terrain bin file, i double and triple checked the numbers and they're correct. The one texture that allways come correct in game is the base one "green grass". I even follow your big chimeny example and painted all the textures in the first tile of the source route because it only has the base texture "green grass". Thanks. And thank you for giving us this tool. If nothing works i'm gonna repaint the source route after the merge. Days of work, let's see.
Hi Danny - you could use the merge tool (going from the old route to a new copy of the same route with zero offsets but the mixmap changes done. I haven't tried it so a zero offset may blow it up but could be worth a go.
So - I've looked at the code (haven't looked for a few years) - and apart from not understanding what I did and why in several places I have two questions: Do you have your ini file at this exact address: c:\rw-klon.ini ? if it is anywhere else then the routine will not see it. Note this is the ROOT of the c-drive - so you need to have admin permissions on your machine AND you need to run RWKlon with admin permissions Is your new mixmap (in the ini) setup to mirror the target route mapping and then has the conversionsin sequence at the end? Your bonus questions is:does youir ini file have gaps between numbers in this entry - it shouldn't as shown in this example: Mixmap-table="0109481527263049133050510203521705535455565758596061626364656667686970717273747576770678117931348081823637388384858635" The subroutine looks at each mixmap entry on each tile and changes the code to whatever is in the ini file at the relevant offset. So using my example line above - if the mixmap value is 09 on the tile then it changes it to 13 as that is the number in the ini file at ordinal position 9 in the terrain.bin file. Remember that there will be a lot of texture overlap but the texture definitions (say gravel grass) aren't in the same ordinal position in the source and target terrain files.
Thank you - I didn't realise your tool also did that (well and there is the fun of making a list of numbers and matching the terrain textures - fun with headaches there ! )
Hello. Thank's for the reply. Yes everything is fine with pathing and administrator rights. Thank you, that's it the table is wrong. Tottaly misunderstanding the manual. Thank you so much.
It worked! The revised table worked. I've tried everything, commas, points, slashes, dashes, spaces but never thought to smash the numbers against each other. Well i think the code is more logical than my tired brain! Again, thank you so much.
I need to ask, so basically the above is done by positions so for numbers (I think i understand it, but it's more for my "sanity" and to confirm ), although if i remember correctly the mixmaps were in "hex" code format but i'm guessing it's just normal numbering for that? So for these 3 - (the first part of the above big number ) 010948 it's basically change 01 to 01 02 to 09 03 to 48
Hi all, i might be going slightly crazy trying to get this software to work but nothing is getting copied to my target route? My temp file seems to be setup correctly (double checked the with the one on this page) and all files can be written and railworks in usual place etc but nothing copies accross. The software throws up no errors or anything so im not really sure where to start looking Cheers