Trainz/Basic Reskinning for beginners
Trainz has three basic parts to a model or asset. The first is the mesh or shape, the second is the texture file (.bmp or .tga), and the third part comprises text documents, such as config.txt and scripts. You can modify the texture file fairly easily to change the appearance of the asset, a process known as re-skinning. Re-skinning is a fairly easy way to get started in asset creation for your layout. Be aware you need to respect copyright laws and you need the mesh creator's permission before distributing the new asset (i.e., uploading to the DLS). Also, understand that different types of texture files have slight differences; some file types have more options than others. Some assets have a greater impact on Trainz performance than others. Since we can select which asset to reskin, as a beginner select assets with a single .bmp or .tga texture file.
|
|||
|
Glossary |
HKeys-CM |
HKeys-DVR |
HKeys-SUR |
HKeys-WIN |
Mouse use |
Notations |
This tutorial will take you through the steps to do a simple reskin. The tutorial uses TS2009's CM2 (TB v2.9 i.e pre-SP4 when CM2 became CM-3.3) because from that version of Trainz, a lot more error checking was incorporated on data associations and typing than previous versions and this will help you to avoid Faulty Content errors by the time you finish. In general, don't choose an asset that has any warning's at any trainz-build level (TB), and if you plan on someday uploading a creation, be aware the Life Cycle Policy Trainz Life Cycle Policy an intake DLS asset vetting have a floor TB that gradually increases. Unscripted Asset's fully warning free in TRS2006-SP1 or one of the TC's should show warning and error free in TS2009 excepting the warning will become an error if there is no Thumbnail in a thumbnails container. Most rolling stock, even scripted will transfer. Splines assets will need converted to kind Track with an appropriate category-class tag defined to set the processing and the ends discarded above TB v2.9 more complicated assets involving scripting
First Clone the asset
editUnless you totally want to discard an asset, the best way to copy all the asset varies slightly by version's before and after TRS2006. In Pre-TRS2006 you have direct access to the versions directory tree, and can easily locate and copy the folder to a "workbench" folder. In the TRS's and newer TS's, CMP can either open the asset for edit, or be used to clone the asset (automatically assigning a new kuid) directly. If you like to group your asset kuids by class of asset, and have organized and set aside blocks of kuid ranges for various Kinds of asset, you're better off opening the asset and manually copying it. If you are just adventuring into content creation, you need to decide whether to organize or not by blocks of ranges of kuids, and establish the spreadsheet or at least a text file tracking system very soon. Tip: It is particularly important to have a Kuid tracking system if you are running more than one Trainz install on the same computer. Writing over a cherished asset because the kuid was also allocated elsewhere is not a pretty event one wants to experience! The re-skinning process is similar in previous versions of Trainz, so if you have TRS2004, TRS2006 or TC3 you will be able to follow this tutorial.
- To clone an asset in '06 or TC3 use CMP in a similar manner to the TS2009 description, and either clone the asset from CMP or Open for Edit in Explorer.
- in TRS2004 access the asset folder (Auran/TRS2004/World/Dispatcher/downloads/asset kuid) and copy the folder.
- Open the copied folder, open the config.txt file and change the assets kuid number to one with your own ID prefix. Be sure not to duplicate an existing kuid number of yours. Open the config. file and change as appropriate the description, author, licence, e-mail address and web address. Be careful not to change any other data. Save and close the config.txt. file. Now edit the asset folder's kuid number to the one you used in the config. txt. file.
Be advised this new Trainz Wikibooks topic page is rough and incomplete. It was last edited on 9 January 2024, and is still under heavy construction. This Page UNDERCONSTRUCTION: Content here is likely to be changed significantly in a short amount of time. All Trainzer's and Wikibookians with knowledge in this subject are welcome to help out. You can remove this tag and replace it with {{Trainz-stub}} or with section stub templates ({{Trainz-sect-stub}}) on unfinished sections when the 'page' has become more mature. |
In TRS12 you need only select the asset by right-clicking on it in Content Manager. Select 'edit' from the drop down menu, then 'Edit in Content Creator Plus'. This brings up an editable form that will save a new config.txt file for you. You may alter the fields in the form as appropriate. Note that some fields are determined by changes you make in the editable fields, making it easy to complete this step without mistakes (errors and warnings appear in the bottom panel).
Most content creators avoid 'Edit in Content Creator Plus' and use 'Edit in explorer' as this gives you more control.
At this stage you may want to download the excellent free photo editing software GIMP if you don't already have it. http://www.gimp.org/. However, many other paint programs (such as Photoshop) will work equally well.
We'll start with a simple sign that uses a .bmp texture file: kuid:86627:1182
and step one is to clone the asset in Content Manager. Note this sign is Trainz version 1.5; it doesn't require any features of the later versions. Right click the asset and click on clone. (For TRS 2004 see above, second paragraph; in Trainz12 an error that the asset uses an obsolete trainz-build number (numbers below 2.7 are not supported. However, TRS12 will correct this limitation when you commit your new asset). TS12 will give you a warning about obsolete build number but this can be ignored.
Having cloned the asset we now need to edit it. Go to the Open for Edit tab, right click. (TRS 2004 users, open cloned folder). In Trainz12, right click on the new asset (note a new kuid has been assigned with your ID prefix). Then click on 'Edit' and 'Edit in Content Creator Plus' 'Edit in explorer'.
This opens up a Windows folder containing the asset. We now want to edit the .bmp file using GIMP
Note the two panels one for the image and one containing the tools.
Just below the image is the scale, for ease of use raise this to 400% and increase the window size of the panel. Use the eye dropper tool to pick up the background colour then the paint brush to remove the existing lettering.
GIMP is particularly strong in adding lettering. Note the background / foreground colour squares click on the curved arrow to reverse these to get white lettering. Click on the lettering tool, the letter "A" and select a font, "Gill Sans MT Bold" is fairly useful. It is possible to add fonts to GIMP. You can adjust the font size directly.
Left click with the mouse at the top left hand corner then enter the desired text. It is possible to change the font size before clicking on close.
To position the text type "M" then click on "Move the active layer"
Save the file.
Go to edit the config.txt file.
If you started with a .tga file then the saving process is slightly different. First note the file size of the .tga file. Then when you save ensure that RLE compression is unchecked.
Compare the file sizes. If your edited file is smaller then double check you have RLE compression off. If your edited file is roughly 33% larger than the original verify you do not have an alpha channel, delete any alpha masks from the copy by clicking Layer, Mask, and Delete Layer Mask, then save again.
Now edit the config.txt
file in a basic text editor such as Notepad. (See introductory paragraph on cloning in TRS2004 for details on editing the config.txt
file)
Do not use word etc. in case it adds invisible characters which will confuse Trainz.
Click to select in CM2 and commit (Ctrl+M) (TRS 2004 users simply make sure that the config.txt
file is saved, close the asset folder and back out of the Trainz folder.)
Bring up in Surveyor.