05/22/17, 10:32 AM | #1 |
[implemented] Guild Kiosks
A while ago I added a new feature to AwesomeGuildStore which automatically generates a list of every guild kiosk in the game and when a player visits the NPC it remembers the guild owner.
This is currently language dependent and basically only works in English, because the kiosks are tracked by the NPC name and map name and guild names are parsed from strings. With Morrowind out of the door I figured I'd summarize what I currently do to achieve this and what API additions I would like to see in order to simplify the feature and make it work more robustly. There are 3 different data sets I collect.
1) Getting all stores and kiosks This currently works by iterating over all zone and city maps and looking through all location pins for the desired type. When switching to a zone map, it iterates over all location pins and checks for guild kiosks by comparing the icon. Then it steps into each city map by iterating over all POIs and using ProcessMapClick on them and repeating the same function used to get kiosks on a zone map. It collects the kiosk from the location tooltips, but there are several problems:
2) Getting the location and guild owner The addon scans the unit caption whenever the player looks at a different NPC and tries to parse it for the guild name. When the guild store is opened, it will also store the exact location of the kiosk as it is not available from the outside (using the "reticleover" unittag). For guilds that the player is a member of, the kiosk name is received via GetGuildOwnedKioskInfo to automatically update the list. Main problems here:
3) Trading weeks The owner data is then stored per ISO week in order to keep record of which guilds have shown up where. The game itself does not supply the trader change time anywhere outside of the kiosk bidding dialog, so I had to hardcode the UTC time which has been announced in some forum post. I also had to write a whole library to handle timestamps and get ISO weeks from them. The game also does not reliably update the guild information when the trader change happens and there is a delay of one or more minute before anyone knows if their bid actually made it unless they stand in front of the kiosk and open the guild store after the change. Problems:
For 1 and 2 it would be ideal if there was a whole new API to get kiosk data: Lua Code:
For 3 it would be nice to have some more functions to work with timestamps in order to move the calculations from lua to c code. A function GetTraderChangeTime() which returns the timestamp for the next trader change on the current server and an event which gets fired at the trader change time and signals that the new owner info is now available would also be very desirable. |
|
05/22/17, 03:46 PM | #2 | |||||||
A lot of the requested changes would require adding more to the data setup and using a good bit of designer time to populate which I don't have control of. However, I can ask about the server time things. If you can think of changes that would not require accessing traders globally those would have a better chance of getting done too. |
||||||||
05/22/17, 05:32 PM | #3 | |
|
It is making it so much harder to localize due to the string parsing nature. Having said that can we have an API to get masterwrit's required item's item link instead of having to parse it!! plz..plz...plz.. |
|
05/23/17, 04:40 AM | #4 | ||||||||
Lua Code:
The caching between language changes is not really a problem for "normal" users, but it requires me to relog when I want to test it in different languages. If it's easy to fix I would welcome it, but it's not really a priority.
Getting all the possible strings myself is not really feasable, because there are now 184 traders and I would need to hire each of them and then switch to all languages in order to compile this list.
|
|||||||||
06/06/17, 08:56 AM | #5 |
I added GetGuildKioskCycleTimes() - despawnTimestampS, bidEndTimestampS, respawnTimestampS. These values are available on guild data loaded.
I also exposed the os time functions if that is any help. |
|
06/06/17, 09:00 AM | #6 |
06/06/17, 09:59 AM | #7 | |
![]() ![]() ![]() Exposing the os time functions will help me a lot and possibly make LibDateTime unnecessary. Just wondering, for "normal" Lua 5.1 on windows os.date causes a crashes for certain patterns that are not supported by the Microsoft implementation of strftime used underneath. Will ESO Lua and possibly the game also crash in that case? (e.g. when calling os.date("%V") to get the current ISO week number) Last edited by sirinsidiator : 06/06/17 at 10:07 AM. |
||
ESOUI » Developer Discussions » Wish List » [implemented] Guild Kiosks |
«
Previous Thread
|
Next Thread
»
|
Thread Tools | |
Display Modes | |
|
|