View Single Post
01/15/16, 01:06 PM   #10
dopiate
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 142
I think this is already being done.....

Originally Posted by vandel212 View Post
So here is what I am doing. I'm gathering data and then having another application outside of ESO look at this then do some processing. So my workflow thus far is, go in game, do some stuff, have it save all the information, and reload the ui so it actually saves to the file. Then the external program processes the saved variables.

That works as expected. I do not want the external program to process the information again, so I'd like to have it clears out each line of the saved variable file that it processes. The issue is that once the user either reloads the UI or exits the game the lines of the saved var file are entered back in to the file. This would cause the external program to process them again next time. There are less attractive ways of getting around this, like checking to see if it's been processed already based on a unique ID, or forcing the user to shut down ESO before running the external application, but those are clunky ways of doing it. I'd rather be able to delete the line in the lua file without it showing up again and never have to worry about it.

So essentially, I'd like ESO to write the saved variables to the file, then forget they exist so that the external program's edits to the saved variables file won't be overwritten.

Maybe I'm reading this wrong but I think I'm already doing this in my program in coordination with Master Merchant.

Master Merchant gathers all sales from everywhere and when it finds a NEW sale that is from the current user, it then sends that eventID to the Guild Sales Assistant in game portion, which then gets the details it needs then sorts and saves the sales in a slightly different format that MM.

Master Merchant uses the sales id and date as the variables to sort out "new" sales, so in game it never sends Guild Sales Assistant any old sales.

Then the offline component of Guild Sales Assistant (GSA) parses the guildsalesassistant.lua saved variables and from that information it only gathers the new sales and puts them into the GSA "offline" database called GuildsalesassistantDB.lua (which is not LUA actually but just a good safe spot to store the flat file database).

So there are actually two examples of using just the new data and not deleting anything existing done both in-game and out of game.

Unless I'm missing something, which is always possible since my English language skills are terrible, you have two programs with two different solutions working together that you could use as an example or borrowed code for what you are trying to do.

In game MM never sends GSA anything but new data and GSA offline never processes any old data.

I understand you want to manipulate the existing savedvariables.lua file, but I went down that road in the very early days of GSA (pre-MM) and it caused lots of unexpected problems.

When you state:

Originally Posted by vandel212 View Post
There are less attractive ways of getting around this, like checking to see if it's been processed already based on a unique ID, or forcing the user to shut down ESO before running the external application, but those are clunky ways of doing it. I'd rather be able to delete the line in the lua file without it showing up again and never have to worry about it.
How exactly is keeping the old data (as backup or a double check) "clunky" ?

Just purge your saved variables based on a date. MM uses 30 days by default but you could do it for 2 days or 1 day or hourly depending on your goal.

If I missed the mark here, my apologies, but to me it seems like your trying to do what Philgo68 and I have already done, no?

Why re-invent the wheel, have a look at the code, maybe you can use some of it and save yourself some time?

Just trying to help :-)

-d

Last edited by dopiate : 01/15/16 at 01:26 PM.
  Reply With Quote