How to change format for keywords

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
erasmo.rayon
Posts: 7
Joined: Thu Nov 28, 2019 2:40 pm

How to change format for keywords

Post 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?
User avatar
Tony Li
Posts: 21954
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to change format for keywords

Post 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.
Post Reply