MCA Village Ranks Wiki

Custom Datapacks

External rank definitions are read from the mca_custom_ranks data directory. You must put your rank definitions in a JSON file here in your datapack. The datapack can use any namespace. For example:

my_village_progression/
├── pack.mcmeta
└── data/
    └── example/
        └── mca_custom_ranks/
            ├── settlement.json
            ├── hamlet.json
            ├── village.json
            └── town.json

Rank JSON Format

Field Name Data Type Description
order Whole Number Position of this stage in the progression. Must be zero or greater.
mca_rank String Existing MCA rank used for MCA's internal checks.
entities Task Object Array MCA task JSON objects required for this stage.

Example, settlement.json:

{
  "order": 0,
  "mca_rank": "PEASANT",
  "tasks": [
    {
      "type": "population",
      "population": 5
    },
    {
      "type": "building",
      "building": "house"
    }
  ]
}

Translation

MCA uses translation keys. This mod follows the same practice.

Custom rank names use translation keys in this format: rank.[namespace].[path]

Important Datapack Rules

Debugging Issues (something is broken!)

A rank does not appear

Confirm the file is under data/[namespace]/mca_custom_ranks/.
Confirm the file has a .json extension and valid JSON syntax.
Check that order is a non-negative integer.
Check that mca_rank is one of the six supported MCA enum values.
Check the log for a decode error, duplicate task ID, or progression validation warning.
Ensure the datapack is enabled and has been loaded by the world.


The bundled progression is missing

Check config/mca_rank_customiser.json and make sure enableDefaultRanks is set to true. External datapack ranks can still load when this option is false.


The blueprint still shows the normal MCA progression

The custom blueprint integration is only used when at least one valid custom rank is loaded. Run /mca-admin villageRanks to verify that the server has loaded the intended stages.


A custom rank name appears as a translation key

Add the appropriate rank.[namespace].[path] entry to your language resource file, using the rank's namespace and path.


A stage is completed immediately

Review its task list. An empty task list has no required conditions to satisfy. Also verify that the task definitions use the intended thresholds and identifiers.