So thing time we are modifying items in Towns (ONLY ITEMS! bigger stuff in later tutorials.)
Required:
- Some photo editing software (Not really required though for this)
- DO NOT USE PAINT!
1) Use a graphics already in the game and do a color change
2) Use a new graphic you designed or found.
So let us begin.
We will start with a easy color change.
The item we will be changing in the bent sword. (AKA Curved Blade)
so open up the graphics.ini, which is located in your Towns folder (They really need to make a installer for towns.....)
Then search for [bentsword]
As you can see there are four lines that make up this image
[list=]TILE_X
TILE_Y
COLOR
TEXTURE_FILE[/list]
The color runs off the Red, Green, Blue system
So the lowest value is 0 and the highest value is 250
Now for the sake of keeping this easy and simple we are going to change the color values as such
COLOR = 0,192,0
This will change the weapon color to a hulk green.
If want to know what color your values come out to be before using it. Open paint or any photo editor and open the color palette.
Then look for the red, green blue value and edit those to match the values you want to use in Towns.
Well there is part one of the graphic tutorial, onto part 2 - New graphics.
Your basicly size of a item in towns is 64 pixels wide, by 32 pixels high.
So Tile_X will move over by 64 pixels at a time when you change the Tile_X value.
and the Tile_Y will move down 32 pixels, when the value is increased.
We are going to be staying with the bentsword but we will be using a new image for it.

Now we will need a transparent background image that is 1024x1024 pixels.
I use Gimp its a free software, that you can download.
If possible(If not use a different program) configure grid to be 32x32 pixels, then show the grid.
Open the new bendsword image as a layer and put it on the line between the first and second 32x32 grid squares on the X Axis (Left to right).
The background HAS to be transparent.
Merge all layers together and save the image as a .png file.
Place the new image into the Towns/data/graphics folder.
and back to graphics.ini we go.
These is what your bentsword should currently have before we change anything.
- Code: Select all
[bentsword]TILE_X = 10
[bentsword]TILE_Y = 10
[bentsword]COLOR = 0,192,0
[bentsword]TEXTURE_FILE = military.png
Change TILE_X = 10 to TILE_X = 0
Change TILE_Y = 10 to TILE_Y = 0
Remove the line that changes color
- Code: Select all
[bentsword]COLOR = 0,192,0
Now we need to tell where the new image is coming from.
So we need to change the TEXTURE_FILE = military.png
so that is equals to the name of the image you just made.
I named mine Bentsword so the line of code would look like this.
- [bentsword]TEXTURE_FILE = Bentsword.png
Now to see the new item image, open up towns and get a Hero Rogue. They come with a bentsword.
For any reason that Towns is not loading at all, please post your error.log in the thread. So we can figure out what happened.
Thank you for reading Modding 101 - Graphics
I hope you all enjoyed this guide.