Is implimenting Sway possible?

General discussion of the Project Reality: BF2 modification.
Post Reply
Scribble
Posts: 69
Joined: 2005-08-11 16:00

Is implimenting Sway possible?

Post by Scribble »

As the question title says, IS it possible to impliment sawy in BF2's engine?

And, if possible would it be a consideration to tie sway quantity to the stamina bar? (ie sway increases the more exhausted the soldier)
thugnasty
Posts: 29
Joined: 2005-05-17 18:08

Post by thugnasty »

yeah that would be good but make sure it moves the whole screen as the gun moves so that the bullets will still hit where its pointed like in Americas Army
GABBA
Posts: 633
Joined: 2005-05-16 16:00

Post by GABBA »

All those who have no idea what he is talking about raise your hand.....*raises hand*
"Incoming fire has the rigth of way"...........

"never share a foxhole with anyone braver than you are"
Jeeves
Posts: 65
Joined: 2005-08-25 18:01

Post by Jeeves »

Sway wouldnt be that bad, but what I want to see is LEANING. I hate running around a corner without being able to peak first. I personaly think for a realism mod this is a must.
Paladin-X
Retired PR Developer
Posts: 592
Joined: 2005-06-12 16:00

Post by Paladin-X »

I would imagine it's possible to add sway. I believe it's an animation related thing. However, I don't think it can be tied with the stamina bar. Then again, I haven't really looked too much at it, so who knows.
Image
Image
Figisaacnewton
Posts: 1895
Joined: 2004-11-23 05:27

Post by Figisaacnewton »

Sway is a very important thing to figure out, even if it cant be tied to the stamina bar, if you have sway, you have different amounts of recoil per stance.

whats all the sway code from bf42 and mods? copy paste some of that and see if it works maybe...
Image
Paladin-X
Retired PR Developer
Posts: 592
Joined: 2005-06-12 16:00

Post by Paladin-X »

In BF42 sway is an animation.
Image
Image
FBX
Posts: 36
Joined: 2005-08-13 02:59

Post by FBX »

it might be possible by manipulating the "shaking" that you experience when you fly fast in an airplane to be something infantry experience and to slow it down so its a sway and not a shake.
Figisaacnewton
Posts: 1895
Joined: 2004-11-23 05:27

Post by Figisaacnewton »

[R-DEV wrote:Paladin-X]In BF42 sway is an animation.
BF editor has built in animation editor.... does that help? (like can the bf editor change the animations easy?) can you just code it so that the animation that would normally be tottaly fixed sway back and forth a bit...?
Image
Paladin-X
Retired PR Developer
Posts: 592
Joined: 2005-06-12 16:00

Post by Paladin-X »

To be honest, I don't know. From what I've seen, animations need to be done in a modelling program then exported. I think animation editor is for timing and such, but I could be wrong.
Image
Image
FBX
Posts: 36
Joined: 2005-08-13 02:59

Post by FBX »

ok *raises hand* I dont know what sway is now.
Paladin-X
Retired PR Developer
Posts: 592
Joined: 2005-06-12 16:00

Post by Paladin-X »

I'm thinking of sniper zooms in DC, where the scope would sway from side to side and slow down to a stop after a few seconds.
Image
Image
Figisaacnewton
Posts: 1895
Joined: 2004-11-23 05:27

Post by Figisaacnewton »

i think in 42 there were two sway states per weapon per stance, ther was an 'excited' state that lasted for a bit right after firing, and then a 'calmed' state where the sway was less intense, but kicked up if you started firing or moving.

if that system can be taken out of 42 and used in bf2, we can have MUCH more realistic weapons and we can have recoil that changes per stance, which is really a needed thing...

dammit i wish i knew how to actually code instead of just having vague ideas of how everything is supposed to work...!

FBX, ya play FH. sway is what happens whne you hold an anittank rifle while standing up (and standing still). THAT is sway.
Image
FBX
Posts: 36
Joined: 2005-08-13 02:59

Post by FBX »

there isn't much to coding actually. Open up server_objects.zip and you'll find .tweak files that change attributes to parts of the game. They're pretty simple to figure out, as its in an "attribute value" format with one attribute per line.

The only difficult part is trying to figure out what sub-attribute your changing because it re-uses names a lot and depending on what object template was most recently declared your changing different things.

I opened up the BF2 executiable and discovered the following references:

cameraSwayRodLength
cameraSwaySensitivity
cameraSwayDofMin
cameraSwayDofMax
cameraSwayRightMin
cameraSwayRightMax
cameraSwaySpringStrength
cameraSwaySpringDamping
cameraShakeSensitivity
cameraShakeStartSpeed
cameraShakeMaxSpeed

you might see how they did "shaking" for the airplanes and see if any of those sway commands work when done in a similar fashion for infantry
Paladin-X
Retired PR Developer
Posts: 592
Joined: 2005-06-12 16:00

Post by Paladin-X »

FBX wrote: The only difficult part is trying to figure out what sub-attribute your changing because it re-uses names a lot and depending on what object template was most recently declared your changing different things.
Which is where grep comes in handy. http://www.wingrep.com
Image
Image
Eglaerinion
Posts: 136
Joined: 2004-07-25 16:00

Post by Eglaerinion »

It would definately be a nice touch, even if it isn't completely functional it would still look much better.
Image
Figisaacnewton
Posts: 1895
Joined: 2004-11-23 05:27

Post by Figisaacnewton »

Ok then, so i think the answer is: YES sway is possible to implement.

YAY!
Image
Scribble
Posts: 69
Joined: 2005-08-11 16:00

Post by Scribble »

Outstanding, if implimented I think It'd add a great deal to gameplay. For a start removing the CS point and click to kill horrableness.
Post Reply

Return to “PR:BF2 General Discussion”