Universal Weapon Sway is a general mod that seeks to add momentum-based weapon swaying to any weapon in the GZDoom engine. The amount your weapon sways is based off how quickly you turn as opposed to being cumulative giving it a much snappier feeling. Included are both horizontal and vertical sway alongside a plethora of options to customize it to your liking.
Horizontal and vertical sway for any weapon in GZDoom
Sway based on player velocity
Vertical offsetting for weapon sprites
Options to customize movement sway, vertical sway, horizontal sway, when the weapon should sway, and more
Spoiler: Aiming sway
Spoiler: Movement sway
FAQ Q: Will this work with anything? A: It should. If something doesn't work let me know and I'll see what I can do to fix it.
Q: Do I need to load this before or after anything? A: No, this mod is currently load order independent.
Section for modders
Q: Can I use this in my own project? A: Yes, you may freely use this in your projects so long as it follows the license. This project is licensed under the MIT license. See the included LICENSE file for more info.
Q: Should I use the Github repo? A: The Github repo may be updated frequently with more experimental features. Using the version here ensures you'll always have the current stable release, but the choice is up to you.
You do not have the required permissions to view the files attached to this post.
Last edited by Boondorl on Thu Apr 30, 2020 9:40 am, edited 7 times in total.
bingojohnson wrote:This replaced Nash's mod in my autoload. The sway movement looks very natural. Works fine on GZDoom 3.8.2.
This is literally a 1-line change that I just didn't find time to add and update to my mod (it's technically a bug in my mod, it was doing something wrong which cause the movement to feel floaty)
(and before anyone asks, "you don't have time to release a 1 line change?", it's not just that 1 change that my mod is overdue for - there are other issues with it that I need to wrap up, plus I am busy elsewhere with several other different projects)
Crouching now tweaks vertical offset behavior (options have been added to tweak this)
Potential fix for crash when weapons are forcefully taken away
doomfiend wrote:Got a little bug it seems, upon moving forward the script forces the weapon to sway to the right a tiny bit. (Disabled movement sway and it sways regardless)
I couldn't replicate this. Was weapon bobbing turned off via the HUD menu? If so, that's something it does even without mods.
Ryan Cordell wrote:*snip*
The gamestate and name of the map are very, very different things. This code should only ever run when actually in a playable level which the current check ensures. As for the EventHandler, static wasn't needed before but as an optimization I've made it so CVars are now only updated on level load. Since CVars can't be serialized I need to be able to update them when loading from a save file which only StaticEventHandlers can do.
what the heck, I disabled my autoload and yes, it turns out it was a gzdoom thing; not your mod. Had I disabled it via decorate it wouldn't slide to the right like that. (defeats the purpose of 0 weaponbob speed if you ask me lol)
I absolutely love how customizable this is and it really brings some life to static weapon sprites. It's part of my autoload and it works with everything else except DoomRL Arsenal, which it outright breaks. Upon assembling a weapon with mods, GZDoom crashes. I'm using GZD version 4.3.3 and RLA version 1.1.4. I have a pretty extensive load order when I play RLA/RPG, and I've done some testing on my own and have been able to isolate this particular mod as the problem, as it will always crash under the same circumstances even when just running it and RLA, without all of my filler stuff. Any idea what could be causing this? I'll provide the crash report if you need it.
Are you using the beta 2 version of this mod? If so, can you send a screenshot of the error message alongside steps on how to recreate it? (I have absolutely no idea how to play DoomRL Arsenal so I'm not entirely sure how to quickly assemble a weapon with mods to test it)