• Play your daily rated matches of Black Forest on Community Patch 1.6 RC and win a Voobly premium membership.     [ More Information ]

Adding a new graphic




Let’s look first at a situation where we want to add a new graphic to the game but not a unit or a building that would require dealing with the data graphics. I’m going to follow the process I had to do to add the button in the mill that changes the behaviour of fishermen between using the dock or the town center and mill.

1. Obtaining the graphics as bmp files.​

First we need to create the graphics to add. In this case, we want a button that is either the dock icon or the icon with a cross in front. To obtain the dock icon, we have to go to file 50706.slp, that stores the building icons, we scroll down until finding the dock icon and extract it.

When you extract a file, Turtle Pack will ask you to choose a background color. The best practice should be to choose pink, number 252, although in this particular case there is no background to show.

graphic1-800x530.png


Now that we have the dock icon as a bmp file, we will use the icon as it is as one of the buttons. For the other we just edit the icon on Paint and draw a cross over it. Save it with a different name and use the format 256 colors bitmap. Otherwise Turtle Pack won’t accept it.

For the purpose of this example, save the image as a 256 color bitmap. When actually doing this process, save the image as a 24 bit bitmap so that the colors don’t change. When you use SLX Studio to apply the palette, the colors will look better than if you let Paint do it.

2. Loading graphics directly with Turtle Pack doesn’t work​

The button for which we are creating the icon is a technology. This means that we have to add it to file 50729.slp, that stores the technology icons. Open that file with Turtle Pack and add the new frames.
Note that, when adding frames, the program asks about player color and transparent palette:
  • Player color asks wether or not this graphic is painted with some player color, so that it detects the pixels that should change color, in this case we want it empty, as this icon doesn’t change color with players.
  • Transparent palette reffers to the background color. The ones that are relevant are Null (no background color), and Auto (whatever looks like the background color), I’ve had troubles using the third option. In our case, we put the background as Null as we want the game to display the black background behind the icon.

graphic3-800x529.png


Unfortunately, when we load the new frames we see that the unmodified one looks ok but the one that we modified has the colors wrong. This happened when Paint saved the file, even if we save it as a 256 colors bitmap, the palette get’s scrambled.

To fix this, we’ll need to use SLX studio.

graphic4-800x530.png


3. Doing the graphics with SLX Studio​

Open SLX Studio and drop the graphics on it, they will appear in the list of frames.

Now we need to use the tool Apply Coolor Palette, which converts an image of any format to one using colors in a given palette. The one we want to use is “Standard_Palette”. This is the palette we use for mostly everything so, unless you want to modify a menu or something like that, don’t even worry about it.

graphic5-800x560.png


Once you have applied the palette, save the file. It will generate an slx file, that we don’t care about, and every frame that make up the file. If you are saving the file in the same folder where the frames were originally, replace them as we want the versions produced by SLX studio.

4. Adding the frames to the slp file​

Open back file 50729.slp and repeat the process of section 2 to add the frames. Since now the files are saved with the correct palette, the colors will display properly in Turtle Pack and therefore in the game.

It only remains to set the anchor point properly. Icons have the anchor on the top left corner, pixel (0, 0). Use the arrows or enter the anchor point manually to put the frame in position.

graphic6-800x529.png


You are done!
 
Back
Top Bottom