Chillu1 / Chillu1/ModiBuff

GenId modifier stacking (Unit-tied unique stacking)

Open
#15 0 comments 0 reactions 0 assignees View on GitHub
enhancement modifier logic request
Dominant language
C#
Stars
219
Forks
7
PR merge metrics
No merged PRs in 30d

Description

**Description**
Currently, instance stackable modifiers are always stacked when added, no matter what.
It would be nice to have stackable modifiers based on who is the source of the modifier. Meaning that a single Unit can only apply one instance of the modifier, but if another Unit applies the same modifier type, it will be another instance. With its own independent refresh, stack, etc.

Example: Two Units have a modifier named "DamageOverTime", Unit 1 applies it, then Unit 2 applies it. The target Unit now has two unique instances of that modifier, ticking together, if Unit 1 applies it again, the modifier will be refreshed, stacked, etc. But the 2nd instance applied by Unit 2

**Implementation**
Only `ModifierController` will need to have extra logic, by checking if the modifier exist and if they're instance stackable, and instance genId stackable or not.

**Issues**
For this to work, a `GenId` needs to be fed into `ModifierController.Add`, and currently we don't have access to the `GenId` a lot of the time, so it would either need a new id system based on casters, or some refactoring.

Contributor guide

Open the contributing guide

Research direction

Start by reading ModifierController.Add and tracing where GenId is available when modifiers are applied. Map the missing-GenId paths and determine how caster identity should reach the controller. Done means one source refreshes or stacks its own instance while different sources retain independent instances, with tests covering those cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.