Ask a simple question, get a simple answer
The purpose of this thread is to ask simple questions about the API and not a How-to tutorial. I have so many questions that often can be resolved with a yes or no, or a link to something that this type of thread may be beneficial to others.
When asking a question preface it with a Q# and answer with an A#. I have one! ~laughs~ Q1: Is there a way to reverse the fill direction of a <StatusBar> with an attribute from the standard default of left-to-right? |
Hey unLeashed3k,
A1: no, but you can do that like I did in my All Experience Bars addon. The function is called HarvensExperienceBar:SwitchBarTextureAlignment(). |
R1: Darn!, was hoping it would be as easy as <StatusBar fill="REVERSE" /> or SetMinMax(-200, 0) then set values going down such as SetValue(-20) for 10% filled on the right side. So with your example, if I got it straight, is to grab the texture coordinates and pull it to the left then reset the anchor of the texture?
|
R1: Hmm... I didn't try SetMinMax(-200, 0) with SetValue(-x) - but I don't think it will work since the arrow texture is pointing in the wrong direction. Yes, I switched horizontal texture coordinates to make a mirror texture and then reanchored it with the other end. But all the problems are gone when you use statusbars like in my Research Timers
|
Quote:
xml Code:
|
R1(Garkin): Works! I was using barAlignment="BAR_ALIGNMENT_REVERSE" because the WikiDocumentation told me so! Last time I listen to the Wiki! =)
|
I was sure it will not work because that's the case with ZO_ArrowStatusBarWithBG. But looks like ZO_PlayerAttributeStatusBar is completly different... sorry for misleading you :)
|
In the hopes of helping others [new to this API] I will self-answer my own question!
Q2: How do I hide my frame/window when I open my Inventory, Journal, Map, etc but not when I show my cursor? A2: This tutorial explains all by Garkin. |
Q3: Is there a way to get any index (map, zone, subzone) that's reliable to where the character is actively standing in the world or must I set up my own 'key = value' table and check that table against GetPlayerLocationName (which seems to be the only dependable information about where the player is and not what map is being viewed)?
|
Quote:
Lua Code:
- If you use GetPlayerLocationName(), GetMapName() or GetUnitZone(unitTag) there are duplicate names (check map list on Esohead - http://www.esohead.com/map). Also there are issues with localized names. - GetCurrentMapZoneIndex() - zone and subzone has the same zone index (subzone = city in the zone) - GetCurrentMapIndex() works only for maps listed in WorldMap - GetMapTileTexture() returns "Art/maps/stormhaven/wayrest_base_0.dds". As it is file name it must be unique. Bingo. At first you have to reset map position, to be sure that you're checking correct location: Lua Code:
Lua Code:
And then use: Lua Code:
zone = "stormhaven" subzone = "wayrest_base" or if you want just single location name: Lua Code:
zone = "stormhaven/wayrest_base" Or if you are using LibMapPins library, then: Lua Code:
See topic: http://www.esoui.com/forums/showthread.php?t=1431 |
R3: That is what I was looking for Garkin and wish I looked at the Wish List forums a little more careful before asking.
Also SetMapToPlayerLocation() is what I was using, and it did work, but I was having some odd after-results (weird zooming on the World Map) whenever I called it. Lua Code:
What I needed to make to make my function work. Thanks! I think I should start paying you to mentor me... seems I'm the only one asking the newbie questions. ~laughs~ |
R3: I am not sure what exactly you plan to do, but you should probably also take a look at my LibGPS. It provides methods to get a global position (x,y) and solves a lot of these map changing issues internally.
|
Quote:
|
I got two too (that might actualy be related):
Code:
ZO_SavedVars:New() Quote:
What exactly would be the use, since we can just seperate our saved table however we like in the first place? The whole issues between 1.2.3 and 1.3.3 pointed me towards something interesting: The saved variables do allow to share data OS user wide. It is just that the system seems to be hardcoded to use the result of GetDisplayName() and I don't want to overwrite this one (again). I need something more granular. Q5: Is it possible to manually overwrite wich Zenimax account ZO_SavedVars:New() uses? Specicially I would like to use the account "" or "[some constant string that is not likely to be mistaken for a real account name". |
Quote:
After all the trouble with saved variables, I'd advise everyone to simply avoid ZO_SavedVars altogether. |
Quote:
|
Quote:
Code:
## SavedVariables: MyAddon_SavedVariables Lua Code:
As an example check Wykkyd's or Seerah's addons. |
Saved variables is just a table and you can define how its structure should look like.
Default structure is: Lua Code:
You can define all key names (except of displayName and characterName): Lua Code:
And if you don't like this structure, just use MyAddon_SavedVariables as any other table. A4: What is the use for profiles? You can have for the same account name and character name stored more profiles. I have never used it, but I can imagine that it works this way: Lua Code:
A5: If you are asking if you can force ZO_SavedVars:New() to use user defined string instead of displayName, it can be done only if you redefine function GetDisplayName() (and GetUnitName(unitTag)), the same way as it does Display Name Fix addon. |
Quote:
Define a global variable of that name Automatically write it to disk on UI unload/read it in from disk on UI load. The loading is finished just before the first OnLoaded Event is fired. All ZO_SavedVars does is help you with structuring the data by account, character, namespaces, etc. It also provides built in versioning system (perhaps the most usefull part). You can just as well treat it like any other table with subtables and write it directly. That way you avoid issues (the way ZO_SavedVars get's the account name is hardcoded wich lead to the issues between 1.2.3 and 1.3.3). I started work on a really small library taht should deal with the main plumbing issues for you, as long as you tell it wich global variable to write too it takes care of the rest. Not yet finished, however. |
Q6: Does the provided API have the functionality to detect the [red circle, cylinder, cone] ground effects (the precursor to an upcoming ability) from your combative target(s)?
|
A6: No, and it never will. (edit: I'm not a prophet, but it's highly improbable they allow that, unless it's completely useless)
|
R6: I assumed this to be true (due to automation) but was hoping something fired that I could do something with, if only a textual notification. Playing in first-person I have to look directly at the ground when I fight... guess that's my problem. =)
|
Quote:
Not that I know of. As general rule everything that happens in the 3D world is beyond our reach. Only if the data normally reaches the 2D interface in front of the 3D world can we affect it. Even just changing thier color requires a mod: http://forums.elderscrollsonline.com...-colour-change |
R6: Would anyone so happen to know if Daltonize/SweetFX mod gives volume (height) also, or is it just to just change the color for those that are color blind?
|
All times are GMT -6. The time now is 09:32 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI