Page 1 of 3

Weapon Sway - ZScript Edition! v1.0 officially out now

PostPosted: Wed Nov 21, 2018 10:31 am
by Nash


Here's a ZScriptified version of my popular weapon sway mod. Now works universally with anything. Have fun!

Made for GZDoom 3.7.0

28th December 2018:

v1.0
- Official 1.0 release
- Updated ZScript directive to version 3.7.0
- Reformatted options menu
- Fixed swaying so that it should now work with ANY weapon mod

Updates:

Spoiler: "Old updates"

Re: Weapon Sway - ZScript Edition! (0.9b)

PostPosted: Wed Nov 21, 2018 4:01 pm
by Pompous Seed
Awesome, thanks for this! Also, could you possibly consider adding a slider to adjust the intensity of the sway? To me, it seems a bit more intense than the non-zscript version.

Re: Weapon Sway - ZScript Edition! (0.9b)

PostPosted: Wed Nov 21, 2018 4:38 pm
by Enjay
While this is cool and clever and all (and, as usual, well done to Nash for doing it) I think it has also helped me identify exactly what that "sloppy" "weapons lagging behind the mouse movement" effect in modern games that I was moaning about some time ago is caused by.

viewtopic.php?f=12&t=61392&p=1065036#p1065036

:lol:

Re: Weapon Sway - ZScript Edition! (0.9b)

PostPosted: Wed Nov 21, 2018 5:30 pm
by DabbingSquidward
Enjay wrote:While this is cool and clever and all (and, as usual, well done to Nash for doing it) I think it has also helped me identify exactly what that "sloppy" "weapons lagging behind the mouse movement" effect in modern games that I was moaning about some time ago is caused by.

viewtopic.php?f=12&t=61392&p=1065036#p1065036

:lol:


Also known as inertia :P

Re: Weapon Sway - ZScript Edition! (0.9b)

PostPosted: Wed Nov 21, 2018 6:03 pm
by Enjay
Indeed, but when I'm holding something in front of me and I move around, it tends not to fall behind in such a pronounced or "I'll catch up with you later" manner.

Anyway, sorry for the slight derail. The mod is cool, even if it's not really to my taste. :)

Re: Weapon Sway - ZScript Edition! (0.9b)

PostPosted: Wed Nov 21, 2018 7:35 pm
by Cherno
I wonder, wouldn't it look better if the weapon lagged behind the turning motion instead?

Re: Weapon Sway - ZScript Edition! (0.9b)

PostPosted: Wed Nov 21, 2018 7:43 pm
by Pixel Eater
That's what the inverse option does. I like it, it seems more realistic because eyes are faster to turn.
How long before we get independent neck movement though? :wink:

Re: Weapon Sway - ZScript Edition! (0.91b)

PostPosted: Thu Nov 22, 2018 10:25 am
by Nash
Small update: 0.91b

- Fixed chainsaw bug

Re: Weapon Sway - ZScript Edition! (0.91b)

PostPosted: Tue Nov 27, 2018 4:51 pm
by Agitatio
Is it possible to make weapons center when firing from your end? Some mods don't have problem with that, but some do. Looks especially weird with tracers.

Re: Weapon Sway - ZScript Edition! (0.91b)

PostPosted: Tue Nov 27, 2018 11:33 pm
by Nash
Grigori wrote:Is it possible to make weapons center when firing from your end? Some mods don't have problem with that, but some do. Looks especially weird with tracers.


It should already be doing that. Have you downloaded the latest version in the OP?

Re: Weapon Sway - ZScript Edition! (0.91b)

PostPosted: Wed Nov 28, 2018 2:23 am
by Agitatio
Nash wrote:It should already be doing that. Have you downloaded the latest version in the OP?

Yep. I downloaded it the same day I wrote that. I can't test all my mods right now, but the ones I remember to encounter that issue in were Faspons and Brutal Doom.

Re: Weapon Sway - ZScript Edition! (0.91b)

PostPosted: Wed Nov 28, 2018 10:40 am
by Trusty McLegit
Actually I was just going to ask the opposite of that, would it be possible to have an option for the weapon not to snap to center when firing? Right now it looks like the weapon can't decide where it wants to be. Also, not sure how hard this would be to implement but it would be cool if the sway slowed down the farther from center it gets (kinda like most source games) as I feel that would look and feel more natural and would fix the weapon just stopping on a dime when you hit the edge of the sway range.

Re: Weapon Sway - ZScript Edition! (0.91b)

PostPosted: Wed Nov 28, 2018 6:15 pm
by BROS_ETT_311
Love that this has finally been zscriptified! The former ACS version required a bit too much trickery to be worth using all that often, but this...well, "it just works". This is especially true with just about any weapon mod that uses 3d models for the weapons, which definitely makes this a go to for me. Unfortunately, when it comes to the world of sprites, there doesn't seem to be a lot of mods with extended sprite hands to make the vertical sway option worth it. Maybe I'm just unaware of said mods, but the only one I can think of is Vanilla as Fuck by JoeyTD. Shame too, because I love the jumping inertia effect when using that option! Don't suppose there's a way to not have that effect tied to the vertical sway option, is there?

*EDIT
Just noticed a weird kind of stutter effect with weapons that use "offset" functions, though not sure if this is specific to any particular axis. I know this mod isn't exactly high priority at the moment, what with your release of nashgore ve and all, but might be worth looking into. Perhaps finding some way to have the script ignore offset commands through a check system.

Re: Weapon Sway - ZScript Edition! (0.91b)

PostPosted: Sat Dec 01, 2018 3:50 am
by Nash
BROS_ETT_311 wrote:Don't suppose there's a way to not have that effect tied to the vertical sway option, is there?

*EDIT
Just noticed a weird kind of stutter effect with weapons that use "offset" functions, though not sure if this is specific to any particular axis. I know this mod isn't exactly high priority at the moment, what with your release of nashgore ve and all, but might be worth looking into. Perhaps finding some way to have the script ignore offset commands through a check system.


The problem with the vertical option is, even if I enable it ONLY for the jump inertia, you will start to see glitchy graphics as some weapon sprites literally cut off as soon as it touches the status bar.

About the weapon offset issue, can you recommend me an example mod where I can test this issue?

Re: Weapon Sway - ZScript Edition! (0.91b)

PostPosted: Sat Dec 01, 2018 5:07 am
by BROS_ETT_311
Sure! Check out: QCDE; Trailblazer; Led's Generic Weapon Mod

The tribolt from QCDE is a good place to start. Should reproduce the issue just fine.

Nash wrote:The problem with the vertical option is, even if I enable it ONLY for the jump inertia, you will start to see glitchy graphics as some weapon sprites literally cut off as soon as it touches the status bar.


That makes sense. I actually did a work around for the cut off by lowering the Y sensitivity along with changing the "Vel.z *" value within the script. The effect is more subtle than I like, but it's there and technically functional...I think. Mind you, I'm no coder and have no idea what I'm doing, so there's that. I'll PM an example you can check out or here works too https://www.dropbox.com/s/lrim5j83r4kqn ... 1.pk3?dl=0