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

[Developers] Migrate Gameplay Tags to C++ #60

Open
GuyPaddock opened this issue Feb 8, 2024 · 2 comments
Open

[Developers] Migrate Gameplay Tags to C++ #60

GuyPaddock opened this issue Feb 8, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request tech debt

Comments

@GuyPaddock
Copy link
Contributor

GuyPaddock commented Feb 8, 2024

As a Developer maintaining a project that relies on the OpenPF2 plug-in, I'd like it if the tags that the plug-in exposes and relies on were defined in C++ rather than in a tags INI file so that I don't have to keep the tag files in my project up to date with the plug-in and tags can be accessed from C++ quickly and directly.

Conditions of Acceptance

  1. Given I am adding OpenPF2 to my project: I'd expect to not have to copy INI files containing gameplay tags into my project.
  2. Given I am updating the copy of OpenPF2 in my project: I'd expect to not have to update INI files containing gameplay tags in my project.
  3. Given I need to use a gameplay tag provided by OpenPF2 (e.g., Trait.Condition.Dying.2) in a blueprint: I'd expect the tag to appear in lists of tags in the blueprint editor.
  4. Given I need to use a gameplay tag provided by OpenPF2 (e.g., Skill.Athletics.Expert) in C++ code:
    1. I'd expect to not have to "request" the tag by its string name.
    2. I'd expect to be able to get a reference to the tag through a namespace or class exposed by OpenPF2.
@GuyPaddock GuyPaddock added enhancement New feature or request good first issue Good for newcomers tech debt labels Feb 8, 2024
@GuyPaddock
Copy link
Contributor Author

Credit to Cinderblade on Discord for suggesting this change!

@GuyPaddock GuyPaddock self-assigned this Jun 30, 2024
@GuyPaddock GuyPaddock added this to the MVP Release (1.0) milestone Jun 30, 2024
@GuyPaddock GuyPaddock moved this to In Progress in OpenPF2 Core MVP Jun 30, 2024
GuyPaddock added a commit that referenced this issue Jul 16, 2024
This organizes all the OpenPF2-related tags under "PF2" tag categories
so that they don't clash with anything in a game that's using OpenPF2.
This change also adds descriptions to all tag categories.
GuyPaddock added a commit that referenced this issue Jul 16, 2024
This was identical to `FGameplayTag::RequestGameplayTag()` in the
`FName` case, and not that much extra effort to invoke `FName()`
ourselves in the `FString` case, so it doesn't make sense for this to
exist.
GuyPaddock added a commit that referenced this issue Jul 16, 2024
...as `ContainerHasTag()`. This makes more sense with the other
tag-related utility methods in the library. We're also able to expose it
to Blueprint, as long as we take in a const reference instead of a
pointer.
GuyPaddock added a commit that referenced this issue Jul 16, 2024
This makes assembling a gameplay tag from a root tag and suffix name
more efficient by using a `NameBuilder` for this instead of
concatenation.
GuyPaddock added a commit that referenced this issue Jul 16, 2024
Previously, if a damage type passed in was not a recognized damage type,
the damage callout would report `-999` as the damage. Now, it merely
renders the proper damage amount in black text.
@GuyPaddock GuyPaddock removed the good first issue Good for newcomers label Jul 16, 2024
@GuyPaddock
Copy link
Contributor Author

Nearly done implementing this, but I can say that this was definitely NOT a good first issue. There was a surprising amount of stuff that needed to be updated to switch to the new tag system.

GuyPaddock added a commit that referenced this issue Jul 19, 2024
This organizes all the OpenPF2-related tags under "PF2" tag categories
so that they don't clash with anything in a game that's using OpenPF2.
This change also adds descriptions to all tag categories.
GuyPaddock added a commit that referenced this issue Jul 19, 2024
This was identical to `FGameplayTag::RequestGameplayTag()` in the
`FName` case, and not that much extra effort to invoke `FName()`
ourselves in the `FString` case, so it doesn't make sense for this to
exist.
GuyPaddock added a commit that referenced this issue Jul 19, 2024
...as `ContainerHasTag()`. This makes more sense with the other
tag-related utility methods in the library. We're also able to expose it
to Blueprint, as long as we take in a const reference instead of a
pointer.
GuyPaddock added a commit that referenced this issue Jul 19, 2024
This makes assembling a gameplay tag from a root tag and suffix name
more efficient by using a `NameBuilder` for this instead of
concatenation.
GuyPaddock added a commit that referenced this issue Jul 19, 2024
Previously, if a damage type passed in was not a recognized damage type,
the damage callout would report `-999` as the damage. Now, it merely
renders the proper damage amount in black text.
GuyPaddock added a commit that referenced this issue Jul 19, 2024
This organizes all the OpenPF2-related tags under "PF2" tag categories
so that they don't clash with anything in a game that's using OpenPF2.
This change also adds descriptions to all tag categories.
GuyPaddock added a commit that referenced this issue Jul 19, 2024
This was identical to `FGameplayTag::RequestGameplayTag()` in the
`FName` case, and not that much extra effort to invoke `FName()`
ourselves in the `FString` case, so it doesn't make sense for this to
exist.
GuyPaddock added a commit that referenced this issue Jul 19, 2024
...as `ContainerHasTag()`. This makes more sense with the other
tag-related utility methods in the library. We're also able to expose it
to Blueprint, as long as we take in a const reference instead of a
pointer.
GuyPaddock added a commit that referenced this issue Jul 19, 2024
This makes assembling a gameplay tag from a root tag and suffix name
more efficient by using a `NameBuilder` for this instead of
concatenation.
GuyPaddock added a commit that referenced this issue Jul 19, 2024
Previously, if a damage type passed in was not a recognized damage type,
the damage callout would report `-999` as the damage. Now, it merely
renders the proper damage amount in black text.
GuyPaddock added a commit that referenced this issue Jul 19, 2024
This makes the code less fragile if tags get renamed in the future,
since the tag names no longer appear in the code as strings. If the
variable name is wrong, it will fail to build, rather than it being a
run-time error.
GuyPaddock added a commit that referenced this issue Jul 19, 2024
This makes the code less fragile if tags get renamed in the future,
since the tag names no longer appear in the code as strings. If the
variable name is wrong, it will fail to build, rather than it being a
run-time error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tech debt
Projects
Status: In Progress
Development

No branches or pull requests

1 participant