• 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

Adding Features

Could I extend an ability rather than recoding it completely to add a feature?

  • Yes

    Votes: 0 0.0%
  • No

    Votes: 0 0.0%

  • Total voters
    0

xNuminousx

Verified Member
If I wanted to add a feature to an already existing move in Project Korra, would I have to recode the ENTIRE thing or would I be able to extend XAbility in the class for it?

For example: My HighJump Replacement re-did the entire move (Changed the way it acted). But what I'm "thinking" of doing is just adding to an already existing move. For example, if FireBlast stock ability ONLY had the click feature, and I wanted to add the Shift feature, would I have to recode the entire click version just to add the shift version? What I wanna do is similar to that scenario but not completely.

I already know I'd have to name my add-on the same as the stock one to override it, but would the original code have to be included just to add on to it, or would simply Extending the stock version then adding my new feature in the progress do the trick?
 

Simplicitee

Staff member
Plugin Developer
Verified Member
You could. You would have to Override some parts. But it won't work how you might expect it to. When someone uses the ability it'll be used like normal. You would have to recode how it's activated and create a new instance of your own.
 

xNuminousx

Verified Member
You could. You would have to Override some parts. But it won't work how you might expect it to. When someone uses the ability it'll be used like normal. You would have to recode how it's activated and create a new instance of your own.
The addition that I want to add, isn't involved in it's activation at all. Let's say (And still keep my idea anonymous) FireBlast click was the only thing existing about FireBlast. I wanted to add the Charged FireBlast. Since it doesn't use the Click method at all, would it still work correctly?
 

xNuminousx

Verified Member
Also, another question: When making an ability, you extend AddonAbility (And I assume that's what makes all of the methods that come with the class. When making this addition feature to the move, would I have to extend AddonAbility AND xMove or would I only extend xMove?
 

Simplicitee

Staff member
Plugin Developer
Verified Member
The addition that I want to add, isn't involved in it's activation at all. Let's say (And still keep my idea anonymous) FireBlast click was the only thing existing about FireBlast. I wanted to add the Charged FireBlast. Since it doesn't use the Click method at all, would it still work correctly?
Possibly.
 
Top