- Joined
- Mar 7, 2013
- Messages
- 330
- Reaction score
- 2
can enyone enlighten...hm?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature currently requires accessing the site using the built-in Safari browser.
That's correct. If there's no existing .tcm file reader made in any programming language, you will need to understand the .tcm file's data structure.
I recommend 010 Editor for such things. You can do binary templates and structure the data by data types. And you also need a lot of patience.
By any chance is there a logic for packing and unpacking TDB (texture database) files?
By "logic", if you mean "Why they did this?", I think it's a common practice to pack or encrypt these files. Probably the developer's logic is to not let the end-users use them or access them.
Sometimes a texture database could contain more information than needed but vital for the texture alignment, such as vectors/polygons used in the map terrain, so my opinion would be, for security reasons, to encrypt such a database to prevent users altering them because not every game server is actually having the geodata of the terrain loaded into the memory.
I was asking about "logic" as in a standard algorithm to unpack TDB. So the answer is no, as it is up to the game developers to decide how TDB is made. Am I correct?
Absolutely. You're correct.
The algorithm should be in the game dlls/executables, most likely called when the TDB is loaded into the memory in some initialization methods at the start up.
What game is this actually?
An old MMO from 2003 named A3 Online (https://forum.ragezone.com/f98/). There was a TDB tool released built using C++ but source was never shared and hence was wondering if there was some standard way. The only downside of the tool was that, in order to repack the extracted DDS files, the files had to be of same size which is sometimes hard to retain after it was updated.
private static void DecodeULL(ref byte[] buffer, int size)
{
for (int i = 1, j = size - 1; i < size; i++, j--)
buffer[j] = (byte)(i ^ (size ^ (cryptTable[buffer[j - 1]] ^ buffer[j])));
}
private static void EncodeULL(ref byte[] buffer, int size) // It's not used in the source
{
for (int i = 1, j = size - 1 ; i < size; i++, j--)
{
buffer[i] = (byte)((((j & 0xff) ^ buffer[i]) ^ (size & 0xff)) ^ cryptTable[buffer[i - 1]]);
}
}