Jump to content

Hide effects when sheathed?


jet4571

Recommended Posts

Is there any way to hide effects when a weapon is sheathed? I have a flame effect on the blade of a new sword and would like it to not be visible when in the scabbard. As it is the scabbard looks like it is on fire which is kinda cool but it is the blade that is supposed to be on fire and would look better if the flames popped in after the blade is drawn and disappear once sheathed.

 

 

 

Kinda cool when you take a small camp\fireplace fire model and add it to a sword blade, reduce it's size(also remove a couple parts) and clone a few times. Just don't use the small and large torch effects at ~0.1 scale and duplicated in a line covering a 3 1/2 foot long blade.... 75 FPS to 30 in the game and Nifskope was lagging halfway through. 5 small fires and no performance loss compared to 40? torches.

Link to comment
Share on other sites

Well you used 5 sources you say? I did something similar ones, at the mod The Pek The Halls of the Phoenix Order for Oblivion from 2006 where I let a book burn inside the Mages guild in Cheydinhall but with only one effect. I scripted the effect. Take a look at it, and copy the script from the book to a sword and see how it works??

 

Try something similar to this at a sword, any will do

scn JetBurningSwordSCR

begin GameMode

	If (IsWeaponOut)
		PlayMagicEffectVisuals  <effect>
	else 
		StopMagicEffectVisuals <effect>
	endif
	
end

That book did burn a lot if I recall right. :D

When you sheat the sword, you can also play an effect like mystism fail or something, that will add something extra for sure and also a fail sound :D

		pme STRP
		playsound SPLMysticismFail

I use that one a lot really. Everywhere and I love it :D

 

Then it will look similar to this:

scn JetBurningSwordSCR

begin GameMode

	If (IsWeaponOut)
		PlayMagicEffectVisuals <effect>
	else 
		StopMagicEffectVisuals <effect>
		pme STRP
		playsound SPLMysticismFail
	endif
	
end


Edited by Pellape
Link to comment
Share on other sites

Well theres 11 of them now, 10 small fires and 1 small torch at the tip because the torch gives off more sparks when waved around. They are all in an NiNode named MagicEffect and they are named MagicEffect:0 to 11 like parts in the Scn are named Scn:0 and Scn:1.

 

Used that script and it refused to compile. It won't let me make a new magic effect, which that script looks to be dealing with, tried a vanilla one and again no compile. Checked your mod and it does an effect shader "PlayMagicShaderVisuals" So I used that instead of PlayMagicEffectVisuals. Duplicated the fire effect for the script...

scn AAFireSwordEffectSCR

begin GameMode

	If (IsWeaponOut)
		PlayMagicShaderVisuals AAeffectFireDamage
	else 
		StopMagicShaderVisuals AAeffectFireDamage
		pme STRP
		playsound SPLMysticismFail
	endif
	
end

And the result was:

 

 

Not exactly what I was expecting. Purple cloud with black smoky tendrils...

Link to comment
Share on other sites

It is this that cause the purple but it should only be used when you sheat the sword in that script. I have not tested it as I just wrote out of my mind :smile:

 

So delete this if it doesnt work when you sheat the sword:

		pme STRP
		playsound SPLMysticismFail

The thing is that you should try the script at a sword that you have not edited as it will not put out your fires. Take a vanilla Iron sword and test it instead. The purple is STRP

Edited by Pellape
Link to comment
Share on other sites

Ah, yes, you can't toggle on and off effects which you hard-coded into the NIF.

If you want to go that route, there's only the old "swap between weapon with effects when drawn and weapon without effects when sheathed" approach of ancient times, which never really looks perfectly well due to the animations playing on swap.

 

If you want script control over your weapon's effects, follow the route Pellape is explaining to re-create your hardcoded effects with script functions.

Link to comment
Share on other sites

Yeah I removed those two lines and tested it, the purple and black thing was removed, but I removed the lines because the fail sound would endlessly repeat. Need to add Doonce to it, unsheath set doonce to 0 sheath and set to 1 after the fail sound. The PME STRP was pretty cool, the test box I use to add items for testing had the purple and black when the sword was stored in it and I added a sword to the nearest container and it did it to that too... Could be a cool effect to use for a haunted container or something.

 

Anywho I don't think the script is doing what I wanted, it's turning the normal enchantment effect on and off which I don't really care if it gets turned on and off. Unless I am missing something about that effect adding a fire nif to the sword which would work perfectly. I have both fire and sword in one nif and fire and sword in separate nifs. I have like 30 swords so having the effect separate makes it easier to add to another later as half the swords have the same length blade.

Link to comment
Share on other sites

I decided I am going to just live with a burning scabbard. Did some tweaks to the fire effect, randomized the scale a bit more then randomized what fire texture would start first... then made a purple flame version to go with the enchantment I am making for it. Script effect that does the purple flames effect on the target when hit... same as the vanilla fire enchantment just purple. So I have regular fire and magic fire for enchantments.

 

Anywho thanks for the help, and here's the purple fire blade...

 

 

 

How to make is easy, copy the FireOpenSmall.nif NiBillboardNode and paste into an empty nif like null.nif from the magiceffects directory. Then copy that .nif NiNode into your sword .nif. Now open the NibillboardNode and select AttachLight, DmageSphere, and EditorMarker NiNodes and right click and remove branch. You don't need them in your nif and the editor marker is visible in the game, so save a few bytes by getting rid of those. Now use the Transform function on the NiBillboardNode to scale it and put it onto your blade. Then copy it and paste into the NiNode and repeat the translate so this one is further up the blade and a different size. Repeat that until the whole blade is covered. Scale... 0.1-0.2 works well.

 

Next is randomizing the textures... Open the second NiBillboardNode and expand FireOpenSmall:0, NiTexturingProperty, and finally NiFlipController. There's your list of textures to rearrange. Change all of them in numerical order from say fireopensmall01.dds to fireopensmall04.dds, next one then becomes fireopensmall05.dds and so on and so forth until all were changed starting from fireopensmall04.dds and ending at fireopensmall03.dds. Repeat that with each of the NiBilboardNode's... skip 1 or two along the way if they cant be seen in first person if you don't want to do them all. And for fun do it all again with FireOpenSmall:2 Or remove that one like the EditorMarker like I did because I didn't want to deal with it since it will mostly be inside the blade.

 

And if you want to recolor the fire like I did or outright replace with dancing snowmen or something... that's the list of textures to do. Also in the FireParticles-Emmiter nodes is another single texture.

Link to comment
Share on other sites

Cool you did solve it. Yes, you need to do a DoOnce or a state to get the sound to stop, as it was just an idea. :smile:

 

I do have that old mod installed and I went to that old dusty dungeon yesterday and it is tooo much fire there for sure but this is what the stuff I made then looks or looked like:

 

50675703206_f41dba5ebf_z.jpg

 

Using those weapons makes it impossible to see anything in 1st player as all you see is that fire and it is not even pleasant to use this stuff at 3rd player view. I made this mod to be able to get more Fire Salt, in a proper manor, nothing else and to learn the quest editor in Oblivion as this was among the first mods I made for this game if I recall right. :wink: I do like the damage of those arrows I made, so that's why I did play it yesterday, to get a couple of more arrows. :smile: Those weapons and armors is not really made for the player, as they are made for the enemies in that site.

 

I do use a simialar weapon in Morrowind, a weapon that I got from Almalexa and I do not know if it is a Bethesda weapon or from Sotha Sil expanded. I should edit the stats at Requiem instead as that burning is irritating in the long run, at least for me. I usually use Marksman weapons anyway, so therefor I have not done anything about it.

Edited by Pellape
Link to comment
Share on other sites

Yeah using the vanilla assets is a tad over the top for the player, games not fun if you can't see it. Which is why I decided to just go with a magic burning scabbard... the swords so magical the scabbard can't contain it lol. I have a scripted effect in the enchantment that adds the flames to the target, but right now it doesn't do anything but that, silence for 60 seconds, and the normal fire damage. Maybe figure out how to make it a scripted DOT and lose the normal fire damage. Can't script my way out of a paper bag lol... art here not programming lol.

scn AAFireSwordMagicEffectSCR

short damage

     begin ScriptEffectStart
	PlayMagicShaderVisuals AAeffectFireDamage
end

     begin ScriptEffectUpdate
	set damage to -10 * ScriptEffectElapsedSeconds	
	modav health, damage
end

     begin ScriptEffectFinish
	StopMagicShaderVisuals AAeffectFireDamage
end

That should be a DOT, taken from KurtTestMagicEffect script and standard apply effects when hit.

Link to comment
Share on other sites

Yes. :smile:

 

And nice art as well for sure. I took a look at your mods yesterday and your weapons looks very very nice indeed and the Arrowsong bow is maybe the most beautiful bow I ever seen and I will try it out tonight. :smile:

 

Well I been coding back and forth since 1987 in different languages but still have a lot to learn for sure, specially OBSE but it goes better and better for each day and I have no troubles with 3D, well static stuff but texturing? Texturing is the hardest part and something I am not good at at all and I did had help from Elynda 14 years ago if I needed handmade textures and we did put some mods together both in Morrowind and Oblivion but now I have to cheat as best as I can with it, stealing from Google...

 

I will try later to make a proper axe soon as I have not found one but it also depends on if I will be able to make a proper texture or just steal one from the web. There is a nice axe mod that I am using but I am not 100% satisfied. Not that many use blunt but I use all skills and now I need to train blunt and even some hand to hand... You do not have a proper axe somewhere?? :wink: But making a new one will be interesting anyway and it do not need to be mid eval as I did found a cool modern camping axe ones and that is what I think I want, something modern for ones as I use some mid eval right now.

Edited by Pellape
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...