Aller au contenu

Photo

Turning backpacks to VFX


  • Veuillez vous connecter pour répondre
13 réponses à ce sujet

#1
psiiijay

psiiijay
  • Members
  • 258 messages

I used to remember how to do it but I lost some nwn2 data recently and I don't have it anymore and I really don't remember how.. 

I wanna turn the backpacks to vfx to make them usable with cloaks on.

 

Can some one help?


  • rjshae aime ceci

#2
Raygereio

Raygereio
  • Members
  • 913 messages

In Visual Effects Editor, create a new SEF. Then add a new model Event, then under definition file point it towards your backpack model.



#3
Happycrow

Happycrow
  • Members
  • 612 messages

that would be exceptionally useful for belts as well...



#4
Happycrow

Happycrow
  • Members
  • 612 messages

Hey, Raygerio - we crossposted. Would your schedule give you any chance of a quick and dirty walkthrough on that for those of us like yours truly who's never used the SEF?  Once the effect is made, how does one make it work? Put the effect on the backpack item?



#5
Raygereio

Raygereio
  • Members
  • 913 messages

Once the effect is made, how does one make it work? Put the effect on the backpack item?

You can place the VFX on your character with
effect eBackPack = EffectNWN2SpecialEffectFile("<backpack sef file name");
eBackPack = SupernaturalEffect(eBackPack);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBackPack , oPC);
You should be able to remove the backpack vfx with
RemoveEffect(oPC, eBackPack);
I'm doing this from memory, so apologies if there are typos and whatnot. A supernatural effect should not be removed by dispels & resting if I recall right.
I reckon the simplest way to implement this would be to make the "backpack" into a usable item that has a Cast Spell: Unique Power property. And then have the item's OnActivate script add/remove the vfx.

#6
Happycrow

Happycrow
  • Members
  • 612 messages

So at the risk of being pedantic, what I'm doing here is:

 

1) Make a special effect for this item.

2) Write a special script just for this item which looks like what you wrote above.

3) Find the item's properties for scrips, and have OnActivate point to this script.

 

Are there on-equip or on-dequip which would do the same?

 

Thanks in advance -- this is an area of cc/TS in which I'm very weak.



#7
rjshae

rjshae
  • Members
  • 4 485 messages

To activate the tag-based scripting's On Equip script, the item would need to take up an equipment slot. It could potentially occupy one of the creature slots, but I'm not sure how the player would be able to access that without first making a new inventory panel.



#8
Raygereio

Raygereio
  • Members
  • 913 messages

So at the risk of being pedantic, what I'm doing here is:
1) Make a special effect for this item.
2) Write a special script just for this item which looks like what you wrote above.
3) Find the item's properties for scrips, and have OnActivate point to this script.

Not quite. What I'd do have the backpack item be a generic item in your inventory that you can activate. Similar to for example the Hammer of Ironfist from NWN2's OC which you could activate to create a shockwave of sorts around the wielder.
To do that you need to give the item the "Cast Spell: Unique Power" property with infinite uses. Then create a script with this name: "i_<BackpackItemTag>_ac".
That script will run every time the item is activated. You can then have the script check if there's "eBackPack" effect on the user and apply one if there isn't, or remove it when there is.
 

Are there on-equip or on-dequip which would do the same?

For OnEquip you'd use "i_<ItemTag>_eq" and for OnUnequip "i_<ItemTag>_ue". However like rjshae already said the problem with having the backpack be equipable, is that it needs to take an equip slot. The point of psiiijay's idea is that they don't.
And if the backpack can be equipped then you wouldn't even need to mess around with visual effects to have the backpack show.
If you want to whole thing be more automated I suppose you could try using the OnAquire "i_<ItemTag>_aq" and OnUnaquire "i_<ItemTag>_ua" events, which fires when the item enters or leaves your inventory.

#9
Tchos

Tchos
  • Members
  • 5 042 messages

A script that runs outside of the initial equip script will not recognise the effect by the name "eBackPack".  You'd better assign it a spell ID so you can remove it directly later.



#10
Dann-J

Dann-J
  • Members
  • 3 161 messages

That's how I handle (if you'll excuse the pun) my Handy VFX. Only in this case the model effect would be set up to attach to something other than the hand (the torso, I'd expect).



#11
psiiijay

psiiijay
  • Members
  • 258 messages

Huge help guys!!

 

I fixed everything and created even a combined 4 backpacks alltogether that looks great!

You can now carry a backpack with bedroll, wizard staff & scrolls attached and a sword and bow at the same time! :)

If anybody wants I'll upload it :)



#12
Raygereio

Raygereio
  • Members
  • 913 messages

If anybody wants I'll upload it

Definitely. I've actually been looking for some good backpack models.



#13
rjshae

rjshae
  • Members
  • 4 485 messages

Definitely. I've actually been looking for some good backpack models.

 

I don't know if you'd consider them good because they just look like textured boxes, but there are some NWN backpacks here:

 

http://neverwinterva...hakpak/backpack

 

They are probably very lightweight in terms of graphical overhead and could be useful for random NPCs.

 

There's always these of course:

 

http://neverwinterva...model/backpacks



#14
psiiijay

psiiijay
  • Members
  • 258 messages

I got a new comp - I'll get the DROPBOX running and share a link