{"id":21852304,"url":"https://github.com/octod/godot-gameplay-abilities","last_synced_at":"2025-10-08T11:31:44.343Z","repository":{"id":263897709,"uuid":"847807594","full_name":"OctoD/godot-gameplay-abilities","owner":"OctoD","description":"An ability system made for godot.","archived":false,"fork":false,"pushed_at":"2025-08-25T13:31:36.000Z","size":14398,"stargazers_count":38,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-12T02:32:29.905Z","etag":null,"topics":["ability","ability-system","gdextension","godot","godot-addon","godot-engine-4"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OctoD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-26T15:28:15.000Z","updated_at":"2025-09-05T11:37:50.000Z","dependencies_parsed_at":"2025-03-03T11:37:02.948Z","dependency_job_id":null,"html_url":"https://github.com/OctoD/godot-gameplay-abilities","commit_stats":null,"previous_names":["octod/godot-gameplay-abilities"],"tags_count":0,"template":false,"template_full_name":"godotengine/godot-cpp-template","purl":"pkg:github/OctoD/godot-gameplay-abilities","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctoD%2Fgodot-gameplay-abilities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctoD%2Fgodot-gameplay-abilities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctoD%2Fgodot-gameplay-abilities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctoD%2Fgodot-gameplay-abilities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OctoD","download_url":"https://codeload.github.com/OctoD/godot-gameplay-abilities/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctoD%2Fgodot-gameplay-abilities/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278934169,"owners_count":26071365,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ability","ability-system","gdextension","godot","godot-addon","godot-engine-4"],"created_at":"2024-11-28T01:14:47.342Z","updated_at":"2025-10-08T11:31:44.334Z","avatar_url":"https://github.com/OctoD.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# godot-gameplay-abilities\n\n![GGAS logo](demo/icon.svg)\n\n[discord server here](https://discord.gg/meA6pDTXpr)\n\n\u003e (Part of [Godot Gameplay Systems](https://github.com/OctoD/godot-gameplay-systems))\n\n# Installation\n\n## Using the AssetLib\n\n1. Open the Godot editor.\n2. Navigate to the AssetLib tab.\n3. Search for \"Gameplay Abilities\".\n4. Install and enjoy!\n\n\n## Using the GitHub repository\n\n1. Download the latest version of the addon from the [release page](https://github.com/OctoD/godot-gameplay-abilities/releases).\n2. Extract the contents of the zip file into your project's `addons` folder.\n3. Enjoy!\n\n## Using Git\n\n1. Clone the repository into your project's `addons` folder:\n\n```bash\ngit clone --recurse-submodules\n```\n\n2. Build the project:\n\n```bash\nscons platform=windows # or linux, macos etc\n```\n3. Enjoy!\n\n# Usage\n\nThis addon provides a set of nodes and tools to create gameplay abilities in Godot. It is designed to be flexible and easy to use, while providing a solid foundation for more complex systems.\n\nThis system relies on three things:\n\n- `Ability`: A single ability that can be activated, granted, revoked, etc. Works like a blueprint of an ability.\n- `AbilityContainer`: A container that holds abilities. It can be attached to any node in the scene.\n- `RuntimeAbility`: The runtime representation of an ability. It is created when an ability is added to an `AbilityContainer`.\n\nEach ability,\nto be used,\nmust be granted first. \n\nThe grant can occur automatically if the overridden method `_can_be_granted` returns true or if it is not overridden, or it can be done manually by calling the `try_grant` method of the `AbilityContainer`.\n\nA granted ability can be revoked by calling the `try_revoke` method of the `AbilityContainer`.\n\nYou can refer to [USAGE](USAGE.md) for more detailed information.\n\n## Creating an ability\n\nAn ability is nothing more than a scripted `Resource` that extends the `Ability` class. You can create a new ability by creating a new script and extending the `Ability` class:\n\n```gd\n# my_ability.gd\nclass_name MyAbility extends Ability\n\n# The name of the ability, used to identify it\nconst ABILITY_NAME := \"MyAbility\"\n\nfunc _init(_ability_name = ABILITY_NAME):\n    ability_name = _ability_name\n\n#\n# Each ability has several virtual methods which can be overridden to customize its behavior:\n#\n\n# Determines if the ability can activate it's cooldown\nfunc _can_activate_cooldown(ability_container: AbilityContainer, runtime_ability: RuntimeAbility) -\u003e bool:\n    return true\n\n# Determines if the ability can be activated\nfunc _can_be_activated(ability_container: AbilityContainer, runtime_ability: RuntimeAbility) -\u003e bool:\n    return true\n\n# Determines if the ability can be blocked\nfunc _can_be_blocked(ability_container: AbilityContainer, runtime_ability: RuntimeAbility) -\u003e bool:\n    pass\n\n# Determines if the ability can be granted\nfunc _can_be_granted(ability_container: AbilityContainer, runtime_ability: RuntimeAbility) -\u003e bool:\n    return true\n\n# Determines if the ability can be revoked\nfunc _can_be_revoked(ability_container: AbilityContainer, runtime_ability: RuntimeAbility) -\u003e bool:\n    return false\n\n# Determines if the ability can be ended\nfunc _can_be_ended(ability_container: AbilityContainer, runtime_ability: RuntimeAbility) -\u003e bool:\n    return true\n\n# Gets the cooldown duration of the ability\n_get_cooldown(ability_container: AbilityContainer) -\u003e float:\n    return 0.0\n\n# Gets the ability duration. Once this duration is over, the ability will try to end itself if possible (based on other methods).\n_get_duration(ability_container: AbilityContainer) -\u003e float:\n    return 0.0\n\n# Called when the ability is activated, useful to do things in the 2d or 3d world, launch other abilities, animations, etc.\n_on_activate(ability_container: AbilityContainer, runtime_ability: RuntimeAbility) -\u003e void:\n    pass\n\n# Called when the ability is blocked, ...\n_on_block(ability_container: AbilityContainer, runtime_ability: RuntimeAbility) -\u003e void:\n    pass\n\n# Called when the ability is granted, ...\n_on_end(ability_container: AbilityContainer, runtime_ability: RuntimeAbility) -\u003e void:\n    pass\n\n# Called when the ability is granted, ...\n_on_grant(ability_container: AbilityContainer, runtime_ability: RuntimeAbility) -\u003e void:\n    pass\n\n# Called when the ability is revoked, ...\n_on_revoke(ability_container: AbilityContainer, runtime_ability: RuntimeAbility) -\u003e void:\n    pass\n\n# Called for each tick of the _physics_process of the AbilityContainer\n_on_tick(delta: float, cooldown_time: float, ability_container: AbilityContainer, runtime_ability: RuntimeAbility) -\u003e void:\n    pass\n\n# Called for each tick of the _process of the AbilityContainer, if it returns true, the ability will be activated again\n_should_be_activated(ability_container: AbilityContainer) -\u003e bool:\n    return false\n\n# Called for each tick of the _process of the AbilityContainer, if it returns true, the ability will be blocked\n_should_be_blocked(ability_container: AbilityContainer) -\u003e bool:\n    return false\n\n# Called for each tick of the _process of the AbilityContainer, if it returns true, the ability will be granted\n_should_be_ended(ability_container: AbilityContainer) -\u003e bool:\n    return false\n```\n\n## Adding an ability to an AbilityContainer\n\nYou can add an ability to an `AbilityContainer` in two ways:\n\n- Using the editor: Select the `AbilityContainer` node, navigate to the `Abilities` property and add a new element. Then, select the ability you want to add.\n- Programmatically: You can add an ability to an `AbilityContainer` using the `add_ability` method:\n\n```gd\n# Add an ability to the container\n$AbilityContainer.add_ability(MyAbility.new())\n```\n\n## Contributing\n\nIf you want to contribute to this project, please read the [CONTRIBUTING.md](CONTRIBUTING.md) file.\n\nDon't be shy, this project is open to any kind of contribution!\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctod%2Fgodot-gameplay-abilities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctod%2Fgodot-gameplay-abilities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctod%2Fgodot-gameplay-abilities/lists"}