[WIP] Nocking two arrows at once!

Post » Sat May 28, 2011 12:11 pm

You have to add just one arrow to the player, equip it, then add the rest of that type of arrow.

It doesn't update the players quiver graphic to show more than just the one arrow, but they do end up properly equipped and useable.
User avatar
Emerald Dreams
 
Posts: 3376
Joined: Sun Jan 07, 2007 2:52 pm

Post » Sat May 28, 2011 12:44 pm

The way I am doing it does not have that problem.
The number of arrows equipped is correct (not stuck at 1).

Each time two arrows are fired at the same time 2 arrows are subtracted from the players inventory.
And the proper number shows in the graphic.

Thanks again Showler for getting me to try one last combination of commands to finally find the one "magic sequence" that worked.


My code:

set NumberOfArrows to player.getitemcount ShotArrowObjectID

player.removeitemns ShotArrowObjectID NumberOfArrows

set NumberOfArrows to ( NumberOfArrows - 2 )

if NumberOfArrows > 0
player.additemns ShotArrowObjectID 1
player.equipitemns ShotArrowObjectID
player.additemns ShotArrowObjectID NumberOfArrows
endif



You have to add just one arrow to the player, equip it, then add the rest of that type of arrow.

It doesn't update the players quiver graphic to show more than just the one arrow, but they do end up properly equipped and useable.

User avatar
Guinevere Wood
 
Posts: 3368
Joined: Mon Dec 04, 2006 3:06 pm

Post » Sat May 28, 2011 10:08 am

You know by "quiver graphic" I mean the one that displays on the player's back in 3rd person, not the number in the HUD display, right?

I haven't tested it myself lately, but it was always a problem that adding just one arrow would show a quiver with just one arrow sticking out of it, and adding more arrows by script would not increase that graphic to more than one arrow.
User avatar
Kitana Lucas
 
Posts: 3421
Joined: Sat Aug 12, 2006 1:24 pm

Post » Sat May 28, 2011 7:21 am

Obtuse problem solving is my bread and butter in modding. I try to make up with creativity (and a lot of experience with the subject matter) what I lack in programing expertise. So I do appreciate the suggestion.

I did try this kind of thing in the older versions of my Actors miss their arrow shots mod and it was filled with little problems concerning the invisible actor. I managed to over come most of them but it was never perfect. One of the issues (at the time) I could not solve to my satisfaction was that the invisible creature could bump things and this looked like the player was huanted by a poltergeist sometimes.

After OBSE17 came along I was able to make my mod work without the invisible actor.

In this situation in this mod it would not work at all because you cannot make the actors fire an arrow on cue.
The best you can get in between 1 to 4 seconds (after telling them to fire an arrow) randomly.

Plus "swapping in your own arrow" is where all the angle issues start to happen because placing an object in the game uses a different angle system than arrows that are fired.

For now it is fine, but I am hoping at some point some math trig master will offer a scrap of script that can covert from one system to the other. But I am unable to do this myself with my current math skills.

Right now I am squeezing all my math talent from my memory (what little I have) into refining the Arrow guidance feature.

Up and down is not hard (up and down is universal) but left and right relative to the player and the 1st arrow is not easy.

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
Jimmie Allen
 
Posts: 3358
Joined: Sun Oct 14, 2007 6:39 am

Post » Sat May 28, 2011 2:04 pm

Oh...sorry , you are right about that. But as most people use first person to fire arrows that is a very small issues that I will not worry about myself. I am very happy with how it works now, thanks again for your persistence.

You know by "quiver graphic" I mean the one that displays on the player's back in 3rd person, not the number in the HUD display, right?

I haven't tested it myself lately, but it was always a problem that adding just one arrow would show a quiver with just one arrow sticking out of it, and adding more arrows by script would not increase that graphic to more than one arrow.

User avatar
Darian Ennels
 
Posts: 3406
Joined: Mon Aug 20, 2007 2:00 pm

Post » Sat May 28, 2011 9:36 am

The way I am doing it does not have that problem.
The number of arrows equipped is correct (not stuck at 1).

Each time two arrows are fired at the same time 2 arrows are subtracted from the players inventory.
And the proper number shows in the graphic.

Thanks again Showler for getting me to try one last combination of commands to finally find the one "magic sequence" that worked.


My code:

set NumberOfArrows to player.getitemcount ShotArrowObjectID

player.removeitemns ShotArrowObjectID NumberOfArrows

set NumberOfArrows to ( NumberOfArrows - 2 )

if NumberOfArrows > 0
player.additemns ShotArrowObjectID 1
player.equipitemns ShotArrowObjectID
player.additemns ShotArrowObjectID NumberOfArrows
endif


Ty - very much appreciated. Great work btw.

-Mush-
User avatar
Jesus Duran
 
Posts: 3444
Joined: Wed Aug 15, 2007 12:16 am

Post » Sat May 28, 2011 9:27 am

deleted
User avatar
Laura Mclean
 
Posts: 3471
Joined: Mon Oct 30, 2006 12:15 pm

Post » Sat May 28, 2011 8:22 am

deleted
User avatar
Steven Nicholson
 
Posts: 3468
Joined: Mon Jun 18, 2007 1:24 pm

Post » Sat May 28, 2011 2:37 pm

I always thought this was something only cretins like legolas would do :)

Regarding the above, probably the latter. Another thing I was wondering, perhaps you could have the second arrow automatically aimed for the closest person whitin range?
User avatar
Nicole Elocin
 
Posts: 3390
Joined: Sun Apr 15, 2007 9:12 am

Post » Sat May 28, 2011 2:55 pm

One more,

I have a sound effect that tells the player how much time they have to pick another target. Once this sound is over you are committed to a direction. Basically you have a limited time to pick your 2nd target. It is about 3 seconds, which sounds like not a lot but is more than enough in game play because the world is in very slow motion so you can easily concentrate on your 2nd target.

Would you prefer not to have this sound effect and just have the timer silently time out?
Then you would have to learn by experience about how much time you have left.

I have to put this time limit on the targeting for the 2nd arrow for technical reasons.

@ Merunnin , THANKS! At first I did not like this idea, but I think I will make this an option for the player if is is not to hard to squish it into my exiting script. After I thought about it I realized that this would be the best option for keeping the action at a fast pace.

I love bullet time events myself (as this kind of thing really does happen in real combat on rare occasions. Well it was rare for me anyway, but it did happen more than once in my experience. And it made me feel I was operating at the peak of my ability in combat when it did. ) However I totally understand how some players might like to just keep the action going non-stop for the thrill of it.

If I can do this in my script, I will make the 2nd arrow auto targeting happen automatically as a master perk if you DO NOT hold your Activate button.
User avatar
Jonathan Braz
 
Posts: 3459
Joined: Wed Aug 22, 2007 10:29 pm

Post » Sat May 28, 2011 6:08 pm

One more,

I have a sound effect that tells the player how much time they have to pick another target. Once this sound is over you are committed to a direction. Basically you have a limited time to pick your 2nd target. It is about 3 seconds, which sounds like not a lot but is more than enough in game play because the world is in very slow motion so you can easily concentrate on your 2nd target.

Would you prefer not to have this sound effect and just have the timer silently time out?
Then you would have to learn by experience about how much time you have left.

I have to put this time limit on the targeting for the 2nd arrow for technical reasons.

@ Merunnin , THANKS! At first I did not like this idea, but I think I will make this an option for the player if is is not to hard to squish it into my exiting script. After I thought about it I realized that this would be the best option for keeping the action at a fast pace.

I love bullet time events myself (as this kind of thing really does happen in real combat on rare occasions. Well it was rare for me anyway, but it did happen more than once in my experience. And it made me feel I was operating at the peak of my ability in combat when it did. ) However I totally understand how some players might like to just keep the action going non-stop for the thrill of it.

If I can do this in my script, I will make the 2nd arrow auto targeting happen automatically as a master perk if you DO NOT hold your Activate button.

You're welcome, though I wasn't really requesting it, just a suggestion to make it simpler since you were having headaches implementing a control scheme. How would you do this in real life? Do you approximate a distance between the arrows and tilt the bow horizontally?
User avatar
Steeeph
 
Posts: 3443
Joined: Wed Apr 04, 2007 8:28 am

Post » Sat May 28, 2011 5:03 pm

mmmm... well I was saying I have experienced "the zone" or what gamers call "Bullet Time" not that I was able to aim a second arrow at a target deliberately.

I have shot two arrows at the same time into crowds of enemies but I have never been able to aim my second shot with accuracy.

There are master archers that do a DEMO "trick" that make it LOOK like thy are aiming their arrows (more than one fired from the bow) but this is only a trick, they did not really aim the 2nd arrow independently.

They do this by practicing the shot until they can make the both arrows hit in the same locations each time. Then they set up their targets in those same locations.

In demonstrating the trick shot it looks as if they were able to aim both arrows they fired individually.

So in combat this would only work if you found yourself in a situation where your opponents where standing in the right place at the right time. But for a game you cannot reasonably expect the player to wait for this to ever occur and be good enough to act on the occasion when it finally happens.

So for the game I am allowing this 2nd arrow targeting feature.


You're welcome, though I wasn't really requesting it, just a suggestion to make it simpler since you were having headaches implementing a control scheme. How would you do this in real life? Do you approximate a distance between the arrows and tilt the bow horizontally?

User avatar
Lisa Robb
 
Posts: 3542
Joined: Mon Nov 27, 2006 9:13 pm

Post » Sat May 28, 2011 4:26 pm

Some very good news

Ok, after reading up more on the OBSE commands for gleaming damage from weapons I realized that using these commands 90 percent of the damage calculations can be done for me.
I only need to calc and/or apply the following modifiers:

The target's armor AC (this will include the targets armor skill modifiers for their armor)

The target's natural or magic based damage resistance.

The target's Normal Weapons resistance (such as when it is a ghost )

I should be able to do all this, which means that the 2nd arrow will now be almost identical to the first arrow for both physical damage and any standard arrow enchantment the it would normally have had plus most custom (scripted) enchantments.

The only thing it will lack will be the bow enchantments and bow poisons. Bow enchantments and bow poisons from the bow will only be on the primary arrow shot not on the secondary arrow. Think of it this way, there is only enough poison for one arrow, this is OK because otherwise it would be a cheat to "double" the poison from the bow onto two arrows.
User avatar
Anna Kyselova
 
Posts: 3431
Joined: Sun Apr 01, 2007 9:42 am

Post » Sat May 28, 2011 4:40 pm

Requirement that will be in my read me file:


Any mod that overwrites the vanilla magic effect “Extra Summon 20” (effect code Z020) will be incompatible with this mod.

The incompatibility could either be that your 2nd arrow will fly thru buildings as if the building was not there and then disappear from the game world (the arrow not the building). Or worse case you will see a magical fire and/or light stuck to your 2nd arrow (as if you shot a flaming arrow.)

To solve this incompatibly with another mod you need to load this Double Nock mod AFTER the incompatible mod.

However it is very unlikely that any mod would alter this magic effect. This particular magic effect is one of the only standard magic effects needed by the game to be unaltered visually, it has no light, no sound and no NIF associated with it. But if someone were to alter that in a mod you will have issues as described above, not only with my mod but the game itself.

I cannot use the "NONE" magic effect nor can I use the "Script Effect" because they both have no associated nif that has collision. This surprised me because I assumed that collision was used to tell the spell that it landed on a target. But it turns out that spells use hardcode subroutines to calculate when it has intercepted an activator or NPC. Collision is not used for that, instead it is used to tell the nif that it is time to run its animation for the hit such as when a fire ball explodes on contact with a wall or NPC.

I would have loved to use one of the “unused” magic effects or even the one magic effect that was made by the developer for just this kind of situation however 2 popular magic overhaul mods have laid claim to these and changed them to include lights sound and other visuals. In the past I gotten an earful from the players that wanted to use my mods and use those magic overhaul mods.

So my only option left was to “lay claim” on the “Extra Summon 20” magic effect.
However I will not be adding anything to it that would be apparent or obstructive in the game.

I need the magic effect with a collision Nif (but no other visual effects) to detect when the 2nd arrow has hit a wall. “Extra Summon 20” (effect code Z020) normally has no lights, sounds or any visuals and no Nif at all associated with it.

In this mod I have given it a NullNif that also has collision (One that I made.) Giving it this NullNif will have no other effect in the game at all.

The Script Effect spell normally has a vanilla nullnif but this vanilla nullnif has NO collision either.
User avatar
Benito Martinez
 
Posts: 3470
Joined: Thu Aug 30, 2007 6:33 am

Post » Sat May 28, 2011 5:55 pm

Heya Spooky! :wavey:

Seems like there is another Duke classic in the making! No doubt I would sacrifice the Extra Summon slot for something as cool as this. :foodndrink:
User avatar
Bryanna Vacchiano
 
Posts: 3425
Joined: Wed Jan 31, 2007 9:54 pm

Post » Sat May 28, 2011 5:14 pm

Oh, hi StarX

um, yes I would hope I can make this mod "worth it" but really no other mod should be doing anything with that magic effect except maybe exactly the same thing I am doing. If they do the same thing (give it a nullnif with collision) then there will be no issue anyway.
:shrug:

Heya Spooky! :wavey:

Seems like there is another Duke classic in the making! No doubt I would sacrifice the Extra Summon slot for something as cool as this. :foodndrink:

User avatar
emily grieve
 
Posts: 3408
Joined: Thu Jun 22, 2006 11:55 pm

Post » Sat May 28, 2011 1:47 pm

I think....I think it is 90 percent ready to go...

:unsure:

I may release a beta late at night tomorrow (it will not have a read me file, so you will need to read this thread) .
And it will be in a locked zip. The password will be:

BetaTester

There is one last thing I want to add if it is possible, but I am having a hard time finding a way to do it.
The 2nd arrow does not always stick into things.

The 2nd arrow will cause damage and go into the inventory of your target if they are an actor! Well unless the arrow was enchanted, in that case it disappears like all enchanted arrows.) But when you hit things like doors or trees most of the time it will bounce off.

This may not get solved, but while I am working on that, it would be good to have people play the beta to find bugs.

This mod will detect if you are using my Combat Archery mod.
If so it will enact an internal "lite" version of my locational critical hits system from the Combat Archery mod.
And the 2nd arrow will bounce off armor if the bow is not drawn back all the way.

I need to release a new compatible version of my Combat Archery mod as well. That will be uploaded first.
User avatar
Kanaoka
 
Posts: 3416
Joined: Fri Jun 16, 2006 2:24 pm

Post » Sat May 28, 2011 11:14 am

This sounds awesome, keep up the good work! :celebration:
User avatar
jaideep singh
 
Posts: 3357
Joined: Sun Jul 08, 2007 8:45 pm

Post » Sat May 28, 2011 3:35 pm

Beta is ready for testing:

get it here:
http://www.tesnexus.com/downloads/file.php?id=28565

It will not have a read me file, so PLEASE read this entire thread before you try to use it.

It still does not have the "blow it badly" feature yet and I am trying to find a way to make the arrows stick when they hit trees and doors and crates.

There is an AUTO FEED feature, it will automatically double load your bow each time you draw the bow.
Look in your weapon inventory for the switch.

Do not forget to upgrade your Duke Patrick's Combat Archery mod FIRST to rev 2
IF you are using that mod!

It has a new INI file and new code to prevent the "bow jerk bug" while in bullet time.
User avatar
Marina Leigh
 
Posts: 3339
Joined: Wed Jun 21, 2006 7:59 pm

Post » Sat May 28, 2011 5:46 pm

deleted
User avatar
Queen
 
Posts: 3480
Joined: Fri Dec 29, 2006 1:00 pm

Post » Sat May 28, 2011 9:17 am

ok, I found a solution to the issue of arrows disappearing before they hit the target.

Rev 3 of the beta is ready.

get it here:
http://www.tesnexus....le.php?id=28565

Password on the zip is again:

betatester

This rev will slow down the script cycle to 2 seconds if you are not holding a bow to reduce CPU usage. It still does not have the "blow it badly" feature and still arrows do not stick in trees and doors, I am working on that now. Arrow sticking into trees and doors may not be solvable but the blow it badly feature will defiantly be in the mod before release.

Please give feedback on the beta in while I work on this.


FYI
A new issue with all OBSE mods that use the "nameincludes" or "pathincludes" type commands!
Some of my mods like my Combat Archery (and some other mods by other modders) can only be used with ENGLISH installs of the game because of some of the OBSE commands that can be used to look for English words in the game to perform script tasks.
User avatar
joeK
 
Posts: 3370
Joined: Tue Jul 10, 2007 10:22 am

Post » Sat May 28, 2011 7:58 pm

I am not sure if I said this clearly before, but once you set your auto-feed (from the inventory)
AND if you are level 75 or greater marksman, your 2nd arrow will automatically try to veer to (aim at) an applicable target that is in combat with you.

Remember that elevation is ALWAYS still up to you no matter what level you are.
So even if the arrow veers toward the target it may still fly too high or too low depending on the elevation of your primary arrow.

And aiming the second arrow manually only is allowed at level 75 or grater marksman skill. If you are less than that the arrow will just veer off at about 6 degrees from the primary arrow.
User avatar
Leticia Hernandez
 
Posts: 3426
Joined: Tue Oct 23, 2007 9:46 am

Post » Sat May 28, 2011 9:34 am

Rev 4 of the beta is ready.

get it here:
http://www.tesnexus....le.php?id=28565

Password on the zip is again:

betatester

This rev 4 has many small bug fixes. It still does not have the "blow it badly" feature and still arrows do not stick in trees and doors.

I was working on the tracking system instead.

So now the mod will track and calculate up to 8 arrows (rather 4 sets of 2) at one time. This should be more than enough for most players. If you are shotting faster than that and actually hitting anything you are a better man than I. Each arrow set is individually handled for damage.

You could fire 4 different types of arrows sets in a row and the damage would be calculated correct for each set of arrows!
User avatar
Big Homie
 
Posts: 3479
Joined: Sun Sep 16, 2007 3:31 pm

Post » Sat May 28, 2011 7:11 pm

I'm trying this out right now.

Anyway, as for your HUD problem, why can't you switch the icon to another icon?


Problems I had:

*The first time a double-shot is fired, you can see two arrows. Subsequent shots in the same cell will only show one arrow.
*Firing a double-shot at a wall makes BOTH of the arrows disappear.
*When fighting an enemy, there was no slow feature. Nothing happened when I hit the activator key or released the bow. Maybe I had the keys wrong.
*Only one arrow is removed from my inventory, and only same arrows are displayed. It's like only one is firing.

Disabling Deadly Reflex had no effect.
User avatar
Dagan Wilkin
 
Posts: 3352
Joined: Fri Apr 27, 2007 4:20 am

Post » Sat May 28, 2011 1:52 pm

Assuming you did install the OBSE plugy that was in the zip file and that you are using obse 18 and installed the mesh file that was in the zip and installed the new COMBAT ARCHERY rev with the new INI file IF you are using that mod and you load this beta last (just for testing):

Wait for 10 seconds for the quest script to initialize.
You must be level 75 or greater marksman skill. (should I take this OUT for beta only?)
You must have more than 1 arrow EQUIPPED!

You must first press AND hold the activate button (the one used to open crates and talk to people).

Fire the bow while still holding the activate button.
You will go into slow motion.

Move your cross hair onto your 2nd target, the target must be activate like a door or an NPC.
Let go of the activator button.

You should go back into normal time. If you get stuck in bullet time for some reason just go into a menu, this always returns you to normal time in all my mods.

Otherwise do not do this manually, rather just try the auto load feature.
You must be level 75 or greater marksman skill. (should I take this OUT for beta only?)
You must have more than 1 arrow EQUIPPED.

Go into your inventory and press the bow double load icon once.

Then just fight as normal, your bow will do the rest.
Each arrow SET shot one arrow will try to hit any ACTOR (only actors) that are in combat with you.

Also, you do not need to be level 75 or greater to just fire 2 arrows, the second will just veer off at about 6 degrees.


Thanks for giving this some testing.



NOTE:
Any mod that overwrites the vanilla magic effect “Extra Summon 20” (effect code Z020) will be incompatible with this mod. The incompatibility could either be that your 2nd arrow will fly thru buildings as if the building was not there and then disappear from the game world (the arrow not the building). Or worse case you will see a magical fire and/or light stuck to your 2nd arrow (as if you shot a flaming arrow.) Load this mod AFTER the incompatible mod to correct this. But No mod should be changing the nif of that magic effect anyway unless they are doing the same thing I am doing (giving it collision). If they give it collision with out giving it any visual effects then it will not be incompatible with this mod.




Problems I had:
*When fighting an enemy, there was no slow feature. Nothing happened when I hit the activator key or released the bow. Maybe I had the keys wrong.
*Only one arrow is removed from my inventory, and only same arrows are displayed. It's like only one is firing.

User avatar
latrina
 
Posts: 3440
Joined: Mon Aug 20, 2007 4:31 pm

PreviousNext

Return to IV - Oblivion