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

Add Text Enricher support for Abstract Rewards #40

Open
JaysonMendoza opened this issue May 5, 2024 · 3 comments · May be fixed by #41
Open

Add Text Enricher support for Abstract Rewards #40

JaysonMendoza opened this issue May 5, 2024 · 3 comments · May be fixed by #41
Labels
enhancement New feature or request

Comments

@JaysonMendoza
Copy link

The rewards section of quests only allows items to be used. Anything else becomes basic text.

I would like to create a system agnostic approach to issuing rewards using the system provided enrichers.

For example in the DND5e System at version 3.X it is possible to create an award and have it render nicely using this text [[/award 50000gp]]{Give 'em the Gold}. Currently if we input that as our text in the custom reward, it will show those characters as-is.

Since each system gets to customize it's enrichers it would be ideal if we can allow the basic enriched to interrupt the text as an approach for new rewards.

image

@JaysonMendoza JaysonMendoza added the enhancement New feature or request label May 5, 2024
@JaysonMendoza
Copy link
Author

I have designed a very simple system-agnostic fix that enables tech enrichment in the rewards column. It uses the same approach as the details enrichment to do this.

This will enable rewards to use any system provided enriched that could facilitate the reward of currency or other non-items. As a side-effect this will also enable linking inside the column. However, I think that is a good change since a reward might be something abstract like increased reputation or something more complicated that could be described in another journal entry. I do not see any negative reason for enabling system enrichment.

If we want I could also enable using drag and drop journal entries if we want to make that second part more official. It would be a slightly bigger change though so I didn't do it because I wanted to take a minimalist approach.

As an example we might use [[/award 50gp 50xp]]{50gp and 50xp} in the DND5e system to get this...
image

@JaysonMendoza JaysonMendoza changed the title Add Tech Enricher support for Abstract Rewards Add Text Enricher support for Abstract Rewards May 5, 2024
@typhonrt
Copy link
Collaborator

typhonrt commented May 6, 2024

The PR for this is incorrect as switching the DOMPurify method invoked for YouTube / Vimeo inclusion won't do the enrichment for abstract / custom rewards. I'll take a look at providing the correct code to enhance custom rewards appropriately. I'll get this into the v12 FQL update.

@JaysonMendoza
Copy link
Author

Ahhh. Well, it did work when tested. Not sure why then. I used the function that was used for the quest details content since I knew that supported enrichers. Perhaps that was unintentional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants