Maps Example game mode mod - Package your world(s) and player(s) as a mod to browse on tModLoader

hamstar

Terrarian
Since tModLoader's mod browser has grown increasingly convenient for distributing game content in modded form, why not also allow distributing world files and pre-configured player characters as well? Well now you can, with this mod-as-a-wrapper. Here's how:
  1. Download and extract the included .zip file to a new folder in your tModLoader Mod Sources folder (%HOMEPATH%\Documents\My Games\Terraria\ModLoader\Mod Sources\)
  2. Copy and paste to your mod's source code folder the .wld and .twld files of the worlds you want to share from %HOMEPATH%\Documents\My Games\Terraria\ModLoader\Worlds\
  3. Copy and paste to your mod's source code folder the .plr and .tplr files of the player characters you want to share from %HOMEPATH%\Documents\My Games\Terraria\ModLoader\Players\
  4. Edit the included mod files with the following:
    1. build.txt - Change the author and displayName accordingly. Remove the lines for `modReferences` and `homepage`, unless you want to add mod dependencies, or give your mod a homepage, respectively.
    2. Each .cs file - Adjust all code lines marked with a 'TODO' comment accordingly. Remember your mod's name, display name, and namespace need to be unique in the mod browser.
  5. Open tModLoader and go to the Mod Sources menu. Build and publish your mod in the usual way.

In what cases would you release your custom world as a mod wrapper?
  1. To let others download and play it quickly via. the tModLoader mod browser. Makes installation easy.
  2. Allows packaging multiple custom worlds or players. Sequencing worlds or playthroughs together are possible with additional code.
  3. Custom code or mod dependencies can be added. Use your imagination.
  4. Updates may eventually be possible, maybe even without requiring world resets.
  5. Mod locking, settings, and other options may be added. Ask if you need help setting these up.
 

Attachments

  • ExampleGameModeLoader.zip
    1.1 MB · Views: 279
Last edited:
Back
Top Bottom