How to add a new Ability
This guide explains how to add a new ability to the game. As an example, we’ll create an ability that increases the player’s damage and attack speed but reduces HP, called Glass Cannon.
1. Importing assets
Import the ability icon into
Assets/The Archer/Sprites/UI/AbilitiesSet its Texture Type to Sprite (2D and UI).
Note: Corners of the sprite will be masked out in the UI.
If your ability requires additional assets such as meshes, textures, or particles, import them into the appropriate subfolders under
Assets/Common.
2. Adding new Ability Type
Open the script:
Assets/The Archer/Scripts/Abilities/Data/AbilityType.csThe enum values follow the naming pattern:
[Group]_[AbilityName]The first part defines the Group (used for organization in the property drawer), and the second is the Ability Name. Groups are only for editor organization and have no gameplay impact.
Add a new entry for your ability under a new or existing group. For this guide, we’ll create a new Custom group. In an unmodified template, the last index is
79, so use80:Endgame_CommonCoins = 76, Endgame_RareCoins = 77, Endgame_MysticCoins = 78, Endgame_LegendaryCoins = 79, Custom_GlassCannon = 80
3. Creating Ability Data script
Navigate to:
Assets/The Archer/Scripts/Abilities/BehaviorsCreate a new folder named Custom (or open the existing group folder if you’re adding to an existing group).
Inside it, create a new folder named GlassCannon.
Create a script named GlassCannonAbilityData.cs and add the following code:
4. Creating Ability Behavior script
In the same folder, create a new script named GlassCannonAbilityBehavior.cs
Add the following code:
5. Creating Ability Prefab
Go to:
Assets/The Archer/Prefabs/AbilitiesCreate a new folder named Custom, or open the existing one.
Right-click -> Create -> Prefab Name it Glass Cannon Ability and open it.
Select the root object and add the GlassCannonAbilityBehavior component.
(Optional) If you have a particle effect that plays when the ability is activated, drag it into the prefab and assign it to the Ability Acquired Particle field.
6. Creating Ability Data
Go to:
Assets/The Archer/Scriptables/AbilitiesCreate a new Custom folder (or use an existing one).
Right-click -> Create -> October -> Abilities -> Custom -> Glass Cannon This option comes from the
CreateAssetMenuattribute.Select the newly created asset and fill in its fields according to the Ability Data Structure documentation.
Assign the prefab you created in the previous step to the Prefab field.
Add at least one Ability Level.
Finally, open the Abilities Database asset located in the same folder and add the Glass Cannon data asset to the Abilities List.
7. Testing
Start the game and enter any stage.
Press Shift + A to open the Abilities Tester window.
In the Gameplay tab, activate the Glass Cannon ability.
You should now see the player’s damage and attack speed increased, and HP reduced according to your configuration.
Last updated