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

Command support for mob types #781

Open
Colusite opened this issue Oct 24, 2023 · 1 comment
Open

Command support for mob types #781

Colusite opened this issue Oct 24, 2023 · 1 comment
Labels
area/mobs Monster types, behavior, abilities, configuration. blocked/rework Awaiting a larger rework effort. rework/mobs Relevant to the mobs rework effort. type/enhancement New or improved feature.

Comments

@Colusite
Copy link

Feature request

Short description

We should have a way to do add commands to more places, like after the monster value

Implementation details

The ability to add commands to more places would allow further customization and remove the need for MobArena Extension and support for countless more plugins.
e.g
Boss1:
monster: /mm mobs spawn SlimeBoss
name: Steven
health: 69
abilities: fire-aura, /smite @p, /effect give @e[type=minecraft:slime] regeneration 10 1

This should function the same way as the command(s) support for rewards/upgrade waves
e.g
Upgrade1:
wave: 10
all: /op

@garbagemule garbagemule added type/enhancement New or improved feature. area/mobs Monster types, behavior, abilities, configuration. rework/mobs Relevant to the mobs rework effort. blocked/rework Awaiting a larger rework effort. labels Oct 24, 2023
@garbagemule
Copy link
Owner

The intent behind this suggestion is great; hooking into other plugins via commands (or other mechanisms that don't require a direct integration with said plugins) is a very effective path to flexibility and customization... if it works.

From a technical perspective, however, there aren't really a lot of places where we can realistically implement something like this unless the command itself has a well-defined, accessible "target". For example, commands as rewards are fairly simple, because the commands usually have a "player target" in the form of a player name, which MobArena can fill in for you if you use the <player> variable in the command expression.

However, when commands don't have a well-defined, accessible target, there is no way for MobArena to know what happened, because running a command doesn't return anything to the caller. The best way to demonstrate the issue is with an absurd example: what happens if you swap the /mm mobs spawn SlimeBoss out with /say Hello? It's important to understand that these two commands are the same from MobArena's perspective. There is literally no difference between them, because they are just "fire and forget". Running a command doesn't result in a monster reference that MobArena can track.

Boss abilities are currently static constructs that must be registered in MobArena's ability manager. They are parsed by keywords, and they would need to be reworked completely to support variables and such. But even if we could introduce commands into the mix, we would need a means of also providing a targeting mechanism. What would <player> mean in a boss ability? If it's pull-distant, for example, it's not one player but potentially several, or none.

There are probably ways around some of these issues, but I don't see a way to fit any of this into the current code base. At the very least, it has to be lumped in with the Mobs Rework effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/mobs Monster types, behavior, abilities, configuration. blocked/rework Awaiting a larger rework effort. rework/mobs Relevant to the mobs rework effort. type/enhancement New or improved feature.
Projects
None yet
Development

No branches or pull requests

2 participants