[BETA/WIPz] NifScript

Post » Tue May 17, 2011 3:00 am

At any rate, you won't ever have to worry about it. The meshes will exist when you need them.

now that is one nice feature of note (among the many nice features)
Pacific Morrowind
User avatar
Roddy
 
Posts: 3564
Joined: Fri Jun 15, 2007 11:50 pm

Post » Tue May 17, 2011 7:31 am

Quite probably. But it looks somewhat like it's a no-go from that thread?

At any rate, since there are a bunch of requests in that direction, after I get v1.0 out, I'll look into collision stuffs.

From what I'd said back in that thread ? That was before I considered NifScript :D Thanks !

Hehehe, this is the sweet bit. I delete meshes "when Oblivion is done with them". Similarly, I create the meshes "when Oblivion needs them". Scruggs set up an awesome system for me where I can tell when either of those events has occurred, and create or delete the mesh as necessary. Therefore, the mesh will only exist for as long as Oblivion needs it. If I understand correctly, it only needs the file when the mesh is being loaded - once it is loaded, I'll delete it. I'll write it anew if Oblivion informs me that it needs to reload it.

At any rate, you won't ever have to worry about it. The meshes will exist when you need them.

Great Success :clap:
User avatar
Josee Leach
 
Posts: 3371
Joined: Tue Dec 26, 2006 10:50 pm

Post » Tue May 17, 2011 9:56 am

Ah, it is the same command I sent you. I haven't touched it since. Did it work when I sent it to you?


For default meshes it works like a charm. I'll post the other mail's I send you since you last reply:

Tried to test with a *.nif with other values, so I just twisted one around. ;)
The first Mesh I tried produced a CTD (see appendage), I'll try with a StandartMesh twisted around next.

LP


First, before I forget about it: Maybe you should add a female-Flag to the Nif-Commands working with Biped-/Ground-Path, or change them to work with a Path provided by a String instead.
This shouldn't be a problem with shields (although even a Vanilla-Shield has a Female-Biped-Path defined, but it's the same as the Male one. ;) ), but for other wearable Objects...


And now about my test with the NifGetBackShield-Command:
The CTD has nothing to do with the Mesh, but with the shield not being a part of the Oblivion.esm.
When I use a Vanilla-Shield as a Dummy there's no CTD, but the new Mesh is shown a bit right of the character. :(
I readjusted the settings a bit (just according to my visual judgment) and the new mesh gets displayed as it should.

LP


PS: Something about the appendage:
Shield.nif: The New Mesh I used for testing.
Shield.NifScript.Prn....: The Mesh created by NifGetBackShield
BackShield.nif: The Back-Mesh how it should be. ;)


Me again, I think the Rotation created by NifGetBackShield is correct, it's just in the wrong position.
I forgot that the original ReversedShield-Mesh was somewhat diagonal itself. :-[


I wrote a little Plugin for testing purpose.
It's a very simplified Version of my Shield on Back-Plugin. It only works with the first equipped shield.
See Attachment.


LP


Should I upload the attachments anywhere else or are the emails enough?
I can resend them, too, if you'd prefer it that way.

btw.:
I think you forgot to change the Version returned by GetPluginVersion (or did it return 0 at the first release?).


Hehehe, this is the sweet bit. I delete meshes "when Oblivion is done with them". Similarly, I create the meshes "when Oblivion needs them". Scruggs set up an awesome system for me where I can tell when either of those events has occurred, and create or delete the mesh as necessary. Therefore, the mesh will only exist for as long as Oblivion needs it. If I understand correctly, it only needs the file when the mesh is being loaded - once it is loaded, I'll delete it. I'll write it anew if Oblivion informs me that it needs to reload it.

Performance issues may come into play here, though. If I find that I'm writing/deleting too often and it's having a negative influence on performance, I'll just write them when Oblivion asks for them, and delete them when the player quits (or reloads, since I'll have to delete them and then re-write them with the save game's version to make sure that changes that happened since the save that's being loaded don't incorrectly persist).

At any rate, you won't ever have to worry about it. The meshes will exist when you need them.


:obliviongate:

Now that's something awesome. :shifty:
User avatar
roxxii lenaghan
 
Posts: 3388
Joined: Wed Jul 05, 2006 11:53 am

Post » Tue May 17, 2011 1:22 am

http://www.gamesas.com/bgsforums/index.php?s=&showtopic=870602&view=findpost&p=14555189 using the NifGetBackShield-Command. :)
User avatar
Ally Chimienti
 
Posts: 3409
Joined: Fri Jan 19, 2007 6:53 am

Post » Tue May 17, 2011 2:39 pm

So it works? Or is it still off?

I'm not going to support that one. In v1.0, you can do far more complicated and customized manipulations, and that function will remain undocumented and unsupported. The other two will become deprecated.
User avatar
Alex [AK]
 
Posts: 3436
Joined: Fri Jun 15, 2007 10:01 pm

Post » Tue May 17, 2011 7:35 am

Not at all, the one in the version you send me worked better. ;)

NifScript.log:
queryloadoblivion root = D:\Programme\Spiele\Oblivion\List of BSA files: (excluding BSA files known to contain non-NIF data)	D:\Programme\Spiele\Oblivion\Data\Clean Spellbook.bsa	D:\Programme\Spiele\Oblivion\Data\DLCBattlehornCastle.bsa	D:\Programme\Spiele\Oblivion\Data\DLCFrostcrag.bsa	D:\Programme\Spiele\Oblivion\Data\DLCHorseArmor.bsa	D:\Programme\Spiele\Oblivion\Data\DLCOrrery.bsa	D:\Programme\Spiele\Oblivion\Data\DLCShiveringIsles - Meshes.bsa	D:\Programme\Spiele\Oblivion\Data\dlcthievesden.bsa	D:\Programme\Spiele\Oblivion\Data\DLCVileLair.bsa	D:\Programme\Spiele\Oblivion\Data\Knights.bsa	D:\Programme\Spiele\Oblivion\Data\Oblivion - Meshes.bsa	D:\Programme\Spiele\Oblivion\Data\Raceenabler.bsa	D:\Programme\Spiele\Oblivion\Data\Unarmored Skill for Everyone.bsa		12 total.NifFile c'tor - Default constructorNifFile c'tor - Default constructorNifScript::NifGetBackShield called!NifGetBackShield - Shield: Pelz-SchildToggleTag - Element "Prn" first tag in path. Set with value "Bip01 L Shoulder Helper".CheckFileLocation - File "Armor\Fur\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" not found!CheckFileLocation - File "Armor\Fur\Shield.NIF" found in BSA!TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.CopyNif - File "Armor\Fur\Shield.NIF" found in "D:\Programme\Spiele\Oblivion\Data\Oblivion - Meshes.bsa"! Copying to "Armor\Fur\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" in folder!CopyNif - Creating directory "D:\Programme\Spiele\Oblivion\Data\Meshes\Armor" as necessaryCopyNif - Creating directory "D:\Programme\Spiele\Oblivion\Data\Meshes\Armor\Fur" as necessaryNifFile c'tor - NifFile created without editing.NifFile.setRoot() - Setting root to root of "Armor\Fur\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF"!CheckFileLocation - File "Armor\Fur\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" not found!CopyNif - File "Armor\Fur\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" not found!NifFile.setRoot - File cannot be read!NifGetBackShield - Nif could not be read!NifFile c'tor - Default constructorNifScript::NifGetBackShield called!NifGetBackShield - Shield: Pelz-SchildToggleTag - Element "Prn" first tag in path. Set with value "Bip01 L Shoulder Helper".CheckFileLocation - File "Armor\Fur\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" not found!CheckFileLocation - File "Armor\Fur\Shield.NIF" found in BSA!TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.CopyNif - File "Armor\Fur\Shield.NIF" found in "D:\Programme\Spiele\Oblivion\Data\Oblivion - Meshes.bsa"! Copying to "Armor\Fur\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" in folder!CopyNif - Creating directory "D:\Programme\Spiele\Oblivion\Data\Meshes\Armor" as necessaryCopyNif - Creating directory "D:\Programme\Spiele\Oblivion\Data\Meshes\Armor\Fur" as necessaryNifFile c'tor - NifFile created without editing.NifFile.setRoot() - Setting root to root of "Armor\Fur\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF"!CheckFileLocation - File "Armor\Fur\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" not found!CopyNif - File "Armor\Fur\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" not found!NifFile.setRoot - File cannot be read!NifGetBackShield - Nif could not be read!NifScript::NifGetBackShield called!NifGetBackShield - Shield: LegionsschildToggleTag - Element "Prn" first tag in path. Set with value "Bip01 L Shoulder Helper".CheckFileLocation - File "Armor\Legion\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" not found!CheckFileLocation - File "Armor\Legion\Shield.NIF" found in BSA!TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.CopyNif - File "Armor\Legion\Shield.NIF" found in "D:\Programme\Spiele\Oblivion\Data\Oblivion - Meshes.bsa"! Copying to "Armor\Legion\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" in folder!CopyNif - Creating directory "D:\Programme\Spiele\Oblivion\Data\Meshes\Armor" as necessaryCopyNif - Creating directory "D:\Programme\Spiele\Oblivion\Data\Meshes\Armor\Legion" as necessaryNifFile c'tor - NifFile created without editing.NifFile.setRoot() - Setting root to root of "Armor\Legion\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF"!CheckFileLocation - File "Armor\Legion\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" not found!CopyNif - File "Armor\Legion\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" not found!NifFile.setRoot - File cannot be read!NifGetBackShield - Nif could not be read!


Console:
NifScript::NifFile c'tor - Default constructorError in script 0b0015b8Operator := failed to evaluate to a valid resultError in script 0b0015b8An expression failed to evaluate to a valid resultset global >> 0.00NifScript::NifGetBackShield called!NifScript::NifGetBackShield - Shield: Pelz-SchildNifScript::ToggleTag - Element "Prn" first tag in path. Set with value "Bip01 L Shoulder Helper".NifScript::CheckFileLocation - File "Armor\Fur\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" not found!NifScript::CheckFileLocation - File "Armor\Fur\Shield.NIF" found in BSA!TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.NifScript::CopyNif - File "Armor\Fur\Shield.NIF" found in "D:\Programme\Spiele\Oblivion\Data\Oblivion - Meshes.bsa"! Copying to "Armor\Fur\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" in folder!NifScript::CopyNif - Creating directory "D:\Programme\Spiele\Oblivion\Data\Meshes\Armor" as necessaryNifScript::CopyNif - Creating directory "D:\Programme\Spiele\Oblivion\Data\Meshes\Armor\Fur" as necessaryNifScript::NifFile c'tor - NifFile created without editing.NifScript::NifFile.setRoot() - Setting root to root of "Armor\Fur\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF"!NifScript::CheckFileLocation - File "Armor\Fur\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" not found!NifScript::CopyNif - File "Armor\Fur\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" not found!NifScript::NifFile.setRoot - File cannot be read!NifScript::NifGetBackShield - Nif could not be read!Error in script 0b0015b8Operator := failed to evaluate to a valid resultError in script 0b0015b8An expression failed to evaluate to a valid resultNifScript::NifGetBackShield called!NifScript::NifGetBackShield - Shield: LegionsschildNifScript::ToggleTag - Element "Prn" first tag in path. Set with value "Bip01 L Shoulder Helper".NifScript::CheckFileLocation - File "Armor\Legion\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" not found!NifScript::CheckFileLocation - File "Armor\Legion\Shield.NIF" found in BSA!TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.TES_BSA::GetFileNumber - Exception "FOLDER NOT FOUND" thrown! Checking next BSA.NifScript::CopyNif - File "Armor\Legion\Shield.NIF" found in "D:\Programme\Spiele\Oblivion\Data\Oblivion - Meshes.bsa"! Copying to "Armor\Legion\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" in folder!NifScript::CopyNif - Creating directory "D:\Programme\Spiele\Oblivion\Data\Meshes\Armor" as necessaryNifScript::CopyNif - Creating directory "D:\Programme\Spiele\Oblivion\Data\Meshes\Armor\Legion" as necessaryNifScript::NifFile c'tor - NifFile created without editing.NifScript::NifFile.setRoot() - Setting root to root of "Armor\Legion\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF"!NifScript::CheckFileLocation - File "Armor\Legion\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" not found!NifScript::CopyNif - File "Armor\Legion\Shield.NifScript.PrnBip01 L Shoulder Helper.NIF" not found!NifScript::NifFile.setRoot - File cannot be read!NifScript::NifGetBackShield - Nif could not be read!Error in script 0b0015b8Operator := failed to evaluate to a valid resultError in script 0b0015b8An expression failed to evaluate to a valid resultScript 'SysWindowCompileAndRun', line 1:Unknown variable 'lpsobnpcmodus'.set global >> 1.00



Gladly I only declared it as a Beta. :whistle:


Important part of the Script:
if ( bInterrupted ) && ( rClonedBackshield )	set bInterrupted to 0	if Eval ( ar_Size asPaths ) == -1		let asPaths := ( ar_Construct StringMap )	endif	set sShieldPath to ( GetBipedModelPath 0 rShield )	set lIndex to 0	let sTemp := ( ar_First asPaths )	While ( sv_Compare $sTemp sShieldPath )		if Eval ( ( lIndex := ( lIndex + 1 ) ) > ( ar_Size asPaths ) )			let asPaths[$sShieldPath] := ( NifGetBackshield rShield )			Break		else			let sTemp := ( ar_Next asPaths sTemp )		endif	Loop	let sBackshieldPath := asPaths[$sShieldPath]	SetMaleBipedPath $sBackshieldPath rClonedBackshield	sv_Destruct sBackshieldPath sShieldPath sTemp	set rBackshield to rClonedBackshieldendif

User avatar
Leonie Connor
 
Posts: 3434
Joined: Mon Mar 12, 2007 4:18 pm

Post » Tue May 17, 2011 12:59 pm

Hmm. That's with v0.9 on Nexus? That looks similar to the problems I was having with v1.0, but the whole point of v0.9 was that it was from before certain changes that caused problems which generate similar log files. Odd that NifGetAltGrip and NifGetOffhand would work but not NifGetBackShield.

At any rate, I'm afraid I can't offer any help on that. I don't have the source code for v0.9 to try to fix it, and v1.0 is a bit away. So NifGetBackShield will probably never work. You will be able to reproduce its functionality with the v1.0 functions, once it's released.
User avatar
Lou
 
Posts: 3518
Joined: Wed Aug 23, 2006 6:56 pm

Post » Tue May 17, 2011 5:20 am

Hi, new to the forums. I'd like to make a suggestion for a future build of NifScript.

Is it possible to develop a script that allows for switching between left-handed/right-handed orientation? Not simply the off-hand function already built into NifScript, but an ability to change the way a player holds the weapon so that the left hand holds the primary weapon, whereas the right hand holds the off-hand. It may seem as simple as just flipping the skeleton animations, but I suspect there is a lot more work involved.

For example, when it comes to archery, I'd like to have my player character hold the bow in his right hand, and draw back the string with his left hand, just like back in Morrowind (Vanilla-Oblivion only has animations for left-hand bow users, including the sheathing/unsheathing, drawing back on string, reloading from quiver etc. animations).

Perhaps it may be even possible to have a function that allows players to pre-designate hand-orientations for different weapon categories to save from switching hands when changing between different weapon types every time (melee - default right handed, ranged/bow - non-default right handed)?

Thanks
User avatar
Robyn Lena
 
Posts: 3338
Joined: Mon Jan 01, 2007 6:17 am

Post » Tue May 17, 2011 12:46 am

I just heard about this and I'm certainly no expert in any way in any of this, but would it be possible to have an option to look for a specific texture path (a particular string) and replace it with another specific string and then save the modified mesh under a specific name.

That's as simple and specific as I can make my request and have it be useful to the mod I'm working on, so if it's not possible I'll continue with my other searches.
User avatar
NIloufar Emporio
 
Posts: 3366
Joined: Tue Dec 19, 2006 6:18 pm

Post » Tue May 17, 2011 7:07 am

Once upon at time I was dreaming of an OBSE plugin that would allow me to dynamically update VWD by manipulation of distantLOD files, either by temporarily moving them to a backup folder, or appending them so that the engine wouldn't see them until I wanted it. After looking through this Nifscript thread I am again reminded of my oft wished for ability, and wish to inquire as to this being a possible function?


edited to say: I realize .lod files are not .nif files, and that this is 'Nifscript'. But the functionality would be very similar it seems to me regardless...
User avatar
(G-yen)
 
Posts: 3385
Joined: Thu Oct 11, 2007 11:10 pm

Post » Tue May 17, 2011 7:11 am

Hi, new to the forums. I'd like to make a suggestion for a future build of NifScript.

Is it possible to develop a script that allows for switching between left-handed/right-handed orientation? Not simply the off-hand function already built into NifScript, but an ability to change the way a player holds the weapon so that the left hand holds the primary weapon, whereas the right hand holds the off-hand. It may seem as simple as just flipping the skeleton animations, but I suspect there is a lot more work involved.

For example, when it comes to archery, I'd like to have my player character hold the bow in his right hand, and draw back the string with his left hand, just like back in Morrowind (Vanilla-Oblivion only has animations for left-hand bow users, including the sheathing/unsheathing, drawing back on string, reloading from quiver etc. animations).

Perhaps it may be even possible to have a function that allows players to pre-designate hand-orientations for different weapon categories to save from switching hands when changing between different weapon types every time (melee - default right handed, ranged/bow - non-default right handed)?

Thanks

I don't know. Maybe. But it would involve developing the reverse animations, and getting a way to trigger them with a script - neither of which NifScript can help you with. I very much doubt NifScript would be able to create the reversed animation on the fly, and furthermore I don't think there'd be much point to doing so.

What you're looking for, I think, is for the OBSE team to crack the Special Anim list so you can add/remove animations from a script.

I just heard about this and I'm certainly no expert in any way in any of this, but would it be possible to have an option to look for a specific texture path (a particular string) and replace it with another specific string and then save the modified mesh under a specific name.

That's as simple and specific as I can make my request and have it be useful to the mod I'm working on, so if it's not possible I'll continue with my other searches.

Yes, I think that would be possible. Not in v1.0, most likely, though.

Once upon at time I was dreaming of an OBSE plugin that would allow me to dynamically update VWD by manipulation of distantLOD files, either by temporarily moving them to a backup folder, or appending them so that the engine wouldn't see them until I wanted it. After looking through this Nifscript thread I am again reminded of my oft wished for ability, and wish to inquire as to this being a possible function?


edited to say: I realize .lod files are not .nif files, and that this is 'Nifscript'. But the functionality would be very similar it seems to me regardless...

That seems like just moving/renaming files, rather than modifying the files - correct? If so... a utility, like NifScript, could do that, but I'm not sure it falls under the purview of NifScript. Even if you were trying to do it with .nif files.

As far as whether or not NifScript could manipulate .lod files, it depends on whether or not NifLib can. I don't know if it can or cannot.
User avatar
Eilidh Brian
 
Posts: 3504
Joined: Mon Jun 19, 2006 10:45 am

Post » Tue May 17, 2011 8:46 am

Very cool stuff DW.
The ability to edit a .nif via script while in game........Limitless possibilities with that.
Bravo :clap:
User avatar
Harry-James Payne
 
Posts: 3464
Joined: Wed May 09, 2007 6:58 am

Post » Tue May 17, 2011 11:22 am

Yes, I think that would be possible. Not in v1.0, most likely, though.
I'm glad to hear that. I was trying to be coy back then because I wasn't even sure my idea was viable, but what I'm looking at is adding a function into my armor stand mod to strip the "skin" portions out of armor models and replace it with a transparent texture. It would greatly increase the looks of the armor stand and greatly decrease the creepy "headless person" effect.
User avatar
CYCO JO-NATE
 
Posts: 3431
Joined: Fri Sep 21, 2007 12:41 pm

Post » Tue May 17, 2011 6:08 am

Ahhh...reading your response gives me another Idea, which wouldn't require that we modify .lod files (that was just the method I had originally envisioned and not necessarily the best way to do this.) Since VWD is also dependant on there being a corresponding _far.nif to go with the .lod file...all that is really required would be a way to move/append those files, until I needed them... which correct me if Im mistaken, is already possible with nifscript? Even if not currently a function, it would fall under the purview of Nifscript alot more handily than the other method. Anyway...just a thought.


Indefiance
User avatar
Katey Meyer
 
Posts: 3464
Joined: Sat Dec 30, 2006 10:14 pm

Post » Tue May 17, 2011 9:11 am

Very cool stuff DW.
The ability to edit a .nif via script while in game........Limitless possibilities with that.
Bravo :clap:

Hehe, very glad you like it! Yeah, I think it's pretty cool. Wish I had more time to work on it... ARES is draggin on, and I don't expect this'll go much faster when I get to it.

I'm glad to hear that. I was trying to be coy back then because I wasn't even sure my idea was viable, but what I'm looking at is adding a function into my armor stand mod to strip the "skin" portions out of armor models and replace it with a transparent texture. It would greatly increase the looks of the armor stand and greatly decrease the creepy "headless person" effect.

Assuming they are separate 'children', that functionality actually may be in v1.0. The GetOffHand function already does that for scabbards; making it available for other children should be easy. I'd just have to write a function to be able to check the material type (or whatever that data is that gets set to "Skin") so you can find the right children to delete. Should be very do-able.

Ahhh...reading your response gives me another Idea, which wouldn't require that we modify .lod files (that was just the method I had originally envisioned and not necessarily the best way to do this.) Since VWD is also dependant on there being a corresponding _far.nif to go with the .lod file...all that is really required would be a way to move/append those files, until I needed them... which correct me if Im mistaken, is already possible with nifscript? Even if not currently a function, it would fall under the purview of Nifscript alot more handily than the other method. Anyway...just a thought.


Indefiance

I'm... confused. I don't understand what you're doing.

If you need to modify the files on the fly, that's something that NifScript could be used for, perhaps, eventually. .lod files aren't going to be touched until after I have a very solid set of functions for both .nif and .kf files, though, I suspect, because I think there's more interest in those files.

If you just mean moving/renaming files without modifying their contents, I think a custom-built plug-in that did just that would make a lot more sense. There are security issues with allowing modders to move or rename files that I'm pretty sure I don't want to get into.
User avatar
mimi_lys
 
Posts: 3514
Joined: Mon Apr 09, 2007 11:17 am

Post » Tue May 17, 2011 11:42 am

I suppose this is the place to ask for some functions I'd like ot be able ot use with nifscript.

A way to check a NiTriStrip's marterial, then copy the nif if the check is passed to a directory of my choice, before deleting the associated NiTriStrips (which have the material I checked for) in this new nif.

Also a way to change a NiTriStrips alpha property, but i see you are already working on this. :) This is the most important for me right now. The other one can be achieved with alot of nifskope to make it compatible with other mods, but it will still be needed in the long run.


Hope you can understand me :)
User avatar
kasia
 
Posts: 3427
Joined: Sun Jun 18, 2006 10:46 pm

Post » Tue May 17, 2011 1:07 pm

OK, on the alpha - I seem to recall (and it's been a long time since I ran this test) that messing with the alpha values worked very wonkily. Just saying.

And as for copying a Nif to a directory of your choice... probably not. You can copy a Nif, and I'll give you an ID number by which you can refer to it (and delete the NiTriStrips that you want to delete; checking the Material should be very possible), and I can assure you that that file will always be available when you need it (actually the main thing that stands between v0.9 and v1.0 at this point), but most likely you won't get to name the folder or file itself, which will instead be named systematically by NifScript (something like Meshes\NifScript\Your-Mod\00000001.nif or something).
User avatar
Emma-Jane Merrin
 
Posts: 3477
Joined: Fri Aug 08, 2008 1:52 am

Post » Tue May 17, 2011 4:37 am

This:
queryloadoblivion root = F:\Bethesda Softworks\Oblivion\List of BSA files: (excluding BSA files known to contain non-NIF data)	F:\Bethesda Softworks\Oblivion\Data\Better Cities - Bravil Docks.bsa	F:\Bethesda Softworks\Oblivion\Data\Better Cities - Shipyard.bsa	F:\Bethesda Softworks\Oblivion\Data\DLCShiveringIsles - Meshes.bsa	F:\Bethesda Softworks\Oblivion\Data\Enhanced Quest Roleplaying.bsa	F:\Bethesda Softworks\Oblivion\Data\Harvest [Flora].bsa	F:\Bethesda Softworks\Oblivion\Data\Knights.bsa	F:\Bethesda Softworks\Oblivion\Data\Oblivion - Meshes.bsa	F:\Bethesda Softworks\Oblivion\Data\Q-Core - Icons.bsa	F:\Bethesda Softworks\Oblivion\Data\Thievery.bsa		9 total.Registering String Interface.Registering Serialization Interface.Registering NifScript Hooks.	Initialization complete.NifOpen - "Weapons\Steel\dagger.nif" opened for editing.NifFile c'tor - NifFile created for editing.NifFile.setRoot - Setting root to root of "Weapons\Steel\dagger.nif"!CheckFileLocation - File "Weapons\Steel\dagger.nif" found in BSA!GetNifStream - Successfully read nif data in BSA "F:\Bethesda Softworks\Oblivion\Data\Oblivion - Meshes.bsa". Buffer length is 74753.NifFile.setRoot - Nif read from stream of file "Weapons\Steel\dagger.nif".NifFile.setRoot - Editable nif, setting basePath and determining filePath.NifFile.reg - Registering "ni\DWnifScriptTest_0.nif" on RegList.NifFile.reg - Registered as #2-0.NifOpen - "Weapons\Steel\dagger.nif" registered as #2-0.NifGetPath - Getting the path to nif #2-0getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifGetPath - Returning "ni\DWnifScriptTest_0.nif".NifGetNthExtraDataName - Getting the name of ExtraData #1 of nif #2-0getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifGetNthExtraDataName - Returning "Prn".NifGetNthExtraDataType - Getting the type of ExtraData #1 of nif #2-0getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifGetNthExtraDataType - Returning "NiStringExtraData".NifGetNthExtraDataString - Getting string value of ExtraData #1 of nif #2-0getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifGetNthExtraDataString - Returning "SideWeapon".NifSetNthExtraDataString - Setting the string value of ExtraData #1 of nif #2-0 to "BackWeapon".getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifFile.commitChanges - Failed to commit changes to Nif "ni\DWnifScriptTest_0.nif".NifSetNthExtraDataString - ExtraData value set successfully.NifGetNthExtraDataString - Getting string value of ExtraData #1 of nif #2-0getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifGetNthExtraDataString - Returning "BackWeapon".CreateNifFile - FileFinder requesting nifScript file "Meshes\ni\DWnifScriptTest_0.nif".getRefNif - Finding nif with filename "DWnifScriptTest_0.nif".getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifFile.commitChanges - Writing to "ni\DWnifScriptTest_0.nif".CreateNifFile - Nif created.DeleteNifFile - FileFinder has finished with nifScript file "ni\DWnifScriptTest_0.nif".getRefNif - Finding nif with filename "DWnifScriptTest_0.nif".getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.DeleteNifFile - Nif deleted.CreateNifFile - FileFinder requesting nifScript file "Meshes\ni\DWnifScriptTest_0.nif".getRefNif - Finding nif with filename "DWnifScriptTest_0.nif".getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifFile.commitChanges - Writing to "ni\DWnifScriptTest_0.nif".CreateNifFile - Nif created.DeleteNifFile - FileFinder has finished with nifScript file "ni\DWnifScriptTest_0.nif".getRefNif - Finding nif with filename "DWnifScriptTest_0.nif".getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.DeleteNifFile - Nif deleted.

Is very exciting.
User avatar
Ilona Neumann
 
Posts: 3308
Joined: Sat Aug 19, 2006 3:30 am

Post » Tue May 17, 2011 2:21 am

that looks very good... except for the

NifFile.commitChanges - Failed to commit changes to Nif "ni\DWnifScriptTest_0.nif".
NifSetNthExtraDataString - ExtraData value set successfully.

all in all though that looks very promising... when can I get my grubby hands on it?
Pacific Morrowind
User avatar
Matt Fletcher
 
Posts: 3355
Joined: Mon Sep 24, 2007 3:48 am

Post » Tue May 17, 2011 2:06 pm

Uh oh, f your approaching V1.0 I'll have to start salivating again, and that's just going to make a mess ;)

I am really looking forward to getting my hands on it though. I've tried to not pester you too much, given what I put you through to get the beta for UV RC1 done, but I've been patiently awaiting you getting interested in it again.

All the best DW,

HeX
User avatar
m Gardner
 
Posts: 3510
Joined: Sun Jun 03, 2007 8:08 pm

Post » Tue May 17, 2011 6:01 am

that looks very good... except for the

all in all though that looks very promising... when can I get my grubby hands on it?
Pacific Morrowind

That was actually a bug in the debugging messages, not the plug-in. I changed the way commitChanges() works without changing the NifSetStringExtraDataValue function.

Uh oh, f your approaching V1.0 I'll have to start salivating again, and that's just going to make a mess ;)

I am really looking forward to getting my hands on it though. I've tried to not pester you too much, given what I put you through to get the beta for UV RC1 done, but I've been patiently awaiting you getting interested in it again.

All the best DW,

HeX

Yes, I'm very sorry about that. School'd been hectic, hadn't had time. Things are going swimmingly now, though.

Latest log:
queryloadoblivion root = F:\Bethesda Softworks\Oblivion\List of BSA files: (excluding BSA files known to contain non-NIF data)	F:\Bethesda Softworks\Oblivion\Data\Better Cities - Bravil Docks.bsa	F:\Bethesda Softworks\Oblivion\Data\Better Cities - Shipyard.bsa	F:\Bethesda Softworks\Oblivion\Data\DLCShiveringIsles - Meshes.bsa	F:\Bethesda Softworks\Oblivion\Data\Enhanced Quest Roleplaying.bsa	F:\Bethesda Softworks\Oblivion\Data\Harvest [Flora].bsa	F:\Bethesda Softworks\Oblivion\Data\Knights.bsa	F:\Bethesda Softworks\Oblivion\Data\Oblivion - Meshes.bsa	F:\Bethesda Softworks\Oblivion\Data\Q-Core - Icons.bsa	F:\Bethesda Softworks\Oblivion\Data\Thievery.bsa		9 total.Registering String Interface.Registering Serialization Interface.Registering NifScript Hooks.	Initialization complete.NifLoad - loading saved NifFilesNifLoad - Clearing previous RegList.NifLoad - Load complete.NifOpen - "Weapons\Steel\dagger.nif" opened for editing.NifFile c'tor - NifFile created for editing.NifFile.setRoot - Setting root to root of "Weapons\Steel\dagger.nif"!CheckFileLocation - File "Weapons\Steel\dagger.nif" found in BSA!GetNifStream - Successfully read nif data in BSA "F:\Bethesda Softworks\Oblivion\Data\Oblivion - Meshes.bsa". Buffer length is 74753.NifFile.setRoot - Nif read from stream of file "Weapons\Steel\dagger.nif".NifFile.setRoot - Loaded 2 ExtraData nodes, collision, 2 children nodes, and 0 effects nodes.NifFile.setRoot - Editable nif, setting basePath and determining filePath.NifFile.reg - Registering "ni\DWnifScriptTest_0.nif" on RegList.NifFile.reg - Registered as #2-0.NifOpen - "Weapons\Steel\dagger.nif" registered as #2-0.NifGetPath - Getting the path to nif #2-0getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifGetPath - Returning "ni\DWnifScriptTest_0.nif".NifGetExtraDataTypeByName - Getting the type of ExtraData "Prn" of nif #2-0getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifFile.getEDByName - Getting NiExtraData Node "Prn".NifGetExtraDataTypeByName - Returning "NiStringExtraData".NifGetExtraDataStringByName - Getting string value of ExtraData "Prn" of nif #2-0getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifFile.getEDByName - Getting NiExtraData Node "Prn".NifGetNthExtraDataString - Returning "SideWeapon".NifSetExtraDataStringByName - Setting the string value of ExtraData "Prn" of nif #2-0 to "BackWeapon".getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifFile.getEDByName - Getting NiExtraData Node "Prn".NifSetExtraDataStringByName - ExtraData value set successfully.NifGetExtraDataStringByName - Getting string value of ExtraData "Prn" of nif #2-0getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifFile.getEDByName - Getting NiExtraData Node "Prn".NifGetNthExtraDataString - Returning "BackWeapon".NifGetNumChildren - Getting number of Children nodes in nif #2-0getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifGetNumChildren - Returning 2 Children nodes.NifGetNthChildName - Getting the name of Child #0 of nif #2-0getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifGetNthChildName - Returning "Scb".NifGetNumChildren - Getting number of Children nodes in nif #2-0getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifGetNumChildren - Returning 2 Children nodes.NifGetNthChildName - Getting the name of Child #1 of nif #2-0getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifGetNthChildName - Returning "Dagger:0".NifGetNumChildren - Getting number of Children nodes in nif #2-0getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifGetNumChildren - Returning 2 Children nodes.NifDeleteChildByName - Deleting Child "Scb" of nif #2-0getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifFile.getEDByName - Getting NiAVObject Node "Scb".NifDeleteExtraDataByName - Deletion successful.NifSave - Saving registered nifsNifSave - Saving Nifs associated with mod #2.NifLoad - Nif #2-0 found.NifSave - Saving Nif #2-0.NifSave - Saving filepath "Weapons\Steel\dagger.nif" (24); editable nif.NifSave - Saving ExtraData changes.NifSave - Saving Children changes.NifSave - Save complete.NifLoad - loading saved NifFilesNifLoad - Clearing previous RegList.NifLoad - Type 'MOD '	Version 1	Length 1NifLoad - 'MOD ' record - new mod's NifFiles.NifLoad - Saved modID: 3435973634.NifLoad - modID resolved: 2.NifLoad - Type 'niID'	Version 1	Length 4NifLoad - 'niID' record - new NifFile.NifLoad - New NifFile #2-0.NifLoad - Type 'niRe'	Version 1	Length 24NifLoad - 'niRe' record - new filename, editable.NifFile c'tor - Load constructorNifFile.setRoot - Setting root to root of "Weapons\Steel\dagger.nif"!CheckFileLocation - File "Weapons\Steel\dagger.nif" found in BSA!GetNifStream - Successfully read nif data in BSA "F:\Bethesda Softworks\Oblivion\Data\Oblivion - Meshes.bsa". Buffer length is 74753.NifFile.setRoot - Nif read from stream of file "Weapons\Steel\dagger.nif".NifFile.setRoot - Loaded 2 ExtraData nodes, collision, 2 children nodes, and 0 effects nodes.NifFile.setRoot - Editable nif, setting basePath and determining filePath.NifFile.reg - Registering "ni\DWnifScriptTest_0.nif" on RegList as #2-0.NifFile.reg - Registered as #2-0.NifLoad - Filename is "Weapons\Steel\dagger.nif".NifLoad - Type 'niED'	Version 1	Length 22NifLoad - 'niED' record - new ExtraData changes.NifLoad - ExtraData changelog loaded.LoadChangelog - Change node: "Prn".LoadChangelog - Change type: "12".LoadChangelog - Change action: "100".LoadChangelog - Change value: "BackWeapon".NifFile.getEDByName - Getting NiExtraData Node "Prn".NifLoad - Changing ExtraStringDataNode.NifLoad - Type 'niCh'	Version 1	Length 11NifLoad - 'niCh' record - new Children changes.NifLoad - Children changelog loaded.LoadChangelog - Change node: "Scb".LoadChangelog - Change type: "200".LoadChangelog - Change action: "0".LoadChangelog - Change value: "".NifFile.getEDByName - Getting NiAVObject Node "Scb".NifLoad - Changing AVObject node.NifLoad - AV node removed.NifLoad - Load complete.CreateNifFile - FileFinder requesting nifScript file "Meshes\ni\DWnifScriptTest_0.nif".getRefNif - Finding nif with filename "DWnifScriptTest_0.nif".getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.NifFile.commitChanges - Writing to "ni\DWnifScriptTest_0.nif".CreateNifFile - Nif created.DeleteNifFile - FileFinder has finished with nifScript file "ni\DWnifScriptTest_0.nif".getRefNif - Finding nif with filename "DWnifScriptTest_0.nif".getRegNif - Finding nif registered as #2-0.getRegNif - Nif #2-0 found.getRegNif - Nif root is good.DeleteNifFile - Nif deleted.

Get the nif, get some values, change some, delete the scabbard, save and reload, and everything works juuuust fine.
User avatar
FABIAN RUIZ
 
Posts: 3495
Joined: Mon Oct 15, 2007 11:13 am

Post » Tue May 17, 2011 2:36 am

It good to see this thread has become active again I think we all know the potential of this little tool.

Personally I am very interested in knowing how far we are from the possibility to change the TEXTURE.DDS paths? So we could get seasons to change over time.
User avatar
lauren cleaves
 
Posts: 3307
Joined: Tue Aug 15, 2006 8:35 am

Post » Tue May 17, 2011 3:19 am

I still have to go through the thread/PMs to determine all the requests that I've gotten, but now that you mention it... I think I can probably do something like that pretty easily.

Niflib's really a dream to work with; it just works beautifully. Now that I've got serialization sorted, this shouldn't be too hard.
User avatar
Ryan Lutz
 
Posts: 3465
Joined: Sun Sep 09, 2007 12:39 pm

Post » Tue May 17, 2011 3:58 pm

Oh, my goodness... a new UV release, and maybe the possibility for seasonal textures? Ah, the wonders...
User avatar
Jordyn Youngman
 
Posts: 3396
Joined: Thu Mar 01, 2007 7:54 am

Post » Tue May 17, 2011 6:44 am

Yeah, I just looked it up - assuming everything works as advertised (and Niflib has an impeccable track record thus far), changing textures should be trivial.

My only concern is that if you can't simply swap out the objects, you might have a hard time reloading them, since that maybe implies that you can't Disable/Enable them? I don't know. But you do need to force Oblivion to reload the Nif to get any change to appear.

...huh. I'll have to ask behippo/Scruggs about that. Currently I can detect when Oblivion is loading a new Nif. I wonder if I can force it to do so? That... would be nice.

Oh, and you'll still need to change the model path to point to a new one, because NifScript isn't going to let you modify models that exist on the disk, only create copies you can manipulate. That might cause a problem with trees. Hmm. Maybe I'll consider some kind of exception for that.
User avatar
sam
 
Posts: 3386
Joined: Sat Jan 27, 2007 2:44 pm

PreviousNext

Return to IV - Oblivion