Author Topic: NWNCX Suggestion - open "hard coded" visual effects to modification/addition  (Read 6682 times)

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0


               

virusman wrote...

Nevermind. '<img'>
Open face helmets:
http://data.virusman...nwncx-0.2.5.rar
Add dummy node named "nwncx_openface" to your model, and the game won't remove the head when you equip the helmet.
I'm still not sure it's the best way, but it seemed better than VFX. Anyway, even if you want to use VFX, you can create an empty model just with that dummy node and apply any kind VFX in OnEquip script.
As I don't have any suitable helmet models for testing, the current implementation may have some bugs: i.e. disappearing head when re-entering area or logging in with helmet equipped.

Wow.  Happy 10th NWN Birthday to us!  Thanks, yet again, virusman!
               
               

               
            

Legacy_leo_x

  • Sr. Member
  • ****
  • Posts: 403
  • Karma: +0/-0


               

virusman wrote...

Nevermind. '<img'>
Open face helmets:
http://data.virusman...nwncx-0.2.5.rar
Add dummy node named "nwncx_openface" to your model, and the game won't remove the head when you equip the helmet.
I'm still not sure it's the best way, but it seemed better than VFX. Anyway, even if you want to use VFX, you can create an empty model just with that dummy node and apply any kind of VFX in OnEquip script.
As I don't have any suitable helmet models for testing, the current implementation may have some bugs: i.e. disappearing head when re-entering area or logging in with helmet equipped.


Quick question (for servers/LAN games): will all players see the same thing?  Or will only the client see the open face helms and others see a helmet model + a VFX (if they do/don't have nwncx)?  Higher Ground has hidden helmet models server side for quite some time.  They never released it, I attempted to copy the functionality awhile a go on linux: github.com/jd28/nwnx-ta/tree/master/plugins/tastuff  It's only issue is wrt shifters needing to reequip.  If all players see the same thing, I'd love to switch to something more robust.

Thanks for the amazing work on this!
               
               

               


                     Modifié par pope_leo, 19 juin 2012 - 08:01 .
                     
                  


            

Legacy_virusman

  • Sr. Member
  • ****
  • Posts: 448
  • Karma: +0/-0


               It won't work correctly if the player doesn't have NWNCX installed (they won't see their character's head). To provide fallback for players without NWNCX, you can use 2 versions of haks - one for vanilla client, one for NWNCX enabled client.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0


               

virusman wrote...

Nevermind. '<img'>
Open face helmets:
http://data.virusman...nwncx-0.2.5.rar
Add dummy node named "nwncx_openface" to your model, and the game won't remove the head when you equip the helmet.
I'm still not sure it's the best way, but it seemed better than VFX. Anyway, even if you want to use VFX, you can create an empty model just with that dummy node and apply any kind of VFX in OnEquip script.
As I don't have any suitable helmet models for testing, the current implementation may have some bugs: i.e. disappearing head when re-entering area or logging in with helmet equipped.

excellent, though why is the name of the dummy nwncx_openface? Wouldn't be better simply openface? I understand you want to credits, but these prefixes are quite silly actually, hopefully its not virusman_openface, but still. ':huh:'
               
               

               
            

Legacy_virusman

  • Sr. Member
  • ****
  • Posts: 448
  • Karma: +0/-0


               The prefix means that it's NWNCX-specific and won't work without NWNCX. Not to mix it up with any other node names.
I don't need credit, I needed a node name that wouldn't confuse CC makers.
               
               

               


                     Modifié par virusman, 13 juillet 2012 - 02:35 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0


               well, lets say that nwncx or its abbreviates (since you made source public, i will be later hopefully able to include this code in my own PW-client - and im not the only one there with his own NWN client app) becomes standard, and the more features like this nwncx brings the higher are chances that this will happen. Then it becomes obsolete I think.

Well nevermind, its not really important and Im not even modeller just user in this case '<img'>
               
               

               


                     Modifié par ShaDoOoW, 13 juillet 2012 - 02:38 .
                     
                  


            

Legacy_virusman

  • Sr. Member
  • ****
  • Posts: 448
  • Karma: +0/-0


               NWNCX is still very far from being a standard. There have been no CC releases utilizing these new features, so I'm not sure if it'll ever be a standard.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0


               

virusman wrote...

NWNCX is still very far from being a standard. There have been no CC releases utilizing these new features, so I'm not sure if it'll ever be a standard.

well there is quite a problem for PW based modules that its client feature and this is not easy to distribute to the players.

Im working on a custom NWN launcher/updater application for my PW that will automatically connect to my server. But not really c++ programmer and all I can is copy&paste. From your nwncx modifications Ive managed to initialize only master server hook yet. Also my client is probably only for windows which is main problem I have with this approach, but this way its easy to distribute to my players as my testing server is passworded and the only way to join is using the client then (while pass can be found out, there is no reason why would anyone tried to join without client as it allows to pick new base classess already).
               
               

               


                     Modifié par ShaDoOoW, 13 juillet 2012 - 02:58 .
                     
                  


            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0


               

virusman wrote...

NWNCX is still very far from being a standard. There have been no CC releases utilizing these new features, so I'm not sure if it'll ever be a standard.

I do plan on making some CC for NWNCX besides the weapon VFX you opened up last year.  I'm going to soon be testing out new beams and texture effects (my one texture replacement test in a pretty much blank module worked quite well) for my PW, and will be experimenting with the helmets in the near future.  I just have several other things a little higher on my to-do list (like finishing the next section of reforged weapon models).

I wish NWNCX could be seen as a standard download.  It's such a simple installation and it opens things up that have been closed off for so many years...things I think should have been open to CC from the start.  I recommend it to all the players of my PW.
               
               

               
            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0


               

virusman wrote...
Open face helmets:
...As I don't have any suitable helmet models for testing, the current implementation may have some bugs: i.e. disappearing head when re-entering area or logging in with helmet equipped.

I did some testing on this.

I grabbed two default helmet models and extracted them with NWN Explorer.  Pulled them into gmax, removed the front of both, but added the dummy node to the 2nd model.  Dropped them into override and opened a basic module that had both helms ready to grab in-game.

Results:

Test 1: Basic Equipping
Helm 1 (normal) - helm appeared, head vanished (normal behavior)
Helm 2 (with new dummy) - helm appeared head remained (desired behavior)

Test 2: Transistions
area transitions with helm 2: head and helm remain

Test 3: Loading saved PC
loading PC in module that had been saved with helm 2: helm visible, head missing

Test 4: Direct item swapping (not, "unequip one, then equip the other")

test 4a:
put on helm 1: head vanishes, helm 1 appears
swap in helm 2: helm 2 appears, head remains missing

test 4b:
put on helm 2: helm 2 appears, head remains visible
swap in helm 1: helm 1 appears, head remains visible

So...direct item swapping seems to keep whatever head state comes with the first one being equipped.  Going back to doing a full unequip, then equip different helm causes the game to reset the head model.

Other observation (not NWNCX-specific): It looks like the default helms were originally made to go over the default human male head model.  Both helms I tested left some space around all sides of the default head (most notably at the top of the head), and not even the ears clipped through the sides of the pot helm (the narrowest of the helm models, I think).  So, if anyone redoes a helm to be open-faced, it should have some faces added to the interior so that a player doesn't see the sky by looking under the edges of said helm.
               
               

               


                     Modifié par The Amethyst Dragon, 13 juillet 2012 - 11:50 .
                     
                  


            

Legacy_virusman

  • Sr. Member
  • ****
  • Posts: 448
  • Karma: +0/-0


               Thanks!
Is it possible to convert HaVFX to open helmet models? Is it just a matter of realigning the model or something more tricky than that?
               
               

               
            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0


               It might be.  One would have to work on scaling, replace the VFX's texture with a plt, and align the model with the helmet location.  Then hope the helm scaling settings in appearance.2da are accurate enough to make the new models look good in-game for the different races/genders.
               
               

               
            

Legacy_virusman

  • Sr. Member
  • ****
  • Posts: 448
  • Karma: +0/-0


               How do HaVFX solve the scaling issue?
Why plt texture?
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0


               Head aligned VFX use tga or dds files for texture mapping.  All character parts use plt files.

 Admittedly, being able to use plt mapping on vfx and creatures in the first would eliminate the need for a number of workarounds that have been thought up.
               
               

               


                     Modifié par Failed.Bard, 14 juillet 2012 - 07:40 .
                     
                  


            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0


               

virusman wrote...

How do HaVFX solve the scaling issue?
Why plt texture?

Yes, body parts all use plt textures, which allow tinting in the toolset.  VFX use tga or dds, so their color is built in and not changable in the toolset.

Head aligned VFX solve the scaling issue by being pre-fit to head models, when the models are made.  Each such VFX is actually a set of 12 visual effects, one for each PC race and gender (half-elves use the human models)...so we use one for human males, one for human femals, one for dwarf males, etc.  It's a lot more work when making the models, but it means the VFX can align much more closely with the default heads.

Of course, this also means that:
a) a VFX isn't guaranteed to fit nicely with all head models for each race/gender (clipping)
'B)' you need a different set of 12 models (and 12 lines in visualeffects.2da) for every color variation you want available for use (that's where plt use in a VFX would be nice)
c) VFX alphas don't support shininess, only transparency (as far as I know)