Jump to content

Multiplying Attributes


Roadhouse699

Recommended Posts

I'm trying to make a mod that limits the magical ability of warriors and thieves and the physical ability of mages, so that the Dragonborn is less omnipotent. I want to reduce the player's magicka/stamina to 20% based on the standing stone they choose, but I've been unable to find any possible way to multiply attributes. Using spells and magic effects, the only operation you can perform on attributes is addition and subtraction. Using perks, you can multiply values, but for some ungodly reason "Modify Actor Value" isn't an entry point.

Ignore this thread, I've found an alternative.

Edited by Roadhouse699
Link to comment
Share on other sites

I think I've figured out how to do it, but I'm yet to test it. Here's what you have to do:

 

1. Make a magical effect - a self-affecting, fire-and-forget, peak value modifier that affects the desired attribute. Flag it as "detrimental" and "no area". Make a keyword for it.

 

2. Make a spell using your magical effect and set the magnitude to 10.

 

3. Add an entry to the desired standing stone perk - a "modify spell magnitude" entry point. Use the "Multiply Actor Value mult" function on it. Set the actor value to the desired attribute and the other value to 8.00. Put an "EP_MagicSpellHasKeyword" condition on it. Run it on the subject, set the value to the keyword you made for the magical affect.

 

4. Add another entry - add an ability, set it to the spell you just made.

 

False Alarm, that doesn't work.

I'm going to guess there's a way to do this in Papyrus with the "GetActorValue" and "SetActorValue" functions, but I don't know how I would take the returned value from "GetActorValue", multiply it by 0.2, and then put the returned value into "Setactorvalue".

 

If there's anyone out there who understands Papyrus better than me (which is to say, most modders), please lend a hand.

Edited by Roadhouse699
Link to comment
Share on other sites

You will not find more pro (as in approval not professional) script mod creator than I am. To me every modding problem looks like a logic gate.

 

But I will tell you do not want to try to do this with a script. Back before multithreading moding actor values was tricky and even the best modders found the actor value could get messed up no matter how careful you were. Sometimes scripts would get interrupted or they would just not mix well with other mods scripts that were trying to do the same thing.

 

So we would put some kind of actor value reset code in the mod. There were even mods that were only for fixing messed up actor values. Today with multithreading, wow I just do not want to even think about it.

 

 

Anyway there is a PERK entry for multiplying actor values. I am not sure how you missed it. However it is tricky to use because they will stack if you are not careful and you can end up with increasing the values rather than reducing them like this:

 

Perk A 0.5 WITH Perk B .75 = 1.25 percent NOT 0.375 percent.

 

Spells are better for this because the ones that are made correctly will not stack by dispeling similar spells before applying their own effects.

 

You should look at all the magic effects in the CK and see if there is a spell that does a similar thing (reduces some actor value). Then you can use this as a guide.

Link to comment
Share on other sites

  • 1 year later...
  • Recently Browsing   0 members

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