Jump to content

Quick Questions, Quick Answers


Mattiewagg

Recommended Posts

  • Replies 2.6k
  • Created
  • Last Reply

Top Posters In This Topic

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

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

 

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. :D

Well 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 by LittleRaskols
Link to comment
Share on other sites

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 by LittleRaskols
Link to comment
Share on other sites

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

 

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...