Started by
Shoni2009
on
Topic category: Advanced modding
So in my mod i want to create a system that shows a variable i call skill to show the player how much skill they have how is this possible please help if you know.
Edited by Shoni2009 on Wed, 06/03/2020 - 10:25
it's so easy
hint: not variable
You should've used a question mark instead, cause it's a question how you can make a kill system
I figured out on discord server it is NBT value
Well you have two options, and you are going to prefer 1. Note that I PREFER OPTION 2, BUT THAT IS MY OPINION:
Option 1: In MCreator, there are Gloabal Variables and NBT variables and each are unique to the player. When using GLOBAL_SESSION along with NBT tags you can create a variable that "stays with" among death and etc.
Option 2: You can code a player's Capability. You can read about Capabilities in the link I provided below but I will summarize it in steps. First, create an interface. Then implement the interface and create all of the methods you desire. Then you attach it to the player (I may be missing something so check the link). But that is basically it.
PROS OF OPTION 1:
PROS OF OPTION 2:
All in all, it is up to you but I laid out 2 options, THESE ARE NOT THE ONLY OPTIONS BUT TWO I RECOGNIZE AS APPLICABLE TO YOUR SITUATION.
More on Capabilities here @ https://mcforge.readthedocs.io/en/latest/datastorage/capabilities/
just saying that global variables aren't multiplayer friendly so i recommend you don't listen to that guy above me (im talkin bout you @tbroski)
@leonex. First of all, this isn't a chat room so only post if you have any idea of how to do what they are asking (it seems like you don't lol). Do you not realize I posted two options and can you read that I prefer option two, NOT USING GLOBAL VARIABLES. And do you also realize that Global Variables are the only way you can do this in MCreator without code... Your post made me laugh.
calm down ur all so wrong
don't post misleading info if you don't actually know.
Don’t use nbt nor world tags, they reset after a single session
Use the advancements system or check out my Procedure Collection
There is a procedure about restoring the NBT tags after the started a new session.
*the player
THE BEST WAY IS CAPABILITIES, ALL CAPABILITIES NEED IS TO COPY OVER IN THE PLAYER.CLONE EVENT. BUT YOU NEED TO CODE AS I SAID IN MY POST.
AND WHAT??? YOU SAY, "Don’t use nbt nor world tags" BUT THEN SAY, "There is a procedure about restoring the NBT tags". HOW DO YOU SAY "DON'T USE NBT" BUT THEN USE THEM... BUT TO THE POINT, CAPABILITIES ARE THE RECOGNIZED SYSTEM BY FORGE AND YOU WILL GET THE MOST HELP IF YOU EVER GET ISSUES WHEN POSTING TO MINECRAFT FORUMS ETC. BUT IF YOU READ MY POST AND THE LINK YOU WOULD UNDERSTAND.
Sorry if that seemed very emphasized bt it should be. When people combat a post but don't research what the post is about, those people seem very arrogant. Your post is vague but I appreciate the help, and I am sure your "procedure" is great? I just don't like how you say Capabilities are not the best way. To prove that look at any Minecraft forums and tell me if you see your "procedure" lmao. These are in caps for boldness and emphasis. Before you respond click on the link and you will see the fUnCtIoNaLiTy.
again calm down
i was trying to be nice to the new folks here unlike you
yes i agree but The Capability System are more advanced for beginners don't you agree there
we are not Minecraft forums if you wish to leave here don't argue
I sure you are remarkably smart and is the only few who used the capabilities system
The point of procedures is to hide the nasty java code for the newer users
Instead you should just leave here instead of sounding like a dog braking from your texts.
also all caps make you sound very obnoxious
Like I said before this is not a chat room. But I didn't abide by that either and I am sorry. We shouldn't be bickering over stupid code when MCreator's goal is to form a community and I fully support that. I started on MCreator so that is why I am here. Sorry if I seem obnoxious, I don't want to be because this is the forum that started me off. I hope you understand and recognize my apology. That being said, I will try not to combat a post lol. Especially from you because you recognized my post. But leonex's post was uncalled for and wasn't helpful because he didn't acknowledge Option 2 (even if Option 1 was wrong) and didn't make a recommendation to fix my post if I made an error. But you did and I fully respect you for that!
"Just saying that global variables aren't multiplayer friendly so i recommend you don't listen to that guy above me (im talkin bout you @tbroski)"
ur kinda right we should stop.
no, that doesn't matter, he said how CAN you make a skill system