Author Topic: Avoiding summoning effect  (Read 318 times)

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Avoiding summoning effect
« on: August 10, 2011, 10:14:57 pm »


               <peers near-sightedly at a crumbling scroll...>

A little background first, if you'll permit: I was, a loooong time ago, very involved with NwN. I dropped everything and went off-grid about 9 years ago. I have pretty good (not masterful!) scripting skills and am conversant in PHP, Javascript, C, Modula, pascal, ... um, ok. I'll stop. Point is that I'll probably understand what is said, even if I could never have figgered it out on my own :-P  I left NwN just before beta, just days before we got our hands on NWScript.  Hell, we were still argueing (in vain, it turns out) for arrays :-P Until then all we had to work with was pseudo-code.

And that's where this is coming from - my old notes :-(

Problem: I want to create a SummonxxPack(  ) function. This function will be called by creatures - alpha versions of creature xx - on entering combat.  It will:
  • play a howl (or creature appropriate) sound  =)
  • determine nPackLvl (1/2 alpha's level)
  • Summon nPackLvl creatures of nPackLvl level
It is important that the pack members melt out of the shadows rather than arriving with a flash and a bang.  They also must arrange themselves (without waypoints) around the summoner, or - even better - around the summoners target. I'd also like to delay some of their arrivals up to random(nPackLvl x 3) seconds.

i.e. Your wolfen henchman howls when entering combat. She is level 8 (nPackLvl = 4). 3 seconds later a level 4 wolfen ranger steps out of the woods and notches an arrow. then another appears, and another until 4 of them stand there peppering (and distracting) the enemy.

Currently, I'm thinking of having a single instance of a lvl1 version of the packmember sitting in the encouter area.  When SummonPack is called, nPackLvl copies will be spawned and levelled up to nPackLvl.

So, I have three questions at this point:
  • How do you avoid a summoning effect? Summon them in the encounter area and then move them?
  • How would you determine a viable location around the summoner/target sufficiently far away so that they seem to emerge from the woodwork?
  • Anyone think of a cool effect of emerging from shadows? Fading back *into* the shadows after combat?
I would use this mechanic for 1 particular henchman, a sub-race of NPCs, wolves, lions and other pack/pride hunters.  Among other things, it allows me to represent a larger number of creatures with a single representative.

My Wolfen race is small and a bit weak.  But you can never fight just one... :-)

<...and lays it down>
               
               

               


                     Modifié par Rolo Kipp, 10 août 2011 - 09:52 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Avoiding summoning effect
« Reply #1 on: August 10, 2011, 11:59:43 pm »


               1. If you simply create a creature, it does not necessarily arrive with any effect. If you want the effect you need to apply it to the "summon". So you can hunt through the various VFX's and combinations of them to determine what you want.

2. Is difficult, and is at least half artistry (rather than just code prowess). I have a function that does something similar in my jumping creatures function. I have a routine that looks for a viable location at a certain distance from a target. Feel free to rip apart my scripts to make use of them. (It saves me the time of having to write up pseudo code here) You'll need to adjust the distance I choose to something more appropriate.

3. Not off the top of my head. Perhaps it would be better to precede the appearance of the creatures with an echo of the first howl that is placed at some random distance. And then the creatures show up 4-6 seconds later.
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Avoiding summoning effect
« Reply #2 on: August 11, 2011, 01:06:01 am »


               <dips a brush into water...>

henesua wrote...

1. If you simply create a creature, it does not necessarily arrive with any effect. If you want the effect you need to apply it to the "summon". So you can hunt through the various VFX's and combinations of them to determine what you want.


Good. Rather create, level up and prepare while they are out of sight, though.

2. Is difficult, and is at least half artistry (rather than just code prowess). I have a function that does something similar in my jumping creatures function. I have a routine that looks for a viable location at a certain distance from a target. Feel free to rip apart my scripts to make use of them. (It saves me the time of having to write up pseudo code here) You'll need to adjust the distance I choose to something more appropriate.


I will definitely look.  Thank you :-)

3. Not off the top of my head. Perhaps it would be better to precede the appearance of the creatures with an echo of the first howl that is placed at some random distance. And then the creatures show up 4-6 seconds later.


Ooooh! I like the echo! Gotta do that!

<...and pretends to paint someone's elses masterpiece>