EDIT: This is now resolved: See the longer post further down for the final result.
I may have missed something obvious, but I wanted to be able to apply an alpha SEF (VFX) to a placeable object to make it appear ghosted/transparent and with a “bluish” hint to it.
Is there an easy way to do this? If not, does anyone know how to make one?
(I have not been successful in applying one.)
@4760 This may be within your area of expertise: Is this something that requires doing at a model level, perhaps?
I’ve always considered you a “master scriptwriter” over here, so I’m really surprised you don’t know how to do it. Sorry but I have a high opinion of your abilities.
Is this something like that you’re looking to do? Here’s a script I use to make a door look go “ghostly”. Maybe this script can inspire you?
Sorry if that’s not the case.
// Put this script OnEnter.
// z3_ar9201_doorsanctu_1
// Make door of samll sanctuary glow blue
#include "x0_i0_partywide"
void main()
{
object oTarget;
effect eVFX;
// Get the creature who triggered this event.
object oPC = GetEnteringObject();
// Only fire for (real) PCs.
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
return;
// Only fire once per PC.
if ( GetLocalInt(oPC, "DO_ONCE__" + GetTag(OBJECT_SELF)) )
return;
SetLocalInt(oPC, "DO_ONCE__" + GetTag(OBJECT_SELF), TRUE);
// Apply a visual effect.
eVFX = SupernaturalEffect(EffectVisualEffect(VFX_DUR_ETHEREAL_VISAGE));
oTarget = GetObjectByTag("z3_ar9201_doorsanctu_1");
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eVFX, oTarget);
}
Thanks for your high praise of my skills. I do what I can.
In my own notes, I had this VFX as a NWN1 that failed to work on anything … So, I had the script there, but it is commented out with a note that it did not work.
Have you tested and confirmed this effect as working then?
I mean I do have a VFX that works (kind of), but it is not transparent. (I think it is using the Blur VFX.)
EDIT: OK, so I looked at my “own” notes again and found that it should work: I looked at the wrong script line before!
This is the VFX I used (see attached image).
In all honesty I don’t remember what the other VFX did to the door, I know I went with this one because I liked it.
I will try other VFX on it. I will get back to you during the day.
OK, so after applying the correct VFX (as according to my own notes), I did end up getting a result … however, it is a little bit too non-transparent for my need …
That last VFX was better, but it still lacks the transparency I was after …
Maybe there is a VFX number we have yet to find?
(I am going to mark this thread unresolved just in case there is another VFX or solution for the transparency I am after. I want to be able to see through the item, as if we are seeing an outline/skeleton of the placeable only.)
Yes, I have this one in a number of places already … but, sadly, it is not transparent … although is currently the best contender for what I need it for.
EDIT: I thought I was going to be able to apply some kind of SEF with alpha to the placeable, but it did not work.
The only other thing I have not tried, but don’t think it should make any difference, is to add a line to the vfx_persistent.2da and add the transparent SEF I make to that and then try applying the VFX via the old method using EffectVisualEffect instead of EffectNWN2SpecialEffectFile … (It may well be that many of the old VFX stopped working due to alpha involvement somehow? I note the old VFX I want to apply have this.)
Have you tried a vfx and assigned it the model effect. It gives a placeable as a vfx (or iirc a model/creature in default animation pose). You would then assign the SEFToPlayOnModel to something like vfx_invisibility, and handle any interaction via a placeable collision box or the like. Here is an example of the vfx barrel with vfx_invisibility, which seems to be the look you are going for.
I was going under the assumption that a placeable barrel won’t show the vfx_invisibility. Theoretically (I haven’t tried it), you could spawn a placeable barrel, and in the onSpawn try to apply the vfx you want to the barrel.
First, my thanks go to all three of you who helped steer me where I needed to go! Hopefully, I will put the end result to good use now, and possibly moving forward. In case it was not obvious, the usage of these is to highlight to the player where they are able to drop an object.
If you have any feedback for improvements, or have a favourite “look” for what I am aiming for, then please let me know. That feedback is asked of any who are following this post.
Anyway, after playing around with the VFX editor and editing textures and creating new models to test, I believe I have the effect I am after. The BIGGEST issue I had throughout this testing that slowed me up, is that I found out that the toolset had to be reloaded on occasion as it was not always updating “live”. So, sometimes I was seeing a correct result, and at other times it may have worked, but where I had not reloaded the toolset, I missed it. So, I had to repeat some tests to realise it was doing the right thing after all.
WHAT WORKED FOR ME
I ended up simply making a new model for the object that I wanted “ghosted”, as applying the VFX only (as a “transparent” SEF) lacked the exact collision I was after and the collision box was too cumbersome to employ as accurately as I wanted to.
I have no idea if any of the options I set here in MDBConfig made any difference, but I show them now just in case. The important bit is that I reworked my own texture for the barrel so that the vast majority of it was “transparent”. (This is where the toolset played up a few times in my testing.) So the plc_mc_exbarrels_lb (DDS texture file) is where all the transparency ends up coming from. I also “brightened” and coloured the remaining texture to stand out more as a glow.
For extra “attraction”, (and as it was just like any new placeable object), I was then able to add a VFX to the object for extra finish effect. This can be left off or altered as require via scripting.
THE END RESULTS
Here is a video with the end results. From left to right, the first barrel has no VFX added, the second has the BLUR (0) VFX, the third has VFX_DUR_GHOSTLY_VISAGE_NO_SOUND (478), and the last one has VFX_DUR_PARALYZED (232). However, there are a number of other VFXs that can be added and a better one may suit certain situations. I just wanted to show a few examples.