Browsing/Finding Character's Dialogue

+
Browsing/Finding Character's Dialogue

I know how to extract the w3speech files and convert wem to ogg but they're all named with hashes like '0x00080f0f.ogg' which makes finding specific dialogue virtually impossible.

Is there a way to find all dialogue spoken by a character, with the coinciding file name? There must be a file that defines what lines are spoken when, right?
 

sv3672

Forum veteran
I know how to extract the w3speech files and convert wem to ogg but they're all named with hashes like '0x00080f0f.ogg' which makes finding specific dialogue virtually impossible.

Is there a way to find all dialogue spoken by a character, with the coinciding file name? There must be a file that defines what lines are spoken when, right?

For the 32-bit string IDs, you can check the w3strings files, which can be converted to text format with Lua scripts, or opened and edited with tools like Sarcen's W3StringEditor. If you need actual dialogue trees, I have a program that writes them to a text file (it requires all the .w2scene files unpacked, and all the .w3string files converted to UTF-8 format and concatenated; it also supports Witcher 2 format .w2scene files, here is a sample of its output) - I can post a link to a file with the dialogues from the entire game, optionally with the hexadecimal string ID added to each line.
 
Last edited:
For the 32-bit string IDs, you can check the w3strings files, which can be converted to text format with Lua scripts, or opened and edited with tools like Sarcen's W3StringEditor. If you need actual dialogue trees, I have a program that writes them to a text file (it requires all the .w2scene files unpacked, and all the .w3string files converted to UTF-8 format and concatenated; it also supports Witcher 2 format .w2scene files, here is a sample of its output) - I can post a link to a file with the dialogues from the entire game, optionally with the hexadecimal string ID added to each line.

I looked at the attachment, other than missing the ID/hash for the corresponding sound that's pretty much exactly what I need, just for all dialogue spoken in the game. If you're willing to share the program I could do it myself, otherwise I would greatly appreciate it if you could post the file as you said.

Thanks so much for your help!
 

sv3672

Forum veteran
It includes the complete dialogues (excluding DLCs) with and without the string IDs, and all non-DLC w3strings files converted to text format.

The program still needs some polishing and improved usability, but I may share that as well later.

Edit: it is now available in this post. The text files linked earlier have been deleted because they contained spoilers.
 
Last edited:
I still have it, but I am not sure if there has been a newer version released since then.
 
I still have it, but I am not sure if there has been a newer version released since then.

I have not seen any evidence of a newer version (just a Chinese version which is of no use to me at all), so if you can email me the version you have, that would be fantastic. (and yes, it's the one by Sarcen that i am after)
 
It is attached, together with the version of the Lua utilities I have - I made a couple of fixes to some of them, in particular, the w3strings reader failed on certain files, that is now fixed. Not included, but I also wrote various small utilities for decompressing files not supported by unpack_potato.lua, unpacking Witcher 2 .dzip files, converting w2strings files to text format, and - as posted above - dumping dialogue trees from W2 and W3 .w2scene files.

Edit: an updated package with more utilities has been posted here.
 

Attachments

  • w3utils.zip
    22.3 KB · Views: 269
Last edited:
Update: also added the source code of the dialogue utility, however, as explained above, its usability could be improved: w3utils.zip
More utilities may be added or updated later.
 
Last edited:
Edit: the above package has been updated with a new utility called "w3unpack.exe", the download link is the same as before. This program can be used for the following:

- extract files from bundles (TW3) or DZIP files (TW2), using a name filter specified by the user
- convert .w2strings or .w3strings files to text (UTF-8 ) format, similarly to inspect_w3strings.lua
- the above can be done recursively on directory trees, all bundle or localization files are processed in alphabetical order
- dump dialogues from .w2scene files (TW2 or TW3) in any of the supported languages
- dump the contents of CR2W files in Lua format, similarly to the output of inspect_cr2w.lua (not all variables are supported, however, only these types: Bool, Int32, Uint/Uint32, Float, String, CName, LocalizedString, element pointer, array of element pointers). When used with the -l option, localized strings are also written as comments in that language

Examples:

w3unpack -d -l pl "F:\SteamLibrary\steamapps\common\The Witcher 3" all_dialogues_pl.txt
w3unpack -w -l en "F:\SteamLibrary\steamapps\common\The Witcher 3" all_strings_en.txt
w3unpack -u -i /q310_ -s .w2scene "F:\SteamLibrary\steamapps\common\The Witcher 3" final_preparations_scenes

Running the program without any arguments prints the usage. Note: this version may still be buggy, so use it at your own risk.

Edit for version 1.30: there have been some changes to the w3strings and CR2W formats in this patch, which break the tool, I will fix that soon.
 
Last edited:
Another update: fixed some bugs in w3unpack.exe, and improved the CR2W to Lua mode (-c).

Edit: already found another bug to be fixed later: backslashes are not escaped in Lua strings.
 
Last edited:
I don't mean to stray off topic here, but has anyone looked at some of the string files in the latest patch? I found a lot of stuff regarding Blood and Wine in there.
 
Last edited:
I don't mean to stray off topic here, but has anyone looked at some of the string files in the latest patch? I found a lot of stuff regarding Blood and Wine in there.

Yes, there is, but it is apparently not allowed to post that on the forum. I even deleted the files linked from an earlier post, because they included parts of the "leaked" strings. But with the utilities from just a few posts above, anyone can view them, as well as with other .w3strings related tools available on Nexus. However, it seems that patch 1.12.1 actually removed much of that stuff from the localization files, maybe the developers are now aware of the issue; therefore, those looking at the latest version of the files have missed most of the interesting bits. :)
 
Last edited:
There is an updated version now for patch 1.30, since the previous one was broken by the increased version number in w3strings and CR2W files. It also includes some new features and fixes: sounds.cache and w3speech files can now also be extracted (use ww2ogg and revorb to convert the AudioKinetic Wwise files to Vorbis format), and the CR2W to Lua conversion supports a few more types.

Update: fixed a bug that caused only half of the files to be extracted from w3speech files.
 
Last edited:
Hello, everyone.

I'm using Scarcen's editor to amend a mutation's description for one of my mods; however, placing the altered en.w3strings file in my mod folder replicating the path from the original game's file won't work.

Do I understand correctly that the only way for this to work is to require my mod's users to overwrite the original w3strings file with mine?
 
Hello, everyone.

I'm using Scarcen's editor to amend a mutation's description for one of my mods; however, placing the altered en.w3strings file in my mod folder replicating the path from the original game's file won't work.

Do I understand correctly that the only way for this to work is to require my mod's users to overwrite the original w3strings file with mine?
Theoretically you just need a MOD that contains the "w3string" file which replaces that specific "key_string" using a different "name_space(ID)".

Do you know the key_string for what you want you want to change? If you do just create a file that changes this and add to the mod.
The w3string file goes inside the "content" folder of the MOD or DLC.

Btw, you shouldn't have to replace the original game's file and unless you have ALL the original strings you might be breaking something for doing this.
 
Hi CAPA,

thank you.

So, string ID I want to change is 1188303. I want to remove the last bit of the text from it.

So my understanding is that I should create a brand new file that contains only this string as modified by me, and put it in the content folder of my mod without trying to recreate the path to the original w3strings file?

The way I did it was to use the String Editor to modify the original game file, which would then include all strings with my modification on 1188303; I saved, and tried to recreate the path to the original file in my mod's folder. However, my modification did not affect the game at all.
 
Hi CAPA,

thank you.

So, string ID I want to change is 1188303. I want to remove the last bit of the text from it.

So my understanding is that I should create a brand new file that contains only this string as modified by me, and put it in the content folder of my mod without trying to recreate the path to the original w3strings file?

The way I did it was to use the String Editor to modify the original game file, which would then include all strings with my modification on 1188303; I saved, and tried to recreate the path to the original file in my mod's folder. However, my modification did not affect the game at all.

Yes.

As you might know, strings in the file is comprised by 4 columns: ID, key_hex, key_string and the text how you want to appear ingame.

The thing is you need to know the column of the middle the "key_hex" or "key_string" which are basically the same, but the hex is the key_string encoded after converted to w3strings.

When you decode the w3string file you will have the key_hex (second column of the csv) and in this case i guess this is the one you'll have to use

Also you don't have to use 1188303 as ID, rather you may use another ID space. Like 211XXXX001(to 999) replace the XXXX for some number that won't conflict with existing mods. Is conventioned to use the nexus ID of your mod.

So you have to create a csv file using a line that contains the key_hex, like:
211XXXX001|<hex matching the one from the decoded file>|| Your Text

Once you create the csv and the encode it creating the w3string, name it en.w3string(if you have your game language set to english) put this to the content folder of your mod.

I think it will work, not sure though :D
 
Top Bottom