Thread Tools Display Modes
08/25/22, 10:30 AM   #1
jenorthar
Join Date: Jan 2022
Posts: 3
Is the Player in a Tribute Game?

I have been looking for a status to indicate if a player is in a Tribute game. It doesn't have to know anything more than that - similar to isDiggingGameActive() determines if someone is in the excavation UI. Is there such a thing?
  Reply With Quote
08/25/22, 10:47 AM   #2
ExoY
 
ExoY's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2020
Posts: 88
Do you want to that if your own character is in a tribute game or somebody from your friendlist / gildroster?
  Reply With Quote
08/25/22, 10:57 AM   #3
jenorthar
Join Date: Jan 2022
Posts: 3
I want to know if the player with the add-on is in a Tribute game so I don't do certain actions that disrupts that.
  Reply With Quote
08/25/22, 11:04 AM   #4
ExoY
 
ExoY's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2020
Posts: 88
This is possible, but not directly with a simple function as with the digging example.

Listen for the event:
EVENT_TRIBUTE_GAME_FLOW_STATE_CHANGE
which returns as the second parameter the "flow state"

The existing flow states are:

* TRIBUTE_GAME_FLOW_STATE_BOARD_SETUP -- 3
* TRIBUTE_GAME_FLOW_STATE_GAME_OVER -- 5
* TRIBUTE_GAME_FLOW_STATE_INACTIVE -- 0
* TRIBUTE_GAME_FLOW_STATE_INTRO -- 1
* TRIBUTE_GAME_FLOW_STATE_PATRON_DRAFT -- 2
* TRIBUTE_GAME_FLOW_STATE_PLAYING -- 4


Now, as soon as you detect: TRIBUTE_GAME_FLOW_STATE_INTRO you know the player is in a tribute game until you detect the TRIBUTE_GAME_FLOW_STATE_INACTIVE which is called when the game and all related ui close.

You can always set the initial state after an reload to "not in a game" as a reloadui will end any tribute game currently active.


I think this should provide what you are looking for.

Last edited by ExoY : 08/25/22 at 11:07 AM.
  Reply With Quote
08/25/22, 11:08 AM   #5
jenorthar
Join Date: Jan 2022
Posts: 3
Thank You!
  Reply With Quote
08/25/22, 12:44 PM   #6
Masteroshi430
 
Masteroshi430's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2020
Posts: 185
try this :
Lua Code:
  1. if TRIBUTE_SCENE:IsShowing() then
  2.   --do stuff
  3. end
  Reply With Quote
08/25/22, 01:22 PM   #7
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 176
Or even

Code:
if TRIBUTE.gameFlowState ~= TRIBUTE_GAME_FLOW_STATE_INACTIVE then
    -- do stuff
end
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Is the Player in a Tribute Game?

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