Jump to content

Altering combat styles with scripts?


Elleh

Recommended Posts

Hi guys. I have yet another noobish question involving scripting. Hopefully this one is pretty straight forward.

 

I'm trying to figure out how to alter my follower's combat style on the fly using some sort of spell or power. I see that SKSE has some super useful looking functions but aaahhh..... I don't quite understand how to use them. Probably because I barely understand papyrus at all, yet. Blagh.

 

First, can these functions be called from within a Magic Effect script? If so..... uh.... how? I don't even know if/how a Combat Style could be defined as a property. On the CK wiki, the SetCombatStyle page says that "SKSE does not provide CombatStyle properties as of yet." Sooooo.... how would one be capable of using the combat style script at all? Would there be a way to use formlists like the pages for "GetCombatStyle" and "SetCombatSyle" suggest? I'm sure it's something fundamental here that I am not understanding.

 

My alternative would be to use the aforementioned SetCombatStyle function and have the script read into a list of predetermined styles. I feel pretty confident I could work that much out as thankfully the wiki page gives an example. But I don't really want to do that unless I simply cannot find a way to alter the combat style directly. It would give me waaaay less flexibility. For example: I want to be able to order him to fight with only a bow, only a sword, or a combination of both (by altering equipment score multipliers). I want to also be able to tell him to fight offensively or defensively (by altering offensive/defensive multipliers). And I want to be able to do these things independently from each other. With powers. Yes? Or am I going about this all wrong? Should I try something other than combat styles?

Link to comment
Share on other sites

Hi guys. I have yet another noobish question involving scripting. Hopefully this one is pretty straight forward.

 

I'm trying to figure out how to alter my follower's combat style on the fly using some sort of spell or power. I see that SKSE has some super useful looking functions but aaahhh..... I don't quite understand how to use them. Probably because I barely understand papyrus at all, yet. Blagh.

 

First, can these functions be called from within a Magic Effect script? If so..... uh.... how? I don't even know if/how a Combat Style could be defined as a property. On the CK wiki, the SetCombatStyle page says that "SKSE does not provide CombatStyle properties as of yet." Sooooo.... how would one be capable of using the combat style script at all? Would there be a way to use formlists like the pages for "GetCombatStyle" and "SetCombatSyle" suggest? I'm sure it's something fundamental here that I am not understanding.

 

My alternative would be to use the aforementioned SetCombatStyle function and have the script read into a list of predetermined styles. I feel pretty confident I could work that much out as thankfully the wiki page gives an example. But I don't really want to do that unless I simply cannot find a way to alter the combat style directly. It would give me waaaay less flexibility. For example: I want to be able to order him to fight with only a bow, only a sword, or a combination of both (by altering equipment score multipliers). I want to also be able to tell him to fight offensively or defensively (by altering offensive/defensive multipliers). And I want to be able to do these things independently from each other. With powers. Yes? Or am I going about this all wrong? Should I try something other than combat styles?

 

 

Ahh the Combat style script, it's fairly simple the set and get functions correspond with the fields within the combat style forms within creation kit. but you would still have to use a formlist and recast to a combatstyle once retrieved.

 

So for example:

 

Lets take the csChaurus combat style and place it into a formlist which... lets call csFLST, then add csFLST as a property of the script in which you want to use the combatstyle functions.

then collect the combatstyle from the list:

Combatstyle csStyle = (csFLST.Getat(0) as Combatstyle)

and lets say we wanted to change the offensive multiplier to 0.95:

csStyle.SetOffensiveMult(0.95)

The Combat Style page is a good place to look at what actual multipliers do if that's what your having trouble with as well since the functions are similarly named to the stats that they modify.

 

Good Luck with it.

Link to comment
Share on other sites

Oooooooooh, I see how that works! So it really was just that simple. Thanks BotOwned!

 

So I guess the hardest part will be figuring out what combo of multipliers is best. But that will just be a matter of reading and experimenting.

 

This all seems a lot more doable. ^_^

Link to comment
Share on other sites

  • Recently Browsing   0 members

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