{"repo":"meredoth/Stat-System","free":true,"listed":false,"github":"https://github.com/meredoth/Stat-System","clone":"git clone https://github.com/meredoth/Stat-System.git","description":"An extensible stat system with modifiers for the Unity game engine","language":"C#","stars":136,"topics":["csharp","extensible","game-development","gamedev","modifiers","stats","unity"],"license":"Apache-2.0","category":"game-templates","readme_excerpt":"Unity Stat System This is a simple Stat system for the Unity game engine. The user can create stats that each stat can have any number of different types of modifiers. These modifiers are calculated not in the order that they are added, but in a predetermined order. The system provides an easy way to add new types of modifiers, not only for having modifiers that are calculated in a desired order, but also to define the desired way these modifiers affect the stat they are added. The three core types of modifiers (flat, additive and multiplicative) are already implemented. See the Example folder, for a simple how to use example. For the initial conception and the refactoring that led to the final code you can check my posts on my blog: A Stat System for Unity part 1 A Stat System for Unity part 2 Simple Usage Create a Stat with: Then you can create a new modifier with: Adding a modifier: Removing a modifier if it exists in the stat: A modifier can be created with a reference to an object, this helps for removing all the modifiers that are part of a single object. For example a sword in a game may be represented with a class that has a number of modifiers that are added. We can then easily remove all those modifiers with the method: Example The Character.cs script, has an example of how to create items with modifiers, how to add/remove modifiers to/from stats and comments of how these modifiers are being calculated. Let's suppose that we have the following modifiers: and the dex","default_branch":null,"files":null,"tree":[],"storefront":"/r/meredoth","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/meredoth/Stat-System/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}