[WIP] Nocking two arrows at once!

Post » Sat May 28, 2011 8:36 pm

Mod to allow the player to fire two arrows at once.

Now, please do not get too excited, this trick is not as devastating to your opponents as you might think. The power from the bow is split (very inefficiently) into the two arrows so each arrow does much LESS damage than if you only fired one arrow. And your accuracy suffers! The only advantage of doing this trick (this is a real life archery trick shot by the way) is to try to hit more than one target at the same time.

So far my research tells me I will not be able to show two arrows loaded on the bow at the same time. Once you fire your arrow you will see two arrows flying out and drifting away from each other.

The only "practical" way to show two arrows on the bow is to only allow the player to do this with a certain type of arrow. I do not want to do this.


This will not be an upgrade to my Combat Archery mod. It will be its own mod at least for the foreseeable future.

The type of scripting involved in this will be new (difficult?) for me and I want to keep it as a separate mod until all the bugs have been worked out. Even then it may still be a separate mod as I am not sure how many players will actually use this feature. It will require a higher marksman skill level and unique set of circumstances for it to be worth attempting it in combat. As such it may turn out to be one of those things players try once, think it cool and then never use again.

I dislike esoteric key combos and avoid them when ever possible.

In my mods I always try to find player actions to trigger game mechanics not hot keys or arbitrary key combos! For example to denock and arrow in my Combat Archery mod you aim the bow straight down at the ground. No key press is done.

Intuitive games of the future will all be like that as this minimizes the learning curve and encourages more types of people to play such games.

However for this double arrow nock mod I am having trouble coming up with a good action trigger. So instead I may use another game mechanic idea I have been wanting to try out for a long time.

Ideally I would like to see icons surrounding the parameter of the screen that you can quickly click to do complicated actions. It would be best if they were invisible until you move your mouse to the edge of the screen (but that may be too much to try to do in this mod I think.) Sometimes the action in the game would go into slow motion to give player more time to do this. The better the players stats the slower time would move or the more “slow mo” time they would have for these brief periodic action triggers.

I will try first to find a way to allow the player to "click" on the bow icon at the bottom of the screen to toggle the bow double shot on and off. If possible I will change the icon to show two arrows on the bow.

This is in an area of scripting I have not done before so I am more than a little apprehensive. But this means I will learn something new as well.

Any help anyone can give me on this will be greatly appreciated. Such as scripts for detecting that the player has clicked on the screen at the weapon hud location.

I will place an object in inventory that will do the same thing for players that do not have any hud elements in their game. Or if I cannot get the hud click toggle idea to work.

This allows slow twitch players to mentally “catch up” in the heat of combat. I would prefer to do this kind of thing only as part of the strategy time in-between attacks so as not to “interrupt” the action of the attack. I dislike the VATS system in FO3 for example. They should have made this a slow motion event not a “time stop” event.

I would like to make the toggle time of this double arrow nock feature a slow motion event (with a clickable hud element) as well but until I can put clickable icons on the hud I may just have to make do with the inventory system toggles.

Here are the limitations of the mod as I can foresee now:

The second arrow will have a slightly different damage potential as it will need to be
calculated in a script.

My formula will be simple using the bows damage number plus the arrows damage number multiplied by the player’s marksman skill modified by the player’s fatigue then reduced by the target’s armor AC.

If someone wants to contribute a more complicated formal I will use it as long as it is working, complete and ready to plug into the mod.

I will duplicate any arrow enchantments of the first arrow onto the second arrow. But bow poisons and enchantments will only be on the first arrow.

I am open to working with another modder on this mod and would not consider it "my mod" rather a collaboration if anyone whats to help script this mod. I would only insist on not using hot keys or dedicated buttons for this and would like to use my game mode "clickable Hud element" idea as I described above.
User avatar
Daddy Cool!
 
Posts: 3381
Joined: Tue Aug 21, 2007 5:34 pm

Post » Sat May 28, 2011 10:22 am

Finally, a bowazon for Oblivion! (Diablo 2, anyone?) :P
User avatar
Lauren Dale
 
Posts: 3491
Joined: Tue Jul 04, 2006 8:57 am

Post » Sat May 28, 2011 12:41 pm

If the Icons don't work out (remind me a bit of how witcher works) then as a suggestion why not have the knocking of the second arrow happen after the bow is drawn and then you click activate and the second is added - kind of like how denock used to be clicking the grab key.
User avatar
Silencio
 
Posts: 3442
Joined: Sun Mar 18, 2007 11:30 pm

Post » Sat May 28, 2011 2:32 pm

wooo hooo.... so far so good.

What I worked on tonight went really really well!

I have a test script now that once I fire and arrow a fireball appears next to it and mimics the arrows flight pattern (speed direction and and darn close to the trajectory).

Next I replaced the fire ball (fire ball was just for testing so I could see it clearly) with a duplicate arrow of the one shot and subtract an arrow from inventory.

Edit: looks great! Two arrows now fire from the bow! :celebration:
Except I need to work out an issue with the Angle the second arrow is facing as if flies.
I am sure I will get issue fixed this soon.

I did run into an obstacle with my click-able HUD icon idea. There is no cursor in game mode. :facepalm:
I was mixed up a little thinking that the cross-hair was the cursor in game mode.

But that is not dampening my enthusiasm after my successful tests so far.

I may just have the player aim the bow straight high UP (opposite of denocking the bow) to enact the double arrow load on the bow.

I am determined NOT to use any button pressing for this. But if I do I will use Psymon's idea as it makes sense to me that "activating" the bow is a good "action trigger".
User avatar
Melis Hristina
 
Posts: 3509
Joined: Sat Jun 17, 2006 10:36 pm

Post » Sat May 28, 2011 3:59 pm

Are you going to add higher skill requirements to allow this - or make it a more viable option?

Maybe a chance to mess up and blow the shot altogether?
User avatar
Robyn Howlett
 
Posts: 3332
Joined: Wed Aug 23, 2006 9:01 pm

Post » Sat May 28, 2011 8:16 am

Anyone can TRY to do this no matter what your skill level. But your aim will be terrible at low skill levels.
The arrows may even jump and spin rather than shoot straight unless you r marksmanship is up high enough.

Remember that the damage done will be much less as well (the power from the bow is split inefficiently into both arrows)so a low level marks man any not even have enough in the arrows to do much harm even if they manage to hit something!


Are you going to add higher skill requirements to allow this - or make it a more viable option?

Maybe a chance to mess up and blow the shot altogether?

User avatar
SHAWNNA-KAY
 
Posts: 3444
Joined: Mon Dec 18, 2006 1:22 pm

Post » Sat May 28, 2011 7:25 am

Gonna link base damage with skill?

One question I have though.... If total damage is going to end up being less than just firing one arrow........ why would anyone do this?

In any event, you come up with some truly amazing stuff, and seem to excel at making the game engine jump thru some interesting hoops. :D I look forward to seeing where you go with this.
User avatar
JUan Martinez
 
Posts: 3552
Joined: Tue Oct 16, 2007 7:12 am

Post » Sat May 28, 2011 8:19 am

One question I have though.... If total damage is going to end up being less than just firing one arrow........ why would anyone do this?
Two possibilities I can see (though I don't know if they apply exactly).

One, facing a group of spell casters, multiple arrows have a chance of hitting multiple spell casters and disrupting their casting. (Can't remember if this works in Oblivion, or just D&D based games).

Two, facing an opponent who is good at dodging arrows. Double the arrows makes it that much harder for him to dodge without running into the other arrow. Especially useful if the arrow has a Drain Agility or Burden effect on it.

I'll be highly impressed if you can make this work without a modifier key. The idea of pointing the bow straight up does remind me a bit of watching students draw those huge ass Japanese bows by pointing them up, stretching them out partway and then using the pivot down to horizontal stretch them the rest of the way.
User avatar
Kelvin Diaz
 
Posts: 3214
Joined: Mon May 14, 2007 5:16 pm

Post » Sat May 28, 2011 3:23 pm

You are absolutely correct!

This trick will be good against side stepping NPC (if you use my Combat Archery mod to make them side step) and this trick will be useful against crowds of NPC.

And once you are a high level marksman with a super strong bow the damage you do is so great that even reducing it with this trick will still dish out devastating damage.


Two possibilities I can see (though I don't know if they apply exactly).

One, facing a group of spell casters, multiple arrows have a chance of hitting multiple spell casters and disrupting their casting. (Can't remember if this works in Oblivion, or just D&D based games).

Two, facing an opponent who is good at dodging arrows. Double the arrows makes it that much harder for him to dodge without running into the other arrow. Especially useful if the arrow has a Drain Agility or Burden effect on it.


User avatar
Red Sauce
 
Posts: 3431
Joined: Fri Aug 04, 2006 1:35 pm

Post » Sat May 28, 2011 2:13 pm

Deleted

See my latest posts for damage formulas.


Gonna link base damage with skill?

User avatar
Phillip Hamilton
 
Posts: 3457
Joined: Wed Oct 10, 2007 3:07 pm

Post » Sat May 28, 2011 7:27 am

...svcks to mod Archery in oblivion. Arrows are just so dam finicky.
User avatar
Lucky Girl
 
Posts: 3486
Joined: Wed Jun 06, 2007 4:14 pm

Post » Sat May 28, 2011 12:30 pm

Here is one issue (due to an Oblivion hard coded bug) that I do not think I can solve with any amount of creative scripting on my part. So this will be an irritating part of the mod unfortunately. The bug is that Oblivion will created new items when DROP is called on the player instead of deleting them from the players inventory. I discovered this bug but it has been confirmed by QQuix who is another modder who has a lot more experience than I do.
That's more of a limitation than a bug, as that is how the game handles dynamic forms. Have you tried using RefStuff ? Some of its commands should(might) let you it pull off.
User avatar
^_^
 
Posts: 3394
Joined: Thu May 31, 2007 12:01 am

Post » Sat May 28, 2011 10:59 am

The limitation (I called it an issue) is the inventory problem.

The bug is the DROP command that sometimes drops as it should but then sometimes creates a new item instead. It is a bug i just discovered but it has been confirmed. QQuix or I will be documenting this new bug in the Wiki.

RefStuff will be a required plug in for this mod, but it will not solve this inventory issue.


That's more of a limitation than a bug, as that is how the game handles dynamic forms. Have you tried using RefStuff ? Some of its commands should(might) let you it pull off.

User avatar
Charity Hughes
 
Posts: 3408
Joined: Sat Mar 17, 2007 3:22 pm

Post » Sat May 28, 2011 2:09 pm

The limitation (I called it an issue) is the inventory problem.

The bug is the DROP command that sometimes drops as it should but then sometimes creates a new item instead. It is a bug i just discovered but it has been confirmed. QQuix or I will be documenting this new bug in the Wiki.

RefStuff will be a required plug in for this mod, but it will not solve this inventory issue.
Nevermind.
User avatar
Bryanna Vacchiano
 
Posts: 3425
Joined: Wed Jan 31, 2007 9:54 pm

Post » Sat May 28, 2011 5:28 pm

He has a thread in the CS forum detailing the problem and how he found it.
User avatar
Anne marie
 
Posts: 3454
Joined: Tue Jul 11, 2006 1:05 pm

Post » Sat May 28, 2011 8:50 am

Found it. Thanks!
User avatar
Fam Mughal
 
Posts: 3468
Joined: Sat May 26, 2007 3:18 am

Post » Sat May 28, 2011 7:57 pm

I had a similar problem to this with UV, when I was switching quivers in and out for my fake first person mode. If I remember correctly I actually managed to solve it with a certain amount of faffing about, though I now forget how. When I get home tonight I'll have a quick look and see if I can find the method I used.

I'm a little out of the loop at the moment, but I'm attempting to get my head back into a coding space so I can get a new version out soon.

Anyway, if I can help I will,

HeX
User avatar
patricia kris
 
Posts: 3348
Joined: Tue Feb 13, 2007 5:49 am

Post » Sat May 28, 2011 7:00 pm

The inventory issue is no longer a problem thanks to Showler.

It was a matter of doing the right combination of add, remove and equip. I had thought I tried all the possible combinations but the right combination
evaded me until Showler pointed it out to me.

But Thank You anyway.

I had a similar problem to this with UV, when I was switching quivers in and out for my fake first person mode. If I remember correctly I actually managed to solve it with a certain amount of faffing about, though I now forget how. When I get home tonight I'll have a quick look and see if I can find the method I used.

I'm a little out of the loop at the moment, but I'm attempting to get my head back into a coding space so I can get a new version out soon.

Anyway, if I can help I will,

HeX

User avatar
Causon-Chambers
 
Posts: 3503
Joined: Sun Oct 15, 2006 11:47 pm

Post » Sat May 28, 2011 5:11 pm

Aye, that was what I did. Glad you've got it playing nice.

I have some thoughts about ways of displaying two arrows on the bow, but I'm not sure I fancy the amount of maths involved...
User avatar
Laura Simmonds
 
Posts: 3435
Joined: Wed Aug 16, 2006 10:27 pm

Post » Sat May 28, 2011 8:45 pm

I have some thoughts about ways of displaying two arrows on the bow, but I'm not sure I fancy the amount of maths involved...
Perhaps NifScript can help with that at some distant date in the future ...

[offtopic]Sending PM ...i[/offtopic]
User avatar
Euan
 
Posts: 3376
Joined: Mon May 14, 2007 3:34 pm

Post » Sat May 28, 2011 5:49 pm

Concerning trying to show a HUD element to visually alert the player that they have 2 arrows knocked on the bow:

From the OBSE team:

Assuming the path is correct and the texture is usable by the game, it may simply be that the original texture remains cached so the game doesn't go and load the new texture. SetIconPath does nothing to try and get the game to reload assets. I have not played around with it to see if it's possible via script to coerce the game into reloading the texture.


This mod uses an “action trigger” to initiate all the features.

“Activate” your bow to set it for a Double Nock by holding your activate button then pressing your “draw the bow button” (the attack button). Once the bow is set for a Double Nock you may let go of the activate button.

This will Knock 2 arrows on your bow. Your MarksMan skill will be cut in half however. Each of your arrows will do less damage and move slower than if you shot only one arrow.




Ok, after working with my arrow guidance system for a few days I reluctantly have to admit it just does not feel right.

For one thing trying to align the arrow in flight with the 2nd target was very difficult from the players view in on a 2d screen. It would look like you had it allied up right but then would continue on to what looks like the wrong direction from the archer player’s point of view. However it was in fact correct, if you watch it in top view you could see it clearly. I hate top view gamming so I did not even consider for a moment going that way to solve the issue.

There were some other small but annoying issues as well. Such as the fact the bow would visually obstruct your view of the arrow and made it frustrating at times. I tired making the player invisible momentarily but for what ever reasons the player would get stuck that way and could not be made visible again.

Anyway I came up with a different approach and so far it has no issues so it seems as if this will be the way to do it.

This mod uses an “action trigger” to initiate all the features.

“Activate” your bow to set it for a Double Nock by holding your activate button then pressing your “draw the bow button” (the attack button). Once the bow is set for a Double Nock you may let go of the activate button.

This will Nock 2 arrows on your bow. Your Marksman skill will be cut in half however. Each of your arrows will do less damage and move slower than if you shot only one arrow.


Master Level Double Nock Perk
This will allow you to use your master skill to better aim the second arrow to hit the secondary target.

After loading 2 arrows on your bow:

By “activating your bow” while you fire the arrows (holding your activate button down as you fire the arrow) you will go into slow motion, this will allow you to move your crosshair onto your desired second target. Basically you will be aiming your bow at the second target.

Once you have your crosshair on the 2nd target (your bow is aiming at the second target) you then lift your finger off the activate button. The slow motion time will go back to normal speed time and you have committed the "left / right" path way of the 2nd arrow in the direction of your selected second target.

This will not alter the elevation of the arrow however. So for the 2nd target to be hit the arrow will have to arrive at the target not too low (hit the ground) or too high (fly over their head.

At close and medium range this will not be very difficult. At far ranges this will be harder depending on how you fired the arrows in the first place. I.E. what the trajectory and elevation of the arrows were when you fired the bow will not be changed by this master perk.

Also this redirection of the 2nd arrow will be limited to about 20 degrees to the left and 20 to the right. Basically this just means you will not be allowed to make the arrow turn drastically from the flight direction it started at, (no 90 degrees turns).

This also means you have a limited amount of time to aim the second arrow because if it moves to far along before you change its direction it will be to close to your 2nd target putting it outside of the 20 degree limitation.
User avatar
Tarka
 
Posts: 3430
Joined: Sun Jun 10, 2007 9:22 pm

Post » Sat May 28, 2011 2:42 pm

Yes I had thought of holding a cloned arrow in place on the bow with scripting but the math would be a nightmare. I would need someone who is a master of trig to do this. That I am not.

As it is now I have slight problem with tilting the second arrow to more closely match the primary arrow. The problem is that objects placed and rotated in the world use a fixed rotation coordinate system but the arrow that is fired by the player uses a relative rotation coordinate system.

Getting the the angle from one to work for the other is not in my scripting ability. It is not just a simple matter of using getangle on one and pasting that number into set angle of the other!

So anytime you fire an arrow at extreme angles (such as straight up) the second arrow looks a little strange, but ONLY when you see it in slow motion.

Otherwise the quick motion of the arrow in flight covers this fallibility in the mod.



I have some thoughts about ways of displaying two arrows on the bow, but I'm not sure I fancy the amount of maths involved...

User avatar
!beef
 
Posts: 3497
Joined: Wed Aug 16, 2006 4:41 pm

Post » Sat May 28, 2011 11:16 am

Aye, I had enough difficulty sorting out the angles to make spinning knives and shields etc fly from the correct position at the correct angle for TAW/UV, and that's only handling one object. I'd hate to try to match the positions. I've no doubt it's be possible, but I'd rather chew my own leg off.

As you say, the fact that arrows move pretty quickly gives you a certain amount of margin for error.

Here's a though though - and I've no idea if it would be possible, but sometimes bluesky thinking isn't a bad way to do these things. Could you create a second actor, with a bow, null all the meshes and turn off their collision except for the arrow itself, match the player's position and rotation, and just offset it on the X or Y axis depending on if they are sneaking or standing. Then when the player releases, remove that actor and swap in your own arrow created however you are doing it at the moment.

HeX
User avatar
Mark
 
Posts: 3341
Joined: Wed May 23, 2007 11:59 am

Post » Sat May 28, 2011 1:23 pm

The inventory issue is no longer a problem thanks to Showler.

It was a matter of doing the right combination of add, remove and equip. I had thought I tried all the possible combinations but the right combination
evaded me until Showler pointed it out to me.

But Thank You anyway.



May I ask what that little bit of code may be please? I have that same issue when trying to do my auto-equip mod (Personal mod - non-released).
When auto-equipping things back on the player, if they have arrows it will only equip 1, then I'd have to manually go into my inventory, un-equip that one arrow, then add the whole group of arrows again for it to display and show as normal. Extremely annoying and inconvenient.

Thanks,

-Mush-
User avatar
Nicola
 
Posts: 3365
Joined: Wed Jul 19, 2006 7:57 am

Post » Sat May 28, 2011 5:07 am

it double posted on me. sorry.
User avatar
Kirsty Collins
 
Posts: 3441
Joined: Tue Sep 19, 2006 11:54 pm

Next

Return to IV - Oblivion