Adding Custom Creature Animations

From NWN1 Custom Content Guide

(Redirected from Creatures:Animating)
Jump to: navigation, search

Contents

[edit] NWN Custom Animations Tutorial

[edit] Intro

First off, let me talk about what this tutorial is about. This tutorial deals with how to get the 10 custom animations Bioware enabled in the 1.64 patch of NWN. For the purposes of this tutorial, we will assume that you, the reader, already know how to animate for NWN and how to export your models/animations for use with NWN.

[edit] Tools

Here are the tools we will be using: 3DSMax (v5.0 or higher) or GMax, NWNExplorer and NWMax v0.7. You will also need to have NWN patched up to v1.64 or higher.

  • 3DSMax (Discreet Software) is the tool of choice in creating models and animations for NWN, specifically because NWMax was created for 3DSMax. However, it may be too expensive for the most users.
  • GMax is a free software package also made by Discreet (same guys who made 3DSMax). It is geared towards modders and more casual users. It contains many of the modeling and animation tools that 3DSMax has, but some of the more powerful tools and functions are not available in GMax. For the purposes of this tutorial, all the tools you will need can be found in GMax.
  • NWNExplorer (created by Roboius) is a tool for browsing and exporting game assets for NWN. It is free and be downloaded from the Neverwinter vault (http://nwvault.ign.com)
  • NWMax (created by Joco) is a suite of plugins and tools for 3DSMax/GMax that allows you to import and export nearly all NWN’s 3D art assets. It supports all the basic model types in NWN (creature, placeable, tile, door, weapons, armor, robes, emitters, lights, etc). It is continuously being developed and upgraded with tons of features. You can download the latest version from the NWMax website (http://www.nwmax.com).

[edit] Game Assets

Ok, now let’s get down to the nitty-gritty of adding custom animations to a model. Let’s begin with a fresh copy of one of the core human male supermodels, namely “a_ba.mdl”.

  • Exporting game assets
    1. Fire up NWNExplorer and open out the main data files for the latest XP you have installed. If you have HotU (or both HotU and SoU, then that will be “NWN: HotU main data”, if you have just SoU, then that will be “NWN: SoU main data”. If you have just vanilla NWN, then that will be “NWN main data”.
    2. Open up one of the following sub-trees depending onw which XP main data folder you just opened:
      • HotU: “data\xp2_models.bif”
      • SoU: “data\xp1_models.bif”
      • NWN: “data\models_01.bif”
    3. Open up the “models” sub-tree inside the sub-tree that you just opened.
    4. Right-click on a_ba.mdl and select “export” from the popup menu. You will be prompted for a folder where you want to save the exported file. Put it in any directory you want to work from (do NOT put it in override)

Once done, you can close NWNExplorer.

[edit] Getting NWMax Ready for Custom Animations

Next, we have to modify a file in NWMax so that it will export custom animations with the correct animation names. This section is for NWMax v0.7 only. NWMax v0.8 has the proper animation names already incorporated into the character.nam file. Once you have NWMax v0.8 you can safely skip to the next section.

  • Modifying NWMax Character Animation list file
    1. Browse to the directory where you installed NWMax. By default it should be “C:\3DSMax\Scripts\NWMax\”.
    2. Open up the “character.nam” file in notepad (or any worthy text editor).
    3. Search for the section that contains “action01” to “action10” and delete it.
    4. Replace that section with the following text. Note that there are NO leading zeros in the animation names (i.e. “custom1start” not “custom01start”).
         ----------
         custom1start
         custom1lp
         custom1end
         custom2start
         custom2lp
         custom2end
         custom3start
         custom3lp
         custom3end
         custom4start
         custom4lp
         custom4end
         custom5start
         custom5lp
         custom5end
         custom6start
         custom6lp
         custom6end
         custom7start
         custom7lp
         custom7end
         custom8start
         custom8lp
         custom8end
         custom9start
         custom9lp
         custom9end
         custom10start
         custom10lp
         custom10end

When you are done, save the file and close your text editor


[edit] Adding new Custom Animations to the Model

We are now ready to work on the model itself. Open up 3DSMax/GMax (henceforth referred to collectively as Max). NWMax should start up along with Max. GMax users should make sure that the snoop icon is present in the system tray before proceeding. If it is not there, consult the NWMax documentation and make sure you installed NWMax correctly.

Import the a_ba.mdl file you exported earlier in the tutorial using the NWMax import function on the NWMax panel (henceforth known as the speedbar). Make sure “Import Geom and Anims” is selected on the import options section. Once the import routine is done, you should have your model onscreen with all the animations properly set up.

We will now proceed to add new custom animations to the model:

Select the modelbase object and go to the modify panel. Scroll down to the “MDL Base Parameters” rollout, specifically the “Animation Parameters” section. Follow the steps below to define a new animation on the modelbase:

  • Defining a new animation on the modelbase
    1. Enter values for the “Start Frame” and “End Frame” fields in the “Animation Parameters” section. These will be the range of frames that will be used for your new animation. NWN uses 30frames per second as a standard. Make sure that the values are for frames after the last animation of your model so that the animations will not overlap. Don’t worry if there are already values in those fields. As long as you do not press the “Apply Edits” button, none of the changes you make are saved.
    2. Set your transition value to any value between 0.0 and 1.0. This is the time the engine will take to blend smoothly between whatever animation is playing and your custom animation. 1.0 is 1 second blending (sluggish) and 0.0 is no blending (jerky). 0.3 is a good value to use
    3. Make sure “export anim” is checked
    4. Set your “anim root” value to rootdummy (or the name of your modelbase)
    5. Open out the drop-down (list-combo) box under “anim name/available anims”. Scroll till you find the custom animation names we added earlier (e.g. “custom1start”) and select the one you want to use
    6. Click “Add” button. You newly defined animation cycle should appear in the list of animations on the “Animation Parameters” rollout.

Once you’ve defined all the new custom animations you wish, you can proceed to animate your model however you wish as long as you keep within the frame range you defined for your animations.

When you are done animating and are ready to export your model, select the modelbase and go to the modify panel. Open out the “Active Sanity Checks” rollout and uncheck all but the following: Z

  • Zero Rotation
  • Valid Anim Keys
  • Node Name Validity
  • Zero World Scale
  • Valid Controllers on Keys
  • Animroot Node Existence
  • Skinning: 4 Bones per Vert (you can leave this unchecked if your model does not use skinmesh)

Scroll the panel back up till you get to the “MDL Base Parameters” section of the rollout. Make sure you have a valid export directory set in the export “dir” field. (Do NOT export directly to override - I cannot stress this enough. Copy files to override later when you are ready to test, but leave your override as clean as possible. You will thank me for this later.) Leave “compile exported model” unchecked. You do not need to compile your model as there is no discernable performance hit for ASCII models compared to binary ones. Moreover, the nwnmdlcomp program does not do a good job of compiling models that have custom animations or custom supermodels.

Once you are satisfied with everything, you can hit the “Export Geom and Anims” button on the “MDL base parameters rollout” (NOT the export all or selected button on the speedbar). You should now have a model ready for the game.

[edit] Getting the New Animation in-Game

You can put your new model with custom animations in a hakpack or the override to test.

The animation names used to call the custom animations in nwnscript are

  • “ANIMATION_LOOPING_CUSTOM1”
  • “ANIMATION_LOOPING_CUSTOM2”
  • “ANIMATION_LOOPING_CUSTOM3”
  • “ANIMATION_LOOPING_CUSTOM4”
  • “ANIMATION_LOOPING_CUSTOM5”
  • “ANIMATION_LOOPING_CUSTOM6”
  • “ANIMATION_LOOPING_CUSTOM7”
  • “ANIMATION_LOOPING_CUSTOM8”
  • “ANIMATION_LOOPING_CUSTOM9”
  • “ANIMATION_LOOPING_CUSTOM10”.

Note that there is no leading zero (0) between the "CUSTOM" and the number in the animation names.

That’s all there is to it. Happy animating =D


Main Page | Animations | Adding Custom Creature Animations

Personal tools