Thread Tools Display Modes
01/09/16, 07:48 PM   #1
dominoid
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 34
Creating a new subtitle popup

I made great progress on the custom quest in the quest list. I got all the functions working in the Journal and haven't given up on getting the UI quest tracker to find it. Thought I'd ask a "quick" one in another area.

Looking at http://esodata.uesp.net/current/src/...itles.lua.html, why isn't making a new subtitle as easy as calling:

Lua Code:
  1. ZO_Subtitle:New(messageType, "Dominoid", "Something Dominoid is saying."

in the code? What is the "best" way to show a custom NPC subtitle? Should I add a fake NPC conversation to the NPC chat tab?

I noticed that ZO_Alert has a nice and tidy:

Lua Code:
  1. function ZO_Alert(category, soundId, message, ...)

TIA Again.
  Reply With Quote
01/18/16, 02:36 PM   #2
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 167
Whenever a NPC is talking, the game fires a EVENT_SHOW_SUBTITLE. The subtitle manager listens to this event and displays the subtitle whenever the event is fired (see line 87 of your linked source).
The subtitle manager displays the subtitle by calling OnShowSubtitle, so I'd call that function:
Lua Code:
  1. ZO_SUBTITLE_MANAGER:OnShowSubtitle(0,"Name","message")
The first argument is the message type. I don't know what types there are, but 0 worked fine when i tested it,

Last edited by Shinni : 01/18/16 at 02:43 PM.
  Reply With Quote
01/21/16, 08:54 AM   #3
dominoid
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 34
Thanks. Worked perfectly and annoyed me at it's simplicity. ;-)
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Creating a new subtitle popup

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off