Overview#
CompatSkills is an essential expansion for the Reskillable mod in Minecraft. While Reskillable provides the core leveling and skill system, CompatSkills acts as the bridge that allows pack creators to enforce those skills across a vast ecosystem of other mods. It provides a robust CraftTweaker integration, allowing for the locking of almost any game element—from specific items and entire dimensions to complex multiblock structures and magical rituals.
The mod is primarily configured through ZenScript (CraftTweaker), giving developers surgical control over how players progress through a modpack. By using CompatSkills, you can ensure that players cannot use high-tier technology or powerful magic until they have invested sufficient points into the relevant skills.
Requirement Syntax#
The core of CompatSkills is the Requirement System. Most functions in the mod use a "VarArg" (Variable Argument) approach, meaning you can pass one or many requirement strings to a single function. These requirements are checked against the player's current stats.
Common Requirement Formats
| Requirement Type | Syntax Example | Description |
|---|---|---|
| Skill Level | "reskillable:mining|10" |
Requires Level 10 in the Mining skill. |
| Advancement | "adv|minecraft:story/mine_diamond" |
Requires a specific vanilla or modded advancement. |
| Game Stage | "stage|industrial_age" |
Requires the player to have a specific Game Stage. |
| Trait | "trait|reskillable:battle_spirit" |
Requires a specific trait to be unlocked. |
| Logic (NOT) | "not|reskillable:magic|5" |
True only if the player's Magic level is below 5. |
| Dimension | "dim|-1" |
Requires the player to be in (or not in) a specific dimension. |
When multiple requirements are provided in a single command, they are typically treated as an AND condition, meaning the player must meet every single one to gain access.
Core Mechanics and Locking#
CompatSkills allows you to lock various aspects of the base game and modded interactions. These are handled via CraftTweaker scripts.
Item and Mod Locking
You can lock individual items or every item belonging to a specific mod.
- Item Lock:
mods.compatskills.ItemSkillLock.addRawLock("minecraft:netherite_sword", "reskillable:attack|20"); - Mod Lock:
mods.compatskills.ModLock.addModLock("tconstruct", "reskillable:building|10");(Locks all Tinkers' Construct items).
Entity Interactions
Control how players interact with mobs and creatures. This includes preventing damage, taming, or mounting until requirements are met.
| Lock Type | Function | Purpose |
|---|---|---|
| Damage | addEntityDamageLock |
Prevents the player from hurting the specified entity. |
| Taming | addEntityTameLock |
Prevents taming (e.g., Wolves, Ocelots, modded pets). |
| Mounting | addEntityMountLock |
Prevents riding horses, pigs, or modded mounts. |
Dimension and World Gating
Prevent players from entering specific dimensions. If a player lacks the requirement, they will be blocked from teleporting or using portals to that dimension.
- Syntax:
mods.compatskills.DimensionLock.addDimensionLock(int dimId, String... requirements);
Harvest and Tool Gating
You can gate the ability to use specific tool types at certain harvest levels.
- Example:
mods.compatskills.HarvestLock.addToolLevelLock("pickaxe", 3, "reskillable:mining|15");(Requires Mining 15 to use Obsidian-level pickaxes).
Mod-Specific Integrations#
CompatSkills features dedicated support for several major mods, adding unique locking mechanisms for their specific features.
Tinkers' Construct
One of the most exhaustive integrations, allowing control over tool parts, materials, and modifiers.
- Material Lock: Prevents using a specific material (e.g., Cobalt) on any tool part.
- Modifier Lock: Gates modifiers like Mending or Luck behind skills.
- Tool Type Lock: Prevents the creation of specific tools (e.g., Cleavers) in the Tool Station.
ProjectE
Integrates with the EMC system to gate transmutation.
- EMC Lock:
mods.compatskills.EMCLock.addEMCLock(int emc, String... requirements); - Functionality: Players can still collect EMC, but they cannot learn or "pull out" items from the Transmutation Tablet if the item's EMC value exceeds the lock or if the item itself has specific requirements.
Blood Magic
Focuses on gating magical progression.
- Ritual Locking: Prevents the activation of specific rituals (e.g., Ritual of Binding) until the player has sufficient Magic or Alchemy levels.
- Soul Network: Can gate the binding of items to a player's network.
Baubles
Adds the ability to lock specific Bauble slots. If a player equips an item into a locked slot without the requirements, the item is automatically ejected into their inventory or onto the ground.
- Syntax:
mods.compatskills.BaubleLock.addBaubleLock(int slot, String... requirements);
Immersive Engineering & Magneticraft
Both mods receive Multiblock Gating. This prevents the player from completing or interacting with large machines (like the Crusher or Excavator) until they meet the necessary Engineering or Building requirements.
Thaumcraft
Adds requirements based on the player's research progress.
- Research Lock:
"thaumcraft:research|RESEARCH_KEY" - Warp Lock:
"thaumcraft:warp|amount" - Knowledge Lock:
"thaumcraft:knowledge|type|amount"
Hwyla & The One Probe
When a block is locked, these mods will display the required skills in the on-screen HUD, informing the player exactly what they need to level up to interact with the block.
Advanced Scripting and Customization#
For advanced modpack developers, CompatSkills allows for the creation of custom content and automated events.
Skill Change Commands
You can trigger console commands to run when a player reaches a certain level or unlocks a specific trait.
- Level Up Command:
mods.compatskills.SkillChange.addLevelUpCommands(<skill:reskillable:attack>, 5, "/say @p has reached Attack 5!");
Custom Traits and Visibility
- Trait Creator: Allows you to add entirely new traits to existing Reskillable skills using custom icons and requirements.
- Visibility Lock: Hide entire skills from the Reskillable menu until the player meets a specific requirement (e.g., hide the "Magic" skill until the player finds a magic wand).
Commands#
CompatSkills adds several commands to help developers find the internal names of materials and modifiers for their scripts.
| Command | Description |
|---|---|
/ct compatskills dump |
Dumps general compatibility information to the log. |
/ct tinkermaterials |
Lists all Tinkers' Construct material IDs. |
/ct tinkermodifiers |
Lists all Tinkers' Construct modifier IDs. |
/reskillable locks |
(Base mod command) Displays all active locks on the item currently held in hand. |
Configuration#
The mod's configuration file allows you to toggle individual modules. If you are experiencing conflicts or only wish to use specific integrations (e.g., only Tinkers' Construct and ProjectE), you can disable the others in the compatskills.cfg file.
Additionally, the mod respects Reskillable's global settings, such as whether locks should be enforced on players in Creative Mode or on Fake Players (automated machines).