Skip to content

mod.json

Vaughn Royko edited this page Dec 27, 2024 · 13 revisions

The mod.json file contains all the metadata for a mod. It describes the mod, it controls how the game will load the mod, it specifies what's in the mod, etc.

Example

{
	"name": "Example Mod",
	"description": "This is an example mod that uses every property.",
	"version": "1.0.0",
	"author": "Your Name Here",
	
	"dependencies": [ "<publishedFileId of another mod>" ],
	"tags": [ "User Interface" ],

	"file": "out/Mod",
	"waywardVersion": "2.12.0-beta",
	"multiplayer": "compatible",
	"unloadable": true,
	"allowUnlockingMilestones": true,
	
	"languages": [ "lang/english" ],
	"customizations": true,
	"stylesheets": [ "style/mod" ],
	"imageOverrides": true,
	
	"publishedFileId": "<numbers provided by steam>"
}

Required Properties

name

The name of the mod as it will appear in-game. The names of registrations will also use this property. For example, if your mod's name is Cool Mod and you register an item called AmazingThingy, the name generated will be ModCoolModAmazingThingy.

description

The description of your mod. This property cannot be blank. This will appear in the mods menu.

version

The version of your mod. This will appear in the mods menu, but has no further internal use. However, you may use it in your mod's scripts to save versioned data.

author

The mod author's name. This will appear in the mods menu, and can be any string, so you can provide multiple names if need be.

Content Properties

Each mod requires at least one kind of content.

Script Properties

Script mods are the main way to add content and tweak functionality in Wayward. To implement a script mod, you may use the following properties:

file (required for scripts)

The path to the JavaScript file that your Mod class is in. For example, if your mod TypeScript file is src/Mod.ts and your output file is out/Mod.js, you will want out/Mod here.

waywardVersion (required for scripts)

The version of Wayward that this mod is using. This is a required property, but you should never need to set it yourself. Instead, the property will be set automatically when you use the +mod create or +mod update commands. The command will install Wayward's type definitions (matching the version of Wayward you have installed) and set this waywardVersion property to the version's name.

multiplayer

Whether the mod is compatible with multiplayer. You may set it to any of the following:

  • clientside — This mod only impacts things on the client's side; basically, the mod can be installed and enabled on clients without servers or other players also needing to have the mod installed. For example, mods that tweak the UI.
  • compatible — This mod is compatible for multiplayer. Both clients and servers will need the mod to be installed.
  • serverside — This mod can only run on dedicated servers.
  • incompatible (default) — This mod is not compatible with multiplayer and must be disabled for it.

For information on how to make your mod multiplayer-compatible, see Actions & Multiplayer.

allowUnlockingMilestones

Whether this mod allows unlocking milestones. Defaults to false.

unloadable

Whether this mod is "unloadable". Defaults to false. Non-unloadable mods cannot be removed from save games without errors potentially occurring. You'd want this to be true if you don't register any content or do anything else that will require the mod's presence on every load.

Other Content Properties

languages

An array of paths to language JSON files.

  • Ending the path in the .json extension is unnecessary.

Example:

"languages": [
    "lang/english",
    "lang/slkdjfas/laksdfj.json"
]

This example would load the language JSON files <modname>/lang/english.json and <modname>/lang/slkdjfas/laksdfj.json. I'm sure that second one would make the game much more accessible for any space aliens playing Wayward.

customizations

Set this to true if your mod provides a customizations.json file.

imageOverrides

Set this to true if your mod provides a imageOverrides.json file.

stylesheets

An array of paths to CSS Stylesheets.

  • Ending the path in the .css extension is unnecessary.

Example:

"stylesheets": [
    "css/index",
    "css/foo/bar.css"
]

This example would load the CSS Stylesheets <modname>/css/index.css and <modname>/css/foo/bar.css.

Other Properties

dependencies

An array of publishedFileIds of other mods that your mod requires in order to work. If these dependencies are not enabled, your mod cannot be enabled.

tags

An array of tags for the mod. See Workshop Tags for a list of all tags.

Note: Some tags are automatically applied by the game depending on the content types your mod provides.
Note: We reserve the right to update tags on our end in order to prevent abuse and miscategorization.

publishedFileId

This property is the Steam Workshop identification for your mod, and, after publishing, it will match the id shown in your mod's Workshop URL. Do not set this property manually.

Next:

Getting Started

Mod Content

Script Documentation

(apologies for all the missing guides, we'll get to them at some point)

Clone this wiki locally