Jump to content

Creation Kit\TesVedit: How do I bind an animation to a hotkey?


Desire for this concept  

1 member has voted

  1. 1. Would you like to see a mod that adds special, lore friendly combat moves?

    • Yes
      1
    • No
      0


Recommended Posts

(Accidentally posted the same thread on Skyrim General Discussion)



Hello there,



Ever since the game's release I've been thinking about a small yet effective addition to Skyrim's combat system. It is simply to apply special moves in combat. Now, I am not speaking of the equivalent of common OP special attack mods like Tk Combat or any of the (usually) Japanese ones. What I have in mind is a "tactical" approach that stays true to physics and realism. All I want is to bind a hotkey that will activate a specific swing animation (based on killmove animations) bearing a simple special effect: stagger, slight bleed, stamina drain, etc... and that will change according to the movement direction.


I am pretty much detailing exactly how Tk Combat works. My problem with Tk Combat, however, is that it takes an unlorefriendly approach to the system and is as aforemention quite OP.



At first what I did to fulfil my desire is to edit Tk Combat.esp in TesVedit and remove all bound MGEF from the spell entries. What I got now is just the animations (which are a bit clunky with a mind toward effectiveness, as designed intentionally by Tk, I guess), but no special effects. I wanted to change the animations to other ones but as they are tied to a script it is impossible for someone of my modding skills.



My next attempt was with the mod Powers of the Dragoon, which adds a few lesser powers all playing specific animations with, again, OP effects. The difference between the two mods, to my luck, was that this one had its animations attached without custom scripts, but as entries with a "charge idle" script.



That was a step forward, but not without its shortcomings. For one, instead of an easy and effective hotkey to bind 5 specific attacks, I need to change powers manually, which delays combat fluency for obvious reasons. Second, there is a constant requirement for 70% available magicka to play the animations. I managed to remove the consumption effect but there is still a condition for the PC to possesed at least 70% magicka.



What I ask of you guys is... Teach me. I am not a modder. I never published a mod. If I will manage to build this simple mod (shouldn't take much time) I would love to publish it for everyone to enjoy. I think it could really amplify player immersion in combat. Credit, where it is due, will be given.



What I want to know:



How to attach a spell to a hotkey.


Have it only work when a specific weapon type is equipped AND unseathed.


Have it consume stamina (I am aware that this one is tricky)



Of course there are other things like special effects (sparks, AOE on melee, etc...) but I think those I can guess by myself. The ones above, though, I tried to apply for a long time without result.




It's important to remember: I AM NOT A MODDER. I have slightly above minimal knowledge in TesVedit and CK, and zero knowledge in scripts. If I should get help, it's gonna have to be very specific.




Thank you guys :smile:



Edit:



Realized how to set up a stamina consumption via Script Compiler


Really all that remains is the custom hotkey.


Edited by Wylfred
Link to comment
Share on other sites

a small start ... (very small)

 

Event OnInit()
RegisterForKey(49)
EndEvent
Event OnKeyUp(int keyCode, float holdTime)
if keyCode == 49
- INSERT CODE HERE -
;Debug.MessageBox("KeyPressed N")
endif
EndEvent
Event SOMTHING
UnregisterForKey(49)
EndEvent
Link to comment
Share on other sites

Great! That's going to set up a hotkey, if I am not mistaken. What we need now is a direction modifier. Thank you.

 

I already covered up the attacks themselves. They work great as spells that charge animations (effect on hit included). I tried to use them with Hotkeys++ and they work as intended.

 

So yup, the basic concept is very simple and is mostly done. Once I realize how to apply modifiers (with anyone's help) I'll implement that feature as well and proceed to polish the concept, adding perk requirements and overall balance.

 

Edit:

 

I also need the function to remove specific amount of stamina on use. Right now I have a function that removes percentages, which means that even if PC has 1000 it will remove, say "20"=200 stamina upon use.

 

As follows:

 

if PlayerActor.getAV("stamina") as float >= 0.20

 

PlayerActor.DamageActorValue("stamina", (PlayerActor.GetActorValue("stamina") as float * PowerCost))

 

What needs to be changed here make it acurate values and not percentages?

Edited by Wylfred
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...