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

ISMLExtendedAttributeProvider #238

Closed
wants to merge 14 commits into from
Closed

ISMLExtendedAttributeProvider #238

wants to merge 14 commits into from

Conversation

budak7273
Copy link
Member

@budak7273 budak7273 commented Nov 27, 2023

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

@budak7273 budak7273 changed the title ISMLExtendedAttributeProvider and IncludeSpecial fix ISMLExtendedAttributeProvider Nov 30, 2023
@budak7273 budak7273 self-assigned this Nov 30, 2023
# Conflicts:
#	Mods/SML/Source/SML/Private/Registry/ModContentRegistry.cpp
@budak7273
Copy link
Member Author

This should probably be squashed once it's ready

@Th3Fanbus
Copy link
Contributor

For posterity, Robb just recalled there's a blocker: https://discord.com/channels/555424930502541343/562722670974599227/1253145838415253625

Once your asset is created, add it to the GameplayTagTableList in the Project Settings menu and all tags contained within it will be added to the Gameplay Tag Manager.

ah yes this was the wall

@budak7273 budak7273 requested a review from mircearoata June 21, 2024 04:22
Mods/ExampleMod/Content/Recipes/Recipe_AnyUndefined.uasset Outdated Show resolved Hide resolved
Config/DefaultGameplayTags.ini 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);
Copy link
Member

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);

Copy link
Member Author

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?

@Th3Fanbus
Copy link
Contributor

Given Mircea's comments, what does 9040461 even do?

@budak7273
Copy link
Member Author

budak7273 commented Jun 21, 2024

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)

@budak7273
Copy link
Member Author

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.

@budak7273
Copy link
Member Author

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)

@budak7273 budak7273 closed this Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants