I'd suggest checking if it is garbage or not - if it is then just throw it away. Matching byte for byte isn't important, but you don't want to have to specify useless padding when making changes.
I actually have a command line option to preserve it or not. By default, it preserves it, but if you make changes to the length of the item (e.g. a different length string) and the padding is the wrong size, it will always be removed automatically. This guarantees that it won't take any space. Oh, and you can always remove it from the XML file and the alignment will still be maintained automatically (padding with zeros). So it's benign even if you don't disable it completely from the command line. If we eventually determine it's not needed, I'll just have the command line option default to OFF. I just wanted to make sure I could do exact comparison testing like I mentioned in post #10.
 
OFFICIAL RELEASE!!! VERSION 1.0

Contains SRZoneTool, which can convert zone files to XML and back again. You can download it from the Saints Row Zone File Tools package in post #1.
I've tested it with Saints Row: The Third and Saints Row IV, and it successfully converts all ".czn_pc" and ".czh_pc" files to XML and back again.
If you have any questions (and I'm pretty sure you will), please let me know.
I'm eager to see what people can do with this. :cool:
 
OFFICIAL RELEASE!!! VERSION 1.0

Contains SRZoneTool, which can convert zone files to XML and back again. You can download it from the Saints Row Zone File Tools package in post #1.
I've tested it with Saints Row: The Third and Saints Row IV, and it successfully converts all ".czn_pc" and ".czh_pc" files to XML and back again.
If you have any questions (and I'm pretty sure you will), please let me know.
I'm eager to see what people can do with this. :cool:

I think now would be a good time to create a new thread in the Tool Releases sub-forum or for a moderator to move this whole thing. The zone tools work fine as far as I tested them, great work!
 
Ah, so this is a tool to modify the map? Awesome! Though... XML files? I know procedural generation is probably a thing here, but this is not very intuitive for making meaningful modifications to the map, though I'm sure you plan on getting to the point where it's easy to use in a way that allows for completely modifying terrain and such and making entirely new maps.
 
Ah, so this is a tool to modify the map? Awesome! Though... XML files? I know procedural generation is probably a thing here, but this is not very intuitive for making meaningful modifications to the map, though I'm sure you plan on getting to the point where it's easy to use in a way that allows for completely modifying terrain and such and making entirely new maps.
This is a basic conversion tool for advanced modders. People who are already familiar with editing ".xtbl" files will be comfortable editing these XML files. I am not planning to make any more advanced tools like the ones you suggested, but others are welcome to build upon what I've done here. Unfortunately, I don't have enough information to parse things like terrain or build new maps, so I won't be able to help you there. But let me know if you need any help with this tool.

EDIT: If anyone wants to write some C# code that uses this, I will release the C# library as a separate package. It can read and write zone files and XML files. Just let me know.
 
Last edited:
If anyone wants to write some C# code that uses this, I will release the C# library as a separate package. It can read and write zone files and XML files. Just let me know.
Yes, thank you, the C# library would help in providing additional insight into deciphering the inner workings.:cool:
 
Last edited:
Yes, thank you, the C# library would help in providing additional insight into deciphering the inner workings.:cool:
I will add the library to my next release, as soon as I get a chance. The code structure itself, which is on GitHub, is designed to be very extensible. So, as we find out more about the internal data structures, I can add parsers for the additional sections.

EDIT: I've split out the library into a separate project and added an example program in my GitHub repository here: https://github.com/clarosa/SRZoneTools
I will download a new package with the ".DLL" file (.NET 4.5 Assembly) when I get a chance.
 
Last edited:
VERSION 1.1 RELEASED!

This version adds a new tool called SRZoneFinder that helps find zone files closest to a set of coordinates. This helps to identify which files you need to edit. I've updated the first post in this topic with the new package, which you can download. I've also updated my GitHub repository with all the latest source code. If you have any questions, please let me know.
 
VERSION 1.2 RELEASED!

This version adds some command line options to SRZoneFinder to make it a bit more useful. It also removes unintended verbosity from SRZoneTool when reading zone header files. And it includes some optimizations suggested by Minimaul (think you!). Download it from post #1. GitHub is updated with all the latest.

Nice job Quantum!
Thanks, puss2puss! :)
 
Back
Top