-
-
Notifications
You must be signed in to change notification settings - Fork 368
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: effect "add/remove (scoreboard) tag" #346
Comments
I can attest that this would be very useful, as I have developed an API script to give me easy access and manipulation of scoreboard tags, and I now use it VERY extensively on my server. It helps a lot when variables are a pain to use, allowing you to store (text) data relevant to a mob across restarts without any issue, which is automatically "garbage collected" when a mob dies. For now, you can access my API on the SkUnity forums here, and it should do exactly what you want. But I definitely agree that inherent Skript support would make sense and would be very useful. For Bensku: here's the commit where scoreboard tag support was added. Should be very simple. |
(oops mislabelled cause I'm so used to bug reports!) |
Oh yeah! Totally forgot about the aspect of garbage collection, which is indeed a very huge plus for this. So glad i'm not alone on this! 👍 Thanks for redirecting me, i'm gonna grab some coffee and check that API out :) |
@TheBentoBox, i can't really figure out how to send private messages on here, but i had to thank you for showing me your tag api right there. It finally taught me how to create my own functions using skript, something i couldn't figure out before or find any tutorials about. :) So i basically just recreated the whole thing, but with some key differences here and there. Here's the code if you wanna take a look at it: https://hastebin.com/uwijizetus.vbs So: thanks! |
@TheLimeGlass : potential to port this from Skellett to vanilla Skript with a PR? I think this sort of thing would make sense in vanilla Skript but of course it's up to you if you want to submit a PR for it. You'd make the most sense to do it given you've already coded it once for your addon. |
@TheBentoBox Scoreboard tags are only for Spigot 1.11+ and I know Bensku try's to use features that work between 1.9-1.11. @bensku Your thoughts? |
Scoreboard stuff... This is not likely to happen anytime soon. Of course a pull request with this would be awesome. Note that anything that makes Skript as plugin not work on 1.9 will not be merged. However, 1.11 specific features are ok, as long as they are cleanly disabled on older versions. |
@bensku These are just scoreboard tags. It acts like metadata on entities. Another way to save data against entities. |
Tags stay cross-restart, too, as they are saved in the level.dat file. If we used NMS (reflection or abstraction), we would have a system working from 1.9 to 1.11. But maybe it's better using spigot. Also, tags were added in 1.9. |
I'd say on this one it's best to use just the Spigot API without reflection, meaning they'd only be accessible on 1.11.2+. That's the price people pay for being on lower versions. |
Any chance i can be of help (it does say help wanted) without being able to code java? Do some research or something? I whole heartedly believe that this is an underrated addition 💃 |
@jaylawl You can use metadata which was recently added nearly 1-2 versions ago.
|
Metadata is not the same because it's not permanent. The point of a tagging system like this is it lets you store data on entities cross-restart. It's incredibly useful and opens up doors for a lot of stuff to be done in Skript more easily, such as an easy entity protection system. IMO it should be of decent priority as far as feature requests go simply given how much it adds. |
Sure, makes sense. |
Just in case anyone is looking for this before it gets added to Skript: https://forums.skunity.com/resources/jaylawls-scoreboard-tagapi.615/ |
As of minecraft 1.9+, we are able to save (custom!) tags in the NBT data of players or any other entities. The limit for custom tags per entity is 1024 to my knowledge, but it may be even higher than that.
This is how you add tags by vanilla commands:
minecraft:scoreboard players tag <player/uuid> <add/remove> <any custom tag here>
The same is currently possible with the SkStuff add-on, and checking for the existance of a tag in an entities NBT isn't too bad:
However when we get to adding tags using SkStuff, it gets a bit more complicated, because the dataTag "Tags" is a compound list ... >_> Here's how i currently do it, but im new to Skript and i'm sure there's easier ways to achieve the same effect:
Q: "Why don't you just use variables?"
A: Because variables are virtually useless for non-player entities unless you install 10000 add-ons. Kinda.
Cheers for reading this
The text was updated successfully, but these errors were encountered: