Jump to content

[TOOL] Don't Starve Speech File Editor (or Comparer, however you want to call it)


PanAzej
 Share

Recommended Posts

Hi Everyone,

So I came back to look at my old character mods, and well... There have been many game updates.

And the Wilson's default speech file grew exponentially.

It would be hard to keep track of every single new entry (since new entries have been added in various places, some were changed, and some removed...).

More than that, to actually come up with all the new strings would be a ton of work!

 

So, I figured "why not simplify/automate this"?

I created a new .NET Framework WinForms project and started working on a solution. I kept this little program to myself up to this point.

Not too long ago ChatGPT API was made public (and most importantly - for free!), so I decided to incorporate ChatGPT into my program.

 

And at this point, I think that this will be a great tool for a lot of modders who are not very creative writers, but love creating custom characters.

 

Introducing:

Don't Starve Speech File Editor!

(actual file name is SpeechFileUpdater.exe)

image.thumb.png.4d96544e6e2404052f0a953d544b0029.png

 

How to use this program:

1. Import the speech file of your choice from your local disk to table of your choice (from wide range of choices - the left table or the right table).

2. Harvest a ripe, freshly updated Wilson's speech file from game's files (Don't Starve Together\data\databundles\scripts.zip)

3. Load the Wilson's speech file into the second table.

4. Edit the file, copy keys, do whatever you must!

5. Export your edited speech file - from program's table, to your local disk path.

 

Buttons:

Filter - applies the filter written in text box on the left from the button's location (hides rows which don't match the typed string). Filter is always case-insensitive.

Clear Filter - un-applies all filters for the table, making all speech file entries visible.

Import - loads the LUA speech file from local disk into the table above the button. WARNING! This actually executes the LUA file you select. Don't launch anything weird or you might regret it! Editor tries to detect if the file contains anything malicious, but I'm not giving any guarantees it will actually protect your computer.

Export - collects data from the table above the button and exports it as a LUA speech file to chosen local disk path.

Mark differences - if you have both tables loaded, you can use this button to make the tool automatically compare and color-mark the differences (in comparison to the second table).

Copy missing keys - if you have both tables loaded, you can use this button to make the tool copy missing speech file keys (e.g. ACTIONFAIL.GIVE.SLEEPING) with empty values. After inserting, these new entries will be at the bottom of your current table. After you save and reload the file, they will be placed in "correct" places in the table (so, all around the place).

Settings - lets you turn off ChatGPT buttons, as well as modify the font for each table to your liking.

ChatGPT - lets you set your API Key, prompt, and randomness factor of the ChatGPT response. After you're set, press the green ChatGPT button in the table row you would like the chatbot to generate text for you (HTTP request timeout is 15 seconds).

 

Enjoy! Hopefully this will make some modders' lives easier.

 

GitHub repo:

https://github.com/JaroslawKargul/CSharp-SpeechFileUpdater

 

Zipped executable:

 

Don't Starve Speech File Editor v0.8.zip

Edited by PanAzej
updated the tool again with Unicode support
  • Like 4
  • Thanks 1
Link to comment
Share on other sites

2 hours ago, . . . said:

does this require ChatGPT or can be used without it too (like offline) just to see what quotes are missing from updated wilson speech file

You can disable ChatGPT entirely by using the "Settings" button.

It's just an option to write speech entries faster - if you don't need it, you can just use it as a comparer for speech files.

image.png.915664c2931b009178ddaf42a2b954cb.png

 

I have updated the tool again to fix a couple of issues, also I have cleaned up the source code a little bit.

I added a new feature in Settings - you can now specify the program to put empty speech lines at the bottom of the table upon file load.

 

I have created a new GitHub repository for the project, since its structure changed entirely:

https://github.com/JaroslawKargul/CSharp-SpeechFileUpdater 

 

And here's the new version of the editor (I'll update it in main post shortly):

Don't Starve Speech File Editor v0.7.zip

  • Like 1
Link to comment
Share on other sites

Having a bit of an issue importing my .lua speech file. (Its the one found in the basic character template for DST people use!)
Keeps saying that its failing to load the file. I'm unfortunately not a coder, so I have no idea what could be wrong with the code inside the file, besides maybe the fact I've already edited a good chunk of the Default Wilson Text:tm:. Apologies for reviving an old thread!

Link to comment
Share on other sites

For some reason, exporting speech files with the tool deletes the content of Abigail's description quotes and the announcement quotes for picking up a Carrat that doesn't belong to the player, at least for me. Tested with my character's speech file and the most recent one from Wilson and it does it consistently upon exporting.

Edited by Chesed
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...