{"id":20482610,"url":"https://github.com/nenniana/attribute-game-system","last_synced_at":"2026-04-19T05:36:01.170Z","repository":{"id":257674390,"uuid":"851259282","full_name":"Nenniana/Attribute-Game-System","owner":"Nenniana","description":"This project is a flexible, extensible, and performance-optimized attribute management system for Unity.","archived":false,"fork":false,"pushed_at":"2024-09-27T21:32:46.000Z","size":4232,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T15:51:43.335Z","etag":null,"topics":["game-design","game-development","game-prototype","game-system","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nenniana.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-09-02T18:30:37.000Z","updated_at":"2025-02-02T14:20:39.000Z","dependencies_parsed_at":"2024-09-18T03:14:56.699Z","dependency_job_id":"4828e328-52fa-4d71-be50-9c69588ccf84","html_url":"https://github.com/Nenniana/Attribute-Game-System","commit_stats":null,"previous_names":["nenniana/attribute-game-system"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Nenniana/Attribute-Game-System","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nenniana%2FAttribute-Game-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nenniana%2FAttribute-Game-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nenniana%2FAttribute-Game-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nenniana%2FAttribute-Game-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nenniana","download_url":"https://codeload.github.com/Nenniana/Attribute-Game-System/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nenniana%2FAttribute-Game-System/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272024968,"owners_count":24860528,"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-08-25T02:00:12.092Z","response_time":1107,"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":["game-design","game-development","game-prototype","game-system","unity"],"created_at":"2024-11-15T16:13:50.309Z","updated_at":"2026-04-19T05:36:01.140Z","avatar_url":"https://github.com/Nenniana.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Attribute System for Unity\n\nThis project is a flexible, extensible, and performance-optimized attribute management system for Unity, written in C#. It handles any type of numerical attributes, such as strength, health, or custom-defined properties. The system allows attributes to be modified without losing their original values, making it suitable for a variety of gameplay scenarios.\n\n## Project Status\nThis project is currently a work in progress and is not yet feature-complete. While it offers several key functionalities, further improvements and features are still being actively developed.\n\n## Key Features\n\n- **Performance first**: Attributes can be marked \"dirty\" and recalculated only when requested, or calculated immediately based on the project's needs.\n- **Attribute Sets**: Group attributes that affect each other by drag-and-drop.\n- **Custom Calculation Order**: Define the calculation sequence for attributes within a set.\n- **Rounding Strategies**: Customize rounding methods per attribute type (e.g., health rounds to whole numbers, damage rounds to decimal points).\n- **Event System**: Subscribe to changes in attributes with built-in events that notify of value changes.\n- **Attribute System Window**: View and manage all attributes, create new ones, and define sets directly from a custom attribute inspector window.\n- **Inspector Integration**: Attribute selection via a dropdown menu, avoiding the need to hard-code string references.\n- **Decoupled System**: Apply attribute changes ((de)buffs, items, AOE) easily to a single entity or a whole group without tightly coupling them to the system.\n  \n## Detailed Overview of Features\n\n### 1. **Base and Enhanced Attributes**\n   - **Base Attributes**: Core values like health, strength, or other custom-defined stats. Developers can choose whether base attributes should be recalculated immediately or deferred until requested (\"dirty\" marking).\n   - **Enhanced Attributes**: Modifiers that enhance base attributes in various ways:\n     - **Additive**: Adds a flat value (e.g., +5 strength).\n     - **Increased**: Multiplies the base value by a percentage (e.g., 50% increased strength → base * 1.5).\n     - **More**: Applies a final multiplier after all other calculations (e.g., total value * 2).\n\n### 2. **Attribute Sets**\n   - **Sets**: A group of related attributes with a base attribute and its enhance modifiers. Developers can define how these attributes are calculated using custom **Calculation Groups**, which defines the order in which modifiers are applied:\n     - Base calculation\n     - Additive modifiers\n     - Increased multipliers\n     - More multipliers\n\n### 3. **Calculation and Performance Optimization**\n   - **Dirty Marking**: Attributes can be marked as \"dirty\" to be recalculated only upon request, optimizing performance by avoiding constant recalculations.\n   - Developers can choose whether an attribute should be recalculated immediately (e.g., health) or deferred (e.g., strength).\n\n### 4. **Attribute System Window**\n   - A dedicated Unity editor window (Attribute -\u003e Main) allows developers to view all current base and enhanced attributes. \n   - New attributes can be created through this interface. Developers can define the types of attributes to be created (e.g., Base, Additive) and whether to create an accompanying Set with a predefined calculation order.\n\n### 5. **Inspector Integration**\n   - Attributes can be exposed in the Unity Inspector using a dropdown selection instead of manually typing attribute names as strings. This reduces errors and improves usability for designers and developers.\n\n### 6. **Buff and AoE Handling**\n   - The system supports decoupling of attributes from their sources, allowing for flexible application and removal of buffs or debuffs without direct ties between entities and their modifiers.\n   - Buffs can be applied across multiple entities, such as in an area-of-effect (AoE) spell.\n\n### 7. **Rounding Strategies**\n   - Each attribute can have its own rounding method. For example, health can be rounded to the nearest whole number, while damage can be rounded to the nearest decimal.\n   - Developers can customize rounding rules based on the type of base attribute.\n\n### 8. **Event System**\n   - Base attributes support three types of events, allowing developers to react when values change:\n     - `valueChangedToFromDiff`: Provides the new value, the previous value, and the difference between them.\n     - `valueChangedToFrom`: Provides the new value and the previous value.\n     - `valueChangedTo`: Provides only the new value.\n\n## Installation\n\n1. Clone or download this repository.\n2. Add the the `Attribute System` to your script / asset folder in your Unity project.\n3. Creating base-, enhance attributes, and sets in the Attribute inspector window, or use the ready-made selection.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnenniana%2Fattribute-game-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnenniana%2Fattribute-game-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnenniana%2Fattribute-game-system/lists"}