Closed Mohron closed 7 years ago
Just another thought. This might be easier for me to figure out myself if more detailed event info was available on the dashboard and/or if the Sponge Plugin had a debug mode to log a specific player's events.
ie. /badgeup debug <user> [on|off]
It would be preferable if the data could be logged and uploaded to something like Gist/Pastebin when toggled off giving the player a link to go to the data.
It may just be that entity death events aren't properly being picked up as being caused by a player. I'll investigate later today
@RobertHerhold do you have a way to also track these events by their base mob types ie monster
, animal
, or player
. Having to set up a huge number of criteria just to track hostile (monster) kills seems like overkill. Almost every hostile in the game, even modded, will extend monster
To do that without using our dynamic criteria, you would need to use a feature we've been toying with implementing for a while now: implicit criteria keys.
Basically, it would allow you to define a criterion with a key of destructentity:death:monster
and so then every event with a key of destructentity:death:monster:minecraft:<creeper, skeleton, etc.>
would count towards the progress of that criterion.
This feature isn't implemented yet, but I'll keep this issue open until it's possible.
@Mohron Unfortunately there's nothing in the SpongeAPI (or Minecraft in general) that demarcates categories of mobs (passive, neutral, hostile, etc.). There's a bit of a quandary here where mobs like spiders and cave spiders would technically be considered neutral (see here) but I think they would generally be considered "hostile" and most useful in that category as far as achievements are concerned. Do you have any particular opinion about this?
@RobertHerhold Could we build some convenience aliases into the Sponge plugin to automatically map some entities to a designated key? I'm not sure how difficult this would be.
@MarkHerhold That's exactly what I was doing, but again, there's grey area as far as what you would consider a certain mob like cave spiders or enderman - hostile or neutral
@RobertHerhold Put it in the config maybe? @Mohron Would this need to be configurable?
Sponge API 5.1.0 provides Entity interfaces, including parent interfaces like Monster that you can check entity instanceof Monster
for instance. And if you use that you can see how the game classifies them...
public interface Enderman extends Monster, Carrier {
}
public interface CaveSpider extends Spider {
}
public interface Spider extends Monster {
}
public interface Monster extends Hostile, Creature {
}
So I'm not sure what's preventing sorting these into their already defined categories.
@Mohron I wasn't aware of that, thanks for pointing that out to me!
Happy to help. It's nice to have another Sponge plugin dev as a tester right? ha ha
@Mohron To achieve what you are really after without adding a criteria for each monster type and OR operators, I think we'll need to implement support for wild-card operators in BadgeUp.
For example:
destructentity:death:monster:zombie
would match to a criteria listening to:
destructentity:death:monster:*
so you could easily build an achievement listening for just monster deaths, across all types of monsters.
Please note that this is still just a thought.
@MarkHerhold Good thing you brought this up. I was wrongly assuming BadgeUp had something like Sponge's implicit inheritance of perms where any destructentity:death:monster:zombie
would give credit to a criteria specifying only destructentity:death:monster
as well as destructentity:death
& destructentity
@Mohron Unfortunately not yet, but I'm glad to hear that you were thinking about the same thing. It validates my thoughts on the subject. 👍
While we are on the subject, would you expect to see support for any other event keys? For example, regex support or something else? Again, just openly brainstorming here.
@MarkHerhold with Minecraft likely being your first major audience, the expectation is going to align with the permissions system IMO. Here's a good example of what I'm thinking will fit your brainstorming in the context of a Minecraft Permission system.
https://github.com/lucko/LuckPerms/wiki/Advanced-Setup#shorthand-permissions
Since your events will have nodes much like permissions have nodes, I could see the two systems behaving very similar.
Honestly many of these capabilities will be must haves because if they require the dynamic evaluation to do these mostly simple criteria, nobody in the MC community will end up using BadgeUp... Most Minecraft servers, especially modded, don't make money, they're lucky to break even each month.
@Mohron Understood. Thank you for the link, I'll give it a read.
How's the progress on this huge feature change? I'm kinda at a stand still until I have at least basic wildcard support, whether implicit or explicit.
@Mohron We are working on this, but there are a lot of changes that need to be made to make it work smoothly. Right now, we're probably just going to let users set a regex as the criterion key to be matched against event keys. That should allow you to do patterns like:
destructentity:death:monster
to match everything like destructentity:death:monster:zombie
(and all other monster:*
entity types)destructentity:death:monster:(zombie|skeleton)
to match destructentity:death:monster:zombie
and destructentity:death:monster:skeleton
(but no other monster death events)^destructentity:death:monster$
to match only the exact event key destructentity:death:monster
(which in this case doesn't happen because they all specify the type of entity)We think regexes should allow you to match basically whatever event key you want. Since they can be a bit of a pain to work with, we will likely be implementing a tool on the dashboard to tell you exactly what event keys will be matched by the regex
@RobertHerhold Just keep me posted, I'll be back on the testing bandwagon once this type of tracking is possible! It's just really hard to make good criteria without this kind of super power!
@Mohron We've just added the feature for criteria keys to be regex patterns - the demo achievements are updated in v2.0.5. Please let us know if you have any difficulties with it.
I've been trying to figure this one out by getting online, killing some things and then looking at the dashboard.
interactentity:primary:mainhand
seems to be the only event related to killing mobs but I'm not sure if this will give me the ability to track actual kills (and by type). Anyhow I think kills is an important stat to be tracked.