Total War: THREE KINGDOMS

Total War: THREE KINGDOMS

270 ratings
Total War 3K: TheGathering sandbox mod
By Inter-object


Total Wars The Gathering Sandbox Mod User's Guide from Three Kingdoms.

  1. Summary
  2. Introduction
  3. Menu icon and Text Input
  4. Locale: kr, en, zh, cn
  5. Getting started
  6. Instant Commnand
  7. Action Command
  8. Action Command : Item
  9. Action Command : Trait
  10. Action Command : Trait
  11. User text file : Script
  12. User text file : DB
  13. HowTo
  14. Log files
  15. Precautions
2
4
2
   
Award
Favorite
Favorited
Unfavorite
Introduction
Sandbox mode is a huge script mod written in about 32,000 lines of LUA script.

This is a mod in which a user enters a desired command in real time with a text input window in a game then LUA scripts runs.

You can summon the hero you want to any faction on your turn.
You can give the desired faction to the desired item on the turn you want.
You can add/remove the desired traits (including legendary) to the hero.

User scripts and user db files allow you to implement your own hero gathering mod.

This mode is the most important mode for compatibility with other modes. No data except for sandbox unique key table. This mod has nothing to do with illustration. There is no possibility of conflicting with other mods unless the other mod has the same functionality by the script.

All features supported in this mod can be turned on or off. Even the UI can be turned off by the user in the game. Do nothing that the user did not command. I've named this mod 'sandbox' because it has the compatibility with other overhaul mods, and has the ability to pack your own faction, and create your own campaign balance.
Recent update history : 2.1.30
  • 2.1.30 - 'rel.[improve / friend / family / brother / master / rival / nemeses ]'
  • 2.1.20 - TheGathering feature update for 1.6.1
  • 2.1.10 - Nanman titles, heroes, clones, find_item
    • The 1~3 tiers of titles of Nanman heroes
    • heroes & clones
    • TheG.mod.confederated_faction_heroes - absorbing items too
  • 2.0.02 - TW:TK 1.6.1 update. Oct 9
  • 2.0.02 - 2nd stabilized update
  • 1.9.84 - 'spawn, hero, faction'
  • 1.9.79 - 1st stabilized update
  • 1.9.69 - 'ef_satisfaction', etc
  • 1.9.62 - 'ef_salay', etc & "TheGathering : Region name pack"
  • 1.9.53 - TW:TK 1.6.0 data migration complete. 7, Aug
  • 1.9.50 - The first TW:TK 1.6 corresponding update

  • TW:TK 1.6 corresponding update start. Aug 4, 2020

  • 1.9.43 - TK 1.5.3 last update, 5, Apr 2020
  • 1.9.41 - 'capital, liu_bei, dong_hai'

  • TW:TK 1.5 corresponding update start. Apr 1, 2020

  • 1.9.32 - 'give_exp, hero, amount'
  • 1.9.32 - 'exp_bonus, [faction/player/all/others], [0/25/50/100/200/300/500]'
  • 1.9.20 - 'num_live'
  • 1.9.05 - 'raze, luoyang'
  • 1.8.31 - 'where, cao cao'
  • 1.8.30 - TheG.mod.homeland_movement, recruit_rank, etc
  • 1.8.10 - 'batch, input_item.txt'
  • 1.8.02 - 'db.info, liu_bei'
  • 1.8.00 - Unified mod files-path to $(game)/sandbox

  • 1.7.90 - 'batch' command can execute external 'input-history-file'
  • 1.7.84 - Include CA item-settings in mod for 'item_set' command
  • 1.7.84 - 'out_text' also out-text of 'zh' and 'cn' locale text files
  • 1.7.84 - 'child_of'
  • 1.7.84 - Simplified 'add' and 'change' command
  • 1.7.63 - 'post.leader & post.heir
  • 1.7.51 - 'db.name', 'db.class', 'force_kill'
  • 1.7.42 - Steam guide update for MTU & Wu items
  • 1.7.34 - 'federate, cao_cao, liu_dai' 명령어
  • 1.7.25 - 'set_title, liu_bei, Harbinger of Chaos'
  • 1.7.02 - Simplified Chinese is now supported. Feb 6
  • 1.6.72 - New configurations (notify, worsen)
  • 1.6.31 - A new 'Auto-Trait' feature. Jan 24.
  • 1.6.22 - Input panel history save / load function
  • 1.6.10 - 'summon.moh' & 'all_item, moh'
  • 1.6.10 - The MoH-related data sheet on Google Sheets updated.

  • TW:TK 1.4 corresponding update starts. Jan 18

  • 1.5.1
    • The Gathering Console mod is no longer 'required' in this mod. Unsubscribe console mod. Sandbox mod now has own UI again.
    • Some minor bug fixes and updates. Oct 18
  • 1.4.55
    • CA 1.3.0 update patch
    • Include modified vanilla 'script/_lib/lib_mod_loader.lua' for stability and bug patch.
  • 1.4.52 0 Turn summon and some bug fixes
  • 1.4.5
    • Turn 0 summon command is back. It is now possible to move heroes to other AI factions, including the faction leaders at turn 1. Summon and kill command is now actually implemented as 0 turn commands.

  • 1.4.42 - 'search, 23', 'trait, 23, add, brave'
  • 1.4.4 - New 'set_wealth' command
  • 1.4.3 - New 'trait_set', 'item.set' command. 19 Oct.
  • 1.4.2 - All item data is embedded
  • 1.4.2 - A new 'all_item' command
  • 1.4.0 - All Traditional Chinese hero names are embedded. 31 Aug.
  • 1.4.0 - All historical main+ytr hero and ep hero's data included in this mod

  • 1.3.75 - remove_item, player, erya
  • 1.3.72 -Traditional Chinese names added to trait tab in Google sheet.

  • 1.3.7 Re-upload as a new post.

  • 1.3.65
    • Got removed from the Steam workshop by CA. 22 Aug.

  • 1.3.60 - New and complete sandbox UI. Aug 20, 2019

  • 1.3.50 - New default item aliasing features
  • 1.3.50 - trait, (general's number), add, brave
  • 1.3.40 - Add 'locale' button to sendbox input UI.
  • 1.3.31 - Reuse of 16 'traits' deleted and recovered by CA
  • 1.3.00 - 'summon.ep' and 'summon.main' commands

    Upload Steam Workshop 1.3.3 and write Korean and English guide (19.08.13~)
Menu Icon and Text input
After CA blocked the sandbox, the UI was split into a standalone mode in version 1.3.7.
Re-merged with Sandbox Mod in version 1.5.1 (October 19).

TheGathering Sandbox console



To open text input panel, click an "S" icon on the top right of the menu bar.



Ultimately, this mod provides only sandbox functionality and is ready to interface with the external UI console mod.



Clicking on the small arrow at the far right of the input box gives an example of the commands available in this mod. It may be a great help for first-time users.

Known Issues
Typing in the text input lags the game a lot. This is a vanilla issue, same thing happens with the vanilla text inputs.

Using Ctrl-C & Ctrl-V for sandbox input is recommended.
Sandbox mod files and directory
  • $(game)/sandbox directory

    The sandbox mod automatically creates a "$(game)/sandbox" directory. The picture below is an example.

      sandbox_user_script
      User script text file for sandbox mod
      sandbox_user_db
      User db text file for sandbox mod
      sandbox_user_db_tke
      User script text file for "Three Kingdoms Early" campaign
      default_histories
      Default history file for sandbox input panel
      input_item
      User saved history file example
      log_sandbox
      Main log file of sandbox mod

  • User text file per campaign

    Each user setting can be specified according to the DLC campaign map. In case of 'Three Kindoms Early', after reading the default settings, If there is a file named 'sandbox_user_db_tke' , 'sandbox' reads that file.

      sandbox_user_script
      sandbox_user_db
      Kindoms Early
      sandbox_user_script_tke
      sandbox_user_db_tke
      Mandate of Heaven
      sandbox_user_script_moh
      sandbox_user_db_moh
      Eight Princes
      sandbox_user_script_ep
      sandbox_user_db_ep
      A World Betrayed
      sandbox_user_script_wb
      sandbox_user_db_wb

  • out_text command
    out_text out_text, [kr/en/zh/cn] # output "sandbox_user_script_en" file

    The above command creates two files "sandbox_user_script" and "sandbox_user_db" in the "$(game)/sandbox" directory.

    Of the above text files, the two files output by the 'out_text' command are the core information files called 'user script text' and 'user db text'. The information you want to set in sandbox mode must be in two basic files.

  • out_log
    out_log # Output current setting out_log, true # Start outputting log to log-file

    The default log file is the "$(game)/sandbox/log_sandbox.txt" file.

    There are also logs for developers that print out if a log file already exists in the sandbox directory.

    log_console.txt # Log output related to input panel log_sandbox.txt # Sandbox main log file log_sandbox_tke.txt # Log output related to the current campaign
Commands and Sandbox user db text
Commands in sandbox mod can be done in two ways.

  1. Text Input commands
    summon, lu_bu, player , 4 kill, dong_zhou, 53 kill, 53
  2. User text file commands
    TheG.action.summon, lu_bu, player , 4, 1 TheG.action.kill, dong_zhou, 53, 1

The user text file command that has been entered requires a 'action turn' to be specified, so you can see that there is one more option after the command line. The user text file is described in detail below.

Data information is required to simplify the use of commands in sandbox mod. If no information is available, the user must use the full data key to issue the mod command.

summon, 3k_main_template_historical_gan_ning_hero_fire, 3k_main_faction_cao_cao, 4

The above command is same as shown below in the Sandbox Input window.

summon, gan_ning, cao_cao, 4

For your convenience, the data information in the sandbox mod is set as follows.

  1. Input Panel
    alias, shadow_runner, 3k_main_ancillary_mount_shadow_runner alias, jade_seal, 3k_main_ancillary_accessory_imperial_jade_seal
  2. User text
    TheG.db.item.alias, shadow_runner, 3k_main_ancillary_mount_shadow_runner TheG.db.item.alias, jade_seal, 3k_main_ancillary_accessory_imperial_jade_seal

Based on the above information, you can enter the following simple command into the input box.

steal, shadow_runner, cao_cao steal, jade_seal, sun_jian

Text files are described in more detail later in this guide.
Locale : kr, en, zh, cn
Version 1.2 supports English locale and from the v1.4.0 Traditional Chinese input is possible. And 1.7.0 Simplified Chinese Support. English version users can type keywords in English and messages can be viewed in localised general's names and item's names in 'en' locale. There is no additional sub-mod to install.

locale locale, en/kr/zh/cn

If there are no arguments to the locale command, the current locale is displayed.

Since version 1.3.4, 'en'/zh/'kr' locale switching is possible with a 'locale' button click.



When you run mod for the first time, you need to run the following commands

locale, en out_text reload

'out_text' command will generate 2 text files in your 'game/sandbox' directory.

sandbox_user_script.txt sandbox_user_db.txt

In user script file, 'TheG.mod.locale, kr' command line of the file should be changed to 'en'. Then you don't need to command 'locale, en' in sandbox input everytime you start a game.

TheG.mod.locale, en #change default locale to 'en'

For curiosity, sandbox mod messages looks like follow in Chinese locale.

Understanding sandbox mod : How to find command target efficiently
Understanding sandbox mod : How to find command target efficiently

  1. This mod can not force users to use 3K general's full data key.

    search, 3k_main_template_historical_lady_sun_shangxiang_hero_fire

    search, sun_ren

    The sandbox adds an underscore to the general's English name and uses it as a key value.

    Cao Cao = cao_cao, lady_sun_shangxiang = sun_ren, Liu Bei = liu_bei

    It's efficient and fast key generation and comparison. The key values are defined in the sandbox Google Sheet[docs.google.com]

  2. Searching by name vs searching by key is RAM speed vs HDD speed.

    search, ladysun

    Searching by name through engine API effect.get_localised_string(names_name_123456) two times to get sur-name and fore-name per every name comparison.

    Localised string can find at user's HDD file : game/data/locale.en.

    search, sun_ren

    The key 'sun_ren' is registered and sandbox mod knows sun_ren's CQI for fastest searching. CQI is a index of array of all general in game. It's a RAM speed searching.

  3. This mod searches target by key first, then searches target by name within player's faction.

    Sandbox mod knows whetherregistered generals are on the map or not. So, searching registered general is fast enough. If the search fails, search the player's faction by name. If it fails, only the 'search' command searches entire general on map by name. It's brute force and slow. Therefore, it often takes more than a second.
Getting started
This mod is hard for the first user.

This mod can only be easily understood at the user level using Windows PowerShell and have a good understanding of 3K

The easiest way to get started is to follow along.

  1. Go to the section precaution of this guide and browse to the corresponding 'user_script' text file in your computer. If it exists, it should be deleted
  2. In Mod Manager, drag this mod to # 1, on top
  3. Start the game as Cao Cao faction in "Three Kingdoms Early"(190) campaign
  4. Click the "S" icon at the top to pop-up the sandbox console panel
  5. Press "Execute" button
  6. Press the 'up arrow' on the right side of the input box to navigate the command lines
  7. Keep executing
  8. It does not matter if there are commands that are not executed properly. It's always happening.
  9. Stop when the 'log_level' command is appeared
  10. Command 'out_text' and see if two text files is created in the '$(game)/sandbox' directory
  11. Command 'summon, zhao_yun, player'
  12. If 'Zhao Yun' is summoned, you're ready to use this mod
  13. Exit the campaign and enjoy your journey
Input Panel Histories and commands
  1. Command History feature

    Entered commands can now be saved and restored via the Save and Load buttons in the input panel. Command history saved as a default file is automatically restored when the next sandbox is executed.

    • If you press the save button, the history of the currently entered commands will be saved as 'default_histories.txt' in the '$(game)/sandbox' directory.
    • Loading will restore the above file contents again.
    • History storage file and history amount can be specified.
      save save, summon.txt save, Lu_Zhi_traits.txt, 10
    • Using only the save command saves it as 'default_histories.txt' as if you had clicked the save button.
    • If a file path / name is specified, output is made to that file. The directory separator must be separated by the '/' character, and the directory must exist under the 'game/sandbox' directory. File names must not contain space characters or special characters.
    • You can specify the amount of history to save as a number. The above example saves the history of 10 commands entered later to the specified file.
    • History recovery is the same as saving.
      load load, summon.txt load, Lu_Zhi_traits.txt, 10

    • top, bottom & goto

      You can change the position of the command line in the history of the input window. 'top' moves to the top. 'bottom' is moved to the bottom and you can specify 'offset' as a parameter.

      top, 5 bottom goto, 12

    • History file usage example

      The default history file, $(game)/sandbox/default_histories.txt, specifies the part that loads the other history and sets it as a 'read-only' file.

      load, input_dev.txt load, input_mtu.txt load, input_wu.txt

      Each different file can be combined with the 'save, load' command to easily manage and use multiple history files.

      save, input_mtu.txt load, input_mtu.txt find_item, line_breaker steal, dong_zhuo, line_breaker find_item, phoenix_beak steal, yuan_shao, phoenix_beak find_item, hidden_flow give_item, player, hidden_flow find_item, empty_lunchpail steal, han_fu, empty_lunchpail bottom, 2

      From sandbox 2.0.0, "Save" button saves histories to the recently loaded file instead of default histories. It is possible to cycle through several history files in order of 'Load button(default)'-> "load, summon.txt" -> Save button(summon.txt) -> 'Load button(deafult)'.

  2. batch

    batch, [$(game root/sandbox)/]filename batch, tke_early_setup.txt batch, summ_5heroes.txt

    Runs all commands in the specified file(in sandbox directory) sequentially. All notifications are not output during sequential execution.

  3. run

    run, [$(game root)/]path/filename run, sandbox/inspect_hero.lua

    Executes external 'Lua' file.

  4. console_log

    console_log, [true/false]

    You can output the log of the input panel to "TheGathering_input_log.txt" file in the game root directory.


  5. destroy

    destroy

    This removes the menu button, input panel UI, and close all external interface in this mod. There is no way to start UI running again until a new game or save loading.
Instant commands
Immediate command is a command that works only in the input window. Commands that need to be executed dynamically such as 'search' and 'heroes' commands.


  1. search

    search, dong_zhuo search, 7

    The search command finds generals and displays the generals with duplicate names. In case of 3 people, the bottom of the notification may be cut off due to UI size limit. You can also search by general number(In other words: command queue index).

    This command also shows information about 'is spy', 'in recruitment pool' and 'is dead'.

    The information of searched hero is outputed to '$(game)/sandbox/log_sandbox.txt'.

  2. where

    where, cao_cao

    This command find the military force embedded 'cao_cao' hero or the capital of 'Cao Cao faction', then move camera to that object. 'Where' command make the region visible in the shroud(fog of war).

  3. show

    show, [region/world/shroud] show, luoyang

    The 'show' command saves the current status of the 'map shroud' and allows you to view the 'region' or 'entire map'.

    The codes for each region are in Google Sheets [docs.google.com].

    option 'shroud' restores the map's shroud to the state before the 'show' command.

  4. give_exp

    give_exp, hero, 0 ~ 1000000 give_exp, cao_cao, 50000

    Give XP to a hero. Even if you give 1000 XP points, it will not be exactly 1000 XP points with additional effects from the current rank of techs, building effects, and officer's effects, and will be given an increased XP with various effects applied.

  5. find_item

    find_item, shadow runner find_item, 3k_main_ancillary_weapon_bow_bao_gong_faction

    Determines whether an item exists on the current map, whether it is a faction or a hero.

    Currently, the collapsed faction has items, which hinders the use of unique items. The "find_item" command also searches for items of the collapsed faction and removes them if found.

  6. force_kill

    force_kill, 53 force_kill, dong_zhuo

    Forcibly kill hero without conditions. Even a faction fact leader and commander of army will be killed immediately.

    This command is not performed if the "Hero Details" panel is opened on the game screen, or if the target hero is selected in the game to prevent CTD(crash to desktop).

  7. teleport

    Designate a commander who leads an army and teleport the hero to the target region. The codes for each region are in Google Sheets [docs.google.com].

    teleport, Liu_Bei, luoyang teleport, 馬超, 洛陽

    Whether or not teleportation will happen depends on whether or not the CA engine can find a 'place to summon' in the area. I didn't go to 'dirty-work' which includes 'coordinates' in the mod by traveling around 200 areas and checking validity of the coordinates.

  8. raze

    raze, luoyang_1

    Raze the settlement or building in the region and abandon it.

    In TK 1.6.1, "raze" command also works for the "Pass"es.

  9. can_federate

    Check for possible confederation between factions.

    can_federate, liu_biao, yuan_shu

    The faction in the front are 'federator' and the faction in the rear are 'federated'.

    Whether the confederation is possible is entirely determined by the CA engine.

  10. heroes

    heroes heroes, han_empire heroes, dead heroes, pool heroes, 1 # faction CQI

    Outputs all the heroes of the faction to log files. Han Empire is about 130 generals in the initial stage of tke campaign. The main use of this command is for mod development and debugging. Also this command is useful when some TW:TK patch changes faction's behavior.

    The information of faction heroes is forcibly output to a log file even when the file log function is turned off.

    If there are no command arguments, it outs a list of heroes in player faction. The "pool" option outs a list of all "historical" heroes in the recruitment pool, and "dead" outs all of the dead historical heroes.

    Among the listed heroes, "Un-registered" means clone. Use the "clones" command to view the Garrison Clones (Castellan).

  11. clones

    clones clones, han empire clones, 1 # Faction CQI 1

    If no option, Displays the number of all characters currently in the game.
    ( Historical heroes / Clones / Gerrison guards / Rebels)

    The rebels are the factions that exist in faction CQI #1, and you can assume that they are waiting to be put in when the rebellion occurs. Currently, there is a report that spawners in other modes sometimes enter the rebel faction.

    To view the list of rebels, you can specify the faction CQI with the command "clones, 1". The "clones, rebels" command is ignored by Sandbox.

    "Castellan" means garrison guards(clone) for each settlement. Castellan cannot be the target of sandbox commands. There are a few commands that can target Castellans using CQI, but it may cause CTD.

  12. db commands

    db.name, ma_lanli, Hua Lanli db.class, huang_yueying, earth db.info, huang_yueying

    db.info command can check the hero information currently registered in the sandbox.

    For the above commands, see "User Text: db Longevity Data" section below.

  13. notify.show

    Show all recent notifications. There is a 1,800 character limit.

    notify.show

  14. notify.duration

    Specifies the duration of the advice notification panel.

    notify.duration, 5

    The duration ranges from 2 to 20 seconds.

  15. locale

    Change or show the language settings currently used by the sandbox.

    locale locale, kr/en/zh/cn

  16. turn

    Shows the current turn number.

  17. out_log

    Output the log to the log file ("game/sandbox/log_sandbox.txt"), or stop the output.

    out_log, true/false

  18. log_level

    Specifies the amount of log information to output. 0 to 5 (Error to Verbose) levels. The default is 3 (Debug).

  19. out_text

    Create two text files, 'sandbox_user_script' and 'sandbox_user_db' in the "game/sandbox" directory.

    out_text out_text, simple, en

    This mod reads only two files: 'sandbox_user_script' and 'sandbox_user_db'. If there are no two files, the default setting works. Deleting all text files does not affect this mod operation.

    If the text files already exist, not overwritten.

  20. reload

    reload

    This will reload user script and db text files.

    If you are testing a new general or the new illustration mod, this command is often used with the 'change' and 'kill' command.

  21. reindex

    reindex

    Renew the general's index and death status of the general registered in the sandbox. This is a debugging command for advanced user.

  22. destroy

    destroy

    Removes the menu button, input window UI, closes all external interfaces in the sandbox mod. There is no way to restart it running until a new game/save load is made.
Instants Commands : Imperial
  1. imperial

    • imperial.token
      imperial.token, faction
      imperial.token, Liu Bei # Establish 'Liu Bei' as the 'Imperial Protectorate'

      Establish the faction leader as the 'Imperial Protectorate'

    • imperial.favour
      imperial, favour, player/faction, amount(-100~100)
      imperical.favour, liu_bei # Shows "Imperial favour" amount imperical.favour, player, 30 # +30 'imperial favour' to player imperical.favour, cao cao, -20 # -20 'imperial favour' from 'Cao Cao' faction

      Increases or reduces "Imperial(Emperor) Favour" to/from a faction
Action commands
In the sandbox, an action command is a command that runs in both the user script text and the input box. These are commands that can be executed by specifying turns, and can also be executed from the input panel at any time.

It is dangerous for the 'summon' and 'kill' commands to be used immediately in the forces to the hero of the special position in the faction and the hero with army in the game map. This is because if the general disappears in the middle of player's turn, many of the vanilla scripts can be confused.

So, the summon and kill commands to such heroes are scheduled and executed at next turn.

  1. kill

    The 'faction leader' and 'commander' who are leading the army on the map are special, so kill orders are processed after the player turn is over. All other heroes are killed immediately.

    To force kill immediately, use the 'force_kill' command.

    In the input panel...
    kill, hero kill, hero, cqi kill, cqi

    You can find the hero's CQI number by searching for heroes with the 'search' command. CQI number is more efficient and fast.

    In the user script text file...
    TheG.action.kill, hero, [CQI], turn

    The faction leader or commander is dangerous to run in your turn, so it runs during each faction's turn.

    If you don't know the hero's CQ and want to kill by name only, enter a space, such as ",,". The 'kill' command can also be targeted by hero's CQI number just like any other command.

  2. reform

    reform, player/faction/all/others, 0~7 reform, player, 3 # Player faction reform every 3 turns reform, player, 0 # Complete reform instantly reform, all, 3 # All 'Han empire' culture factions reform in 3 turns TheG.action.reform, cao_cao, 3 # No 'turn' parameter. Always 0 turn command.

    This applies only to the "Han" culture, not to Bandits, YTR, and Nanman. Adjust the cooldown at the beginning of each turn.

    Specifying "0 turn" will immediately complete any reforms currently in progress, allowing you to start a new one.

  3. capital

    capital, liu_bei # show faction's capital region name capital, liu_bei, donghai # transfer capital to target region TheG.action.capital, han_empire, changan, 1

    Move the capital of the target faction to the specified region. After transferring the capital of a faction, you cannot transfer the capital again for 10 turns for that faction.

  4. federate

    Make a confederation against AI factions. The player faction cannot be the target of this command. To make a confederation with player factions, use the external trainer's 'Diplomacy always success' option.

    can_federate, liu_bei, kong_rong federate, liu_bei, kong_rong TheG.action.federete, yuan_shu, liu_biao, 1 # 0 turn confederation TheG.action.federete, yuan_shu, liu_biao, 2 # confederation at turn 2

    'A' faction incorporates 'B' faction. All heroes are absorbed, including the leader of the target faction, but some heroes are either freed to FA, or killed (cause FACTION_DEATH). For some famous hero, sandbox attempts to spawn again, but not all succeed.

  5. treasury

    treasury, faction/all/others/player, -1,000,000 ~ 1,000,000 treasury, player, 3000 treasury, player, -3000

    An order to fund a target faction. You can give treasury to 'all' faction or 'other AI' factions.

  6. reset_skills

    reset_skills, general

    Initializes the target general's skill tree.

  7. rank_up

    rank_up, general, rank

    Increases the target general's experience to near rank specified.

  8. set_title

    Give the hero a unique title or replace it with another title.

    set_title, emperor_ling, The Great Emperor of the Han set_title, liu_xie, Lord Dong set_title, xiahou_dun, The One-eyed Exile set_title, emperor_ling, emperor_ling_great # by sandbox key of the title

    The above three illustrated titles are 'double titles'. 'xiahou_dun' have 2 unique titles, 'Hot-headed Officer' & 'The One-eyed Exile'.

    Titles can be entered by name or key values. See the Google Sheet.

    set_title, cao_cao, sun_jian

    The target of the 'set_title' command may be of different hero. Above command gives 'cao_cao' the title of 'Tiger of Jiangdong'.

  9. set_undercover

    set_undercover, general, (true/false)

    Set or unset general's undercover ability.

  10. add_position
    add_position, [faction/player], [position title] add_position, Cao Cao, Yellow Dragon TheG.action.add_position, [faction/player], title, turn

    The hero positions are "position titles" that can be given to heroes from the faction, such as "Yellow Dragon" and "Iron General". These positions are unlocked when certain conditions (100 wins) are met in the game.

    The 'add_position' command unlocks the specified position title.

    Currently (TK 1.6.1), "Iron General" is not unlocked. It seems to be a CA engine problem.

  11. post.leader

    post.leader, faction, hero post.leader, Liu Bei, Zhang Fei

    Replace the leader of the specified faction.

  12. post.heir

    post.heir, faction, hero post.heir, Liu Bei, Zhang Fei

    Replace the heir of the specified faction.

  13. child_of

    child_of, hero, parent child_of, Zhang Bu, Zhang Fei

    Set the parent of the hero. At this time, if the child hero already has a parent, the relationship is maintained. Fow now, you can set up a new parent, but you can't delete an existing parent relationship. The concept of adoption is in 'TW: TK', so think of it as 'adoption'.

  14. cancel

    If summon, kill, etc. are scheduled for the next turn, cancel the summon, kill command that you entered previously.
Action commands : summon & age
The summon command may move a hero to another faction, or create a hero that does not exist on the map. You can designate allies or other AI factions as the target of the summoned hero.

Depending on the version of the patch, the CA engine showed several behaviors for the same API.

Since the patch version 1.4.0 all longevity will be summoned immediately.

The usage of the summon command is as follows.

summon, hero, faction, skill rank summon, zhang_fai, liu_bei, 4 summon, zhang_fai, player summon, zhang_fai # default faction is player

Skill rank (level) can be omitted. If omitted, the skill rank is set within the default random level (usually 1 to 3) set in the CA database. In the case of Zhuge Liang and Sima Yi, the 7 is set in the vanilla database.

The faction of the option can be omitted. If omitted, it will be automatically assigned to 'player'.

Summon command have different behavior depending on the target hero's current state.

  • Hero already on the map

    Heroes already on the map will be moved to other forces and make the hero recruited.

  • Heroes in the recruitment pool

    Heroes is the recruitment pool will be moved to other forces and make the hero recruited.

  • Hero is a leader of a faction

    In the case of the 'faction leader', hero may or may not be summoned by the engine depending on the patch version. Experimental spirit is required.

  • Hero is not on the map

    Spawn a new hero.

    Age is an issue when creating a new hero. None of the open CA APIs allow you to modify the hero's 'age'. Therefore, it will be summoned to the age range currently defined(0~80) in the CA database.

    The sandbox provides a 'Spawn age pack' by modifying the age table for named heroes. This table is a variation of the age of 'named hero' summoned to 18, regardless of the current year of the game.

    'Name heroes' [docs.google.com]

    'Sand spawn age pack'[drive.google.com]

    The 'Spawn age pack' should be placed in the ($game)/data folder to spawn non-exist young heroes to 18 year old.

    If the 'Age Range Table' of another mod is in the form of 'movie' in the $ (game)/data folder, or if it is 'top' in the mod manager's order, the hero will be summoned according to the definition of that 'age range table'.

  • A New Hero

    New hero who is not in the vanilla database, should be registered to the sandbox db before summon. The description of the user db text is at the bottom.

    In particular, if you are using an MTU or Wu mod, please see the section on this guide for your particular mod.

  • A minor hero is on the map

    Minor heroes that already exist are known as 'Ma Chao', 'Sun Ren', 'Cao Zhang', and 'Cao Pi'. Minor heroes in mods (MTU, Wu, etc.) are also included such as 'ma_yunlu'

    If you want to kill minor heroes and summon them to age 18, install the "Sandbox Spawn Age Pack" described above.

summon.dlc 명령
    This command can be used if you own and have the Eight Princes DLC installed.You can summon the unique 8 Princes from EP DLC to main campaign. In this case, the EP general will be summoned immediately when you execute a summon.ep command.You can instantly summon all eight unique princes at your turn in main campaign, and bring them to your troops for a battle awaits you on the campaign map.
    1. Summon ep generals to main campaign



      summon.ep, sima_liang, player, 4

    2. Summon main+ytr generals to ep campaign

      summon.main, cao_cao, player, 4

      Summoned Generals will join without any unique items except Unique Armor. However, depending on the patch, the unique weapon may go to a different general, and in some cases the unique weapon cannot be removed. so it's unstable now.

    3. Summon.moh command in MoH DLC

      The usage is the same as the Eight Prince. The command uses 'summon.moh'.

      summon.moh, lu_zhi, player, 4 summon.moh, he_jin

      summon.main, sun_ren, player, 4 summon.main, zheng_jiang
Action commands : Trait
There are two categories of traits in 3K, personality and physical, but in reality, they work as two categories of traits, normal and incapacity traits.

The maximum number of traits a normal trait can hold is 7, and you can only have one incapacity trait. In this guide, there are two categories: normal and incapacity.

  1. Normal traits

    In user text file

    TheG.action.trait, general, (add|remove), trait key, turn TheG.action.trait, cao_cao, add, brave, 1 TheG.action.trait, cao_cao, remove, brave, 1 TheG.action.trait, cao_cao, remove, all, 1

    In sandbox input

    trait, general, (add|remove), trait key trait, cao_cao, add, brave trait, cao_cao, remove, brave trait, 23, remove, all

    Since version 1.3.5, 'general number' can be used instead of general key'. General numbers can be viewed with the 'search' command and in user db txt's general parts if the general is startpos general.

  2. Incapacity traits

    A general may only have one Disability Trait. You can give/remove these traits too.

    scarred, ill, poxxed, sickly, maimed_arm, one-eyed, maimed_leg, sprained_ankle

  3. Legendary Traits

    There are three legendary traits: early, middle and late. It is clear that there is a difference in growth by gaining experience when the general rank is low, medium and high. When skill rank is low, early is beneficial to general ability growth.

    TheG.action.trait_legendary, general, (add/remove), (early/middle/late/any), turn

    A General can only have 1 Legendary Trait, and granting a new Legendary Trait will erase the old one. To remove an existing legend trait, either grant a new legend trait or use the 'remove, any' option.

    trait_legendary, sun_ren, remove, any


  4. New Auto-Trait feature

    Newly joined heroes in player faction are automatically given a set of assigned traits. Define the following in the user db text file.

    TheG.db.trait.set.Charm Bump, charismatic, beautiful, graceful, kind TheG.db.trait.default.sun_ren, Charm Bump, brilliant, 聰慧機敏

    This is a sample that grants the specified 'Charm Bump' trait set and 'brilliant' trait when 'sun_ren' is newly joined to player faction according to 'TheG.db.trait.default'.
Action commands : Item
  • find_item

    find_item, 3k_main_ancillary_weapon_one_handed_axe_exceptional find_item, shadow_runner

    Find a faction or a hero who owns the item. The item aliases/keys are listed in the sandbox Google sheet. Item alias can be set in the user db text.

  • give_item

    give_item, 3k_main_ancillary_weapon_one_handed_axe_exceptional, player, 1 give_item, Shadow Runner, cao cao give_item, Shadow Runner

    Give item(s) to the target faction. Unique items mean no more than '1' for vanilla, but you may be able to use the unlock unique item's limit mod.

    Exceptional items are also known to have a limit of 20 pieces each.

  • give_set

    give_set, celestial_fury, Liu Bei give_set, celestial_fury

    Offers the set of items defined in the vanilla DB or in the user db text. Each item in the set is affected by its own restrictions and permissions.

  • all_item

    TheG.action.all_item, campaign.tier.class TheG.action.all_item, main.legendary TheG.action.all_item, main.unique all_item, main.exceptional.follower -- text input

    In the same way as above, you can get the entire item group according to the item classification.

    The item tiers are as follows:

    • unique
    • legendary
    • exceptional
    • refined
    • common

    The item classes are as follows:

    • armour
    • accessory
    • follower
    • mount
    • weapon

    The all_item command in users script text file gives the player a presorted item at turn 0.

    #TheG.action.all_item, main # 263 ( 2020.03 ) #TheG.action.all_item, main.legendary #TheG.action.all_item, tke.unique #TheG.action.all_item, main.exceptional.follower #TheG.action.all_item, tke.refined.accessory #TheG.action.all_item, ytr # 34 #TheG.action.all_item, ep # 26 #TheG.action.all_item, moh # 24 - dlc04 #TheG.action.all_item, all # 374

    The 'all_item' command gives the player the items that are presorted in the sandbox mod. Item classification can be specified in three levels( campaign, tier & class )

  • remove_item

    remove_item, 3k_main_ancillary_mount_shadow_runner remove_item, shadow_runner, cao_cao remove_item, 3k_main_ancillary_accessory_erya, player, 2 remove_item, 3k_main_ancillary_accessory_erya, cao_cao

  • steal

    steal, sun_jian, 3k_main_ancillary_mount_shadow_runner steal, cao_cao, shadow_runner

    Before using the 'steal' command, it is important to first identify which faction or general owns the item with 'find_item' command.

    If the faction name and hero name are the same, 'find_item' command search 'cao_cao' faction first, then search for the 'cao_cao' hero and rob it.

    Unique armor cannot be robbed. Also, depending on the patch, certain items may not be stolen.
Action commands : Emergent
  • Emergent command
      A emergent faction refers to designating a specific general as the faction leader at one or more'settlements', summoning the designated members to the faction, and then making one army appear on the map.If you summon/create many heroes (especially with unique models and instructions) on turn 1, there may be a lag until the start of the first turn after loading the campaign.
      emergent, xiapi, lu_bu, diaochan emergent, xiapi, xuexian, lu_bu, diaochan, zhang_liao, gao_shun, lu_ji
    • Settlement

      Settlement must specify at least one. There is no set maximum number.

      The initial beginning on the command parameter begins with a settlement, and you can make multiple settlements occupied by the faction while continuing to add settlements.

      The first settlement has a special meaning. The first settlement becomes the capital of the faction. In the example above, 'Xiapi' is designated as the faction capital.

      The name of the 'region' to which the first designated settlement belongs is the actual name of that faction. In other words, if <Jiangling, Jingzhou> settlement was designated for the first time, the actual faction name of that faction would be "Jingzhou".

    • Faction leader

      The settlement designation on the command line ends, and the first hero to appear becomes the leader of the faction. In the example above, 'lu_bu' becomes the leader of the faction, and it appears as the'lu_bu' faction on the screen.

      Even if the faction name displayed on the game screen appears as 'lu_bu', the actual faction name is the name of the first settlement, "Xiapi". If you use the 'search, lu_bu' command, you can see the message 'Lu Bu is in the Xiapi faction'.

      The setting of 'Nanman', 'Bandit', and YTR hero as faction leader has not been sufficiently tested. If possible, use the hero of the 'Han' culture.

    • Name of the faction

      The factions that can be used for each campaign are set in the "startpos map". For example, "kong rong", "tao qian" and "lu bu" faction cannot be used in the "guandu" campaign, but if you modify the startpos map, you can use the "lu_bu" faction in the 'guandu' campaign.

      Modifying the startpos map will make it incompatible with the existing overhaul mods, so this is something I can't do in Sandbox mod.

      If the map allows the original faction name of the faction leader to be used, the actual faction name of the faction generated by the 'emergent' command will use the original faction name of the leader. If the original faction of the faction leader is not available on the map, it will be the name of the region to which the first settlement belongs.

      Therefore, if you use the "emergent, xiapi, lu_bu" command in the "Guandu" campaign, the faction name to which lu_bu belongs is "Xiapi". In the "Mandate of Heaven", "TKE" and "A world betrayed" campaigns where "Lu Bu" faction' is available, "lu bu" becomes the actual faction name.

      This can be a bit confusing, so after using the command, check the actual faction name with the "search, lu_bu" command.

      There are factions that cannot be used for each campaign.

      "MoH" -> "Sun Ce", "zhang_xiu", "Shi Xie" and etc
      "TKE" -> "Sun Ce", "Lu Zhi", "Zhang Xiu" and etc
      "AWB" -> "Lu Zhi", "Tao Qian", "Sun Jian" and etc
      "FD" -> "Kong Rong", "yuan Shu", "Lu Bu" and etc

      If a mod with a startpos map has modified the available faction data, this mod will automatically detect and utilize the faction leader's origin faction.

      The origin faction of the leader and the faction in the form of "commandery" differ greatly in AI personality and expansion. In order for a new faction to utilize the propensity of a faction leader, it is recommended to create the emergent faction in a campaign that can use that faction.

    • Faction members

      Faction members will spawn if they are not currently on the map, and the hero created on the map will be transferred. There is no limit to the number of faction members.

    • Army on the map

      Currently, one army is formed and placed around the capital of the faction. The army consists of the faction leader and the two in front of the faction members. In the example above, one army will be composed of "lu_bu", "diaochan", and "zhang_liao".

    • Precautions
      • I don't know how it will work in the 'Eight Princes' campaign.
      • There is currently no way to create a YTR, Bandit, or Nanman faction.


  • Emergent command in user script

    The emergent command specified in the user script is an automatic 1st turn command, so there is no option to specify a turn.

    • User script
      TheG.action.emergent, xiapi, xuexian, lu_bu, diao_chan, zhang_liao, gao_shun, lu_ji

      Command usage in the script is the same as that in the console.

    • Commands after spawning a faction

      TheG.action.emergent, xiapi, xuexian, lu_bu, diao_chan, zhang_liao, gao_shun, lu_ji TheG.action.rank_up, lu_ji, 4, 1 TheG.action.treasury, xiapi, 10000, 1

      After emergent command, commands for the created factions will be available. Members are also created on the map, so they can be subject to commands.

  • Configurations of emergent faction by campaign

    In Sandbox mod, you can separate user scripts by campaign.

    Main
    sandbox_user_script.txt
    Three kingdoms early
    sandbox_user_script_tke.txt
    Mandate
    sandbox_user_script_moh.txt
    Fates Divided
    sandbox_user_script_fd.txt

    The main 'sandbox_user_script.txt' is read first and processed, and the 'sandbox_user_script_[campaign abbreviation].txt' corresponding to the campaign is read and processed.

    The [campaign abbreviation]s are 'moh', 'tke', 'wb' and 'fd'.

    In 'Mandate of Heaven' campaign, you can use the commands as follows.
    #sandbox_user_script_moh.txt TheG.action.emergent, xiapi, xuexian, lu_bu, zhang_liao, hao_meng, gao_shun, diao_chan TheG.action.treasury, lu_bu, 10000, 1

    In 'Fates Divided' campaign, you can use the commands as follows.
    #sandbox_user_script_fd.txt TheG.action.emergent, xiapi, xuexian, lu bu, diao_chan, zhang liao, gao_shun, lu_ji TheG.action.treasury, xiapi, 10000, 1
Action Commands : Effect part 1 (ef_xxxx)
In TW:TK 1.6.0, CA reinforced the faction bundle effects for 'Nanman' tribes.

The Effect bundle API allows sandbox to grant special effects to factions, heroes, troops, and regions. Sandboxes mainly use faction effect bundle, and there will be only a few effect commands for individual hero.

Effect bundle commands

Faction effect : ef_resilience, player, 1 # 0, 1 = +resilience ef_exp_bonus, others, 25 # 0, 25/50/100/200/300/400/500% ef_satisfaction, player, 10 # 0, 10/20/30/40 + satisfaction ef_job_satisfaction, player, 2 # 0, 1/2 # 1 = reduce, 2 = ignore ef_recruit_rank, all, 2 # 0, 1~5 rank ef_armies, player, 3 # 0, 1~10 units ef_governors, cao_cao, 3 # 0, 1~10 appointments ef_assignments, others, 3 # 0, 1~10 assignments ef_deploy_cost, player, 30 # 0, 10/20/30/40/50% increase ef_retinue_upkeep, cao_cao, 30 # 0, 10/20/30/40/50% increase ef_force_movement, others, 30 # 0, 10/20/30/40/50% increase ef_salary, others, 100 # 0, 10~100% reduce Non Chinese sub-culture faction : ef_research_rate, player, 100 # 0, 100/200/300/400/500% increase Individual hero effect command : ef_presented, hero # +40 satisfaction effect to hero

If you want to use an effect command same as configurations, put it in your user script as shown below. It will be executed before you enter the game.
TheG.action.ef_force_movement, player, 30, 1

Faction effect commands
    The faction effect command is to give an effect bundle to a faction, and the target of the effect will be the hero, region, army, etc. belonging to that faction.The target of the faction effect command is a faction (Faction / player/ all / others ). "player" refers to the faction currently playing in the game, all refers to all factions on the map, and others refers to all other factions except the player faction.
    • Upper left corner on main game screen


      The some of faction effect bundles in the upper left corner of the game screen is also displayed as an icon, and you can also check it on the right side of the faction summary panel. Currently only (movement, research rate, satisfaction, job satisfaction) are displayed because of the space of UI. The Other effect bundles can check in various UI of game screen.

    • Right panel on faction details panel
  • ef_resilience
    ef_resilience, [faction/player/all/others], [] ef_resilience, player, 0 # remove ef_resilience, 한나라, 1 # + resilience to whom do not have one

    player = only player faction, others = all other factions , all = all faction on the map

    The "1" option gives the heroes of the specified faction +1 recovery life. It has no effect on legendary heroes who already have +1 resilience.
    Removes the effect given by "0". Legendary heroes has no effect.

  • ef_exp_bonus

    ef_exp_bonus, [], [] ef_exp_bonus, player, 50 ef_exp_bonus, sun_jian, 200 ef_exp_bonus, all, 0

    player = only player faction, others = all other factions , all = all faction on the map

    Gives a % experience bonus to the heroes of the specified faction.
    Removes the effect given by '0'.


  • ef_satisfaction

    ef_satisfaction, [], [] ef_satisfaction, player, 20 ef_satisfaction, liu_bei, 40 ef_satisfaction, all, 0

    player = only player faction, others = all other factions , all = all faction on the map

    Gives + satisfaction to the heroes of the specified faction.
    Removes the effect given by '0'.

    The degree of satisfaction given is displayed as "Recent Event" in the description of satisfaction icon in the hero detail panel.

  • ef_job_satisfaction

    ef_job_satisfaction, [], [] ef_job_satisfaction, player, 1 ef_job_satisfaction, cao_cao, 2 ef_job_satisfaction, all, 0

    player = only player faction, others = all other factions , all = all faction on the map

    Affects the heroes of the specified faction's "Dissatisfaction with Promotion Desire". Establishes the effect of reducing or ignoring the effect of desire for promotion on satisfaction and the decision to leave the faction. The red + number does not change in the satisfaction description of the hero detail panel.

    1 - Half the effect of dissatisfaction with heroes' desire for promotion
    2 - Ignore any complaints caused by the desire for promotion. It is visible on the screen, but is ignored internally by the game engine.
    0 - Removes the given effect


  • ef_force_movement
    ef_force_movement, [],, []

    Increases the movement distance of troops within the territory of own and allied factions. Each hero has a preset AP (action point). APs are spent on map actions such as movement, fortification, ambush, and occupation, and this effect reduces the AP cost spent on movement.

  • ef_deploy_cost
    ef_deploy_cost, [], []

    Reduces % of the cost of placing a hero's army on the map as an army and the cost of hiring a new unit by a hero.
    When applied to all factions, it increases the likelihood that the AI will use advanced units.

  • ef_retinue_upkeep
    ef_retinue_upkeep, [], []

    Reduces the maintenance cost of troops placed on the map.

    I don't know exactly how to calculate the maintenance cost reduction, but 10%~30% shows a 20%~50% cost reduction effect.

  • ef_salary
    ef_salary, [], []

    Reduce the cost of enclosing. "100%" means salary 0.



    Even if you set salary to '100%', it can be displayed as +25 salary in the details window of the hero, but the cost of salary for the entire faction is '0'.
Action Commands : Effect part 2 (ef_xxx)
The Steam Guide page has a limit of 8,216 characters. So I divide this section in two.

Faction effect commands part 2

Effect commands to increase the number of armies, governors, etc. These commands are not added when you set them up once and then set them up again, but later set to the specified number.

  • ef_armies

    ef_armies, [], []

    player = only player faction, others = all other factions , all = all faction on the map

    0 = Removes the given effect
    1~10 = 1 to 10 additional units can be created

    If the number of armies is increased and then decreased again, armies on the map will not be affected.

  • ef_governors
    ef_governors, [], []

    player = only player faction, others = all other factions , all = all faction on the map

    The number of governors that can be appointed increases. 0 removes the effect

    If the number of armies is increased and then decreased again, the number of governors decreases and some governors are lost. It can be different for each faction, so increasing and decreasing the number requires an experimental spirit. Change after quick save.

  • ef_assignments
    ef_assignments, [], []

    Add the number of hero who can be a assignment. 0 removes the effect

    If the number of assignments is increased and then decreased again, the number of assignments decreases, but the appointed heroes is not affected.

Faction specific effect commands
  • ef_research_rate
    ef_research_rate, [], []

    Speed up the research and development of factions with the Research Speed attribute. R&D attributes are not present in all factions, but depend on the "sub-culture" of the faction, and factions such as "Liu Bei" and "Cao Cao" are "Chinese culture", so they do not have R&D attributes. Bandits, Yellow Turban, and Nanman tribes have R&D properties.

    The "Research Rate" effect is not set for Chinese cultural factions.

    The current speed of research and development can be confirmed by looking at the top of the reform panel.

Hero individual effect commands
  • ef_presented
    ef_presented, []

    Grants a "presented gift" effect to the designated hero for 10 turns.
    The "presented gift" effect can be checked in the satisfaction description of the hero detail panel, and is the effect of +40 satisfaction.
Action Commands : Relationship (rel.xxx)
  • Hero's relationship commands

    This command establishes the relationship between heroes and is also calculated as intimacy inside the game. Intimacy ranges from -500 to 500, and if it is +300 or more, it is displayed as "Oaths worn", and if it is -300 or less, it is displayed as "Nemesis".

    Among the relationships between TW:TK heroes, a permanent relationship cannot be re-established. Permanent relationships are parent-child, childhood friend, old boss, start force brother(oath), and grave grudges of the past (family murder, faction betrayal, etc.).

    Intimacy between heroes is a measure of the accumulated effects of past events. When past events disappear from memory, intimacy changes. Permanent relationships do not disappear from memory and permanently affect intimacy. Each event has a different time to disappear from memory, and its influence on intimacy varies from small to extreme.

    For example, "family killing", "betrayal", etc., which are irremovable grudges, become "Nemesis" regardless of their intimacy. If the "brother(oaths worn)" are set as a start force relationship such as Guan Yu, Liu Bei, and Zhang Fei, their intimacy will not change forever. Even if the intimacy is very high due to good memories such as heroic victory and is marked as a subsidiary, if the intimacy decreases, you will eventually turn into a friend.

    The intimacy between the heroes has nothing to do with "harmony/disharmony" opinions.

    Harmony/disharmony occurs when heroes have the same or different opinions depending on the characteristics of the "trait" they have. Disharmony is changed by changing the trait of one hero. Heroes with disharmonious traits are in one army, and when battles are frequent and defeated, "bad intimacy events" continues to occur, eventually worsening the hero relationship.

    • Family
      rel.family, object hero, subject hero rel.family, Guan Yu, Guan Yinping
      • When set up as a family with a start force relationship
      • When a hero is born into a family in the game
      • Family relations between faction leaders have little effect on diplomatic relations

      This command establishes a start force family relationship, and adds intimacy to a very high past event relationship. If family heroes are in one army, the chances of increasing intimacy are slightly higher.

      Family heroes are unlikely to kill each other in battle, nor are they likely to be executed as prisoners.

    • Friend
      rel.friend, Xun yu, Xun You
      • When set up as a childhood friends with a start force relationship, It's permanent
      • It occurs when intimacy in the game increases by more than the certain value, and disappears when intimacy decreases.
      • Friend relations between faction leaders have some effect on diplomatic relations

      This command establishes a start force "childhood friend" relationship, and adds intimacy to a very high past event relationship.

      Even if the relationship deteriorates and becomes a “rival/nemesis” and the “friend” relationship disappears, the “childhood friend” relationship remains and there is little chance of killing each other in battle.

    • Brother(Oathsworn)
      rel.brother, Sun Ce, Zhou Yu
      • When set up as a "Oathsworn" brothers with a start force relationship, It's permanent
      • It occurs when intimacy in the game increases by more than the certain value, and disappears when intimacy decreases.
      • Oathsworn relations between faction leaders have huge effect on diplomatic relations

      Establishes a permanent start force "oathsworn brothers" relationship, and intimacy is set to the max permanently. Once this relationship is established, you will receive a buff when fighting on the same battlefield.

      Even in a family relationship, a oathsworn brother is set.

    • Master
      rel.master, boss, subordinate rel.master, Liu Bei, Sun Qian
      • When set up as a master with a start force relationship, It's permanent
      • A relationship arises when you become a leader/commander and subordinate in the game.
      • Master relations between faction leaders have no effect on diplomatic relations

      This command establishes the start force "old boss & subordinate" relationship.

      During a permanent relationship, it has little effect on intimacy, diplomacy, or combat. Affects the loyalty of the current faction to the faction leader.

    • Rival
      rel.rival, Guan Yu, Zhang Liao
      • There is no permanent Rival relationship.
      • In-game, it can be caused by victory or loss in battle and the dismissal of family-related heroes.
      • Rival relations between faction leaders have some effect on diplomatic relations

      Increases the chances of taunting and killing each other in battle. The relationship will continue to deteriorate if the enemy heroes are in one army/region/faction.

    • Nemesis
      rel.nemesis, Yuan Shao, Gongsun Zan
      • When set up as a nemesis with a start force relationship, It's permanent
      • In the game, you can become an enemy in cases such as execution of a captive family hero, faction betrayal, etc.
      • Has a very big impact on diplomatic relations.

      This command adds a start force nemesis relationship between heroes. Intimacy becomes worst, and there is little chance of recovery. The probability of declaring war on each other in diplomatic relations increases.

    • Improve
      rel.improve, Liu Bei, Cao Cao

      Add memories that significantly increase intimacy. Adding good memories to a high-intimacy relationship can lead to a friendship.
User text file : script
User text file: Turn-based commands can be set in the "game/sandbox/sandbox_user_script" file.

  1. TheG.mod.locale, kr
    script : TheG.mod.locale, (kr/en) input : locale, (kr/en)

    The default is kr. This should be changed to 'en' for English user.

  2. TheG.mod.log_to_file
    TheG.mod.log_to_file, (true/false), log level (1~4)

    The default is false, which does not generate log files. The default log level is 3. The higher the log level, the more detailed information in the log file.

    To active log ...

    out_log,true log_level, 3 TheG.mod.log_to_file, true, 3

  3. TheG.mod.reset_skills
    TheG.mod.reset_skills_when_join, (true/false) TheG.mod.reset_skills_when_start, (true/false)

    Resets the skill tree for the registered general when joins or when the game starts.

  4. TheG.mod.default_trait_set
    TheG.mod.default_trait_set_when_start, (true/false) TheG.mod.default_trait_set_when_join, (true/false)

    For hero set in the user db text as 'TheG.db.trait.default.(name)' or 'TheG.db.trait_set.(name)', the sandbox set the traits to hero automatically when the hero joins or when new campaign starts.

    This configuration is also automatically set when a player recruits a hero from the faction recruitment pool.

    The "default_trait_set_others, true" setting make Sandbox apply default trait_set to heroes in other factions too.

    Player heroes are applied at the beginning of the campaign and other faction heroes are at 1st turn of each faction.

  5. TheG.mod.default_title
    TheG.mod.default_title_when_start, (true/false) TheG.mod.default_title_when_join, (true/false)

    For hero set in the user db text as 'TheG.db.title.default.(name)', the sandbox set the title to hero automatically when the hero joins or when new campaign starts.

    This configuration is also automatically set when a player recruits a hero from the faction recruitment pool.

    The "default_title_others, true" setting make Sandbox apply default title to heroes in other factions too.

    Player heroes are applied at the beginning of the campaign and other faction heroes are at 1st turn of each faction.

  6. TheG.mod.ancillary_probability
    TheG.mod.ancillary_probability, (true/false), min(2~10), max(5~15)

    Reduces or increases the production cycle of ancillaries at occupied workshops. The default tier 3 workshop's cycle is 5-10.

  7. TheG.mod.ancillary_yield_ratio
    TheG.mod.ancillary_yield_ratio, (true/false), range(0.1~10)

    Adjusts item yield ratios when winning battles or capturing regions. The default is 1.0 times. This scale also increases / decreases the number of campaign start item numbers(default 2~4 items).

  8. TheG.mod.post_diplomacy_camera

    TheG.mod.post_diplomacy_camera, true/false

    The diplomatic screen that did not go through the faction diplomacy panel icon at the top left of the game screen do not restore the previous campaign map camera position after diplomacy ends, but remains in the full map state.

    1. Through right-click on lower-right faction panel
    2. Through double-click on name tag of other factions region

    This configuration restore the campaign camera position after diplomacy in case of 1 & 2.

  9. TheG.mod.skip_intro_cutscene

    TheG.mod.skip_intro_cutscene, true/false

    Skip the faction intro cutscene (camera moving + narration) that starts in the new campaign

  10. TheG.mod.loading_auto_continue

    TheG.mod.loading_auto_continue, true/false

    Click the "Start/Continue" button automatically after the campaign is loaded

  11. Absorbs heroes when the faction is destroyed

    TheG.mod.confederated_faction_heroes, none or TheG.mod.confederated_faction_heroes, named, refined, half, true

    The order of the options : Hero, Item, Gold, Clone kill

    In general, in the case of title holders, it is a famous hero, and it is common to absorb only them and kill the clones.(named, refined, half, true)

    This configuration applies equally to the confederation through 'diplomacy', and AI is also applied.

    If an opponent's settlement is destroyed by battle when there is one remaining settlement, the opponent's generals will be flagged with a "faction grudge" flag. This red satisfaction persists.

    With this configuration on, Sandbox absorbs the target faction's heroes before it collapses, so there is no "grudge". The AI will also execute less heroes.

    You can find out who is the named in this Gathering google sheet[docs.google.com].

    If the confederatee faction has over 20 items, all of the items not absorbed.
    If there are more than 20, the higher tier items will be absorbed first, and the lower tier can be discarded to avoid exceeding 40. When the game is lengthened, the few surviving factions that are left are more than 200 items, in order not to absorb common tier items that have become unnecessary in late game.

    When this configuration is on, confederator absorbs all items from the confederatee while absorbing the heroes. If the configuration is off, all items of the faction being confederated are removed.

    When a certain amount of gold is detected, the total gold is reduced and then absorbed. A certain amount is a number that far exceeds the gold average of the factions currently in the game.

  12. Auto-detect duplicated hero

    Detects duplicated historical heroes and clones, moves them to the 'Han Empire' faction, and kills them.

    TheG.mod.detect_historical_heroes_clone, false TheG.mod.detect_duplicated_name_clone, false

    historical_heroes = Detect duplicates of historical heroes in the TK database such as 'Guan Yu', 'Zhang Fei', and 'Ji Ben'. This is not clone, but a unique hero which is created by TW:TK event or other mod when the historical hero is already on the map. It will be moved to Han empire or such faction and killed at the end of the turn.

    duplicated_name = Detect clones who has the same name as the historical heroes in the TW:TK database, it will be killed at the end of the turn.

  13. Notification configuration

    When the general registered in the sandbox mod meets the specified conditions, a notification is displayed.

    • TheG.mod.notify.last
      When player turn started, show recent notifications.

    • TheG.mod.notify.died
      Shows the notification when the general registered in the sandbox mod dies.

    • TheG.mod.notify.goes_pool
      Shows the notification when the general goes to recruitment pool.

    • TheG.mod.notify.comes_of_age
      Shows the notification when the general comes of age.

    • TheG.mod.notify.join
      Shows a notification when common hero join an ally.

    • TheG.mod.notify.occupied
      Shows a notification when an AI faction occupies a settlement.


    • TheG.mod.notify.federated
      Shows a notification when an AI faction federates another faction.

    • TheG.mod.notify.duration
      Set the notification duration in seconds during AI turns. Notifications of your turn persist.

    Keep in mind. In the middle of an AI turn, notifications are reset every time the active faction changes, so increasing the duration does not keep all messages for a specified duration. Because of this feature, 'notify.duration' is often useless.
User text file : script : Action commands
In a user script text file, Commands are scheduled commands that be executed in a given turn. Setting it fun with other overhaul mods can also create a "gather your own heroes" campaign mod.

TheG.action.(command), general, faction, option, turn

Usage is preceded by the command 'TheG.action.' Is followed by the 'turn' option and is the same as using the sandbox input command. I will introduce action commands briefly.

  • Non-turn commands

    TheG.action.all_item TheG.action.num_lives TheG.action.ef_xxxx commands # effect bundle commands TheG.action.ef_armies TheG.action.ef_exp_bonus & etc

    The above commands in a user script file not accept a turn. Thease commands can be executed from time to time in the sandbox input panel.

  • Turn commands

    • TheG.action.summon, zhao_yun, liu_bei, 4, 1
    • TheG.action.summon.ep, sima_liang, cao_cao, 6, 1
    • TheG.action.summon.moh, he_jin, cao_cao, 6, 1
    • TheG.action.summon.main, lu_bu, ep_runan, 7, 1
    • TheG.action.kill, dong_zhuo,, 1
    • TheG.action.kill, dong_zhuo, 53, 1
    • TheG.action.trait, sun_ren, add, brave, 1
    • TheG.action.trait_set, sun_ren, sun_ren_set, 1
    • TheG.action.trait_legendary, sun_ren, add, early, 1
    • TheG.action.steal, shadow_runner, cao_cao, 1
    • TheG.action.give_item, shadow_runner, cao_cao, 1
    • TheG.action.give_set, celestial_fury, cao_cao, 1
    • TheG.action.rank_up, sun_ren, 4, 1
    • TheG.action.set_title, da_qiao, emperor_ling_great, 1
    • TheG.action.set_weath, sun_ren, 3, 1
    • TheG.action.set_undercover, sun_ren, true, 1
    • TheG.action.treasury_to_faction, sun_ren, 3000, 1
    • TheG.action.federate, liu_bei, tao_qian, 1
    • TheG.action.post.leader, liu_bei, zhang_fei, 1
    • TheG.action.post.heir, liu_bei, zhang_fei, 1
    • TheG.action.child_of, zhang_bu, zhang_fei, 1
    • TheG.action.teleport, sun_jian, badong_1, 1
    • TheG.action.capital, liu_bei, donghai, 1
User text file : script : The Gathering
"The Gathering" is a "policy add-on" that allows you to move certain heroes to their preferred factions, or fund the growth of certain factions, depending on the campaign map.

  1. TheG.mod.han_empire_independence
    TheG.mod.han_empire_independence, (none/high/med/low), (3~999)

    Support the independence of the Han Empire heroes. When a hero is independent, the sandbox gives a specific buff to the faction to help grow a little.

    You can designate a starting turn from 3 turns to 999 turns. The default 20 turns are specified in the user configuration file output as 'out_text'.

    You can specify the speed of independent rushes of the Han Empire heroes as high, med, low.

    high = Ten factions will start spawning from the specified turn, and will continue
    med = 2 or 3 factions per 2-3 turns.
    low = On faction per 3~4 turns.


  2. Three Kingdoms Early
    • TheG.mod.tke_liu_bei_to_jingzhou

      TheG.mod.tke_liu_bei_to_jingzhou, true

      When starting a new 'Three Kindoms Early' campaign with the 'Liu Bei' faction, the sandbox mod teleport the 'Liu bei' troops to Jiangling.

      The basic tutorial missions of 'Liu Bei', 'Defeat yellow turban', 'Dongjun', 'Langye', and 'Donghai' are automatically completed by the sandbox so that the mission line naturally flows to the 'confederate Liu Biao' mission.

      'Sun Jian' and 'Quan Rou' will be moved to a good location near 'Poyang, Copper Mine'. 'Zhao Bo' is 'yellow turban' can not be teleported. 'Zhao Bo' will remain in his place.
User text file : db
User text file: "game/sandbox/sandbox_user_db" is a text file that contains information for the command.

The information used for the game can be found at Sandbox Google Sheets [docs.google.com].

Item data

  1. TheG.db.item.alias
    TheG.db.item.alias, shadow_runner, 3k_main_ancillary_mount_shadow_runner TheG.db.item.alias, lady_sun_bow, 3k_main_ancillary_weapon_bow_lady_sun_faction

    Alias ​​commands, introduced in version 1.3.2, are commands that give long and long item data keys aliases, making them simple and straightforward. Aliasing the 'shadow_runner' and 'lady_sun_bow' as above...

    give_item, shadow_runner, player, 1 find_item, shadow_runner steal, shadow_runner, cao_cao

    This short command will be available. Aliasing is also possible in the sandbox input, but in that case it is not stored in the user db text.

  2. TheG.db.item.set.(name)

    Starting with version 1.3.2, you can define a item-set.

    TheG.db.item.alias, fortune_robes, 3k_main_ancillary_armour_strategist_light_armour_water_extraordinary TheG.db.item.alias, Imperial_bow, 3k_main_ancillary_weapon_composite_bow_exceptional TheG.db.item.set.celestial_fury, fortune_robes TheG.db.item.set.celestial_fury, Imperial_bow

    give_set, celestial_fury, player

    The above is an example of giving a set of items defined in the 'Celestial Fury' set. If a set has unique item(s) and that item already exists in the game, that set component may be excluded.

  3. TheG.db.item.(name)

    The Sandbox db text is categorized by item tier, type of ancillary and DLC. Each tier is treated as one set. TheG.db.gift command allows you to receive items on your first turn.

    In the sandbox input, You can use 'out_text, verbose' to create an eight princes db_ep text file containing a list of eighteen armor of the eight princes DLC.

    TheG.db.item.unique, 3k_main_ancillary_weapon_giant_mace_unique, 1, Giantbane TheG.db.item.ep_unique, ep_ancillary_armour_heavy_armour_fire_unique, 1, Dragon's Scales

    Item data line consists of ...
    • TheG.db.items.(tier)
    • Item data key
    • Number to be given
    • Default alias name(in Korean by now)

    I understand that there are no more than 1 unique and no more than 20 exceptional. Also, getting hundreds of items at once can cause the game to crash.

    Starting with version 1.3.5, this mod support default aliases for items. The above alias name can be used in the 'find_item', 'give_item', and 'steal' commands using the name 'Dragon's Scales' as the default alias.

  4. Google Sheet


    The item data is consists of follows.

    en name, kr name, zh name, cn name, dlc, tier, category, item ceo_key

  • Trait Data

    1. TheG.db.trait.set.(name)

      To use 'trait_set' command, the user db text should defined as:

      TheG.db.trait.set.charming, charismatic, beautiful, cunning, graceful, clever TheG.db.trait.set.charm_set, charming, heaven_creative, wise TheG.trait.set.Sun Ren, charm_set # default trait set for Sun Ren

      The 'en_key' and all names are can be used in command line. Even other trait_set can be used in command parameter.

      The command 'trait_set' can be run from the text of the user script and the input panel.

      If a hero name is used in the'trait.set' name, it will be the default trait set for that hero. The'default trait set' is automatically applied by the sandbox to the hero according to the configuration.

      User can define automatic trait settings with "TheG.mod.TheG.mod.default_trait_set_when_start, true", etc.

      TheG.action.trait_set, sun_ren, charming, 1 trait_set, sun_ren, charming

    2. TheG.db.trait.default.(Hero)

      The default auto-trait is a feature that grants a set of traits that are automatically set when a specified chapter is created or summoned.

      User can define automatic trait settings with "TheG.mod.TheG.mod.default_trait_set_when_start, true", etc.

      TheG.db.trait.default.sun_ren, charming_set TheG.db.trait.default.Cao Cao, earth_set

      The example above shows the default transcript settings for 'sun_ren' and 'cao_cao'. If you set as above and set 'default_trait_set_when_start' and 'default_trait_set_when_join' to 'true' in user script file, automatic trait will work.

      If you use a hero name in the'trait_set' name, it will automatically become the default set, so you do not need to set trait.default for such heroes.

    3. Google Sheet

      There are a total of 124 traits in Google Sheets.


      The trait data is consists of follows.

      en_key, en name, kr name, zh name, cn name, dlc, category, trait ceo key

      The 'en_key' and all names are can be used in command line.

    Title Data

    The title data is consists of follows.

    en key, ( en, kr, zh, cn ){ hero name, title name }, title ceo_key

  • TheG.db.title.default.hero

    TheG.db.title.default.Sun Ren, The rising of the sun

    Define the hero's default title. The default title is automatically assigned at the beginning of the campaign according to the configuration.

    You can set the default title behavior with configuration such as "TheG.mod.default_title_when_start, true", etc.

    If you set the default title to be assigned to heroes at the start of the campaign, the default title is set for the heroes of the player faction before the start of turn 1, and for the heroes of the other factions, each 1st turns.

    Region Data

    The region data is consists of follows.

    en key, ( en, kr, zh, cn ){ region key, region locale name }, region data_key

    Faction Data

    The faction data is consists of follows.

    en key, kr name, zh name, cn name, dlc, faction data_key

User text file : db - Heroes data
All vanilla general data is already registered in sandbox mod. Among them, 123 main, 23 ep and 9 moh generals are managed separately as 'named' in sandbox mod.

The 'named' generals were chosen for the fact that many people know about faction leaders, unique legends, title holders and some named generals. For ytr dlc, all 5 generals are included.

In the case of ep, I don't know well about "Jin Dynasty". so, the 23 title holders are registered as 'named' in this mod.


The General data in the Google Sheet is organized as follows.

en_key,local names, birth year, name_key, element, dlc, faction, gen type, cqi, startpos id
  • en_key( without '_', English name)
  • kr_key
  • birth year
  • en_name(lady_ means female)
  • general element(fire, water, wood, metal, earth)
  • general's default faction
  • template key generation type(historical, generated, ancestral)
  • command queue index(meaning index of generals array in game engine for fast computing)
  • startpos map ID(meaning TW3K assembly kit ID)
  • general data key

If you don't use 'utf-8 cjk font', you don't see muti-byte string such as '劉備'. And it's no meaning for the locale 'en' users.

A list of main and eight kings and trait data can be found in this Google Sheet[docs.google.com].

  1. TheG.db.info
    TheG.db.info, 마운록

    Shows the hero information registered in the sandbox db. If the target hero is not registered, it is informed. This command is used to check if the hero registered by the user in the 'user db text' has been properly processed.


  2. When using Chinese or Korean mod, you will have trouble finding and summoning the hero's name if it is not localized. In this case, instead of the complicated 'add' and 'change' commands, the 'db.name' command registers only the name in Korean so that the hero can be easily manipulated.

    TheG.db.name, 마Yunlu, 마운록 TheG.db.name, ma_lanli, 華蘭麗 TheG.db.name, 华兰丽, hua_lanli TheG.db.name, 华兰丽, 화난려 TheG.db.name, xun_shuang_ciming, xun_shuang

  3. TheG.db.class

    When using a mod that implements the hero element differently from vanilla, it is a command to easily register or change the form in advance.

    db.class, huang_yueying, wood TheG.db.class, jiang_wei, water TheG.db.class, guan_yinping, wood

    You can easily change the element of hero before summoning the hero with 'db.name' command in the input panel.

  4. TheG.db.change

    Usually it's a command you don't need to use. The main usage is used to change the 'multi-byte string name', but only for advanced users. Or if i make other multi-byte language locale support version, this can be used by that locale users.

    • change

      change, zhang_bu, 張布, metal, 3k_main_template_historical_zhang_bu_hero_fire TheG.db.change, zhang_bu, 張布, metal, 3k_main_template_historical_zhang_bu_hero_fire

      This command's main purpose is to change the 'kr,zh,cn' name of general or to summon test by modifying the information of added general.

      TheG.db.change, hua_lanli, 華蘭麗, metal, 3k_main_template_generated_lady_ma_lanli_hero_metal

      The above command will change '3k_main_template_generated_lady_ma_lanli_hero_metal' hero's en_key to 'hua_lanli' which was 'ma_lanli'. To do the same thing simply, use 'db.name' command.

      db.name, ma_lanli, hua_lanli

  5. TheG.db.add

    The most difficult part of using this sandbox mod is to register the general who is not registered by default. Copy and paste the daat from the Google sheet above, then use ',' as delimiter to separate each option. That makes help a lot. Please take advantage of Google Sheets.

    Here are some examples. First of all, many people subscribed to "Make them unique" mod, so these are the examples.

    TheG.db.add, zhu_beng, 朱崩, wood, 3k_main_template_historical_lady_zhu_beng_hero_wood TheG.db.add, zhu_tu, 朱土, wood, 3k_main_template_historical_lady_zhu_tu_hero_wood

    Register a new general that is not registered in the sandbox basic data. This command is for advanced users, and information of general added in the input box will disappear when you exit the game.

    The 'kr_key' is no meaning in locale 'en'. You can change it to other meaningful English word. But don't omit it for now.

    There are also other mod that differ from the vanilla 3K data key forms. In each case, you must specify the data key used for each general to add to this mod's db.
User text file : db - AI Funding
The sandbox has built-in basic data for the 'AI Funding' feature.

  • AI funding configuration

    Weights can be set when AI forces are funded for growth. In order to use this feature, the following must be set in the user script file.

    TheG.mod.support_other_factions, true # TKE(Three kingdoms early), MoH, WB

    A weight of 1.0 means the average treasury of the all faction. The 'Han Empire' faction is very funded, so the 1.0 setting is not an average, but a "higher than average" setting.
    Cao Cao 조조 曹操 曹操 1.45 Liu Bei 유비 劉備 劉備 1.45 Yuan Shu 원술 袁術 袁術 1.20 Dong Zhuo 동탁 董卓 董卓 1.15 Yuan Shao 원소 袁紹 袁紹 1.15

    For a minor faction, it is set to 0.4, and even if it is set to 0.4, the growth is slightly faster than that which is not set.

    You can change this setting in your db text file as follows:

    TheG.db.set.ai_weight, cao_cao, 2.1 TheG.db.set.ai_weight, sun_jian, 0.3

    The setting range is an integer between 0.0 and 10.0.

    If different settings are needed for the 'TKE' and 'MoH' campaigns, you can set different values for the two files 'sandbox_user_db_tke.txt' and 'sandbox_user_db_moh.txt'.
User text file : db - Support AI faction
TheG.mod.support_other_factions, true

It is a function to support the major AI faction's growth by funding. Each faction has its own funding weight. The sandbox constantly monitors the treasury status of each faction, funding those factions when needed. Currently, 'Cao_Cao', 'Liu Bei'> = 'Sun Jian', 'Yuan Shao'> 'Kong Rong' are set as basic weights to help the 'major' factions grow stably.

This feature will ultimately increase the difficulty of the campaign. Currently, testing is required to see how difficult it is.

If this feature is reasonable, I plan to add a 'setup' feature to the user db text file that will allow the user to manually set the weight for each faction.

  • Three Kingdoms Early

    Cao Cao 조조 曹操 曹操 1.50 Liu Bei 유비 劉備 刘备 1.45 Yuan Shu 원술 袁術 袁术 1.20 Yuan Shao 원소 袁紹 袁绍 1.15 Dong Zhuo 동탁 董卓 董卓 1.15 Kong Rong 공융 孔融 孔融 0.80 Gongsun Zan 공손찬 公孫瓚 公孙瓒 0.80 Liu Biao 유표 劉表 刘表 0.80 Ma Teng 마등 馬騰 马腾 0.80 Liu Chong 유총 劉寵 刘宠 0.70 Liu Dai 유대 劉岱 刘岱 0.60 Han Fu 한복 韓馥 韩馥 0.60 Liu Yan 유언 劉焉 刘焉 0.60 Zheng Jiang 정강 鄭姜 郑姜 0.50 Zhang Yan 장연 張燕 张燕 0.50

    The default weight for all factions other than the above list is 0.40. Factions with a default weight of 0.40 also grow slightly faster than vanilla.

  • Mandate of Heaven

    Cao Cao 조조 曹操 曹操 1.50 Liu Bei 유비 劉備 刘备 1.45 Zhang Liang 장량 張梁 张梁 1.25 Zhang Bao 장보 張寶 张宝 1.25 Zhang Jue 장각 張角 张角 1.25 Yuan Shu 원술 袁術 袁术 1.20 Dong Zhuo 동탁 董卓 董卓 1.00 Lu Zhi 노식 盧植 卢植 1.00 Han Dynasty 황실 漢朝 汉朝 1.00 Yuan Shao 원소 袁紹 袁绍 1.00 Gongsun Zan 공손찬 公孫瓚 公孙瓒 0.80 Kong Rong 공융 孔融 孔融 0.80 Liu Biao 유표 劉表 刘表 0.80 Ma Teng 마등 馬騰 马腾 0.80 Liu Chong 유총 劉寵 刘宠 0.70 Lü Bu 여포 呂布 吕布 0.70 Zhang Yan 장연 張燕 张燕 0.50 Zheng Jiang 정강 鄭姜 郑姜 0.50

  • A Betrayed World

    Lü Bu 여포 呂布 吕布 1.65 Cao Cao 조조 曹操 曹操 1.50 Liu Bei 유비 劉備 刘备 1.45 Yuan Shu 원술 袁術 袁术 1.20 Dong Zhuo 동탁 董卓 董卓 1.00 Yuan Shao 원소 袁紹 袁绍 1.00 Kong Rong 공융 孔融 孔融 0.80 Sun Ce 손책 孫策 孙策 0.80 Ma Teng 마등 馬騰 马腾 0.80 Gongsun Zan 공손찬 公孫瓚 公孙瓒 0.80 Liu Biao 유표 劉表 刘表 0.80 White Tiger Yan 엄백호 嚴白虎 严白虎 0.70 Liu Chong 유총 劉寵 刘宠 0.70 Zheng Jiang 정강 鄭姜 郑姜 0.50 Zhang Yan 장연 張燕 张燕 0.50

  • Fates Divided

    Yuan Tan 원담 袁譚 袁谭 2.00 Yuan Xi 원희 袁熙 袁熙 2.00 Yuan Shao 원소 袁紹 袁绍 2.00 Sun Ce 손책 孫策 孙策 1.65 Cao Cao 조조 曹操 曹操 1.45 Liu Bei 유비 劉備 刘备 1.45 Liu Biao 유표 劉表 刘表 0.80 Ma Teng 마등 馬騰 马腾 0.80
HowTo : MTU heroes and items
You need to be registered in the sandbox to summon a hero that has different data from the TW:TK.

If the hero's class is changed from 'water' to 'fire' by the external mod, you can easily avoid 'egg face' by changing the class of the hero with 'db.class' command.

db.class, guan_yinping, earth # sandbox input Panel TheG.db.class, guan_yinping, earth # User db text file

  1. Make Them Unique

    The MTU is using the same data as the existing hero data. Only new hero need to be registered in the sandbox.The heroes of MTU in the DB section is the same as the TW:TK. The sandbox now contains all the heroes data in the TW:TK, so there is no need to register MTU's illust-only heroes illust-only separately.

    • 'Hua Lanli'

      'Hua Lanli' is wife of 'Ma Teng'. 'Hua Lanli' is well known by her maiden name.
      In TW:TK database, her name is 'Ma Lanli'.

      summon, ma_lanli

      • Hua Lanli type changed

        If MTU changed hero type of 'ma lanli' to 'fire'(Vanguard), you need to register that. 'ma lanli' is 'metal' in MTU 2.0 hotfix as same as vanilla. So, If you use MTU 2.0 hotfix, you don't need to register 'hua_lanli' data.

        TheG.db.change, ma_lanli, 華蘭麗, fire, 3k_main_template_generated_lady_ma_lanli_hero_metal TheG.db.add, hua_lanli, 華蘭麗, fire, 3k_main_template_generated_lady_ma_lanli_hero_metal

        To change hero type of 'ma_lanli', use 'change' command. To add new 'Hua Lanli' hero alias, use 'add' command.

    • Same data as the TW:TK

      MTU considers compatibility with other mods, and the hero of the same name uses the same data as the TW:TK. If you have the same name, you do not need to register the hero.

      dong_min, wang_liting, bian_huilan, wu_minyu, gao_shun, etc...

    • Duplicated named MTU hero
      For MTU-unique heroes with duplicate name such as ‘Hua Xin’ and ‘Pang De,’ it is better to register the MTU hero manually.

      If the user changes the sandbox locale from English to Korean, the "search, Hua Xin" command will try to search for vanilla ‘Hua Xin’.

      TheG.db.add, hua_xin, Hua Xin, water, 3k_mtu_template_historical_li_ru_hero_water TheG.db.add, pang_de, Pang De, wood, 3k_mtu_template_historical_chen_jiu_hero_wood

    • New Heroes
      • Startpos heroes

        You don't need to register heroes. Such as ma_yunlu.

      • Off-map heroes

        If you want to spawn those hero earlier than expected then you should register those heroes like follow.

        TheG.db.add, ma_yunlu, 马云騄, metal, 3k_mtu_template_historical_lady_ma_yunlu_hero_metal TheG.db.add, zhu_beng, 주뱅, wood, 3k_mtu_template_historical_lady_zhu_beng_hero_wood TheG.db.add, zhu_tu, 주투, wood, 3k_mut_template_historical_lady_zhu_tu_hero_wood TheG.db.change, gao_shun, 高順, fire, 3k_mtu_template_historical_gao_shun_hero_fire TheG.db.add, hua_xin, Hua Xin, water, 3k_mtu_template_historical_li_ru_hero_water TheG.db.add, pang_de, Pang De, wood, 3k_mtu_template_historical_chen_jiu_hero_wood
        Note that the original MTU characters and entries use the "3k_mtu" prefix.

  2. Using MTU's Item

    Use 'alias' command to make a usable 'user key'.

    alias, line_breaker, 3k_mtu_ancillary_weapon_line_breaker_faction #Input panel TheG.db.item.alias, line_breaker, 3k_mtu_ancillary_weapon_line_breaker_faction

    You can use the 'alias' command in the input window or specify it in the user db text file. The following is an example of MTU items.

    alias, empty_lunchpail, 3k_mtu_ancillary_accessory_empty_lunchpail alias, line_breaker, 3k_mtu_ancillary_weapon_line_breaker_faction alias, phoenix_beak, 3k_mtu_ancillary_weapon_phoenix_beak_faction alias, hidden_flow, 3k_mtu_ancillary_weapon_hidden_flow_faction

    TheG.db.item.alias, principles_of_yong, 3k_mtu_ancillary_accessory_eight_principles_of_yong TheG.db.item.alias, sorrow_and_anger, 3k_mtu_ancillary_accessory_poem_of_sorrow_and_anger TheG.db.item.alias, comet_spear, 3k_mtu_ancillary_weapon_comet_spear TheG.db.item.alias, diplomat, 3k_mtu_ancillary_weapon_diplomat TheG.db.item.alias, hawk, 3k_mtu_ancillary_weapon_hawk TheG.db.item.alias, hometowns_bow, 3k_mtu_ancillary_weapon_hometowns_bow TheG.db.item.alias, invincible, 3k_mtu_ancillary_weapon_invincible TheG.db.item.alias, juque, 3k_mtu_ancillary_weapon_juque TheG.db.item.alias, shengxie, 3k_mtu_ancillary_weapon_shengxie TheG.db.item.alias, wind_of_north, 3k_mtu_ancillary_weapon_wind_of_north TheG.db.item.alias, sharp_light, 3k_mtu_ancillary_weapon_sharp_light

  3. Finding MTU's items key

    To find out the item key value, open MTU mode with RPFM and look at the text directory. The loc files will be sorted and organized by item type.

    ceo_nodes_title_3k_mtu_ancillary_weapon_juque Juque Trim the "ceo_nodes_title_" ... 3k_mtu_ancillary_weapon_juque Becomes ceo_key(item key) value.

    If the key values do not match with the above method, refer to the "Finding Item Key" section of the "Wu mod's item section".

  4. To summon a new hero from MoH at a young age

    From Sandbox 1.9.8, you can use the new 'spawn' command as a feature of TW:TK 1.6.0. The 'spawn' command spawns a hero as adults aged 18-50. If you would like to summon you as 18 years old, please use the "Spawn Age Pack" in the Notice section on the Sandbox mod description page.

    It is recommended to check with the 'db.info' command and the 'search' command and use the spawn command.

    • Following is the old method

      You need to create a database pack file for TW: TK with a utility like RPFM. A movie type pack file which has 'character_generation_spawn_age_ranges_tables'.

      If you don't want to change 'spawn age range' by mods. Make and put a movie type mod which contains original data in data folder.

    3k_main_age_fixed_historical_lady_da_qiao_hero_earth 173 80 19 18 18 false 193 0 255 4 3k_main_age_fixed_historical_lady_xiao_qiao_hero_metal 175 80 19 18 18 false 193 0 255 4 3k_main_age_fixed_historical_lady_ma_yunlu_hero_metal 179 80 19 18 16 false 195 2 999 4 3k_main_age_fixed_historical_lady_zhu_beng_hero_wood 171 80 19 18 18 false 187 0 999 999 3k_main_age_fixed_historical_lady_zhu_tu_hero_wood 172 80 19 18 18 false 188 0 999 999

    Data row as above means, random age within 18 ~ 19 and don't consider birth age. Place the data.pack in TW:TK/data directory as movie type.

  5. Loading order with Radious mod

    0. Sandbox 1. Radious part II 2. Radious part I 3. Puzzle 3D 4. [WDG] Season 2 Update 5. Puzzle Illustration 6. MTU 2.6d
HowTo : Wu_Kingdaissance Heroes
This data is based on post '송사리씨'[cafe.naver.com] at Korean community . I didn't explored Wu's data at all. SO, I don't know about Wu_Kingdaissance mod. I just ran the mod and just watched the sandbox log for whatever happened.

  • Same data as the TW:TK

    There is no need to register a hero.

  • New Heroes
    • StartPos Heroes

      You do not need to register heroes. Sandbox will take care about it.

    • Off-map heroes

      You need to register heroes in sandbox user db text file.

      But, I don't know which one is startpos and which one is off-map.

      TheG.db.add, zhen_ji, 甄姬, water, 3k_main_template_historical_lady_zhen_ji_hero_water TheG.db.add, zhou_cang, 周倉, wood, 3k_main_template_historical_zhou_cang_hero_wood TheG.db.add, gao_lan, 高覽, wood, 3k_main_template_historical_gao_lan_hero_wood

  • New Hero with same name, but not same

    In case of guan_yinping, the names are the same, but the data is different. WU registered guan_yinping in StartPos as new hero. In this case, the original hero data is overwritten with new hero data using the change command.

    TheG.db.change, guan_yinping, 關銀屏, wood,3k_main_template_historical_lady_guan_yinping_hero_wood

  • Changed sub-type of off-map heroes

    Should register the hero's altered spawn type by the 'db.class' command.

    xin_xianying - (TW:TK Water) - (WU earth) & jiang_wei- (TW:TK fire) - (WU water)

    TheG.db.class, xin_xianying, earth # 신헌영, 辛憲英, 辛宪英 TheG.db.class, jiang_wei, water # 강유, 姜維, 姜维 TheG.db.class, huang_yueying, wood # 황월영, 黃月英, 黄月英 TheG.db.class, guan_yinping, wood # 관은병, 關銀屏, 关银屏 TheG.db.class, bu_zhi, wood # 보즐, 步騭, 步骘

  • If you don't know about what type of hero

    Let's go brute force way. Just use 'Add' command and let the sandbox mod do dirty work. This is unreliable way and some hero may not be summoned.

    TheG.db.add, zhen_ji, 甄姬, water, 3k_main_template_historical_lady_zhen_ji_hero_water TheG.db.add, zhou_cang, 周倉, wood, 3k_main_template_historical_zhou_cang_hero_wood TheG.db.add, gao_lan, 高覽, wood, 3k_main_template_historical_gao_lan_hero_wood TheG.db.add, wen_pin, 文聘, metal, 3k_main_template_historical_wen_pin_hero_metal TheG.db.add, yi_ji, 伊籍, water, 3k_main_template_historical_yi_ji_hero_water TheG.db.add, xu_sheng, 徐盛, fire, 3k_main_template_historical_xu_sheng_hero_fire TheG.db.add, xin_pi, 辛毗, water, 3k_main_template_historical_xin_pi_hero_water TheG.db.add, chen_dao, 陳到, earth, 3k_main_template_historical_chen_dao_hero_earth TheG.db.add, guan_suo, 關索, metal, 3k_main_template_historical_guan_suo_hero_metal TheG.db.add, zhong_hui, 鍾會, metal, 3k_main_template_historical_zhong_hui_hero_metal TheG.db.add, hao_zhao, 郝昭, metal, 3k_main_template_historical_hao_zhao_hero_metal TheG.db.add, du_yu, 杜預, water, 3k_main_template_historical_du_yu_hero_water TheG.db.add, yang_hu, 羊祜, earth, 3k_main_template_historical_yang_hu_hero_earth TheG.db.add, zhang_ning, 張寧, metal, 3k_main_template_historical_lady_zhang_ning_metal TheG.db.add, wang_yi, 王異, earth, 3k_main_template_historical_wang_yi_hero_earth TheG.db.add, lu_lingqi, 呂玲綺, fire, 3k_main_template_historical_lady_lu_lingqi_hero_fire TheG.db.add, zhang_xingcai, 張星彩, fire, 3k_main_template_historical_lady_zhang_xingcai_hero_fire TheG.db.add, ma_yunlu, 馬雲騄, wood, 3k_main_template_historical_lady_ma_yunlu_hero_wood TheG.db.add, zhao_yu, 趙嫗, earth, 3k_main_template_historical_lady_zhao_yu_hero_earth TheG.db.add, zhao_zhen, 曹整, fire, 3k_main_template_historical_lady_zhao_zhen_hero_fire TheG.db.add, bu_lianshi, 步練師, water, 3k_main_template_historical_lady_bu_lianshi_hero_wood TheG.db.add, wu_anguo, 武安國, wood, 3k_main_template_historical_wu_anguo_hero_wood

    Change 'Multi-byte string name' to your locale.

    Like '辛憲英' to '辛宪英'. Like '步練師' to '步练师'.

    In case of huang_yueying, '黃月英'(zh) looks same as '黄月英'(cn), But different Unicode.

  • Wu mod hero name collision

    This is a name collision caused by implementing 'zhang_bu' in Vanilla as a new hero in 'startpos' in Wu_Kingdaissance mod. It named the new hero as 'zhang_bao', which is the same name as 'zhang_bao' of 'Zhang Brothers' of MoH DLC.

    If the 'zhang_bu' was originally a unique of non-startpos, it would have been no problem.

    're-mapped' { 장보(張寶) -> zhang_bao_v, dlc04_zhang_bao_veteran } 'new hero' { zhang_bao -> 장포(張布), main_zhang_bao_fire } 'Zhang Bu' { zhang_bu -> 장포(張布), main_zhang_bu_fire }

    Above is some logs of sandbox which renamed 'zhang_bao(zhang brothers)' by changing the key to zhang_bao_v to avoid the name collision.

    Similarly, sandbox will generate a new key with the original name + "_" + first letter of the property when it detects inevitable name collision. Replacing the key of the existing hero so that new hero take precedence over the same key.
HowTo : Wu_Kingdaissance Items
You can use the 'alias' command in the input window or specify it in the user db text file. The following is an example of Wu items.
  • Accessory and Followers
    The key of accessory and followers are prefixed "3k_main_ancillary_" to keyword.

    lunchpail, 3k_main_ancillary_accessory_empty_lunchpail # 紫檀食盒 luo_shen_bill, 3k_main_ancillary_accessory_luo_shen # 洛神赋 tao_dong_text, 3k_main_ancillary_accessory_tao_dong # 讨董檄文 - exceptional xiang_zhao_begging, 3k_main_ancillary_accessory_xiang_zhao # 乞降诏 吉平, 3k_main_ancillary_follower_ji_ping 李意, 3k_main_ancillary_follower_li_yi 童淵, 3k_main_ancillary_follower_tong_yuan 于吉, 3k_main_ancillary_follower_yu_ji 左慈, 3k_main_ancillary_follower_zuo_ci 虎卫军, 3k_main_ancillary_follower_hu_wei

  • Weapon and auxiliary bow
    Wu's weapons come in two forms, one with '_faction' and one without.

    白虹剑, 3k_main_ancillary_weapon_bai_hong 黑山双斧, 3k_main_ancillary_weapon_hei_shan_faction # - no limit unique 召虎镰, 3k_main_ancillary_weapon_zhao_hu 紫电剑, 3k_main_ancillary_weapon_zi_dian 辟邪剑, 3k_main_ancillary_weapon_bi_xie_sword_faction 流星剑, 3k_main_ancillary_weapon_liu_xing 青冥剑, 3k_main_ancillary_weapon_qing_ming_sword_faction 百里剑, 3k_main_ancillary_weapon_bai_li 天子剑, 3k_main_ancillary_weapon_bao_jian_faction

    The bows I've noticed are all in the form of '_faction'.

    锦帆弓, 3k_main_ancillary_weapon_bow_jin_fan_faction 龙舌弓, 3k_main_ancillary_weapon_bow_long_she_faction 铁胎弓, 3k_main_ancillary_weapon_bow_tie_tai_faction 震天弓, 3k_main_ancillary_weapon_bow_yan_yan_faction 河北强弓, 3k_main_ancillary_weapon_bow_he_bei_faction # exceptional 夜梅弓, 3k_main_ancillary_weapon_bow_du_jian_faction 宝雕弓, 3k_main_ancillary_weapon_bow_bao_gong_faction 竹弓, 3k_main_ancillary_weapon_bow_zhao_zhen_faction

  • Armour
    Most of the armor belongs to the hero, and you can see an item called Treasure Armor of the Hafu Family. It has an unusual data key.

    夏侯宝甲, xiahou_ancillary_armour_heavy_armour_fire_unique

    Other than armor, there are about 60~70 items. You can also use "alias" command by prefixing each key value with "3k_main_ancillary_" and postfixing "_faction" to weapon and auxiliary bow.

    empty_lunchpail(紫檀食盒), mount_bao_ma(象龙), mount_han_xue(汗血), bird_spear(虎头金枪), bo_yun(拨云枪), butcher_knife(窄刃刀), di_tu(西蜀地形图), du_ren(青蛇), fa_zan(桃红发簪), fei_ji(飞戟), general_seal(大将军印), guan_dao(家传大砍刀), heptachord(七弦古琴), hu_fu(虎骑兵符), jiu_tan(酒坛), liang_tou(三尖刀), lu_lingqi(凤鸣戟), luo_shen(洛神赋), ma_bian(棘马鞭), lu_lingqi(凤鸣戟), luo_shen(洛神赋), ma_bian(棘马鞭), mei_fu(美妇), mei_jian(虎贲大刀), meng_de(孟德新书), mount_bao_ma(象龙), mount_han_xue(汗血), mount_jing_fan(惊帆), mount_white_beauty(照夜玉狮子), nv_shi(郿坞女侍), pan_gu(盘古巨斧), pi_pa(秦汉子), qi_ce(十二奇策), qiang_nv(羌族少女), she_mao(铁脊蛇矛), shi_nv(仕女图), shi_ren(曹丕的诗友), tao_dong(讨董檄文), tie_chui(北海巨锤), tie_ji(双铁戟), yi_dai(春秋), yuan_jia(袁氏故吏), zhang_ren(雁翎枪), zhao_yu(青竹双刃), zhao_yun_spear(涯角枪), zhong_xing(中兴剑)

  • Finding Wu's items key

    To find out the item key value, open Wu mode with RPFM and look at the text directory.
    Open "text/db/ceo_nodes.loc" file.

    ceo_nodes_title_3k_main_ancillary_zhao_yun_spear 涯角枪 If you cut the front part... 3k_main_ancillary_zhao_yun_spear Becomes the key value

    Usually, the key value used for ceo_nodes_title matches the item key value, but it may be different in some cases. In that case, it is also possible to add "_faction" after the item key value, but the surest way is to summon the hero with the item equipped, check the equipment, and inspect the CEO.

    summon, hero inspect, hero

    The inspect command is a development command that logs all CEO key values of the target hero.

    ceo np. 1 xp. 1 = data = "3k_main_ancillary_weapon_trident_halberd_faction" -- Sky Piercer

    The data key value becomes the item ceo_key value.

  • User db text and command histories for test

    In user db text file.
    TheG.db.item.alias, empty_lunchpail, 3k_main_ancillary_accessory_empty_lunchpail TheG.db.item.alias, bai_hong_sword, 3k_main_ancillary_weapon_bai_hong TheG.db.item.alias, hei_shan_axe, 3k_main_ancillary_weapon_hei_shan_faction TheG.db.item.alias, luo_shen_bill, 3k_main_ancillary_accessory_luo_shen TheG.db.item.alias, tiger_army, 3k_main_ancillary_follower_hu_wei TheG.db.item.alias, xiahou_relic, xiahou_ancillary_armour_heavy_armour_fire_unique TheG.db.item.alias, yan_yan_bow, 3k_main_ancillary_weapon_bow_yan_yan_faction

    To test in the input panel.

    save, sandbox/input_wu.txt load, sandbox/input_wu.txt log_level, 5 top find_item, empty_lunchpail steal, han_fu, empty_lunchpail find_item, bai_hong_sword give_item, player, bai_hong_sword find_item, yan_yan_bow steal, liu_yan, yan_yan_bow bottom
Logging
You can enable exporting logs to a file in "sandbox/sandbox_user_script" and in the input panel.

Total War THREE KINGDOMS/sandbox/log_sandbox.txt

The log file starts a new log from the beginning when you load a new game or saved game.

User script file : TheG.mod.log_to_file, true, 3 Sandbox input : out_log, true

Once logs are enabled, create a file called "log_sandbox.txt" in the game directory and log it. Lite users will never see the content, but once you look at it, it will help you to understand this mod.

Sometimes spies can also be figured out. You can also find out who died. You can also look for errors or warnings in this mod and use them for bug reporting.

7 give_item 3k_main_faction_cao_cao erya TheGathering_sandbox:Give Item 3k_main_faction_cao_cao 1 erya 8 steal taishi_ci 3k_main_ancillary_weapon_bow_taishi_ci_faction Error find_faction_ceo_key query_faction is null taishi_ci Warn Steal NOT found taishi_ci 3k_main_ancillary_weapon_bow_taishi_ci_faction 9 steal huang_zhong 3k_main_ancillary_weapon_bow_huang_zhong_faction Error find_faction_ceo_key query_faction is null huang_zhong Warn Steal NOT found huang_zhong 3k_main_ancillary_weapon_bow_huang_zhong_faction

If you get 'Error' as above, you can copy it and use it for bug reports.
The Gathering : Core Object
  • Description

    In TW:3K, events are like the heartbeat of a game. The core object is a component that receives, processes, and delivers events from TW:3K engine.

    That core object has modified in this mod.

    If components A, B, C, and D wait for one event, the core calls the event handlers A, B, C, D sequentially. If an error occurs in the event handler of one of the handler calls, the core must handle the error and call the remaining handlers. However, TW:3K's script engine core stops functioning when an error occurs, and the rest of the handlers do not receive events.

    In technical terms, TW:TK does not do the event exception handling.

    [TheGathering : Core Object] do the event exception handling.

    The most registered event inside TW:3K is the "Faction Turn Start" event, with as many as 40 TW:3K script components waiting. If an error occurs in one handler and subsequent handlers do not receive the event, the data inside the game will be twisted.

    TW:TK mod script loading is also done in the core, but exception handling is not performed similar to event handling. Starting with "Mandate of Heaven" DLC, an error occurs when loading multiple mod scripts and loading Lua scripts in subdirectories.
    I modified the core-object in this mod so that Lua scripts in multiple/subdirectories are loaded naturally, only the mod with errors fails, and other mod scripts are loaded normally.

    This mod handles all event exceptions, but has no impact on game performance.

  • Core Features
    1. Modify the core object to handle exceptions so that the event chain is not broken.
    2. Modified the event addition function of the core object to prevent confusion in which duplicate events are registered.
    3. Also executes exception handling of timer event of TW:3K engine.
    4. Mod script loading function of core object is modified so that only the mod with error is not loaded.
    5. By outputting the occurred errors to "$(game)/lua_mod_log.txt", the modders can check the event processing error without having to include "/script/all_script.lua"
    6. Game users can easily check the script errors of mods in "lua_mod_log.txt" when there is a problem with the game.

    The standalone mod is [The Gathering : Core Object]
Precautions
This mod is a script mod where compatibility is very important. It is best to be at the top of the mod manager's load order panel as #1.

In general, this mod does not cause data conflicts with other data modes, nor does it cause compatibility conflicts with illustration & modeling modes at all.

Incompatible mods
However, it is less compatible with the mod(which is very rare) that changed vanilla heroes "WuXing". When Sandbox spawn a "WuXing" changed hero, illustration and 3D model of the heroes is broken. When using Sandbox with that kind of mods, User should register heroes "WuXing" through the sandbox user db text file.(TheG.db.add command)

old user_script.txt
The user script mod management method used since the days of Total War Atila uses...

$(User)/AppData/Roaming/The Creative Assembly/ThreeKingdoms/scripts/user_script.txt

The old Total War method using this file is still used internally. In addition, PFM also registers the 'My Mod' file in the file named user_script.txt by using the 'Install Mod' command.

Total War 3K provides a new way of mod management. However, there are still traces of the old version in the Total War 3K's vanilla scripts, which will cause all mod to unable to initializing, even if there is a user_script.txt and the contents are incorrect, or if any of the registered mods are in error.

Delete that file if you have one, and if you are using PFM, you may want to make the scripts directory read-only.

Confirm sandbox registered properly

The "$(game)/used_mods.txt" file has the following contents.

add_working_directory "D:/SteamLibrary/steamapps/workshop/content/779340/1843327136"; mod "TheGathering_sandbox.pack";

If you activate the sandbox in the mod manager and run the game, the above contents are created in'used_mods.txt'. The above does not happen just by activating in the mod manager.

If you have activated the sandbox and run the game, but there is no above, it is an error related to the mod manager.

Check for mod loading failures

There is a log file in the game directory called 'lua_mod_log.txt' that is created by default. When this log file is loaded normally, it contains the following contents.

**************************** Loading Mods (other mods) Mod [script\campaign\mod\thegathering_sandbox.lua] loaded successfully (other mods) ****************************

As above, 'End loding' should be at the end for normal loading. If it is not normal, the problem is that the loading failed due to a 3K's problem or a bug in this mod.

Check $(game)/lua_mod_log.txt

"Failed to execute loaded mod file [TheGathering_sandbox.lua], error is: .... "

When loading fails due to an error in the sandbox, loading of the sandbox Lua script file fails and the error is logged in $(game)/lua_mod_log.txt.

If you scratch the error message and report it, I can easily identify the cause.

Check for mod initialization failure

If you enable log of this mod through sandbox input or user script text ...

### [] ###

If the log file does not contain the above line, the initialization failed. This could be a mode conflict or a bug in this mod.

If this mod still doesn't work, the last thing to try is to delete the "$(User)/AppData/Roaming/The Creative Assembly/ThreeKingdoms" directory after backing up the save files.

When sandbox UI stucks
  • If you are having a sandbox ui problem, you can remove the sandbox from the mod manager, delete following txt files in the game root and data directory, and then turn it on again.
  • @minkyu
    • delete "game root/lua_frontend_mod_log"
    • delete "game root/lua_mod_log"
    • delete "game root/sandbox" directory
  • If @minkyu's way not works then try this
  • @inter-object
    • Unsubscribe sandbox
    • Delete $(User)\AppData\Roaming\The Creative Assembly\ThreeKingdoms\cache
    • Subscribe sandbox
    • Backup your save files
    • Delete $(User)\AppData\Roaming\The Creative Assembly\ThreeKingdoms
    • Subscribe sandbox again
After "Fates Divided" DLC, CTD and UI problems
If the user's mod UI has changed with the patch from 1.6.1 to 1.7.0, there seems to be a problem with the graphics rendering cache file side of the TW:TK mod launcher.

If you use over QHD monitor and experiences CTD when UI panel opened. Make sure "Options - Interface - Customize UI size 100%"

To solve this problem, please take the following steps.

  • In the Steam app checks the integrity of the game's local file.
    Steam App -> My Games/Library -> TW:TK right click -> Properties -> Local Files -> Check integriry

If not works

  • Unsubscribe mod from the TW:TK mod manager (delete the local copy) and resubscribe from the Steam page.

If not works

  • Delete "$(User)/AppData/Roaming/The Creative Assembly/ThreeKingdoms directory" after backup.

After deleting the directory, if TW:TK creates a new directory does not solve the problem...
  • Delete "$(game)/data" directory and do integrity check to download $(game)/data folder again.

If not works...

  • Reinstall TW:TK

If that doesn't work, try using "Kaedrin's Mod Manager".

Kaedrin's mod manager github download[github.com]

After launching Kaedrin's Mod Manager, select the top menu -> Game -> Three Kingdoms and set the path. Please google how to use it.
269 Comments
Alpharion 9 Jul @ 7:39pm 
What I really want is to stop the notifications from the mod on the top right from the start.
PandaL 13 Apr @ 8:28am 
Found a very little bug. For TheG.mod.confederated_faction_heroes, "unique" is not an acceptable keyword for items, even though the comments in the sandbox_user_script.txt says otherwise.
IronManIan777 1 Apr @ 11:44am 
I also would like to know. Is there a way to delete a faction from the map? Cause all I can do is raze their settlement and teleport my character there to kill them otherwise they just take it back and it'll be pointless.
sasukezero123 29 Mar @ 3:34pm 
I checked over this guide but is there a way to increase credibility with Cao Cao? Thanks
111 29 Mar @ 2:15pm 
Anyone knows if it is possible to do multiple commands in one go, instead of typing each command one by one which takes extremely slow ?
SEAL Morino 23 Jan @ 4:30am 
is there anyone knows how to apply new traits introduced by other mods to my characters? such as registration, etc.:steamsad:
Austere Hare 9 Dec, 2023 @ 12:26pm 
is it possible to replace a YT's skill tree? like if i summon He Yi into Zhang Yans faction... could i make him a metal hero or a water hero? :steamthumbsup: :lunar2020halodragon: this mod is the greatest!
Leon J. 17 Nov, 2023 @ 5:09am 
Does anybody know, if its possible to rename a faction using this? E.g. instead of Liu Hong --> Han Empire etc.?
IronManIan777 13 Oct, 2023 @ 10:04am 
I too am wondering about the marry option as I can't click on it. Therefore have to know how to input it but nothing is working. A guide to all the commands that won't highlight would be very very much appreciated.
Numenor 10 Sep, 2023 @ 3:34pm 
I see in the help section that there is suppose to be a marry command? But how do you use it. For instance I typed "marry, cao cao, zheng jiang" and it doesn't do anything. Doesn't even spit out an error message.