Difference between revisions of "Category:NifSE"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
imported>DragoonWraith
(missed one of the versions)
 
(25 intermediate revisions by the same user not shown)
Line 2: Line 2:


{{OBSE Plugin
{{OBSE Plugin
|Version=1.0 <span style="font-size:145%;font-family:Cambria,serif;font-style:italic;">α</span>1
|Version=1.2 b1
|InternalVer=999
|InternalVer=0x0001201F (66079)
|Name=NifSE
|Name=NifSE
|Author=[[User:DragoonWraith|DragoonWraith]]
|Author=[[User:DragoonWraith|DragoonWraith]]
|Description=NifSE is an interface between OBSE and Niflib, allowing scripts to use Niflib functions to manipulate 3D mesh files during runtime.
|Description=NifSE is an interface between OBSE and Niflib, allowing scripts to use Niflib functions to manipulate 3D mesh files during runtime.
|Install=
|Install=
# E-mail dragoonwraith+nifse [at] gmail.com for a copy of the alpha
# Download archive from Google Code or TES Nexus(see below).
# Unzip archive to <tt>Oblivion\Data\</tt> folder; ensure NifSE.dll is in <tt>Oblivion\Data\OBSE\Plugins\</tt> and that there is a <tt>Oblivion\Data\Meshes\ni\</tt> folder.
# Unzip archive to <tt>Oblivion\Data\</tt> folder; ensure that <tt>NifSE.dll</tt> is in the <tt>Oblivion\Data\OBSE\Plugins\</tt> folder.
|Download=[http://www.tesnexus.com/downloads/file.php?id=21292 NifScript at TES Nexus] Legacy version.
|Download=
* [http://code.google.com/p/nifse/ NifSE at Google Code] (through v1.2)
* [http://www.tesnexus.com/downloads/file.php?id=21292 NifSE at TES Nexus] (through v1.2)
|Source=[http://code.google.com/p/nifse/source/checkout NifSE SVN at Google Code]
|Discussions=
|Discussions=
* [http://forums.bethsoft.com/index.php?/topic/1089336-alpha-nifse-v10/ <nowiki>[Alpha]</nowiki> NifSE v1.0]
* [http://forums.bethsoft.com/topic/1513902-relzbeta-nifse-12-b1-astonishing-as-that-is/ <nowiki>[RELz/Beta]</nowiki> NifSE 1.2 b1, astonishing as that is]
* [http://forums.bethsoft.com/index.php?/topic/1197808-relz-nifse-v10/ <nowiki>[RELz]</nowiki> NifSE v1.0]
* [http://forums.bethsoft.com/index.php?/topic/1114745-betarelzwipz-nifse-v10/ <nowiki>[BETA/RELz/WIPz]</nowiki> NifSE v1.0 <span style="font-size:145%;font-family:Cambria,serif;font-style:italic;">β</span>:1 - <span style="font-size:145%;font-family:Cambria,serif;font-style:italic;">β</span>:6]
* [http://forums.bethsoft.com/index.php?/topic/1092017-alpha-nifse-v10-a11/ <nowiki>[Alpha]</nowiki> NifSE v1.0 <span style="font-size:145%;font-family:Cambria,serif;font-style:italic;">α</span>1.1-<span style="font-size:145%;font-family:Cambria,serif;font-style:italic;">α</span>:6]
* [http://forums.bethsoft.com/index.php?/topic/1089336-alpha-nifse-v10/ <nowiki>[Alpha]</nowiki> NifSE v1.0 <span style="font-size:145%;font-family:Cambria,serif;font-style:italic;">α</span>1.0]
* [http://forums.bethsoft.com/index.php?/topic/922622-betawipz-nifscript/ <nowiki>[BETA/WIPz]</nowiki> NifScript]
* [http://forums.bethsoft.com/index.php?/topic/922622-betawipz-nifscript/ <nowiki>[BETA/WIPz]</nowiki> NifScript]
|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).
{{NifSE Example}}
== NIF Structure ==
NIF files are made up of a series of blocks, or <tt>NiObject</tt>s, which contain various different types of data. To understand NIF files and how to manipulate them, one must understand both the block hierarchy, and the structure of the NIF.
For the actual structure of NIF files, one starts with the root. The root is a <tt>NiNode</tt> block that is the first block in almost all NIF files (and therefore has <tt>blockID</tt> of 0, the default value of that parameter in NifSE functions). The root has a list of "Children" which are <tt>NiAVObject</tt> blocks. Since <tt>NiNode</tt> is a form of <tt>NiAVObject</tt> itself, these children can also be <tt>NiNode</tt> blocks, or other forms of <tt>NiAVObject</tt>. Further, since <tt>NiAVObject</tt> is sub-class of <tt>NiObjectNET</tt>, both the root and all of its Children have a list of Extra Data, which are <tt>NiExtraData</tt>-derived blocks.
For the rest of the NIF block hierarchy, start with the [[:Category:NifSE (NiObject)|<tt>NiObject</tt>]], the most basic block, and explore the hierarchy. For NifSE's purposes, only certain blocks are shown, since these are the only blocks that NifSE can interact with. To understand the full scope of NIF blocks, see the [http://niftools.sourceforge.net/doc/niflib/classNiflib_1_1NiObject.html Niflib Documentation].


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

Latest revision as of 16:33, 8 February 2015



NifSE
Author(s)

DragoonWraith

Current Version 1.2 b1 (GetPluginVersion returns 0x0001201F (66079))
Description

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

Installation
  1. Download archive from Google Code or TES Nexus(see below).
  2. Unzip archive to Oblivion\Data\ folder; ensure that NifSE.dll is in the Oblivion\Data\OBSE\Plugins\ folder.
Download
Source Code

NifSE SVN at Google Code

Discussions
OBSE Name "NifSE"

(for use with IsPluginInstalled/GetPluginVersion)


Using NifSE[edit | edit source]

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).

Example

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.

NIF Structure[edit | edit source]

NIF files are made up of a series of blocks, or NiObjects, which contain various different types of data. To understand NIF files and how to manipulate them, one must understand both the block hierarchy, and the structure of the NIF.

For the actual structure of NIF files, one starts with the root. The root is a NiNode block that is the first block in almost all NIF files (and therefore has blockID of 0, the default value of that parameter in NifSE functions). The root has a list of "Children" which are NiAVObject blocks. Since NiNode is a form of NiAVObject itself, these children can also be NiNode blocks, or other forms of NiAVObject. Further, since NiAVObject is sub-class of NiObjectNET, both the root and all of its Children have a list of Extra Data, which are NiExtraData-derived blocks.

For the rest of the NIF block hierarchy, start with the NiObject, the most basic block, and explore the hierarchy. For NifSE's purposes, only certain blocks are shown, since these are the only blocks that NifSE can interact with. To understand the full scope of NIF blocks, see the Niflib Documentation.

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.