[Alpha] NifSE v1.0 α:4

Post » Wed Jul 14, 2010 8:53 am

The Alpha is being tested as we speak!

The name change is due to occasional mix-ups between NifScript and the Blender Nif Scripts. Because I don't want to infringe on NifTools' excellent work, I decided to rename this utility. NifSE, of course, is a portmanteau of OBSE and Niflib, the principal components of this utility. It's not really a "Nif Script Extender", so, like the SATs, I'm going to declare that it doesn't stand for anything, the name is just "NifSE" (in my head I pronounce it "nif-sea"). Cuz I'm weird like that.

Anyway, for v1.0 we have a staggering number of new functions, plus an entirely new backbone system for storing, manipulating, and saving nif files. There is no more hard-drive bloat, as the nif files are only very briefly written to disk for Oblivion to read when it needs them, and deleted again as soon as it is finished. Nifs are saved in the .obse co-save file, and recreated as needed. The old functions are both now considered deprecated (as is the undocumented function NifGetBackShield, which was never supported in the first place), but backwards compatibility has been maintained, and the old functions have been somewhat updated to use the new system and therefore no longer clutter the user's harddrive.

Download available from http://code.google.com/p/nifse/. Source code also available through SVN at the same place.

Known Bugs (v1.0 α:6)
(Currently none)


To Do List
  • β:1
    • Semi-stable release of α:5, for UV2 beta.

  • Future β
    • Get/Set NiAlphaProperty
    • Get/Set NiStencilProperty
    • Basic collision functionality (check that it's there, remove, etc)

  • Future versions
    • Copy/paste branches from one nif to another
    • Get/Set UV coordinates
    • Animations


Changelog
  • NifSE v1.0 (changes from NifScript v0.9)
    • NifGetAltGrip and NifGetOffhand deprecated.
    • New system for handling Nif files prevents extraneous or unnecessary files from being saved to the harddrive, and eliminates all files while Oblivion is not running.
    • New Functions:
      Spoiler
      • NifOpen
      • NifClose
      • NifGetPath
      • NifGetOriginalPath
      • NifGetNumBlocks
      • GetNifTypeIndex
      • NiObjectGetType
      • NiObjectGetTypeName
      • NiObjectTypeDerivesFrom
      • NiObjectNETGetName
      • NiObjectNETSetName
      • NiObjectNETGetNumExtraData
      • NiObjectNETGetExtraData
      • NiObjectNETGetExtraDataByName
      • NiObjectNETAddExtraData
      • NiObjectNETDeleteExtraData
      • NiExtraDataGetName
      • NiExtraDataSetName
      • NiExtraDataGetNumber
      • NiExtraDataSetNumber
      • NiExtraDataGetString
      • NiExtraDataSetString
      • NiExtraDataGetArray
      • NiExtraDataSetArray
      • NiAVObjectGetLocalTransform
      • NiAVObjectGetLocalTranslation
      • NiAVObjectGetLocalRotation
      • NiAVObjectGetLocalScale
      • NiAVObjectSetLocalTransform
      • NiAVObjectSetLocalTranslation
      • NiAVObjectSetLocalRotation
      • NiAVObjectSetLocalScale
      • NiAVObjectSetLocalTransformTEMP
      • NiAVObjectSetLocalTranslationTEMP
      • NiAVObjectSetLocalRotationTEMP
      • NiAVObjectGetNumProperties
      • NiAVObjectGetProperties
      • NiAVObjectGetPropertyByType
      • NiAVObjectAddProperty
      • NiAVObjectDeleteProperty
      • NiNodeGetNumChildren
      • NiNodeGetChildren
      • NiNodeGetChildByName
      • NiNodeDeleteChild
      • NiTexturingPropertyGetTextureCount
      • NiTexturingPropertySetTextureCount
      • NiTexturingPropertyHasTexture
      • NiTexturingPropertyGetTextureSource
      • NiTexturingPropertyGetTextureClampMode
      • NiTexturingPropertyGetTextureFilterMode
      • NiTexturingPropertyGetTextureFlags
      • NiTexturingPropertyGetTextureUVSet
      • NiTexturingPropertyTextureHasTransform
      • NiTexturingPropertyGetTextureTranslation
      • NiTexturingPropertyGetTextureTiling
      • NiTexturingPropertyGetTextureRotation
      • NiTexturingPropertyGetTextureCenterOffset
      • NiSourceTextureIsixternal
      • NiSourceTextureGetFile
      • NiSourceTextureSetExternalTexture

    • Functions Deprecated:
      Spoiler
      • NifGetAltGrip
      • NifGetOffHand
      • NifGetBackShield (undocumented, untested function)

    • Alpha Changelog:
      Spoiler
      • α:6
        • Improved BSA reading code somewhat to read BSAs that have incorrectly set compression bits.
        • No new functionality; use α:5 example plugin.

      • α:5
        • Complete refactoring of almost every function.
        • Now better reflects underlying structure of the nif.
        • Functions are far more flexible - will allow you to read or change any block that supports that type of data.
        • Functions now take and return a block's absolute position within the nif, rather than position relative to the root node - allows for access to sub-sub-nodes.
        • Still more fixes to deprecated functions - old random crashes should be fixed.

      • α:4
        • Requires OBSE v0019.
        • Passing documentation to CSE re-disabled.
        • Deprecated functions fixed to utilize new system; backwards compatibility and general cleanliness now simultaneously supported.

      • α1.3
        • Private alpha requiring early, debug build of OBSE v0019.
        • Passing documentation to CSE re-enabled, tested - no hang-ups with new OBSE.
        • Loaded savefiles correctly find modified nifs; no more missing mesh markers!

      • α1.2
        • Passing documentation to CSE disabled due to Editor hang-ups. Will be re-enabled once hangs are fixed.
        • Fixed Bug: NifOpen now gives each model a unique ID.
        • Fixed Bug: NifClose no longer crashes the game.

      • α1.1
        • Addition of documentation-passing function to Editor initiation for use with shadeMe's CSE.
        • Fixed Bug: NifGetNthChildLocalRotation now correctly returns the actual local rotation matrix.
        • Changes to the structure of the DLL and the method of including zlib has dramatically increased the size of the DLL. Changes are also not widely tested.

      • α1.0
        • Initial version

  • NifScript v0.9
    • Proof of Concept
    • Functions:
      Spoiler
      • NifGetAltGrip
      • NifGetOffhand


Full documentation of all of the functions in v1.0 can be found http://cs.elderscrolls.com/constwiki/index.php/Category:NifSE.

http://www.gamesas.com/index.php?/topic/1089336-alpha-nifse-v10/
http://www.gamesas.com/index.php?/topic/922622-betawipz-nifscript/

NifSE v1.0 α:5
- an OBSE plug-in by DragoonWraith
1. Introduction
2. Participating in the Alpha
3. Contact
4. Credits

== Introduction ==

NifSE is an OBSE plug-in that allows Oblivion script to operate on Nif files during run-time. Nif files, or NetImmerse Format files, are 3D meshes which are used by Oblivion. These files have long been editable with 3D software and NifTools' excellent NifSkope utility, but certain operations on Nif files have been desirable for scripters and therefore impossible - until now.

More specifically, NifSE uses the NifTools' incredible "C++ library for loading, modifying, and exporting NIF files," NifLib, to create new functions through OBSE's plug-in API. Much thanks to both the OBSE and NifTools teams for their hard work that has made this possible.

== Participating in the Alpha ==

The download is available at http://code.google.com/p/nifse/. It is for testing purposes only, and will break any mods that require the deprecated functions, as backwards-compatibility has been broken in the alpha (it will be restored). Please e-mail me at dragoonwraith+nifse [at] gmail.com if you would like to test it, as there are some additional things you need to know. If you're not interested in testing it, please wait at least until the Beta.

== Contact ==

The preferred method of contacting me is just posting in this thread. Alternatively, a PM on these forums also works.

Notes on my Talk page on the CS Wiki are also acceptable, as are e-mails to: dragoonwraith+nifse [at] gmail.com

Messages or posts on any other forum or website may likely be missed for extended periods of time.

== Credits ==
  • The Oblivion Script Extender team: ianpatt, behippo, and scruggsywuggsy the ferret
    Without OBSE, I would have lost interest in modding Oblivion long, long ago, and without the plug-in API that they created, this project never could have happened

    Special thanks to Scruggs and behippo for answering myriad questions about coding for the OBSE plug-in API, and to Scruggs for implementing new features just for me!

    Extra-double-thanks for Scruggs's continued support, including writing crucial new hooks that allow NifSE to avoid ever cluttering your HD.

  • The NifTools NifLib team: Shon, amorilia, tazpn, xoalin
    The NifTools team had done all the hard work for me - all I did was provide an interface between OBSE and NifLib. Kudos to them on an incredible piece of work.

    Special thanks to amorilia for answering some questions on Nifs in general, and to tazpn for answering some NifLib specific questions.

  • Timeslip, author of the Oblivion Mod Manager and a C++ BSA Reader
    For his excellent BSA reading code, which he had contributed to the NifTools team. Many thanks for his tireless help in debugging the utility, and many apologies for wasting his time with such a silly mistake! Also thanks for OBMM, which I'm using to distribute this mod.

  • Jean-Loup Gailly and Mark Adler
    The zlib code allows me to read BSA files that I otherwise would not be able to read. zlib is an excellent free utility, one of the best products of open source design to date.

  • Speedo
    Help with statically linking zlib into NifScript.

  • throttlekitty, JDFan, and trollf
    For answering questions that I had about Nifs on the CS Forum.

  • opaj
    For help testing.

  • HeX_0ff
    For creating Unnecessary Violence, an incredible mod using NifScript, NifSE's precursor and for general help and feedback on NifScript. Also for helping to spur on NifSE's development

  • Skycaptain
    For getting me back into the game, and giving great feedback on what should be added to NifScript for NifSE.

  • Showler
    For early support of NifSE and an offer to alpha test.

  • Wyzard256, zone22, Skycaptain, HeX_0ff, shadeMe, Gekko64, anithinks, Obliver, and all those who offered good luck and well wishes when my hard drive failed.
    For serious help, advice, links, downloads, and even offers to help pay (!) for a data recovery service when my harddrive failed. Special thanks to zone22 for actually calling me on Skype and spending a good four hours (!) talking me through the data recovery process, and to HeX and shade for offering to do the same. It is only thanks to them that this project, along with ARES and hundreds of my own personal files, did not get entirely destroyed in that failure.


Please post any ideas you have for the utility here!
User avatar
Nauty
 
Posts: 3410
Joined: Wed Jan 24, 2007 6:58 pm

Post » Wed Jul 14, 2010 10:15 am

Uhh... Really. Odd. You have the latest CS and latest OBSE? The Query thing comes during, well, the query function, which checks various versioning things to make sure you're working with a compatible version. I'll check it tonight.

Did you download the source and compile yourself (and if so, how?), or did you get the download download?


Both should be the most up to date-versions (OBSE v0018 stable & CS 1.2.0.404). Never had any problem with other OBSE-Plugins.
I didn't compile anything, just downloaded the archive.
User avatar
Blaine
 
Posts: 3456
Joined: Wed May 16, 2007 4:24 pm

Post » Wed Jul 14, 2010 5:18 am

Yeah, now that shadeMe mentions it, I knew about this, I just forgot it with the harddrive nightmare. I'll upload the alpha 1.0 version tonight when I get home.
User avatar
Dawn Farrell
 
Posts: 3522
Joined: Thu Aug 23, 2007 9:02 am

Post » Wed Jul 14, 2010 6:37 pm

Ok, thanks. :)


Edit:
Just thought of a request which could be really useful:
Could you implement a command to combine two Meshes?
Or at least copy elements from one mesh to the other (if it's done right, adding NifAddChild should be enough). :)
User avatar
Sudah mati ini Keparat
 
Posts: 3605
Joined: Mon Jul 23, 2007 6:14 pm

Post » Wed Jul 14, 2010 4:20 pm

The repository doesn't contain the VC++ project file (.vcproj) by the way.
User avatar
Soraya Davy
 
Posts: 3377
Joined: Sat Aug 05, 2006 10:53 pm

Post » Wed Jul 14, 2010 6:11 am

Oh, that's important? Heh, OK, adding that.
User avatar
Jerry Cox
 
Posts: 3409
Joined: Wed Oct 10, 2007 1:21 pm

Post » Wed Jul 14, 2010 9:01 pm

Oh, that's important? Heh, OK, adding that.
Your project's build configurations and file list are stored in it.
User avatar
Mimi BC
 
Posts: 3282
Joined: Sat Oct 07, 2006 10:30 pm

Post » Wed Jul 14, 2010 6:30 pm

Well it's there now. Still named obse_example_plugin.vcproj; not sure why, honestly.
User avatar
Robert Jr
 
Posts: 3447
Joined: Fri Nov 23, 2007 7:49 pm

Post » Wed Jul 14, 2010 2:58 pm

Head's up: I'm going to be away from the computer where I've been working on NifSE for most of the next week and a half. I should have Internet access and I'll check here, but just letting you know.
User avatar
chloe hampson
 
Posts: 3493
Joined: Sun Jun 25, 2006 12:15 pm

Post » Wed Jul 14, 2010 6:01 pm

I was going through OBSE's source and found that Command_Array.cpp had code related to NifSE. To be more precise, the hooks from Hooks_NifSE.cpp. Any idea why that might be ? (did you/scruggsy paste it there by mistake?)
User avatar
Jah Allen
 
Posts: 3444
Joined: Wed Jan 24, 2007 2:09 am

Post » Wed Jul 14, 2010 11:07 am

I was going through OBSE's source and found that Command_Array.cpp had code related to NifSE. To be more precise, the hooks from Hooks_NifSE.cpp. Any idea why that might be ? (did you/scruggsy paste it there by mistake?)
Looks like it's for when it was still NifScript.
User avatar
Budgie
 
Posts: 3518
Joined: Sat Oct 14, 2006 2:26 pm

Post » Wed Jul 14, 2010 5:58 pm

I can't say, that'd be Scruggsy's doing. The hooks shouldn't need to be there from my understanding, since the Hooks_NifSE.cpp should cover them, but I don't really know.
User avatar
Soku Nyorah
 
Posts: 3413
Joined: Tue Oct 17, 2006 1:25 pm

Post » Wed Jul 14, 2010 9:36 pm

Hi DW,

How are things coming along toward an update to the alpha? Managed to sort out your machine/zlib issues yet? Trying to get my head around beta release timeframes for UVII, at least for a closed beta, but it kinda depends on sorting out the "one use" issue that NiSE has right now...
User avatar
J.P loves
 
Posts: 3487
Joined: Thu Jun 21, 2007 9:03 am

Post » Wed Jul 14, 2010 1:13 pm

I've actually been away from home for the past several days, and am going home tonight only to head back out tomorrow morning. Therefore... nothing's happened recently. I still don't have the damn thing compiling yet...
User avatar
Krista Belle Davis
 
Posts: 3405
Joined: Tue Aug 22, 2006 3:00 am

Post » Wed Jul 14, 2010 8:59 am

Finally uploaded the α1.0 version that should not report incompatibility with the CS as the α1.1 does.
User avatar
Tania Bunic
 
Posts: 3392
Joined: Sun Jun 18, 2006 9:26 am

Post » Wed Jul 14, 2010 4:34 pm

Finally uploaded the α1.0 version that should not report incompatibility with the CS as the α1.1 does.
Bravo. Did you figure out what was casuing those linker errors ?
User avatar
CSar L
 
Posts: 3404
Joined: Fri Nov 09, 2007 9:36 pm

Post » Wed Jul 14, 2010 6:55 pm

ill have to brave the documentation soon, pretty much with this new one I should be able to edit item meshes on the go to remove the body parts and i'll be able ot just have the single custom body mesh set up so that script can hide certain bits.

In total, this script extender cuts off a huge compatibility problem I had and saves me work, now I just have to figure out all the scripting for it (and I must say, thanks for the detailed documentation on the wiki, that stuff if priceless).
User avatar
lisa nuttall
 
Posts: 3277
Joined: Tue Jun 20, 2006 1:33 pm

Post » Wed Jul 14, 2010 11:49 pm

Bravo. Did you figure out what was casuing those linker errors ?

No. Like I said, I've been on the other side of the country for the past five days, and I'm leaving this afternoon for another four days. So I'll have had 10 days with less than 24 hours in front of the computer that has NifSE - and most (as in literally more than 50%) of that was spent catching up on much-needed sleep. So I haven't touched it.
User avatar
jessica breen
 
Posts: 3524
Joined: Thu Aug 03, 2006 1:04 am

Post » Wed Jul 14, 2010 1:59 pm

No. Like I said, I've been on the other side of the country for the past five days, and I'm leaving this afternoon for another four days. So I'll have had 10 days with less than 24 hours in front of the computer that has NifSE - and most (as in literally more than 50%) of that was spent catching up on much-needed sleep. So I haven't touched it.
Ah, forgive me - Seems I misread the version number :facepalm:
User avatar
josie treuberg
 
Posts: 3572
Joined: Wed Feb 07, 2007 7:56 am

Post » Wed Jul 14, 2010 2:05 pm

Edit:
Just thought of a request which could be really useful:
Could you implement a command to combine two Meshes?
Or at least copy elements from one mesh to the other (if it's done right, adding NifAddChild should be enough). :)


Just in case this was overlooked.

Finally uploaded the α1.0 version that should not report incompatibility with the CS as the α1.1 does.


Unfortunately didn't have much luck with it. :(
obse(_editor).log only says
checking plugin D:\Programme\Spiele\Oblivion\Data\OBSE\Plugins\\NifScript.dll
couldn't load plugin D:\Programme\Spiele\Oblivion\Data\OBSE\Plugins\\NifScript.dll


If I rename the *.dll to NifSe.dll nothing, but the file name changes. :(
User avatar
Add Me
 
Posts: 3486
Joined: Thu Jul 05, 2007 8:21 am

Post » Wed Jul 14, 2010 11:36 pm

Argh, OK, I'll fix that.

EDIT: Try it now.

@ your request: Yes, I intend to add that eventually. Not in v1.0 though, as that will be somewhat complicated.
User avatar
anna ley
 
Posts: 3382
Joined: Fri Jul 07, 2006 2:04 am

Post » Wed Jul 14, 2010 4:55 pm

Argh, OK, I'll fix that.

EDIT: Try it now.


Works, but I got an Error Message saying couldn't inject dll if I have too many OBSE-Plugins installed. This only occurs with the CS.
Maybe this happens because the NifSe.dll is too big, so my PC runs out of memory. :shrug:

Anyway, I'm able to use it (and to be honest: I don't need most of the OBSE-Plugins I deactivated), so there's no real problem. :)


Not able to test ingame, because my code has some errors in it. Maybe sometimes the next days.

@ your request: Yes, I intend to add that eventually. Not in v1.0 though, as that will be somewhat complicated.


:)


Don't hurry, this would just be sth. I'd use in another planed project, when I get bored (which won't happen in the near future I think :P).
User avatar
Katie Pollard
 
Posts: 3460
Joined: Thu Nov 09, 2006 11:23 pm

Post » Wed Jul 14, 2010 10:12 am

Looked into this today - I've gotten zlib linked correctly. NifLib, on the other hand, is putting up a fight.
User avatar
Bloomer
 
Posts: 3435
Joined: Sun May 27, 2007 9:23 pm

Post » Wed Jul 14, 2010 11:17 am

im just going to pop in and say this.

if you ever manage to get a way to 'merge' two nifs or copy nodes from one nif to another, then it would be possible to get an effect of having more equipment. Would be another step towards fixing one of oblivion's biggest problems, limited slots.

The way i see, for example; you have a wings mod that equips in the cuirass slot (most dont but whatever) thne you could merge the wings and a cuirass together into a single mesh, with some fancy scripting you could could make it look like the 2 objects are equipped, with sthe same effects aas having both, but really having 1 item with the mesh, and the other as a dummy (takes up no slots, but those still give magic effects/armor bonus i believe). Cuirass breaks? then you'd split it again and only the original wings mesh would show again.

In my mind I have it mostly figured out, and I think it would work, would be pretty sweet too.I will keep it in mind for if you ever manage to merge nifs.


Anyway, with the current stuff, Im interested in testing the new functions, so Im sending an email off to you.
User avatar
Jason White
 
Posts: 3531
Joined: Fri Jul 27, 2007 12:54 pm

Post » Wed Jul 14, 2010 7:37 pm

Works, but I got an Error Message saying couldn't inject dll if I have too many OBSE-Plugins installed. This only occurs with the CS.
Maybe this happens because the NifSe.dll is too big, so my PC runs out of memory. :shrug:

Anyway, I'm able to use it (and to be honest: I don't need most of the OBSE-Plugins I deactivated), so there's no real problem. :)

Weird. Maybe ask Scruggs about it?

Not able to test ingame, because my code has some errors in it. Maybe sometimes the next days.

Don't worry about it! Just let me know how it goes!

Looked into this today - I've gotten zlib linked correctly. NifLib, on the other hand, is putting up a fight.

Odd. Niflib gave me no trouble. What'd you do to get zlib linked?

im just going to pop in and say this.

if you ever manage to get a way to 'merge' two nifs or copy nodes from one nif to another, then it would be possible to get an effect of having more equipment. Would be another step towards fixing one of oblivion's biggest problems, limited slots.

Yes, I realized this.
User avatar
Angel Torres
 
Posts: 3553
Joined: Thu Oct 25, 2007 7:08 am

Next

Return to IV - Oblivion