Thread Tools Display Modes
08/11/14, 03:36 PM   #1
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by zgrssd View Post
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".
I tried that long ago, perhaps before 1.2. There was a function you could pass account name to (i.e. fake whatever you wanted, while maintaining their sv[profile][account][character] structure). I wanted to use that to read another account's settings, for example - but the function was bugged (and I reported that) in such a way that it didn't work at all - they forgot to pass that parameter down and it ended up in some kind of "nil argument" error.

After all the trouble with saved variables, I'd advise everyone to simply avoid ZO_SavedVars altogether.
  Reply With Quote
08/11/14, 07:29 PM   #2
Randactyl
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 251
Originally Posted by merlight View Post
After all the trouble with saved variables, I'd advise everyone to simply avoid ZO_SavedVars altogether.
I've seen this mentioned a couple of times. How does one avoid ZO_SavedVars in the first place?
  Reply With Quote
08/11/14, 08:19 PM   #3
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by Randactyl View Post
I've seen this mentioned a couple of times. How does one avoid ZO_SavedVars in the first place?
You can directly access saved variables table defined in manifest (.txt):

Code:
## SavedVariables: MyAddon_SavedVariables
Lua Code:
  1. local savedVars
  2. local defaults = {
  3.     key1 = "value1",
  4.     key2 = "value2",
  5. }
  6.  
  7. EVENT_MANAGER:RegisterForEvent("MyAddon", EVENT_ADD_ON_LOADED,
  8.     function(event, addon)
  9.         if addon ~= "MyAddon" then return end
  10.         EVENT_MANAGER:UnregisterForEvent("MyAddon", event)
  11.  
  12.         MyAddon_SavedVariables = MyAddon_SavedVariables or defaults
  13.         savedVars = MyAddon_SavedVariables
  14.     end)

As an example check Wykkyd's or Seerah's addons.
  Reply With Quote
08/12/14, 06:25 AM   #4
zgrssd
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 280
Originally Posted by Randactyl View Post
I've seen this mentioned a couple of times. How does one avoid ZO_SavedVars in the first place?
All the manifest line "SavedVariable" says is:
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.

Last edited by zgrssd : 08/12/14 at 06:27 AM.
  Reply With Quote
08/12/14, 01:35 PM   #5
unLeashed3k
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 33
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)?
  Reply With Quote
08/12/14, 01:47 PM   #6
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
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)

Last edited by merlight : 08/12/14 at 01:50 PM.
  Reply With Quote
08/12/14, 02:00 PM   #7
unLeashed3k
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 33
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. =)
  Reply With Quote
08/12/14, 03:36 PM   #8
zgrssd
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 280
Originally Posted by unLeashed3k View Post
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)?
AoE Markers/Telegraph?

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
  Reply With Quote
08/12/14, 03:52 PM   #9
unLeashed3k
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 33
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?
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Ask a simple question, get a simple answer


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