[WIP] Horseman - Mounted Combat for Skyrim

Post » Mon May 28, 2012 3:44 am

Impressive. Very impressive.
User avatar
Vickey Martinez
 
Posts: 3455
Joined: Thu Apr 19, 2007 5:58 am

Post » Sun May 27, 2012 10:42 pm

Are you planning on making it compatible with "Better Horses" on Nexus?
User avatar
Bedford White
 
Posts: 3307
Joined: Tue Jun 12, 2007 2:09 am

Post » Sun May 27, 2012 10:28 pm

Thank you every one for the ideas, suggestions. I am trying to make the best of these into the mod :)


Are you planning on making it compatible with "Better Horses" on Nexus?

So far, yes, they are compatible. If users would disable 'trampling' features from Better Horse. I didn't alter, change any thing that's vanila at all. Every animation, hit/attack, charges, trampling .... are either made my me, or extend the engine. So it will compatible will most mods, not just 'Better Horses'


If you're up for cooperation, let me know.


Hi there, I love your MERP. I wish you will finish your project soon, cuz it would be amazing new experience to have.
I will try to answer every questions of yours to the best of my ability


I hope you don't mind some sharing of concepts to both our benefits? I implemented weapon unsheathing in Oblivion by modifying and re-adding those animations as Idles, and making the weapon an AnimObject for those Idles. It looks like you found a way to have the actual weapon be unsheathed though?

Yes, it is the actual weapon. If I equip an axe, player would draw it out as he normally would on foot. Same goes with daggers, bows and 2-handed weapons (though I haven't created animations for bows & 2-handed yet). NPC , especially guards will react accordingly - "Guards may get nervous, a man approach with weapon drawn' :P .All vanilla damage-bases are calculated as normal. To be able to do so, you will need to define new event that extends the existing behavior-based event, in this case, HorseRoot state. In programmer's language, you will understand this is as inheritance, and to call new event from polymorphism event

I'm also curious how you implemented hit detection. Is this done the vanilla way with crosshair attacks, or do you have actual collision detection working on the blade? I managed the latter in Oblivion, but with heavy use of OBSE.

Yes, and no :P. In mounted mode, player would fight like in real 3rd person mode. So I should say, with vanilla crosshair. No collisions detector needed.
This Hit is also recognized by OnHit event, although I didn't register for the 'isAttacking' as player begins the attack (too much work, since I have too many new animations :P). Player can actually hit whatever the 3rd person camera looking.

As it turns out, I can actually hit my horse when I was mounting too. In my script, I try to 're-position' the angle a little bit right before the hit, so it also greatly reduce the chance of hitting the horse. You are good with scripting, so you surely know that while mounted, the player z-angle is NOT the same as the horse z-angle, right? It instead slowly blend toward the direction the horse is looking.


In my experience the challenge lies mostly in making the mounted combat intuitive and smooth, not so much implementing the basic concepts. The thing I have been pondering the most about is dynamic aiming animations. Do you know the vanilla bow shooting animation? They are in fact "aimed" for human actors, probably by dynamically blending several animations. Especially for thrusting spears such dynamic aiming is invaluable. It kinda svcks if you can only thrust or couch in a few pre-determined directions. It probably requires a new Behavior file, but I haven't looked into that yet.


Ya, I checked the behavior files. They are not really blend, I think. They are divided into upper-lower body parts, and based on the crosshair position, the correct animation will play. If the player change direction while aiming, the new animation will just override the old one. For instance, if you move your crosshair about +30* angle-z from original pos, then bow_rotate45_right.hkx will kick in. If in 3rd mode, you will have to worry about turning left & right, no need for up&down

The blending is just how animation transit from one to another.
One problem thou, that if animations are not really sync, actor will play 'jesus-on-the-cross' like animation for a flash, then switch to new animation :(

I can try to dig deeper into bow-aim thing for my mod, but it will be a tough nut to crack


Btw, to get a more realistic charge knock-back effect, you could perhaps add a GetHeadingAngle condition between the horse and the victim, so they don't get knocked side ways in that weird way. If you use PushActorAway for this, consider calling it from a temporary invisibly placed NPC that you put a little above the horse, so the Push is directed more downwards.


Thanks, I already tweak the angle, but somehow forgot to compile the script at recording time >.< I reduce the push force, and it plays out quite nice. The problem here is not really the direction of the push, but the actor got 2 or more consecutive push(s) on impact. I made a script that made that actor immune to charge right after the first hit. This immunity is about 3 seconds long, so he wont get charge several times in a row :)
User avatar
Breanna Van Dijk
 
Posts: 3384
Joined: Mon Mar 12, 2007 2:18 pm

Post » Mon May 28, 2012 7:37 am

Hi there, I love your MERP. I wish you will finish your project soon, cuz it would be amazing new experience to have.
I will try to answer every questions of yours to the best of my ability

Great, thanks for the answers! These first weeks I have been mostly occupied with getting MERP up and running, and only have had a few hours of Papyrus-time. You are definitely ahead of me, so your advice is appreciated and will save me a lot of time.

You would be welcome in our team if you are interested. You know what you are doing, and like me you obviously love implementing new game mechanics. We're going to do that a lot in MERP. I guess you would be excited by for example http://www.youtube.com/watch?v=ccRKQTPYX1I?

You'd have a big experienced team helping you in your efforts, including modelers and animators. We also don't try to force anyone to do anything, so you can work on whatever you like and implement your own ideas.

Yes, and no :tongue:. In mounted mode, player would fight like in real 3rd person mode. So I should say, with vanilla crosshair. No collisions detector needed.

I see. I found the collision detection a benefit though, you don't have to aim your crosshair at your target, and you have a certain time window of the strike in which you need to hit your opponent, rather than one specific moment in which the crosshair "hits". In Mount & Blade it's collision based as well.

you surely know that while mounted, the player z-angle is NOT the same as the horse z-angle, right? It instead slowly blend toward the direction the horse is looking.

Yes, it was the same in Oblivion. With some calculations using the z-angle of horse and player I was able to determine to which side of the horse the camera was looking, which I used for determining whether to execute an attack on the left side of the horse or the right side.

Ya, I checked the behavior files. They are not really blend, I think. They are divided into upper-lower body parts, and based on the crosshair position, the correct animation will play. If the player change direction while aiming, the new animation will just override the old one. For instance, if you move your crosshair about +30* angle-z from original pos, then bow_rotate45_right.hkx will kick in. If in 3rd mode, you will have to worry about turning left & right, no need for up&down

Very interesting, thanks for clearing that up. Though I think that for polearm mounted combat both the Z and the X angles are required, especially once NPC's on horses are implemented. Against a mounted opponent you will want to aim higher than against a walking opponent, and you'd also want to compensate for any terrain height differences.


Btw, what do you think about adding a damage multiplier based on the current movement speed of the horse? The faster you ride the harder it is to hit something, but the reward (damage) will be greater.
User avatar
Katy Hogben
 
Posts: 3457
Joined: Mon Oct 30, 2006 12:20 am

Post » Sun May 27, 2012 8:42 pm

(Your Z-angle is set to be the same as the horse's, so no side-way shooting) :(

I'm not an expert of Scripting (And this is prolly a too-late post) but can't you make an 'if' script that will change the Z-angle if you are wielding a bow?
User avatar
daniel royle
 
Posts: 3439
Joined: Thu May 17, 2007 8:44 am

Post » Sun May 27, 2012 6:09 pm

Looking good rongphale - keep up the good work!!
User avatar
Alisha Clarke
 
Posts: 3461
Joined: Tue Jan 16, 2007 2:53 am

Post » Mon May 28, 2012 8:58 am

Can you use two handed weapons on horseback?

Looks awesome by the way.
User avatar
Emily Jones
 
Posts: 3425
Joined: Mon Jul 17, 2006 3:33 pm

Post » Mon May 28, 2012 2:36 am

Can you use two handed weapons on horseback?

Looks awesome by the way.

Besides bows, I don't think so, or at least I can't think of any historical examples off the top of my head. With the exception of spears (and of course thrusting attacks from those that allowed it) most two handed weapons we're designed for wide swinging movements which normally requires more mobility than you would have on horseback.
User avatar
Nienna garcia
 
Posts: 3407
Joined: Wed Apr 25, 2007 3:23 am

Post » Sun May 27, 2012 9:07 pm

Besides bows, I don't think so, or at least I can't think of any historical examples off the top of my head. With the exception of spears (and of course thrusting attacks from those that allowed it) most two handed weapons we're designed for wide swinging movements which normally requires more mobility than you would have on horseback.

But it has been done before in real life. You just gotta be very skilled at riding a horse and have the ability to ride one correctly without using your hands, which will be used in swinging your 2H weapon.
User avatar
Jennifer Munroe
 
Posts: 3411
Joined: Sun Aug 26, 2007 12:57 am

Post » Mon May 28, 2012 8:32 am

I think what nateedubs was asking is if you can do it in the mod, not in real life. The answer is no. Rongphale already answered to that question.
User avatar
Kahli St Dennis
 
Posts: 3517
Joined: Tue Jun 13, 2006 1:57 am

Post » Mon May 28, 2012 1:51 am

Ok guys, I will be making new animations for 2-handed weapon, :tongue: well, not exactly, but you see, I just got a spear model from a friend in TES Alliance, and it is a 2-handed weapon. In game, you will only be able to wield spears, not claymores, battle axes, or War Hammer.


I'm not an expert of Scripting (And this is prolly a too-late post) but can't you make an 'if' script that will change the Z-angle if you are wielding a bow?

Yes, you can always set the z angle, but it doesn't set player animation, or make player actually turns while mounted.

Very interesting, thanks for clearing that up. Though I think that for polearm mounted combat both the Z and the X angles are required, especially once NPC's on horses are implemented. Against a mounted opponent you will want to aim higher than against a walking opponent, and you'd also want to compensate for any terrain height differences.

Actually, as I played test ingame, the x angle seems to be involved apparently, though Im not so sure. (Debug.Trace did not give reliable input :( )
Because with Lydia standing to my right when I was mounted, if I look up really high up to the sky and strike, I will miss. But if I look down, I can hit her.

I see. I found the collision detection a benefit though, you don't have to aim your crosshair at your target, and you have a certain time window of the strike in which you need to hit your opponent, rather than one specific moment in which the crosshair "hits". In Mount & Blade it's collision based as well.

Ya, I agree with you. Don't get me wrong, collision detection is a powerful concept, but with Papyrus, it might not live to the fullest potential. At first when I tried to script the hit system via script instead, it didn't work out as intended. I had no control whenever the script will run, so I don't know exactly when the actor got hit. Sometimes he got hit in the exact frame, some other time, he got hit in half a second later (when my horse already ran pass), and it looks really weird. You can see this easy by creating a stagger-onhit script and put it on any actor. In game, you strike him once, and it took the actor half a second to realize that he's been hit, as he plays the stagger animation. If a lot of scripts running at the same time, the delay also be longer, as scripts now are threaded :(

As for speed base, damage modifier, yes, absolutely :) Although I need SKSE to mod/calculate horse's speed on the fly.

And thank you very much for you invitation, I would love to be in such an awesome project. I don't know much, save for a few scripting tricks and lousy animation skill. But I can be of help any way I can :smile: Please PM me and we could discuss it further
User avatar
Tanika O'Connell
 
Posts: 3412
Joined: Fri Jan 26, 2007 1:34 am

Post » Sun May 27, 2012 8:33 pm

At first when I tried to script the hit system via script instead, it didn't work out as intended. I had no control whenever the script will run, so I don't know exactly when the actor got hit. Sometimes he got hit in the exact frame, some other time, he got hit in half a second later (when my horse already ran pass), and it looks really weird. You can see this easy by creating a stagger-onhit script and put it on any actor. In game, you strike him once, and it took the actor half a second to realize that he's been hit, as he plays the stagger animation.

You mean that the OnHit Event sometimes took very long to execute? I really hope that that differs a bit per Event...

In Oblivion I implemented the collision detection by having a trigger zone object in the rough shape of the weapon which I let exactly follow the movement of the weapon during the attack animation. That way I used OnTrigger on this trigger zone weapon Activator to make the game run the correct scripts when the blade collided with the Actor. Papyrus already supports something like this with the MoveToNode command, but the threading of scripts might ruin that as well. Something like AttachToNode would be needed. (edit: I just managed almost the same with the SplineTranslateToRefNode command, works fairly well)

I just tried the OnTriggerEnter Event with a trigger box and it seems to have a consistent instant reaction time, but then again I have almost nothing else running right now. I hope it's in the nature of this Event to have faster reaction times, because afaik collision triggers like this are detected by Havok, and regular collision consequences are never delayed either. There will ofcourse still be a delay in the actual execution of the script, but if at least the Event starts near immediately, that will go a very long way.
User avatar
Stephy Beck
 
Posts: 3492
Joined: Mon Apr 16, 2007 12:33 pm

Post » Mon May 28, 2012 5:28 am

No, the OnHit event doesn't take long to execute. In fact, OnHit almost always return instantly.

What causes the delay in the script are mainly latent functions used inside the OnHit block. Papyrus is threaded, and to call latent function will slow the whole script down. (As that particular latent functions are busying serving other scripts' calls, and your script inside OnHit block will have to wait in-line)

So to have the best performance, we should avoid latent functions as much as possible. Or, write our own function, which takes no delay
User avatar
Jeremy Kenney
 
Posts: 3293
Joined: Sun Aug 05, 2007 5:36 pm

Post » Sun May 27, 2012 6:09 pm

Will you be including spells too?
User avatar
Kira! :)))
 
Posts: 3496
Joined: Fri Mar 02, 2007 1:07 pm

Post » Mon May 28, 2012 4:44 am

How do u get the X-Angle while riding a horse ?
User avatar
Shelby Huffman
 
Posts: 3454
Joined: Wed Aug 08, 2007 11:06 am

Post » Sun May 27, 2012 7:28 pm

Hi. :smile: I love you.
User avatar
Robert DeLarosa
 
Posts: 3415
Joined: Tue Sep 04, 2007 3:43 pm

Post » Sun May 27, 2012 9:34 pm

Hold on a minute, I thought we couldn't add new animations?
User avatar
{Richies Mommy}
 
Posts: 3398
Joined: Wed Jun 21, 2006 2:40 pm

Post » Mon May 28, 2012 7:40 am

I want this mod soooooo baddddddd!!
User avatar
Paula Rose
 
Posts: 3305
Joined: Fri Feb 16, 2007 8:12 am

Post » Mon May 28, 2012 7:30 am

Maybe a way to balance it to prevent for example, the spamming of the kick, is to have them linked to your horse's stamina bar.

Also for the charge, that seems a little overpowered. Is it possible to only activate it if you've gained momentum/sprinted over a minimum distance instead. This way it'll be more limited by the amount of stamina your horse has, and it would prevent just sprinting to activate it in close combat.

I apologize if you already mentioned the horse using stamina for example, I'm just going by what I'm seeing on the first post.
User avatar
sam
 
Posts: 3386
Joined: Sat Jan 27, 2007 2:44 pm

Post » Mon May 28, 2012 7:34 am

I think mounted combat would really benefit from a skill / perk tree.
that might help with some of the balance issues.

Also,
Any updates on where this is? I am really looking forward to it! :cool:
User avatar
Cathrin Hummel
 
Posts: 3399
Joined: Mon Apr 16, 2007 7:16 pm

Post » Sun May 27, 2012 10:38 pm

Oh my gosh, sorry guys :P I have been pulling my hair out on new features of this mod, much that I totally forgot about updating


Hold on a minute, I thought we couldn't add new animations?

Yes, we could, if you wish you could use Fore's custom animation (which adds few hundred animation slots for modders). This mod however, is not depended on Fore's mod

How do u get the X-Angle while riding a horse ?

No, I can't, what me and Maegfaer said earlier was Z-angle. Player's z-angle is not the same as the horse's. It is infact slowly blended toward the direction of the horse's z-angle

I think mounted combat would really benefit from a skill / perk tree. that might help with some of the balance issues. Also, Any updates on where this is? I am really looking forward to it! :cool:

yes, I am thinking of adding few more playable-perk players can choose from existing One-Hand, 2-Hand & Archery Tree. This kinda make Mounted Combat solely for warrior/thief characters. Magic users probably can use staff to play Gandalf :P, and cannot cast spells at all. Although, I will think about adding this in the futures.

Maybe a way to balance it to prevent for example, the spamming of the kick, is to have them linked to your horse's stamina bar. Also for the charge, that seems a little overpowered. Is it possible to only activate it if you've gained momentum/sprinted over a minimum distance instead. This way it'll be more limited by the amount of stamina your horse has, and it would prevent just sprinting to activate it in close combat. I apologize if you already mentioned the horse using stamina for example, I'm just going by what I'm seeing on the first post.

Thank you for the suggestion, I will tweak the charge-ability of the horse so that, it only active after few seconds sprinting :), and make it consumes more stamina per seconds. Horse should not be able to charge if they have less than 40% stamina (i think this is a good number, yes? :P)
User avatar
Richard Dixon
 
Posts: 3461
Joined: Thu Jun 07, 2007 1:29 pm

Post » Mon May 28, 2012 8:31 am

So far, I have make it possible to use spear/lance on horse back, so you can charge with lance and/or do normal attack with spears and such. But I've been puzzling on how to make spears work differently compared to sword/axe. In reality, spears on mounted combat are used to charge then stab enemies. Not used to slash in close combat as swords. Should I make spear does little to no damage when enemies are very close (immediately close to the player)? Or should spears/lances only limited to initial charge? This kinda force the player switch to sword after the charge :(

Other feature that been favored the most is mounted archery. I have spent quite a lot of time on this with not much progress. As you guys know, in vanilla, player cannot turn while mounted, leave alone drawing bows and aiming.

With much scripting, I can detect which direction the camera is turning while mounted, but cannot detect how fast the camera is rotating. Moreover, while mounted, mouse movement actually controls how horse moves (turn left/right while moving), so dynamic aim while on horse is not possible. If I couldn't sort this aiming mechanic out, then mounted archer may not see the light :(.
I already have a set of turn-left, turn-right animations for rider when the bow is drawn. Its just the aiming thing that's been holding me back
User avatar
Queen
 
Posts: 3480
Joined: Fri Dec 29, 2006 1:00 pm

Post » Mon May 28, 2012 4:53 am

I would be happy to download this mod right now without archery just to be able to use a sword on horseback :)
User avatar
sarah simon-rogaume
 
Posts: 3383
Joined: Thu Mar 15, 2007 4:41 am

Post » Sun May 27, 2012 8:51 pm

Maybe you could detect the direction the player is looking at with various ojects making a circle around the player and using the hasLOS command to determine the angle by which of them are in the line of sight of the player (remember that the player can use HasLOS on objects).
User avatar
Chloe :)
 
Posts: 3386
Joined: Tue Jun 13, 2006 10:00 am

Post » Sun May 27, 2012 8:12 pm

I would be happy to download this mod right now without archery just to be able to use a sword on horseback :smile:

Thank you, it will be available once SKSE is out :smile: (which is...very soon :tongue:)


Maybe you could detect the direction the player is looking at with various ojects making a circle around the player and using the hasLOS command to determine the angle by which of them are in the line of sight of the player (remember that the player can use HasLOS on objects).

Ya, I could detect which directions the player's camera is looking in my script. The problem here is, the player can actually move the horse by moving the mouse (especially when the horse is walking/running). In such case, there is no independent camera rotations for the rider. So there is no real dynamic aiming with the mouse. The best I can come up with is allowing player to shoot arrows 90* sideway and 45* from where the horse is looking.
User avatar
Farrah Barry
 
Posts: 3523
Joined: Mon Dec 04, 2006 4:00 pm

PreviousNext

Return to V - Skyrim