Setup
Everything flows a bit easier on this project if you set up your work environment first.
- Start by creating a folder somewhere on your computer (i.e. My Documents) that will contain your basic shape file for the asset.
- Within that folder, create a "textures" folder.
- In the Railworks\Source folder, create a provider folder (here it will be SMMDigital), a product folder (RailNetwork), and then two subfolders within - "Mileposts" and "TextureSets".
- Within the Mileposts folder, create a sub-folder called "textures".
- Within the TextureSet folder, create two sub-folders - "numbers" and "placeholders".
Making the Numbers
Now we will open our graphics program an make the numbers that will show up in the game. First, we need what are called "placeholder" numbers. This will be seen on the basic asset in the Editor, but will not show up in the game. They show the game where to put the finished numbers.
- Create a 64x64 texture in your editing program. Fill paint it a light gray color, then in white, put a "zero" in the middle of the texture. Around the border, put a pink border so that you can differentiate this tile from the others in your shape editor. Then, save this file as "primarynumber_0.BMP" file in the "textures" folder of your basic shape file.
- Create more 64x64 with the numbers 1, 2, 3, etc. for however many numbers you will be using on your mileposts. These don't need the pink border. Save them as "primarynumber(1,2,3,etc).BMP" files in the textures folder of your basic shape file.
- Create a 64x64 texture in your editing program and fill-paint it black (we are making black numbers).
- On the texture, use your image editing program to create an Alpha Channel (or mask) so that the entire image file is transparent.
- Choose a font style in your program, make it WHITE, and make a "0" in the middle of the 64x64 image file. The white font should cause the black background to be visible, while the rest of the image around the font will be invisible.
- Save this file as a 32-bit Targa (.tga) file, with the naming convention of "(youchoosethename)_0.tga" in the textures folder of your basic shape file.
- Repeat the last four steps for each number, 1-9, that you will be using. The naming should be "(youchoosethename)_(1,2,3,etc.).tga".
- After creating all of your texture files, you will need to convert them to .ACE format. If you do not have a plug-in in your imaging program, you can use a third party program such as Two-Ace to do this. Be sure that the Targa files are converted as 32-bit ACE files or the alpha transparency will not show up in the game.
Making the Placeholders
Assuming that you already have a Milepost shape file ready in your asset creation program, we now need to make the placeholders where the dynamic numbers will go. In this example, you will be shown a two-number milepost and where to put the placeholders.
- Create a single face for your asset and move it into the desired position for the first number on the milepost.
- Name this face "Face1", and the group that contains it "primarydigits_1".
- Paint this face with the texture "primarynumber_0" from the "textures" folder.
- Now, in the exact same place, create another face. Copy this face below as well to denote a second number.
- Join these faces as a single object. Name this two-faced, single object "Face2", and the group that contains it "primarydigits_2".
- Paint the lower face of this object with the "primarynumber_0" texture. Paint the upper face with the "primarynumber_1" texture.
- If you have three or more numbers on your milepost, keep repeating the above steps until you get them all in.
- The faces that are painted with the primary numbers should have their material properties set to "Transparency" in the TxAlpha material field. The .bmp placeholder files do not contain transparency, but they numbers that will replace them in the game do have transparency, so it will need to be specified here.
- Save and export your asset.