Difference between revisions of "Category:NifSE"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
imported>DragoonWraith
Line 16: Line 16:
|OBSEname=NifSE
|OBSEname=NifSE
}}
}}
== Using NifSE ==
With NifSE installed and operating, and the CS opened with OBSE, you may use any of the NifSE functions (below) in a script.
The first step to using NifSE is [[NifOpen]]. NifOpen has NifSE load a .nif file into memory so that you can manipulate it. This process be set to read-only or writable using an optional boolean argument with NifOpen; this argument defaults to false (read-only).
As an example of using NifSE, consider this code:
ref playerWeapon
string_var filepath
short nifID
Begin GameMode
  if ( playerWeapon != player.GetEquippedObject 16 )
    if ( playerWeapon )
      let filepath := NifGetOriginalPath nifID
      SetModelPath filepath playerWeapon
      NifClose nifID
    endif
    let playerWeapon := player.GetEquippedObject 16
    let filepath := GetModelPath playerWeapon
    let nifID := NifOpen filepath 1
    let filepath := NifGetPath nifID
    SetModelPath filepath playerWeapon
  endif
End
Every time the player equips a new weapon, creates a copy of the weapon's model that can be edited using NifSE, and sets the weapon's model to the copy. If a previous weapon had been affected, sets that weapon's model back to its original file, and closes that nif in NifSE. From here, one would presumably have further blocks dedicated to determining when to apply various changes using the other NifSE functions.


[[Category:OBSE Plug-Ins|NifSE]]
[[Category:OBSE Plug-Ins|NifSE]]
[[Category:Functions|NifSE]]
[[Category:Functions|NifSE]]
[[Category:Functions (OBSE)|NifSE]]
[[Category:Functions (OBSE)|NifSE]]

Revision as of 12:32, 25 April 2010



NifSE
Author(s)

DragoonWraith

Current Version 1.0 α1 (GetPluginVersion returns 999)
Description

NifSE is an interface between OBSE and Niflib, allowing scripts to use Niflib functions to manipulate 3D mesh files during runtime.

Installation
  1. E-mail dragoonwraith+nifse [at] gmail.com for a copy of the alpha
  2. Unzip archive to Oblivion\Data\ folder; ensure NifSE.dll is in Oblivion\Data\OBSE\Plugins\ and that there is a Oblivion\Data\Meshes\ni\ folder.
Download

NifScript at TES Nexus Legacy version.

Source Code

Not Available

Discussions
OBSE Name "NifSE"

(for use with IsPluginInstalled/GetPluginVersion)


Using NifSE

With NifSE installed and operating, and the CS opened with OBSE, you may use any of the NifSE functions (below) in a script.

The first step to using NifSE is NifOpen. NifOpen has NifSE load a .nif file into memory so that you can manipulate it. This process be set to read-only or writable using an optional boolean argument with NifOpen; this argument defaults to false (read-only).

As an example of using NifSE, consider this code:

ref playerWeapon
string_var filepath
short nifID

Begin GameMode

  if ( playerWeapon != player.GetEquippedObject 16 )
    if ( playerWeapon )
      let filepath := NifGetOriginalPath nifID
      SetModelPath filepath playerWeapon
      NifClose nifID
    endif
    let playerWeapon := player.GetEquippedObject 16
    let filepath := GetModelPath playerWeapon
    let nifID := NifOpen filepath 1
    let filepath := NifGetPath nifID
    SetModelPath filepath playerWeapon
  endif

End

Every time the player equips a new weapon, creates a copy of the weapon's model that can be edited using NifSE, and sets the weapon's model to the copy. If a previous weapon had been affected, sets that weapon's model back to its original file, and closes that nif in NifSE. From here, one would presumably have further blocks dedicated to determining when to apply various changes using the other NifSE functions.

Subcategories

This category has the following 14 subcategories, out of 14 total.

!

A

E

N

O

P

Pages in category "NifSE"

The following 147 pages are in this category, out of 147 total.