PanAzej Posted March 18, 2023 Share Posted March 18, 2023 (edited) 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) 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 March 21, 2023 by PanAzej updated the tool again with Unicode support 4 1 Link to comment Share on other sites More sharing options...
mathem99 Posted March 18, 2023 Share Posted March 18, 2023 As a writer, this tool is a must-have. Great work, PanAzej! 1 Link to comment Share on other sites More sharing options...
. . . Posted March 21, 2023 Share Posted March 21, 2023 (edited) 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 Edited March 21, 2023 by . . . Link to comment Share on other sites More sharing options...
PanAzej Posted March 21, 2023 Author Share Posted March 21, 2023 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. 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 1 Link to comment Share on other sites More sharing options...
Rickzzs Posted March 21, 2023 Share Posted March 21, 2023 Looks like it does not support unicode. Chinese characters are messed up. Link to comment Share on other sites More sharing options...
PanAzej Posted March 21, 2023 Author Share Posted March 21, 2023 3 hours ago, Rickzzs said: Looks like it does not support unicode. Chinese characters are messed up. Thanks for the response. The issue was LuaInterface module I was using, it did not support Unicode. I have switched to Neo Lua module, and updated the tool with Unicode support: Don't Starve Speech File Editor v0.8.zip 3 Link to comment Share on other sites More sharing options...
Wonderlarr Posted June 25, 2023 Share Posted June 25, 2023 Thanks for the tool! I don't really like using AI to generate anything even remotely creative, but it's still quite useful for updating old speech files! Link to comment Share on other sites More sharing options...
ughygygyg Posted July 29, 2023 Share Posted July 29, 2023 Sandly this program can't open .po files, that need to translate to another language for localization mods Link to comment Share on other sites More sharing options...
m0th_hours Posted October 13, 2023 Share Posted October 13, 2023 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 More sharing options...
Pyrogoldfish Posted November 3, 2023 Share Posted November 3, 2023 I'm very glad you decided to share this with everyone! Works beautifully, thank you so much!! Link to comment Share on other sites More sharing options...
Chesed Posted November 6, 2023 Share Posted November 6, 2023 (edited) 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 November 6, 2023 by Chesed Link to comment Share on other sites More sharing options...
Deiltal Posted January 1 Share Posted January 1 I want to use this tool as a speech translator to provide translation for mod characters. I wonder if it can be achieved? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now