using your own Graphics in your mod packs

Post your mods and custom content here

using your own Graphics in your mod packs

Postby BlueSteelAUS » Wed Feb 29, 2012 3:53 am

Hi,
As more people are doing mods for Towns now, I though I'd start sharing some of what I've learned

in this post I'll show you how to use your own Tileset,graphics inside Towns

For the most part from what i have found out so far is that you can (and I highly recommend that you do) use a seperate image file for graphics that you use in your mods. Doing so means that you don't have to edit the standard .png files (except for the UI.png. more about that later).

all you do is in the graphics.ini file add in your image file to the TileSet_extras line see below for an example (my image file is bluesteels.png so I add that to the end of the line)

eg:

TILESET_EXTRAS = walls.png,living2.png,citizenmale.png,citizenfemale.png,military.png,bluesteels.png



then all you do is reference your graphics with this line added to the rest of the basic parameters "TEXTURE_FILE = name_of_your.png"

eg:
[chickenfarm]TILE_X = 0
[chickenfarm]TILE_Y = 0
[chickenfarm]TILE_WIDTH = 192
[chickenfarm]TILE_HEIGHT = 128
[chickenfarm]TILE_HEIGHT_OFFSET = 32
[chickenfarm]TEXTURE_FILE = bluesteels.png


This way when they alter the standard graphics you won't have to alter yours every time

The only exception to this that I know of (have run into so far.. but there may be others too) is the UI.png file.
(I add them also in my Image file to keep all my stuff together for easy updating later on, all I have to do is copy / paste into the UI.png the images as needed from within my image file('s)

Things that appear in the user interface (menu's) have to be in the ui.png file you can't place these in your own file. which I've been told has been done for performance reasons (sounds logical , only having to read one graphics file for all the menu's in the game)

please provide feedback , comments , questions to this post , I know I'm not the best teacher out there but hopefully I've shared some info that will improve your modding experience
User avatar
BlueSteelAUS
 
Posts: 473
Joined: Sun Dec 11, 2011 10:37 pm
Location: Nanango, Qld, Australia

Re: using your own Graphics in your mod packs

Postby DaizNaew » Wed Feb 29, 2012 7:59 am

Nice small explanation, short but describes it overall and well.
DaizNaew
 
Posts: 25
Joined: Tue Feb 28, 2012 11:00 am

Re: using your own Graphics in your mod packs

Postby Quixa » Wed Feb 29, 2012 9:12 am

Thanks! This will help me a bunch. =)
Quixa
 
Posts: 13
Joined: Fri Dec 09, 2011 5:51 pm
Location: Earth

Re: using your own Graphics in your mod packs

Postby Jontis_00 » Wed Feb 29, 2012 10:20 am

It's worth noting that all buttons in the user interface dose not need to be assign with a ui icon, QUEUE's take the sprite of the first <createItem> but I think this can be overwritten with a icon if you want to.
My Mods: 12 000+ downloads!

-list of mods removed-

I do no longer make mods for Towns sadly, if you want to continue or update any of my outdated mods, feel free to contact me!
User avatar
Jontis_00
 
Posts: 736
Joined: Sun Feb 12, 2012 4:49 pm

Re: using your own Graphics in your mod packs

Postby Gorhaax » Mon Mar 19, 2012 2:52 am

I was just looking at your code for your applefarm, and I can't quite understand where your numbers for "TILE_X" TILE_Y" and "TILE_HEIGHT_OFFSET" come from?
Gorhaax
 
Posts: 44
Joined: Fri Feb 17, 2012 9:42 pm

Re: using your own Graphics in your mod packs

Postby Deedasmi » Mon Mar 19, 2012 3:14 am

viewtopic.php?f=13&t=1407#p9135

good template for tile_x/tile_y, but has some of my graphics in it. eLe posted a gimp template on the second page as well.
Tired of mud? Try my Mud Mod
Deedasmi
 
Posts: 199
Joined: Tue Mar 06, 2012 9:49 pm


Return to Modding

Who is online

Users browsing this forum: No registered users and 4 guests