Thread: Can player models use random idle animations?

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Apr 2019
    Posts
    8

    Can player models use random idle animations?

    I've been working on a personal player model (using The303's Compile-o-matic as a base), and I've noticed that player models have three identical idle animations: idle, look_idle, and deep_idle.

    I was hoping that I could take advantage of the two redundant idle animations, and inject a little extra variety into "act_idle" by altering the "action tag" weighting numbers for these animations in anims.qc, as they're seemingly used for animations tagged with "die_backwards" and "die_headshot". Unfortunately I haven't had any luck getting my own values to work in-game. I'm assuming this is just an unmentioned restriction for player models, but it's better to ask and be sure.

    Can player models make use of custom weighting numbers to trigger random animations, or does the engine completely ignore custom values for player models?

  2. #2
    Regular player DNIO071's Avatar
    Join Date
    Mar 2016
    Location
    Argentina
    Posts
    74

    Re: Can player models use random idle animations?

    Someone else might be able to confirm this but I'm pretty sure the game only uses deep_idle.

    Player models change animations according to their index and do not depend entirely of their action tag, this is why old models play random animations since they're missing the new ones introduced in version 5.0
    Have a nice day, no matter what you went through it'll all be okay by tomorrow.

  3. #3
    Registered User
    Join Date
    Apr 2019
    Posts
    8

    Re: Can player models use random idle animations?

    Quote Originally Posted by DNIO071 View Post
    Someone else might be able to confirm this but I'm pretty sure the game only uses deep_idle.
    After a little more testing, it seems Sven uses "idle" while unequipped. Though that said, once you get a weapon or health pack, the idle animation seems to revert to "ref_aim_X" where X is the equipped item — this basically strikes out what I was hoping to achieve anyway lol, oops.

    For what it's worth: When I say "random animation", I'm talking about the weight number following action tags.
    Code:
    anims.qc from The303's Compile-o-matic
    
    // Idles & movement
    $sequence "look_idle" "../_ANIMATIONS/look_idle" fps 14 loop ACT_IDLE 1 
    $sequence "idle" "../_ANIMATIONS/idle" fps 14 loop ACT_IDLE 1 
    $sequence "deep_idle" "../_ANIMATIONS/deep_idle" fps 12 loop ACT_IDLE 4 
    ...
    
    // Deaths
    ...
    $sequence "die_backwards1" "../_ANIMATIONS/die_backwards1" fps 26 ACT_DIEBACKWARD 4 { event 2001 13 } 
    $sequence "die_backwards" "../_ANIMATIONS/die_backwards" fps 30 ACT_DIEBACKWARD 2 { event 2001 15 } 
    ...
    $sequence "headshot" "../_ANIMATIONS/headshot" fps 24 ACT_DIE_HEADSHOT 4 { event 2001 22 } 
    $sequence "die_spin" "../_ANIMATIONS/die_spin" fps 30 ACT_DIE_HEADSHOT 2 { event 2001 16 }
    Going by the GoldSrc QC compile commands glossary on The303's site: Using a "1" after an action tag supposedly means that any amount of randomization is disabled, while higher numbers should cause an animation to play more frequently than animations with lower numbers - within the same action tag.

    By those rules, "look_idle" and "idle" both cancel out the random weighting for "act_idle", so the weight tag on "deep_idle" does nothing. But, the action tags "act_diebackwards" and "act_die_headshot" both feature two animations each, with weight numbers higher than "1", suggesting that there's supposed to be a random chance of viewing either animation. I haven't tried to test whether deaths-via-headshot actually have a random chance of playing one of the two headshot death animations, and The303's QC glossary says that weighting numbers are only used for monsters anyway, so I don't know if Sven is even doing anything with these extra animations.

    My original hope was that the weight numbers for "act_idle" could be altered, so that "act_idle" would have a random chance of playing any of the three animations. It'd be nice to have more freedom with player model animations (plus more control/documentation for how animations are compiled and used in-game), but I'm gonna move onto other stuff for now. Maybe these player model limitations could change in a later major update?
    Last edited by Lollie; 11-04-2019 at 06:17 AM. Reason: source of code, highlighting values

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •