Aller au contenu

Photo

NWNCX Suggestion - open "hard coded" visual effects to modification/addition


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

#1
The Amethyst Dragon

The Amethyst Dragon
  • Members
  • 1 875 messages
Just copying this over from the custom content section:

Alex Warren wrote...

Several months ago this was
impossible, but thanks to Virusman and Amethyst Dragon we can now add
new visual effects to weapons.  So my question is - would it be possible
in NWNCX to 'remove' hard-coding from other visual effects in the game
(beams, 'skin-changing' effects)?

Any thoughts?



#2
virusman

virusman
  • Members
  • 282 messages
It would help if you could specify in detail, what 2das are involved and how these effects are applied.

#3
Alex Warren

Alex Warren
  • Members
  • 179 messages
Beams are applied through EffectBeam() function, 'skin-changing' effects are applied as normal vfx (EffectVisualEffect()). Sorry, but I don't know how they work exatly.

They are all listed in visualeffects.2da (as a value in ProgFX_*). I haven't found any models for them, although I know I saw mod on the Vault where someone replaced textures in 'skin' effects.

Modifié par Alex Warren, 05 juin 2012 - 08:32 .


#4
virusman

virusman
  • Members
  • 282 messages
There are several hardcoded effect types. See ProgFX_* in visualeffects.2da columns to see where these VFX types are used.

100 - EnvironmentMap
I haven't seen it used anywhere, but it's actually configurable.
ProgFX 101 = apply environment map vdu_envmap001, 102 = vdu_envmap002, etc.
I don't know how it looks in game, though.
200 - SelfIllumination
Calls some function with 3 floating point params (I guess it's color). Can be softcoded.
300 - LightSource
Model name + some parameters. I don't think it's worth modifying. We have enough colors for light sources.
400 - Alpha
3 or 4 params. Can be softcoded.
500 - SelfIlluminationPulse
6 params. Can be softcoded.
600 - Beam
Model name. Can be softcoded.
700 - UnloadModel
I don't know what this does
800 - Chunk (gib)
Heavily coded, nothing to do here.
900 - Mirv
Model name + hardoded trajectory. I'm not sure if this will work if you just change the model name.
1000 - TextureReplace
Texture name + some offset. Can be softcoded.
1100 - Cheat
Cows from hell!
1200 - Spellfail
I don't know what this does
1300 - Freeze animations
Self-explanatory. Nothing to modify here.

Modifié par virusman, 05 juin 2012 - 11:13 .


#5
virusman

virusman
  • Members
  • 282 messages
So what kind of ideas do you have about these VFX and what would you want to see first?

#6
Alex Warren

Alex Warren
  • Members
  • 179 messages
I would love to have new beam effects for my warlock (PRC) - eldritch blast (+ versions modified by various eldritch essences) and if it's possible to scale beam effect, maybe I could also add proper eldritch line?

TextureReplace would be nice for some spell effects (iron body, crystalize psionic power etc).

If you could softcode them, many people (including myself) would be grateful :D

#7
OldTimeRadio

OldTimeRadio
  • Members
  • 1 400 messages

virusman wrote...
So what kind of ideas do you have about these VFX and what would you want to see first?

You never cease to amaze me, VirusMan!  Please excuse my wordy responses (and horning-in on Alex's request),  I have no idea how much CC you do so I included what I hope is some helpful information, if you need it.

Beam (600 series ProfFX) have my vote for first to be investigated.  To be able to make new beams would be insanely cool.  The unique thing about beams is that they connect two different models on the fly.  Each beam has it's own model (vim_*.mdl) and I think NWN replaces the ref_node (fx_ref) in the beam model with the target models' impact node.  Does that make any sense to you?  Most if not all beams are actually lightning emitter types which (I believe) basically broadcast lightning from the player to the target.  I should have taken better notes.  I never thought anyone would go after the ProgFX functions!

Texture Replace (1000 series ProgFX) would be my second choice.  Also very cool.  The way I think this works is a bit more limited because it applies the texture to the entire model but it would still be very nice.  If there were some way to configure which parts of the model for the texture to be applied to that would be incredible but I think that might not be possible.  I think if you can get this working, and if the creature's model used a single texture for all its pieces, you could maybe switch the entire texture of the creature.  Which means you could make variations of the creature's appearance without needing a new model. (!)  If that worked like I think, that could be a big deal.

MIRV (900 series) would be my third choice, but not a big deal.

virusman wrote...
I'm not sure if this will work if you just change the model name.

I don't know how to express myself because I haven't had much time to mod NWN in about two months, but I don't think that will work.  There's a similar issue with beams.  Basically, sometimes the wrong (color, for instance) MIRV or beam displays.  Anyway, the MIRV seems to be a hardcoded and slightly tweaked version of the "burst" projtype.  It's possible to fake something that almost looks just like a magic missile MIRV by "overcasting".

I don't know how much custom content you do, VirusMan but this post of mine might help or give an idea or two:
"Monster" nodes on a player, ProjType demo module

I also have to say, if you're right about ProgFX 100 series, you just made my day. I had noticed vdu_envmap%03u in a string dump from NWMain but since the next series of strings are from the 1000 series (starting with vdu_tex_stone, ProgFX 1010), I always assumed the proper ProgFX was 1000, not 100! If that works, being able to change environment maps like that would almost be as cool as the Texture Replace functionality! Aside from shiny stuff, I think the possibilities for tinting via environment maps is promising:
HowTo: Recolor a texture conventionally or with an envmap for an "infinite" recolor

Thank you for doing so much to help expand the game!

Modifié par OldTimeRadio, 06 juin 2012 - 09:48 .


#8
virusman

virusman
  • Members
  • 282 messages
I think you got me wrong: aside from some minor emitter and retexturing CC for my haks, I don't make any CC, so I wasn't planning to do an original CC now: I leave it to the talents like you, The Amethyst Dragon and others. After all, I also need a motivation to work on NWNCX, and imagining things that might be done using my extensions motivates me to dig into the NWN code again and again. :)

Modifié par virusman, 06 juin 2012 - 03:31 .


#9
The Amethyst Dragon

The Amethyst Dragon
  • Members
  • 1 875 messages
virusman:

If you can provide us a way to add and/or modify such things as the texture replace and the beam effects, I'm sure we can come up with some good ways to make use of that capability. :)

#10
virusman

virusman
  • Members
  • 282 messages
While I'm at it, could anyone try the EnvironmentMap FX?

#11
Dark_Ansem

Dark_Ansem
  • Members
  • 638 messages
how do we try it?

#12
virusman

virusman
  • Members
  • 282 messages
Create a new line in visualeffects.2da with "101" in one of the ProgFX columns (ProgFX_Duration, probably). Then create an environment map texture named "vdu_envmap001", then try to apply the effect in game.

Modifié par virusman, 06 juin 2012 - 08:53 .


#13
OldTimeRadio

OldTimeRadio
  • Members
  • 1 400 messages
Virusman, you're amazing!  I had to leave earlier today and take care of business but I just got back.  Before I left I confirmed that the functionality you describe works and cycled through about 30 environment maps on an object.  Demo video is compressing and I'm packing up the bits of the demo module.

It works!  I haven't had any problems yet.  :D

#14
OldTimeRadio

OldTimeRadio
  • Members
  • 1 400 messages
---------->BEST VIEWED IN HD<----------

Posted Image

---------->BEST VIEWED IN HD<----------

Modifié par OldTimeRadio, 07 juin 2012 - 04:57 .


#15
OldTimeRadio

OldTimeRadio
  • Members
  • 1 400 messages
And here's the demo module!  Hak goes in hak folder, module goes in module folder.  Load up the module and start pulling the lever.  More sample environment maps are included than I actually have entered in the visualeffects.2da but you get the idea.

Posted Image

#16
nwnsmith

nwnsmith
  • Members
  • 67 messages
Would the self illumination toggle off the light surrounding pcs in dark areas that you see even when no light source is equipped ?

#17
OldTimeRadio

OldTimeRadio
  • Members
  • 1 400 messages

nwnsmith wrote...
Would the self illumination toggle off the light surrounding pcs in dark areas that you see even when no light source is equipped ?

I think what you're talking about is actually controlled in a model called Fx_light_CLR.mdl which is sort of surreptitiously applied to the player's model by the game to give that effect.  Do you have the NWN Omnibus?  If you search for Fx_light_CLR in there it'll bring up two threads, one of which sort of delves a bit more into what's going on there.  See WEPalmer's response.

Now, it might be possible that Virusman could still override such an effect.  But there's a bit of a difference between overriding a numeric value for the light in your situation and sort of trying to cancel out the light caused by a model with an AuroraLight being applied to the player, as I believe is the case.  If you can't grab the NWN Omnibus, here is WEPalmer's response:

Well, the light around the character is caused by a vfx model called fx_light_clr, so if you wanted, you could use NWNExplorer to extract that .mdl file from the data\\models_01.bif as an ascii text file and edit the animation
sequence called Blind_Vision, specifically:

#MAXANIM ASCII
newanim Blind_Vision Fx_light_CLR
length 0.300000012
transtime 0
animroot Fx_light_CLR
node dummy Fx_light_CLR
parent NULL
#part-number 0
endnode
node light AuroraLight02
parent Fx_light_CLR
#part-number 2
colorkey 1 0.300000012 0.15 0.15 0.2
radiuskey 2 0 0 0.300000012 7
endnode
doneanim Blind_Vision Fx_light_CLR

and change the last three values in the colorkey line to make the light as dim as you want. If you change to values to 0.0 0.0 0.0 the player won't even be able to see his own character in the dark, so you might not want to go to that extreme. Then use a text editor to remove the .txt extension from the ascii text file and put the resultant .mdl file into a hak and add the hak to your module.

I tried to clean that up a bit, I might have butchered the ASCII a little.  Still, it'll be a decent guide if you go into the ASCII model on your own.

Modifié par OldTimeRadio, 09 juin 2012 - 09:11 .


#18
virusman

virusman
  • Members
  • 282 messages
I guess Blind_Vision is ProgFX=333

Modifié par virusman, 09 juin 2012 - 11:01 .


#19
nwnsmith

nwnsmith
  • Members
  • 67 messages
Whoa! That was one of the biggest visual benefits for my module with the lowest effort I have ever seen. Truly amazing!

#20
virusman

virusman
  • Members
  • 282 messages
Beams:
http://data.virusman...nwncx-0.2.2.rar
Copy vfx_beams.2da to your override folder, create a new beam model, add a new line to vfx_beams.2da with this model, add a new effect in visualeffects.2da with ProgFX=600+<line number in vfx_beams.2da>.

Modifié par virusman, 12 juin 2012 - 10:46 .


#21
Alex Warren

Alex Warren
  • Members
  • 179 messages
It crashes the game when I try to use it :(
I've tried both loader and patched exe.
I even reinstalled NWN but it didn't help.
If I run the game with nwncx it crashes right after module load screen.
It works normally without nwncx.
Help?

#22
virusman

virusman
  • Members
  • 282 messages
Does the previous version work?
Does it crash if you run without nwncx_tweaks.dll?
If you're using the patch, make sure you patch the vanilla version, without camera hacks or other modifications.

Modifié par virusman, 13 juin 2012 - 10:08 .


#23
Alex Warren

Alex Warren
  • Members
  • 179 messages

Does the previous version work?

Yes

Does it crash if you run without nwncx_tweaks.dll?

Yes - I only wanted to test nwncx_tweaks so I didn't even istalled other plugins. Later I tested full nwncx, but without nwncx_tweaks - it crashes the game for me.

If you're using the patch, make sure you patch the vanilla version, without camera hacks or other modifications.

I reinstalled my NWN - can it be more vanilla?

#24
virusman

virusman
  • Members
  • 282 messages
Oops, I packed the development version of nwncx.dll. You can redownload the package now or just replace nwncx.dll with the older version.
Thanks for the info.

#25
Alex Warren

Alex Warren
  • Members
  • 179 messages
I just tested it - the game didn't crashed this time and loaded normally XD
I was able to add new beam vfx!!!
Thank you!!!