In game controls hardcoded?

Post » Mon Jun 18, 2012 10:33 pm

From those who have dived in far enough, do you know if the game's control -> specific actions is hardcoded or not? I have a mod idea I wanna work on a little later, but I need to know what my limitations are. If anyone knows already it would help tons!

For example, can I make the Run button do something different thats not specific to running or any other button...like rolling? Or can I change how the controls work by adding actions onto specific buttons? Or is it like Run button always does what run button does (because its hardcoded) ?
User avatar
matt oneil
 
Posts: 3383
Joined: Tue Oct 09, 2007 12:54 am

Post » Tue Jun 19, 2012 3:51 am

From those who have dived in far enough, do you know if the game's control -> specific actions is hardcoded or not? I have a mod idea I wanna work on a little later, but I need to know what my limitations are. If anyone knows already it would help tons!

I think they are hardcoded yeah, at least I didn't find them anywhere. What you can do however (look at the various versions of my dual wield mod in signature if you want examples) is change conditions, priorities and add new versions of ''Idles'' (under Gameplay --> Animations in the CK). To me the system seems to work like this:

1) The player presses a button. If this is one of the controls, it calls for a specific ''Idle''. You can't change which idle is called for (pressing the right hand button will always call for the RightHandAttack Idle), but you can change what happens afterwards.

2) This Idle is actually a tree of various Idle Objects. For example, Sprintstart has 3 different idles with different conditions: the sneak roll, the blocking shield charge (those 2 are from perks) and the normal sprint. You can add more with different conditions and whichever is first in the list (you can change prioirities as well) which also has all conditions satisfied, will happen.

3) When an Idle Object is chosen based on priority and conditions, you it sends for a specific event to happen. This event is listed in the dropdown menu which you see in the right side of the Idle Objects window and can be changed!

You can also add new Idle Objects to the end of some tree (so it gets no priorities) and give it no conditions (be careful though, the tree itself might also have conditions) and use that for an entirely different event and call it from a Papyrus script using PlayIdle(). However, not all events always work. If you try to make an actor who is staggered block through this way, it just won't work, because the animation staggering doesn't seem to allow anything to happen (other than jumping)
User avatar
rheanna bruining
 
Posts: 3415
Joined: Fri Dec 22, 2006 11:00 am

Post » Tue Jun 19, 2012 10:21 am

I think they are hardcoded yeah, at least I didn't find them anywhere. What you can do however (look at the various versions of my dual wield mod in signature if you want examples) is change conditions, priorities and add new versions of ''Idles'' (under Gameplay --> Animations in the CK). To me the system seems to work like this:

1) The player presses a button. If this is one of the controls, it calls for a specific ''Idle''. You can't change which idle is called for (pressing the right hand button will always call for the RightHandAttack Idle), but you can change what happens afterwards.

2) This Idle is actually a tree of various Idle Objects. For example, Sprintstart has 3 different idles with different conditions: the sneak roll, the blocking shield charge (those 2 are from perks) and the normal sprint. You can add more with different conditions and whichever is first in the list (you can change prioirities as well) which also has all conditions satisfied, will happen.

3) When an Idle Object is chosen based on priority and conditions, you it sends for a specific event to happen. This event is listed in the dropdown menu which you see in the right side of the Idle Objects window and can be changed!

You can also add new Idle Objects to the end of some tree (so it gets no priorities) and give it no conditions (be careful though, the tree itself might also have conditions) and use that for an entirely different event and call it from a Papyrus script using PlayIdle(). However, not all events always work. If you try to make an actor who is staggered block through this way, it just won't work, because the animation staggering doesn't seem to allow anything to happen (other than jumping)

On this note then, might it be possible to swap the player stagger with the NPC stagger? That way you cant keep attacking while staggered, just like NPCs can't?
User avatar
Carlitos Avila
 
Posts: 3438
Joined: Fri Sep 21, 2007 3:05 pm

Post » Mon Jun 18, 2012 10:17 pm

On this note then, might it be possible to swap the player stagger with the NPC stagger? That way you cant keep attacking while staggered, just like NPCs can't?

Actually there's no reason to swap them. If you look at the conditions for the Player stagger, you'll see the conditions are:

GetIsID Player == 1 ORGetInFaction ForceFullBodyStagger == 1

So all you need to do is add the player to the ForceFullBodyStagger faction. In fact my deadly combat mod does that already :P
User avatar
Paula Ramos
 
Posts: 3384
Joined: Sun Jul 16, 2006 5:43 am

Post » Tue Jun 19, 2012 2:26 am

Actually there's no reason to swap them. If you look at the conditions for the Player stagger, you'll see the conditions are:

GetIsID Player == 1 ORGetInFaction ForceFullBodyStagger == 1

So all you need to do is add the player to the ForceFullBodyStagger faction. In fact my deadly combat mod does that already :tongue:

So in your mod, the player cant attack while staggered?
User avatar
Charles Weber
 
Posts: 3447
Joined: Wed Aug 08, 2007 5:14 pm

Post » Mon Jun 18, 2012 8:20 pm

So in your mod, the player cant attack while staggered?

Nope. But it also does a lot of other stuff so if you're just looking for that small change you'd better make it yourself quickly :tongue: (unless you like the rest of my mod as well :P)
User avatar
Ricky Rayner
 
Posts: 3339
Joined: Fri Jul 13, 2007 2:13 am


Return to V - Skyrim