Garry's Mod

Garry's Mod

[TFA] [AT] Project HL2 MMod Pack
wse_jack 18 Mar, 2022 @ 12:49am
How did you cancel the inverted sway from the TFA base? Would like to do this for the shotgun :-)
Just a question, what did yall do to cancel out the stupid TFA base sway on some of these? I've been trying for the life of me to fix it on the shotgun, but can't seem to figure out either in TFA base or the swep where things like the pistol are unaffected but the shotty feels like it has the reverse kinetics of the original viewmodel sway from 2004... If it can be done for some, could be done for all? I want this power lol... for the good of all tfa weapons lol.

BTW great animation and implementations (outside of the ironfov... easy fix though).
< >
Showing 1-5 of 5 comments
wse_jack 29 Mar, 2022 @ 9:04pm 
Well figured out how to fix the TFA base lol... can't believe it was starin me so obvious in the face given the deep scouring I did, musta been so tiered that i missspelled sway several times lol cause I know I searched em all for it more than once...

Under the Viewmodel LUA in the gunbase in TFA base you change

function SWEP:Sway(pos, ang, ftv)
local self2 = self:GetTable()
--sanity check
if not self:OwnerIsValid() then return pos, ang end
--convar
fac = gunswaycvar:GetFloat() * 3 * ((1 - ((self2.IronSightsProgressUnpredicted or self:GetIronSightsProgress()) or 0)) * 0.85 + 0.15)
flipFactor = (self2.ViewModelFlip and -1 or 1)

to -3

or whatever variable sway you want... for instance I use -1.5 for a weapon bob of 0.8 which is snappy tactic and goes from being wanna be mouse lag to not only brilliant procedural animation, but some brilliant sway animation as well.

No reason whatsoever that the view model bob which is necessary for 90percent of tfa weapon ports to function,.. and the sway rate, shouldn't have sliders to adjust each individually lol... like simply the default is disconnected from reality on a genuine mechanical level being that why or in some cases how would you move the weapon from your shoulder first, and then follow with the tip of it lol... that's not how arms work, or gun-balances if their any good.... and yet switching it to a negative value suddenly becomes almost the opposite of mouselag, and a better procedural sway animation than HL2 used to have, actually, one of the best i've seen!

Whoever decided it should sway at the back first not the front is very much some one that should maybe hold a supersoaker or something for half a second before disconnecting entirely from reality.

Not your issue there on the port, like I said most of yours solved it, but for the weapons like the shotty and ar2, it was real bad... was woundering how yall managed to curb it on weapons like the pistol, but suppose it's a non issue for me now lol, still am curious though.
thatrtxdude  [developer] 31 Mar, 2022 @ 2:22am 
what i did for this base is that i removed the viewmodel sway code completely. this breaks attachment sway for guns that do have attachments though

for the shotgun and ar2, we can't do this. those guns need vanilla tfa for specific functions.
the auto-reload in my custom base doesn't work for shotguns as it only loads one shell, not the entire tube (which was the point of the auto-reloading feature). for the ar2, i wanted to keep the energy ball function, so it uses vanilla tfa to spawn the energy ball e.t.c. i forgot to add those functions to the custom base.
wse_jack 10 Apr, 2022 @ 9:57pm 
Dope, have learned a lot more about how tfa does things and the general quality of various sweps and whatnot since I posted the above, gotta say this pack has been a consistent winner overall...

BTW... your crowbar implementation is easily my favorite melee system I have seen in this game, or any source game outside of DM and Chiv^... seems to be unique to this Garry's mod port, and after seeing what yall did in the lua I'm really surprised I haven't seen this more often*, very nifty little script there that makes an absolute world of difference to it's actual believability.


Had to fix the sound a touch with the hits being at a strange volume level compared to the swing, but I kinda see where you were going with it... like hitting someone shouldn't be loud, but alas the game has a lotta sound design working against that philosophy so it felt odd, but with a hit variable based on the position of the weapon lol still felt better even as is than the crosshair based poke we usually see... Tryin to figure out how to merge this with the throwable crowbar, but as it stands, the raw implementation just makes using any other variant sad and pathetic lol. this is an easy winner over any other including any contextual kill move system, If I have the option to hit on my own rather than have the game hit for me I usually take it lol.

I highly recommend if possible the sway fix (mult neg instead of positive) I mentioned... not sure what things in the TFA base are allowed to be used externally but since it seems this is unlikely to be done by the people behind the base, man it's a gamechanger going from an annoying mouse-lag sim to one of the best weapon sway codes I've seen in this game or any...









^(course those are simply the best of anything ever so... unfair at best to compare lol)


*(although I'm still surprised ray-cast melee isn't a standard for any game let alone FPS melee... ♥♥♥♥♥♥ consoles... Suppose any system that isn't lock on or lock-on adjacent is dead as a concept... ♥♥♥♥ I think the closest they came was something Kojima thought up for Revengance, and even that got butchered before it's release... lets not even talk about how Kingdom Come Deliverance got kicked in the nuts by tacking a lock-on system TO physics based ray-cast... sigh...)
ßαsταrÐ 12 Apr, 2022 @ 4:15pm 
half-life 2's synergistic combo of responsive weapon sway and smooth interpolation back to your view target is so subtle, and yet so impactful to me. it creates a kind of "immersion" factor that makes the game feel so lifeless when it's gone. garry's mod really suffers for that, at least without a mod just to replace it. (which viewmodel lagger does a good job at, for the record)

tfa's base code for viewsway and bob is different. not bad, just different. i feel like it hurts as far as a recreation of a gameplay / art / fx mod for half-life 2, but works well with insurgency (sandstorm) stuff for example, which has a very nice but also very distinct feel to it. it'd be nice if tfa had free aim like arccw, but that's besides the point.

but anyhow, you seem to have solved a problem that i've had but never understood how to fix -- reversing the view sway direction. i find that most games use that approach instead so it's been bugging me with some of the other tfa ports i've been using.
wse_jack 24 Apr, 2022 @ 11:25pm 
That makes me smiles on smiles lol, wish he would change it... like moving a weapon, which moves first, the front or the back, which part of the gun needs to go places first to shoot them lol... also which part is often locked to your shoulder... nvm if your using free-aim like smod, insurgency or the old sharpeye*.



*LOL if you can make that work... has interpolation issues in its unmaintained old engine state. Not sure what it was called in that, only part of the mod worth using, always knew it as free aim).
< >
Showing 1-5 of 5 comments
Per page: 1530 50