JoeKa8 Posted January 3, 2016 Posted January 3, 2016 Situation is this: I did a mod, in which every normal weapon swing decreases Stamina by 10. This is basicly accomplished by a perk, which adds an ability, which decreases stamina by 10 when the condition "IsAttacking=1" is met. The mod works.(here by the way a older version of my mod http://www.nexusmods.com/skyrim/mods/59447/? ) What I wanted to do now is making the Amount of Stamina, which every Weaponswing consumes, scaling with the Total Amount of Stamina, so rather then just consuming a flat 10 Stamina it should consume 5% of max-Stamina, because right now it is very hard in the beginning and insignificant on very high levels. (Raising Staminapool would still benefit, because it will increase Staminaregen) What I tried is setting up a new Perk Entry. The Entry Point was "Mod Spell Magnitude", under Conditions for Spell I've added "GetisID" for the ability, which does the Staminadecrease.As Function I tried using "Multiply ActorValue Mult" and for testing purpose simply "Multiply Value", but to put it simple: it didn't work. The Magnitude of the Ability ingame is not influenced.I also tried it without conditons and EPMagicSpellhasKeyword + New keyword added to the magic effect of the ability.I have also tried to to use "Mod Incomming Spell Magnitude" instead of "Mod Spell Magnitude", didn't work either Is it possible to edit the Magnitude of an ability by Entry Point without scripting? (or maybe by another magic effect / ability?) And if it is possible ... is ActorValue Stamina really my max Stamina or is it my current Stamina?
MichikoUnknownFox Posted January 3, 2016 Posted January 3, 2016 Current stamina. If you want the max value use GetBaseActorValue. I think those perk entry points only work at the moment the spell is applied, not when it's already on you. The best way to do this is via script, but I take it you don't want to do it via script (and I personally don't recommend any more scripted combat mods due to script lag during combat). As an alternative, a tedious but effective way to do it instead, since it's supposed to always be on the character, is set up multiple effects on the same ability. For example:One for Stamina 10 with the normal condition of IsAttacking == 1.One for Stamina 10 when GetBaseActorValue Stamina >= 120.One for Stamina 10 when GetBaseActorValue Stamina >= 140.And so on. The result will be every attack will always drain 10 Stamina (per second btw; that's how it works. So slower attack speed = more stamina drained). If he has 135 Stamina, he'll 10+10 Stamina damage per second while attacking, because it's >= 120 but not yet at 140. Again it's very tedious to do it this way so probably not ideal, but it works.
JoeKa8 Posted January 3, 2016 Author Posted January 3, 2016 (edited) Thanks for your reply. Yes, I suspected it is current stamina -.- ... entry point does not offer BaseActorValue as FunctionMultiplier .. but looks like it won't work anyways xD I already thought of the same solution, which you suggested, and wouldn't mind setting this up, but having additional 10-20 MagicEffects on every weaponswing wouldn't be my first choice, therefore I was hoping for a method to modify the magnitude of the one Effect :smile: Maybe I instead I edit how the Staminapool develops through Gameprocess ... something like giving a bonus of 100 to total Stamina and reduce Levelup-Staminabonus to 5, this would reduce the margin, in which this effect operates, so it wouldn't be that hard in the start and wouldn't get that insignificant later on ^^ ... downside of this would be the changed balance of +staminaEnchantments .. they would have to be halved too xD Ha, and by the way, yesterday I installed your NPC pocketmoney mod, thanks for that :D Edited January 3, 2016 by JoeKa8
MichikoUnknownFox Posted January 3, 2016 Posted January 3, 2016 Yeah I dunno how to modify an effect that already exists on the character either. I tried doing something similar before and this was the best solution I could come up with without scripting it. The game is actually pretty fast when it comes to perks and magic effect calculations. I made some very complicated spells before and there was no noticeable lag; then again even some complicated per-frame calculations like in my other mods for the older games (FO3 and Oblivion especially) there was no noticeable lag. Papyrus is just weird because it's not actually built into the engine, so the virtual machine, which handles the external scripts, gets some lag when too many things are happening at once. Ha, and by the way, yesterday I installed your NPC pocketmoney mod, thanks for that :D Haha glad you like it. I was actually thinking about making a version 2 of it, with in-game adjustable values. But I'm working on another mod currently and I wanna finish that first before revisiting my other mods.
JoeKa8 Posted January 3, 2016 Author Posted January 3, 2016 Yes, in my personal Perk Overhaul I have many different Attackspeedmults (increases and decreases) which stack together and some of them permanently change while beeing in combat, never had a problem there either. I think I will use this method, thanks again ^^
lofgren Posted January 3, 2016 Posted January 3, 2016 I have found for my machine that I only get a framerate hit from ability conditions if there are 6-8 complex conditions running on about 8-10 actors simultaneously in a highly detailed environment (like a city). For entry points I was able to have more than a dozen conditions before I encountered any framerate hit, and even then it was only when opening my inventory if I had at least 10 or more weapons and armor pieces (because damage, armor rating, and armor weight are calculated based on your current perks when you open the inventory).
JoeKa8 Posted January 4, 2016 Author Posted January 4, 2016 (edited) Ah, hi lofgren again ^^ (I'm the gold-xp guy :tongue:) Yes, I used that method. Though I did not just stack MagicEffects in the ability, instead I made 8 different effects, and only one is acutally applying based on your current maxStamina. Felt like a cleaner setup xD(i.e. Magnitude 10 when >=100 & < 125) And another thing regarding ConditionFunctions for others who might be reading this:- GetActorvalue -> Your Current Amount of Stamina (or other ActorValues, like Skills, Playerlevel etc.)- GetBaseActorValue -> Your MaxStamina, but without enchanted Equip or Buffs/Debuffs, which your Character has on it- GetPermanentActorValue -> Your MaxStamina including Enchantments & Buffs/Debuffs (The one I chose)- GetActorValuePercent -> The percentage of your current Stamina in Relation to your maxStamina as a Faktor between 0 & 1 (so 0.5 means 50%) (though I'm not sure if 100% refers to BaseActorValue or PermanentActorValue, but I assume it is Permanent) Edited January 4, 2016 by JoeKa8
Recommended Posts