Corvine

Animation Inheritance and the 'modes' block

This tutorial is on how to add inherited animations and more importantly, functional animations to a biped. Let’s say, for example, you want to make a grunt able to drive a warthog. The first thing people have thought of is to swap the warthog_d seat with ghost_d, but that’s wrong, and bad! It breaks the animations of others, it breaks scripts, ect. What you’re gonna want to do instead is inherit animations and edit the modes block in the jmad.

 

Before you start, I suggest making a backup of your mod, this will come in handy later when we deal with the modes block.

 

Animation Inheritance

We'll be inheriting warthog_d animations from the marine to the grunt, so the first step is to open the jmad tag of both. After that, go down to the bottom of the grunt jmad, hit the gear on the 'new inheritance list' to add a new element, and set the inherited graph to the marine jmad. After that, add as many 'Node Map' elements as there are 'skeleton node's in your inherited graph (check back at the other jmad for this. For marines, this is 70) and add 'node map flags' so that you have as many as your node maps can fit divided by 32, rounded up. You'll then want to cross reference the names in the skeleton nodes of both the grunt and the marine for this next step, so I would suggest taking out a notepad and copying them down with their number in each respective list. For each entry in the 'Node Map' under the new inheritance list, you'll want to add in the number corresponding to the name of the skeleton node in the grunt jmad that is identical to the marine skeleton node you are on. If there is none, type in -1. After that, go through the 'node map flags' and check every flag who's corresponding value in the nodemap isn't -1. The second page uses the second numbers next to the checkbox, third page third, ect. Once done, it should look something like this.

iiHgupCYD2TTuD5q4PN-9ZibjZSH9ROPyN7bcoiugTE6bF5r3fNyBAaTBFGneLBQglzhQZcAYtf2QRWD5KdXLt6v2Q5Z6St44kqMDdsJ1Mm4i9U2rvWvvEgogEUst87i--MukMdV

After this is done, you'll want to make new elements in your grunt jmad for all the new animations you want. while I'll only show one, for our purposes you'll want all 8 animations named warthog_d:, as well as any other warthog animation if you want to give the grunt full access to all of the seats and boarding. You'll likely want to name your animation the same as the one you're taking, for example warthog_d:acc, copy the values and flags from it, except you'll want to leave the shared animation data block with no elements, as well as add the element number of what animation you want to copy into the shared animation index, and add the marine jmad to the shared graph reference. Additionally, you'll most likely want to flag translate root and scale only on each animation to ensure your biped does stretch out to marine proportions. When you're done, it should look like this, and repeat as necessary for your needs.

erHaoQLYNu5ZKXCf650UKF7CWY-UOA84q9ew8bwHOiQYLDbwNGEhCrAo1I5jxk1xAmPWAqEcoLGkjGQT76uu2dIV42e7o3LcGRjQkpJoIIzcqfYTSKW5ah2XlwzGqmV80ww1gZyt

Modes block Editing

 Now, you may think you'd be done. You have your animations after all, right? Technically yes, but the game will never actually call them up like this, and that's where one of the easily overlooked blocks you scrolled past to get to inheritance comes in, the modes block. This dictates all of the actions a biped can do, and the animations associated with them. (This is also separate from the mode tag, which is the model)

 

 What you’ll need to add to your grunt's modes block is warthog_d, warthog_p, and warthog_g, as well as warthog_b_d, warthog_b_p, and warthog_b_g if you want them to be able to board. However, the block needs to be in a certain order. While it is possible to remake the entire block to fit these in, I suggest instead making the jmad in another version of the same map, and then importing it into the map you’re working on, as this sorts it correctly. Open up the jmad for the marine (or anything else that does what you want your biped to do). Copy the names of the main block into your jmad’s main block at the end of it, and then export.

hdK2UrjLj7JAFUvMs7OOJI1hF2ST5OVs8W7D8ltJoQqpyP_F9PoCwkeWX5HUgSM4cxTLqKza2oDYdXhryro50n1047dbR-5vGSgeLmNbJmVFtlTrixs-8FSPjDox-vSEpHRn_KFT

Once you’ve exported, reimport the files into the version of the map you’re actually working on, thus sorting all the files. From this point you’ll want to fill in the blocks with all the relevant sub-blocks for the actions you’ll need. You’ll need to fill in weapon class, weapon type, and sets with any for nearly all blocks, but may need more for blocks where players can use their weapons. You’ll also need an enter, an exit, an idle, and an ejection under action for seats such as warthog_d. You may also need to add overlays, and overlay groups. Warhog_d as per the marine needs aim_still_up, grip, acc, and look_still_up, and remember, keep them in order. The actions and overlays need to reference animations,
Overlay groups are set by number in the idle block of a vehicle, and sometimes the enter and exit as well, particularly for something like passenger seats where you can aim and shoot in them. These need to be set up for your character to lean, look around, aim their weapons, and other essentials such as those. You’ll need to probably create an overlay group, as well as a few new blend screens, which the overlay group will reference. For warthog_d, you’ll make an overlay group named warthog_d:aim_still_up, and have 3 entries in the blendscreens.

uC_BURXgSRXcp_u7xzkS50QJBCOwAt1wIHoogJFDiYHc99BiTNvQX1mtMlhX_p0t9PFUdEhqd33cYU1LwwfIbtD95P2yDEyc8_09GR62lfpIzSWyT1G7adRGENsE5rOrM7Tso9Wh

Warthog_d:acc, warthog_d:aim_still_up, and warthog_d:look_still_up. The node mask index should be -1 on all of these except warthog_d:aim_still_up, which should instead be 0.

Basically, just copy values from the spartan. acc and aim_still_up should generally look like this regardless of vehicle:

 

ZefjOzbMsKDML8H4Zg7e-1EHtJRWU8ggxSwSVQKtepgY2jnpWDL7uVDr35b6DFKQ0X_XGNCzp8ye3oJGsTRQ1844VJgbUpdcKWAWX2Hp7Mz8r7Xw8p-rdht6mDKSHEFO1MOfegXclY0zGOf0-6sbrwmomO-AsSjogHHJTjaE_PT98lid65b948lz13aeZpe50aQLLGLMhxhW0kLcwfS-xPWI3a9-W_fnP2K7PsdicRIU8WFGjdZXWlVCVz30aXZzroDjukXOV54ViRyA

Make sure the animations are pointing in the right place in the new blend screens as well. Once you’re done with that, and you’ve added them to the overlay group and the overlay group to the idle, you should have a grunt who can successfully enter a warthog driver seat. This information should be applicable to a great many things, such as giving any biped any weapon (involves that weapon class section), getting elite players into sabres, and much more.

Takka and Zatarita like this

Share this post


Link to post
Share on other sites

Tiddy-bits:

  • Recently Browsing   0 members

    No registered users viewing this page.