Jump to content

Custom "Grip" Spell Script


Manus812

Recommended Posts

I have been trying to create a custom spell mod but have run into a wall, but first let me explain the concept:

I am trying to create a spell that, when cast, changes the grip of the current weapon. Ex - Steel Longsword & Shield, Cast Spell, Now Steel Longsword is used in 2 hands (no shield).

So if you are familiar with Dark Souls' weapon system or the "Unlocked Grip" Skyrim mod, then you know what I am trying to make.

I have estimated that I have to make 2 spells (1 for blade, 1 for blunt) But I don't know how to achieve this through scripting. What I do know is that I have to make a custom spell script, attach it to a spell(s) and have spells automatically added to inventory.

I have also guessed that the way this will work is by having the spell change the weapon type (in Creation Set) from "BladeTwoHand" to "BladeOneHand" and Vice versa.

Also some implementation of damage values. (2h in One Hand grip gets lower damage but get advantage of shields / 1h in Two Hand grip gets higher damage but no shield)

Link to comment
Share on other sites

is this working? i mean if you change the weapon type (only)in cs -if it does ok the OBSE comands you need is getweapontype and set weapontype -

 

but i think the weapon type information is stored in the nif file (mesh)

so you need to check out the NifSE documentation

http://www.nexusmods.com/oblivion/mods/21292/?

there is a script in Unessesery violence mod - uvswitchgrid- that does that (i think)

Anyway these things are way out of my knowledge - i hope i helped

Link to comment
Share on other sites

Thanks, I'll try it. I guess I forgot to say when I meant "run into a wall" I mean that I don't have much scripting experience :sweat: So I had no idea how to start. And I did try out Unnecessary Violence III specifically for the grip change feature, but could never get it to work :P Because I could never get it to work, I decided to try and make a standalone mod using a spell than hotkeys.

Link to comment
Share on other sites

Alright I tested out OBSE script commands and created the first Alpha script. It is as follows:

Scn GripChangerBlade
begin ScriptEffectStart
ref weapon
short weapontype
set weapon to player.GetEquippedObject 16
SetWeaponType 1 weapon
end
Tested with a 1H sword, when cast the Sword went into two hands, but the Model was still on the Character's hip. Damage and enchantment carried over, but not the mesh (weap/sheath) Also it successfully transitioned a 1H to a 2H grip, but could not get it back to 1H upon recasting the spell.
Link to comment
Share on other sites

Alright I tested out the concept again utilizing 2 spells, One spell changes 1h to be gripped in 2hands. The other is opposite. It works, sort of.

 

I hold a 1h sword(drawn-wont work if just equipped), cast spell, and the sword goes into the 2hand grip animation style. However all 1hand powerattacks still occur in 2hands. And if you have a shield equipped with a 1hand when casting, the shield will be used with the 2 hand weapon (Hold sword in t hands ans swing like 2hands, but can still block with shield)

 

Holding a 2h claymore, cast spell, it is now in 1hand and can use a shield with it, however cannot use any powerattacks

 

The use of 2 spells is clunky and very much still in alpha phase, If anyone wants to help me and test it out, I can upload an Alpha file for testing.

Mod Uses OBSE

 

EDIT: Also if Im using the same weapon as an NPC (eg SIlver Longsword) and switch grips, the NPC will do it too.

Edited by Manus812
Link to comment
Share on other sites

 

Holding a 2h claymore, cast spell, it is now in 1hand and can use a shield with it, however cannot use any powerattacks

 

 

This wont help with scripting, but that is actually kinda realistic.

You can wield a 2 handed weapon with one hand, but you can't be as successful as when you use 2.

 

(of course we're talking about a game with talking lizards, magic, and Patrick Stewart - so realism is a silly consideration)

;)

Link to comment
Share on other sites

Yeah I thought of that, when recast from this state You can hold the claymore back in 2hands but with the shield still there and can block with it. You can hold a claymore in 2hands with a shield still on one hand because you can grip the handle and grip of the sword. Here are some pictures showing some of the features. There is still lots of bugs, such as the model not showing if you cast the spell while not having it drawn.

20160416172700_1.jpg20160416172950_1.jpg

Link to comment
Share on other sites

  • 1 month later...

Alright so I've finally set aside some time to develop this. Right now this is what I want the OBSE script to do:

(This is for 1hand sword to 2hand sword grip)

 

scn GripChangerBladeOne

 

When ↓ (down arrow) is pressed

Any shield that character might have equipped be unequiped

Any 1hand blade the character has equipped will be transitioned to a 2hand grip

 

So far this is the script I'm working with:

 

Scn GripChangerBladeOne
begin ???
if iskeypressed208
return
else
set curkey to 0
endif
if iskeypressed2 208
ref weapon
short weapontype
set weapon to player.GetEquippedObject 16
SetWeaponType 1 weapon
set curkey to 208
endif
the problem is that the above script doesn't work and need some external help to make it work as I desire.
Edited by Manus812
Link to comment
Share on other sites

  • Recently Browsing   0 members

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