Loading Files Over the Internet

From NSMBW Knowledge Base
Jump to navigation Jump to search

Along with loading files from the devices connected to the Wii's ports, Riivolution also supports loading files from the Internet, be it the local network or a server on the other side of Earth. This is achieved using RiiFS, a simple custom network protocol that allows a computer to act like a disk filesystem. As you can imagine, this makes testing a lot quicker by removing the need to restart the game to change files, but it also can be used to share mods publicly without having people download them.

Requirements[edit | edit source]

  • Wii connected to the Internet
  • RiiFS

Setting up the RiiFS folder[edit | edit source]

First of all, you need to set up a folder that RiiFS will use. It can be on your personal computer or on a remote server, as long as you can run the tool on it. It basically emulates an SD Card inside the Wii, so the folder must contain the following:

  • The mod files
  • The riivolution folder with the XML file you want to use
  • The RiiFS executable (pick the one for your OS from the archive)

The final folder setup should look like the following:

RiiFS1.png

Tweaking the XML[edit | edit source]

If you aren't using RiiFS for testing, skip to the next paragraph.

In order to edit files without having to restart the console, the modified file must be the same size (or less) than the one the game was loaded with, else the game will crash. To avoid having issues altogether, it's highly recommended to set a length parameter in the XML tags (more details about XML files here). If this parameter is set bigger than a file's actual size, Riivolution will add null data until the specified filesize is reached. This allows to edit the file without worrying about crashing the Wii. Using the Basic XML from this tutorial as an example, the resulting file would be:

<wiidisc version="1" shiftfiles="true">
    <id game="SMN" />
    <options>
        <section name="Testing">
            <option name="File Replacement">
                <choice name="Enabled">
                    <patch id="nsmbfolder" />
                </choice>
            </option>
        </section>
    </options>
    <patch id="nsmbfolder">
        <folder external="/nsmb" recursive="false" />
        <folder external="/nsmb" disc="/" />
        <folder external="/nsmb/Stage/" disc="/Stage/" create="true" length="500000" />
        <folder external="/nsmb/Stage/Texture/" disc="/Stage/Texture/" create="true" length="1000000" />
    </patch>
</wiidisc>

Here, the specified length is 500 KB (500000 bytes) for levels and 1 MB (1000000 bytes) for tilesets, which should cover most usage cases.

Linking Riivolution and RiiFS[edit | edit source]

If you are using RiiFS on a local network, skip this paragraph.

After configuring the folders and eventually setting the filesizes, it is time to link the server to the Wii. This is done through yet another XML, albeit a special one:

<wiidisc version="1">
	<id game="SMN" />
	<network protocol="riifs" address="ADDRESS" port="1137" log="false"/>
</wiidisc>

Copy the above into a new file, replace ADDRESS with your server's IP address (make sure to point to the correct path) or domain name (do not forget the http:// in front), change the port if you want to (it'll default to 1137 otherwise) and set log to true if you want to redirect debug messages to the terminal. Once done, save the file and place it on the SD Card/USB Drive, which will then go into the console.

Starting RiiFS[edit | edit source]

Double click the application to launch it. If there's any prompt from the firewall, allow access. The terminal will look like this:

RiiFS.png

You can now start Riivolution and begin playing (or testing). If at any point you get Return -1, it means your version of Riivolution is outdated.

Misc Tips[edit | edit source]

You can also make a small script to make starting RiiFS quicker:

riifs.exe PATH PORT

Replace PATH with the folder made in the first paragraph and PORT with the port (or delete it to leave it as default).

<wiidisc version="1" shiftfiles="true">
    <id game="SMN" />
    <options>
        <section name="Testing">
            <option name="File Replacement">
                <choice name="Enabled">
                    <patch id="nsmbfolder" />
                </choice>
            </option>
        </section>
    </options>
    <patch id="nsmbfolder">
        <folder external="/nsmb" recursive="false" />
        <folder external="/nsmb" disc="/" />
        <folder external="/nsmb/Stage/" disc="/Stage/" create="true" length="500000" />
        <folder external="/nsmb/Stage/Texture/" disc="/Stage/Texture/" create="true" length="1000000" />
    </patch>
</wiidisc>