-
Notifications
You must be signed in to change notification settings - Fork 1
Frequently Asked Questions
- Visual Studio Code is showing errors (even in example mods) and/or cannot compile.
- When attempting to compile, I am getting a "execution of scripts is disabled on this system" error.
- How do I open the console in-game?
- Windows is showing a "You must type a file name." dialog when trying to rename a folder ".vscode".
- How do I upgrade my mod from version to version?
- How do I find out the name and path of imports?
- I need more help!!!
This is a common issue you may run into if you have followed this guide in the past but is now showing errors, even when copying over the new example mods/references. TypeScript updates will be a fairly constant thing in Wayward until TypeScript is more mature. It's possible your TypeScript installation is out of date.
You can check your current TypeScript version by opening your terminal (Linux/Mac OS X) or command prompt (Windows) and running the following command:
tsc -v
You can update it by running the install command again:
npm install -g typescript
Make sure to restart your editor before trying again.
On Windows, depending on your security settings, execution of scripts may be disabled on your system using PowerShell. To enable execution of scripts, use the following command in PowerShell:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
for the current user or Set-ExecutionPolicy RemoteSigned -Scope LocalMachine
to enable it for all users on your system, then follow the on-screen prompts.
Depending on your security settings, PowerShell may have to be ran in administrative mode for this to work. To do this, you can right click PowerShell and click "Run as administrator".
Simply use the default bind to open the "Developers Tools", which features the console with F10.
Alternatively:
- Open the options menu.
- Scroll near the bottom, or click the "Developer" link on the left sidebar.
- Click "Toggle Developer Tools".
You can bypass this limitation by downloading/cloning one of the example mods and just copying the .vscode folder for your own mod, or by creating the directory using the command prompt. To do so, change your directory to the location you wish to make the .vscode folder like so:
cd "C:\Program Files (x86)\Steam\steamapps\common\Wayward\mods\helloworld"
Then run the following:
mkdir .vscode
When we make significant changes to our codebase, for example: upgrading from ES5 to ES6 in beta 2.2, or moving to a modular codebase in beta 2.3, you may have to make many changes to your mod so that it runs on the latest version. This is an unfortunate side effect of still being in beta. As we move to towards a more stable, non-beta release, you may expect less of these huge changes.
As we make these changes, we always make sure our documentation (and this guide) is up to date and shows how to make mods for the current or upcoming version. You can always find the Hello World section showcasing how to create a very basic mod for the latest version. Also, we supply all our official mods on GitHub as examples of what we do to update our own mods. You can browse the commits of each mod to see what we did as we upgraded to each Wayward version. You can even browse the repository for the website listing all of Wayward's types to see what we are changing from version to version.
Alternatively or additionally, there is a video produced detailing the steps needed to update your mod from a previous version here: https://www.youtube.com/watch?v=KT2VLY7isiY for a general guideline or workflow.
If you are using Visual Studio Code, we recommend installing the ESLint extension. When typing names of interfaces, enums, and more, TSLint will show a red squiggly line underneath if they are not imported already. After clicking on the definition/error/line, a small light bulb will appear in the left gutter. Clicking on this light bulb will allow you to automatically import the declaration. For example, typing ItemType
should trigger an error with ESLint. Clicking on the line, then the light bulb, will show:
Add "ItemType" to existing import declarations from "game/item/IItem".
Or, if you don't have any "game/item/IItem" import declarations yet:
Import 'ItemType' from module "game/item/IItem"
Clicking this option will add something like following to the top of your file:
import { ItemType } from "game/item/IItem";
Calm down! The community is here to help. Simply post your issue or problem in the Workshop discussion forum.
Want more of a real-time support approach? You can also try on Discord. Make sure to post a new thread in the modding
channel.
Getting Started
- Introduction
- Prerequisites
+mod create
&+mod update
- mod.json
- Extracting Assets
- Resources & Examples
- Frequently Asked Questions
Mod Content
Script Documentation
- Using Translations
- Registrations
- Event Handlers
- Injection
- Adding Items
- Adding Doodads
- Adding Creatures
- Adding Magical Properties
- Actions & Multiplayer
- Adding Dialogs
- Context Menu/Action Bar Actions
- Inter-mod Registries
(apologies for all the missing guides, we'll get to them at some point)