• Guest, we are doing a new map (refresh) for Herocraft. Gather your friends and get ready! Coming next Friday, 06/28/24 @ 7PM CT play.hc.to
    Read up on the guides and new systems! Here.
    View the LIVE Map here @ hc.to/map
    Stuck or have a problem? use "/pe create" to to open a ticket with staff (There are some known issues and other hotfixes we will be pushing asap)
  • Guest, Make sure to use our LAUNCHER! Read more here!

HeroArrows and Ranger Arrowmode revamp

Roadkill909

ICE ICE ICE!
Joined
Feb 4, 2012
Location
United States
I figured I'd post this documentation here before I forget about it, as it would be needed by the balance team to properly test and balance the tentative HeroArrows plugin. If this isn't the right place to place this, let me know what is.

The plugin adds special arrow types that have special colored names, release an appropriate particle effect when they hit players, and have a special ability. Other than the colored names, they do not appear differently than arrows. They also will not stack with normal arrows. In the future we could investigate changing their clientside appearance via spout or possibly Heroclient.

The arrows can be placed in the Hotbar and be fired like normal arrows. They do not work outside the Hotbar for now. I'll go over how to obtain them below.

Also if we suddenly decide to remove the plugin for any reason, the special arrows will act like normal arrows, but will retain their name.

Ranger Arrows
These 5 arrow types are available by using the skill imbue on arrows and the various types are unlocked at different levels. They are meant to replace the arrow modes Fire, Ice, and Poison. They can also be used by any player who can use a bow, which may provide a good money source for rangers.

Material arrows, which are discussed at the end, cannot be imbued with powers. The types of ranger arrows are outlined here:

Incendiary- A reinvention of the Fire arrow skill. It not only causes fire damage but also temporary blindness.

Ice - Basically the old ice arrow worked into the new plugin. Slows an opponent for a set amount of time.

Poison - Basically the old Poison Arrow worked into the new plugin, with some new changes. Like the old version this causes damage once every second for 3 seconds. Unlike the old version, poisoned targets emit green potion particles and if the target is a player, their health bar will turn green when they take damage.

Wither - A new arrow type which causes Wither damage and drains mana and stamina.

Piercing - A new arrow type that does normal damage and has an additonal damage bonus that ignores armor. Also has the potential to pierce thin walls and entities once. If it pierces something, the arrow that comes out will not have the armor bonus. The damage formula is in the box below.

Damage Formula said:
The formula for damage = Damage affected by armor plus Normal bow Damage times bonus percentage

Example: Ranger (150 arrow damage), fully armored paladin (72% armor), bonus of .4

Normal damage = 150 * (1-0.72) = 42
Bonus = 150 * 0.4 = 60
Resultant damage = 42 + 60 = 102

Another example: Ranger versus an unarmored player would be
Normal damage = 150
Bonus = 150 * 0.4 = 60
Resultant damage = 150 + 60 = 210

I believe these are the current default config values: This is what you'll be investigating balance-wise. They're modeled off Rangers current arrow modes.
YAML:
incendiary:
  blindness level: 4
  fire ticks: 200
  blindness ticks: 200
 
wither:
  wither ticks: 100
  wither level: 2
  mana drain: 30
  stamina drain: 2
poisoned:
  poison damage: 20
  repeat: 3
piercing:
  armor ignoring damage bonus: 0.4
ice:
  ticks: 200
  slow level: 4


Modified Material Arrows
These are not added for Ranger, and give Herocraft eight arrow types that can be crafted and used by anyone (provided their class can use a bow). They add a damage bonus percentage based off class bow damage.

They are also somewhat resusable, which depends on their "drop chance" which also varies by type. A higher drop chance means the arrow is more likely to drop after hitting a target, meaning they can be picked up and reused. This can make some interesting mechanics like Gold Arrows that hit very hard and can be reused a couple times before they "break".

The recipes contain a single ingredient and 8 arrows in any shape which makes 8 of the desired arrow. We could remove the recipes and make this into a fletching skill for smith or another class.

Craftable arrow name (ingredient if not obvious)
Reinforced (Wood)
Stone (Cobblestone)
Lapis (Lapis block)
Iron
Obsidian
Emerald
Diamond
Gold

The ranger arrow types are not craftable.

Here's most of the default values:
YAML:
stone:
  drop chance: 40
  damage bonus: 1.08
iron:
  drop chance: 100
  damage bonus: 1.16
gold:
  damage bonus: 1.75
  drop chance: 20
diamond:
  damage bonus: 1.5
  drop chance: 300
lapis:
  damage bonus: 1.32
  drop chance: 60
reinforced:
  drop chance: 10
  damage bonus: 1.04
emerald:
  drop chance: 150
  damage bonus: 1.4
 

Roadkill909

ICE ICE ICE!
Joined
Feb 4, 2012
Location
United States
Kainzo The reason this is a plugin, and not just a single skill or multiple skills, is so that different skills can reuse the same code. Wrapping this functionality into a single skill won't reduce maintenance time. Separating functionality of different arrow types into different skills would require copy and pasting the core listeners which would increase maintenance time and just be plain old sloppy development.

I would argue that maintenance for this plugin is a nonissue, mainly because I'm volunteering to maintain it, but also because the code base for this project is fairly small (532 lines). It's also easily extensible. Adding a new Material arrow type is a single line of code. Each ranger arrow is around 30 lines each including boilerplate.

I also encourage you to examine the current versions of IceArrow, FireArrow, and Poison arrow. If each skill has its own listener, collection of Players and arrows, or each is over 175 lines then this plugin will reduce maintenance time, not increase it.

Edit: You can also always add it into HeroFeatures plugin
 

Kainzo

The Disposable Hero
Staff member
Founder
Adventure Team
Joined
Jan 7, 2011
Location
The 7th Circle of Heaven
Kainzo The reason this is a plugin, and not just a single skill or multiple skills, is so that different skills can reuse the same code. Wrapping this functionality into a single skill won't reduce maintenance time. Separating functionality of different arrow types into different skills would require copy and pasting the core listeners which would increase maintenance time and just be plain old sloppy development.

I would argue that maintenance for this plugin is a nonissue, mainly because I'm volunteering to maintain it, but also because the code base for this project is fairly small (532 lines). It's also easily extensible. Adding a new Material arrow type is a single line of code. Each ranger arrow is around 30 lines each including boilerplate.

I also encourage you to examine the current versions of IceArrow, FireArrow, and Poison arrow. If each skill has its own listener, collection of Players and arrows, or each is over 175 lines then this plugin will reduce maintenance time, not increase it.

Edit: You can also always add it into HeroFeatures plugin
I think I'd rather add it into HeroFeatures ... I understand your view point :p .. I'm not bad and I can actually add this in my self .. but may need some assistance if I run into issues.

I'll look into this tonight, thanks for showing so much passion to Herocraft and helping the server / ranger :)
I don't say it enough but I appreciate it!
 

Roadkill909

ICE ICE ICE!
Joined
Feb 4, 2012
Location
United States
Glad to hear it and no problem.

I think I'd rather add it into HeroFeatures ... I understand your view point :p .. I'm not bad and I can actually add this in my self .. but may need some assistance if I run into issues.

There is one caveat that I would like to see fixed before integration. I currently use a "hacky" way to detect arrow hits which you might notice in the code and I'm concerned this method may break in the future.

[CodeTalk]
This could made more reliable if you or Sleaker stored an accessible reference to the projectile object that causes a WeaponDamageEvent. If there is one, I couldn't find it. If a projectile does not cause the event, you could just set the reference to null, and have the already in place isProjectile() method check if the projectile reference is not null.
[/CodeTalk]
 

Delfofthebla

Legacy Supporter 4
Retired Staff
Joined
Nov 25, 2012
Location
United States
Thanks for posting this Roadkill, I had been curious what you were working on. It all sounds pretty cool, and I think reworking the arrow system for the Ranger is a good idea, but like Kainzo, I share the plugin concern. It seems as though it's a lot of "fluff" to add. Though my main concerns lie with balance and gameplay altercations.

1. Having to place the arrows on your hotbar.
Now, I don't know about all players, but most PVPers I talk to are always concerned with their hotbar management. Minecraft only allocates only one of these to us, and quite frankly, I just don't think it's enough. If I could use two or even three, I would do so in a heartbeat. Unfortunately, we can't do this, and so we make due with what we've been given.

Having to add the arrows to the hotbar means that we have to give away something else. This hinders a player's ability to have things like potions, tools, or even regular old blocks at the ready when they need them. I do not like the idea of constricting the players more than they already are.

2. These arrows will be too powerful on other classes.
While I think it's a cool idea for a Ranger to be able to essentially make a "profession" out of their class, I think that these arrows will be far far too powerful in the hands of anyone other than a ranger.

A Samurai could buy some ice arrows, initiate every fight with a bow shot, and then use their already superior mobility combined with the slow effect to completely destroy any opponent.

The same can be said for Ninja and Bard, and it's not just the ice that's an issue. Each of these arrows are really powerful and anyone that can use a bow will be able to abuse the large number of combinations in order to win their fights.

-----

Overall, it's a really neat concept with some interesting gameplay altercations, but I'm not entirely sure it's a good idea to bring it to Herocraft in the form you've described. I'm fine with a Ranger being able to craft his arrows and try out all sorts of different combos to kill people, but I don't like the idea of other classes having the same level of power. With your proposed changes, the Ranger becomes more of a profession than a combat class. The only reason to truly be a ranger is for a little bit of extra bonus damage.

The best 'rangers' however, will be other classes that have access to superior skills and bow usage, not the Ranger class itself.
 

Roadkill909

ICE ICE ICE!
Joined
Feb 4, 2012
Location
United States
1. Having to place the arrows on your hotbar.

The main reason I restricted this is for performance reasons. Basically when the bow fires, I search the hotbar for special arrows and use those instead. I could check the whole inventory but that's much more for the server to process each time any arrow is fired.

If you'll notice in my old videos of this, there was something called the "Quiver" skill. It basically added an extra inventory that could only store arrows. I removed this because it was a hassle to deal with: emptying the quiver on death, storing its contents on logoff, loading contents on log on, plugins that manipulate inventory (like arena and duels) aren't aware of the quiver, etc. I'll look forward to if we use Spout and things are more flexible.

Also I forgot to mention this but I plan to add a skill called Dexterity to make Hotbar management a little easier. The skill is passive, you just right-click an item in your inventory and it will swap item number 1 with that item. This means you won't have to open your inventory to switch arrow types.

2. These arrows will be too powerful on other classes.
Again performance is the reason I didn't restrict this. It's not impossible to add a permissions check when the bow is fired.

I'd rather leave these performance decisions up to Kainzo
 

Delfofthebla

Legacy Supporter 4
Retired Staff
Joined
Nov 25, 2012
Location
United States
The main reason I restricted this is for performance reasons. Basically when the bow fires, I search the hotbar for special arrows and use those instead. I could check the whole inventory but that's much more for the server to process each time any arrow is fired.

If you'll notice in my old videos of this, there was something called the "Quiver" skill. It basically added an extra inventory that could only store arrows. I removed this because it was a hassle to deal with: emptying the quiver on death, storing its contents on logoff, loading contents on log on, plugins that manipulate inventory (like arena and duels) aren't aware of the quiver, etc. I'll look forward to if we use Spout and things are more flexible.

Also I forgot to mention this but I plan to add a skill called Dexterity to make Hotbar management a little easier. The skill is passive, you just right-click an item in your inventory and it will swap item number 1 with that item. This means you won't have to open your inventory to switch arrow types.


Again performance is the reason I didn't restrict this. It's not impossible to add a permissions check when the bow is fired.

I'd rather leave these performance decisions up to Kainzo
I would like to get Kainzo's input on the performance impact of these things, as I think they are very gamebreaking issues with the proposed system.

Dexterity sounds like it's got the right idea, but I feel as though it needs to be a bit more applicable than what you described.

The ability to use Macromod hotkeys for skill usage is crucial to the 'balance' of PVP on Herocraft. When the players want to use a skill, they should be able to use it with the press of a button. Having macromod set a chat command for /skill firearrow or whatever to cast the skill needs to be possible. If the ranger can only set aside one "dexterity key", or if he has to set one up for each arrow type, it's going to cause issues. Also I'm not entirely sure I understand what you mean by "right clicking" the item. Will he have to open up his inventory and right click an item, or are we talking about a right click while selecting the item that would be swapped? Either way, if at any time during the fight the ranger has to scroll through is item bar or open up his inventory, things just aren't working as smoothly as they should be, in my opinion.

The Ranger should be able to "cleanly" and "smoothly" adjust his playstyle in the middle of a fight, or it's going to be a very frustrating class to play. If he must set aside a hotbar slot for each arrow, a "dexterity right click" for each arrow, or open up his inventory every time he switches his arrows, it's going to feel really clunky and aggravating for the player. The best solution is one that allows for simple /skill skillName or /arrow arrowName usage
 

Roadkill909

ICE ICE ICE!
Joined
Feb 4, 2012
Location
United States
One thing not mentioned, but will be of importance to balance, is the new focus on preparation. It will be unlikely that you will be able to use imbue safely during combat, so you would need to have a bunch of arrows ready to go when an enemy shows up.

On the flip side, this means Rangers could pack serious heat, and may have a few hundred ice or poison arrows on hand. However once those arrows are gone, theres little chance to get more in a fight. This may hurt balance, so a stats or damage nerf on these arrows should be considered during testing.

The idea was to make it so that you'd have to scroll (or use number keys) to reach the item in your hotbar, right-click it, and then navigate back to your bow.

However, you're suggestion to use commands is excellent, and you also gave me an idea. If I make it a skill command like you said, players could just bind the command to arrows and ingame it'd function the same way.

... but, I could allow it to have an argument which would be a number representing a position in the hotbar (or inventory for that matter). If you were to type "/skill dexterity 3", I could make it switch item in position 3 with item number 1 and you wouldn't have to put away your bow. (Keep in mind the plugin picks arrows based on their order in the hotbar, so an arrow in slot 1 would be used instead of slot 2 and so on.).

If you got the Keybind mod you could bind each number key to dexterity with a matching number argument, press ctrl+number, and it'd switch arrows for you.

tl;dr Great idea. I'll make it dexterity a command. With the keybind mod, you could switch arrows in one button press.
 

Delfofthebla

Legacy Supporter 4
Retired Staff
Joined
Nov 25, 2012
Location
United States
One thing not mentioned, but will be of importance to balance, is the new focus on preparation. It will be unlikely that you will be able to use imbue safely during combat, so you would need to have a bunch of arrows ready to go when an enemy shows up.

On the flip side, this means Rangers could pack serious heat, and may have a few hundred ice or poison arrows on hand. However once those arrows are gone, theres little chance to get more in a fight. This may hurt balance, so a stats or damage nerf on these arrows should be considered during testing.


The idea was to make it so that you'd have to scroll (or use number keys) to reach the item in your hotbar, right-click it, and then navigate back to your bow.

However, you're suggestion to use commands is excellent, and you also gave me an idea. If I make it a skill command like you said, players could just bind the command to arrows and ingame it'd function the same way.

... but, I could allow it to have an argument which would be a number representing a position in the hotbar (or inventory for that matter). If you were to type "/skill dexterity 3", I could make it switch item in position 3 with item number 1 and you wouldn't have to put away your bow. (Keep in mind the plugin picks arrows based on their order in the hotbar, so an arrow in slot 1 would be used instead of slot 2 and so on.).

If you got the Keybind mod you could bind each number key to dexterity with a matching number argument, press ctrl+number, and it'd switch arrows for you.

tl;dr Great idea. I'll make it dexterity a command. With the keybind mod, you could switch arrows in one button press.

Yeah, that part sounds just fine. I didn't mean to imply that they could freely use the arrows without having them on hand first, I just wanted to ensure that if they had the arrows available, they could use them as they saw fit. I like that you have to create them before a fight, and I believe the emphasis on preparation is not a bad idea--"cool" even.

I think what you described for the dexterity command here is a great idea, and I like that you're considering allowing the item slot be customizable via the command.

I think with this proposed change, your system will work out just fine.

(Though, I still have concerns with other classes using the arrows, so I'm eagerly awaiting Kainzo's input regarding that.)
 
Top