ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   @ZOS? JumpToSpecificHouse -> List of player's houses (https://www.esoui.com/forums/showthread.php?t=6994)

Noobanidus 04/22/17 09:47 PM

@ZOS? JumpToSpecificHouse -> List of player's houses
 
The latest API patch notes indicated that we will now be able to travel to more than just the player's default house. This is awesome news! I can think of several ways this new functionality could be used in addons.

However, there doesn't seem to be any way to actually know which houses a player has purchased so that you can decide which one to port to (out of simply trying every one of them).

A way around this would obviously be an addon that modifies your guild note (or provides a note people can use for you on their friend's list) to specify which houses people can visit. Another facet of that addon could then use this information and simply present it through a right-click menu with "Jump to house" and a submenu for the different possible houses.

Alternately, can we hope/ask for some function that returns all the valid house IDs for a player id?

ZOS_ChipHilseberg 04/24/17 08:10 AM

Quote:

Originally Posted by Noobanidus (Post 30682)
Alternately, can we hope/ask for some function that returns all the valid house IDs for a player id?

Unfortunately this is a rather expensive query on the server. We may add it at some point, but it would have to be in a controlled manner and might involve some restructuring.

sirinsidiator 04/24/17 08:36 AM

I would also like to see something like that for EasyTravel.
Code:

houseIds = GetHouseIdsForJump(displayName)
houseNickname = GetHouseNickname(displayName, houseId)
zoneIndex, poiIndex = GetJumpToTarget(displayName)

would be really nice. :D

Baertram 04/24/17 08:47 AM

Maybe the queries are less expensive if you'd use the unique player's ID instead of the displayName?
Or aren't we able to locally get the ID as a return value of a function, instead of the displayName?

Dolgubon 04/24/17 05:18 PM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 30693)
Unfortunately this is a rather expensive query on the server. We may add it at some point, but it would have to be in a controlled manner and might involve some restructuring.



If that's too expensive, would a simple IsValidHouseJump or something similar work? It's something the server will effectively have to call before the player jumps to the house anyway. Or possibly give JumpToSpecificHouse a return value if the house is unavailable. That wouldn't really be ideal because then an addon cannot compile a list of what houses can be jumped to, but it might still help.

manavortex 04/25/17 12:06 AM

Yeah, I agree to what Dolgubon says - that way our AddOn can do the expensive query once and set up valid entries ;)

ZOS_ChipHilseberg 04/25/17 01:28 PM

The jump should return a failure event if it doesn't work already. That is more performant than doing a separate check in the case of success because it would have to look up twice. Anything more would expose the server to being slowed down by malicious code. We'd need a proper API that is rate controlled and also a look at the way the database is setup to offer an API here. It's not impossible, just not instantaneous.

sirinsidiator 04/25/17 01:55 PM

Maybe you could make this into a bigger thing and add some kind of "inspection" feature.
Player A can select which information should be visible for others, e.g: equipment, stats, skills, owned houses, joined guilds, other chars, etc and by who (friends, guild, specific player, anyone, nobody) a bit like the permissions in the housing system work.
Player B can then open the inspect view of player A when he meets him in the world, or has him in one of his social lists and see all the data he is allowed to see.
You could also use this permission system for the dungeon loot which addons currently can read without users having any way to block it and dps numbers which are currently not easily shareable.

Noobanidus 04/25/17 06:35 PM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 30693)
Unfortunately this is a rather expensive query on the server. We may add it at some point, but it would have to be in a controlled manner and might involve some restructuring.

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 30709)
The jump should return a failure event if it doesn't work already. That is more performant than doing a separate check in the case of success because it would have to look up twice. Anything more would expose the server to being slowed down by malicious code. We'd need a proper API that is rate controlled and also a look at the way the database is setup to offer an API here. It's not impossible, just not instantaneous.

Honestly, this is the response I was expecting. I think the best way currently would be something that spits out a machine-readable string which can be put in your guild member note or shared with other players (for friends list notes, etc), and something that reads that and gives you a list of houses you can port to.

This also has the added flexibility of allowing players to skip houses they haven't decorated yet, etc.

manavortex 04/26/17 12:53 AM

The jump failure is the answer to the original problem - we will be able to tell what houses are accessible and which are not. The inspection feature is something else - something I find rather interesting!

Chip, could it be done?

Granpafishy 05/22/17 04:29 PM

So is there a way to jump to a non-primary house? I haven't see how it's suppose to be done.

Dolgubon 05/22/17 04:41 PM

Not without addons or /script. Stay tuned.

Granpafishy 06/06/17 03:23 PM

Any progress?

Ayantir 06/06/17 03:36 PM

New features are only done when API raise. Wait 3 months and come back.

BoarGules 06/29/17 06:59 AM

To find out which houses a player has purchased you can do

Code:

for _,v in pairs(COLLECTIONS_BOOK_SINGLETON:GetOwnedHouses()) do
Then v.houseId gives you what I think you are looking for.

Dolgubon 06/29/17 06:30 PM

Quote:

Originally Posted by BoarGules (Post 31664)
To find out which houses a player has purchased you can do

Code:

for _,v in pairs(COLLECTIONS_BOOK_SINGLETON:GetOwnedHouses()) do
Then v.houseId gives you what I think you are looking for.

They are looking for a way to get the list of houses for another player, not the player themselves.

iwontsay 06/29/17 10:27 PM

That would come close to listing up all of a foreign player's collectible items and not just houses. I'd be not quite happy about the prospect of Joe Random Troll having read access to my inventory of collectible items. In fact I'm not quite happy if it just concerns the list of houses.

I'd support it only if there is a possible way for every player to decide for himself to make his inventory list readable to others or not. Because I'd definitely set this option to 'no one', or 'friends only' at most.

Dolgubon 06/30/17 05:24 PM

Quote:

Originally Posted by iwontsay (Post 31671)
That would come close to listing up all of a foreign player's collectible items and not just houses. I'd be not quite happy about the prospect of Joe Random Troll having read access to my inventory of collectible items. In fact I'm not quite happy if it just concerns the list of houses.

I'd support it only if there is a possible way for every player to decide for himself to make his inventory list readable to others or not. Because I'd definitely set this option to 'no one', or 'friends only' at most.

That's definitely a very good point, and something to consider. That said, a list of houses that you have given someone permission to visit can be found simply by attempting to port to each house.

iwontsay 07/01/17 09:54 AM

Quote:

Originally Posted by Dolgubon (Post 31681)
That's definitely a very good point, and something to consider. That said, a list of houses that you have given someone permission to visit can be found simply by attempting to port to each house.

Of course one can brute force to get a list of accessible houses of a target player - I wonder if the response is as coarse as "you do teleport" or "you can't teleport" or as fine grained as to why you can't enter a specific house (not owned by player, no permission, ...) - but I think it may take some time, especially if there is quite a number of houses on the list which are open to the one who tries it and perhaps the flood protection on the server may have a say in it, too. As in, kicking a player after the tenth teleport attempt in five seconds.


All times are GMT -6. The time now is 04:39 AM.

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