Python Script that can Import and read .tcm files

Results 1 to 12 of 12
  1. #1
    Account Upgraded | Title Enabled! GMDeveloper1 is offline
    MemberRank
    Mar 2013 Join Date
    328Posts

    config Python Script that can Import and read .tcm files

    can enyone enlighten...hm?


  2. #2
    Proficient Member StingerOne is offline
    MemberRank
    Aug 2021 Join Date
    AltgardLocation
    160Posts

    Re: Python Script that can Import and read .tcm files

    You can probably find a module online to read the file, otherwise you will need to understand how the .tcm file is structured and what data needs to be read.

  3. #3
    C++ Developer zipper20032 is offline
    MemberRank
    Oct 2006 Join Date
    0x198837ADLocation
    663Posts

    Re: Python Script that can Import and read .tcm files

    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.

  4. #4
    Account Upgraded | Title Enabled! GMDeveloper1 is offline
    MemberRank
    Mar 2013 Join Date
    328Posts

    Re: Python Script that can Import and read .tcm files

    I'm no expert on making that kind of tool, I will do some research about 010 editor so I can read the file that contains the data of terrain. and replicate it to unity

  5. #5
    Programmer cyberinferno is offline
    MemberRank
    Jun 2009 Join Date
    127.0.0.1Location
    707Posts

    Re: Python Script that can Import and read .tcm files

    Quote Originally Posted by zipper20032 View Post
    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?

  6. #6
    C++ Developer zipper20032 is offline
    MemberRank
    Oct 2006 Join Date
    0x198837ADLocation
    663Posts

    Re: Python Script that can Import and read .tcm files

    Quote Originally Posted by cyberinferno View Post
    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.

  7. #7
    Programmer cyberinferno is offline
    MemberRank
    Jun 2009 Join Date
    127.0.0.1Location
    707Posts

    Re: Python Script that can Import and read .tcm files

    Quote Originally Posted by zipper20032 View Post
    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?

  8. #8
    C++ Developer zipper20032 is offline
    MemberRank
    Oct 2006 Join Date
    0x198837ADLocation
    663Posts

    Re: Python Script that can Import and read .tcm files

    Quote Originally Posted by cyberinferno View Post
    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?

  9. #9
    Programmer cyberinferno is offline
    MemberRank
    Jun 2009 Join Date
    127.0.0.1Location
    707Posts

    Re: Python Script that can Import and read .tcm files

    Quote Originally Posted by zipper20032 View Post
    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.

  10. #10
    C++ Developer zipper20032 is offline
    MemberRank
    Oct 2006 Join Date
    0x198837ADLocation
    663Posts

    Re: Python Script that can Import and read .tcm files

    Quote Originally Posted by cyberinferno View Post
    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.
    I found the encrypt keys for TDBs.

    Seems like TDBs are containing only .DDS(Textures) files?

    https://ibb.co/Lt4WFk6


    And also the C# source code for decoding/encoding:

    https://www.mediafire.com/file/1xoll...r_GUI.zip/file

    Code:
    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]]);
      }
    
    }
    Last edited by zipper20032; 23-07-22 at 12:12 AM.

  11. #11
    www.m.me/ExcelsiorSoftLLC master_unknown is offline
    MemberRank
    Oct 2004 Join Date
    HellLocation
    1,246Posts

    Re: Python Script that can Import and read .tcm files

    If you're creating a map for Tantra Online in Unity, would it save you a lot of time just to remake it in Unity ?

  12. #12
    Novice applus is offline
    MemberRank
    Jun 2022 Join Date
    2Posts

    Re: Python Script that can Import and read .tcm files

    Try to re-make tantra online in UNITY , as what master_unknown said.



Advertisement