Hi,
We are trying to find a solution to a problem related to the Gather Text feature and have researched solutions but come up with nothing matching our specific case. Most issues relates to trying to get text included when doing a gather text, ours is the opposite.
Situation: We have a custom action which allows us to enter the ID-number of a specific line in our gathered text to make a character speak that line. We’re doing this for several reasons like reusing common lines in a simple and fast way as well as for debugging and developing (simplifying certain tasks).
Problem: When doing a Gather Text we get duplicates of those text lines (a new entry and ID is created for the same text line in the gathered text - but not being used in the project). This happens sporadically and we haven’t managed to figure out why exactly it happens. What we have concluded is that it relates to the above mentioned action where we enter the ID-number of a text which then (sometimes, not always) is considered to be a new line of text when doing a Gather Text. This was fine when the project was small since we could just clean out these duplicates and move on. But as the project has grown, so has this issue and it has become unsustainable at this point to go through all that text to identify and rectify.
Solution: One thing that seems would be a simple solution to this is if there was a flag (like a boolean) that could be set in the action telling AC to not include a certain action. Ideally we could then just add a checkbox to our action allowing us to excluded that certain action and thus avoiding the risk of having duplicates popping up.
Question: Is there such a flag that we just missed that can be set on a script or action to exclude it from the Gather Text procedure? If not, would it be possible to add such a feature (either by us doing it ourselves or for a future version of AC)? Or are we thinking about this the wrong way?
I hope this is clear enough but let me know if there’s anything that should be expanded upon or explained better.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @gamesNstruff.
During the "Gather text" process, the Speech Manager will search for Actions (and MonoBehaviours) that impement the ITranslatable interface.
You can find more details on this in the Manual's "Custom translatables" chapter.
If your custom Action is being included in the process, check that it doesn't derive from ITranslatable - either directly, or by inheriting from ActionSpeech, which does.
If it's a case of the latter, you should be able to override this by having it implement its own variant of the GetNumTranslatables function, i.e.:
I'm only speaking generally, however. If you can share the exact code you're dealing with, I can try to give more specific advice.
Hi @ChrisIceBox
Thanks for your swift reply!
Yes, we did look at the iTranslatable interface and have already tried overriding it as you suggested with the GetNumTranslatables. Maybe something else that we're missing with iTranslatable?
Not sure how much of the code you need but here's a bit of it if that helps (I can paste the full code if you like)?
Thanks again!
Are you deriving from ActionSpeech?
Try flagging the original GetNumTranslatables as
virtual
, and then your own asoverride
.If that fails, share the script in full.
Yes, it is derived from ActionSpeech
Gonna try out your suggestions and get back with the results!