View Full Version : Switching from Melee to Ranged Basic Attacks According to Weapon
01-07-2017, 06:15 AM
I've followed the advice of Tigrath in this recent thread (http://www.soldak.com/forums/showthread.php?t=37246) and created a ranged magical attack for my magical classes, and it works great! Unfortunately, when using a character who can wield both melee weapons AND newly ranged staves/wands (Healer class), they're stuck with either a melee attack OR a ranged attack. With a healer they will either melee with both staves and maces like in the vanilla game or attempt to use the modded ranged attack [SkillBowAttackMagician] with all weapons (succeeding with staves, failing with maces) - whether the ranged or melee attack triggers depends on whether [SkillAttackHealer] is enabled (overrides [SkillBowAttackMagician]).
The behavior I would like to create is like that of the Hunter class, able to switch between melee (daggers) and ranged (bows) freely. Equipping a bow changes the default skill between [SkillAttackHunter] and [SkillBowAttackHunter], and I'm not sure how - this doesn't occur when swapping between between maces and staves. Any advice/suggestions would be greatly appreciated!
05-18-2017, 12:53 AM
I would like this as well but I couldn't figure it out. in the end I just made the ranged staff attack a non basic skill that you could buy for 0 points, requires a staff/wand equipped, doesn't need mana and added it to the mage classes.
05-18-2017, 11:12 PM
I just tested this out and all I can say is... very interesting!
There is most likely some hard coded interaction for this. I can't imagine any change that could be made to make this work as its not even a setting within a functional block.
edit: Tested a bit over an hour today. In the end, here is my conclusion: Bows are read and interpreted as a secondary attack option if they are ordered second in the skill list for a skill tree. Nothing else has this capability.
The proof is really just this:
ModSkillAttackBase overrides SkillAttackBase
ModSkillBowAttackBase overrides SkillBowAttackBase
I added both blocks to weaponmaster skill tree and tested in both orders.
Regardless of the order, bows are the only item that can be placed second and won't give the 'you don't meet the item requirements' message. Everything else does. This is why I believe there is a hardcoded exception to let bows be read or exclude everything else. Whether it's a bug, feature or incomplete feature, only a developer could really answer for sure.
vBulletin® v3.6.7, Copyright ©2000-2020, Jelsoft Enterprises Ltd.