Author Topic: "Monster" nodes on a player, ProjType demo module  (Read 691 times)

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
"Monster" nodes on a player, ProjType demo module
« on: January 14, 2012, 04:36:23 pm »


               I was working on a project which required moving around nodes and while I was at it I thought I'd do a little research on them.  I came across a few interesting things but one thing that caught my eye was "monster" nodes.  They appear to have originally been created for use by beholders so their eyestalk beam effects would look like they were coming from the appropriate tentacle.

"Neat!", I thought.  "I wonder if you can strap those onto a player model?"  So I loaded up PMH0 and created a few dummy nodes, renaming them "monster0" to "monster4".  Apparently you can go up to at least "monster9", but you'll get the idea when you view the video below.  I didn't use NWMax's "MonsterNode" button because it suffers from the same issues that emitter creation does- you can't see them when you're creating them.  I fixed the emitter creation problem and something similar would probably fix this if you really wanted to.  Anyway, back to those monster nodes.  Some I attached directly to the Aurora base, others to player nodes, like rhand_g and lhand_g.  It worked and I was able to use them as beam origins just like you would with other nodes like the BODY_NODE_* constants.  See EffectBeam and those constants in the Lexicon or Omnibus for more of what I'm talking about. 

Here is what that looks like in action:
'Image
Script-wise, the above was done using basic beam scripting.  Nothing fancy or tricky except for having added those monster nodes to the player model (PMH0 in this case) and having referenced those nodes in my script as the origin of the beam.

Neat but...can we do anything else with those monster nodes?  So I searched against the Omnibus for "monster0" and came across an interesting reference in the BioWare documents (and one from Georg Zoeller) that indicated that you could launch spell projectiles out of these nodes.  Makes sense, given that their original purpose was for beholder tentacle rays.

So I copied the line from the fireball spell in spells.2da, butchered it up a bit and used ActionCastFakeSpellAtObject to see if I could get it to launch a projectile from my "monster3" node using a sample projectile I created.  Yep, coming off monster3, which is high off my left shoulder and attached to the Aurora base directly:
'Image
Here is the script, which also contains a stripped down spells.2DA line (in the comments) and uses a default projectile.  You'll have to extract PMH0.mdl and add the nodes (or at least just "monster3") yourself, though.  If you need help extracting it just post here or PM me and I'll be happy to guide you through it.  It's super easy to do and you get to place the nodes where you like.

Anyway, that just spits out one projectile at a time.  Can we overcast the spell using the DelayCommand trick? Yup:
'Image
Kinda like that one spell... And without any ProjFX hassle.  Here is the script for that one which also contains a stripped down spells.2DA line (in the comments) and uses a default projectile.

In conjunction with VFX, you could give the illusion that a beam or projectile was shooting out of whatever the VFX was, like a shoulder cannon for instance.  And of course you can use this on monsters.  It is the "monster node" after all.  I haven't tried placeables yet but that could be fun in making multi-beam fences and other goodies if it works.

The demo module below shows off the 9 ProjType settings for projectiles in spells.2da.  It doesn't require any monster nodes or anything like that and just serves as a visual demo of the path each of the ProjTypes takes as they move from origin to target.

They are:
homing - Homes directly to target
ballistic - Homes to target following ballistic arc
highballistic - Homes to target following extremely steep ballistic arc, like a mortar.
burst - Homes to target via random (XYZ) ballistic arc. Path random on all 3 axes.
accelerating - Homes directly to target, accelerating as it travels
spiral - Homes to target then spirals around several times before impact.  Think "Hellball"
linked - Attached to ProjSpwnPoint and at the very last second homes directly to target
bounce - Travels to target via 3 bounces.  First bounce at halfway point, second when 3/4 there if not launched high.
test - (undocumented) Homes to target following ballistic arc, breaks into 4 MIRVs at halfway point which converge on target.
**** - This is the "tenth" setting, but it's really no setting at all so any projectile created using this as a ProjType setting will hang in space where it was created.  There are probably much better methods to use if you're going for that effect.

'Image

'Image

There are also three related settings worth mentioning which are not displayed in the demo video or module but which might come in handy, for ProjOrientation- another column in spells.2da.  They are "***", "path" and "target" and they affect the facing of the projectile as it moves from source to target.  **** will cause the projectile to forever face the direction it was spawned in (rather awkward for something like the "burst" setting), while "path" keeps the projectile always oriented to the path during flight and target (you guessed it) keeps the projectile oriented toward the target during flight.

'Image

As you can see if you look at the spells.2da in my hak, I just ripped off a simple fireball spell and changed a few settings.  I'm using quick-n-dirty ActionCastFakeSpellAtObject in the demo and so you may need to limbo a bit to get what you want out of it in certain situations.  Looking at/using the script samples I link to should help you get up to speed if you do want to play with the effect.  I don't do much scripting anymore so there's probably quite a bit of room for improvement.
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
"Monster" nodes on a player, ProjType demo module
« Reply #1 on: January 14, 2012, 05:22:39 pm »


               <trembling...>
'Image

Holy moly!
And what *else* might someone attach to those nodes?
Edit: can you think of any way other than spells to attach geometry to them?
*dreams of actual piecemeal armour...and boots... and a scarf. a long ugly scarf.*

<...with excitement >
               
               

               


                     Modifié par Rolo Kipp, 14 janvier 2012 - 05:38 .
                     
                  


            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
"Monster" nodes on a player, ProjType demo module
« Reply #2 on: January 14, 2012, 07:41:11 pm »


               Thanks for posting this, OldTimeRadio.  Now I'm going to have to go edit spells.2da a bit just for those projectile path options. You just opened up even more magic missile options for me. '<img'>  Stuff I didn't know about just from browsing the 2da file.

As far as the monster nodes, that's just plain awesome.  I'll have to play around with those, too.

Time to experiment!
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
"Monster" nodes on a player, ProjType demo module
« Reply #3 on: January 15, 2012, 01:42:57 am »


               @Rolo - Not that I know of, unfortunately!  I just came across this last week so who knows?  There may be more or that might be it.  Hammer away at it and see what you can find/think up!

@Amethyst Dragon - I can only imagine the things you'll make.  Feel free to tease us with screenshots and videos!

Some ideas, just putting these out there to no one and everyone: Turning the projectiles into the active component of a mini-game like "toss the tankard of beer to the table" or horseshoes, both using the bounce seting.  Also, a ballistic path spell with a bird model projectile would make a nice "atmospheric", flying from one tree to another after you disturb it, walking by.

I'm just starting to play with these when I'm not fooling with something else. If anyone wants to toss out ideas how these projectile types, monster-nodes (whether on players or not) could be used in creative ways, I would love to hear 'em!  Animation can be such a pain that when I come across something in NWN that takes care of the movement for me I don't want to miss taking advantage of it.
               
               

               


                     Modifié par OldTimeRadio, 15 janvier 2012 - 01:43 .
                     
                  


            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
"Monster" nodes on a player, ProjType demo module
« Reply #4 on: August 31, 2012, 03:37:02 pm »


                 I'd been playing around making an animation (or two, eventually) that'd work with Baaleos' mage duel concept, but ran into an issue trying to get the beam origin to move the way I wanted.  Then I remembered this old thread, and started playing around attaching the monster nodes to a player base to try using those in it.

  They work quite well attached to other nodes.  There could be some interesting uses for this, if a bit of a standard could be worked out for their use.

  As for what I've been trying so far, I went with monster0, 1, and 2 attached to head_g (mouth, right and left eyes, in theory).  Monster 3 and 4 on rhand_g and lhand_g.  Monster 5 attached to handconjure, and monster6 attached to the impact node.

  Oddly, handconjure seems to be static even if you move it manually within an animation, but the impact node can be moved freely and moves the monster node attached to it properly, even if that part isn't defined in the animation.

  Anyways, I put a clip of my early tests with them (and the early still clunky animation) here, for anyone curious about it.
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
"Monster" nodes on a player, ProjType demo module
« Reply #5 on: September 01, 2012, 03:35:39 am »


               That looks great, Failed.Bard!  Very original, too.  I haven't ever seen anything like that before.