If you are trying to load a pedestrian model or spawn in a car and you are presented with an error, it is most likely due to the textures of that particular model is of too high resolution or has an incompatible compression format. Here is the error:
ERR_GEN_ZLIB_2
Failed zlib call. Please reboot, verify the game data, or reinstall the game. For more information, please visit: http:// rsg.ms/verify
Texture limitations
All textures cannot exceed 1024 pixels in either direction, and have to be stored in a specific DXT format (read below). For example, 1024x2048 textures will crash your game, and so will 512x512 textures stored in A8R8G8B8 format.
Be aware that the game will still crash with the same error if the texture dictionary size exceeds 16MB. You will have to downscale textures and/or change compression method to lower the total file size.
It generally is a good idea to reserve 1K textures for big objects, and just do 512x512 or even smaller for the smaller things. Not everybody has a kick-ass computer or high internet speeds like you! These files do need to be streamed after allâŚ
Tools to fix the error
- OpenIV
- Adobe Photoshop
- Nvidia Texture Tools plugin for Adobe Photoshop
Converting textures
Create a new empty archive in OpenIV (ctrl+n
). It doesnât matter where you save it; the archive is only temporary. Find the *.ytd
file of the model in that crashes your game and add it to the archive. Ensure you are in Edit mode
and double-click the file you just added.
On the left of the window that just opened, you want to look for items that exceed the texture limitations mentioned above. Click on those items and press the export selected
button, and save them in the .dds
file format.
Open up Photoshop and load in the files you just exported. If the resolution is too big then you downscale them with Image > Image size
so that neither dimension exceeds 1024 pixels. Obviously youâll want to keep the image ratio, so 1024x2048 becomes 512x1024.
Once the image meets the texture requirements, youâll want to save the file (File > Save
) or if you havenât made any changes and only want to change the compression method, choose Save as
. At the dialog choose .dds
as format and press save. It will prompt you with additional options:
Importing converted textures
With OpenIVâs Texture Editor still open, you can press the + Import
button to import the textures back in. Leave everything default/automatic on the prompt. This will overwrite textures with the same name without prompting you, so donât panic thinking it didnât do anything. After pressing Save
you can now drag the *.ytd
file back out into your assets folder and delete the created archive and exported textures.
Big texture dictionaries tip
A thing I like to do with big dictionaries is to just export everything into a folder. Open that folder in Windows Explorer and go into Details
view (Ctrl+Shift+6
on Windows 10). Right-click the column headers and select More...
. Find âDimensionsâ and put a checkmark in front of it. Sort by dimension in descending order and you can now quickly find the textures that are too big. Scroll all the way to the bottom of the folder, and the .dds
files that show no resolution are likely stored in the wrong format (non-DXT).
Side-note on apparent plain-white .dds files
Some .dds
files may appear white in some cases and when you import them back normally, the in-game model may have have solid windows and/or a white body that canât be painted. In this case you need to manually add an alpha channel to this texture in Photoshop and delete the white foreground so that you now have an empty, transparent texture. Now youâll have windows you can actually look through.
Iâm not sure why this happens, but I believe it is a bug with the OpenIV editor.