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.
Making items summon creatures...
Débuté par
Wolcott19
, juin 11 2012 01:14
#1
Posté 11 juin 2012 - 01:14
#2
Posté 11 juin 2012 - 01:43
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.
(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 .
#4
Posté 11 juin 2012 - 02:02
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.
#5
Posté 11 juin 2012 - 02:15
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
.
#6
Posté 11 juin 2012 - 02:41
Wow, you got back to me quicker than I thought. Thank you both, you are a great help.





Retour en haut






