Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying attribute tag for various values #78

Open
monodop opened this issue May 30, 2024 · 2 comments
Open

Allow specifying attribute tag for various values #78

monodop opened this issue May 30, 2024 · 2 comments

Comments

@monodop
Copy link

monodop commented May 30, 2024

I think it would be helpful if we could specify attribute tags for various hardcoded values in GMAS. I'm working on a proof of concept, but I'm curious if there's any technical or design blockers for this feature. I'm also super new to this project, so please let me know if there are better intended solutions for these use cases.

Here's some examples:

Effect Delay, Duration, Period

Example use cases:

  • Declare an effect that grants a player a running speed boost. Attribute allows duration to be made longer or shorter
  • Declare an effect that increases weapon ammunition by 1 (e.g. reload a shotgun). Attribute allows reload speed to be modified

Possible Issues:

  • adds a lot of fields in the effect data
    image
  • if duration, delay, or period change, we may want to update the end time for the effect

Effect Modifier Value

Example use cases:

  • Declare an effect that recharges stamina over time. Create an attribute tag for stamina recharge speed and use that as the value for the recharge effect. Attribute allows modifying stamina recharge speed
  • Declare an effect that does fire damage to a player over time. Create an attribute tag representing the damage for the effect. Attribute allows modifying fire damage on player (e.g. fire resistance)

Possible Issues:

  • May be confusing to users, as there are two attribute tags that can be configured
  • Can run into issues with infinite recursion if there is a loop attributes referencing each other via modifiers

Cooldown Time

Example use cases:

  • Create an ability that allows the player to jump. When the player lands, the effect completes. When the effect completes, commit the cooldown. Attribute allows the cooldown duration between jumps to vary

Possible Issues:

  • If the cooldown time changes, we may want to update the end time for the cooldown
@Aherys
Copy link
Collaborator

Aherys commented Jun 3, 2024

it's a nice idea.

For clarity, and further expension i would add an Enum for each category, allowing to choose between bounded to tag, or direct set.

This way you still have two field, but you will increase readibility for further collaborator.

@monodop
Copy link
Author

monodop commented Jun 3, 2024

For clarity, and further expension i would add an Enum for each category, allowing to choose between bounded to tag, or direct set.

Actually this pattern might be good for clamp, too. Right now, clamp is treated as disabled if either the min or max is 0, which means you can't set the min and max both to 0 at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants