ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Location app? (https://www.esoui.com/forums/showthread.php?t=123)

Windshadow 02/27/14 12:33 AM

Location app?
 
If there is a way to record a location in terms of its map name and X Y coordinates I have not yet found it.

The usage would be to record resource nodes for future use, to let a guild buddy know the loc of a node of something needed for a quest or perhaps a meeting point.

Or once you find a resource node you record it with the icon fo it on your copy of the map for that sector so you can find it again if coordinates don't work.

Also to record the exact loc of skyshards again to help others in your guild and all the other useful things that the gatherer addon in wow does

Just wondering

SilverDragon 02/27/14 12:36 PM

I am looking for such an addon, too. I would really like to set markings and maybe comments/colour codes associated to them for points of interest.

Wykkyd 02/27/14 01:06 PM

local unitTag = "player"
local zoneName = GetUnitZone( unitTag )
local x, y, z = GetMapPlayerPosition( unitTag )

The values of x, y and z are relative to the zone map. And they are very "small" values. IE:

x might come back as 0.23788127281

x = west-east
y = north-south
z = altitude

A perfect 0,0,0 (for x,y,z) would be considered Base or Root position for that map.

x - Increasing value is moving west from 0. Decreasing is moving east.
y - Increasing value is moving north, decreasing is moving south.
z - Increasing value is descending altitude (distance below "sea level", if you will)

EDIT: I know, not an addon. But it's code to help someone else build one ;)

Windshadow 02/27/14 09:59 PM

Thanks I am sure someone is creating esogather right now... Or I hope so anyway.

Well its beyond my skill level I last did any real coding in 6502 assembler in the late 1970s
These days I can nearly pick my way through perl in unix.

A mans got to know his limitations!

Xrystal 02/28/14 03:40 PM

Rofl just got home from work .. so not even had dinner yet rofl. Give a girl a chance :P

Will see what I can get rigged up. baby steps ... baby steps :)

fewyn 02/28/14 05:51 PM

Quote:

Originally Posted by Windshadow (Post 614)
If there is a way to record a location in terms of its map name and X Y coordinates I have not yet found it.

The usage would be to record resource nodes for future use, to let a guild buddy know the loc of a node of something needed for a quest or perhaps a meeting point.

Or once you find a resource node you record it with the icon fo it on your copy of the map for that sector so you can find it again if coordinates don't work.

Also to record the exact loc of skyshards again to help others in your guild and all the other useful things that the gatherer addon in wow does

Just wondering

The Esohead addon provides coords on the map, and it also gathers location data so if you're using it and uploading to our site the Skyshards will get added to it. As you can see here: http://www.esohead.com/map#74.2.45.5...29:32:35:36:70

jgm 03/01/14 05:49 AM

Quote:

Originally Posted by Wykkyd (Post 642)
local unitTag = "player"
local zoneName = GetUnitZone( unitTag )
local x, y, z = GetMapPlayerPosition( unitTag )

The values of x, y and z are relative to the zone map. And they are very "small" values. IE:

x might come back as 0.23788127281

x = west-east
y = north-south
z = altitude

A perfect 0,0,0 (for x,y,z) would be considered Base or Root position for that map.

x - Increasing value is moving west from 0. Decreasing is moving east.
y - Increasing value is moving north, decreasing is moving south.
z - Increasing value is descending altitude (distance below "sea level", if you will)

EDIT: I know, not an addon. But it's code to help someone else build one ;)

Just FYI, it's not z but a, the heading.

jgm 03/01/14 05:50 AM

I have been working on such an addon, and have it to the stage where I obtain the co-ordinates for resource nodes. I still need to look at how to put custom pins on the map but am hopeful I can get something together before the end of the current beta.

Xrystal 03/01/14 08:04 AM

Ditto here, not gone anywhere near to playing with the map POI pins yet though. Still working out grabbing information and writing it out to SavedVariables file in a readable format - boy did that take awhile, totally different to how WOW does it rofl.

Wykkyd 03/01/14 08:59 AM

Quote:

Originally Posted by jgm (Post 690)
Just FYI, it's not z but a, the heading.

Well that's less handy.

Xrystal 03/01/14 09:19 AM

Is the heading as a value between 0 to 360 ?
As in degrees of angle you are facing ?
North = 0/360, East = 90, South = 180, West = 270 etc ?

jgm 03/01/14 10:11 AM

Quote:

Originally Posted by Xrystal (Post 695)
Is the heading as a value between 0 to 360 ?
As in degrees of angle you are facing ?
North = 0/360, East = 90, South = 180, West = 270 etc ?

That would be far too easy, it's in radians. West is pi/2, South is pi, East is 3pi/2 and North is 0.

Xrystal 03/01/14 02:47 PM

Hmm, am I missing something or is there no event that tells if you are mining, collecting, fishing ?

All I can do at the moment to find out what I am mining or collecting is to use the LOOT events and see what I am looting from.

Is this the only way to do it at the moment at least ?


Edit: Ah, looks like Harvest Interaction can only be trapped using the Update function, bummer. Oh well, rewritten to do that.

jgm 03/01/14 04:51 PM

Yep you have to jump through hoops to work it out. What I did was:
  • in OnUpdate keep track of the item being targetted
  • in OnLootReceived work out if I've picked up a material
  • use the targetted item to confirm that it came from a resource (hides can come from wolves, for example, which isn't interesting)
  • if all looks good them log it

It's all in the UI2 addon if you want to take a look; happy to answer any questions you might have about it.

Xrystal 03/01/14 05:17 PM

I ended up taking out the event to track what was looted as a harvest node is harvest node regardless of whether one time you got something useful and another time you didn't.

Happened to me with a plant so I thought what the hell.

All I do at present is use the onupdate routine to monitor a new interaction and whether it is a harvesting interaction ( although it looks like it also applies to the crafting stations for some reason, so need to see what else I need to validate to take them out ).

I looked at the esohead addon to see how it validated duplicate entries and used similar coding, so that it only adds a new item of the same type in the same zone as long as it is at a different location. But, if a different item has appeared in that location before it treats it as a new find.

Pretty simple and seems to be working okay apart from the crafting station glitch. It ignores butterfly looting and fishing as they are different interaction types and obviously regular looting. I am guessing the crafting station was added because I was refining raw items so in essence harvesting of a kind.

Once I get the crafting station problem fixed I think stage 1 is complete.

Xrystal 03/01/14 05:57 PM

Looks like I'm also lumbered with the xml file just to use the update routine which isn't allowed to be local because it is another file.

Has anyone figured out how to create a window just to use the update routine without using xml yet ?

I tried the following with no joy. This kind of thing worked for me in wow. Anything I am missing for it to work in ESO ?

Lua Code:
  1. addonWindow = WindowMgr:CreateTopLevelWindow(addonName.."Window")
  2. addonWindow:SetHandler("OnUpdate",
  3.   function(self,elapsed)  
  4.     d("addon windows update routine")
  5.     MyUpdateRoutine(self,elapsed)   -- This is working fine if called from the xml file OnUpdate section
  6.   end
  7. )
  8. addonWindow:SetHidden(false)

Errc 03/01/14 07:23 PM

Quote:

Originally Posted by Xrystal (Post 715)
Looks like I'm also lumbered with the xml file just to use the update routine which isn't allowed to be local because it is another file.

Has anyone figured out how to create a window just to use the update routine without using xml yet ?

I tried the following with no joy. This kind of thing worked for me in wow. Anything I am missing for it to work in ESO ?

Lua Code:
  1. addonWindow = WindowMgr:CreateTopLevelWindow(addonName.."Window")
  2. addonWindow:SetHandler("OnUpdate",
  3.   function(self,elapsed)  
  4.     d("addon windows update routine")
  5.     MyUpdateRoutine(self,elapsed)   -- This is working fine if called from the xml file OnUpdate section
  6.   end
  7. )
  8. addonWindow:SetHidden(false)

It use to work just like that, 2 or 3 patches ago it stopped working and forced the use of xml for OnUpdate. It is likely just a bug, but it has been reported in-game and on forums and it hasn't been fixed in over a month. So might end up being something we are stuck with.

Xrystal 03/01/14 07:30 PM

Okay thanks. Glad to know I wasn't missing something in the equation.

Xrystal 03/01/14 07:53 PM

Well think I have tracked down the stuck at the crafting station problem. So far I don't get stuck if I 'Use' the station while the interactionType is INTERACTION_CRAFTING. If, for some strange reason it thinks it is INTERACTION_HARVEST while being in 'Use' I got stuck. Might be sheer coincidence but I have put in a bug report with the idea as to the cause to them.

For now I have had to tell it to bypass any 'Use' actions as well.

Wykkyd 03/01/14 09:45 PM

In the next version of Wykkyd's Framework you could just call FW_Tic( TicName, Callback, ThrottleInSeconds ) and it'll trigger your callback OnUpdate, throttled via the setting you supply. Let my Framework handle the tedium/xml for ya ;)


All times are GMT -6. The time now is 02:49 PM.

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