Thread Tools Display Modes
09/03/23, 10:57 AM   #1
PopeGreogry_IX
Join Date: Sep 2023
Posts: 3
First Addon - Rules on Reading Data Files Externally

Hi all!

Recent ESO player here who has some programming experience and has created the occasional mod for other games (Eliteangerous particularly).

Just asking about the rule stated in your wiki; specifically "ZOS does not want addons to communicate with any source outside the game in real time for a plethora of reasons."

This seems fairly cut-and-dry "don't do it...", and would prevent me from developing the addon I'm thinking of creating. The idea would be to have an addon saving a data file and then having an external app reading from that data file.

However, I look at big addons that are allowed, such as uespLog, and that appears to do exactly what I'm intending, but it is allowed on ESOUI and presumably is not considered to violate that rule.

Like I said - the wiki statement would normally stop me in my tracks, but if other valid developers read real-time data and upload it externally, it makes me think there must be a way of doing this while keeping ZOS happy? Is saving a file and then reading that file back with an external application not considered "real-time" enough that it's an issue - perhaps ZOS are purely trying to prevent external network communication from within the Lua script?

Cheers,
Adam
  Reply With Quote
09/03/23, 11:30 AM   #2
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 655
https://wiki.esoui.com/How_to_get_your_AddOn_removed
https://www.esoui.com/forums/showthread.php?t=9865

Those explain what mods cannot or should not do and you seem to have read them. The mods you have already listed do not communicate in real time. Meaning as you press the R key at the kiosk or the E key to get more sales data. There is no on screen OCR, there is no QRcode, and anything provided with the download only sends information once you log out or reload the UI.

We encourage people to understand that as far as data sharing is concerned, if you push the boundaries and what you do is different enough that ZOS does not like it then they may remove the API functionality you are using. Which would then break any mod using the same functionality.

Originally Posted by PopeGreogry_IX View Post
The idea would be to have an addon saving a data file and then having an external app reading from that data file.
Disk access is disabled. You can not save to your own personal file you choose nor can you write in the format of your choice. You can only save to the SavedVariables file associated with your mod.

Originally Posted by PopeGreogry_IX View Post
perhaps ZOS are purely trying to prevent external network communication from within the Lua script?
Any Lua able to do this would not work and has probably been disabled.

Last edited by Sharlikran : 09/03/23 at 12:03 PM.
  Reply With Quote
09/03/23, 11:39 AM   #3
wookiefriseur
 
wookiefriseur's Avatar
Join Date: Mar 2014
Posts: 53
That just tells you why you can't open sockets or use the fs in ESOLua. There are many AddOns with an accompanying client that download and upload data. But none of it is real time.


I agree that the way it is written in the Wiki it can be mistaken for an outright ban on any communication.
  Reply With Quote
09/03/23, 12:57 PM   #4
PopeGreogry_IX
Join Date: Sep 2023
Posts: 3
Perfect, thank you - and for the understanding about how the wiki being written in that way could lead to doubts.

I already realise that direct network access and direct fs access have been disabled, so the way I interpret the situation is that I would potentially be in violation of this rule is if I started spamming the SavedVariables system which I don't intend to do anyway.

Thanks again and let's see how I get on with this Lua thing...

Cheers,
Adam
  Reply With Quote
09/03/23, 03:02 PM   #5
wookiefriseur
 
wookiefriseur's Avatar
Join Date: Mar 2014
Posts: 53
Post

You can't spam the SavedVars anyways. They usually are written when you reload the UI or log out. There was also some kind of autosave system, saving once every 15 minutes with 1 manually triggered save allowed (but no idea how that works).

In general if you send too many requests to the server in a short amount of time or if you run a local calculation that freezes the main thread for too long, you just get disconnected. So basically you can't really break anything by mistake. But it never hurts to use the API in a sensible way and not overwrite global values and so on.

Regarding this "Lua thing": If you want some auto completion I can recommend using LuaLS (formerly known as sumneko.lua) as a language server. You can reference ESOAPI definition files and files from other AddOns as external libraries. Also Lua5.1 != ESOLua. Check https://wiki.esoui.com/Esolua for details. PS: The mentioned Coroutines don't work yet.

If you want validation for XML-GUI stuff, sirinsidiator made definitions that you can include:
XML Code:
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <GuiXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3.  xsi:noNamespaceSchemaLocation="http://sir.insidi.at/or/schema/esoui.xsd">
  4. ...
  5.  </GuiXml>


Also check out https://www.esoui.com/forums/showthread.php?t=9867 if you haven't already



Have fun with your addon development.
  Reply With Quote
09/03/23, 03:43 PM   #6
PopeGreogry_IX
Join Date: Sep 2023
Posts: 3
Cool. I tend to use Jetbrains tools for my .net WebAPI development (specifically Rider with C#) and will probably be writing the "Companion" for my addon in C#/MAUI.

IntelliJ seems to have a decent Lua plugin, so will start off with that and if it causes too much of an issue being ESOLua, I'll re-think. So far (with some basic example projects), the intellisense seems to be working reasonably well.

Thanks again for the pointers.

Adam
  Reply With Quote
09/03/23, 06:46 PM   #7
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
Hint: Wiki is open, feel free to edit the texts that do not match (once we found out it could be improved)

I've added te headline "External Communication", hope it explains (in combination with the existing headline "Realtime Communication") everything now.
If you got any better describing text or idea how to make it more clear, please go ahead.

Last edited by Baertram : 09/04/23 at 07:33 AM.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » First Addon - Rules on Reading Data Files Externally


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