> For the complete documentation index, see [llms.txt](https://feliperoddd.gitbook.io/gasify/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://feliperoddd.gitbook.io/gasify/data-groups.md).

# Data Groups

Reuse and Compose initial data across AbilitySystemComponents

<figure><img src="https://585731495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPvnvgshL169KwwsLUx0q%2Fuploads%2FhHInZmEo1EZt7Lc1BybS%2Fimage.png?alt=media&amp;token=dc84a7d8-8dbf-4b98-be0f-e0319ec4aee7" alt="" width="257"><figcaption></figcaption></figure>

Sometimes we want to reuse the same set of data (e.g. attributes) to initialize an ASC with. Data Groups allow us to use the same group of data across multiple ASCs.\
\
For example, if we have a Soldier NPC and an Archer NPC. Both need to have a Health and a MovementSpeed attribute, but the Soldier must have an SwordAttack ability and the Archer a BowShoot ability.\
\
We can easily share the attributes by putting them in a GroupAttribute object and share it between the Archer's and Soldier's **GroupASC**.

<figure><img src="https://585731495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPvnvgshL169KwwsLUx0q%2Fuploads%2F6h8lcyy2Rj9HOrT5BIpH%2Fdiagram123.PNG?alt=media&amp;token=c355ddf3-c42d-41c7-9ca3-319728fbe4ea" alt="" width="375"><figcaption></figcaption></figure>

## Usage:

**Create a GroupASC ScriptableObject:** \
&#x20;   Right click in a folder on the editor -> Create -> GAS -> DataGroup - AbilitySystemComponent\
**Create a GroupAttribute:**\
&#x20;   Right click -> Create -> GAS -> DataGroup - Attributes\
**Create a GroupAttributeProcessors**:\
&#x20;   Right click -> Create -> GAS -> DataGroup - AttributeProcessors\
**Create a GroupGameplayAbility:**\
&#x20;   Right click -> Create -> GAS -> DataGroup - GameplayAbilities\
\
Now, just drag and drop the Groups into the **GroupASC** to compose and reuse them however you want.<br>

{% embed url="<https://youtu.be/Vdbo1X1hmXg>" %}
