-
Notifications
You must be signed in to change notification settings - Fork 191
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
ISMLExtendedAttributeProvider #238
Conversation
…on any modded asset)
… are loaded correctly
# Conflicts: # Mods/SML/Source/SML/Private/Registry/ModContentRegistry.cpp
This should probably be squashed once it's ready |
For posterity, Robb just recalled there's a blocker: https://discord.com/channels/555424930502541343/562722670974599227/1253145838415253625
|
… we have "real" tags working
Mods/ExampleMod/Content/Schematics/Milestone/Schematic_ExampleMilestone.uasset
Outdated
Show resolved
Hide resolved
if (descriptorClass->ImplementsInterface(USMLExtendedAttributeProvider::StaticClass())) { | ||
UObject* ItemDescriptorCDO = descriptorClass->GetDefaultObject(); | ||
const auto ItemTags = ISMLExtendedAttributeProvider::Execute_GetGameplayTagsContainer(ItemDescriptorCDO); | ||
const auto SmlSpecialTag = FGameplayTag::RequestGameplayTag("SML.Registry.Item.SpecialItemDescriptor", true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since SML has c++, and this tag is used in c++, it makes more sense to register it using native tags, with the new UE5 macros, rather than registering it in a config file and using the find function every time.
In the .h: SML_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(TAG_SML_Registry_Item_SpecialItemDescriptor)
In the .cpp: UE_DEFINE_GAMEPLAY_TAG_COMMENT(TAG_SML_Registry_Item_SpecialItemDescriptor, "SML.Registry.Item.SpecialItemDescriptor", "comment goes here")
return ItemTags.HasTag(TAG_SML_Registry_Item_SpecialItemDescriptor);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, but we should then add a tag to examplemod using the config file approach. Any ideas for what that tag could be?
Given Mircea's comments, what does 9040461 even do? |
The new recipe (named "Testing for chat command /exampleListSpecial") and change to the schematic is a consequence of how the demo chat command works, I am open to changing it but not sure what a better example would be. The chat command gets the "get obtainable item descriptors" SML utility, but normally there aren't any craftable Special items, so the only item that would appear in the response is the Example Item. The recipe only exists to have something else (that doesn't use the tag provider) show up in that list for comparison Maybe we should have ExampleMod define its own tag and restructure the example command to check for items with that tag? (see here) |
Also, have we figured out a way to add tags to items that we don't control? For example, adding a tag to a base-game item. |
…manual tag add calls. Testing usage in ExampleMod to be removed later
This system will not be used in favor of the currently-in-progress Content Tag Registry being developed on the same branch (see https://discord.com/channels/555424930502541343/1268324829463969832) |
Any modded asset can implement this interface to offer gameplay tags to other things
To test, run the example chat command and check your logs. The Example Item should show up as a special descriptor and the tag it has will be printed.
See this WIP docs page for usage info: https://docs-dev.ficsit.app/satisfactory-modding/latest/Development/ModLoader/ExtendedAttributeProvider.html