-
Couldn't load subscription status.
- Fork 1
Languages & Extensions
Wayward's language JSON files are used to provide new languages. They are also used to extend/tweak existing languages, such as changing the default translations for things in existing languages (sort of like a language patch) and translating new content that is added.
In a console, simply run a command to set up a language in your mod. For more information on this command, see this guide.
cd "C:/Program Files (x86)/Steam/steamapps/common/Wayward/mods"
..\bin\wayward.cmd +mod create HelloWorld +languageA language file must have exactly one of either name or extends.
-
name— This file defines a new language by this name. -
extends— This file extends an existing language by this name.
An object containing dictionaries. A dictionary is a key-value pair of the dictionary name, and the entries (or translations) in the dictionary.
As a simple example, let's say you want to change the name of the branch item. Your dictionaries would look like the following:
"dictionaries": {
"items": {
"branch": ["stick", "Useful for playing fetch."]
}
}A translation is always either a string "some text here" or an array of strings ["some text here", "more text", "etc"]. "text" is functionally equivalent to ["text"]. Each string in an array of strings is a different part of the translation, for example:
- Entries in the
item,creature, anddoodaddictionaries are[Name, Description]. - Entries in the
bookdictionary are[Author, Text]. - Entries in the
helpArticledictionary are[Name, Summary, Subtitle, Text]. - Entries in the
humanNamedictionary are actually any number of different names that can be used.
This object contains "pluralization" rules for the language, affecting how nouns are automatically reformatted by the game — how they're pluralized, and what articles are attached.
An object containing mappings from a singular noun to a plural noun. In pluralization, if one rule matches, no other rules will be used.
An object containing mappings from a plural noun to a singular noun.
An array containing 2-length tuples of a singular noun and its plural form, for the game to translate between.
An object containing nouns that are not "countable" — IE, their singular and plural forms are identical.
When including a noun in a sentence, sometimes an article is attached. Using English as an example, this is "a" and "an", depending on whether or not the first sound in the word is a consonant sound or a vowel sound. In the default English language, we the following rules:
"articleRules": [
[1, "/^(?=[aeiou])/", "an "],
[1, "/^(?![aeiou])/", "a "]
]In other words, this property takes an array of article rules, where an article rule is a 3-length tuple of:
- The "count" that this article rule should be applied to:
- An exact count — for example,
0,1,20etc - Any number at least a given value — for example,
{ min: 5 } - Any number between a given minimum and maximum, inclusive — for example,
{ min: 5, max: 10 }
- An exact count — for example,
- A regular expression determining which nouns to match.
- The article to replace the regular expression with when matched.
- Script Mods — Add content or tweak functionality with scripts.
- Customizations — Add new hair colors, skin tones, and hairstyles to the game.
- Image Overrides — Replace images in the game with your own.
- Stylesheets — Add new CSS to the game in order to change the appearance of the UI.
- Resources & Examples — Help channels and mod examples.
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)