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

[Question] Is there a trick to getting the effects to process? #5

Open
ghost opened this issue Oct 10, 2021 · 3 comments
Open

[Question] Is there a trick to getting the effects to process? #5

ghost opened this issue Oct 10, 2021 · 3 comments
Labels

Comments

@ghost
Copy link

ghost commented Oct 10, 2021

I found this after trying to use the code in the Godot docs to work. If I set up a test project with one of the effects, say matrix, and a RT label to try it, the [matrix] labels are printed and not processed. (I also included a color tag to make sure it was processing something.) At someone's suggestion I tried plugging in dynamic fonts for the label with no luck.
I tried print statements in the func so it's not even running, but I can extend RichTextMatrix, so the system is doing something with it.
Is there something specific that needs to be done to get a new effect to run?

EDIT: So, I was able to get something running by adding the effect to a custom effects array on a node by node basis. The tooltip mentioned install_effect but I couldn't get it to work. From the docs, I'm assuming there's a way to make the effects work like the built-in ones.

@Eoin-ONeill-Yokai
Copy link
Owner

Eoin-ONeill-Yokai commented Oct 10, 2021

Yes you should be able to manually install fx using a script. The original intent (or ideal design) would be that the node could get a system file path for text effects, but that design wasn't supported by Godot's current API.

So as of right now, you have to make a text effect a base class and expose the type as a valid resource. You then create an instance of that resource and then drag it into the array. It's a bit involved, and once godot 4.0 stabilizes (and I take back some time), I might try to redesign the interaction of installing custom FX.

May I ask what version of Godot you are currently running? I'm going to leave this issue open as a reminder that this does need to be streamlined. Now that godot is getting more custom inspectors and some work has been put into that part of the program, I might be able to streamline the process...

@ghost
Copy link
Author

ghost commented Oct 10, 2021

I've got the most recent stable/default download, 3.3.4.
(In case anybody comes looking…)
Right now, I've got the scripts as tools. I'm loading them from a plugin script. Then I'm manually adding them to the Custom Effect array of a RichTextNode using the inspector dropdown.
I may try adding an extension to RichTextLabel that already has everything loaded.

@Anyeos
Copy link

Anyeos commented Jul 13, 2024

I am actually on Godot 3.5 and adding the effect to RichText does nothing more than hidding the tags. But the effect is not applied, the text is normal and quiet like if there are no effect at all. The built in ones (wave, rainbow, etc) works.
Is there some more step to do?

Edit:

It is working, but not noticeable because "matrix" only worked with a long text (just by mistake some tags didn't closed and served as text for the effect). The "pulse" effect does not modify color (because the default is the same) and the default "height" parameter is 0.0 so there are nothing to see. When I put some value in "height" it started to showing something.

I suggest make the examples more exaggerated or noticeable like the built-in effects so someone like me see a difference more easily.

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

No branches or pull requests

2 participants