Total War: THREE KINGDOMS

Total War: THREE KINGDOMS

Not enough ratings
Mod Config Tool [Beta]
2
   
Award
Favorite
Favorited
Unfavorite
Tags: mod, campaign
File Size
Posted
Updated
370.524 KB
11 Sep @ 3:59pm
12 Sep @ 6:07pm
2 Change Notes ( view )

Subscribe to download
Mod Config Tool [Beta]

In 2 collections by Ironic
190 Expanded [Recommended]
16 items
Modder Tools
3 items
Description
The idea shamelessly taken from WH3, this allows for the modder to create options for the user to select and choose from.

USERS

You just need to install this mod and you are good to go, you will see a new button on the main menu below quit.

You can stop reading now.

MODS THAT USE THIS

190 Expanded (in a future update)

Please leave a link/mod name in the comments so I can add it here.

Modders
# MCT Configuration System - Developer Guide

Create Configurable Options for Your Mods

The MCT (Mod Configuration Tool) system provides a standardized way to add configurable options to your mods. This guide will show you exactly how to implement it.

---

## Quick Start

1. File Naming (IMPORTANT!)
Always name your config file with
zzz_
prefix:
zzz_my_mod_config.lua

This ensures it loads after the main MCT system.

2. Basic Template
local my_config = { ["MyModName"] = { option_1 = { name = "EnableFeature", template = "checkbox", adopt = true, tooltip = "MCT_localised_string_enable_feature", base = "selected" } } } if RegisterMCTConfig then RegisterMCTConfig("MyMod_Config", my_config) ModLog("MyMod MCT registered successfully!") else ModLog("ERROR: MCT not found! Enable MCT mod first.") end

---

## Configuration Parameters

Required Parameters:
name - Unique identifier for your option
template - UI type: "checkbox" or "dropdown"
tooltip - Localization key for tooltip text
base - Default state: "selected", "active", or "inactive"

Optional Parameters:
adopt - Set to true to use root as parent (recommended)
priority - Display order (ignored if adopt = true)
amount - Number of options (for dropdowns only)

---

## Template Types

Checkbox (Simple On/Off)
simple_toggle = { name = "EnableAwesomeFeature", template = "checkbox", adopt = true, tooltip = "MCT_localised_string_awesome_feature", base = "selected" -- Starts enabled }

Checkbox (Multiple Choices)
difficulty_setting = { name = "DifficultyLevel", template = "checkbox", adopt = true, amount = 3, -- 3 options tooltip = { "MCT_localised_string_easy", "MCT_localised_string_normal", "MCT_localised_string_hard" }, base = "active" }


Dropdown (Multiple Choices)
difficulty_setting = { name = "DifficultyLevel", template = "dropdown", adopt = true, amount = 3, -- 3 options tooltip = { "MCT_localised_string_easy", "MCT_localised_string_normal", "MCT_localised_string_hard" }, base = { "active", "active", "active"} }

---

## Localization Setup

Tooltip Format:
Base key:
MCT_localised_string_[your_key]
Language variants:
MCT_localised_string_[your_key]_EN
,
MCT_localised_string_[your_key]_KR
, etc.

Example:
tooltip = "MCT_localised_string_enable_god_mode" -- In your localization files: -- MCT_localised_string_enable_god_mode_EN = "Enable God Mode" -- MCT_localised_string_enable_god_mode_KR = "신 모드 활성화" -- MCT_localised_string_enable_god_mode_FR = "Activer le mode Dieu"

Multiple Tooltips (for dropdowns):
tooltip = { "MCT_localised_string_difficulty_easy", "MCT_localised_string_difficulty_normal", "MCT_localised_string_difficulty_hard" }

---

## Complete Working Example

-- File: zzz_awesome_mod_config.lua local awesome_mod_config = { ["AwesomeMod"] = { -- Enable/disable main feature enable_mod = { name = "EnableAwesomeMod", template = "checkbox", adopt = true, tooltip = "MCT_localised_string_enable_awesome_mod", base = "selected" }, -- Difficulty selection difficulty = { name = "DifficultyLevel", template = "dropdown", adopt = true, amount = 4, tooltip = { "MCT_localised_string_diff_easy", "MCT_localised_string_diff_normal", "MCT_localised_string_diff_hard", "MCT_localised_string_diff_nightmare" }, base = "active" }, -- Debug option (starts disabled) debug_mode = { name = "DebugMode", template = "checkbox", adopt = true, tooltip = "MCT_localised_string_debug_mode", base = "inactive" } } } -- Register configuration if RegisterMCTConfig then RegisterMCTConfig("AwesomeMod_Config", awesome_mod_config) ModLog("AwesomeMod MCT configuration registered successfully!") else ModLog("ERROR: MCT system not found! Make sure the main MCT mod is loaded first.") end -- Optional: Check if registration worked function IsAwesomeModMCTRegistered() return _G.MCT_REGISTRY and _G.MCT_REGISTRY["AwesomeMod_Config"] ~= nil end

---

## Adding to Existing Groups

You can extend existing MCT groups by using the same group name:

local extend_vanilla = { ["ExistingModGroup"] = { my_new_option = { name = "MyNewFeature", template = "checkbox", adopt = true, tooltip = "MCT_localised_string_my_new_feature", base = "inactive" } } }

---

## Base State Values

"selected" - Checkbox starts checked, option is enabled by default
"active" - Option is available and functional (good for dropdowns)
"inactive" - Checkbox starts unchecked, option is disabled by default

---

## Troubleshooting

My options don't appear:
• Check your file has the
zzz_
prefix
• Make sure MCT main mod is enabled and loaded
• Verify your script has no syntax errors

Tooltips not showing:
• Check localization key format:
MCT_localised_string_[key]
• Make sure you have language-specific variants (_EN, _KR, etc.)

Registration fails:
• Ensure MCT mod is loaded before your mod
• Check the lua_mod_log for error messages
• Use the debug function to verify registration

Options not working in-game:
• Make sure option names are unique within each group
• Check that your mod actually reads the MCT values
• Verify the base state is set correctly

Credits

Credits to l Groove Wizard
5 Comments
Circle Of Dao 14 Sep @ 6:48am 
Not the Hero we deserve.:steamthumbsup:
Murl 13 Sep @ 7:49am 
nice
蜀漢第二把交椅 12 Sep @ 11:34pm 
sigma
Comrade Khleb 12 Sep @ 9:14pm 
Finally! This mod might actually bring back 3K modding
Azza909 11 Sep @ 9:38pm 
This is great can't wait to see more events and options added