Skip to content

_ActionResourceGroup‐API

NellsRelo edited this page Jan 17, 2024 · 6 revisions

To insert or remove to/from an Action Resource Group, you have two options, the Config method or directly calling the API

Config

{
  "FileVersion": 1,
  "ActionResourceGroups": [
    {
      "UUID": "UUID of Action Resource Group Definition Entry",
      "Definitions": ["UUID of Action Resource", "UUID of Action Resource", "UUID of Action Resource"],
      "modGuid": "UUID of required mod (Optional)",
      "Action": "Insert or Remove"
    }
  ]
}

API

The Compatibility Framework contains an API Endpoint to insert Action Resources into Action Resource Groups, allowing more convenience for mods that want to add Action Resources that function similarly to Spell Slots, or add new Groups.

Adding/Removing Selectors

Api.AddSelectors

Api.RemoveSelectors

Both of these API calls take the same basic object - a Target UUID and a list of UUIDs that correlate to Action Resource Definitions.

local payload = {
    modGuid = "",
    TargetUUID = "",
    Definitions = {
      "", "", "", ...
    }
}