Difference between revisions of "Arcane University:Nifskope Weapons Setup"

The Beyond Skyrim Wiki — Hosted by UESP
Jump to: navigation, search
(Pre-requisites)
(Added in some info on the NiStringExtraData block and the values used for various weapons.)
Line 77: Line 77:
  
 
== Weapon Type - NiStringExtraData (Prn) ==
 
== Weapon Type - NiStringExtraData (Prn) ==
 +
 +
In order to make sure your weapon is sheathed in the correct position, you need to add a NiStringExtraData block to the BSFadeNode. This needs to have <code>Prn</code> as its name, and one of the values in the table below as its string data. This (in part) lets the game know where the weapon is sheathed and what kind of animations are used. If this block is not present in your nif, the weapon will likely show up at your feet. The following table shows which values are used by the vanilla Skyrim game, and by which kind of weapons.
 +
 +
{| class="wikitable sortable"
 +
|-
 +
! scope="col"| String Data
 +
! scope="col"| Used by
 +
|-
 +
| QUIVER || Arrows
 +
|-
 +
| SHIELD || Shields, some staffs, torches
 +
|-
 +
| WeaponAxe || (War/Hand)Axes
 +
|-
 +
| WeaponBack || Greatswords, warhammers, battleaxes
 +
|-
 +
| WeaponBow || Bows, crossbows
 +
|-
 +
| WeaponDagger || Daggers
 +
|-
 +
| WeaponMace || Mace
 +
|-
 +
| WeaponStaff || Most staffs
 +
|-
 +
| WeaponSword || (One-handed) Swords
 +
|-
 +
| WeaponAxe || (War/Hand)Axes
 +
|}
  
 
== Collision - bhkCollisionObject ==
 
== Collision - bhkCollisionObject ==

Revision as of 18:47, 16 April 2021

< Arcane University:3D Art

This guide will details all there is to know about setting up weapons models to be game-ready.

This is a workflow-agnostic tutorial revolving around nifskope.
As long as your workflow allow you to export model into a bare NIF model containing only the geometry, you can follow along to get your weapon game-ready.


General Considerations

There is a few things to know before getting started: Skyrim only support a limited number of weapons variations:

  • 1 Handed
    • Daggers
    • Swords
    • Waraxes
    • Maces
  • 2 Handed
    • Greatsword
    • Battleaxe
    • Warhammer
  • Ranged
    • Bows
    • Crossbows
  • Special
    • Staves

Anything you may see in mods are just models setup to look somewhat right (or not) as one of the above type.

Aside the gameplay-oriented differences, the weapon type define:

  • Where the weapon will go on the 3rd person model when sheathed
  • Which animation set it will be using
  • Which kind of impact it will create when hitting things (sounds and visuals)
  • Where the player character will grip the model when holding it

If the last point (impacts) don't matter much here, the other 3 set the limitation with how different your model can be from the target weapon type.
A handle to big will see the player's hand inside it, a blade too long will clip through the ground when sheathed, a bow to wide will obstruct the view of the player when aiming in 1st person, etc...

As such, it is important to know in advance which weapon type your weapon will target, and eventually to use one of the vanilla model as reference for the proportions when modelling.


Another thing to keep in mind is that Skyrim supports special 1st person models, which may be higher quality than their worldmodel / 3rd person model counterpart as the model won't be used for cluttering, or worn by NPCs.
It is not mandatory to provide a different model for 1st person and 3rd person, unless the 1st person model absolutely need to be high poly and high-res, but this is something to keep in mind when designing generic weapons that may be used by the hundreds by a level designer to clutter an armory. On the other hand, unique weapons are probably best kept at high quality for both variants.

Pre-requisites

To follow this tutorial, you will need:

  • Nifskope
  • Skyrim Legendary Edition
  • The Creation Kit
  • A way to export/convert a model's geometry from your modelling software to a NIF.

Anatomy of a weapon NIF

Root - BSFadeNode

Inventory Position - BSInvMarker

In your inventory, your item will always be viewed from the positive y-axis. In order to change how it is viewed in the inventory, insert a BSInvMarker into the BSFadeNode, within the 'Extra Data List':

  • First, create the BSInvMarker by right-clicking onto the BSFadeNode and using Block > Insert > Bethesda > BSInvMarker.
  • Increase the Num Extra Data List by one and refresh the Extra Data list array. This will add an empty entry to the Extra Data list array.
  • Insert the number of the BSInvMarker to this array. In vanilla nifs, the BSInvMarker appears to be first, before BSX or PRN blocks, so you may need to reshuffle the numbers in the array to match this.

The BSInvMarker affects how the model is viewed in the inventory, thought the following fields:

  • Zoom affects how large the item will appear - if it is too small in the inventory, increase this value.
  • The three fields Rotation X, Rotation Y and Rotation Z each influence rotation of the item in the inventory. They are integers representing the number of radians*1000 turned around each respective axis. This is always clockwise when viewed from the positive side of the respective axis. To see how this looks in something like Blender, view it from the positive y axis, set the rotation mode to ZYX Euler, and use the following formula to determine the rotation in degrees for each axis:

rotation in degrees = -360 * field value / (2*pi*1000)

It is important to remember the - here, since the rotation in Blender is the opposite direction. If you have a rotation in Blender that you want to show in the inventory, use this formula (same settings, so ZYX Euler rotation mode and viewed from the positive y-axis):

field value = -1000 * 2*pi* (rotation in degrees/360)

You cannot enter negative values in the fields, so make sure to start from negative values in Blender, since they will be made positive via the formula. If you do not have negative values to begin with, subtract 360 degrees again and again until you do.

Metadata - BSXFlags

Weapon Type - NiStringExtraData (Prn)

In order to make sure your weapon is sheathed in the correct position, you need to add a NiStringExtraData block to the BSFadeNode. This needs to have Prn as its name, and one of the values in the table below as its string data. This (in part) lets the game know where the weapon is sheathed and what kind of animations are used. If this block is not present in your nif, the weapon will likely show up at your feet. The following table shows which values are used by the vanilla Skyrim game, and by which kind of weapons.

String Data Used by
QUIVER Arrows
SHIELD Shields, some staffs, torches
WeaponAxe (War/Hand)Axes
WeaponBack Greatswords, warhammers, battleaxes
WeaponBow Bows, crossbows
WeaponDagger Daggers
WeaponMace Mace
WeaponStaff Most staffs
WeaponSword (One-handed) Swords
WeaponAxe (War/Hand)Axes

Collision - bhkCollisionObject

Scabbard Model (Scb) - NiTriShape

Blood Lighting - NiTriShape

Blood Effects - NiTriShape

Weapon Model - NiTriShape(s)

Example