Question about [nosubtitle] tag.
-
- Posts: 112
- Joined: Tue Jan 19, 2016 11:37 pm
Question about [nosubtitle] tag.
Hey,
whats the correct use of [nosubtitle] tag. ?
I tried it in both Menu Text field and Subtitle Text Field, but the text was still displayed.
I'm importing it from Articy if that changes anything.
I have latest asset store version of DS.
Thanks
whats the correct use of [nosubtitle] tag. ?
I tried it in both Menu Text field and Subtitle Text Field, but the text was still displayed.
I'm importing it from Articy if that changes anything.
I have latest asset store version of DS.
Thanks
Re: Question about [nosubtitle] tag.
Hi,
If a dialogue fragment would normally be shown as a subtitle, and if the dialogue fragment's text contains "[nosubtitle]", then it won't be shown as a subtitle. It will, however, still play the dialogue fragment's sequence. There's no issue importing it from articy.
Can you post a screenshot of how you're using it?
If a dialogue fragment would normally be shown as a subtitle, and if the dialogue fragment's text contains "[nosubtitle]", then it won't be shown as a subtitle. It will, however, still play the dialogue fragment's sequence. There's no issue importing it from articy.
Can you post a screenshot of how you're using it?
-
- Posts: 112
- Joined: Tue Jan 19, 2016 11:37 pm
Re: Question about [nosubtitle] tag.
Sure,
This shows up in Response reminder subtitle I think, since I have response dialogue after this. Basically I'm trying to use something like blank [About topic...] action, that lead to response dialogues of that topic.
Unrelated question, but is it possible to register Lua function that accepts multiple arguments?
I tried something like this but I kept getting errors.
This shows up in Response reminder subtitle I think, since I have response dialogue after this. Basically I'm trying to use something like blank [About topic...] action, that lead to response dialogues of that topic.
Unrelated question, but is it possible to register Lua function that accepts multiple arguments?
I tried something like this but I kept getting errors.
Code: Select all
void OnEnable()
{
//Lua.RegisterFunction("GetRandomUnhandledLine", this, typeof(CustomLuaFunctions).GetMethod("GetRandomUnhandledLine"));
Lua.RegisterFunction("GetRandomUnhandledLine", this, SymbolExtensions.GetMethodInfo(() => GetRandomUnhandledLine((double)0), (double)0), (double)0)));
}
void OnDisable()
{
Lua.UnregisterFunction("GetRandomUnhandledLine");
}
public double GetRandomUnhandledLine(double _MinInt, double _Max, double _OldValue)
{
if (_MinInt >= _Max)
return _MinInt;
List<double> _Numbers = new List<double>();
for (double i = _MinInt; i <= _Max; i++)
{
if (i != _OldValue)
{
_Numbers.Add(i);
}
}
return _Numbers[Random.Range(0, _Numbers.Count)];
}
Re: Question about [nosubtitle] tag.
Hi,
That may be an oversight on my part when there's Menu Text and Dialogue Text in the same node. The rule is that if Dialogue Text is blank (which it is after removing the [nosubtitle] tag), then it uses Menu Text as the Dialogue Text. I'll check this out and fix it if necessary in 2.0.4.
In the meantime, try adding some additional text to the Dialogue Text, such as: "[nosubtitle]About the family...".
That may be an oversight on my part when there's Menu Text and Dialogue Text in the same node. The rule is that if Dialogue Text is blank (which it is after removing the [nosubtitle] tag), then it uses Menu Text as the Dialogue Text. I'll check this out and fix it if necessary in 2.0.4.
In the meantime, try adding some additional text to the Dialogue Text, such as: "[nosubtitle]About the family...".
Yes. Looks like it's just some parenthesis issues. Try this line:hellwalker wrote: ↑Tue Aug 14, 2018 11:13 pm Unrelated question, but is it possible to register Lua function that accepts multiple arguments?
Code: Select all
Lua.RegisterFunction("GetRandomUnhandledLine", this, SymbolExtensions.GetMethodInfo(() => GetRandomUnhandledLine((double)0, (double)0, (double)0)));
-
- Posts: 112
- Joined: Tue Jan 19, 2016 11:37 pm
Re: Question about [nosubtitle] tag.
Thanks!
The additional text did not do the trick, but I think I can hijack the subtitle text through event and replace it manually.
The additional text did not do the trick, but I think I can hijack the subtitle text through event and replace it manually.
Re: Question about [nosubtitle] tag.
Yeah, I steered you wrong on that. I checked the code, and it doesn't care if there's more text or just [nosubtitle].
Could you please provide steps to reproduce this issue? I haven't been able to reproduce it.
Your text contains the square brackets, right? So the entire tag is "[nosubtitle]", not "nosubtitle".
Could you please provide steps to reproduce this issue? I haven't been able to reproduce it.
Your text contains the square brackets, right? So the entire tag is "[nosubtitle]", not "nosubtitle".
-
- Posts: 112
- Joined: Tue Jan 19, 2016 11:37 pm
Re: Question about [nosubtitle] tag.
Sorry it was my fault. ,
I had some code in OnConversationLine that combined speaker name and subtitle that I used to use in DS 1. That was fighting the nosubtitle tag. Hazard of reusing old code I guess. Once I deleted it, the tag works.
Thanks for the help.
Btw Is there a way to get Conversation line after it has been processed by all the tags etc? And what would be best approach to add custom tags?
I had some code in OnConversationLine that combined speaker name and subtitle that I used to use in DS 1. That was fighting the nosubtitle tag. Hazard of reusing old code I guess. Once I deleted it, the tag works.
Thanks for the help.
Btw Is there a way to get Conversation line after it has been processed by all the tags etc? And what would be best approach to add custom tags?
Re: Question about [nosubtitle] tag.
Hi,
When OnConversationLine(subtitle) is called, subtitle.formattedText.text will contain the processed text without tags. You can read the other properties of subtitle.formattedText to see what tags were extracted.
You can process your own custom tags in OnConversationLine, too. The dialogue UI will display subtitle.formattedText in whatever state your OnConversationLine method leaves it in. You can also change subtitle.sequence in OnConversationLine.
When OnConversationLine(subtitle) is called, subtitle.formattedText.text will contain the processed text without tags. You can read the other properties of subtitle.formattedText to see what tags were extracted.
You can process your own custom tags in OnConversationLine, too. The dialogue UI will display subtitle.formattedText in whatever state your OnConversationLine method leaves it in. You can also change subtitle.sequence in OnConversationLine.
-
- Posts: 112
- Joined: Tue Jan 19, 2016 11:37 pm
Re: Question about [nosubtitle] tag.
Awesome, thanks!