Penguin Action Toolkit
  • 🐧Welcome
  • Guide
    • Step-by-Step Guide
      • Step 1: Install PAT
      • Step 2: Tutorial Scene
      • Step 3: Character - Action States
      • Practice 0: Add an Input Tag
      • Step 4: Character - Tags
      • Practice 1: Combo
      • Step 5: State Modifiers
      • Practice 1.1 & Ex: Grant Tag Mod
      • Step 6: Animation Montage
      • Step 7: Trigger Animation Event
      • Practice 1.2: Back to Grant Tag Mod
      • Step 8: Animator
      • Step 9: Attributes
      • Practice 2: Cost HP
      • Step 10: Effects
        • Step 10.1: Hitbox & Hurtbox
  • Definition & Inspector Detail
    • Actions
      • Action State
      • State Modifier
      • Move Set
    • Tag
    • Attribute
    • Effect
    • Player
    • Input
    • Locomotion
  • Tutorial
    • Installation
    • Contents of the Assets
    • Character
      • Create a Character
    • Set Up Player
    • Create a new Tag
    • Create a new Modifier
    • Use Attributes
    • Effect
      • Create an Effect
      • Apply Effects
    • Animation
      • Animatior Controller
    • PAT Manager
  • Beneath the Feathers
    • The Other One
    • Help on the Way
    • Victim or the Crime
    • Unbroken Chain
  • PAT Game Jam
    • Save the Penguin
    • Schedule
    • Terms & Conditions
  • FAQ
    • Change to Your Own Model
Powered by GitBook
On this page
  • Goal
  • Attributes
  • Resource Tag
Edit on GitHub
  1. Guide
  2. Step-by-Step Guide

Step 9: Attributes

PreviousStep 8: AnimatorNextPractice 2: Cost HP

Last updated 6 months ago

Goal

  • Understand what Attributes are.

  • Understand how Attributes are consumed / recovered in PAT.


Attributes

Attributes are the stats a character can have, such as health, resistance, attack and stamina.

Each of them is stored in an Attribute Component under the Character object or under its children.

At runtime, Character component will automatically collect all the Attribute Component under it.

Obviously, we don't want the attribute to stay at the initial amount forever. We want to modify the value during gameplay. How can we make that happen?

Resource Tag

In the previous articles we talked about how are used to trigger and validate Action States. Apart from that, there is another usage of Tags.

We use Resource Tags to label attributes. For example, the Stamina Attribute on the penguin has a resource tag of Stamina.

With a resource tag set, an Action State can use the tag to find its attribute.

Let's look at the locomotion move set of the penguin.

In the inspector of Roll, we can see another modifier: Use Attribute Mod.

You can see it also has a Resource Tag field, and it is pointing to Stamina. This makes Roll Dodge costing Stamina every time it gets triggered. You can control the amount being cost in the mod as well. If you set the number to be negative, you will find it recovering attributes instead of consuming it.

Resource Tag: Stamina
Go to the Main Move Set
Go to Roll
Roll - Use Attribute Mod