Logo

Stardew Valley Analysis Project

Text Corpus

Finding the Text

When seeking out the text of Stardew Valley, we first looked online to see if the game's full script was available. We could not find it, so we had to look within the files of the game itself. One of us downloaded the PC version of the game and began exploring its files. We found that all of the files that contained in-game text each had 12 or so different variations, one for each language option the game has. The English versions of these files were what we were looking for. However, not all of the text in the game is character dialogue, so we also had to figure out which of these files contained dialogue and which did not. This took some trial and error, but we eventually found most of files we needed. There are at least a few lines of dialogue we are aware of that we unfortunately could not find in the files. Some of these line were on the game's wiki, but there are still several that we have not found. These were the filepaths that contained most of the files with dialogue:

Stardew Valley > Content > Characters > Dialogue

Stardew Valley > Content > Data

Stardew Valley > Content > Data > Events

Stardew Valley > Content > Data > Festivals

Making the Files Readable

Almost all of the game files in Stardew Valley have a file type of XNB. When opened in a program like Notepad, Python, or Oxygen, these files contain encoded strings of letters and strange characters, and not anything legible.

XNB file

In order to access the files in a readable form, we had to download a program called XNBExtract and "unpack" the game files. Any XNB files we wanted to read had to be placed in the PACKED folder. Next, we had to run the UnpackFiles.bat file to unpack them. They were then generated as YAML files in the UNPACKED folder, which were readable. The YAML files could then be easily converted into the formats we needed for our project, which were .txt and .xml.

Packed Folder
Unpacked folder

Organizing the Files

As we were finding all of the files that contained dialogue, we sorted them into four folders:

Character Files

In Stardew Valley, there are a few different circumstances in which you can see character dialogue. The simplest way is to just talk to them. What they say will often depend on what day or season it is on the in-game calendar or how good your relationship is with them. Almost every character has their own file in the game that contains this type of dialogue. We ended up using 34 of these files. There are more characters than that in the game, but we wanted to focus our analysis on who we considered to be the main characters, which is anyone who the player can give gifts to.

Location Files

The other major form of character interaction in the game is during heart events. Heart events are scripted scenes that take place once the player has reach a certain friendship level with a character. The dialogue for heart events is sorted in the game's files by the locations that they take place in. Almost every area in the game has its own file that contains the dialogue for its respective heart events. We found 39 of these files in the game, and these were the ones that we ended up doing the most analysis on.

Festival Files

Characters can also be talked to at festivals. Festivals are special events in the game that take place on the same day each in-game year. Almost all characters attend these events and can be interacted with. The files containing festival dialogue were stored in their own folder in the game. Each of these files contain all of the dialogue that can be seen during the associated festival, and there were 8 of them in total.

Miscellaneous Files

Finally, there were the dialogue files that did not fit into any of the previous categories. This included dialogue such as characters' reactions to receiving gifts and the mail that they will send the player. We ended up finding 8 of these miscellaneous files in the game.


Secret Chicken Button

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.