Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Dryfire reload anims?  (Read 4715 times)

0 Members and 1 Guest are viewing this topic.

Offline Monkatraz

  • *
  • *
  • +4% chance to make useful post
  • Monkatraz has no influence.
Dryfire reload anims?
« on: November 22, 2013, 04:32:20 PM »
I know 009 some time ago made dryfire reload anims for SMOD: Tactical, however I'm not sure how he did it.

Smod Tactical reload test

From what I can tell it uses shotgun anims. An incredibly fast firing shotgun and depending how long it takes to reload it does a different animation. However I'm not sure if I'm right. Any ideas?
MLG

Offline hazard777

  • Jaws of Infinity
  • *
  • +1% chance to make useful post
  • hazard777 has no influence.
Re: Dryfire reload anims?
« Reply #1 on: November 22, 2013, 08:53:49 PM »
Judging by the HUD I think it's the same technique used in SMOD: Revolution, unfortunately I have no idea how they did this, so you'll have to look into the cfgs/weapon scripts.
You can download it in the release archive on mediafire.

Offline Vedad1944

  • *
  • +2% chance to make useful post
  • Vedad1944 has no influence.
Re: Dryfire reload anims?
« Reply #2 on: November 23, 2013, 12:07:32 PM »
Hmm, I just thought about it, HL1 and HLS both have dry reload anims implemented (mainly the glock) AND they actually use the dryfire anim. Maybe decompilig the glock model from HLS might give you the right ACT_VM sequence for the dry reload sequence. I might have HLS somewhere on my HDD, let me check.

EDIT: Here we go
Code: [Select]
$sequence reload "reload" ACT_GLOCK_SHOOT_RELOAD 1 fps 25.00 {
  { event 5004 4 "items/9mmclip2.wav" }
  { event 5004 23 "items/9mmclip1.wav" }
}

$sequence reload_noshot "reload_noshot" ACT_VM_RELOAD 1 fps 25.00 {
  { event 5004 4 "items/9mmclip2.wav" }
  { event 5004 23 "items/9mmclip1.wav" }
}
Note that the "reload" sequence is the one with the dryfire anim while the "relaod_noshot" is the one with a bullet in the chamber.
So try using "ACT_VM_SHOOT_RELOAD" for your dryfire reload, the engine might recognize it as the anim your want.
Hope I helped  ;D
« Last Edit: November 23, 2013, 12:23:54 PM by Vedad1944 »

Offline Monkatraz

  • *
  • *
  • +4% chance to make useful post
  • Monkatraz has no influence.
Re: Dryfire reload anims?
« Reply #3 on: November 24, 2013, 08:58:28 PM »
It's a cfg script I currently don't understand. It uses ent_fire on your weapon and toggle animations and such, or it's the shotgun idea because I would think that the M4 was standalone. Maybe revolution uses a more advanced version?
MLG

Offline Vedad1944

  • *
  • +2% chance to make useful post
  • Vedad1944 has no influence.
Re: Dryfire reload anims?
« Reply #4 on: November 24, 2013, 09:12:53 PM »
You tried downloading it? I'm sure you can find something out in the scripts of SMOD revolution.
And yeah in the vid you were right its a super fast shotgun reload since the numbers raise rapidly in the ammo count.
Definitely try looking into Revolution's scripts, I would start there.  :)

Offline Monkatraz

  • *
  • *
  • +4% chance to make useful post
  • Monkatraz has no influence.
Re: Dryfire reload anims?
« Reply #5 on: November 24, 2013, 09:19:10 PM »
Did some looking. It's shotgun reloads. I'm thinking it's timed. The animation is just one singular animation but depending how long it takes sets the animation time. The SAME WAY AS THE SHOTGUN INSERT WORKS. Or it's two animations and I still haven't figured it out. This is some M16 activites in SMOD revolution.

Code: [Select]
"Activities" {
//                      "Deploy"        "ACT_VM_FIREMODE"
// "ModeSwitch" "ACT_VM_FIREMODE"
"ShotgunReload" "ACT_VM_BULLET"
"ShotgunReloadStart" "ACT_VM_RELOAD"
"ShotgunReloadFinish" "ACT_VM_REARM"
//                      "SecondaryFire"        "ACT_VM_RELOAD"
}

EDIT: Take it back, actually it's shotgun pump. CSS activities do that. That means though, to do a dryfire your gun has to first reset, or it won't work. You would need an anim like the one in the video, reload, put your hand down, and then cock the gun. Or else it will just cut off.
« Last Edit: November 24, 2013, 09:23:25 PM by Monkatraz »
MLG

Offline Vedad1944

  • *
  • +2% chance to make useful post
  • Vedad1944 has no influence.
Re: Dryfire reload anims?
« Reply #6 on: November 25, 2013, 01:35:12 PM »
I noticed that. So basically you need a separate cocking anim for the gun and it plays separately from the reload sequence.

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: Dryfire reload anims?
« Reply #7 on: November 27, 2013, 07:35:22 PM »
just take the idle smd and trim all of the frames except for one and save it as pump.smd ???

Offline F-3

  • *
  • +2% chance to make useful post
  • F-3 has no influence.
Re: Dryfire reload anims?
« Reply #8 on: November 27, 2013, 09:02:54 PM »
just take the idle smd and trim all of the frames except for one and save it as pump.smd ???

This is going to be my next step, having exhausted all other options with shotgun animations.

EDIT: That definitely works as far as making ShotgunReload happen rapidly.

Unfortunately I'm not seeing a way to stop ShotgunReloadFinish (the bolt pull, in this instance) from playing whether the gun is empty or not. DryFire in combination with the shotgun animations seems to result in a really slow reload.

I feel some other method was used in addition here.
« Last Edit: November 27, 2013, 10:24:16 PM by F-3 »

Offline sirmasters

  • *
  • +5% chance to make useful post
  • sirmasters barely matters.sirmasters barely matters.
    • My Twitter (My Forums are inactive at the moment)
Re: Dryfire reload anims?
« Reply #9 on: November 28, 2013, 04:13:42 AM »
just take the idle smd and trim all of the frames except for one and save it as pump.smd ???

This is going to be my next step, having exhausted all other options with shotgun animations.

EDIT: That definitely works as far as making ShotgunReload happen rapidly.

Unfortunately I'm not seeing a way to stop ShotgunReloadFinish (the bolt pull, in this instance) from playing whether the gun is empty or not. DryFire in combination with the shotgun animations seems to result in a really slow reload.

I feel some other method was used in addition here.

ShotgunPump (Empty chamber additional animation) is you want to use for the bolt pull, not ShotgunReloadFinish (Stopped reloading animation). Figured all the replaceable activities from searching the SMOD DLL a long time ago.

Sorry to bump this, but I found some stuff while looking in the DLLs using a hex editor involving the "Activities" section. I'll post the stuff that wasn't probably known.
Code: [Select]
ShotgunReloadStart - When your shotgun is about to reload

ShotgunPump - Pumping the shotgun, either after a shot or after finishing reloading

ShotgunReloadFinish - Played after finishing putting all the buck-shots in the gun.

ShotgunReload - When putting the buck-shot in

Prefire - Mini-gun spin up animation

GatlingFire2 - When firing with the mini-gun settings, maybe for second animation layer or something

GatlingFire1 - When firing with the mini-gun settings

These are all tested in SMOD 40 and are confirmed to work for that version.
« Last Edit: November 28, 2013, 04:19:42 AM by sirmasters »
._. I love coffee.

Offline F-3

  • *
  • +2% chance to make useful post
  • F-3 has no influence.
Re: Dryfire reload anims?
« Reply #10 on: November 28, 2013, 06:11:06 PM »
That seems to result in a slow reload too, for some reason. None of the animations play, and the ammo counter ticks up slowly.

Code: [Select]
"Activities" {
"ShotgunReloadStart" "ACT_VM_MAG" // change mag
"ShotgunReload" "ACT_VM_FILLER" // 1 frame
"ShotgunReloadFinish" "ACT_VM_FILLER" // 1 frame
"ShotgunPump" "ACT_VM_BOLT" // bolt pull
}

Offline Monkatraz

  • *
  • *
  • +4% chance to make useful post
  • Monkatraz has no influence.
Re: Dryfire reload anims?
« Reply #11 on: November 28, 2013, 06:31:17 PM »
Take the sequence in the QC and change the number after FPS to something like 1000. This speeds it up insanely. Make sure it's  on the insert anim.
MLG

Offline sirmasters

  • *
  • +5% chance to make useful post
  • sirmasters barely matters.sirmasters barely matters.
    • My Twitter (My Forums are inactive at the moment)
Re: Dryfire reload anims?
« Reply #12 on: November 30, 2013, 08:15:35 PM »
That seems to result in a slow reload too, for some reason. None of the animations play, and the ammo counter ticks up slowly.

Code: [Select]
"Activities" {
"ShotgunReloadStart" "ACT_VM_MAG" // change mag
"ShotgunReload" "ACT_VM_FILLER" // 1 frame
"ShotgunReloadFinish" "ACT_VM_FILLER" // 1 frame
"ShotgunPump" "ACT_VM_BOLT" // bolt pull
}

Try using different ACTs, maybe ones that are actually defined for HL2 and SMOD may help the missing animation issue. Also Monkatraz's idea might work.

I was messing around in Source source code and found something.
This is a list of all Viewmodel activities used in Hl2(and SMOD I presume)
Useful when you're messing around with weapon animations.
Names are self-explanatory so I'm not gonna describe them.
Code: [Select]
( ACT_VM_DRAW );
( ACT_VM_HOLSTER );
( ACT_VM_IDLE );
( ACT_VM_FIDGET );
( ACT_VM_PULLBACK );
( ACT_VM_PULLBACK_HIGH );
( ACT_VM_PULLBACK_LOW );
( ACT_VM_THROW );
( ACT_VM_PULLPIN );
( ACT_VM_PRIMARYATTACK );
( ACT_VM_SECONDARYATTACK );
( ACT_VM_RELOAD );
( ACT_VM_DRYFIRE );
( ACT_VM_HITLEFT );
( ACT_VM_HITLEFT2 );
( ACT_VM_HITRIGHT );
( ACT_VM_HITRIGHT2 );
( ACT_VM_HITCENTER );
( ACT_VM_HITCENTER2 );
( ACT_VM_MISSLEFT );
( ACT_VM_MISSLEFT2 );
( ACT_VM_MISSRIGHT );
( ACT_VM_MISSRIGHT2 );
( ACT_VM_MISSCENTER );
( ACT_VM_MISSCENTER2 );
( ACT_VM_HAULBACK );
( ACT_VM_SWINGHARD );
( ACT_VM_SWINGMISS );
( ACT_VM_SWINGHIT );
( ACT_VM_IDLE_TO_LOWERED );
( ACT_VM_IDLE_LOWERED );
( ACT_VM_LOWERED_TO_IDLE );
( ACT_VM_RECOIL1 );
( ACT_VM_RECOIL2 );
( ACT_VM_RECOIL3 );
( ACT_VM_SPRINT_ENTER );
( ACT_VM_SPRINT_IDLE );
( ACT_VM_SPRINT_LEAVE );
( ACT_VM_ATTACH_SILENCER );   // Seems to be for CS:S, but was under HL2 header
( ACT_VM_DETACH_SILENCER );  // So I'm leaving it just in case // may not work since it needs ACT_VM_IDLE_SILENCER to work properly
Full list (non VM only) can be found in activitylist.cpp in game_shared
._. I love coffee.

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: Dryfire reload anims?
« Reply #13 on: December 01, 2013, 04:08:30 PM »

Offline Comrade

  • *
  • *
  • +11% chance to make useful post
  • Comrade might someday be someone...Comrade might someday be someone...Comrade might someday be someone...Comrade might someday be someone...
Re: Dryfire reload anims?
« Reply #14 on: December 01, 2013, 04:26:10 PM »