Tonberry v1.5External Texture Support for Final Fantasy VIII*Beta version, please let me know if there is something preventing you from using it
This drop-in package allows:I) Support for Hi-Res external textures (field files for now) to 4x original size in an FF8\textures directory
II) Future support for ANY texture (characters, monsters, battles, world map, cards, spells, summons, menus, and just about anything else you can think of)
Instructions (for players):
1. Extract Tonberry_v1.x.rar into your FF8 directory (typically 'C:\Program Files (x86)\Final Fantasy VIII')
2. Make sure to drop in the most up-to-date hash map files, from hashmap_v1.x.rar.
3. Download and place your properly formatted textures from their respective projects into the 'textures' folder (see below)
4. Install VC++ 2010 Redistributable (x86)
6. (Optional) If your Windows installation is not on drive C, change your prefs.txt file 'drive_letter' from C to your drive letter. If you're using textures of different sizes, change 'resize_factor' in prefs.txt.
Formatting Textures (for modders creating texture packs):
1. Create 4x textures with dimensions exactly 4 times the width and 4 times the height of the originals (PNGs supported only).
2. For field files, use PuPu to export and import your images (PuPu Updated and Working).
3. For non-field textures, PuPu will not work, and they will have to be renamed by hand or custom batch scripts.
4. Most textures won't require this, but field files have pages. If a field texture has a width of 1664 it has 13 pages (each 128x256 => 512x1024) and if it has a width of 1536 it has 12 pages. PuPu will automagically slice them up for you and name each page properly starting with a suffix of _0 and ending at _11 or _12 (_13 to _25 for 4-bit indexed textures).
5. Ensure your textures have the proper folder structure with 'textures\firsttwoletters\texturename\texturefile.png\'. E.g. for bghall_1 => 'textures\bg\bghall_1\bghall_1_0.png' for the first page, 'textures\bg\bghall_1\bghall_1_1.png' for the second page, etc. If you have a texture that doesn't require pages, the format would be the same, except with the page suffix '_0' (note that this has changed). E.g. mc00 (cards) => 'textures\mc\mc00\mc00_0.png'.
Adding Support for Other Types of Textures:
->How Tonberry Works
As mentioned above, Tonberry currently only recognizes field files. This is because in order to replace textures, it must read the original paletted textures from directx, generate a key that identifies the texture, and then lookup the texture in the '/textures' folder. Generating the key takes a lot of work on my end. I have to have up to 16 versions of each texture colored with each possible palette from the original source files. I've written programs to generate keys for field files, but it will take some time to support each additional file type. If you have a project that demands support for another file type, you can make it happen if you have some basic programming experience. If not, you'll have to convince your fellow modders to do that work for you if I can't.
Here's how to add support:
1. Find the game source files that contain the type of textures you are working on. They might be LZS compressed, have weird file extensions like md5, bin, etc, but they are all binary files of zeros and ones when it comes down to it.
2. Decode the files using the wiki documentation or asking around. Myst6re has apparently decoded most of them, as is evidenced in Deling (sorry if that's negative publicity myst but its true!). Also, contribute new knowledge to the wiki if you can along the way.
3. Find out if the texture type uses palettes (IMPORTANT!)
4. Write a simple program in python/c++/your favorite language that takes the source game files and exports the textures exactly as they are in the file. No need for map files or anything that will map the blocks to the screen, just dump the image data from the file (mostly applies to fields I think).
5. Export every possible paletted version of each texture. This means that if there is an area in the file with palettes, instead of finding which palettes go to which blocks in the image data, literally export an entire image that uses 1 palette, and do that for every palette.
6. Optimize your program to only export palettes that are used. For example, if you have 3 palettes pink, green, and yellow, but the blocks of the file only make references to pink and yellow palettes and never actually use the green palette, that version of the texture will NEVER be loaded to memory anyway, so don't export it.
7. Format your textures in the manner described above but with suffixes for each palette number. For example, palette 12 on mc00 would be mc00_0_12.png. There will be 2 suffixes including the page. For example, for the 3rd page and 8th palette of bggate_1, it would be bggate_1_2_7.png.
8. You now have a directory full of images that is ready to be hashed.
9. RAR it up and send it to me and I should have it working in short order.
10. Be prepared to make mistakes at any point, they are inevitable, but persevere in the name of art!
Examples of paletted texture files (what your output should look like):
*Please DO NOT post any direct links to files, always link to this forum thread. Especially, do not make any links to adfly or any other ad site
Download: Tonberry_v1.5.rar Mirror 1
Download: hashmap_v1.3.rar Mirror 1
Download: Tonberry_s1.5.rar (SOURCE CODE ONLY)*hashmap contains most updated hash files, tonberry contains most updated DLLs**My policy on my mods is always that you have complete freedom to take them, use them, modify them, and even release derivative works--just give a line of credit in your release and do not draw any monetary profit from my links or releases. I think if you make something, including a derivative work, it is fine to solicit donations, but I encourage you to retain these same policies of openness for whatever you make so we can always further the modding community on every front.Credits:
at Stanford University for developing the original d3d9Callback interceptor: http://graphics.stanford.edu/~mdfisher/D3D9Interceptor.html
for developing the original work that allowed me to replace textures in FF7 (his OpenGL driver and Palmer, which PuPu is based on)
for her Deling field editor, which is quite an amazing tool (http://forums.qhimm.com/index.php?topic=13050.0
for their work on the FF7 field backgrounds, EQ2Alyza
for her battle scene enhancements
for keeping me motivated to stay crunchy
-Memory issues--may crash after extended use. Temporary solution:
and set it to automatically optimize.
-Lag during some summons or other events that resolves by itself
-Possible hash collisions resulting in glitches where random textures are replaced by other textures.
-Works with the Steam release of FF8 only
. I don't have any impetus to try to make it work with anything else, but I have posted the source above.Debug VersionHow to use:
Note the 'debug0' folder inside the 'tonberry' folder with category subfolders inside. If you rename this folder to 'debug' (erase the 0), Tonberry will dump all textures into these folders while your game is running. Be careful!
You may amass gigs of textures in them if you are not aware and are just playing normally. Have a save prepared at a certain point and only play for a few minutes, depending on your hard drive size. To turn this feature off, simply rename the 'debug' folder to anything else like 'debug0'. Alternatively, you can rename only some of the subfolders to turn specific types off. Subfolder categories:
: size/format is not yet supported (256x256 currently only supported)
: not yet hashed, but will be in the future with modder help
: hashed once, failed second round of hashing (shouldn't happen)
: hashed and intended to be replaced but the new texture failed to load or didn't exist
: successfully replaced
: texture not otherwise accounted for (shouldn't happen)Next on my agenda:
1. Project Eden, the FacePalmer of FF8
2. Help people build support for other texture types