LittleRaskols Posted September 22, 2015 Share Posted September 22, 2015 What I mean is, if I attach the Magic Effect to an Ability called by a Perk, say, and it is set to deliver to "Self," would the target and the caster both be "self" (i.e. the perk holder)? Link to comment Share on other sites More sharing options...
LittleRaskols Posted September 22, 2015 Share Posted September 22, 2015 By the way, did some experimenting and determined that this is wrong: (I do know that adding a "GetDirection" condition to the spell/ability calling the effect does nothing. It's as if WeaponSpeedMult itself only cares about forward movement.)What it "cares about" so to speak is the IsMoving condition. If I do not include that, and use GetDirection for whatever I want, then it works as I expect it. I may end up needing scripting anyway though because it is not clear what happens when the player has the Quick Shot perk. At that point, I think the bug will make an effect passing say 0.5 to WeaponSpeedMult go from halving the draw speed to increasing it by 50% in addition to what Quick Shot does anyway (130%). Link to comment Share on other sites More sharing options...
MotoSxorpio Posted September 22, 2015 Share Posted September 22, 2015 By the way, did some experimenting and determined that this is wrong: (I do know that adding a "GetDirection" condition to the spell/ability calling the effect does nothing. It's as if WeaponSpeedMult itself only cares about forward movement.)What it "cares about" so to speak is the IsMoving condition. If I do not include that, and use GetDirection for whatever I want, then it works as I expect it. I may end up needing scripting anyway though because it is not clear what happens when the player has the Quick Shot perk. At that point, I think the bug will make an effect passing say 0.5 to WeaponSpeedMult go from halving the draw speed to increasing it by 50% in addition to what Quick Shot does anyway (130%).I'm not sure what you have going here. Could you get a few thumbnails for where in CK or whatever tool you are doing this? Not to be rude or anything, but its hard to visualize your intention and direction without a screenie or two and some details on your goal, am I right doodmon? :smile: But, from what I can decipher of your intent, does look like at least one script extended magic effect could be needed. I've only used one perk for personal mods. Makes the sword in hand have higher critical chance, adds a perk if equipped. Simple really. The perk extends critical, critical damage on random, and adds a chance critical with a bash when not using a shield. Pretty nifty really. And, with a spell added to the OnDeath in CK for the weapon, instead of just doing bleeding damage (the only magic effect visible, not much 6 for 6 seconds) it does Bleed Out...adds a constant effect ability where they lose health until dead...when a critical hit is actually made. Makes any spell caster use up as much restoration as they can, hehe. I call that a mortal wound, right? There's like 4 stages of tempering to get elemental, undead bane, soul trap type enchantments. Even works on the enchanter...except for the script on the weapon for that perk. Still working on that. Stuff like this can make for a much bigger-than-you'd-expect-plugin. I apologize for rambling, pain meds seem to be working. Good luck. :dance:Sorry to ramble. :blush: Just trying to say you can use pretty simple scripts to do what you want...depending on exactly what. :D Link to comment Share on other sites More sharing options...
LittleRaskols Posted September 22, 2015 Share Posted September 22, 2015 (edited) By the way, did some experimenting and determined that this is wrong: (I do know that adding a "GetDirection" condition to the spell/ability calling the effect does nothing. It's as if WeaponSpeedMult itself only cares about forward movement.)What it "cares about" so to speak is the IsMoving condition. If I do not include that, and use GetDirection for whatever I want, then it works as I expect it. I may end up needing scripting anyway though because it is not clear what happens when the player has the Quick Shot perk. At that point, I think the bug will make an effect passing say 0.5 to WeaponSpeedMult go from halving the draw speed to increasing it by 50% in addition to what Quick Shot does anyway (130%). I'm not sure what you have going here. Could you get a few thumbnails for where in CK or whatever tool you are doing this? Not to be rude or anything, but its hard to visualize your intention and direction without a screenie or two and some details on your goal, am I right doodmon? :smile: No offense taken. What I am doing is making it so certain kinds of bows (my mod distinguishes between shortbows and longbows kind of like ACE Archery) draw more slowly when the player is moving, to make it harder to kite with these bows and encourage the player to use them more as long distance sniping weapons. Here's what I mean in a picture: http://i.imgur.com/Bzql1fo.png The effect is basically a value modifier to WeaponSpeedMult, which is how Quick Shot works. 0.1 is a testing value (because it's super obvious). The conditions basically say to apply a 90% reduction in draw speed when the player has a bow tagged as a "longbow" and is moving (and some globals are set). Previously I had "IsMoving == 1" as my condition, but for some reason this made the effect only work when the player was moving forward. "GetMovementDirection != 0" seems to work though (0 corresponds to "stationary" or no direction). It's possible that "IsMoving" is just a mask for "GetMovementDirection" but I was specifying that it needs to be 1 rather than not be 0. Not sure. (Edit: It totally is!) But, from what I can decipher of your intent, does look like at least one script extended magic effect could be needed. I've only used one perk for personal mods. Makes the sword in hand have higher critical chance, adds a perk if equipped. Simple really. The perk extends critical, critical damage on random, and adds a chance critical with a bash when not using a shield. Pretty nifty really. And, with a spell added to the OnDeath in CK for the weapon, instead of just doing bleeding damage (the only magic effect visible, not much 6 for 6 seconds) it does Bleed Out...adds a constant effect ability where they lose health until dead...when a critical hit is actually made. Makes any spell caster use up as much restoration as they can, hehe. I call that a mortal wound, right? There's like 4 stages of tempering to get elemental, undead bane, soul trap type enchantments. Even works on the enchanter...except for the script on the weapon for that perk. Still working on that. Stuff like this can make for a much bigger-than-you'd-expect-plugin. I apologize for rambling, pain meds seem to be working. Good luck. :dance:Sorry to ramble. :blush: Just trying to say you can use pretty simple scripts to do what you want...depending on exactly what. :DWell I'm getting the hang of Papyrus more and more (used to work in IT, scripting isn't a foreign skillset by any means!), but it generally is quicker for me to click options available in a GUI. So I try to do that if it can do what I want it to do before I bust out Notepad++ and get on my coding hat and robe. :smile: However, I have attached a script to that effect in the shot above to account for the fact that WeaponSpeedMult is weird. The game adds what you give it to a multiplier that it only applies once it is greater than 0 (its starting default value). So, if I want to reduce weapon speed by 50%, I can add 0.5 to the multiplier. But then if another effect increases weapon speed by 30%, that gets added to the same multiplier as 1.3, which adds to my 0.5 to cause my mod to increase weapon speed by 80%. So, I had to make a script that detects when WSM is higher than one and accommodate for that. Haven't tested it yet though. Edited September 23, 2015 by LittleRaskols Link to comment Share on other sites More sharing options...
LittleRaskols Posted September 22, 2015 Share Posted September 22, 2015 (edited) Well, as it turns out it does not work at all and seems to just make draw speed faster no matter what! Scriptname SRC_DrawSpeedMod extends activemagiceffect {Modifies draw speed to adjust for Quick Shot.} Perk Property QuickShot auto bool bHasQuickShot ;The initial WSM, so I can manually reset it just in case. float fBaseWepSpeedMult Event OnEffectStart(Actor akTarget, Actor akCaster) float fAdjWepSpeedMult ;adjusted value fBaseWepSpeedMult = akTarget.GetActorValue("WeaponSpeedMult") bHasQuickShot = akTarget.HasPerk(QuickShot) ;If the user has Quick Shot, then WSM has been increased by 1.3, which will interact poorly ;with my adjustments. So, by subtracting 1 we effectively make Quick Shot add 0.3. if bHasQuickShot fAdjWepSpeedMult = fBaseWepSpeedMult - 1 else fAdjWepSpeedMult = fBaseWepSpeedMult endif akTarget.SetActorValue("WeaponSpeedMult", fAdjWepSpeedMult) endEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) akTarget.SetActorValue("WeaponSpeedMult", fBaseWepSpeedMult) endEvent This should be pretty simple. It should not be doing anything unless the player has quickshot (I abandoned a more advanced check before) which makes it baffling that it is having this weird opposite effect and universally making draw speed faster. It should just be passing along its current value, whatever that is. Edit: I have resolved this. The problem was that SetActorValue affects the base value. Anyone coming across this post looking for help with a similar issue: check out ForceActorValue, ModActorValue, DamageActorValue, and RestoreActorValue. Edited September 23, 2015 by LittleRaskols Link to comment Share on other sites More sharing options...
Oni24 Posted September 22, 2015 Share Posted September 22, 2015 Hello! Got question regarding SKSE and plugins.I need to somehow change variables of loaded plugin in game. 1: Is there any console command to list plugins or variables and set them?2: im trying to figure out how to change variables in loaded plugin with scripts. But im completly lost on how to access those variables. // plugin in mind is player_physics by Altimor in his awseme mod <http://www.nexusmods.com/skyrim/mods/38572/?>if there was a way of changing friction and speeds in his mod by lets say equiping some special equipment with attached effect/script, lets say skies, than we will be just few steps form working skiing mod :D Link to comment Share on other sites More sharing options...
lofgren Posted September 22, 2015 Share Posted September 22, 2015 So this might be out of scope for the quick questions thread, because this is getting pretty long, but I guess I just want to know before I sink a bunch of time into Papyrus whether scripting can bypass this? Or is this a known limitation with no known solution?Hell, I'm going to give it a shot. I realize that last post was probably too rambly for the thread, so here is my quick question: In "OnEffectStart(Actor akTarget, Actor akCaster)," if the "Delivery" of the Magic Effect my script will be attached to is set to "Self" are akTarget and akCaster both equivalent to "Self"? Seems like a dumb question now that I've written it out, but I figure I should ask now because I'll probably end up doing it wrong. They are equivalent to the same actor. Link to comment Share on other sites More sharing options...
LittleRaskols Posted September 22, 2015 Share Posted September 22, 2015 Thanks man, good to know that using akTarget for everything is not the problem (seriously have no idea what going on, seemed like it could be anything). I think that scripting the whole draw speed penalty logic is going to be the solution - you win, MotoSxorpio! - but I am baffled that some of the CK condition functions don't appear to be part of the actor script. Specifically, there is no way I can see to detect if an Actor is moving or their direction of movement. My new quick question: Is there something I am missing, or is there really no way in papyrus to tell if an actor is moving? If not then that just makes things more annoying but not impossible to deal with. Link to comment Share on other sites More sharing options...
lofgren Posted September 22, 2015 Share Posted September 22, 2015 It's in the ObjectReference script, which the Actor script extends. http://www.creationkit.com/GetAnimationVariableFloat_-_ObjectReference Link to comment Share on other sites More sharing options...
LittleRaskols Posted September 22, 2015 Share Posted September 22, 2015 Nice, thanks. I was looking in ObjectReference too but didn't see any obvious "check if moving" functions, and didn't realize that movement is one of the "animation variables," although that makes perfect sense in hindsight. Link to comment Share on other sites More sharing options...
Recommended Posts