Recommended Mod Tools

Stop by here for help with RRT3 Editor problems and tips.
User avatar
WPandP
Engineer
Posts: 762
Joined: Tue Sep 11, 2007 5:16 pm
Location: Cincinnati, Ohio
Contact:

Recommended Mod Tools Unread post

It seems to be a common question, as to which tools to use in order to create engine, building, and other mods. I'd like to get this thread going, to collect recommendations for the best tools to use, to accomplish all of the hex-editing, PK4 packing, skinning, and other tasks needed. I'll go ahead and list the tools I'm using briefly, but it might be good to post as further replies a more in-depth examination of how to use each particular tool, such as a post all about hex-editing. If anybody else has pointers on how to create successful mods, please add them here!

Here's the tools I use:

Watto Studios Game Extractor = PK4 file extractor (cannot create useable PK4)
Hexplorer = Hex Editor, for all files other than DDS/TGA and PK4
DDSview = DDS file viewer, to convert to TGA or PSD, can save as DDS but only non-masked graphics like BeautyShots (color palette gets screwed up for 32 bpp + alpha originals)
GIMP 2.4 = Image Editor, can use Photoshop or any other capable of saving to TGA
Pack4.exe = PK4 creation utility, included in User Skinning Tools, command-line operation
TrainSkin.exe = User Skinning Tool, here used to convert 32 bpp + alpha TGA to DDS (creates a PK4 file, from which the converted DDS can be extracted via Game Extractor)
Google = Search tool to go find car-side images to paste into my mod skins; many of them are actually photos of models from model train manufacturers, such as Atlas (http://www.atlasrr.com)

In addition, I found and bookmarked a website that I use as a calculator, to convert numbers into hexadecimal notation. I don't recall the URL of that site right now, I'll add that later. But one thing that should be noted is that, for some reason, the byte order is inverted in the RRT3 files, for floating-point numbers. Instead of being written Aa Bb Cc Dd in the hex code, it is actually Dd Cc Bb Aa! Took me a while to figure that out.

EDIT: The URL for the Hexadecimal converter is
http://babbage.cs.qc.edu/IEEE-754/
=Winchester, Paston & Portsmouth=
====== We Provide Pride! ======
steelm
Hobo
Posts: 13
Joined: Mon Jan 21, 2008 11:28 am

Re: Recommended Mod Tools Unread post

I am using DDS Converter 2 to convert the image files (jpg, tga, dds and back).

For example, having some problems with your 'Cereal Company', I converted all tga's and the 2D...jpg into dds,
using binlist2.exe and pack4.exe to create a PK4-File. Voila, works fine.

/cu steelm
larrysw
Hobo
Posts: 18
Joined: Fri May 02, 2008 9:29 am
Location: Chapel Hill, NC

Re: Recommended Mod Tools Unread post

I would like to change the default name that comes up each time I start my company. (You can change the player, but the company always comes up the same.) Any "simple" solution to this question?
User avatar
wsherrick
Engineer
Posts: 584
Joined: Sun Nov 12, 2006 12:38 am
Location: New Hope, Pennsylvania

Re: Recommended Mod Tools Unread post

larrysw wrote:I would like to change the default name that comes up each time I start my company. (You can change the player, but the company always comes up the same.) Any "simple" solution to this question?
It's easy to change the default name of your company. Just click on the company name and delete the letters and type in the name you want.
larrysw
Hobo
Posts: 18
Joined: Fri May 02, 2008 9:29 am
Location: Chapel Hill, NC

Re: Recommended Mod Tools Unread post

Sorry, didn't word my question clearly. I know it is easy to change the name just by typing in a new one. What I want is that the default name that comes up in the first place is different. (Right now it always comes up "Carolina Southern". I would like it to come up "Worldwide Export.")

I was looking for a hex editor or something that would allow me to change that default name that comes up in the first place.
coruscate
Dispatcher
Posts: 398
Joined: Wed Sep 24, 2008 1:10 pm

Re: Recommended Mod Tools Unread post

I think this deserves a sticky, it's got my interest but I want to get the event editor / game level economies down first.

Well that and playing with WP&P's new stuff.
coruscate
Dispatcher
Posts: 398
Joined: Wed Sep 24, 2008 1:10 pm

Re: Recommended Mod Tools Unread post

steelm wrote:I am using DDS Converter 2 to convert the image files (jpg, tga, dds and back).

For example, having some problems with your 'Cereal Company', I converted all tga's and the 2D...jpg into dds,
using binlist2.exe and pack4.exe to create a PK4-File. Voila, works fine.

/cu steelm
Does anyone have luck getting the "beauty shot" to load outside of having the PK4? I can get the cereal company graphic in game, but the beauty shot looked like bad TV reception. I used DDS view to make a DDS just to see if it did anything and... well... it "cleared up the reception" like you would see on an old TV. But it was still half off the channel LOL

And right now I can't get my beauty shots to load as TGAs. I use paint shop pro and I have the targa's set right so it shouldn't be a matter of my image format, or size, I've produced a-d like I should have.
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: Recommended Mod Tools Unread post

I've not so far been able to do it, and I get the same "bad reception" problems with converting from tga to dds.


Pure Al seems to have conquered this problem, but he seems to be away these days.
User avatar
WPandP
Engineer
Posts: 762
Joined: Tue Sep 11, 2007 5:16 pm
Location: Cincinnati, Ohio
Contact:

Re: Recommended Mod Tools Unread post

My greatest suspicion about DDS conversion is that the actual color palette is limited, and it is a specific subset of 256 colors, similar to how a GIF file can have a customized color palette. I have not tried it yet, but if there is some way that you can open up one of the original game's DDS files (perhaps the CargoModels skin is a good candidate, since it has so many colors in it) and convert it to an optimized palette file format, then just take and paste in the image that you want (say, your 2D_profile or _BeautyShot screen captures) into that limited-colors file, it will force the image editor to adapt it to use that palette (whether by dithering or just using the nearest-equivalent color). Then save that image, and try converting back to DDS.

Like I said, I haven't tried this - I just use the TrainSkin utility and unpack the results, as cumbersome as that is.
=Winchester, Paston & Portsmouth=
====== We Provide Pride! ======
coruscate
Dispatcher
Posts: 398
Joined: Wed Sep 24, 2008 1:10 pm

Re: Recommended Mod Tools Unread post

The DDSview someone pointed out works great, it's a home made software by some dude out in Germany but it can read and make DDS, and it's a small download.
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: Recommended Mod Tools Unread post

WPandP wrote:My greatest suspicion about DDS conversion is that the actual color palette is limited, and it is a specific subset of 256 colors, similar to how a GIF file can have a customized color palette. I have not tried it yet, but if there is some way that you can open up one of the original game's DDS files (perhaps the CargoModels skin is a good candidate, since it has so many colors in it) and convert it to an optimized palette file format, then just take and paste in the image that you want (say, your 2D_profile or _BeautyShot screen captures) into that limited-colors file, it will force the image editor to adapt it to use that palette (whether by dithering or just using the nearest-equivalent color). Then save that image, and try converting back to DDS.

Like I said, I haven't tried this - I just use the TrainSkin utility and unpack the results, as cumbersome as that is.
I tried saving in every paletted for 256 colours and not worked. I seem to be getting hit and miss with somethings working out, others not. For industry beauty shots, I am considering not using a screen shot and instead having a text widow with information relative to the industry, i.e price for upgrade, input/outputs, etc.
User avatar
Gumboots
CEO
Posts: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Recommended Mod Tools Unread post

Can someone please explain how to get the command line PK4 unpacker to work. I mean really explain it, not just throw a few words around.

In other words, assume the person you are talking to knows absolutely nothing about using command line, and by the time they have read your expalantion they will be able to use the PK4 tool.

Would be much appreciated.
User avatar
Gumboots
CEO
Posts: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Getting the #^$% thing to work (for mugs that know nothing) Unread post

Ok, after hunting around the web and doing more swearing, I'll now present an explanation, for Windows, that anyone should be able to follow.

If anybody cannot follow it, please say so and I'll fix it. !*th_up*!

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

The basics. Do this stuff first.

1/ Click 'Start'.

2/ Type cmd in the search window.

3/ Click the icon/link for the cmd thingy.

4/ Congratulations. You now have a tiny little ugly black window, with text that is a total PITA to read! You're gonna love this. (0!!0)

5/ You want to make it bigger and less ugly and easier to read? Don't blame ya. Right click its top bar.

6/ Click Properties.

7/ Click font.

8/ On Windows 7 or Vista you will have the option to use the Consolas font. Click that. If you're still on XP, use Lucida Console. Also, set the font size to 18.

9/ Go to the Colors tab. Click Screen Text.

10/ Turn down the Selected Colour Values to 30 for red, green and blue. This will make the text dark grey (easier on the eyes than pure black).

11/ Click Screen Background.

12/ Turn up the Selected Colour Values to 255 for red, green and blue. This will make the background white (trust me on this).

13/ Go to the Layout tab.

14/ Set Window Size to 90 Width and 24 Height.

15/ Congratulations! You now have a command line window which is not designed by sadists who want to torture your eyes! Now you can actually think about using the thing without excessive amounts of pain! !!party*!

16/ Close the infernal thing, before it bites you. :mrgreen:

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

The Good Stuff. Impress your friends.

1/ Move the PK4 you want to unpack to the same folder that the unpacking gizmo is in.

2/ Right click the file that is called PKUnpack.

3/ Cick Edit.

4/ Change the java PK4unpack filename.PK4 text so it has the real file name of the PK4 you wish to unpack. I was unpacking a file for a P-2 loco, so used java PK4unpack P-2.PK4.

5/ Save the file.

6/ Open the command line window again.

7/ You need to change the directory (fancy name for a folder) to the one you'll be working in.

8/ I'm not going to tell you how to do this yet. That would be too easy. First, you have to pull out at least 10.4279% of your hair, and headbutt the keyboard a minumum of three times. Once you have done this, you can proceed.

9/ Ok, all done? Cool. Now I'll tell ya.

10/ First, you need to copy the path of the directory you want. Easiest way to do this is to open it on desktop, then right click on its name in the address bar, then click Copy Address.

11/ Go back to the evil command line filthy little window, and type cd followed by a space.

12/ Now you have to paste your directory address. Do NOT try to do this like a normal copy/paste. It wont work. That would be too easy.

13/ Right click the top bar of the filthy little thing, then click Edit, THEN click Paste. That will work. !*th_up*!

14/ There should now be a line of gobbledegook that looks like this (exact folder names will be different on your pooter).

Code: Select all

C:\Users\Peter>cd C:\Users\Peter\Desktop\RRT 3\Extras\Modding apps\Trainmaster_RS_DeveloperKit\PK4\Unpack
15/ If it looks like that, hit Enter. You should now see a new line that looks like this, with a flashing cursor after it.

Code: Select all

C:\Users\Peter\Desktop\RRT 3\Extras\Modding apps\Trainmaster_RS_DeveloperKit\PK4\Unpack>
16/ If you have this result, you're now in the right folder. Beats me why they had to make it this complicated, but they did it anyway. You get that.

17/ Ok, so you have the right folder, and you already moved the file you want to unpack to this folder. Now comes the good bit.

18/ Type in the name of the unpacking gizmo.

Code: Select all

PK4Unpack
19/ Hit Enter. At this point one of two things is likely to happen. If you're lucky (fat chance of that) you will be able to look in your folder in the nice big desktop window and see a new folder, that has the name of your train and some stuff after it, like this.

Code: Select all

P-2.PK4_unpack
20/ If you have this nice new folder, look inside it and you'll see all the extracted files. Success!

21/ You probably aren't this lucky. What will probably happen is that the filthy little command line thingy will spit out an error message that says this.

Code: Select all

'java' is not recognized as an internal or external command operable program or batch file
22/ Aren't computers wonderful? At this point you will be required to tear out at least another 5.837% of your hair, and headbutt the keyboard two more times. Once you have done this, you can proceed to the next step.

23/ Close the filthy little thing again. It hates you. Look at this page: How do you stop the error 'java' is not recognized as an internal or external command operable program or batch file? You'll like this page. It actually uses English! Follow the instructions there. !*th_up*!

24/ Open the command line evilness again, and swear an oath that you will not be defeated, then poke your tongue out at it. I find this works wonders. Seems to make it feel intimidated and compliant, which is what you want.

25/ Do the stuff you did before in Steps 10 to 19. Get to the right folder, then type in the unpacking thingy's name and hit Enter.

26/ This time it should work. No, really. I mean it. :mrgreen:
User avatar
Hawk
The Big Dawg
Posts: 6503
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: Getting the #^$% thing to work (for mugs that know nothing) Unread post

Gumboots wrote: 4/ Change the java PK4unpack filename.PK4 text so it has the real file name of the PK4 you wish to unpack. I was unpacking a file for a P-2 loco, so used java PK4unpack P-2.PK4.
Does this mean Java is required to be installed for this to work?

Thanks for the tips on making that little black box bigger and easier to read. !*th_up*!
Hawk
User avatar
Gumboots
CEO
Posts: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Recommended Mod Tools Unread post

Yes, you need Java, but just about every box in existence has Java these days anyway. It's used for so many things that it'd be rare to find a desktop without it.

And I just found the tips today, when I was hunting around trying to get this sucker working. Much better than a tiny window with a white pixel font on a black background.
User avatar
Hawk
The Big Dawg
Posts: 6503
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: Recommended Mod Tools Unread post

Well, you just found a rig that does not have Java installed. ^**lylgh

I have no need for it so I didn't see any reason to install it.

I assume you've heard about the security risk of allowing your browser to enable Java, haven't you?
You can still have Java installed on your computer, but just disable it in your browser as there are few websites that actually require it.

http://krebsonsecurity.com/2013/01/what ... a-exploit/

How to turn off Java in your Browser
Hawk
User avatar
Gumboots
CEO
Posts: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Recommended Mod Tools Unread post

Well if you want to use these modding tools, you'd better install Java. :mrgreen:

Incidentally, I did try using the Watto Game Extractor, but it didn't seem to run well on my box. The site for it does warn that it may not work for everyone. Using the command line scripts makes more sense for me. Far less aggrevation.
User avatar
Hawk
The Big Dawg
Posts: 6503
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: Recommended Mod Tools Unread post

I'll leave the modding to others more qualified and knowledgeable on the matter. :mrgreen:
I'm just a lowly map creator, and not very good at that. ^**lylgh

I was just letting you know about the Java security issue. ;-)

I did edit my command prompt window though. Thanks for that. :salute:
Hawk
User avatar
Gumboots
CEO
Posts: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Recommended Mod Tools Unread post

Might as well provide n00b-proof instructions for re-packing too. I needed to figure them out, so they may be handy for someone else. :mrgreen:

1/ First thing you need is a text file listing all the files you want to pack. This will probably be a long list, and typing it manually will be nasty and prone to error. You want a quick and easy way of doing it. It exists.

2/ Open the folder that contains the files you want to pack.

3/ Highlight every file you want to pack.

4/ Hold down the Shift key.

5/ Right click any highlighted file.

6/ Click Copy as path.

7/ Open your editor. This can be the basic Notepad, or whatever you normally prefer (I use Notepad++).

8/ Paste into a new file. This will give you a list of every file, but with the downside that it will include the folder path and quotation marks. You need to remove those, so only the file names are left.

Code: Select all

"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_Truck1Couplingbar2.3dp"
"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_Truck1Couplingbar1.3dp"
"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_Truck1Connectingrod2.3dp"
"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_Truck1Connectingrod1.3dp"
"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_Truck1Bogie4.3dp"
"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_Truck1Bogie3.3dp"
"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_Truck1Bogie2.3dp"
"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_Truck1Bogie1.3dp"
"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_Truck1.3dp"
"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_TrackPoint.3dp"
"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_Piston2.3dp"
"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_Piston1.3dp"
"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_LengthPoint.3dp"
"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_Drivewheel2.3dp"
"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_Drivewheel1.3dp"
"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_Couplingbar2.3dp"
"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_Couplingbar1.3dp"
"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_Connectingrod2.3dp"
"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\NWA2664L_Connectingrod1.3dp"
9/ Using the above as an example, highlight and copy the folder path, and the quotation mark, at the beginning of the lines.

Code: Select all

"C:\Users\Peter\Desktop\RRT 3\Train_skinning\A_class\
10/ Click Edit, then Replace.

11/ Paste into the Find what window. Leave the Replace with window blank.

12/ Click Replace All.

13/ Repeat this procedure, but with a basic double quote ( " ) in the Find what window.

14/ The result should be a list of file names, without any other crud attached. !**yaaa

Code: Select all

NWA2664L_Truck1Couplingbar2.3dp
NWA2664L_Truck1Couplingbar1.3dp
NWA2664L_Truck1Connectingrod2.3dp
NWA2664L_Truck1Connectingrod1.3dp
NWA2664L_Truck1Bogie4.3dp
NWA2664L_Truck1Bogie3.3dp
NWA2664L_Truck1Bogie2.3dp
NWA2664L_Truck1Bogie1.3dp
NWA2664L_Truck1.3dp
NWA2664L_TrackPoint.3dp
NWA2664L_Piston2.3dp
NWA2664L_Piston1.3dp
NWA2664L_LengthPoint.3dp
NWA2664L_Drivewheel2.3dp
NWA2664L_Drivewheel1.3dp
NWA2664L_Couplingbar2.3dp
NWA2664L_Couplingbar1.3dp
NWA2664L_Connectingrod2.3dp
NWA2664L_Connectingrod1.3dp
15/ Save this as a text file with the .lst suffix. Using .lst as a suffix isn't strictly necessary, but the packing gizmo is already set up for that suffix, so you might as well use it.

16/ Make sure to save this text file to the same folder that holds the files you want to pack.

17/ Copy the packing gizmo files to the same folder. There are four of them.

Code: Select all

PK4Pack.bat
UnitC.exe
binlist2.exe
pack4.exe
18/ Open PK4Pack.bat in your editor, and change the pack4 <filename>.lst text to include the actual name of your.lst file.

Code: Select all

pack4 NWclassA.lst
19/ Save the PK4Pack.bat file.

20/ Open the command line thingy (earlier n00b-proof instructions) and get yourself to the right folder.

21/ Type in the name of the packing gizmo, and hit Enter.

Code: Select all

PK4Pack
22/ You should now have yourself a nice new packed PK4. (0!!0)
User avatar
Stoker
Engineer
Posts: 569
Joined: Mon Dec 08, 2008 12:18 pm
Location: Amongst the Sagauros

Re: Recommended Mod Tools Unread post

Great instructions for operating the command line .PK4 tools,Gumboots. Thank you for sacrificing your own hair and sanity to figure this out and share this with us all. I have successfully ran the Unpack, but have yet to attempt the Pack function. Reading through your instructions I did however notice something that can simplify the Pack sequence quite a bit. I have been using Free Commander for some years now in lieu of the WinFileExplorer and I can't imagine ever going back. You have a dual window with all kinds of nifty search functions including "find duplicates" and such that makes file sorting a breeze compared to the Faildows file explorer. Another function of FC that I was aware of and thought of immediately when reading your Pack instructions was the ability to copy file names en masse without having the entire folder tree associated with them. What you do is navigate to the folder containing the files you intend to Pack and select them. Then go to the Edit tab and select "Copy name as text" (not "copy full name as text", which will include the folders) and then go to your notepad and paste . Viola! All of the file names are pasted in one operation with no fuss.

Even if you never intend to use the .PK4 tools I highly recommend getting Free Commander, it makes dealing with all of your files a snap- including doing things like being able to see "hidden" files and such that you can not do with the Faildows Explorer.

Here is a link to Major Geeks to download Free Commander. Major Geeks is a great source for free software, and all downloads are tested and guaranteed safe. !*th_up*!

Edit to add: I went to the Free Commander site and discovered that there is a newer version than the one posted at MajorGeeks. Seems to have a few more features and a new look.

Click here to go to the Free Commander site downloads page.

All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
Post Reply