Skip to content

mod create & update

Chiri Vulpes edited this page Oct 13, 2022 · 8 revisions

Setting up a Wayward mod is relatively straightforward. This was the case before, but moreso as of 2.8 when the mod generation and updating commands were added. Now, the game will generate all the necessary files for you.

Note: This guide will use wayward.cmd for Wayward commands. However, the command you actually need to use varies by operating system.

  • Windows: wayward.cmd
  • Linux: wayward
  • macOS: Wayward.app/Contents/MacOS/Electron

Prerequisites

Node.js must be installed on your computer.

Example

  1. Navigate to your Wayward installation's mods folder.

    • Windows Example: cd "C:/Program Files (x86)/Steam/steamapps/common/Wayward/mods"
    • macOS Example: cd "/Users/USER/Library/Application Support/Steam/SteamApps/common/Wayward/mods"
    • Linux Example: cd "/home/USER/.local/share/Steam/steamapps/common/Wayward/mods"
  2. Create or navigate to the subfolder where your mod will be stored.

    • For example, Wayward/mods/MyCoolMod
  3. Open the folder in VSCode or navigate to it in any terminal application, depending on your OS.

  4. Run a command to create or update the mod.

    • Windows Example: ..\..\bin\wayward.cmd +mod create . +script
    • macOS Example: ../../Wayward.app/Contents/MacOS/Electron +mod create . +script
    • Linux Example: ../../wayward +mod create . +script

    In this example, we run a command to create a mod with "scripts." Your command might be different, depending on the type of mod you're creating. For more information, see the in-depth guide below.

+mod create

wayward.cmd +mod create <path> <...options>
Generates a mod from scratch, or generates new content templates in an existing mod. The command must be run with at least one content type argument.

Content Types

  • +script — Generates a script. This includes a TypeScript mod class src/Mod.ts and a tsconfig.json.
  • +language — Generates a language at lang/english.json by default. Any additional arguments passed after this (before the next +switch) are used as a replacement path (instead of lang/english.json).
  • +customizations — Generates customizations at customizations.json.
  • +imageOverrides — Generates image overrides at imageOverrides.json.
  • +stylesheet — Generates a stylesheet at style/mod.css. Any additional arguments passed after this (before the next +switch) are used as a replacement path (instead of style/mod.css).

The mod.json file will be updated automatically with the new additions.

Other Options

  • +name <text> — Sets the name of the mod the mod.json and README.md. In-game the mod will be referred to as this name.
  • +version <version> — Sets the mod's version in the mod.json and README.md. You can currently put anything in here, but we recommend following semver in case the value is eventually restricted.
  • +description <text> — Sets the description of the mod in the mod.json. The description will appear in-game as a tooltip when a user hovers over the mod.
  • +author <text> — Sets the author(s) of the mod in the mod.json. This will appear in the same tooltip.
  • +classFile <text>(2.8.1+) Sets the name of the Typescript mod file, by default src/Mod.ts. Example +classFile thing/cool/ModFile becomes src/thing/cool/ModFile.ts. This is reflected in the mod.json.
  • +className <text> — Sets the name of the mod class in the Typescript mod file.

+mod update

wayward.cmd +mod update <path>
Updates your mod to the currently-installed Wayward version. This is only useful if you have scripts. For more information, see the Script Mods guide.

Next: mod.json