Attack classes, item mana/ammo/fuel, and punching arrows.
Submitted by boromonokli on Thu, 2015-01-22 19:42 | ||
I've been modding the templates to re-balance combat in a way that reduces weapon redundancy, while widening the options for increasing each skill (melee and ranged), making mage staves useful for increasing magic skills, etc. So far, changing dagger class weapons to improve ranged skill worked flawlessly. If i get to higher levels, I can likely see the blunt daggers' stronger, magical versions drop, etc. etc. The next step would be reworking bow use. At Best in Slot levels for levels 0, 1, and 2, both melee and ranged weapons have the same average DPS, all the while ranged characters don't have to worry about pesky retaliation and miss chances. To amend this and introduce a form of resource management for both skills, I've decided to copy the mana/ammo/fuel system of goblin guns, and this way make ranged weapons into "burst" damage options for both classes (the plan is to make crossbows work with melee skill, as of now) I've tested with the peasant short bow, and it works behind the scenes, just didn't show the ammo. After several tries, I changed it's attack class to ac_minigun, and voila, success. Except instead of shooting the arrows, my test girl punches them out of her fists. the templates so far: [t:template,n:bw_g_d_s_s_c_avg] { category_name = "weapon"; doc = "Peasant Short Bow"; specializes = base_bow; [aspect] { mana = 100; mana_recovery_period = 1; mana_recovery_unit = 10; max_mana = 100; model = m_w_bow_001; } [attack] { attack_class = ac_minigun; attack_range = 10; damage_max = 6; damage_min = 3; reload_delay = 0; } [common] { allow_modifiers = false; screen_name = "Peasant Short Bow"; } [gui] { inventory_height = 3; inventory_icon = b_gui_ig_i_w_bow_051; inventory_width = 1; } [minigun_magic] { mana_per_shot = 20.0; use_mana = true; } } forums: |
||
» |
edited reload delay: seems to solve the shotgun problem, though still punching too much. Can I make a custom attack class?
Not really sure to be honest.
However your punching problem is due to the game thinking you are using a crossbow type weapon, miniguns also fall into this category. If you examine wpn_bases.gas found in the interactive folder in Logic.ds2res, you'll see that bows have an attack_class of ac_bow while crossbows use ac_minigun. This is what calls the particular weapon animation that the character will display according to this list;
fs0 = barehanded/bite/claw, etc
fs1 = single handed weapon
fs2 = single handed weapon plus a shield
fs3 = shaft handled 2-handed weapon (battle-axe, halberd, etc)
fs4 = short handled 2-handed weapon (swords, etc)
fs5 = staff
fs6 = bow
fs7 = crossbows (miniguns, etc)
fs8 = shield only
fs9 = dual wielding single handed weapons
fs10 = throwing weapons
So your new template is calling fs7 when you want it to call fs6 animations.
Equip_slot is also important for the weapon to look natural, bows uses es_shield_hand while crossbows use es_weapon_hand.
Have you tried using minigun_magic while keeping the attack_class at ac_bow? Maybe that might work? Possibly you can make melee weapons that use mana as well for extra effects? Such as staffs?
That was the default idea. It worked, but it didn't display the yellow ammo/fuel/mana bar next to the weapon's active icon, or the fuel tooltip in inventory rollover.
So far, it looks like most of the minigun_magic is designed to work with ac_minigun, which defaults to ac_beastfu/FS0, ignoring attack speed. Additionally, using it with ac_bow makes a mess of the regular animation (desyncs after first shot, needs delay or does funny shotbow-gun stuff)
I had more success with crossbows
You're shooting the wrong way!!!
finally
(oh yep, shock-wave explosion added as break effect. looks good)
trying to upload new results. It's still somewhat buggy. I'll try to consolidate it with spell_multiple_hit some more tomorrow.
Very nice work. Shows there's still a lot of untapped potential for modding the game.
This would go great with the Siege of the Three Kingdoms weapon pack. If you're unfamiliar with that mod, it was originally made by theresnothinglft for DS1.
It included a lot of oversize melee weapons that had AOE properties. I was able to port those weapons to DS2 but not unfortunately the AOE properties.
... but trying to figure out which bit will start an effect when the object is equipped (like weapon effects from the base game, sparkles and the like)
and semester started: Hooray for 6 times as much coding as I did before (in c++).
and maths. I gotta love the maths. (*faints*)
edit: can't find siege of the three kingdoms, the last link I saw on SN is broken... Will look into it whenever I can get to the university, as there's likely to be no net at home for the coming month.
Edit2: Okay, script on equip works, and on top of that I have hooked it up to the godb's watching (and unequipping works the same way). I wonder if I can use it to fix the shields adding their bonuses (block chance & magical alterations) when using 2h weapons.
And breakthrough: Hit detection works flawlessly.
Last time I made it, I used Lisah's weapon_attack_notify.skrit, which was a litte bit buggy when it came to detecting actual hits done to the target. Changing it around (adding a timer and checking health difference between a weapon swing's start and end) seems to work well. I can detect misses (when no damage is done), and enemy deaths just as well.
All there is to do is to cut in the damage code from spell_multiple_hit.skrit and it'll be perfect (actually, I can do anything: delayed damage, damage stretched out in time (physics.createdamagevolume), and instant damage)
and as always: here's the code.
MasterArcher1.0 by jjliaw applies an attack speed bonus to ranged attacks based on dexterity and ranged skill:
(the edited section is parsed by the author under {state RequestAction$})
The attribute/s and values the speed bonus is based on are maleable and I think possibly similar to how Crusader's MoreRange_Mod handles Ranged Attack Range increase based on Ranged Skill.
The Master Archer Mod also adds a new heroes.gas that simply tells the Master Archer char to look for the new job under Jobs:
I had been looking for more info on attack_class and how to scale or outright change attack speeds for every non-ammo weapon, it seems that attack class names are well hidden and that animation time, and thus, attack speed are locked to the class without this kind of work-around.
I'm still barely getting my feet wet again, so, not sure at all if this pertains. But I saw this thread and wanted very much to try and continue this discussion.
Maybe the melee skrit can help me with the melee accuracies.