How to create a language mod
This section is intended for those developing or planning to develop addons. If you're not involved in addon creation, this content may not be relevant to you.
Scrap Mechanic does NOT support every character of all of its fonts. To have a low chance of missing characters showing in the graphical user interfaces, make sure your font is ether supported by the game or is based around latin!
Information
ScrapComputers has a LanguageManager that allows you to translate the Graphical User Interfaces. We implemented it differently from how the game handles translations, so you can add as many languages as you want, either those supported by the game or any Latin-based language.
In the configurator, there's an option to select languages. By default, it's set to Automatic
, meaning any language supported by the game and currently used by the player will automatically switch to that language. The following languages will automatically be used if the player has set their game to one of these:
(This is all languages supported by the game)
- Brazilian Portuguese
- Chinese
- English
- French
- German
- Italian
- Japanese
- Korean
- Polish
- Russian
- Spanish
If the language you plan to add is NOT in the list above, the player will need to manually change their language setting for each world. Currently, there's no cross-world language syncing due to limitations in our configuration system.
Tutorial
Normally we would have a template for this, but at the time of writing, the next update we are going to release is going to be majour and we just released a minor one.
Now that you know some knowledge about the language manager, here's how you create a language in ScrapComputers
Step 1: Install the mod tool
This step is only for people who never modded before!
First step is to create mod, Open steam and go into your library. Then click the Games
dropdown menu. Then enable the Tools
checkbox. Now search for Scrap Mechanic Mod Tool
and install it! (You will need this to publish it)
Step 2: Copy the addon template
Now go into this directory: %appdata%\Axolot Games\Scrap Mechanic\User\User_[STEAMID]\Mods
. Create a new folder and this can be called anything.
Go to our GitHub and download our mod from there, Now open it with 7zip or any other program to open zip files. Then in the zip file, Go to Templates/AddonMod
and copy all of its contents into the new folder you created that is in the Mods
folder.
Step 3: Deleting the unnessorary files (And modifing)
Since this template is technicly for creating components, we will have to delete and modify some files.
Delete the following files/folders:
Scripts\ComponentTest.lua
Objects\Database\ShapeSets
meta
(Optional to delete, keep this in to have syntax highlighting of the Addon API for something that will barrely use the addon API)
Modify the following files
{
"shapeSetList": []
}
In Tools\Database\main.toolset
, Change the uuid property (so change 269c7d0e-6bce-4a98-bd23-d97166b768ac
) to a new uuid. Use this website to generate uuid's. This is so there wont be any conflicts.
In description.json
, Change the localid property (so change 130f6849-466b-4507-8df9-bf98c28829ee
) to a new uuid. You may also change the name & description. (The mod tool might overwrite it. so i suggest changing the description in the mod tool itself or steam when you upload it)
Step 4: Creating the actual language
Now we will actually start doing the language part.
Firstly, create the folder Gui\Language\[LANGUAGE_OF_YOUR_CHOOSING]
. and now copy from the ScrapComputers mod, this file to that folder you've just created: Gui\Language\English\scrapcomputers.json
.