New Discord Server for Harvest Moon / Story of Seasons Translation Projects

It’s recently come to my attention that some other projects are now using the tutorials I’ve written on this blog. This was always my intent and the primary reason why I’ve been documenting all of my findings while researching AWL.

I’ve now created a [Harvest Moon Translations Discord] where people can collaborate and discuss translating AWL, as well as other HM/SoS games into various languages.

I hope that having a dedicated server will offer people a common place to help work on these projects, and get in touch with others who might have helpful expertise, whether it’s knowing another language, or technical knowledge about the game in question.

Currently I’ve created channels for a few AWL, FoMT, and DS projects, but more will be added as they come up.

If you or someone you know would be interested in helping translate some of these games, feel free to [join]!

Save File Checksums

After some research, we’ve determined that the save files for A(n)WL use a checksum to verify data integrity.

If the save data is modified and this checksum isn’t accounted for, a data corruption error will be presented when attempting to load the data.


This checksum is a 4-byte (32-bit) value stored at 0x40

Note: save files can be when using Dolphin emulator are located in “C:\Users\{USER}\Documents\Dolphin Emulator\GC\USA\Card A\”

The value can be calculated by taking all of the data after the checksum position, i.e., 0x44 to the end of the save file, and then calculating the checksum using the CRC32_bzip2 algorithm.

I’ve found that the easiest way to accomplish this is by saving the save data (from 0x44 onwards) to a seperate file (in this case, I’ve named it as hashtest.bin)

Once created, the save data (hashtest.bin) can be analyzed using a supported tool such as Jacksum. For Jacksum, I used the following hash command:

java -jar jacksum.jar -a all -F "ALGONAME{i} (#FILENAME) = #CHECKSUM{i}" hashtest.bin

Then just look at the output of the crc32_bzip2 hash and voila! It should match the previous 0x40 checksum value.


Using this knowledge, we can now edit various aspects of the save file including:

  • Character names
  • Animals
  • Items
  • Buildings (e.g. milking room, seed maker)
  • Money

The process for making these edits should be fairly straightforward

1. Extract the save data from your GCI file (from 0x44 onwards) and save it to a seperate file (e.g. hashtest.bin)

2. Find the value(s) you want to edit (e.g. money) and edit them

In this case, my money value was previously 999999 (hex = 0F423F). The value seems to be stored at 0x1962e (in hashtest.bin). We’re gonna try changing this to 123456 (hex = 01E240).

3. Calculate a new checksum of your save data using Jacksum (as shown above) by analyzing your seperate save data file (i.e. hashtest.bin)

CRC32_bzip2 checksum of our new data (money = 123456) is 34efd17e

4. Open your original GCI, overwrite with your new checksum at 0x40

5. Overwrite the save data fro 0x44 onwards with your newly edited data (copied from hashtest.bin)

6. Save your new GCI file

Voila!

Update

As an alternative to Jacksum, you can actually calculate the checksum right from within Hex Editor Neo (if you’re using a different hex editor, you’ll need to follow the Jacksum directions above).

Simply go to View -> Tool Windows -> Checksum

Then add, select the “Add Algorithm button to create an algorithm with the following settings:

  • CRC-32
  • Initial Value: ffffffff
  • Polynomial: 4c11db7
  • XOR Out: ffffffff
  • Uncheck Reflection In
  • Uncheck Reflection Out
  • Name: CRC-32/BZip2

Once saved, simply highlight the affected data in your .gci save file (i.e. 0x44 to the end of the file). Then, select the “Selection Only” option from the Checksum tool window, and the appropriate value should be generated in the CRC-32/BZip2 row.

Voila! You can now modify any data directly within the GCI file, regenerate the checksum (by selecting data from 0x44 to the end off the file), and then insert the new checksum (at 0x40).

Special thanks to James for figuring this out.

Cutscenes / Trigger Events

Cutscene / Event Files

After a bit of digging into the file formats of A Wonderful Life, I was able to figure out which files contain data for cutscenes.

The files in question are .sb script files. The versions of these files utilized in-game are compressed using CLZ-compression, resulting in .sb.clz files.

There are a few places where these files can be found.

  • .sb debug scripts at disc:/test/Script/
  • Unnamed CLZ-compressed versions of the above debug scripts (i.e. .sb.clz files) contained in disc:/test/Script/test.arc
  • Unnamed CLZ-compressed chapter-specific events (e.g. romance cutscenes, son cutscenes) in disc:/Chapter#.arc
  • Unnamed CLZ-compressed common events (i.e. can be triggered in any chapter) in disc:/Common.arc

The unnamed Chapter and Common events can be determined by looking at the legend in disc:/test/text/EventOCC.txt. As an example, here is disc:/Chapter2.arc, with it’s corresponding event legend.

Replacing Events with Debug Scripts

Using this knowledge, we can compress some of the debug scripts using Sukharah’s CLZ Tool, then can import them into the Chapter or Common files, replacing a previously-defined event. This is done by right-clicking the intended event in the destination .arc file, then selecting “Replace” from within Wexo’s Toolbox. Then, when the game wants to trigger the normal event, it will trigger the newly replaced debug event instead.

Here is an example where I replaced 8009_link.sb.clz in disc:/Common.arc with the (compressed) debug script 0000_Teleport.sb.clz.

0000_Teleport.sb loading instead of 8009_link.sb

The main downside of the debug scripts is that almost all of the debug text is untranslated Japanese. The above example was translated by myself by modifying debug.mes.

Here is an example using the default untranslated dialog.

Accessing Galen/Nina’s house during Chapter 2

Heart Event Cutscenes

While I could manually extract every bachelorette cutscene from Chapter1.arc and import it to replace 8009_link as above, this would be fairly time consuming. Fortunately, there’s another way.

The test script folder contains a handy script, Launcher_Love.sb.

When compressed, imported, and triggered, this script will open up a menu, from which you can select any of the possible bachelorette cutscenes including heart events, matchmaker scenes, reverse proposals, and successful marriage events.

Here’s an example loading one of Muffy’s heart events.

Muffy Heart Event 4

Note that these cutscenes can only be loaded during Chapter 1. Attempting to load them in any of the later chapters will result in a crash.

Tutorial: How to Use xDelta Patches

Introduction

For any releases of the Proud Life mod, I’ve decided to use xDelta patches.

These patches work by creating a comparison of what was changed between an original dumped ISO and the modded ISO, and only saving the changed bits.

Requirements

To use the mod from an xDelta patch, you’ll need:

  • A dumped ISO of the game you want to mod
    • Harvest Moon: A Wonderful Life for the lesbian mod
      • md5 = 1b25d35660f163ebdc97165708b22f94
    • Harvest Moon: Another Wonderful Life for the gay mod
      • md5 = af4bc131320ca06ab198202db78f3b06
  • xDeltaUI (Windows) or MultiPatch (macOS)
  • One of the patches from the Downloads page

Applying an xDelta Patch

Applying a patch to your dumped game is fairly trivial.

1. Launch xDeltaUI or MultiPatch
2. Select your patch (.xdelta file), source file (dumped .iso file), and where you’d like to put the output (patched) file.

3. Hit the “Patch” button and voila!

Congrats! You now have a working copy of Harvest Moon: A Proud Life (or Another Proud Life)!

Dialog Editing with Sukharah’s MES Unpacker

Introducing Sukharah’s MES Unpacker

After months of painstakingly editing dialog using a combination of Harrison’s MES Editor, Hex Editing, and Spreadsheets, I’m happy to say that we now have a much easier method for editing dialog (mes) files from Harvest Moon: A Wonderful Life and Another Wonderful Life.

Sukharah, the brilliant individual behind the CLZ Compression Tool, has created a new tool for manipulating MES files. This tool has been aptly named the MES Unpacker (although it can also repack).

Compiling the MES Unpacker

Prerequisites

The tool is released as source code, meaning you’ll need to have a C++ compiler such as g++ (included with MinGW, which can be installed using the mingw-get-setup.exe installer from the MinGW releases page.

Once you have MinGW/g++ installed, it’s just a matter of downloading the MES Unpacker repository, and building the program using your terminal of choice.

Compilation Options

There are 3 main modes you can use while compiling the MES unpacker.

The normal mode uses a fairly basic compilation command:

g++ -o mes.exe -std=c++11 -iquote header "source/main.cpp" "source/MES.cpp"

The next mode, known as ddupe, will allow the app to group sequential duplicate messages together in the final repacked .mes file. This is needed for certain dialog files (e.g. muumuu.mes) that approach the 73,376-byte file size limit. Attempting to load a .mes file larger than this in-game will result in a crash.

g++ -o mes_ddupe_seq.exe -DDUPE -std=c++11 -iquote header "source/main.cpp" "source/MES.cpp"

The final mode, known as ddupe2, will group together all duplicate messages from anywhere in the dialog file. This breaks compatibility with Harrison’s MES Editor, but should otherwise work in-game. It’s not advised to use this option unless you’re unable to get below the 73,376-byte limit after using ddupe.

g++ -o mes_ddupe2_nonseq.exe -DDUPE2 -std=c++11 -iquote header "source/main.cpp" "source/MES.cpp"

Precompiled MES Unpacker (Windows 10 only)

I have also created a compiled version. The limitation of this precompiled version is that it’s limited to Windows 10 systems, since that’s the type of system I compiled it on.

[Download]

mes.exe – Standard compilation

This version is recommended for almost all .mes editing use cases

mes_ddupe_seq.exe – Compiled with -DDUPE flag

This version is recommended for certain large .mes files that approach the 73,376-byte filesize limit.

e.g. muumuu.mes, son_talk.mes

It’ll group any sequential (appearing directly after one another) duplicate dialog messages together in the final output .mes file.

mes_ddupe2_nonseq.exe – Compiled with -DDUPE2 flag

This version is experimental. It’ll group any duplicate messages from anywhere in the dialog file.

This is only recommended if you’re having difficulty outputting a .mes file below the 73,376-byte file size after using mes_ddupe_seq.exe, which is possible if you plan on editing Muffy’s dialog (muumuu.mes).

Using Sukharah’s MES Unpacker

MES to TXT

Once you’ve compiled or downloaded the MES Unpacker, using it is fairly trivial.

Simply place your .mes file (e.g. badog.mes) in the same folder as your compiled program. Note this folder must also include the tool’s “data” folder and it’s contents.

Then, launch a command prompt in that folder. The simplest way to do this is by typing “cmd” in the navigation bar and pressing Enter.

From there, just type in the appropriate unpack command.

mes_program unpack file.mes file.txt

Where mes_program is either mes, mes_ddupe_seq, or mes_ddupe2_nonseq and file.mes is your dialog file.

Unpacking badog.mes and muumuu.mes using their respective builds.

Editing the TXT files

After you’ve run the commands, you should have some new text files in your folder.

You can edit these using any tool you like. Personally, I prefer Notepad++.

For this example, we’ll be replacing one of Dr. Hardy’s lines (badog.mes).

Simply locate your desired line in the appropriate text file, and edit it at will. Note that a single line (not counting actions like {PAUSE}, {WIPE}, {SOUND}, etc.) can only be 21 characters (letters) long. Anything beyond that will cause issues when displaying in-game.

TXT to MES

Once you’ve edited and saved the txt file, simply run the appropriate pack command.

mes_program pack file.txt file.mes

Where mes_program is your build of the tool, and file.txt is your edited dialog text file.

This will overwrite the mes file in your folder

You can then put the newly packed mes file back into your ISO or game folder, replacing the previous one.

From there, the game should load your new dialog in place of the old one.

And voila! You’ve successfully edited dialog.

Tutorial: How to Manage Dialogue Indexes with Excel

Background Info

One issue with how A Wonderful Life manages it’s dialogue is that it sorts each dialogue entry by indexes.

Each index value is a 4-byte hex value (also known as a double-word) that shows the place of the message in the file.

As an example, here’s nami.mes (dialogue for Nami):

In this case, Message #1 would be located at 0x000008d8, Message #2 would be located at 0x0000091c, etc.

This means, when we modify a dialogue entry manually in hex (e.g. substituting a word for a longer or shorter word), we need to fix the index accordingly.

Using the nami.mes dialogue file as an example, lets try changing the word “Blue” (hex “800c 80e3 80ec 80dc”) to “Purple” (hex = “801a 80ec 80e9 80e7 80e3 80dc”)

This is what we’ll get if we don’t change any of the indexes. Note that the {EOM} portion of the message gets pushed over to the next message

This can lead to a lot of deformed dialogue later on in the file.

Adjusting Indexes (the long way)

My initial method of fixing indexes was to go and manually fix the index of each of the following entries in the dialogue file.

In the above case, I need to increase every single index by a hex value of 4 (e.g. 0000091c + 4 = 00000920)

This can become extremely tedious and time-consuming, considering that some dialogue files will have hundreds of indexes you’d need to fix in this manner. But it works, and doesn’t require anything except a hex editor.

Adjusting Indexes (the Excel way)

An easier method of fixing indexes is to use a spreadsheet.

Requirements

Instructions

1.Open your dialogue file (e.g. nami.mes) in your hex editor.

2. Set it to use “Big Endian” byte order and group by “Double Words”

3. Select all of the indexes (starting at 0x00000008) and Copy

4. Open Notepad++ and paste the copied values
5. Open the Replace window (Search -> Replace…”
6. Set it to find ” ” (without quotes) and replace it with “\n”
7. Set the Search Mode to “Extended”
8. Click on “Replace All”

Replace all spaces ” ” with newline “\n”

9. Select your nice new list and Copy

10. Open up a blank spreadsheet in Excel
11. Select a cell and click Paste -> Use Text Import Wizard

12. The first 2 windows don’t really matter, but on the 3rd window, you’l want to make sure you select “Text” formatting.

13. Feel free to adjust your spreadsheet at this point. I added a row so I could keep track of what each column is, as well as a “Message #” column.
14. In a new column (beside your column of pasted indexes), type the following formula: =DEC2HEX(HEX2DEC(B2)+HEX2DEC(0),8)
Note, B2 is my first index value in my spreadsheet.

15. Select the bottom-right corner of your new formula cell and click+drag down to copy the formula to all subsequent cells.

16. Next, find the cell you need to start adding to, in this case we need to change our Message #2 (and every subsequent cell) by adding 4 to them.
17. Select the cell, and in the formula bar, change the second Hex2Dec entry from 0 to whatever you need to add/subtract. In my example case, I need to change to add 4. Then press enter.
18. Select the bottom-right corner of your new “fixed cell” and drag it all the way down to apply the +4 addition formula. You should end up with a full list of corrected indexes.

19. Select all of the entries in your new list and hit Copy.

20. Go back into your hex editor. Go to the first index location.
21. Right-click and Paste your new index values, overwriting the old ones.

22. Save
23. Open up your newly edited file in Harrison’s MES Editor to verify that everything looks good.

No more pushing the {EOM} bits to the next message. Yay!

24. Repeat as necessary with any other dialogue edits.

Edit:Technically, we’re not done yet!

Upon review, I’ve found there are a few more unwritten technical rules on how mes files and their indexes are structured.

Each edited message needs to be padded out with one to four “00”, a.k.a. {EOM}, bytes so that the next dialog message starts at a double-word position.

Each file also needs to have an appropriate amount of {EOM} bytes at the very end of the file so that it ends at an odd “_f” position.

Example Spreadsheet (Download)

Here’s an example spreadsheet that I used while making some edits to dialogue in numerous .mes files.

The End

As always, feel free to reach out if you have any questions on how to edit dialogue indexes using the above method.

We also have a great Discord community who I’m sure would be happy to offer any help if needed.

Preparing and Running Previewer on Retail Hardware (+ Tutorial)

After my research in getting previewer running on my iBook, I found that the models from A Wonderful Life could only be viewed on HW2 systems (retail hardware or equivalent dev kits).

Through some more research, I am now able to compile a version of previewer to run on retail hardware.

Here’s how I did it…

1. Create a folder to serve as the dvd root, in this case I used C:\defroot. This folder will contain the files to be previewed in a folder called “preview”, including the required prevload.txt file.

2. Convert the HW2 version of previewer.elf to .dol format using makedol.

3. Create a new file in Notepad the following settings and save as
previewerD.ddf.

4. Use the NPDP program OdemMakeDlf to compile our ddf file into a dlf file.

5. Download a retail-patched version of makegcm.dll and put the appropriate SDK folder C:\DolphinSDK1.0\X86\bin, overwriting the original makegcm.dll file.

6. Run makegcm.exe to compile the dlf file to a functional gcm (gamecube disc image).


The resulting gcm file can run on a retail Gamecube, or be opened in the Dolphin fan emulator.

Zebra, now on Gamecube

I haven’t tried out any of the AWL files yet, but that will be the next step.

Overall, I’m leaps and bounds beyond where I was just a couple months ago.


Update

I’ve tried using the above method to preview some gpl files from A Wonderful Life. Unfortunately, the program freezes on a black screen immediately after the Gamecube logo.

I’m not sure what the error is since the retail method of loading doesn’t provide any output. To get that, I’d need to be using a development system (e.g. GDEV, TDEV) that could be hooked up to a PC for console output.

The alternative would be to try using an entirely different piece of software, dspin.

This software (I have version 0.94) allegedly has experimental gpl import support.

I’ll do some tests with this software tomorrow to see if I can get anywhere.

If dspin doesn’t work, I’ll just have to shift focus back to dialogue editing until a workaround can be found, such as a more updated previewer for Mac (i.e. newer than the version included with the April 2001 Character Pipeline).


Update II:

dspin didn’t seem to work. I renamed the file and put it in the dvdroot folder, but the program didn’t seem to do anything with it.

I’m not sure what I’m doing wrong. Further research needed.

Tutorial: Dialogue Part II – Simple AWL Dialogue Editing

Once you’ve been able to read some dialogue files, it’s time to start editing any sections you want to change.

Locating Phrases

In this example, I’m going to alter the word “husband” in a phrase said by Griffin.

First things first.  You’re going to open up your .mes file in a hex editor of your choice.  I prefer Hex Editor Neo on Windows, but any hex editor should do.

Once open, you’ll want to locate the phrase in the file.  The easiest way to do this is to copy the hex code displayed in Harrison’s tool, then search for it in your file.

Replacing Words

For simplicity, it’s best to replace words with alternatives that have an equal or lesser amount of characters.

In this case, we’ll replace “husband” (7 letters) with “wife” (4 letters, 3 letters less than the original).  In this case we’ll need to add a few spaces onto the end of the line.  Spaces are encoded as “02″ in hex.  Since they only take up 1 hex slot as opposed to 2 (which most letters do), we’ll need to double the amount of needed spaces to 6 to make up for 3 missing letters.  So we’ll replace “a great husband for” with  “a great wife for      ”.  In the end, your replacement phrase should be just as long in hex as your original.  This keeps us from needing to modify the list of indexes at the start of the file and possibly creating any bugs.

While we might need to modify the file at times where the new text is longer than the original, we won’t worry about it right now.

Tutorial: Extracting, Modifying, and Rebuilding ISOs

Disclaimer: This guide is outdated and is missing some important steps (i.e. 32K File Realignment). I’ll be posting an updated guide within the next month or two. – Sean. July 30, 2019.

This guide will go over the basic functionality of the GC Rebuilder tool.  I’ve been using this tool to repackage the modified versions of my AWL/AnWL ISOs.  I’ve tried other tools such as WiiScrubber, but those seem to have issues when the replacement files have different file sizes

In this example, I’ll be replacing a dialogue file (other.mes) with a modified version.

Requirements:

Instructions:

1. Launch GC Rebuilder and use the Image menu to select your source ISO to extract.

2. Right click the “root” directory of the ISO and select Export, to extract all of the ISO files to a folder.

3. Close GC Rebuilder

4. Make your modifications/replacements to the extracted files.

5. Open up GC Rebuilder again

6. From the “Root” menu, select the root folder containing your modified files.

7. Under the Root menu, select the “Save” option to set where you want your modified ISO to be saved.

8. Once you’ve selected a suitable location for the destination ISO, select “Rebuild” from the Root menu.

You should now have a shiny new ISO built containing your modified files.

Tutorial: Dumping ROMs

The first thing you’ll need to poke around in the files of either A Wonderful Life or Another Wonderful Life is a copy of the game(s).

Even if you don’t plan on helping with development, you’ll eventually need a copy of the ROM to apply the patch to if you want to play the mod.

While there are some methods out there for ripping games using some select compatible DVD drives, we’ll be using a Wii for this method, since those are more common.

Requirements:

  • A Wii (Note: The Wii Mini is currently unhackable and won’t work)
  • An SD Card
  • A USB Stick (2GB or more)
  • CleanRip
  • The Homebrew Channel
  • Gamecube DAT file (if your Wii has no internet connection)

Instructions:

  1. Install the Homebrew Channel on your Wii [guide]
  2. Download CleanRip and copy the “apps” folder to the root of your SD card.
  3. If you downloaded the Gamecube DAT file, copy it to the root of your SD card and rename it to “gc.dat”
  4. Insert your SD Card into your Wii
  5. Insert your USB drive into your Wii
  6. Insert your Harvest Moon disc into the Wii
  7. Launch CleanRip from the Homebrew Channel
  8. Follow the on-screen instructions to dump the game to your USB drive
    1. Set “Chunk Size” to Max
    2. Set “New Device per Chunk” to No

Once finished, the app should display the name and md5 hash of the dumped ROM.  These should match either of the following:

  • Harvest Moon: A Wonderful Life (USA): 1b25d35660f163ebdc97165708b22f94
  • Harvest Moon: Another Wonderful Life (USA):  af4bc131320ca06ab198202db78f3b06

For now, I’m currently just working with the US versions of each game.

Once I’ve completed those mods, I’ll start taking a look at the other versions (EUROPE, GERMANY, JAPAN).

  • Harvest Moon: A Wonderful Life (EUR): 9e9b1d087aef6e2993c7bbd9e7b2fcc9
  • Harvest Moon: A Wonderful Life (GER): 4cfaa94313149c4bd839e965026a4240
  • Bokujou Monogatari: Wonderful Life (JAP) (v1.00): 2bd9b086f7e7b4c15e1e8149f9b4899f
    Bokujou Monogatari: Wonderful Life (JAP) (v1.01): 06b0c45b21cc5603e91cf4cbd89bcc56
    Bokujou Monogatari: Wonderful Life for Girls (JAP): 7dad8557e8ab6a0f35d8f57b9902d8f2