KillerStarBunny Posted October 31, 2013 Share Posted October 31, 2013 OK so you can do this but there isn't any tools (yet) to do the annoying stuff for you, but you will need to download a hex editor i recommend this one HxD http://mh-nexus.de/en/downloads.php If you have no idea what hex is read thisHex is a way to view binary with the numbers 0-9 and A-F each letter represents four binary... things and the numbers and letters are put into pairs so you will see stuff like 1A 8D 4F 7B AA 48 etc... Hex makes up everything on a computer, be it programs, videos, tmp files, anything. So it is a crucial part of a computer and if you know what you are doing you can do anything with hex. Some defintionsOffset: Hex id number (always as hex and for HxD it is found in the bottom left corrner) ex 32C If you want to know about .pack file architecture read thisAll I know is that offset 0 has the number of pngs that are in the file So here is the real tut and for demonstration's sake it will be how to make no blood appear.1st: Open HxD and go to File --> Open (Ctrl+O)2nd: Navigate to your .pack files Project Zomboid\media\texturepacks\ and choose the tiles.pack3rd: CLICK ON FILE--> SAVE AS (no Ctrl+)you need backups in case you mess something up (HxD does automatically make a file with the same file name but puts .bak at the end to access the .bak rename it and take off the .bak)4th: Go to Search --> Find (Ctrl+F)5th: For the "Search for" type in "blood" and make sure the "Datatype" is "Text-string" then hit OK.Now you should come across "blood_floor_large_01" this will make it so HxD will search for the nearest PNG to the file you want to edit.6th: Now go to Search --> Find (Ctrl+F) and type in PNG. Make sure that the "Search Direction" is "Forward"7th: You should run across ‰PNG put your cursor right before the "‰" and click so now it looks like "|‰" the offset (at the bottom left) should read "AB58C"8th: Open Notepad and write that down9th: Go to Search --> Find (Ctrl+F) and for the "Search for" type in "iend" make sure the "Datatype" is "Text-string" and the "Search Direction" is "Forward" then hit OK.10th: You should run across "IEND®B" put your cursor between the "N" and the "D" so it now reads "IEN|D®B"11th: The offset should now read "E737C"A quick Hex lesson the letters on the right are to make stuff easier for the reader, but "." could be 00 - 19 so the text isn't that reliable which is why this next step is very important.12th: If you look to your left there should be a faint box around 44 click in the middle and it should read "|44". The hex should stay the same.13th: Now go to Edit --> Select block... (Ctrl+E)14th: For the "Start Offset" make it the offset you wrote down in notepad (aka step 7) which should be "AB58C". Hit OK.15th: The left side should have a dark blue selector thing while the right has a light blue. If not go to the 11th step.16th: Hit Ctrl+C (Copy), then Ctrl+N (New), then Ctrl+V (paste insert). It will tell you that you are about to change file size. Ignore it and hit OK.17th: Hit Ctrl+S (save), name it "Blood.png" make sure to have the .png.18th: Open it in an editor that supports alpha (anything besides Paint will be good)19th: Edit This only has part of the blood stuff rest of it is in the "75A148", "BC4290", "C519A7", "D1729D", and even more than that png blocks so if you want to find the rest of the blood have at it all you need to do is search for blood again and grab that PNG and again (yada yada). If you really want to test this just make everything black. Now how to put it back in. This is the easy part. 1st: Open the png in HxD2nd: click on the hex in the left side.3rd: Hit Ctrl+A (Select All), then Ctrl+C (copy)4th Go to the .pack file and hit Ctrl+G (Goto) and make the "Offset" the number you wrote down.5th: Make sure you are on the left hand side.6th: Make sure you are at "|‰PNG"7th: Hit Ctrl+B (Paste write)8th: Save9th: Copy the orginal Tiles.pack folder and paste it somewhere where you can easily find it (a backup folder inside of the texturepacks folder works)10th: Delete the orginal11th: Paste the modded one inside of the folder12th: Name it Tiles.pack13th: Run PZ and bask in your glory. Here is a list of where PNGs stop and start it is incomplete but here it is half doneUI:{16A - 3156809C - 3C8113CFDD - 3E96740BDC - 5D6A15DEA5 - 6576C68AAF - 9D754} Tiles:{4F4239E833EC0AAB58CE9CB9134FC319561D1C2F5620329329FF4832F45136CD26389DDC424ADC5126295821985EE2C3656B456E1A0675A148795F037E9F8D8142548625288F31FDS9C8002A383F2B06830BC4290C519A7D1726BDBB2F7E5FEC1EE7038F8CC951062633111E20611EC62D126580E1315BD51454A0914CE22C156984915C48EF16664181685DEA168C3B1168D1A9168E158 - 168EEB1} FP (Frequent Problems)1. It says my PNG is coruptedYour PNG's header or footer is incorrect make sure you copied it right Link to comment Share on other sites More sharing options...
KillerStarBunny Posted October 31, 2013 Author Share Posted October 31, 2013 Did a massive remake if you have problems please post them. Link to comment Share on other sites More sharing options...
harakka Posted October 31, 2013 Share Posted October 31, 2013 With all this effort you probably could have just written an unpacker and a packer, since the format is just catenated pngs. I forget if there was an offset to the next one included before header or something. IIRC someone already did the unpacker on the old forums. Although we are supposed to get the tools soonish anyway... Link to comment Share on other sites More sharing options...
KillerStarBunny Posted November 3, 2013 Author Share Posted November 3, 2013 With all this effort you probably could have just written an unpacker and a packer, since the format is just catenated pngs. I forget if there was an offset to the next one included before header or something. IIRC someone already did the unpacker on the old forums. Although we are supposed to get the tools soonish anyway...Yeah I would really like a tool, I was planing on making one by my file accessing skills aren't that great and I'm too busy to learn. Also it's fun to play with hex, even though it can be quite vexing (puns). Link to comment Share on other sites More sharing options...
Minic90 Posted November 18, 2013 Share Posted November 18, 2013 Here you go: Really simple code to split the PNG files wrote it in 20min, so its not perfect/optimized and can have errors!!!but for the meantime its OK ^^ I attached a zip [OLD_POST] (sourcecode(Main.java [namefail -.-]), executable .jar) and the first 5 of 7 PNG files you get when splitting the file (UI.pack) How to execute:java -jar extract.jar "Path to file" "Path to folder where the pngs should be placed"Example (same folder):java -jar extract.jar UI.pack \I will use this myself for the wiki Have fun ^^ Link to comment Share on other sites More sharing options...
Breathe Posted November 18, 2013 Share Posted November 18, 2013 Very nice, are you able to pack it again? Link to comment Share on other sites More sharing options...
Minic90 Posted November 18, 2013 Share Posted November 18, 2013 Well, up till now i dont understand what kind of information was placed between the single png files.So, i dont know how to generate those.But if somebody manage to generate these, then I can include the packing option in a V0.2(lets say this is V0.1 ^^) Link to comment Share on other sites More sharing options...
Minic90 Posted November 20, 2013 Share Posted November 20, 2013 So, here is V0.3It took some work to rewrite the progam, but now it has a better format and is optimized (well i get some problems with the Characters.pack, because its huge -.-) Now, what can this "UnPacker" do: 1. It can unpack .pack files into the packed .png files(with naming) and created a .xml file with all informations.2. It can (re)pack the .pack file (.xml file and all .png files required)3. It can split the .png files resulting through 1. into all subtextures(merging is on its way ^^) I attached a mediafire link conaining a runnable .jar with GUI https://www.mediafire.com/folder/8a37ath7zayyd/Project%20Zomboid P.S. I forgot to add some bytes at the end of each .png file while packing.I fixed this bug and apologize for those who had problems -.- Man_In_The_Purple_Hat 1 Link to comment Share on other sites More sharing options...
Emton Posted February 8, 2015 Share Posted February 8, 2015 Does this make it easy to extract the graphic files, modify them in a graphic program, save, and repack them so they show up in the game? Link to comment Share on other sites More sharing options...
Suomiboi Posted February 8, 2015 Share Posted February 8, 2015 Does this make it easy to extract the graphic files, modify them in a graphic program, save, and repack them so they show up in the game? Yes. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now