Universal Weapon Sway

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.

Universal Weapon Sway

Postby Boondorl » Fri Apr 17, 2020 12:16 am

Current version: 1.0
Tested on: GZDoom 4.3.3

Github Repo



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.

Features
  • 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
Showcase
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.
User avatar
Boondorl
 
Joined: 11 Jul 2018

Re: [Beta] Universal Weapon Sway

Postby MFG38 » Fri Apr 17, 2020 4:08 am

Wasn't a mod like this already done at one point?

In any case, judging by the videos alone, it looks quite nice. c:
User avatar
MFG38
 
Joined: 14 Apr 2019
Location: Finland
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: [Beta] Universal Weapon Sway

Postby 3336655445 » Fri Apr 17, 2020 8:10 am

probably it will be the best weapons sway mod for Doom
3336655445
 
Joined: 24 Jul 2019
Location: Odessa
Discord: Счастливая трубка
Operating System: Other OS Not Listed Here
Graphics Processor: Not Listed

Re: [Beta] Universal Weapon Sway

Postby 3336655445 » Fri Apr 17, 2020 8:36 am

I tested this mod with: Trailblazer, Guncaster, Duke Nukem weapons and monster (v10b) and lambda
this mod works with: Trailblazer and lambda
this mod does not work: Guncaster and Duke Nukem v10b
3336655445
 
Joined: 24 Jul 2019
Location: Odessa
Discord: Счастливая трубка
Operating System: Other OS Not Listed Here
Graphics Processor: Not Listed

Re: [Beta] Universal Weapon Sway

Postby Boondorl » Fri Apr 17, 2020 1:44 pm

Hmm, seemed to be a problem with title maps. I've released a hotfix for it that fixes the crash on start up and can verify it works with those two mods now.

MFG38 wrote:Wasn't a mod like this already done at one point?

Nash made a weapon sway mod a couple years ago but it doesn't have a lot of customizability and lacks some of the features this one has.
User avatar
Boondorl
 
Joined: 11 Jul 2018

Re: [Beta] Universal Weapon Sway

Postby Samarai1000 » Sat Apr 18, 2020 1:38 am

3336655445 wrote:*snip*


While I can't speak for the Duke mod, the reason why Guncaster doesn't work with this is due to it having its own "sway" system, based off of Nash's IIRC.
User avatar
Samarai1000
No better than bigots, apparently.
 
Joined: 25 Sep 2016
Location: Somewhere in Canada
Discord: #7919
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: [Beta] Universal Weapon Sway

Postby bingojohnson » Sat Apr 18, 2020 8:57 am

This replaced Nash's mod in my autoload. The sway movement looks very natural. Works fine on GZDoom 3.8.2.
User avatar
bingojohnson
 
Joined: 12 Mar 2013

Re: [Beta] Universal Weapon Sway

Postby Nash » Sat Apr 18, 2020 9:23 am

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) :shrug:

(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)
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: [Beta] Universal Weapon Sway

Postby Pompous Seed » Sat Apr 18, 2020 8:11 pm

Ah, YES... this is very nice. The weapons even sway during the fire states; it feels very fluid. Thanks for this, Boondorl!
Pompous Seed
 
Joined: 05 Aug 2016

Re: [Beta] Universal Weapon Sway

Postby Ryan Cordell » Sun Apr 19, 2020 5:47 am

This mod is pretty rad! Though there are some things I noticed..
  • It needs a weapon null check (any mod that can quickly take away and force a different weapon, like DRLA, will make the mod crash otherwise)
  • Aren't all titlemaps actually named TITLEMAP? The check could probably be
    Code: Select allExpand view
    gamestate == GS_TITLELEVEL
    or some equivalent
  • Is there an advantage to using StaticEventHandler vs EventHandler?
User avatar
Ryan Cordell
PDA Man
 
Joined: 06 Feb 2005
Location: Capital of Explodistan
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: [Beta] Universal Weapon Sway

Postby doomfiend » Sun Apr 19, 2020 11:06 am

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)
User avatar
doomfiend
 
Joined: 27 Aug 2006
Location: some where

Re: [Beta] Universal Weapon Sway

Postby Boondorl » Sun Apr 19, 2020 11:23 am

Beta 2 is now available! Nothing major included.
Spoiler: Changelog

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.
User avatar
Boondorl
 
Joined: 11 Jul 2018

Re: [Beta] Universal Weapon Sway

Postby doomfiend » Sun Apr 19, 2020 12:18 pm

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)
User avatar
doomfiend
 
Joined: 27 Aug 2006
Location: some where

Re: [Beta] Universal Weapon Sway

Postby OfficialYeen » Tue Apr 21, 2020 10:20 pm

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.
User avatar
OfficialYeen
 
Joined: 12 Feb 2019

Re: [Beta] Universal Weapon Sway

Postby Boondorl » Wed Apr 22, 2020 10:32 am

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)
User avatar
Boondorl
 
Joined: 11 Jul 2018

Next

Return to Gameplay Mods

Who is online

Users browsing this forum: dragomir and 14 guests