Jump to content

How to connect empty storage image with overlay image?


wbfactory444r

Recommended Posts

  • 1 month later...

Soooo I figured this out.
Ill try to explain it.

1. Draw tiles
2. Save tiles as .png file in: DRIVE:\Steam\steamapps\common\Project Zomboid Modding Tools\Tiles\2x
3. Open Tiled
4. Up top click tools -> Tilesets
5. Click the "Add Tilesets" button In this new screen it should also direct to where step 2 is pointing.

6. check the boxes for the new tilesets that you want to add to your map. (even for just adding tilesets I'd recomend adding them to a map for now) and press OK
7. Good job, they should now be in the list. If you click on them they should show you the tileset
8. close this screen

Now you will need to give properties to your tile set
9. Up top click tools -> Tile properties
10. Here we are going to define what your tiles do in game. I'de recommend opening Tiled twice for the following
11. Open the .tiles file that is in your DRIVE:\Steam\steamapps\common\Project Zomboid Modding Tools\Tiles by default. Mine was called "newtiledefinitions" This will be your reference
12. In your other tiled also open the tile properties screen but now instead make a new file
13. Click the + icon on the bottom and select your tilesets. (if you want to update this later it is important that you do not delete these sets if they are being used in maps/mods/whatever, the number will be different and it will break stuff)
14. Click on the tile you want to give properties to, open the reference tiled and navigate to an object similar to the one you are adding
15. copy the settings and change them to your need, most stuff is self explenatory
16. sweet, now your tiles have properties.
17. close the tile properties screen

18. Go to tools -> .pack files -> create .pack file
19. Fill in the required steps.


Now we will need to create a mod for you to be able to load your items in-game
Eventhough I have the game on steam and it has its own mod folder their for some reason where it loads my mods from is: DRIVE:\Users\Username\Zomboid\mods
20. Copy the "examplemod" and name it whatever you want

21. open the folder and open the "mod" .info
22. change the name, ID, Description
23. save and close the file
24. In your media folder inside of your mod folder create a folder named "texturepacks" in here you will put the .pack file you created in step 19 (\Zomboid\mods\MODNAME\media\texturepacks)
25. back in the media folder you will put the tile definition file
26. Open up the "mod" .info file again in your main mod folder
27. add the line "pack=THENAMEOFYOURTEXTURE.PACK FILE"


Awesome, now we will need to fix the container overlay. You can fix this for yourself locally OR you can add it to the mod so that others can enjoy it as well.
28. navigate to DRIVE:\Steam\steamapps\common\ProjectZomboid\media\lua\server\Items
29. Here is a worldfiller.lua file, copy it
30. past it in your mod folder in MODNAME\media\lua\server\items (the "server" and "items" folder does probably not exist yet, create those)
31. Now open the worldfiller.lua file you just pasted there (I use notepad++, its free and easy to work with)
32.Now afer opening this file there will be a bunch of lines, these are all the existing container overlays in the game. For as far as I experienced you will need to keep those in addition to what you will add. Upon loading your mod this file will be used instead of the default one. If you don't keep the existing stuff it will no longer work in your map

Adding new things
33. Now for example you have the line

Quote

"overlayMap["location_shop_zippee_01_11"] = {{ name = "other", tiles = {"food_01_10", "food_01_18"} }, { name = "other", tiles = {"food_02_10", "food_02_18"} }}"

in here location_Shop_zippee_01 is the name of the texture that its refering to. the _11 after that is the position on the texture, simply counting left to right and then continue on the next layer. there are 2 links after that, one for when its full and when for when its partially full.  so "food_01_10" is when its full and "food_01_18" when it is partially full. 

Now what you want to do is copy-paste this line and edit it so that it will use your own overlays on your own tiles.
"overlayMap["ThisIsMyNewTileSetName_11"] = {{ name = "other", tiles = {"ThisIsMyNewOverlayName_10", "ThisIsMyNewOverlayName_01_18"} }, { name = "other", tiles = {"food_02_10", "food_02_18"} }}"


I hope this helps

Link to comment
Share on other sites

  • 10 months later...

DiederikV

Thank you so much for this guide, I don’t even know how I didn’t come across it before. I have been puzzling over how to add fullness to my containers for over two months now. And today I learned how to do it.   THANK YOU !!!!!(clyde)

Edited by MopS
Link to comment
Share on other sites

  • 4 weeks later...
On 2/1/2021 at 7:12 PM, MopS said:

DiederikV

Thank you so much for this guide, I don’t even know how I didn’t come across it before. I have been puzzling over how to add fullness to my containers for over two months now. And today I learned how to do it.   THANK YOU !!!!!(clyde)

No problem. Tip I found out later. Name the copied file (so your custome one) different. so instead of  worldfiller.lua I named it worldfiller_diederik.Lua
That way you only have to add your custom lines. 

If you name it the exact same it will overide the vanilla file in game, which may cause issues if the devs update the file and you dont.

I hope you get what I mean

Link to comment
Share on other sites

  • 2 weeks 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...