avatar
Anonymous
×
Create a new article
Write your page title here:
We currently have 21 articles on EpicestGamer Wiki. Type your article name above or click on one of the titles below and start writing!



EpicestGamer Wiki

This is a guide to create and implement physics collisions for custom kits and assets using NifSkope and Elric. Some familiarity with NifSkope and its' functions is required for this guide.

Setup

Have your collision-less nif ready, as well as separate .obj meshes for each different physics material in your asset.

If you don't already have .obj files for your collisions use the following settings for exporting your collisions from blender:

NifSkope

Open up your nif file in NifSkope. As of writing this guide I'm using NifSkope 2.0 Dev 11, which you can find at the fo76utils fork of NifSkope.

On each NiNode in your file set the Flags in Block Details to 14.

BSXFlags Node

If your file does not already have a BSXFlags node inside it, right click inside of the Block List, and do "Block -> Insert -> Bethesda -> BSXFlags".

Click on your new BSXFlags node, inside Block Details set "Integer Data" to 130.

Next click on your root node (Usually the NiNode at the top of the Block List, with a 0 next to it.) In its' Block Details, set "Num Extra Data List" to 1, and then refresh Block Details, open up "Extra Data List" and set "Extra Data List 0" to the number next to your new BSXFlags node.

Importing Physics

Now, create (or use) sibling NiNodes for each physics material under the root NiNode.

For each collision material select one of your NiNode siblings and run "File -> Import -> Import .OBJ as Collision". Now, follow the following directions depending on if you're making a Static asset or a Movable Static asset.

For Static nifs:

  1. bhkRigidBody -> Rigid Body Info -> Motion System -> MO_SYS_INVALID

For Movable Statics:

  1. bhkRigidBody -> Rigid Body Info -> Motion System -> MO_SYS_DYNAMIC
  2. bhkRigidBody -> Layer -> FO4_CLUTTER
  3. bhkRigidBody -> Rigid Body Info -> Layer -> FO4_CLUTTER
  4. bhkRigidBody -> Rigid Body Info -> Quality Type -> MO_QUAL_MOVING
  5. bhkRigidBody -> Rigid Body Info -> Mass -> Set this to a sensible weight number, roughly the amount of kilograms your thing weighs.

For Both:

  1. bhkNiTriStripsShape -> Material -> Something sensible for your physics material

Elric

Once you've finished importing and setting up your collisions, save your nif and process it using Elric using these settings:

Congratulations! You've now set up a nif file with collisions.