TyranoBuilder Visual Novel Studio

TyranoBuilder Visual Novel Studio

curry Feb 7, 2021 @ 9:20pm
Color character names when speaking but keep highlighting function
Hello, I recently tried making each characters name a different color as they speak using html tags. However when I use the tag, tyranobuilder loses the ability to recognize that a certain character is speaking for whatever reason. Here is exactly what I have in the text node. I have tried it in tyranoscript node as well and it does the same thing.

#<font color="#d6ff70">Annie</font>
Hey!

I have also tried

<font color="#d6ff70">#Annie</font>
Hey!

but that displays the html tag as text for some reason.

Basically the character highlighting function when speaking doesn't work when I do this, and I want it to. Is there an easy way to do this? Would switching the html for a tyranotag work instead? I'm not very good with programming so I would prefer not to use a macro, but I will if i must!
< >
Showing 1-4 of 4 comments
Shimmersoft Feb 7, 2021 @ 10:08pm 
I think you can circumvent this with a small script placed in tyranoscript:

[iscript]
var str = "Annie";
var result = str.fontcolor("d6ff70"); < insert your hex code here
f.annie= result;
[endscript]

Then you'd just write the character names using the "final" variable:

#&[f.annie]
This is text!
[p]

What should happen is the system will input the name entered in "var str" (note that "str" just seems to be a common term for a basic variable, but it could be "var a" if you wanted, as long as you use it consistently (var result = a.fontcolor) while applying the color specified in "var result".

Now, when using this, it may not automatically recognize which character is speaking (as in, you're using the brightness/blur setting for characters). A way to correct this may be to introduce your characters in this way:

[chara_new name="Annie" storage="chara/1/annie.png" jname="&[f.annie]"]
[chara_show name="Annie" time=0 left=-200 top=408 page=fore layer=2 time=0]

(basically, write out the chara_new tag so that you can specify the jname with the variable).

Then, when you write text, just use the default character name (#Annie), and if this works as I hope that it does, the system will automatically apply the right color to the name while still preserving the brightness/blur setting.

Let me know if that's sufficiently clear and works for you!
Last edited by Shimmersoft; Feb 7, 2021 @ 10:13pm
curry Feb 8, 2021 @ 4:34pm 
Originally posted by Shimmersoft:

A way to correct this may be to introduce your characters in this way:

[chara_new name="Annie" storage="chara/1/annie.png" jname="&[f.annie]"]
[chara_show name="Annie" time=0 left=-200 top=408 page=fore layer=2 time=0]

Hello and thanks for writing this out for me! Ill be testing this out soon- but I wanted to clarify, should this segment go into the same tyranoscript node as the first segment, or somewhere else? Also, does "chara/1/annie.png" indicate the characters sprite image? Thank you!
Shimmersoft Feb 8, 2021 @ 7:11pm 
You'll just want to put those chara tags wherever you're introducing the character - doesn't really matter as long as it comes after the initial script. And yep, you should change out "annie.png" for whatever the name of the sprite is. Let me know if it works!
curry Mar 7, 2021 @ 5:40pm 
hi! sorry this took so long to get back to you. ive been working on this in my free time which i dont have much of, lol. i just got around to implementing this and it works great!! characters have colored names and are highlighted when speaking. the only thing different is that there is no gradual fade of the highlight when it switches characters, but i dont mind that so much (if you have a fix in mind feel free to let me know though!)

cant thank you enough :) ill let you know if there are any problems with the script in the future!
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Feb 7, 2021 @ 9:20pm
Posts: 4