Page 1 of 1

[Tweak] Weighted Sprint by Phale and Arab

Posted: 2014-04-19 04:42
by Arab
Hello all.

Phale from the Battlefield 2 SP Forum, and also a member here, has found a way to make smoother transitional animations with a simple tweak.

Weights of all weapons have been found using Wikipedia, Weapon Sites, and placed in the tweak

PR:BF2 1.1.6.0 Weighted Sprint: USMC Weapons Preview - YouTube

For Example, the M16A4 weights about 4 kg with magazine.

Code: Select all

[font=Arial Black][b][size=175][color=Red]usrif_m16a4 animationsystem1p.inc[/color][/size][/b][/font]
animationSystem.cameraSpring.use 1
animationSystem.cameraSpring.amplitude 0.03/0.02/0.03
animationSystem.cameraSpring.zoomDamping 2/3/4
animationSystem.cameraSpring.stiffness 10/10/10
animationSystem.cameraSpring.move 2/2/2
animationSystem.cameraSpring.look 1/1
animationSystem.cameraSpring.fire 0/0/20

rem *** Animations ***
animationSystem.createAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_changeFirerate.baf
animationManager.looping 0
animationSystem.createAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_deploy.baf
animationManager.looping 0
animationManager.length 2.7
animationSystem.createAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_fire.baf
animationManager.looping 0
animationSystem.createAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_reload.baf
animationManager.looping 0
animationManager.length 6.25
animationSystem.createAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_idle1.baf
animationManager.looping 0
animationManager.length 4.3
animationSystem.createAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_idle2.baf
animationManager.looping 0
animationManager.length 2.7
animationSystem.createAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_idle3.baf
animationManager.looping 0
animationManager.length 2.9
animationSystem.createAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_run.baf
animationManager.length 0.666667
animationSystem.createAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_sprint.baf
animationSystem.createAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_stand.baf
animationSystem.createAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_tozoom.baf
animationManager.looping 0
animationManager.length 0.4
animationSystem.createAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_zoom_fire.baf
animationManager.looping 0
animationSystem.createAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_zoom_run.baf
animationManager.length 2
animationSystem.createAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_zoom_stand.baf
animationSystem.createAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_zoom_changefirerate.baf
animationManager.looping 0

animationSystem.createAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_run_prone.baf
animationManager.length 0.8
animationSystem.createAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_toprone.baf
animationManager.length 1
animationSystem.createAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_toprone_rev.baf
animationManager.length 1.2

rem *** Bundles ***
animationSystem.createBundle changeFirerate
animationBundle.isLooping 0
animationBundle.fadeInTime 0
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_changeFirerate.baf

animationSystem.createBundle deploy
animationBundle.isLooping 0
animationBundle.fadeInTime 0
animationBundle.fadeOutTime 0.2
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_deploy.baf

animationSystem.createBundle idle1
animationBundle.isLooping 0
animationBundle.fadeOutTime 0.3
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_idle1.baf

animationSystem.createBundle idle2
animationBundle.isLooping 0
animationBundle.fadeOutTime 0.3
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_idle2.baf

animationSystem.createBundle idle3
animationBundle.isLooping 0
animationBundle.fadeOutTime 0.3
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_idle3.baf

animationSystem.createBundle fire
animationBundle.isLooping 0
animationBundle.abruptPlayback 1
animationBundle.fadeInTime 0.001
animationBundle.fadeOutTime 0.05
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_fire.baf

animationSystem.createBundle reload
animationBundle.isLooping 0
animationBundle.fadeInTime 0.2
animationBundle.fadeOutTime 0.2
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_reload.baf

animationSystem.createBundle run
[b]animationBundle.fadeInTime 0.4[/b]
animationBundle.fadeOutTime 0.2
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_run.baf

animationSystem.createBundle sprint
[b]animationBundle.fadeInTime 0.4[/b]
animationBundle.fadeOutTime 0.2
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_sprint.baf

animationSystem.createBundle still
[b]animationBundle.fadeInTime 0.4[/b]
animationBundle.fadeOutTime 0.2
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_stand.baf

animationSystem.createBundle zoom_fire
animationBundle.isLooping 0
animationBundle.abruptPlayback 1
animationBundle.fadeInTime 0.001
animationBundle.fadeOutTime 0.05
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_zoom_fire.baf

animationSystem.createBundle zoom_run
animationBundle.fadeOutTime 0.2
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_zoom_run.baf

animationSystem.createBundle zoom_still
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_zoom_stand.baf

animationSystem.createBundle zoom_changeFirerate
animationBundle.isLooping 0
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_zoom_changefirerate.baf

animationSystem.createBundle zoomTransition
animationBundle.isLooping 0
animationBundle.fadeInTime 0
animationBundle.fadeOutTime 0
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_tozoom.baf


animationSystem.createBundle still_prone
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_stand.baf

animationSystem.createBundle run_prone
animationBundle.fadeOutTime 0.3
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_run_prone.baf

animationSystem.createBundle toProne
animationBundle.isLooping 0
animationBundle.fadeInTime 0.001
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_toprone.baf
animationBundle.addEvent effect:8
animationBundle.setEventStartTime effect:8 0

animationSystem.createBundle toProneReverse
animationBundle.isLooping 0
animationBundle.fadeInTime 0.001
animationBundle.addAnimation Objects/Weapons/Handheld/usrif_m16a4/Animations/1p/1p_m16a4_toprone_rev.baf
animationBundle.addEvent effect:9
animationBundle.setEventStartTime effect:9 0

rem *** Triggers ***
animationSystem.createTrigger Trigger zoom_still
animationTrigger.addBundle zoom_still

animationSystem.createTrigger MovementTrigger zoom_move
animationTrigger.addBundle zoom_run
animationTrigger.valueHolder 1p_zoom_move

animationSystem.createTrigger MessageTrigger zoom_fire
animationTrigger.addBundle zoom_fire
animationTrigger.message 1

animationSystem.createTrigger MessageTrigger zoom_changeFirerate
animationTrigger.addBundle zoom_changeFirerate
animationTrigger.message 8

animationSystem.createTrigger Trigger zoom
animationTrigger.addChild zoom_still
animationTrigger.addChild zoom_move
animationTrigger.addChild zoom_fire
animationTrigger.addChild zoom_changeFirerate

animationSystem.createTrigger RandomTrigger rnd_idle
animationTrigger.addBundle idle1
animationTrigger.addBundle idle2
animationTrigger.addBundle idle3

animationSystem.createTrigger IdleTrigger idle
animationTrigger.addChild rnd_idle
animationTrigger.idleTime 5/15

animationSystem.createTrigger Trigger still_stand_t
animationTrigger.addBundle still
animationTrigger.addChild idle

animationSystem.createTrigger Trigger still_crouch_t
animationTrigger.addBundle still
animationTrigger.addChild idle

animationSystem.createTrigger Trigger still_prone_t
animationTrigger.addBundle still_prone
animationTrigger.addChild idle

animationSystem.createTrigger PoseTrigger still
animationTrigger.addChild still_stand_t
animationTrigger.addChild still_crouch_t
animationTrigger.addChild still_prone_t
animationTrigger.addChild still_prone_t

animationSystem.createTrigger MovementTrigger move_stand_t
animationTrigger.addBundle run
animationTrigger.valueHolder 1p_move

animationSystem.createTrigger MovementTrigger move_crouch_t
animationTrigger.addBundle run
animationTrigger.valueHolder 1p_move

animationSystem.createTrigger MovementTrigger move_prone_t
animationTrigger.addBundle run_prone
animationTrigger.valueHolder 1p_move

animationSystem.createTrigger PoseTrigger move
animationTrigger.addChild move_stand_t
animationTrigger.addChild move_crouch_t
animationTrigger.addChild move_prone_t
animationTrigger.addChild move_prone_t

animationSystem.createTrigger MovementTrigger sprint
animationTrigger.addBundle sprint
animationTrigger.valueHolder 1p_sprint

animationSystem.createTrigger MessageTrigger fire
animationTrigger.addBundle fire
animationTrigger.message 1

animationSystem.createTrigger MessageTrigger changeFirerate
animationTrigger.addBundle changeFirerate
animationTrigger.message 8

animationSystem.createTrigger MessageTrigger reload
animationTrigger.addBundle reload
animationTrigger.message 2

animationSystem.createTrigger Trigger normal
animationTrigger.addChild still
animationTrigger.addChild move
animationTrigger.addChild sprint
animationTrigger.addChild fire
animationTrigger.addChild changeFirerate
animationTrigger.addChild reload

animationSystem.createTrigger SwitchMessageTrigger root
animationTrigger.addChild zoom
animationTrigger.addChild normal
animationTrigger.addBundle zoomTransition
animationTrigger.message 4

animationSystem.createTrigger Trigger fromProne_zoom
animationTrigger.addBundle zoom_still

animationSystem.createTrigger Trigger fromProne_normal
animationTrigger.addBundle toProneReverse

animationSystem.createTrigger SwitchMessageTrigger fromProne
animationTrigger.addChild fromProne_zoom
animationTrigger.addChild fromProne_normal
animationTrigger.message 4

animationSystem.createTrigger Trigger stillToProne_zoom
animationTrigger.addBundle zoom_still

animationSystem.createTrigger Trigger stillToProne_normal
animationTrigger.addBundle toProne

animationSystem.createTrigger SwitchMessageTrigger stillToProne
animationTrigger.addChild stillToProne_zoom
animationTrigger.addChild stillToProne_normal
animationTrigger.message 4

animationSystem.createTrigger SwitchMessageTrigger forwardToProne
animationTrigger.addChild stillToProne_zoom
animationTrigger.addChild stillToProne_normal
animationTrigger.message 4

animationSystem.createTrigger SwitchMessageTrigger backwardToProne
animationTrigger.addChild stillToProne_zoom
animationTrigger.addChild stillToProne_normal
animationTrigger.message 4

animationSystem.createTrigger SwitchMessageTrigger leftToProne
animationTrigger.addChild stillToProne_zoom
animationTrigger.addChild stillToProne_normal
animationTrigger.message 4

animationSystem.createTrigger SwitchMessageTrigger rightToProne
animationTrigger.addChild stillToProne_zoom
animationTrigger.addChild stillToProne_normal
animationTrigger.message 4

animationSystem.createTrigger Trigger specialMoves
animationTrigger.addChild fromProne
animationTrigger.addChild stillToProne
animationTrigger.addChild forwardToProne
animationTrigger.addChild backwardToProne
animationTrigger.addChild leftToProne
animationTrigger.addChild rightToProne

animationSystem.createTrigger Trigger startup
animationTrigger.addBundle deploy

animationSystem.createTrigger Trigger completeTree
animationTrigger.addChild root
animationTrigger.addChild startup
animationTrigger.addChild specialMoves
0.4 equals to 4 kg.

The reason why I have added this tweak is because the weapons feel too light when running. It doesn't feel like it has any weight, and they all act the same. Sprinting with the weapon jerkly would strain the back, so having a transitional animation makes it seem weighted.

Video showing the tweak for USMC Forces will be uploaded in 10 minutes. All weapons have the tweaks.

All that's needed to do is to double-check them, and implementing it for pistols, knifes, c4, ammo bags and medic bags.

Posted: 2014-04-19 04:57
by Kommdr
Interesting, I would like to see this implemented.

Re: [Tweak] Weighted Sprint by Phale and Arab

Posted: 2014-04-19 04:58
by CTRifle
Id like to see a vid of before and after :D

Re: [Tweak] Weighted Sprint by Phale and Arab

Posted: 2014-04-19 05:03
by Arab
I'll do my best. For now only the results :)

Later, I'll do a compilation video of all factions before and after in one video, though it'll be done in 3 days or so.

Re: [Tweak] Weighted Sprint by Phale and Arab

Posted: 2014-04-19 06:32
by Rhino
Arab wrote:Video showing the tweak for USMC Forces will be uploaded in 10 minutes. All weapons have the tweaks.
- Posted ~2hrs ago?

Can't really comment without a video....

Re: [Tweak] Weighted Sprint by Phale and Arab

Posted: 2014-04-19 07:55
by phale
Hi everyone, this is phale.

If you are interested, I would like to direct you to the tutorial I wrote on BFSP: Battlefield 4 Style Sprint for BF2 - Battlefield SinglePlayer Forum
If you want, you can also view it on ModDB here: Animationsystem1p.inc editing for BF2 tutorial - phale - Mod DB
This tutorial explains the specific tweaks that I use to smooth transitions between animations. This is not limited to weighted sprint; it can be used for all transitions. In particular, I think that the deploy, reload, and sprint animations would all benefit from increased fadeOut times. I also included a technique you can use for your own modding: blending different animations, especially blending zoom animations from one weapon with unzoomed animations from another.

I have used these tweaks to blend together many animations created by the awesome BF2 modding community. On my YouTube channel, you can see some of the results I have come up with: https://www.youtube.com/user/hg426

This an example of my tweaks applied to Chuc's fantastic animations. My settings are a little bit different from Arab's - the fadeIn and fadeOut times are longer.


Anyway, thank you Arab for taking the time to apply my tweaks to all of the Project Reality weapons, and a big thanks to the Project Reality team for creating such an amazing mod. I'm glad to be able to contribute in any way I can.

Re: [Tweak] Weighted Sprint by Phale and Arab

Posted: 2014-04-19 12:36
by Rudd
well, I like :) thanks for sharing!

Posted: 2014-04-19 12:47
by ElshanF
Are going to upload the U.S. forces one yet ? :) + does this mean you can also make the lmgs heavier ?

Re: [Tweak] Weighted Sprint by Phale and Arab

Posted: 2014-04-19 14:18
by titsmcgee852
[R-DEV]Rhino wrote:- Posted ~2hrs ago?

Can't really comment without a video....
Australian internet :-P

Re: [Tweak] Weighted Sprint by Phale and Arab

Posted: 2014-04-20 05:38
by Arab
ElshanF wrote:Are going to upload the U.S. forces one yet ? :) + does this mean you can also make the lmgs heavier ?
I did already uploaded the USMC test video. I am going to try and work on the tweaks as much as I can, but I am waiting until I check it and add values for pistols, medic bag, ammo bag, and then release. Then later a video compilation of all weapons before and after :-)

I will post all values of every gun when it is done and released.

Re: [Tweak] Weighted Sprint by Phale and Arab

Posted: 2014-04-20 09:29
by -=anders=-
I like it guys. Have tried to speed ip the movement before but remain the speed as it is. Cause the animations of sprint we have now is way too slow. :)

Re: [Tweak] Weighted Sprint by Phale and Arab

Posted: 2014-04-20 10:25
by Darman1138
I like it +1

Re: [Tweak] Weighted Sprint by Phale and Arab

Posted: 2014-05-14 00:03
by Arab
Hey guys,

For those wondering if I stopped this, I'm still continuing it. So far done, all rifles, machine guns, rocket launchers have the tweak, but things like knifes, grenades don't because the fix doesn't do anything.

Phale discovered that you could optimize the loading of the animation system by removing codes, and it still works in-game. I will first try to proof-read all weapons, and test them, then I will make a seperate build of the fix, and then I will release it.

Example:
Remove

Code: Select all

animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_deploy.baf
animationManager.looping 0
animationManager.length 7.1
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_fire.baf
animationManager.looping 0
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_reload.baf
animationManager.looping 0
animationManager.length 8
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_run.baf
animationManager.length 0.666667
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_sprint.baf
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_stand.baf
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_tozoom.baf
animationManager.looping 0
As for the animation and video, it will come after I finish it. Gifs may be a better idea for those with slower internet, so I'm considering doing that and a before and after for weapons (not factions).

Re: [Tweak] Weighted Sprint by Phale and Arab

Posted: 2014-05-16 10:33
by Mats391
Arab wrote:Hey guys,

For those wondering if I stopped this, I'm still continuing it. So far done, all rifles, machine guns, rocket launchers have the tweak, but things like knifes, grenades don't because the fix doesn't do anything.

Phale discovered that you could optimize the loading of the animation system by removing codes, and it still works in-game. I will first try to proof-read all weapons, and test them, then I will make a seperate build of the fix, and then I will release it.
What code should get removed? I doubt everything from your example should be removed as those are most animations used.
Also what kind of optimization is the result? Actually loading faster or just easier to code?
Curious to see the result side-by-side with the current animations :)

Re: [Tweak] Weighted Sprint by Phale and Arab

Posted: 2014-05-16 15:20
by phale
Only weapon variations that use the same animations would have those lines removed. The chat_eryx would not have those lines removed. However, for something like the usrif_m16a4_eotech, all of the lines that create animations from usrif_m16a4 can be removed. This is because the first part of the animationsystem.inc creates each animation. If you use the same lines from usrif_m16a4 in every M16 variant, you're unnecessarily creating the animation multiple times. The lines that create the unique zoomed animations for each M16 variant should be kept.
Another note. Animationsystems are created from the top of the handheld folder to the bottom. What his means is that if an animationsystem.inc references an animation from farther down, you'll need to create that animation in that animationsystem.inc (and remove it from the one farther down), or else it will play too slowly.
This sounds complicated, and I'm not sure exactly how much benefit there will be by not re-creating the same animations. I'd expect that for a mod like Project Reality where many animations are shared, it should speed up the loading process. So it's up to you if you want to try it out ;)

Re: [Tweak] Weighted Sprint by Phale and Arab

Posted: 2014-05-17 02:31
by Arab
phale wrote:Only weapon variations that use the same animations would have those lines removed. The chat_eryx would not have those lines removed. However, for something like the usrif_m16a4_eotech, all of the lines that create animations from usrif_m16a4 can be removed. This is because the first part of the animationsystem.inc creates each animation. If you use the same lines from usrif_m16a4 in every M16 variant, you're unnecessarily creating the animation multiple times. The lines that create the unique zoomed animations for each M16 variant should be kept.
Another note. Animationsystems are created from the top of the handheld folder to the bottom. What his means is that if an animationsystem.inc references an animation from farther down, you'll need to create that animation in that animationsystem.inc (and remove it from the one farther down), or else it will play too slowly.
This sounds complicated, and I'm not sure exactly how much benefit there will be by not re-creating the same animations. I'd expect that for a mod like Project Reality where many animations are shared, it should speed up the loading process. So it's up to you if you want to try it out ;)
It's been long since you last posted here :P

I removed every line except the zooming and prone animation on the eryx, and it still works. Not sure if it will cause errors though.

Differences:
PR

Code: Select all

 rem *** Animations ***
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_deploy.baf
animationManager.looping 0
animationManager.length 7.1
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_fire.baf
animationManager.looping 0
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_reload.baf
animationManager.looping 0
animationManager.length 8
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_run.baf
animationManager.length 0.666667
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_sprint.baf
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_stand.baf
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_tozoom.baf
animationManager.looping 0
animationManager.length 1.5
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_zoomFire.baf
animationManager.looping 0
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_zoomRun.baf
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_zoomStand.baf

animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_run_prone.baf
animationManager.length 0.8
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_toprone.baf
animationManager.length 1
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_toprone_rev.baf
animationManager.length 1.2
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_stand_prone.baf 

pr_edit

Code: Select all

 rem *** Animations ***
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_tozoom.baf
animationManager.looping 0
animationManager.length 1.5
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_zoomFire.baf
animationManager.looping 0
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_zoomRun.baf
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_zoomStand.baf

animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_run_prone.baf
animationManager.length 0.8
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_toprone.baf
animationManager.length 1
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_toprone_rev.baf
animationManager.length 1.2
animationSystem.createAnimation Objects/Weapons/Handheld/chat_eryx/Animations/1p/1p_eryx_stand_prone.baf 


Pretty weird that it still works, will make a comparison gif but I have 2 folders: One with the fix and the other without just in-case it causes crashes. So many guns to modify and test, then report on loading times but it'll be worth it hopefully a week before June 30th :)

For developers: Don't use Wordpad. It will mess up the formatting.

Right now, working on applying this tweak to US and MEC to test, and then compare loading times, weapons.

Re: [Tweak] Weighted Sprint by Phale and Arab

Posted: 2014-05-17 04:22
by phale
From my experience, it should still work even if the lines are deleted, but the animation lengths would be different. Maybe this means that you can eliminate all the lines that don't specify anything such as length, looping, etc., but since this wouldn't speed up load times, that shouldn't be necessary. I think the benefit should come from preventing the loading of the same animation multiple times.

Re: [Tweak] Weighted Sprint by Phale and Arab

Posted: 2014-05-17 13:39
by Mats391
I think if you dont create an animation with animationSystem.createAnimation but still use it in the triggers, it will create the animation implicit with default values. So removing those lines wont help much and only make it harder to read the files.
Bundling certain animations into common animation files (e.g. all the M16s use same run animation) will certainly at least reduce the file size of PR. Im unsure if it would reduce the loading times or memory required tho. My guess is that the engine makes one animation cache for each weapon anyway, so it will copy the common animation into each cache at one point or another. This would just move from explicit copies in the file system to implicit copies created at runtime. Depending how much file size you can save with it, it might be worth doing.

Re: [Tweak] Weighted Sprint by Phale and Arab

Posted: 2014-05-18 08:13
by Arab
[R-CON]Mats391 wrote:I think if you dont create an animation with animationSystem.createAnimation but still use it in the triggers, it will create the animation implicit with default values. So removing those lines wont help much and only make it harder to read the files.
Bundling certain animations into common animation files (e.g. all the M16s use same run animation) will certainly at least reduce the file size of PR. Im unsure if it would reduce the loading times or memory required tho. My guess is that the engine makes one animation cache for each weapon anyway, so it will copy the common animation into each cache at one point or another. This would just move from explicit copies in the file system to implicit copies created at runtime. Depending how much file size you can save with it, it might be worth doing.
Yeah, I can confirm what you said is right, and it makes the animations deleted slow and the firing animation doesn't kick back.