Page 1 of 1

How to change format for keywords

Posted: Mon Feb 24, 2020 1:45 pm
by erasmo.rayon
Hi there!

I'm working on a horror visual novel and I'm trying to build an in-game codex with information about characters, locations, items, creatures, etc. This codex will be developed as you learn more information about the world. For example, let's say that you talk with a couple of NPCs:


Player: Stay calm, sailors. Now tell me: where's the captain?

NPC 1: We haven't found him yet, I saw him fall overboard during the storm but I believe he's still alive somewhere on this cursed island.

NPC 2: Nonsense! He's dead! We're all that's left from the San Miguel Company, jefe! Us and that slave kid we brought from Cuba, Julianillo.



How can I highlight keywords and phrases from the dialogues ("this cursed island", "San Miguel Company", "Julianillo") to let the player know that these are important terms? If possible, I'd like to change their style, color and font to make them stand out. and also, is there a way to make those keywords and only those keywords clickable/interactable?

Re: How to change format for keywords

Posted: Mon Feb 24, 2020 2:48 pm
by Tony Li
Hi Erasmo,

To highlight keywords, you can use rich text code or -- even better -- emphasis tags. You can set the appearance of emphasis tags in the Dialogue Editor, on the Database tab.
  • Dialogue Text: Nonsense! He's dead! We're all that's left from the [em1]San Miguel Company[/em1], jefe!
The easiest way to make the keywords clickable is to use TextMesh Pro. (See TextMesh Pro Support.) Use <link> tags:



This tutorial opens a browser when links are clicked: https://deltadreamgames.com/unity-tmp-hyperlinks/

But you could change that step to do something else, like update a quest state or show a hover tooltip.