• Hello Guest! Did you know that ProjectKorra has an official Discord server? A lot of discussion about the official server, development process, and community discussion happens over there. Feel free to join now by clicking the link below.

    Join the Discord Server

Help for a beginner :D

P0W3RK1D

Verified Member
hey PK.
recently i have been thinking of atleast trying to develop some bending moves (mainly for chi and metal) i have watched a few of the tutorials ect and i have a few questions
(so just try to answer them to the best of your ability if you can)

1. i have seen some abilitys use less class files whereas a normal ability would have a (java, manager, listener, and permissions file) ive seen one with only a (listner, information and permissions file) and they seem to work as if it were normal.
does an ability need to have all of thoes class files to work or does it need a specific ammount of class files with specific names?

2. what defines when you do what?!
let me simplify it: if i were to want to create a fireball for pk what defines when i put in code for the particles of the fireball? what defines when and what class i put the fireball collision code in?
or are you able to put code in in any order or class you please?
is their a certain prosess or somthing that needs to be declared before you can start putting the fun bits of code in?

3. where dem aids at? no, i dont mean thoes types of "aids"....i mean.....what code would define a bending player? is it "bplayer"? or can i just put "player"? and what code would define the player or mob that may be hit by an ability?
is there any sort of sheet or code template to tell me what stands for what so things like jedcore can read my codes if i needed them to?

as of now thats all the questions i got for today. if u can just answer these to the best of your ability and if u cant thank u anyways.
:3
 

Finn_Bueno_

Staff member
Plugin Developer
Verified Member
1. i have seen some abilitys use less class files whereas a normal ability would have a (java, manager, listener, and permissions file) ive seen one with only a (listner, information and permissions file) and they seem to work as if it were normal.
does an ability need to have all of thoes class files to work or does it need a specific ammount of class files with specific names?
If you don't understand the content of a class and dont know how to change or move it, then you are far from ready.
2. what defines when you do what?!
let me simplify it: if i were to want to create a fireball for pk what defines when i put in code for the particles of the fireball? what defines when and what class i put the fireball collision code in?
or are you able to put code in in any order or class you please?
is their a certain prosess or somthing that needs to be declared before you can start putting the fun bits of code in?
This is called "coding the ability". This is what makes everything do the thing. That's basicly telling you what to write down exactly, and you taking the credit.
 

P0W3RK1D

Verified Member
If you don't understand the content of a class and dont know how to change or move it, then you are far from ready.

This is called "coding the ability". This is what makes everything do the thing. That's basicly telling you what to write down exactly, and you taking the credit.
Verbalize a bit more...ur still unclear to me...
 

P0W3RK1D

Verified Member
You are even less ready that I thought, apperantly.
Hey finny! If u r going to post unhelpful, usless comments that dont even assist me in what im trying to d then u dont need to be on this post do you?
Im trying to get help for so thi g i want to acomplish and ur holding me down. If ur going to help me u r welcome to stay but if ur going to bash me GET LOST :mad: im not in the mood for ur bullcrap today!
 

Finn_Bueno_

Staff member
Plugin Developer
Verified Member
Hey finny! If u r going to post unhelpful, usless comments that dont even assist me in what im trying to d then u dont need to be on this post do you?
Im trying to get help for so thi g i want to acomplish and ur holding me down. If ur going to help me u r welcome to stay but if ur going to bash me GET LOST :mad: im not in the mood for ur bullcrap today!
You are literally asking for what does what exactly. You cant simply explain that in a single. (Really, I needed 2 posts for my tutorial.) You can watch jed's old tutorial (if you are ready you should understand what to change) and you can read my tutorial. Then you just go step by step.
 

StrangeOne101

Staff member
Plugin Developer
Moderator
Verified Member
A lot of your questions are simply because you don't understand the basics of java. And I know saying that doesn't help in the slightest, because believe me, we were all in your shoes once upon a time :3

1. i have seen some abilitys use less class files whereas a normal ability would have a (java, manager, listener, and permissions file) ive seen one with only a (listner, information and permissions file) and they seem to work as if it were normal.
does an ability need to have all of thoes class files to work or does it need a specific ammount of class files with specific names?
You actually don't need a certain number of classes. Classes are just classes. Really, you can do it in one file if you like but that's not very organized. I tent to just use an Info class, a Listener and then the main class for the move. But it depends what works best for you.

2. what defines when you do what?!
let me simplify it: if i were to want to create a fireball for pk what defines when i put in code for the particles of the fireball? what defines when and what class i put the fireball collision code in?
or are you able to put code in in any order or class you please?
is their a certain prosess or somthing that needs to be declared before you can start putting the fun bits of code in?
This will be pretty complicated to explain.

First off, a FireBlast will first have to be triggered somewhere, and in this case is when a user hits with FireBlast bound. This goes in the LISTENER because we are LISTENING for the user to hit. Next, a FireBlast object is created and is passed the player who clicked so the move knows who fired it. Then, PK simply loops 20 times a second and gets every FireBlast to move depending on the direction it's currently facing. Particles are then spawned, entities and blocks are tested for, etc.


As for you 3rd question, can you elaborate further? A BendingPlayer object is just an object. It holds the user (Player object) and the elements they can currently bend. I think you just need to learn how Object Orientated Programming works but hard to tell what you are asking, sorry.

Anyways, hope this helps slightly. Lemme know if you need anything else. :)
 

P0W3RK1D

Verified Member
A lot of your questions are simply because you don't understand the basics of java. And I know saying that doesn't help in the slightest, because believe me, we were all in your shoes once upon a time :3


You actually don't need a certain number of classes. Classes are just classes. Really, you can do it in one file if you like but that's not very organized. I tent to just use an Info class, a Listener and then the main class for the move. But it depends what works best for you.


This will be pretty complicated to explain.

First off, a FireBlast will first have to be triggered somewhere, and in this case is when a user hits with FireBlast bound. This goes in the LISTENER because we are LISTENING for the user to hit. Next, a FireBlast object is created and is passed the player who clicked so the move knows who fired it. Then, PK simply loops 20 times a second and gets every FireBlast to move depending on the direction it's currently facing. Particles are then spawned, entities and blocks are tested for, etc.


As for you 3rd question, can you elaborate further? A BendingPlayer object is just an object. It holds the user (Player object) and the elements they can currently bend. I think you just need to learn how Object Orientated Programming works but hard to tell what you are asking, sorry.

Anyways, hope this helps slightly. Lemme know if you need anything else. :)
thx for the info.
on my third question im asking : how do u define an enemy player (or atleast the player being hit by your move) i know you can define the player casting via (Player player = player.WHATEVER) but what defines the enemy or mob or other player.
say if i were to make a ability that once a target player is hit the move bounces off of the target player to several other players that are standing near the target player. how are they defined? player1? player2?
i guess im just not used to java quite yet. i have done small beginner commands with coding but that was with python, although java and python are similar. i guess i just need to practice with java that much more ^_^
 

StrangeOne101

Staff member
Plugin Developer
Moderator
Verified Member
thx for the info.
on my third question im asking : how do u define an enemy player (or atleast the player being hit by your move) i know you can define the player casting via (Player player = player.WHATEVER) but what defines the enemy or mob or other player.
say if i were to make a ability that once a target player is hit the move bounces off of the target player to several other players that are standing near the target player. how are they defined? player1? player2?
You would probably want to get all entities in the area with GeneralMethods.getEntitiesAroundPoint(location, radius), then see what type the entity is with instanceof. So for example,
Code:
for (Entity entity : GeneralMethods.getEntitiesAroundPoint(location, radius)) {
    if (entity instanceof Player) {
        //The entity is a player
    }
    else if (entity instanceof LivingEntity) {
        //The entity is a mob
    }
}
 

P0W3RK1D

Verified Member
ohhh. i see, a few more qustions:

1. if i were to cast an ability on a player and the player is hit with it how do i define what happens to them afterwards? (ex: if i throw a ball of fire at somone but instead of fire i want them to recive a poison status effect how do i apply it to the player that was hit?)

2. how to i create the configurable settings for my move? meaning: when the move is loaded into the server the config for the move is created in the config file in the pk folder. but in the code how do i tell it what to make configurable? (ex: if i were making a fireball that shoots 3 blocks far and does 2 hearts of damage and applys a poison status effect for 3 seconds, how do i make the range, damage and status effect stregnth or duration configurable so if somone else were to download the move and they dont like the configuration or they think its 2 op for their server they can just go in the config file and change the values?

3.if i were to make a chiblocker skill that requires for the player to hit a player and then the player that was hit gets set on fire what tests if the skill was actualy used and it wasnt just a normal punch? kuz i want to make combos aswell but the punch has to be detected as a ability in order for it to work..

thank you in advance and thx for ur help :D
 
Last edited:
Top