Author Topic: Making items summon creatures...  (Read 598 times)

Legacy_Wolcott19

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Making items summon creatures...
« on: June 11, 2012, 02:14:10 am »


               I am making a module for the first time. I have done alot of research, found a scripting tool, and a custom PC tool. I want to make custom playable creatures available to all players but don't know how to do it but sinse I don't know where to put a topic such as this I'll save it for when I do find out where to put it.

Anyway, I want to be able to have stones for sale in one of the dungeans I'm putting in the module that can summon a dragon (summon any creature, really) but I can't figure out how to do it. I am using the Lilac scripting tool and I'm pretty much self taught in this module building thing so any help would be nice.

Thanks

P.S.
If my question is too vague then let me know. I was in a rush when I was typing this.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Making items summon creatures...
« Reply #1 on: June 11, 2012, 02:43:45 am »


               Welcome, Wolcott19. In my module, I've got an NPC with your name, Gil Walcott. He lives in the cottage by the wall. Anyway...

(1) For scripting questions (which this is) post your queries in the Scripting section.
(2) A great scripting resource is online. It is called the NWN Lexicon. I recommend making use of that.
(3) Summoned creatures are an effect. EffectSummonCreature. You'll want to use that function in your script.

If this stone is a type of item that will summon different creatures (like a figurine of wondrous power) I recommend the following:
- Use tag based scripting. For an explanation of tag-based scripting see the lexicon. You will want to set this up for your module.
- Use one tag based script for all of the summoning stones.
Here's a rough script that I wrote for you.
- Tag all of the summoning stones with the same tag. This tag will be the same as the name of your script.
- To determine which type of creature each stone summons, set the ResRef of the creature on the item as a local string. For setting a local var on an item, right click the item and pull up "variables". You can set a string, an int or a float. In this case we will be setting a string.
- Give each stone a special property. Cast Spell: Activate Item (select one of the short ranges)
- In the description of the stone, give the player a hint as to what it summons.
               
               

               


                     Modifié par henesua, 11 juin 2012 - 01:50 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Making items summon creatures...
« Reply #2 on: June 11, 2012, 02:54:10 am »


               Beat to the punch,  Here is an old  Link I dug up since im here.  

You will need to use the lexicon for the Tag based scripting tutorial.  The one in the post linked is dead.   It looks as if AXE has moved off the east cost and no linger has his COX ISP.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Making items summon creatures...
« Reply #3 on: June 11, 2012, 03:02:44 am »


               Also, Lightfoot8 is a much better scripter than I (as are most), so trust him! His code snippet is much simpler than mine, so may be an easier way for you to get started. But I enjoy customizing scripts with local variables... its an obsession.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Making items summon creatures...
« Reply #4 on: June 11, 2012, 03:15:48 am »


               henesua, can hold his own in the scripting arena and normally can do a better job of explaining things, then I can.   People often look at me as if I'm mad'Posted
               
               

               
            

Legacy_Wolcott19

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Making items summon creatures...
« Reply #5 on: June 11, 2012, 03:41:44 am »


               Wow, you got back to me quicker than I thought. Thank you both, you are a great help.