ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Help/Support (https://www.esoui.com/forums/forumdisplay.php?f=164)
-   -   Boss room (https://www.esoui.com/forums/showthread.php?t=8412)

Aaxc 03/18/19 08:55 AM

Boss room
 
Hello,
a short question I could not find the answer to - how do I determine if I'm boss room/location?

And also what boss/bosses are there?

Wheels 03/18/19 09:13 AM

The unitTag for bosses is 'bossX' where X is a number between 1 and MAX_BOSSES (currently 6).

Code:

DoesUnitExist('boss1')
will return true if you are in range of a boss with the unitTag 'boss1'.

Code:

GetUnitName('boss1')
will return the name of the unit with the unitTag 'boss1' if it exists.

Aaxc 03/18/19 09:30 AM

Thank you. Can I also get the Boss ID? `GetUnitId`doesn't seem to exist.

Meaning, the name alone does not tell me if the boss is normal/vet or has adds around it (ie mini trials). But they do have different IDs though (at least I hope so).

Baertram 03/18/19 09:36 AM

Nope they got no id. Just the name :( If you build something for it be sure to support other languages as well.
You are able to change the visible language ingame via:
/Script SetCVar("language.2", "<lang2>")
Where <lang2> can be:
de
en
fr
jp (only if you have installed the Japanese client!)

Only with a custom addon to support the languages:
ru
pl
pt
es
it
zh
and maybe others

You are able to check if you are in a vet or normal dungeon though.

Function to use:
* GetCurrentZoneDungeonDifficulty()
** _Returns:_ *[DungeonDifficulty|#DungeonDifficulty]* _isVeteranDifficulty_


The value returned is of this type "DungeonDifficulty":
* DUNGEON_DIFFICULTY_NONE
* DUNGEON_DIFFICULTY_NORMAL
* DUNGEON_DIFFICULTY_VETERAN

There is also an event fired if the difficulty changes so you need not to check it at EACH boss fight but only once if you get into a dungeon and in between as it changes:
* EVENT_GROUP_VETERAN_DIFFICULTY_CHANGED (*bool* _isVeteranDifficulty_)

For entering the dungeon I'm not sure if there is an event but you can search the API files and the wiki!


Find all api functions here (check the current's API .txt file):
https://wiki.esoui.com/APIVersion

Aaxc 03/18/19 09:48 AM

Thank you, that will have to do

Wheels 03/18/19 10:00 AM

Technically they do have "IDs", but not in the sense you are hoping for, as Baer has said. Events like EVENT_COMBAT_EVENT will give values for 'sourceUnitId' and 'targetUnitId' for events in the area, but these IDs will be unique to the instance and not helpful for building a table of known bosses.

Scootworks 03/18/19 02:01 PM

you should listen to:EVENT BOSSES CHANGED

Aaxc 03/18/19 02:26 PM

And about the difficulty. I get 2 for veteran. But how do I see if any mini bosses are killed. In mini trials there is more then one difficulty for each version

Baertram 03/18/19 03:09 PM

Sorry, no idea.
Check if the lua API files I linked have some event or API function for this.
Or try Scootworks event mentioned above.

If this does not help: Build a table with multilanguage boss names and use it.
Or check if there is a library like libBosses already which helps and did build the table already for you?
e.g.
https://www.esoui.com/downloads/info...BossFight.html

This looks liek it already does what you want to do. So use it :-D


All times are GMT -6. The time now is 03:11 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI