-
-
Notifications
You must be signed in to change notification settings - Fork 16
Synergies
Synergies are a system to allow the dynamic addition/changes of properties under certain conditions.
They are seperate json located in miapi:synergies/unique-path-and-name
They apply on a module level of their conditions are meet.
if you leave out the "type" entry you need to use a module key as a key for the inner data.
Example:
{
"blade_katana": {
"condition": {
"type": "otherModule",
"condition": {
"type": "module",
"module": "handle_polearm"
}
},
"replace": {
"displayName": "miapi.module.blade_naginata.name",
"itemId": "miapi:modular_naginata"
}
}
}This applies to modules based on a module tag. This is not a Item Tag. for more information you can visit here
{
"type": "tag",
"one_handed_sword": {
"condition": {
"type": "otherModule",
"condition": {
"type": "tag",
"tag": "one_handed_handle"
}
},
"replace": {
"better_combat_config": {
"parent": "bettercombat:sword"
}
}
}
}This will apply to ALL modules.
{
"type": "all",
"all": {
"condition": {
"type": "true"
},
"merge": {
"can_child_be_empty": false
}
}
}This allows you to apply additional porperties under certain conditions. Visit Materialbased Properties first and only if Material Properties dont fit your usecase use this.
{
"type": "material",
"diamond": {
"condition": {
"type": "true"
},
"replace": {
"durability": "[material.durability]* 0.5"
}
}
}The inner data is always behind a key, the inner json.
This is Required!
This is a Condition Object under the key "condition"
This is a property map that will remove the existing property data of the module in question and fully replace it with this. Use this with caution
This merges the new data with potentially existing data. This should be the default option to use.
This is a list of property keys to remove. All data assisioted with the listed Properties will be removed from the module.