XMODhub Home
Switch language
English
Cross-Mod Compatibility Tokens (CMCT) Mod Menu

Cross-Mod Compatibility Tokens (CMCT)

Creator: Spiderbuttons
Updated:04/10/2024 21:29:49
21KB
Verified by McAfee SECURE
Authentification
Trusted by 200,000,000+ Users

Pre-required Mods

will be automatically installed when you use Cross-Mod Compatibility Tokens (CMCT)

About this Mod

Grab config values, translations, dynamic tokens, and assets from other mods with special Content Patcher tokens.
Cross-Mod Compatibility tokens adds some special, custom Content Patcher tokens that lets you (if you are a mod author) access the config values, translations, and dynamic tokens from other mods, including mods that are not made for Content Patcher specifically. These can be useful if you really have no other way to ensure perfect compatibility between your mod and theirs if you need to change things depending on any of the aforementioned values.

Installation
Usage For Players
This mod does nothing on its own. There is no benefit to installing this as a user if another mod that you are using does not require it.

Usage For Content Patcher Mod Authors
This mod adds four tokens:

  • Spiderbuttons.CMCT/Config
  • Spiderbuttons.CMCT/Translation
  • Spiderbuttons.CMCT/Dynamic
  • Spiderbuttons.CMCT/Asset
Each of these tokens will let you grab the config values, translation strings, dynamic token values, or internal asset keys respectively. All four of them require input arguments. The first input argument will always be the UniqueID of the mod you are trying to get the value from. The second input argument will depend on the token in question:

  • Config: The name of the config value to find. If the config value is nested, you must include the full config path based on the JSON structure.
  • Translation: The i18n key of the translation you want. It will always grab the translation for the currently selected language.
  • Dynamic: The name of the dynamic token.
  • Asset: The path of the asset from the other mod relative to their manifest.json file.
If you use any of these tokens, you must set the other mod as a dependency. If you don't, it might work, but it also might throw some weird errors at you. Here are four examples, one for each of the tokens, using Lookup Anything, Hat Mouse Lacey, and Button's Extra Books for demonstration:

  • {{Spiderbuttons.CMCT/Config: Pathoschild.LookupAnything, Controls.ToggleSearch}}
  • {{Spiderbuttons.CMCT/Translation: ichortower.HatMouseLacey, houseDisplayName}}
  • {{Spiderbuttons.CMCT/Dynamic: ichortower.HatMouseLacey, Lacey}}
  • {{Spiderbuttons.CMCT/Asset: Spiderbuttons.ButtonsExtraBooks, assets/Books/sheet.png}}

Limitations
Currently, there are two main things that I would consider limitations:

  • Translations that take in tokens as input (i.e. i18n values that have their own {{tokens}} inside the i18n itself) do not work correctly and will only grab the literal string with the token still present with the braces.
  • Dynamic tokens are only initialized when a save is loaded, not when the game is launched. This may or may not matter to you at all.
It's also worth mentioning that you should use the Dynamic token as sparingly as possible. Without getting too technical about how Content Patcher works, due to the way I had to implement the token, they will always signal that they should have their changes propagated even if the dynamic token it is checking from another mod did not change. This is not that bad if your token only updates OnDayStart like tokens do by default, but can potentially get expensive if you are updating it OnTimeChange or OnLocationChange!

Source Code

Top Mods for Stardew Valley

Explore the best mods for Stardew Valley that bring new features, upgraded visuals, and exciting ways to transform your gameplay experience.
Content Patcher
Pathoschild28/07/2025 06:03:57
Loads content packs that change the game's data, images, and maps without replacing XNB files.
Content Patcher
Pathoschild26/10/2025 17:17:30
Loads content packs that change the game's data, images, and maps without replacing XNB files.
SMAPI - Stardew Modding API
Pathoschild15/07/2025 09:52:47
The mod loader for Stardew Valley.
NPC Map Locations
Bouhm26/05/2025 10:22:12
See NPC and players on the map, with an optional minimap.
CJB Cheats Menu
Pathoschild28/07/2025 06:19:19
A simple in-game cheats menu with lots of cheats.
SpaceCore
spacechase028/05/2025 10:06:38
A framework mod used by some of my other mods.
Stardew Valley Expanded
FlashShifter01/07/2025 07:17:39
mod描述游戏中玩家扮演继承了爷爷农场的“Stardew valley”主角开阔和经营整座小牧场。 你继承了爷爷在星露谷的农场,但是你手头上只有最基础的农具和少许的金钱,你得靠此开始你的新生活。你能把这片杂草丛生的田地变成一个繁荣的家园吗?这很不容易,自从JOJA公司来到了小镇,以前的生活都变了。社区中心,这个曾经是小镇最活跃的地方,如今却是破烂不堪。但山谷里似乎充满了机会,只要你肯努力,就有可能把星露谷变得更繁荣。 开始游戏后,玩家可以通过捏人的方式创建自己所喜爱的角色。人物共有24种肤色,32
Farm Type Manager (FTM)
EscaMMC22/07/2025 13:55:17
Farm Type Manager (FTM) is a framework that lets other mods spawn objects and monsters anywhere in the game, with various controls and customization options.

Unlock the full potential of Stardew Valley with XMODhub—explore these top mods today!

Verified by McAfee SECURE
Authentification
Trusted by 200,000,000+ Users

Need help with download or installation? Join our Discord community for support.

XMODhub Home
Language
Switch language to Chinese Traditional
Switch language to English
Switch language to German
Switch language to Korean
Switch language to Thai
Switch language to Indonesian
Switch language to Vietnamese
Switch language to Turkish
Switch language to Portuguese
Switch language to Japanese
Switch language to Polish
Switch language to French
Switch language to Spanish
Switch language to Italian

Gaming solutions

Resources

Partners

Follow us on

Visit XMODhub DiscordVisit XMODhub FacebookVisit XMODhub on XVisit XMODhub YouTube
Contact Support:
support@xmodhub.com
Xmod_Lily
Business Inquiries:
dc@xmodhub.com or cathy@business.xmodhub.com
catherine_79237

Larvas Limited

Room 1201, 12/F Tai Sang Bank Building 130-132 Des Voeux Road Central HK