ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Search/Requests (https://www.esoui.com/forums/forumdisplay.php?f=165)
-   -   Request: Simple Riddle AddOn (https://www.esoui.com/forums/showthread.php?t=9541)

hornuser 01/10/21 08:55 PM

Request: Simple Riddle AddOn
 
Hi All!

I had a shower thought that ESO could be great to study aid.

I wonder if someone could make an AddOn that asks a study question every time we try to enter a door, but not in dungeons - drawing from a question and answer spreadsheet or comma/tab spaced document - and then when we click, will display the answer.

First Dialogue:

"3 x 3"

"Answer:" / "End"

Second Dialogue:

"Answer:" "9"

"End"

Thanks for any help or AddOn that you can provide!

-John

@hornuser
[email protected]

Baertram 01/11/21 02:51 AM

The problem is:
ESO is not allowed to access your local files.
Only the SavedVariables can be used and they need a decent lua table to read the data from,
or you could create a lua file in your addon table which holds this information in a table.
So there would be the need to replace/enhance the SV/the lua table file somehow, via an external tool or a client.exe shipped with the addon.
And this is something that virus tools block (or tend to).

The addon should work, it's just tricky to add new questions etc. It's not that simple that you could copy&paste excel sheets or similar.
You'd need to transfer them the corret lua table format first, by external tools.
But perhaps it would be possible to create the questions and answers data in an excel, and then (by the help of excel formulas) add the lua needed table surroundings. I did such within LibSets e.g.
You store the question in column a, the answers in columns b, c, d (multiple choice e.g.) and then you need a formula to concatenate all of them + adding the table lines end , into column d.

Then you'd be able to copy&paste the whole excel sheet's column d generated code contents into the lua file's table.

A table in lua looks like this:

Lua Code:
  1. tableName = { -- opening tag
  2.  [keyName1] = value1, -- , ends a line
  3.  [keyName2] = { -- subtable open
  4.    [subTableKeyName1] = value2,
  5.    [subTableKeyName2] = value3,
  6.  }, --subtable close
  7. } --closing tag

hornuser 01/11/21 04:13 AM

Fantastic - that text adjustment should not be a roblem using regular expressions to insert the needed code between each question and answer.

Let me know if you're interested in helping create the addon - I've learned a few basic coding languages in the past - html, javascript, etc. but I don't know where to start with addons.

Baertram 01/11/21 05:26 AM

I'm not interested into creating such an addon, no, sorry. I already maintainw ay too many addons :p
But getting started with ESO addons is described here, including the dev's chat where you may ask questions as well, easier than here on the forums (if it's code related):
https://www.esoui.com/forums/showthread.php?t=8413


All times are GMT -6. The time now is 06:33 PM.

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