Author Topic: Elemental summon items.  (Read 484 times)

Legacy_DM_Moradin

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Elemental summon items.
« on: December 21, 2010, 07:38:39 pm »


               I did search for this topic, and didn't find anything, so I apologize if it's been posted somewhere. 

I would like an item to summon elementals, similar to the stock brazier/bowl/etc, but I want a higher level elemental, more like the creature summon 7-8 spells. 

Has anyone scripted this or something similar? 

Also, if there is a tutorial somewhere on editing spells (the .2da files), I would love to figure out how to do that. 

thanks in advance.
               
               

               
            

Legacy_eeriegeek

  • Jr. Member
  • **
  • Posts: 75
  • Karma: +0/-0
Elemental summon items.
« Reply #1 on: December 21, 2010, 10:09:31 pm »


               Just create any item you like in the toolkit and give it the property: Cast Spell: Summon Creature VIII. Be sure to click on "Edit Property" and make it useable something like once per day or use charges, otherwise by default it disappears on the first use.
               
               

               
            

Legacy_DM_Moradin

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Elemental summon items.
« Reply #2 on: December 22, 2010, 02:39:37 am »


               Yeah, I had figured that, but the summon creature spell summons a random elemental type.   I guess with the current set up, it's either one or the other.



Thanks for the reply.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Elemental summon items.
« Reply #3 on: December 22, 2010, 03:36:32 am »


               

DM_Moradin wrote...

I would like an item to summon elementals, similar to the stock brazier/bowl/etc, but I want a higher level elemental, more like the creature summon 7-8 spells. 



 #include "x2_inc_switches"
void main()
{
    if (GetUserDefinedItemEventNumber()!= X2_ITEM_EVENT_ACTIVATE) return;
    object oPC = GetItemActivator();
    int nDuration = GetCasterLevel(oPC);
    effect eSummon = EffectSummonCreature("NW_S_badgerdire");
    effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);

    ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetItemActivatedTargetLocation());
    ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetItemActivatedTargetLocation(), TurnsToSeconds(nDuration));
}

Just Change the ResRef above to the creature you want to summons.
Then compile the script with the same name as the tag of the item you place the Item activate Power on.

Tag-Based Scripting(Axe Murderer)

 This was also more of a scripting then a custom content question.   You may get more answers if you posted in the scripting forum.  

The 2da Part Is Custom content.   The NwnWiki would be a good place to start. 
 http://nwn.wikia.com/wiki/Spells.2da
               
               

               
            

Legacy_UnrealJedi

  • Full Member
  • ***
  • Posts: 226
  • Karma: +0/-0
Elemental summon items.
« Reply #4 on: October 06, 2013, 04:48:19 am »


               Hello Lightfoot8 (or anyone else that cares to reply)...

I copied and pasted your script above in and named it the tag of my item to be activated. It works great except that no creature appears. The PC makes the animation, the visual effect goes off but no creature makes an appearance. I took out the resref of my custom creature and put in the one for a basic skeleton and still nothing appears. Any ideas?

Thanks!