Mod Tutorial
  • ๐Ÿ Home
  • ๐Ÿ˜€Introduction
  • ๐Ÿ˜‡Player Manual
    • ๐Ÿ“•Installation
    • ๐Ÿ“”How to use it
    • ๐ŸดAttention
  • ๐Ÿ˜…Make Mod
    • ๐Ÿ˜…Prepare
    • ๐Ÿ˜ŽCreate a mod
    • ๐Ÿ˜˜Common Features of NML
    • ๐Ÿค”Others Common
    • ๐ŸฅธBepInEx
  • ๐Ÿค”Basic Concepts
    • ๐Ÿ‘ŒMod Declaration
    • ๐ŸŽจMod Interface
    • ๐ŸฅณMod Configuration
    • ๐Ÿ‘Mod Dependency
    • ๐Ÿค—Multiligual
  • ๐Ÿ˜ถโ€๐ŸŒซ๏ธResources
    • ๐Ÿ˜ฃOverview
    • ๐Ÿ˜ฎResources
    • ๐Ÿ˜ฃAssetBundle
  • ๐Ÿ˜ชOther techs
    • ๐Ÿ‘ŒMod Reload
    • ๐ŸซฅEvent Handle
    • ๐Ÿ˜ซMod Upload
  • ๐ŸซจGame Contents
    • ๐ŸฅณCreate Equipment Asset
  • ๐ŸคฉUser Interface
    • ๐Ÿ˜Button
    • ๐Ÿ˜‚Tab
    • ๐Ÿ˜„Prefab
    • ๐Ÿ˜†Common Window
    • ๐Ÿ˜‹Autolayout Window
  • ๐Ÿ˜˜Packed
    • ๐Ÿ˜Basic Mod
  • ๐Ÿš—NML Development and OpenMods Projects
    • Introduction
    • NML Development
    • NML Documentation
    • Example Mod
    • Unity Development Toolkit
    • Game Documentation
Powered by GitBook
On this page
  • Mod Loading
  • Multilingual
  • Mod Configuration
  • Default mod configuration file
  1. Packed

Basic Mod

Basic Mod is exactly class BasicMod. If you want these features, you should make your mod main class inherit from BasicMod instead of MonoBehaviour and IMod.

Mod Loading

BasicMod is different with IMod in modder's layer. BasicMod implements OnLoad in IMod, and call OnModLoad to initialize mod. You should implement OnModLoad in BasicMod instead of OnLoad.

Multilingual

BasicMod loads files under folder Locales automatically. cz.json is Simplified Chinese, en.json is English, ch.json is Tranditional Chinese.

The following is an example of localization for Simplified Chinese in JSON format.

// cz.json
{
    "Humans": "ไบบ็ฑป",
    "Orcs": "ๅ…ฝไบบ"
}

Except of .json file, you can also use .csv to make localization.

The following is an example lang.csv

key,cz,en,ch
Humans,ไบบ็ฑป,Humans,ไบบ้กž
Orcs,ๅ…ฝไบบ,Orcs,็ธไบบ

File name for .csv is not important.

Mod Configuration

BasicMod provides default mod configuration file(default_config.json under mod's folder) and consistent user's mod configuration.

Default mod configuration file

It provides format of mod configuration and default values for them.

When add/remove configuration item(excluding modifying default value)

Consistent user's mod configuration will add/remove corresponding items with new default values.

PreviousAutolayout WindowNextIntroduction

Last updated 1 year ago

You can write default_config.json refer to

๐Ÿ˜˜
๐Ÿ˜
Mod Configuration