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

Suggestion: Set outpost names #7450

Closed
MilesBHuff opened this issue Jun 7, 2024 · 6 comments · May be fixed by TownyAdvanced/Dynmap-Towny#40
Closed

Suggestion: Set outpost names #7450

MilesBHuff opened this issue Jun 7, 2024 · 6 comments · May be fixed by TownyAdvanced/Dynmap-Towny#40

Comments

@MilesBHuff
Copy link

MilesBHuff commented Jun 7, 2024

Please explain your feature request to the best of your abilities:

Outposts, in Dynmap, currently all display as "Town_Outpost_X". This is pretty unsightly (if only because of the underscores). Most outposts on my server have names that people have referred-to them as for years; it would be nice to be able to use these names on the map. When no name is set, then it should fall back to either "Town Outpost X" (without the underscores) or no text at all, as per admin preference.

(I don't want the cheap solution of treating the outpost's homeblock's name as the outpost's name, since that often is not 1:1 with the outpost's name. Example: Nelta's homeblock is "Anchor", and Omega Station's homeblock is "Omega East". Even in towns this is not the case: Delta's homeblock is "Capitol".)

These outpost names should also be displayed in /town outpost list. (An aside, but I've always been kinda slightly bothered by the fact that there was no way to name the outposts in this list; it'll be nice to finally be able to do that.)

image
image
image
image

@LlmDl
Copy link
Member

LlmDl commented Jun 7, 2024

I'm a bit confused, you're asking dynmap-towny to use a name for the outposts, but you also want outposts to have a 2nd name that isn't the existing plot/outpost name?

edit:

(An aside, but I've always been kinda slightly bothered by the fact that there was no way to name the outposts in this list; it'll be nice to finally be able to do that.)

The names in this list have always been modifiable using the /plot set name {name} command. This is how the outposts are named, and those names are what is used when typing out /t outpost {outpostname} and in the /t outpost list command.

@MilesBHuff
Copy link
Author

MilesBHuff commented Jun 10, 2024

There was a discussion in Discord about this; I figured I'd put the gist of that here, so that onlookers have more context:

It turns out that the issue is one of using outposts as miniature towns, which is different from how outposts were originally envisioned. The best solution is probably making most of the outposts on SettleScape into full towns; but given the fact that this is not actually fully possible in Towny (only workaroundable with active, ongoing admin intervention through NPC mayors and trusted lists), cosmetic outpost names (separate from their homeblock names) will be added to better-support using outposts as mini towns until such a time as exists a proper ability for players to make/join multiple towns simultaneously. This will be toggleable in configs. The name displayed for outposts on the map and in lists will be, in order of preference: the cosmetic name (if set), the homeblock plot name (if set), or some fallback ("Outpost").

(Please correct me if I got anything wrong!)

Also, the underscores have been removed from the display.

@LlmDl
Copy link
Member

LlmDl commented Jun 20, 2024

Closed in lieu of #7479

@LlmDl LlmDl closed this as not planned Won't fix, can't repro, duplicate, stale Jun 20, 2024
@MilesBHuff
Copy link
Author

MilesBHuff commented Jun 20, 2024

There was a discussion in Discord about this; I figured I'd put the gist of that here, so that onlookers have more context:

I suggested maybe just using the plot group name instead of the plot name if the outpost plot is in a plot group. This would be a lot simpler, requiring the addition of a single helper function like this:

public static String getOutpostName(TownBlock townBlock) {
    return townBlock.group.getName() || townBlock.getName() || localize("DEFAULT_OUTPOST_NAME");
}

It would then be used in 4 places. No database work would be needed.

LlmDl wasn't a fan of the idea, though: in his view (which is technically correct), an outpost is just a plot of type "Outpost", and nothing else. He proposed instead perhaps adding nameable districts, which would finally make direct use of what had, until then, been an abstraction added many years ago by another contributor: ObjectGroup. PlotGroup inherits it, but all this time it hasn't been used directly. These Districts would be relatively featureless groups of plots that can have a name set on them... and that's it (at least for now).
He's not sure how they will appear on the map.

(Please correct me if I got anything wrong!)

@MilesBHuff
Copy link
Author

MilesBHuff commented Jun 20, 2024

@LlmDl The removal of underscores from outpost names seems to have not yet been added to the mainline -- I noticed because they reappeared after I updated to 0.100.3.1 from the unreleased patch you kindly Discorded me.

Regarding the names of unnamed outposts, would you be willing to just have them be named "Outpost", since their ownership is visible in the popup? After-all, city names don't display the names of the nations that own them. As mentioned previously, the format of "Mithrandir Outpost: Serenity" is so long as to obscure the map, and draws excess attention to what is a very minor part of the map compared to the towns and nation capitals.

Thanks again for all your time on this.

@MilesBHuff
Copy link
Author

MilesBHuff commented Jun 21, 2024

Upon further thought, using an outpost's plot group name or district name as the outpost's display name, as I recently proposed, might be a bit of a non-starter because both are capable of containing more than one Outpost plot, which would result in duplicate Outpost names on the map. To be fair, this can also happen if two separate outposts are given the same plot name; so maybe it's not a hard-block to doing something like the pseudocode I posted earlier.

Regardless, it'd probably still be nice to have a wrapper to provide a fallback display value for outposts without names -- this would then mean that the fallback display logic in Dynmap-Towny could be removed in favor of this shared helper method, ensuring consistent display values and making the code more-modular.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants