Jump to content

Modding help: Player Controls


MicManGuy

Recommended Posts

So I'm trying to make my first mod and i need help finding the info on where to start.

 

I'm completely new to this and I can't find any resource for editing user events. Basically I want to change the player controls.

 

I want equipping from the quick (favorites) menu to default to putting it in the left hand first as opposed to the right. I want all other stuff to operate in reverse as well. Basically this will be a left-hander mod. But I'm doing it for another reason: shield mage controls. This way, I can keep my shield equipped and switch my spells. Dunno how re-equipping a shield from dual cast will work... but i know there will be a workaround.

 

I've tried doing searches in several scripting wikis for "controls" "user event" "left hand" "equip" etc. and I can't find the functions I need to call in order to make this thing. The easiest fix would be to alter the source functions. It'd be basically no work at all if i could do that. But something tells me that's impossible and I'll have to make a workaround.

 

Please, any help would make a huge difference. I just need a starting place to start looking. I spent 3 hours looking over libraries with nothing to show for it.

Link to comment
Share on other sites

I'm no genius in scripting, I will say right here. But I have a suggestion. It has flaws, but it could work. Set it so that the game's hands are reversed, so if you equip right it equips left, and the other way around. I know it has many unwanted errors, but that is my suggestion.
Link to comment
Share on other sites

I'm no genius in scripting, I will say right here. But I have a suggestion. It has flaws, but it could work. Set it so that the game's hands are reversed, so if you equip right it equips left, and the other way around. I know it has many unwanted errors, but that is my suggestion.

Ya that's basically my plan. I just don't know what those functions are called. Not to mention that I haven't been able to find ANY information on making the game respond to player input (aside from how to remap controls with a txt document - for which you don't even need scripting).

Link to comment
Share on other sites

So I found EquipItem() for Papyrus (which, in itself, apparently does not work properly). But all the wiki tells me is its declaration. I have no information about what it actually does within the function itself so I can make my own custom function.

 

Function EquipItem(Form akItem, bool abPreventRemoval = false, bool abSilent = false) native

{

// I want to know what's in here!!!!

}

Edited by MicManGuy
Link to comment
Share on other sites

equipitem() function is used on actor script as follows

 

for example if you want player to equip sword then you define like this

Weapon Property Sword Auto

 

Game.GetPlayer().EquipItem(Sword)

Yeah I know that. I just put the declaration up above. What I want to know is how the native function does that. I want to either edit the native function or make a custom one of my own. Basically I imagine it to look something like this:

 

//I'm leaving out abPreventRemoval and abSilent because I'm lazy

 

Function EquipItem(Form akItem) native

If righthand = full

If lefthand = full

ConsoleUnequipItem(leftHand)

EndIf

ConsoleEquipItem(akItem, leftHand)

EndIf

Else ConsoleEquipItem(akItem, rightHand)

EndFunction

 

So ya. This is my psudocode for it as is. The idea would be to switch the leftHand and rightHand for the fix. I don't know the real commands that would be encased in my hypothetical ConsoleEquipItem() or i could just write a custom script myself. Of course, then, I wouldn't know how to make the script wait for a user event (using a quickslot key).

Link to comment
Share on other sites

Well I figured out in game that if you specifically tell the game to equip a shield to the right hand, it will just equip it to the left. So that's nice. I don't have to worry about which hand the shield is being told to go to.
Link to comment
Share on other sites

  • Recently Browsing   0 members

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