Seems DOOM Eternal also uses the same IDCL format, no luck with wolfenstein2.bms though:
EDIT:
Ah, a friend managed to fix the script to work with Eternal! Only ~3 lines changed or so.
This seems to extract all the files fine, lang files are encrypted with same algo as DOOM 2016, no compression or anything, so they can be decrypted/encrypted with idCrypt tool:
https://github.com/emoose/DOOMExtract/t ... er/idCrypt(to use just rename blang to use bfile extension, then to decrypt run "idCrypt <path/to/bfile>.bfile strings/english.blang", edit the .dec file it makes, then to reencrypt to bfile run "idCrypt <path/to/dec>.dec strings/english.blang", and finally rename back to blang - change english to the filename of the blang file though of course!)
(EDIT: whoops used wrong file path in the examples above, make sure to use strings/english.blang instead of strings/english.lang or it won't decrypt properly!)Also attached a small app I made to work with the decrypted blangs (idLang, source included), converts blang <-> CSV for easier editing in Excel/Google Docs/etc.
CSV format is <keyHash>,<#key>,<value>, you should only modify the value part if you want the game to see your strings.
Value part can contain commas fine, only the first 2 on the line are used to split hash/key/value.
UTF-8 is used so hopefully any language should work fine... as long as the game also uses UTF-8 anyway.
Make sure to use the idCrypt tool I linked above to en/decrypt it before & after!
You can use "+com_loadlooseLanguages 1" launch parameter to let the game load loose blang files, you'll need to edit the EXE to give com_loadlooseLanguages the correct flags first though, otherwise game will ignore launch parameter:
Code: Select all
search for
CC CC CC CC CC CC CC CC 40 53 48 83 EC 50 48 8B 84 24 88 00 00 00 48 8B
change to
41 83 C9 10 53 EB 03 90 EB F6 48 83 EC 50 48 8B 84 24 88 00 00 00 48 8B
^ rest are unchanged
(this has a nice side-effect of unlocking ~98% of the games cvars for use in the dev console too
if you want the others, see
SunBeam's unlocker)
If you want to patch your game to always read from custom blangs:
Code: Select all
search
44 39 70 08 0F 84 A3 00 00 00
change to
44 39 70 08 90 90 90 90 90 90
So in total to make game use custom strings:
- Patch game EXE with a patch above
- Set launch param "+com_loadlooseLanguages 1" (without quotes)
- Unpack gameresources.resources
- Rename english.blang -> english.bfile
- Run "idCrypt english.bfile strings/english.blang"
- Run "idLang english.bfile.dec"
- Edit english.bfile.dec.csv
- Run "idLang english.bfile.dec.csv"
- Run "idCrypt english.bfile.dec.csv.bfile.dec strings/english.blang"
- Rename english.bfile.dec.csv.bfile.dec.bfile -> english.blang
- Move english.blang -> DOOMEternal\base\strings\english.blang
...and now it should use your strings
doometernal.bms:
Code: Select all
# Wolfenstein II: The New Colossus (0.3)
# script for QuickBMS http://quickbms.aluigi.org
# Edited for DOOM Eternal
comtype oodle
get EXT extension
if EXT == "texdb"
print "Error: %EXT% is no longer supported: sorting arrays takes forever and the data seems obfuscated or useless"
cleanexit
callfunction NEED_64 1
getdstring DUMMY 0x18
get FILES longlong
for i = 0 < FILES
get SOME_CRC longlong
get OFFSET longlong
putarray 0 i OFFSET
next i
get OFFSET asize
putarray 0 i OFFSET
print "sorting array, wait some minutes..."
sortarray 0
for i = 0 < FILES
getarray OFFSET 0 i
math i + 1
getarray SIZE 0 i
math SIZE - OFFSET
log "" OFFSET SIZE
next
else
# .resources, .pack and so on
idstring "IDCL"
get VER long # 12
get DUMMY longlong
get ZERO long
get DUMMY long # 1
get DUMMY long # -1
get DUMMY long
#get DUMMY longlong
get FILES long
get DUMMY_NUM long
get DUMMY2_NUM long
get FILES_2 long
get ZERO longlong
get DUMMY2 longlong
get NAMES_OFF longlong
get DUMMY4_OFF longlong
get INFO_OFF longlong
get DUMMY6_OFF longlong
get DUMMY7_OFF longlong
get DATA_OFF longlong
goto NAMES_OFF
get NAMES longlong
for i = 0 < NAMES
get NAME_OFF longlong
putarray 0 i NAME_OFF
next i
savepos NAMES_OFF
for i = 0 < NAMES
getarray NAME_OFF 0 i
math NAME_OFF + NAMES_OFF
goto NAME_OFF
get NAME string
string NAME % "$"
string NAME | "#"
putarray 0 i NAME
next i
# thanks toxic72 https://zenhax.com/viewtopic.php?p=27774#p27774
goto DUMMY7_OFF
for i = 0 < DUMMY2_NUM
get DUMMY long
next i
savepos DUMMY7_OFF
goto INFO_OFF
for i = 0 < FILES
get ZERO longlong
get DUMMY longlong # 1
get DUMMY longlong # -1
get TYPE_ID longlong
get NAME_ID longlong
get ZERO longlong
get ZERO longlong
get OFFSET longlong
get ZSIZE longlong
get SIZE longlong
get DUMMY longlong
get DUMMY long
get DUMMY long
get DUMMY longlong
get DUMMY long # ZIP related?
get DUMMY long # ZIP related?
get ZIP_FLAGS longlong # 0, 2, 4, 0x210002, 0x410002 and so on
get ZERO longlong
get FLAGS long # 2
get FLAGS2 long
get ZERO longlong
math TYPE_ID * 8
math TYPE_ID + DUMMY7_OFF
math NAME_ID + 1
math NAME_ID * 8
math NAME_ID + DUMMY7_OFF
savepos TMP
goto TYPE_ID
get TYPE_ID longlong
goto NAME_ID
get NAME_ID longlong
goto TMP
#getarray STR1 0 TYPE_ID
getarray STR2 0 NAME_ID
#string NAME p "%s/%s" STR1 STR2
string NAME p "%s" STR2
if SIZE == ZSIZE
log NAME OFFSET SIZE
else
if ZIP_FLAGS & 4
math OFFSET + 12
math ZSIZE - 12
endif
clog NAME OFFSET ZSIZE SIZE
endif
next i
endif
startfunction NEED_64
math TMP = 0x10000000
math TMP * 16
if TMP == 0
print "you must use quickbms_4gb_files.exe with big archives"
cleanexit
endif
endfunction