so, decoding strings were similar as in the Witcher 2.
Code:
string_key = magic >> 8 & 0xffff
for (i = 0; i < strings_count; i += 2) {
char_key = ((string_len + 1) * string_key) & 0xffff
string_buffer[i+0] ^= ((char_key >> 0) & 0xff)
string_buffer[i+1] ^= ((char_key >> 8) & 0xff)
string_key = ((string_key << 1 ) | (string_key >> 15)) && 0xffff
}
Lua implementation
is here. test output:
Code:
>lua inspect_w3strings.lua DLC1\content\en.w3strings . debug
magic: 0x43975139 -> 0x79321793
block 1, count = 11 132 bytes
block 2, count = 11 88 bytes
block 3, count = 331 662 bytes
-- block 2 content ----------------
1: 0x13C88E93 0x00109992 <-- second column — some id/crc/hash
2: 0x1F2AC3DE 0x001083f6 <-- third column — string id, unique for the entire localization
3: 0x474BF324 0x001083ef
4: 0x4C4FF12E 0x00109994
5: 0x519C8F13 0x00109996
6: 0x59FEAB16 0x00109991
7: 0x692198D8 0x0010999f
8: 0x736E017E 0x00109390
9: 0xB1BB516D 0x00109997
10: 0xC0EB3DE0 0x00109993
11: 0xFC5E14AB 0x001083f7
-----------------------------------
sorting...
sorted.
done!
I do not know what to do with the second data block. also I do not know how to get linking between
"item_category_light_armor_description" and "0x00109390" :(
ready strings from english part of dlc1:
Code:
0x001083ef ## Saddlebags allow you to carry more weight.
0x001083f6 ## A horse equipped with blinders won't panic as easily.
0x001083f7 ## A horse equipped with a saddle won't tire as easily.
0x00109390 ## Light gear. Increases Armor and Stamina regeneration.
0x00109991 ## Temerian Armor
0x00109992 ## Temerian Boots
0x00109993 ## Temerian Gauntlets
0x00109994 ## Temerian Trousers
0x00109996 ## Temerian Horse Blinders
0x00109997 ## Temerian Saddle
0x0010999f ## Temerian Saddlebags