Skip to content

Main.dol Editing Guide

Mimi edited this page May 30, 2022 · 3 revisions

By MysticMismagius


Table of Contents

Spreadsheet Update

The Basics

Extraction and Injection

Editing the main.dol file

Hexadecimal Numbers Are Weird

CSMM’s Effect on the Main.dol file

File Hygiene and Version Differences

External Links

Spreadsheet Update

I've scrapped the table on Github. I never updated it after its initial posting, despite several new main.dol edits being discovered in that time. From now on, the official main.dol edits repository can be found on Google Sheets. Google Sheets is quick to edit, far more organized, and it's where I originally wrote the guide before posting it to Github.

The main.dol editing spreadsheet can be found by clicking this link. If you already know what you're doing, there's no need to further waste your time here.

If you need an explanation on what the .main.dol is, where to locate it, or how to edit it, continue reading this guide.

The Basics

What is the main.dol? Why might one want to edit it?

The main.dol is the main executable file in Wii and Gamecube games. Every game has this file in it, and in most games it contains game logic and variables. If you need a short overview of the kinds of things that can be reprogrammed with the main.dol, review the main.dol editing spreadsheet. One can substantially change the way the game plays by editing the main.dol, so being able to edit it effectively is a valuable tool for any modder.

What external programs do I need to edit the main.dol?

You will need two external programs. The first is a program that extracts files from your .iso file and reinserts them when you’re done. The second is a hex editor: a program that allows you to directly edit the bytes of any file. For this guide, I use WiiScrubber as the ISO filesystem manager, and HxD as the hex editor. You can use whatever works for you.

Is there a key to the tables in this guide?

This is the format for displaying edits for the spreadsheet.

Or shoutouts to Simpleflips, if you're so inclined.

Name of Edit: The edit’s title, or an abridged description of what it does.

Offset: The offset of the main.dol in which the relevant bytes are located. Read below for a more detailed explanation on offsets.

Original Bytes: The bytes to be edited, as they exist on the vanilla game’s main.dol.

Patched Bytes: The bytes after editing. Many of these edits contain at least one variable, as shown by either a set of question marks (??), or a letter higher than F (XX). This means that the edit is customizable to your tastes. It will function slightly differently depending on what you set the variable to, but as long as the non-variable parts of the edit are the same, the code should work.

Notes: A lot of these edits aren't really self-explanatory. Notes provide more detailed information on what an edit does, and provides other information you may need to know while editing that part of the main.dol.

Author: The person who made/discovered the edit. Many of these edits were not discovered by me, and I could not have made this guide without the help of the talented modders who discovered them!


Extraction and Injection

When you load the .iso file into your file system manager, you will see a menu containing the partitions of the game disc. Fortune Street is not split up into partitions, so you will only see “Partition 0”.

Click the [+] symbol to open it. This will display all the files in the Fortune Street ROM filesystem. The fifth file in the partition is the main.dol file. Right click on it, then click “Extract”.

This will open a prompt for you to save the file. This does not need to be named “main.dol”. But it does need to have “.dol” as its file extension, otherwise the file will not be usable. Once you click “Save”, you can access the main.dol file from the location you saved it to.

Once the main.dol file has been edited to your satisfaction, reopen WiiScrubber and load your .iso like before. Follow the previous steps to reach the main.dol in the .iso and right click it. But this time, instead of clicking “Extract” in the right click menu, click “Replace”.

This will open a prompt to inject a new file into the ROM. Find the location where your edited main.dol file is located, click on it, and then click “Open”. If you’ve followed these steps correctly, you should see a message that reads: “Successfully replaced. Now reparsing”.

This may be different if you are using a filesystem manager that isn't WiiScrubber.

If you see this message, congratulations! You’re almost done. Click “OK”, wait 3-5 seconds, and then exit WiiScrubber. Your edited main.dol should now be in your ROM. Open the ROM's .iso in Dolphin and test out the changes you’ve made. If they all work the way you expected them to, then you’re done!

Editing the main.dol file

When you open the main.dol file in your hex editor, you will see something like this:

The black and gray hexadecimal numbers in the middle of this window represent data within the main.dol file. When editing the file, these are the numbers that get changed. Each two-digit number is one byte of data. When you alter one digit of a byte, you are altering the entire byte.

The blue hexadecimal numbers on the top and left sides of the window represent the “offset” of each byte of data. The columns represent the final digit of the offset, while the rows represent every other digit. For example, the highlighted section in the image above begins with offset 000F5F38. The section is on row 000F5F3X, and the first byte is on column 8 of that row. The offset is similar to coordinates on a map: it describes which byte of data is being referred to, and where it is on the file. In HxD you can press Control+G to go to any offset you enter into a text prompt.

The black text on the right side of the window is the hex digits in the middle, translated to plaintext. None of the main.dol edits in this guide utilize this plaintext, so it can be safely ignored.

Click on a byte of data and type directly into it to edit it. When you do this in HxD, the text will turn red:

This indicates that the byte has been changed from the last saved version of the file. If you save the edited main.dol file, the text will return to its normal color. This feature may not exist on your hex editor if you are not using HxD. Either way, remember to save often or risk losing everything you’ve worked on.

Hexadecimal Numbers Are Weird

Some of the edits in this guide will require you to convert a decimal number of your choice into hexadecimal. For example, a few of the edits require you to enter the number of a venture card so that the game knows to use the effect of that card. Say that you wanted to use card 79 for one such edit. If you just typed in “79” in the offset, you would end up seeing the effects of card 121. This happens because 79 in hexadecimal is 121 in decimal form (and 79 in decimal is 4F in hexadecimal). Unless you are able to translate decimal to hexadecimal and vice versa in your head, you will need a calculator that handles this translation.

The calculator apps that come with Windows and Mac computers have a Programmer mode that can convert decimal to hexadecimal and vice versa. If you are on Linux, or otherwise cannot access these apps, look up “hexadecimal calculator” on any search engine and one should pop up.

Additionally, some edits require percentage calculation through the main.dol. In order to do this, you need two values: a “magic number” and a “shift”. Noah Schroeder's explanation on magic numbers and shifts is as follows:

“Calculations like the balloon port and tax office (Or any percentage calculation that involves your assets) can be calculated on this site:

By putting in a divisor, you essentially are putting in the X in 100/X = Y%. If you want it to be 5%, you would do 20, for 10% it would be 10, for 50%, it would be 2. Thus, saying that you can choose any % you want is a bit of a stretch, as if you are looking for a specific number, it has to be a factor of 100, like 50, 25, 20, 10, ect. I haven't tried to see if it rounds to the nearest percent if you try something like 7 or 3.”

Then you look at the first line, and it will tell you the hex you need to alter. 5% (20) has 6666 6667. But, the specific way that it's calculated needs to be in shifts, since 6666 6667 could mean a lot of different numbers without knowing the specific shift count. The website will also tell you the shift amount, and the way how you write the shift in hex form is by adding 0670 in hex for every shift. (Remember that in hex, 0 is a number) So, a shift of 0 is 06 70, a shift of 1 is 0E70, 2 is 1670, 3 is 1E70, four is 2670, ect.”

Every percentage calculation edit that we currently know of in Fortune Street is signed.

CSMM’s Effect on the main.dol file

Some modders may be using the Custom Street Mod Manager (CSMM) and making main.dol edits for the same ROM. While this can be done, do note that the CSMM makes its own changes to the main.dol file when it is used.

Some main.dol edits are rendered useless by CSMM’s .md file. These include:

  • Making Easy mode boards load in Standard mode (CSMM allows the user to change the difficulty mode that boards load in on a board-by-board basis)
  • Changing the venture card deck on a board
  • Changing which characters appear in Tour Mode
  • Changing the default Target Net Worth and Initial Cash on a board

If you use CSMM and want to make these kinds of changes, export an .md file for the board you want to alter, make the changes there, and then import the edited .md file when you’re ready to install the map. The .md file is fairly straightforward to edit: just use a plain text editor like Notepad or TextEdit and write your desired changes in the place of the thing you want to be changed.

CSMM also makes other edits to the main.dol. For example, in a vanilla copy of Fortune Street, the board names and descriptions point to the same lines of text for the Easy mode and Standard mode versions of a board. CSMM makes new lines of text for the Easy mode half, separating the text for these boards so that you can write different names and descriptions for the same board on different sides. In order to tell the game to point to the new lines when pulling up the description for boards on the Easy mode half, CSMM makes a change to the main.dol. If one were to put a vanilla main.dol (or a main.dol edited from vanilla) into an ISO edited with CSMM, they would find something like this when they select a board:

I don't even know what that title is supposed to be.

For the purposes of main.dol editing, this means that you’ll have to handle your ISO in a specific way so nothing breaks when CSMM gets involved. Here is the best way to edit the main.dol file with CSMM in mind, starting from a vanilla Fortune Street ROM:

  1. Extract the main.dol file from your .iso
  2. Make your desired edits to the main.dol
  3. Inject the edited main.dol into the .iso
  4. Use CSMM to install maps and make CSMM-exclusive changes.

File Hygiene and Version Differences

The main.dol, being the main executable for Wii games, is a very sensitive file. If you mess up at all with your edits (and you will mess it up the first time), you may end up with various game-breaking errors.

If this message shows up when you try to boot the game, your main.dol is super borked.

You need backups, basically.

The NTSC-U version of the game (known as Fortune Street), the NTSC-J version of the game (known as Itadaki Street Wii), and the PAL version of the game (known as Boom Street) are all different sizes, to accommodate for region-exclusive features and localization. Therefore, if you edit a main.dol from one version of the game, and then try to insert it into another version, it WILL NOT WORK and your game will refuse to boot. Make sure your main.dol is from the correct region before you begin. The easiest way to ensure that you have a main.dol of the correct version is as follows: extract a main.dol from a vanilla ROM, then when you’re done editing it, reinject that main.dol into the same ROM or a copy thereof.

I am American and work with Fortune Street, so the values I use for the spreadsheet portion of this guide work with the NTSC versions of the game. If you are working with Boom Street, Deflaktor made a calculator that you can use to follow along.

Simply plug the offset values from the spreadsheet into “Fortune Street File”, and the offset for Boom Street will appear in “Boom Street File”.

At the bare minimum, you should have two copies of the main.dol.

  1. A copy extracted straight from the vanilla ROM that you never touch. Make copies of this main.dol whenever you want to make a new edited version.
  2. A copy that you edit directly.

This is sufficient if you only work with one version of Fortune Street. You can make as many copies of the vanilla main.dol as you need, so if your edits somehow break you can start over with a new copy.

If you use two or more regional versions of the game, then you will have to double or triple the amount of copies you use. Your vanilla, and edited versions of the main.dol will each need an additional copy, so they each have one copy for each region.

As mentioned earlier, only the ".dol" extension matters to the filesystem manager, so don't feel obligated to name all of these backup files "main.dol". They should each have a name that indicates the necessary information so you don't get them mixed up. For example, here's what my main.dol folder used to look like, back when the .NET version of CSMM was being updated with the Qt version:

I have since deleted the versions of the main.dol that have been edited with CSMM. Double-dipping in CSMM has its own issues that have nothing to do with getting files mixed up.

Yes, this is a lot of files and a lot of work. It’s still far better than having to redo the entire editing process from scratch when you change game or CSMM versions. I had to remake all of my main.dol edits from scratch when CSMM Qt came out because I didn't have edited main.dol that wasn't affected with CSMM at the time. 0/10; I do not recommend.

External Links

This is an old website that you have to access through the Wayback Machine, so it’s a bit slow to load for me. Despite this, it gets the job done. If you have something newer, feel free to use that.

Through main.dol editing, you can provide access to four dummied out character UI colors, as well as changing the hex code of any character UI color. But the shop models, tile color, and squares on the minimap will not change color, because those are textures that need to be edited separately. If Mega.nz asks you for a key, the key is T6O_yc4TypqtLqbarM6dvw

This is where the most active Fortune Street modding discussion happens. If you have any questions, comments, have found an error in this guide, or have made a new discovery, let me know here.