About hashes - I have pirated game version but is not working. Unfortunately I do not know which algorithm is used. In game library i found 2 hash function djb2 and sdbm but no good results. Who knows?

My tool unpack the same files that QuickBMS, just without extensionsSkacikPL wrote:That's cool, i was curious about LOTF since a while.
I also found Quick BMS script which does about the same as your tool but extracts .dat files from the PKG.
I hope someone will try and chew through file formats, because at the bottom game seems to use pretty straightforward formats, plus anything in patch folder will override packages, so modding is a real possibility here.
Though, different question is whether there is a way to get what's inside unpacked files.Ekey wrote:My tool unpack the same files that QuickBMS, just without extensionsSkacikPL wrote:That's cool, i was curious about LOTF since a while.
I also found Quick BMS script which does about the same as your tool but extracts .dat files from the PKG.
I hope someone will try and chew through file formats, because at the bottom game seems to use pretty straightforward formats, plus anything in patch folder will override packages, so modding is a real possibility here.
You have PMmerlinsvk wrote:Can you upload/send me your modified .bin file? I don't have the game, so I can't test my script for recalculating the hash.
Code: Select all
#------------------------------------------------
# Lords Of The Fallen language *.bin CRC fixer
# Script version: 0.2
#------------------------------------------------
idstring "\xFC\x89\xC5\xA3" # just a test if the input file is a supported .bin file
encryption crc 0x01800063 "32 0 0 19 1 1"
get SIZE asize
xmath TXTSIZE "SIZE - 0x18" # 0x18 = size of header
log MEMORY_FILE 0x18 TXTSIZE # 0x18 = start of the data block
encryption "" ""
get NAME basename
get EXT extension
string NAME p= "%s.%s_FIXED" NAME EXT
get SIZE asize
log MEMORY_FILE2 0 SIZE # create copy of file into RAM
putVarChr MEMORY_FILE2 0x04 QUICKBMS_CRC long # write new CRC value on position 0x04
putVarChr MEMORY_FILE2 0x14 TXTSIZE long # write text block size
log NAME 0 SIZE MEMORY_FILE2 # write new file on disk
merlinsvk wrote:Use this script on language .bin file. It will create new file with "_FIXED" extension.Code: Select all
#------------------------------------------------ # Lords Of The Fallen language *.bin CRC fixer #------------------------------------------------ idstring "\xFC\x89\xC5\xA3" # just a test if the input file is a supported .bin file encryption crc 0x01800063 "32 0 0 19 1 1" get SIZE asize math SIZE - 0x18 # 0x18 = size of header log MEMORY_FILE 0x18 SIZE # 0x18 = start of the data block encryption "" "" get NAME basename get EXT extension string NAME p= "%s.%s_FIXED" NAME EXT get SIZE asize log MEMORY_FILE2 0 SIZE # create copy of file into RAM putVarChr MEMORY_FILE2 0x04 QUICKBMS_CRC long # write new CRC value on position 0x04 log NAME 0 SIZE MEMORY_FILE2 # write new file on disk
Rename it and put the fixed file into \patch folder.
Yes, exactly. That's padding. When I added one NULL byte after my test string, all missing text was back.Maybe we have to respect some bytes alignment when we extend/shorten strings.
Indeed it works as I supposed.merlinsvk wrote:Yes, exactly. That's padding. When I added one NULL byte after my test string, all missing text was back.Maybe we have to respect some bytes alignment when we extend/shorten strings.
But that means, you will need proper tool to recalculate all paddings and lengths. Or it will be nightmare to do it all manually.