1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Rifleman with Melee Combat Animations

Discussion in 'Civ4 - Unit Graphics' started by SaibotLieh, Feb 13, 2010.

  1. SaibotLieh

    SaibotLieh Emperor

    Joined:
    Sep 25, 2009
    Messages:
    1,467
    I experimented a bit with adding animations to a unit, using Gagonite's tutorial Modifying the Visibilty of Weapons. I've added the pikeman melee combat animations to the riflemanset, resulting in riflemen who, when attack in close combat, will fight back with a mounted bayonet.
    Spoiler :


    BANZAI!

    In the end I think it's more trouble than it's worth, at least for the riflemen, because the animation is only seen when they are attacked by melee units. However, it was an interesting experiment. :)

    Download link: http://forums.civfanatics.com/downloads.php?do=file&id=14237
     
  2. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,571
    Location:
    London, UK
    Cool stuff, good work. :)
     
  3. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,393
    Location:
    DE/NL/FR
    Nice experiment :goodjob:.
    Should be a standard unit in every expansion :).
     
  4. uncle_jesse

    uncle_jesse Chieftain

    Joined:
    Jan 3, 2010
    Messages:
    13
    This is amazing! I'm just getting into making units and I wanted to know how to merge animations like that, is it all done in nifskope or nifviewer? awesome stuff :D
     
  5. mechaerik

    mechaerik Tuturuu!

    Joined:
    Oct 28, 2008
    Messages:
    7,064
    Location:
    Los Angeles
    :eek::eek::eek:

    How did you do that? I tried doing that before, but failed miserably. Miserably. I tried to do that when I was making my WWI rifleman.
     
  6. The Capo

    The Capo godless Heathen

    Joined:
    Jan 29, 2001
    Messages:
    9,302
    Location:
    Washington, DC
    Good work, I like it. Now I gotta figure out how to give all my flavored riflemen this animation. :crazyeye:
     
  7. GeoModder

    GeoModder Deity

    Joined:
    Nov 29, 2005
    Messages:
    7,512
    Someone will need to rebone them all? :mischief:
     
  8. SaibotLieh

    SaibotLieh Emperor

    Joined:
    Sep 25, 2009
    Messages:
    1,467
    Thanks for the praises everybody. :)

    Beside the bayonet that I made with Blender everything was done with NifSkope. The tutorial explains the process quite well. I have started with adding a weapon to a unit that will be invisible in some animations. After having mastered this, I tried the addition of animations. I had to do a bit more than what is explained in the tutorial, because the rifleman.nif lacks the BIP R Clavicle bone that is necessary for the pikeman animations. I'll try to write about what I did as a comment in the tutorial in the next days.
    I also though about adding the pikeman animation to the infantry unit, but because it's bones are named Bip01, this would mean a lot or renaming in the animation files. More than I was willing to do. :sad:

    Are they reskins or did you modifier more? Maybe exchanging the meshes via NifSkope could be enough to make it work.
     
  9. garlic pudding

    garlic pudding Chieftain

    Joined:
    Oct 1, 2006
    Messages:
    70
    Before I try, do you think I can use this great rifleman's animations (melee and ranged) and simply swap them to some other ranged unit? I would use the animations on a cannonier armed with a redcoat's rifle.
     
  10. The Capo

    The Capo godless Heathen

    Joined:
    Jan 29, 2001
    Messages:
    9,302
    Location:
    Washington, DC
    No, they're more involved, so I might have to take them into Blender unfortunately.
     
  11. phungus420

    phungus420 Deity

    Joined:
    Mar 1, 2003
    Messages:
    6,296
    A request that's been made a few times along this line, but no one was ever able to figure out, was to add a pilum animation to the Legionnaire. Someone came close, but basically it just made the Legionnaire throw a pilum when fighting a ranged unit, and do the melee animation when fighting another melee unit. What would be awesome would be to get the Legionnaire to throw a pilum, then close and fight with swords. If you could get that to work alot of people would use it.

    Also does this Rifleman Animation still have the Rifleman fire at least a single volley then fight with bayonets later, or is it an either/or thing (bayonet against melee, shooting against ranged). If it's either/or it suffers the same issue as the Legionnaire pilum animation. If the Rifleman always fires a volley and then goes to bayonets if a melee unit rushes it (like how archers pull knives when melee units close), this animation looks awesome. If it's the latter can this animation be used with all units that use the Rifleman.kfm?
     
  12. ambrox62

    ambrox62 Emperor

    Joined:
    Mar 24, 2005
    Messages:
    1,294
    I'll be very interested to read that :goodjob:
    Animations still are a "black hole" for many aspects.
    Having a full detailed guideline on "how to merge existing animations" would be really precious :yup:
     
  13. SaibotLieh

    SaibotLieh Emperor

    Joined:
    Sep 25, 2009
    Messages:
    1,467
    The problem I think would be that your unit will be without the rifle in melee combat. I added that weapon to the rifleman and make it invisible whenever not needed. You can however try to replace the rifleman body with the cannonier body and both rifles with the redcoat's rifle in the rifleman.nif (exchange the NiTexturingProperty and the NiTriShapeDate of each mesh via NifSkope).

    Ah, too bad. :(

    That would require a deeper change in the program code I'm afraid. As I know the only way to change the way the unit behaves is to change the bActAsRanged entry in the CIV4ArtDefines_Unit.xml. 0 makes them behave like Archers, 1 like Longbowman. Archers only shoot before melee combat if they get a first strike.

    Gagonite's tutorial (http://forums.civfanatics.com/showthread.php?t=312613) already covers most of the things I did. The only thing I'll have to add is how the missing bones can be added to the unit in order to let it uses all animations without glitches.
     
  14. SaibotLieh

    SaibotLieh Emperor

    Joined:
    Sep 25, 2009
    Messages:
    1,467
  15. Ahwaric

    Ahwaric Shrubbery-hugger

    Joined:
    Nov 12, 2005
    Messages:
    1,217
    Location:
    Kraków, Poland
    Just dropped by to thank you for this - now my armored musketmen from steampunk civ will also fight in close combat. Of course, you are credited. :)

    I had some problems merging unit art with your animations, but after renaming the nif back to rifleman it is working fine.
    BTW, you may want to use the redcoat rifle - it has a nice bayonet.

    Edit:
    decided to post a screen of the unit using your modified animations
     

    Attached Files:

  16. GeoModder

    GeoModder Deity

    Joined:
    Nov 29, 2005
    Messages:
    7,512
    Where can we find this armored musketman? IOW, where's the download from this steampunk civ?
     
  17. Ahwaric

    Ahwaric Shrubbery-hugger

    Joined:
    Nov 12, 2005
    Messages:
    1,217
    Location:
    Kraków, Poland
    Mechanos (the steampunk civ) is part of my mod based on FfH, linked in my signature. But the armored musketman in currently released version uses standard rifleman animation. If you want the modified one now, I have attached the file.

    It uses rifleman animation by SaibotLieh (included in pack for convinience), pikeman body, red coat rifle and head of unknown origin (forgot where I got it...)
     

    Attached Files:

  18. GeoModder

    GeoModder Deity

    Joined:
    Nov 29, 2005
    Messages:
    7,512
    Thanks. :)
     
  19. SaibotLieh

    SaibotLieh Emperor

    Joined:
    Sep 25, 2009
    Messages:
    1,467
    Good idea with the bayonet. I didn't thought much about it at that time, just was happy that the animations work. :D
    Very nice work with the conversion to the steampunk unit. :goodjob:
     
  20. mechaerik

    mechaerik Tuturuu!

    Joined:
    Oct 28, 2008
    Messages:
    7,064
    Location:
    Los Angeles
    Speaking of the Redcoat, perhaps you could do the same thing to him? :please:
     

Share This Page