Flicker - older nif question

Post » Mon May 07, 2012 9:57 pm

I've been trying to add proudfoot's flicker nif to my mod - it looked like a very good effect - the way it circles around with fire and smoke - I wanted to enable it by a script and have it circle around an NPC

However I've tried adding it as an activator a static and a misc item and it keeps crashing my game in testing

I think it might be a creature rather than an effect but having never played Dragon's Breech I do not know

Has anyone ever used it before? - it has the id db_cr_flicker

If anyone has used this before or come across a mod that does I'd be grateful to know how it is supposed to be set up in the CS

Or if anyone knows of any other way to create a swirling particle like effect around an NPC that would be helpful - the current spell effects don't interest me.

Thanks
User avatar
Stu Clarke
 
Posts: 3326
Joined: Fri Jun 22, 2007 1:45 pm

Post » Tue May 08, 2012 1:09 pm

Here are some things you can try - I'll start with a down and dirty method, and following that will be a full explanation of what I have learned about particle effects to help you maybe come up with some other ideas to try.

I do not have the particular mesh you are referring to so this may not work at all but ... try implementing it as a clothing item using these steps (if you already know how to do this, my apologies... there may be some out there who don't):

1) create a body part and tick the clothing mark and select neck - the art file is your mesh
2) create a clothing item as a left (or right) glove and select neck on the first pulldown - now pulldown the male clothing bar and select (scroll to find) the id of the body part you made in step 1
3) make sure your NPC is not already wearing hand covering items, and drag the clothing item you made in step 2 into his inventory - save.
4) that's it - in game your NPC should now have that effect on him - it may appear in the wrong place, if so read on.
5) (optional) for lulz drag the item again onto a table or something and pick it up in game and wear - the effect should be on the player.

the nitty-gritty:

For particle effects that swirl around (or behave anyway you want them to for that matter) an NPC, creature or the player, you first need a mesh that has a NiBSParticleNode. To find out, open in NifSkope and expand all the lines until you see it. If you have the CS disk or have unpacked Morrowind.bsa, find the mesh "Ex_waterfall_mist_01.nif" - it has a particle node. The template nif I personally favor is "W_art_katana_flame" which sadly I have no clue what mod I got that one out of. Now, open your mesh with the particle node in NifSkope. Expand all the lines and locate "NiParticleSystemController" and left click. In block details you should see a slew of listings with numbers. These listings allow you to change the shape, rate, speed, etc etc of the particle effect. Before we continue:

*important* backup your particle nifs before you edit them. The first thing I do when opening in NifSkope is save as a different filename. These things are very easy to corrupt to the point where they won't load in NifSkope and may crash MW in game. Make changes slowly and test test test - save save save. School of hard knocks is how I learned this rule.

Sometimes when saving an edited particle mesh you will get warnings in NifSkope like "link points to wrong block type" - if so, try to load it again, if it loads, 9 times out of 10 you are ok and can ignore the warning and keep using that mesh with no problems.

If you don't see anything when you press play, find "NiMaterialProperty" and set alpha to 1.0 to make it full visibility. Put it back where it was when you are done fiddling with other settings (see discussion below about alpha).

Back on track, you can change the shape and other characteristics of the particle stream by changing the numbers and press play to watch the effect in motion. But what if you want to change the color and appearance? well, then you will need a new texture. Particle textures should have an alpha channel or they wont look right at all. A targa with alpha (.tga) works well. Browse you textures folder for examples. If you create your own, make sure it has an alpha channel - alpha controls transparency - lots of info on the net to help you wrap your brain around alpha. Anyhow, make sure your mesh has a "NiAlphaProperty" with flags set to 237, and you can control the degree of transparency in "NiMaterialProperty" (alpha value is right below glossiness). 1.0 is fully visible and 0.0 is completely invisible, so 0.5 would be half-transparent.

The last thing you need to do is reposition the effect on your NPC. Do this in the parent NiNode of the particle effect node (which would be a NiNode), in most cases it's the "NiNode" on line 2 or 3 - the text should say something "emitter". Now for this line, in block details, you will see "Translation" and "Rotation". You can move the effect around by changing the x y and z values in translation, and change the angle in rotation. This will be a process where you need to look in-game at how the effect changes on the NPC each time you change the values. It will take time to get it "just right". One last thing you may need to do is change the flags on this same parent NiNode to 226 - this will (kind of) "skin instance" the effect so it moves appropriately when the NPC bends or turns etc. I just now while writing this discovered this detail so my knowledge is presently sketchy on this part. Just goes to show you learn something new every day.

In theory you can change an existing particle effect nif to do whatever you want to include things like smoking pipes, spilling drinks, etc. aside from just magical auras. Hope it's helpful and any questions can be answered in the construction set forum area because here in mods its way too active to find old threads. Cheers.
User avatar
Myles
 
Posts: 3341
Joined: Sun Oct 21, 2007 12:52 pm

Post » Tue May 08, 2012 6:18 am

Indeed, Flicker is a Creature (they used "cr" in the ID's as a designation). NMZMaster has effects that circle the player in the Elemental Magika mods; perhaps a clue might be found in the scripting of such in those wonderful mods ;) .

User avatar
Lindsay Dunn
 
Posts: 3247
Joined: Sun Sep 10, 2006 9:34 am

Post » Mon May 07, 2012 11:11 pm

Have you tried setting the object up as an activator? You should be able to use the creature as an activator with a couple of minor .kf edits in nifskope. Set the number of text keys in the block details of NiTextKeyExtraData to 2 and update it by pressing the two little green arrows in the value column of the line below. In the first text key make sure that the value of the time float is 0.0000 and the text in the value column of the value string reads 'Idle: Start', in the second text key, the value of the time float should be the same as the end of the animation (assuming that you want to use the full length of the animation) and the value string text should read 'Idle: Stop' You may need to set the animation flags to cycle in the .nif and x.nif too, I can't really tell you more without looking at it but I can help you do this if you like.
User avatar
Mashystar
 
Posts: 3460
Joined: Mon Jul 16, 2007 6:35 am

Post » Tue May 08, 2012 7:47 am

Oh Chainy it has 13 text strings - when I run the animation I can't tell where one stops and the next one starts as it is so smooth - The first text string starts at a float of 0.6667 and the last one stops at a float of 8.5000 - total animation time in the render window is 10 seconds.

I did change the texture path for the lens flare body and got the dreaded error pyxlmyxz mentioned - link points to wrong block type - btw pyxlmyxz - thank you for putting so much effort into your explanation - it was very kind of you and the idea of having it as a clothing item is a good one.

What I need to fix first is getting the model into my game without doing a CTD - which was why I was wondering what I was doing wrong in setting it up.

I've bundled up the files if you want to have a look at them Chainy - I'll have a go at editing the float values myself to see if I can get it to work - though I feel like a blind person looking for a light switch

For anyone else interested it is a very nice little animation that would fit well into Morrowind - probably Bloodmoon with a different texture for the fire particle to make them ice sprites.

Westly thanks for reminding me of elemental magic - I remember that mod well - and I did think about using a magic effect - however I am infatuated with this model and would love to use it if possible.

Here's the package http://www.mediafire.com/?p0rcg77rf7o730p
User avatar
rheanna bruining
 
Posts: 3415
Joined: Fri Dec 22, 2006 11:00 am

Post » Tue May 08, 2012 6:27 am

The times only need to be approximate, you could try the start and the end of the entire animation bar, in the case of the flicker, that would be 0 and 10.

"links point to wrong block type" appears on every particle effect that I have ever tampered with, including vanilla ones. It has never caused an issue for me.
User avatar
luke trodden
 
Posts: 3445
Joined: Sun Jun 24, 2007 12:48 am

Post » Tue May 08, 2012 12:37 am

Thanks Chainy - it still keeps crashing my game - I tried setting it up as a creature and nearly had a heart attack with all the error messages that created - I'll have a look around for other particle effect models and see if I can adapt them - I have a feeling this one is going to hold me up from release if I spend too much time on it
User avatar
meghan lock
 
Posts: 3451
Joined: Thu Jan 11, 2007 10:26 pm

Post » Tue May 08, 2012 2:43 am

No, no, with the edits I suggested, it definitely won't work as a creature anymore. Try it as something else.
User avatar
Connie Thomas
 
Posts: 3362
Joined: Sun Nov 19, 2006 9:58 am

Post » Tue May 08, 2012 5:56 am

Actually, I got bored, so I made this, using the textures you provided: http://dl.dropbox.com/u/43101765/czy_flicker.nif Any use to you?
User avatar
Noraima Vega
 
Posts: 3467
Joined: Wed Jun 06, 2007 7:28 am

Post » Tue May 08, 2012 1:00 pm

Actually, I got bored, so I made this, using the textures you provided: http://dl.dropbox.com/u/43101765/czy_flicker.nif Any use to you?

:hugs: You are just the bestest - that is simply gorgeous - thank you very very much

I want to enable and disable it by a script does it matter if I set up as an activator or a static
User avatar
-__^
 
Posts: 3420
Joined: Mon Nov 20, 2006 4:48 pm

Post » Tue May 08, 2012 10:36 am

Heh, it should work as a piece of equipment or a static, but don't be too hasty in your thanks, I didn't test it. :unsure2:
User avatar
Sam Parker
 
Posts: 3358
Joined: Sat May 12, 2007 3:10 am

Post » Tue May 08, 2012 8:38 am

Well it looked gorgeous Chainy - but it crashed my game as well - however it may not be the nif but how I am trying to use it with the script

Thank you so very much for doing it - it was a nice gift - I've converted another effect model which is working though - so in the end after a few hours fiddling about I'm happy

I do have a question about how you get an animated nif to play a certain frame - the nif I'm using has circling flames and an explosion - I can get the circling flames to work but not the explosion - have tried shortening the float time - to see if it would repeat it's cycle but that doesn't seem to work

Any ideas welcome
User avatar
bimsy
 
Posts: 3541
Joined: Wed Oct 11, 2006 3:04 pm

Post » Tue May 08, 2012 12:40 pm

I'm not sure that I completely understand your question or what you are trying to achieve there. You want the nif animation to cycle? Perhaps you can show me the nif. I'll have a look at the nif I made too, see if there is an issue with it. What function were you using in the script? placeatpc? equipitem?
User avatar
Amelia Pritchard
 
Posts: 3445
Joined: Mon Jul 24, 2006 2:40 am

Post » Tue May 08, 2012 8:24 am

I place it at the spot I want the NPC to be standing and then have an enable disable script on it that gets called when a global gets set
User avatar
Alexis Estrada
 
Posts: 3507
Joined: Tue Aug 29, 2006 6:22 pm

Post » Mon May 07, 2012 10:35 pm

Does it crash upon being enabled or as soon as you enter the cell? I'm assuming that it doesn't crash the CS.
User avatar
Mike Plumley
 
Posts: 3392
Joined: Wed Sep 05, 2007 10:45 pm

Post » Tue May 08, 2012 10:19 am

Actually it crashes after I position myself and the npc next to it - before it is enabled

So the script has not yet begun to enable it and we crash - in the CS it looks fine - as an animation it is great - though I did need to scale it down for interiors as it is a bit big - I scaled it using setscale - but as yet haven't been able to see it in game
User avatar
Genevieve
 
Posts: 3424
Joined: Sun Aug 13, 2006 4:22 pm

Post » Tue May 08, 2012 12:57 am

Hmm, could you try just placing it in a cell normally as a test, with no scripts or anything?
User avatar
Michelle davies
 
Posts: 3509
Joined: Wed Sep 27, 2006 3:59 am

Post » Tue May 08, 2012 6:52 am

I will :)
User avatar
Ryan Lutz
 
Posts: 3465
Joined: Sun Sep 09, 2007 12:39 pm

Post » Tue May 08, 2012 6:50 am

Hi Chainy - I loaded the flicker into my game as a static and it didn't crash the game so it must have been a script issue with trying to enable it - however it wasn't doing it's animation like I can see in nifskope where it flies around - the particle emitter worked fine but was just stationary - how do I get it to do it's full animation?
User avatar
DarkGypsy
 
Posts: 3309
Joined: Tue Jan 23, 2007 11:32 am

Post » Tue May 08, 2012 12:47 pm

What did you set it up as? A static or an activator? Thinking about it, that shouldn't make a difference. I took another look at the link and there was still one clamp animation left so I changed it to cycle: http://dl.dropbox.com/u/43101765/czy_flicker.nif

Your best bet would be to set it as an activator though, just to be safe. As an alternative to your enable/disable script, why not try placing the object so far below the ground that it cant be seen and instead of 'enabling' it, change it's position via script?
User avatar
Mark Hepworth
 
Posts: 3490
Joined: Wed Jul 11, 2007 1:51 pm


Return to III - Morrowind