Jump to content

Photo

How to make spells that are only available depending on equipped weapon type?


  • Please log in to reply
9 replies to this topic

#1
megadeth1818

megadeth1818

    Newbie

  • Supporter
  • Pip
  • 11 posts

Im making a mod that allows the player to use certain spells depending on what they have equipped. for example if you have a 1 handed weapon and an empty hand you will be given access to certain powers. if you change to having a 2 handed weapon you will be excluded from using the 1 hand/ empty hand powers but will have access to a separate set of powers exclusively for 2 handed weapons. I already figured out a way to do this but Im not sure its ideal. What i did was create a lesser power, that, when activated grants the effects i want. in the effect list i set conditions that use GetEquippedItemType. this does work as expected but im wondering is there a better way to do this?



#2
TyburnKetch

TyburnKetch

    Enthusiast

  • Members
  • PipPip
  • 198 posts
Honestly, just getting ANYTHING to work as you would hope for is a massive result.

I probably would have gone the route you have gone too. If it works... go with it :)

What other ways were you thinking about?

#3
megadeth1818

megadeth1818

    Newbie

  • Supporter
  • Pip
  • 11 posts

I was thinking of using perks, but the thing is I really have no idea how perks work. ive seen some tutorials on perks but theyre all related to adding stuff to skill trees. i dont want to modify the skill trees at all.



#4
cumbrianlad

cumbrianlad

    Right turn, Clyde!

  • Premium Member
  • 1,313 posts

Pretty sure you can do this as a perk. There are conditions for weapons, perk owner and target.

 

Take a look at crFalmerPoison. Double click the perk entry and you'll see the spell and the condition that the weapon being used must have weapon material Falmer or FalmerHoned

 

Your conditions will work here just like the way you did it, but probably in the perk owner tab.



#5
Rasikko

Rasikko

    The Arbiter of Time

  • Members
  • PipPipPipPip
  • 1,227 posts

Yeah you can filter spells by their keywords and then conditionalize access through other keywords/other means.

 

Perks are underrated. You can do some seriously BROKEN crap with perks lol.

 

https://www.creation...erk_Entry_Point


Edited by Rasikko, 13 August 2020 - 05:51 PM.


#6
megadeth1818

megadeth1818

    Newbie

  • Supporter
  • Pip
  • 11 posts

OK it looks like perks are gonna allow me to do everything I want to do. the question is how do I actually add perks to the player without using skill trees? if possible i'd like to leave the skill tree completely untouched



#7
Rasikko

Rasikko

    The Arbiter of Time

  • Members
  • PipPipPipPip
  • 1,227 posts

Can use a quest script and then Game.GetPlayer().AddPerk() in Event OnInit()

 

I think a non scripted was is to add an ability that can apply a perk.


Edited by Rasikko, 13 August 2020 - 06:56 PM.


#8
cumbrianlad

cumbrianlad

    Right turn, Clyde!

  • Premium Member
  • 1,313 posts

Rasikko,

 

I think the idea of using the 'Perk To Apply' in a magic effect is a really good one. It's certainly used in vanilla, so it works. I just did a bit of digging around and this is exactly how 'Sinderion's Serendipity' works, as an example for the OP. (Search NN01 in spells, magic effects and perks to see how it's done). The ability spell uses the magic effect and the 'Perk To Apply' in that is the actual perk to make twice as many potions with a 25% chance.



#9
Rasikko

Rasikko

    The Arbiter of Time

  • Members
  • PipPipPipPip
  • 1,227 posts

Ok that really eliminates the need for a script at all, since you can just use a quest that adds the ability from the alias. I'll be sticking to that from now on when adding perks.


Edited by Rasikko, 14 August 2020 - 05:25 PM.


#10
cumbrianlad

cumbrianlad

    Right turn, Clyde!

  • Premium Member
  • 1,313 posts

Yep.

 

I wouldn't have thought of looking if you hadn't suggested adding a perk from an ability.

 

It's certainly what I'll be doing now.






Page loaded in: 0.975 seconds