Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placeholders: Island Member/Visitor/Visited Names #2180

Closed
kristophergeou opened this issue Sep 1, 2023 · 1 comment
Closed

Placeholders: Island Member/Visitor/Visited Names #2180

kristophergeou opened this issue Sep 1, 2023 · 1 comment
Assignees
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Enhancement Improvement or modification which is usually a new feature.

Comments

@kristophergeou
Copy link

Description
These placeholders would be similar to %[gamemode]_island_members_list% and %[gamemode]_visited_island_members_list% but the only difference would be that it will return a single name of that list. So for example if the list placeholder returns: Bentobox, Aoneblock,Kristopher the %[gamemode]_island_member_name_1% will return Kristopher aka the first member name will be the island's owner, %[gamemode]_island_member_name_2% will return Aoneblock, %[gamemode]_island_member_name_3% will return Bentobox and so on.. for the other two %[gamemode]_island_visitor_name_1%.. and %[gamemode]_island_banned_name_1%.. there isnt a list placeholder but all of the suggested placeholders would work the same way

Placeholder: %[gamemode]_island_member_name_1%
%[gamemode]_island_member_name_2%
%[gamemode]_island_member_name_3%
and so on...

Placeholder %[gamemode]_visited_island_members_name_1%
%[gamemode]_visited_island_members_name_2%
%[gamemode]_visited_island_members_name_3%
%[gamemode]_visited_island_members_name_4%
and so on..

Placeholder %[gamemode]_island_visitor_name_1%
%[gamemode]_island_visitor_name_2%
%[gamemode]_island_visitor_name_3%
%[gamemode]_island_visitor_name_4%
and so on..

Placeholder %[gamemode]_island_banned_name_1%
%[gamemode]_island_banned_name_2%
%[gamemode]_island_banned_name_3%
%[gamemode]_island_banned_name_4%
and so on..

I have made things like this one for example with deluxemenus
image
and i havent figured out a way to combine all the island's players "progression" cause there isnt a placeholder that returns 1 by 1 the island members name. What i have in mind would be to use the parseother expansion to parse the progression of each member separately and then use the math expansion to combine them all as a team. Additionally the placeholder: %[gamemode]_island_member_name_1%.... for island member management gui, team achievements, team rewards, team boosters, team quests all of them customized out of bentobox and with the %[gamemode]_visited_island_members_name_1% simply a gui to view who r the team members of the island you are standing it.

Now for the %[gamemode]_island_visitor_name_1% I was thinking of a visitor management gui. In which island leaders ll be able to view who exactly is in their islands. It would be nice to parse the visitor's location XYZ and be able to see who is on your island and what their position is.

Same thing for the %[gamemode]_island_banned_name_1% placeholder. A gui that players ll be able to see who is banned in their island and be able to remove them.

I saw that for most of these placeholders, there is a _count placeholder which is great but as a person who wants to customize everything and have everything gui based it doesnt feel enough. But hey i am a gui freak after all who wants to customize everything
image

PS: if anyone has the knowledge and time to make these placeholders make it so the placeholder will return none if there isnt a name for the corresponding number. Also if u cant make them all i d love if u pick the %[gamemode]_island_member_name_..% cause this is the one that i need the most right now and the main reason that i made this suggestion. Also for the value idk if it can be unlimited ( which is the preferred thing, like %[gamemode]_island_banned_name_100000% and it ll return the name of the 100000th banned in your island) but if not make it max to 50 if possible for all of them

if anybody makes this suggestion i really appreciate it from the bottom of my heart cause it will help me A LOT with the customization.

@tastybento tastybento added Type: Enhancement Improvement or modification which is usually a new feature. Status: Under investigation Investigating the interest and the feasability of the issue. labels Sep 3, 2023
@tastybento tastybento self-assigned this Sep 3, 2023
@tastybento tastybento added Status: In progress Working on the issue. and removed Status: Under investigation Investigating the interest and the feasability of the issue. labels Sep 3, 2023
@tastybento
Copy link
Member

Hey,

Okay, this is what I've added. Note the placeholders are slightly different to what you wrote above:

> papi parse tastybentotoo %aoneblock_island_member_name_1%
[10:33:25 INFO]: tastybentotoo
> papi parse tastybentotoo %aoneblock_island_member_name_2%
[10:33:29 INFO]: BoxManager
> papi parse tastybentotoo %aoneblock_island_member_rank_1%
[10:33:38 INFO]: Owner
> papi parse tastybentotoo %aoneblock_island_member_rank_2%
[10:33:41 INFO]: Member
> papi parse tastybentotoo %aoneblock_visited_island_member_name_1%
[10:33:55 INFO]: Kristof
> papi parse tastybentotoo %aoneblock_visited_island_member_rank_1%
[10:34:02 INFO]: Owner
> papi parse tastybentotoo %aoneblock_island_banned_name_1%
[10:34:28 INFO]: sally
> papi parse tastybentotzo %aoneblock_visited_island_banned_name_1%
[10:34:32 INFO]: notch

The placeholders have to be registered at load time and so I limited the number to 50 of each placeholder. You asked to return "none" if there is no name, but that's an English word and won't work internationally, so I just return "", i.e., nothing. I'm open to suggestions here, but the general convention is that if a placeholder doesn't exist, then a blank string is returned.

One caveat, there is not guarantee that the order of the members will stay the same, e.g., if players join and leave in a team, then they may be listed as a different number, so I included a rank placeholder so you know who is the owner, etc. That is translated according to the player's language.

Finally, offline players are not supported. i.e., if you ask to PAPI parse with an offline player's name, then I get a null player and cannot get the island, etc., so there will be no names then. There should be no errors in the console, but there will be no names listed. I don't think there's a way around this because it's PAPI that provides the information.

tastybento added a commit that referenced this issue Sep 3, 2023
@tastybento tastybento added Status: Done This issue has been completed or answered. This pull request has been merged. and removed Status: In progress Working on the issue. labels Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Enhancement Improvement or modification which is usually a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants