Ironworks Gaming Forum

Ironworks Gaming Forum (http://www.ironworksforum.com/forum/index.php)
-   Neverwinter Nights 1 & 2 Also SoU & HotU Forum (http://www.ironworksforum.com/forum/forumdisplay.php?f=16)
-   -   Need help -- Need NPC to Polymorph in conversation (http://www.ironworksforum.com/forum/showthread.php?t=36557)

Ziroc 10-25-2004 08:47 AM

I cannot seem to figure it out. I use:


==================
effect vfx = EffectVisualEffect(VFX_DUR_GHOSTLY_VISAGE);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, vfx, OBJECT_SELF);

EffectPolymorph(POLYMORPH_TYPE_SUCCUBUS);
------------------

I know I need somehow to add an OBJECT_SELF to the Polymorph--I think.. but what I want to happen is: 1. she cast a spell effect on her self (dur) and then polymorph into a succubus.

Any ideas?

Thanks! [img]smile.gif[/img]

Legolas 10-25-2004 09:11 AM

The Polymorph is as much an effect as the visage visual effect is.
So, you need to apply that one as well.

Quote:

effect eMorph = EffectPolymorph(POLYMORPH_TYPE_SUCCUBUS);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eMorph, OBJECT_SELF);
Also, to keep effects like these from being dispelled by players, if they are not supposed to be reversable, make them supernatural effects.

What this does is polymorph her on the spot. Alternatively you could use
Quote:

SetCreatureAppearanceType(OBJECT_SELF,APPEARANCE_T YPE_SUCCUBUS);
which does the same thing except this change is non-magical, cannot be dispelled, and sets the proper movement speed and creature size.

Neither of the above involves any spellcasting effects however.

To do that, you need to use the ActionCastSpellAtObject or ActionCastFakeSpellAtObject commands.

Quote:

ActionPauseConversation();
ActionCastFakeSpellAtObject(SPELL_POLYMORPH_SELF, OBJECT_SELF);
effect eVFX = EffectVisualEffect(VFX_DUR_GHOSTLY_VISAGE);
effect eMorph = EffectPolymorph(POLYMORPH_TYPE_SUCCUBUS);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(eVFX), OBJECT_SELF);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(eMorph), OBJECT_SELF);
ActionResumeConversation();
Again, SupernaturalEffect is optional and there are alternatives to actually achieve the shapechange effect.

EDIT: The reason you do not need to assign the Action commands is that the conversation pausing/resuming doesn't need it as they are voids rather than actions, and the casting effect is done by the caller, OBJECT_SELF, by default.

[ 10-25-2004, 09:14 AM: Message edited by: Legolas ]

Ziroc 10-25-2004 09:22 AM

Totally awesome, man! THANK YOU!!! This is exactly what I need. Wow, you are damn good at scripting! I'll remember to ask you the next time I need some help! WOW! :D

I am making this non-permanent, which means I can, in DM mode, click on her, and click heal, and she should revert to her old self? Will she have her same dialogue and tags? If so, how do you undo it, or does it wear off over time? Or can you have it last so many minutes or seconds?

Thanks!!!!

Legolas 10-25-2004 09:35 AM

The dialogue and tags will stay the same even when polymorphed. Since the effect is permanent, it won't wear off, but you can make it wear off by using
Quote:

ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eMorph, OBJECT_SELF,180.0);
instead. The 180.0 means it'll last 3 minutes (180 seconds) and you can easily adjust that time to anything you think appropriate.

Alternatively, you can reverse it by casting a dispel magic on or near the succubus.

A DM Heal should work as well, although I'm not 100% certain of that. A simple test should provide the answer to that.

You can also reverse it using the SetCreatureAppearanceType command, not with a dispel magic or DM heal, but with timed scripting or the proper console command. The advantage of this system is it can't be dispelled and it won't show a polymorphed effect on examine. This is actually a downside though, if you intend for the effect to be a true magical polymorph which really should apply to the rules.

[ 10-25-2004, 09:38 AM: Message edited by: Legolas ]

Larry_OHF 10-25-2004 11:24 PM

<font color=skyblue>woah...too high-tech for this ol' boy...</font>

:eek:

T-D-C 10-25-2004 11:27 PM

Same here. I'm thinking this is for your witch on the 3rd floor Z ?


All times are GMT -4. The time now is 09:38 PM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved