Jump to content

Custom texture packs and tile definitions


Recommended Posts

Custom .pack files

 

If you have custom map tiles, you will need to create a .pack file containing those tiles for the game to load.  This can be done using the "Create .pack file..." command, found in the Tools menu in TileZed.

 

CreatePackFile.png

 

Place your tilesets into a directory, then click the + button to add that directory to the list.

 

The .pack file should be saved to your mod's media/texurepacks directory:

Zomboid/mods/MyMod/media/texturepacks/NAME.pack

Add a line to your mod's mod.info file:

pack=NAME

You can add one pack= line for each .pack file.

 

Custom .tiles files

 

Some tiles require special properties to be set, to handle rendering or collision for example.  This can be done using the "Tile Properties (.tiles)" command in the Tools menu in TileZed.

 

Place your custom .tiles files in your mod's media/ directory:

Zomboid/mods/MyMod/media/NAME.tiles

Add a line to your mod's mod.info file:

tiledef=NAME NUMBER

The NUMBER is important, it controls the unique ID numbers assigned to every sprite.

  • NUMBER can be from 100 up to about 8000.  The game reserves all numbers under 100 for itself.
  • All .tiles files loaded by the game and every active mod must have a unique NUMBER.  Don't use the same NUMBER as another mod, if that mod might be active at the same time as yours.
  • Once you choose a number for your .tiles file, do not change it, otherwise it will break savefiles using your custom sprites.  This is because the savefile records the ID number for each sprite.
  • Don't remove a tileset from your .tiles file and then add it again.  Doing so will change the sprite IDs assigned to tiles in that tileset.  If you look at the game's newtiledefinitions.tiles file in the editor, you will see that there is a number next to each tileset name, and a unique "gid" in the tooltip for each tile.  Those numbers must remain the same if you edit the .tiles file.

 

Link to comment
Share on other sites

  • 4 weeks later...
  • 4 weeks later...
  • 2 weeks later...
  • 1 month later...
  • 4 months later...

Here's a detailed step-by-step walkthrough on how to get the tiles working on your map mod. Tell me if you guys n' gals find something wrong with it and I'll fix it. :) Happy mapping!

 

I assume you've already drawn a tileset and have added custom tiles in the tools.

 

how to do a tile definition file (.tiles)

1. In tilezed, go to tools -> tile properties

2. From the pop up File -> New (name the file. I use TILESETTEST)

3. Click on the blue + sign in the top middle of the pop up window

4. Choose the tilesets you want to add/define

5. Once chosen, specify each tile by clicking on it and changing the parameters on the right side of the screen accordingly. Ie. enable IsFloor and disable IsIndoor if your making a floor tile that's outside.

6. Save

7. Close the window

 

how to do a packed texture file (.pack)

8. Copy your tileset(s) to a new folder. (No matter where, just create a new folder somewhere and copy the files there)

9. In tilezed go to tools->.pack files -> Create .pack file

10. Click on the blue + sign on the mid left of the pop up

11. Find the folder where you copied the tilesets and choose it

12. Name the pack file (for this I use NAME.pack) Remember lower and upper case letters make a difference so don't make a name like l33TNo0OBs.pack or you're going to have a bad time.

13. You can specify where the .pack will be created from the ... icon (defaults to tools/tilezed)

14. Press OK

 

How to add the files into a mod structure. I assume that you've created an otherwise working folder structure

15. Create a textures folder to your mod: Zomboid/mods/MyMod/media/texturepacks/

16. Copy the .pack file to that folder

17. Copy the .tiles file to Zomboid/mods/MyMod/media

18. Open your mod.info file (Zomboid/mods/MyMod/)

19. Add these two lines:

pack=NAME
tiledef
=TILESETTEST ###

20. replace the ### with a number from 100-8000 (check if other published mods are using the same number and announce what number you're using in your map thread)

 

All done. Open up and play!

 

If this is all ok, I'd appreciate if it could be added to the OP (as a spoiler?). :)

Link to comment
Share on other sites

  • 2 weeks later...
  • 6 months later...

any one going to update the old tool that unpacks .pack files with a xml created for repacking with the header info? i think its lacking some png pages for the character.pack . i was going to adjust some things that a 3d model run through a filter just cant do like ignore lighting for the sake of detail in the face for zombies. to make them slightly more menacing but its missing some pngs

 

 

the old tool that unpacks and repacks .pack files

http://theindiestone.com/forums/index.php/topic/2473-how-to-mod-the-textures/

Link to comment
Share on other sites

  • 5 months later...
On 3. 7. 2014 at 6:11 PM, turbotutone said:

This link is now dead too. Could the correct link be added to the original post so that people can see it instantly? The original post mentions TileZed like something everyone knows, but when I searched it in google and Project Zomboid application folder, I found nothing.

Link to comment
Share on other sites

  • 11 months later...
  • 4 weeks later...

Hi, could you help me?

my multiplayer server don't read customtiles anymore

All was good, custom tiles were on, and one day, after 1 month, they were all gone.
it seems a story, but it is the cruel reality.

how did it happen? We also did a server wipe, but nothing has changed, the customtiles not seen yet.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

I set my own custom .packs with the same names of each tiles (1x and 2x)
1x works good... 2x not working.
If i set on mod.info only 1xpack tiles (pack=snakemantiles1x) working (1x and 2x option settings) but in 2x seems to be adjusted to that resolution making a some pixeled tile.

if i set only 2xpack (pack=snakemantiles2x) Not working (in 1x or 2x option settings).

Link to comment
Share on other sites

  • 1 month later...
  • 4 years later...
  • 1 year later...

It looks like the .pack format definition has changed over PZ lifespan.

New header seems to be / include pzpk (UI2.pack) while old format was starting with the number of pages(UI.pack).

Where can I find the format definition ? answer is: on this git repository.

Edited by Tchernobill
solution given by map/tile experts (Alree)
Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...