Tonberry: Enhanced v2.04 by JeMaCheHi and mavirickExternal Texture Support for Final Fantasy VIII*Beta version, please let me know if there is something preventing you from using it

Hello! (I'll borrow Omzy's header, hope you don't mind bro )

Broken cache fixed!I've been working Mavirick and I have been working on an enhanced version of Tonberry, as many of you would know from its original thread. You should check Omzy's original post to learn about its functioning.

What's new?:

2.04

Persistent textures - modders now have the ability to designate textures as "persistent," meaning they will never be removed from the cache. This feature should be used primarily for the core textures, such as those replaced by SeeDReborn.

To mark a persistent texture, simply precede the name of the texture with a bang/exclamation mark (!) in the relevant hashmap or objmap .csv. For example:

!sysfld00_13,8637763346649579509

Please be aware that filling the cache with persistent textures will lock it in place and all subsequent textures will fail to be replaced, so use this feature with discretion.

Significant performance improvements - although dampened in part by the increased complexity of the persistent textures, Tonberry should be running faster than ever due to some major cache optimizations and an improvement to the way we handle the core (SeeDReborn) textures.

No hard limits on cache_size - the cache size no longer has a hard minimum size of 100. You can now set it to 0 to disable the cache and texture replacements altogether, although Tonberry will still be touching each in-game texture and checking for replacements (that never exist). This feature should be entirely ignored by average players but could be helpful for modders. Note that you can also set your cache_size too high and cause memory overflow exceptions! If you do not have LargeAddressAware enabled for your FF8 executable, your cache_size should be no larger than 250.

Actually disabled textures - before, textures that were disabled with a star/asterisk (*) were not handled any differently; Tonberry would simply fail to load the replacement texture when it looked for a .png file beginning with the asterisk character. Now these textures are actually excluded from the internal hashmap, which should yield a slight increase in performance and keep these textures out of your \tonberry\debug\noreplace folder. If for some reason you want these textures to show up in your debug\noreplace folder, simply change the asterisk to any other character--just so long as the texture name in the .csv does not match any file in your \textures folder.

2.03:

2.02 broke collision resolution--textures from the collisions.csv hashmap were not properly stored in the cache, which caused bad replacements and glitching textures especially on loading screens and in menus; this issue is resolved

2.02:

We fixed the little issue with debug folders. Now unsupported textures will be on "unsupported" folder.

Even more code optimizations!! We love code optimizations

2.01:

Caching system fixed (now it really works, I swear it!)

More code optimizations (as usual )

2.0:

Completely redone texture caching system

New option added to prefs.txt(cache_size) to set the maximum cache size

New option added to prefs.txt(texture_dir) to change textures directory

Lots of code optimizations

1.61:

Better objmap organization

Source code tweaks. Hashcode searching should go a little faster now

New option added to prefs.txt(debug_mode) and comments

1.6:

Better hashmap organization

Some compilation tweaks which should make Tonberry run smoother

For now there's no much done, actually I didn't want to release anything until I had something more, but Mcindus convinced me to do it . Due to recent mods have been more and more numerous, I thought this simple update will make our lifes easier when it comes to modify your hash1map.csv file.Now we have redone the whole caching of textures, this is gonna run with no sweat. Most of you will be able to run animated textures smoothly. We've added the possibility to change the path where the "textures" folder is stored, so you can place it on an SSD drive for even more speed. You can also tweak the cache size to fit your needs. Just refer to the prefs.txt file on "tonberry" folder for more info. Next step: new hashing algorithm, and potentially zero collisions.

We now have two new set of folders: { [your FF8 directory]/tonberry/hashmap and [your FF8 directory]/tonberry/hashmap/disabled }and { [your FF8 directory]/tonberry/objmap and [your FF8 directory]/tonberry/objmap/disabled }

In that "hashmap" folder you can put a set of *.csv files, with hashes that previously was at hash1map.csv

In that "objmap" folder you can put a set of *.csv file, with the previously set at objmap.csv

You should create a different .csv file for each mod hashes. You can name them as you like, but make sure they have *.csv extesion

Which advantages provide us this new directory system?

We now can release mods directly with its .csv file, just ready for copy-paste and make it work. Plug and play!

We can obviously split the "hash1map.csv" file into smaller ones.

We won't have to deal with the old massive "hash1map.csv" file, we won't have to look for duplicated hashes... etc.

We can disable certain mods by just by moving its csv file to the "disabled" folder.

**EDIT 2/20/2015**The hashmaps to SeeD Reborn and Tripod have been updated! These updates should fix any current missing textures issue!Spanish and French SeeD Reborn versions added!Spanish and German Tripod versions added!*****************

To-do list:

Improving the hashing algorithm to be faster

Reducing collisions to zero (or nearly zero) with a new hashing algorithm

Redesigning the texture caching system to greatly speedup the whole system

Take a new approach in handling native game's textures so we can separately use 128x128 texture objects

To provide a better debug system, instead dumping the textures by random numbers.

Known issues:

The game crashes when using Squall's limit breaks around some enemies (especially Tonberry in the Centra Ruins) while both RebirthFlame and LunarCry are enabled. Fixed...? I have not been able to replicate this crash since using 2.04. While I never isolated the cause of the crash in earlier versions, I believe 2.04 to have fixed the problem. If this is not the case, please let me know.

If the cache has been full and you've been playing for some time without seeing any text (dialog, menus, etc), the cache will dispose of the high resolution font textures and you will start to see text with mixed high-res/low-res characters. Fixed! The persistent textures feature should allow these textures to be kept in the cache indefinitely (see "What's new?").

Some users are experiencing random crashes when using Tonberry with Project Eden. If you are having this or any other issue please post here with details so I can look into it. Until more is known about the crash, my best advice would be to save frequently. Fixed! This exception was caused by memory overflow errors; make sure your cache_size in \tonberry\prefs.txt is 250 or less.

If someone is having trouble with it, please post it here and we will try to resolve it.

Thanks to Mcindus for helping me with the testing and...Thanks Mavirick for your interest and helping with the new hashing algorithm joining the development!Thank you Omzy for making original Tonberry, changing FF8 graphical modding forever

*For future modders who are hashing textures, please keep or upload a copy of the debug output textures themselves. If the hash algorithms change, this hashing will have to be re-done and it will be much easier if we have all of the original dumps.*

I'm so glad you posted this! I know that everyone really wants a new release with a better hashing system, but until that work is completed, we really need to get people using this!Also - I can't imagine not using the new folder hierarchy. It makes the hashing and modding process so much cleaner and stops us from having to keep re-writing over our old hash1map.csv file - especially if we are heavily modding the game and have custom hashmaps.

In honor of this release, I am going to post the hashmap files for all of the mods currently available. I will be updating this list as I go!

TURN OFF THE STEAM OVERLAY TO PREVENT CRASHES!!

Hashmaps:Put these in (/steamapps/common/FINAL FANTASY VIII/tonberry/hashmap)

*For future modders who are hashing textures, please keep or upload a copy of the debug output textures themselves. If the hash algorithms change, this hashing will have to be re-done and it will be much easier if we have all of the original dumps.*

Nice to see things moving! For those of us who have Tonberry and other mods installed, should we just uninstall them and reinstall this?

And speaking of csv files, it should be relatively easy to add the correct codes and make a new file?

You doesn't have to uninstall any mod. Just overwrite the old Tonberry installation. Then split your current hash1map.csv into several, smaller ones and put them in the "hashmap" folder. Or you can also download Mcindus' .csv files:

Do you have to install Tonberry v1.5 first to get the collisions and hash2map and objmap to work properly? I'm just wondering if this is stand-alone, or dependent on the last release.

I didn't do anything with the hashing system. We still have all the same hashes. That means that you can use Omzy's ones (maybe I should post them in the first post, thanks Mcindus). But you don't have to install Tonberry 1.5 first. Just install Tonberry 1.6 and then copy the collisions, hash2map and objmap.

I didn't do anything with the hashing system. We still have all the same hashes. That means that you can use Omzy's ones (maybe I should post them in the first post, thanks Mcindus). But you don't have to install Tonberry 1.5 first. Just install Tonberry 1.6 and then copy the collisions, hash2map and objmap.

For some reason, the hashcodes that have special exceptions seem to be messing with how Tonberry works with this new file structure. I rearranged the hashes for SeeD Reborn and Tripod and I think these should work better and cause less glitches in missing textures. Check my post with the links for updates!

For some reason, the hashcodes that have special exceptions seem to be messing with how Tonberry works with this new file structure. I rearranged the hashes for SeeD Reborn and Tripod and I think these should work better and cause less glitches in missing textures. Check my post with the links for updates!

Hahaha, today is 19th, not 13 bro. Tell me what hashcodes are giving you trouble and we'll se what can we do.

And about hashing system, for now I've tried three more algorithms, everyone of them being almost equally inefficient as Omzy's original one, despite of being clearly faster (I even applied loop unrolling techniques, redesigned the algorithm to fuse several looping functions...). I'm starting to think that the real bottleneck is the UnlockRect function. That function is the one that actually replaces the original game's texture with our modified one. I'm running out of time, I have to start a new work and won't have time for this for a while.

If anyone can take a peek to the function (look at Omzy's thread, there's the src) and think with me, just PM me or post it here and we'll talk about it more carefully.

For some reason, the hashcodes that have special exceptions seem to be messing with how Tonberry works with this new file structure. I rearranged the hashes for SeeD Reborn and Tripod and I think these should work better and cause less glitches in missing textures. Check my post with the links for updates!

thank you mcindus, card problem gone but after tonberry 1.6 now I've this sort of problem

That seems to be some kind of collision between textures... I need to work on that too. Do me a favor please: put all your hashes in a single file ( into the hashmap folder, but paste them in a single file, call it as you wish ), and then move all the other files to the "disabled" folder. Test if the problem still remains and report it here.

That seems to be some kind of collision between textures... I need to work on that too. Do me a favor please: put all your hashes in a single file ( into the hashmap folder, but paste them in a single file, call it as you wish ), and then move all the other files to the "disabled" folder. Test if the problem still remains and report it here.

in addition to collision.csv, objfile.csv and hash2map.csv coming from tonberry hashmap v1.3, I'vehorizonPackseedRebornTripodProjectEden

Do you want me to merge these 4 files in a single one? if so in what order?

Anyone adding hashes to their own files should check if the hashcode has been used already (which would cause a collision). The way I do this is compile all of the mods hashes into one "masterhashmap.csv" file that I only use as a test file. I then search my code against the other codes in the master hash file before making them official.

This might seem tedious, and it is. This is just one of the reasons why we need a new hashing algorithm so badly. I have to go back and do this to a few of my own files, as I had forgotten to do so about halfway through my summons and horizonpack mods.

I can't find the new codes for the GF or do you mean the post where you have initially posted them? Thanks for your effort, I'm a bit confused how to even find them in any way or so.

BTW, the "Tripod_GR_hm.csv" should be named "Tripod_DE_hm.csv". DE should be the international abbreviation for German. Like "ES" is for Spanish (from Espaniol). DE comes from "Deutsch".

Oh and can it be, that Tripod doesn't effect the in-game menu cards? I mean by pressing Triangle (Y for Xbox) and go to "Cards"?

Thanks! I fixed it to DE in google drive. The in-game cards are actually part of SeeD Reborn. Could you send me the debug information for those menu pages when/if you get a chance? Also - I got caught up in updating my other mod pages and forgot to post the GF's - they are there now! Enjoy!