SetAppearance
Moderator: Event DM
- Gurky_Bogglewig
- Team Member; Retired with Honors
- Posts: 2182
- Joined: Sat Sep 04, 2004 1:28 pm
- Timezone: Eastern (GMT-4)
SetAppearance
Can this function be stored in an item and used on NPCs and PCs in a module? Also, will it persist after rest / a server reset ?
I assume so, unless the changeling scripts use a different function.
I assume so, unless the changeling scripts use a different function.
- p0m
- Scholar
- Posts: 1364
- Joined: Tue May 10, 2005 12:02 am
- Timezone: +10
- DM Avatar: Wintermute
- Location: Brisbane, Australia
- Contact:
I think it is possible to bind the Special Use: Self to setcreaterappearance().
There is a const I believe for appearance type, so it possibly may survive a reset.
Just for reference Gurky:
http://www.nwnlexicon.com/compiled/func ... etype.html
http://www.nwnlexicon.com/compiled/cons ... _type.html
http://www.nwnlexicon.com/compiled/func ... etype.html
There is a const I believe for appearance type, so it possibly may survive a reset.
Just for reference Gurky:
http://www.nwnlexicon.com/compiled/func ... etype.html
http://www.nwnlexicon.com/compiled/cons ... _type.html
http://www.nwnlexicon.com/compiled/func ... etype.html
Player of: Dannar Sunrise/Blighte
Gennor Visson
Jert Vilodel
Gennor Visson
Jert Vilodel
- IceThorn
- Team Member; Retired with Honors
- Posts: 5291
- Joined: Mon Jan 10, 2005 2:06 pm
- Location: Austin, Tx. (Central Time; GMT-6)
- Contact:
I've been trying to save the PC's original appearance so as not to leave them permanently dorked. It's for a spell, and it works fine - unless they cast the spell a 2nd time while the 1st is still in effect making the 2nd appearance the "original." So trying different variables for storage. I'll let you know how it goes (once I get my test mod working again).
Get the function to check for an original appearance variable before changing it.
i.e.
if (GetLocalString(OBJECT_SELF, "SHS_ORIG_APPEAR") == "")
{
SetLocalString(OBJECT_SELF, "SHS_ORIG_APPEAR", IntToString(GetAppearanceType(OBJECT_SELF)));
}
Don't want to use ints since appearance type can be 0.
Unless I'm misunderstanding what you're after.
@Gurky: Yes, it should persist -- the appearance type is written out to the players .bic file anytime it's saved (manually or on exit). Weird crashes or bad lag might mess with it, but you could say that of any function.
i.e.
if (GetLocalString(OBJECT_SELF, "SHS_ORIG_APPEAR") == "")
{
SetLocalString(OBJECT_SELF, "SHS_ORIG_APPEAR", IntToString(GetAppearanceType(OBJECT_SELF)));
}
Don't want to use ints since appearance type can be 0.
Unless I'm misunderstanding what you're after.
@Gurky: Yes, it should persist -- the appearance type is written out to the players .bic file anytime it's saved (manually or on exit). Weird crashes or bad lag might mess with it, but you could say that of any function.
Thought thinks itself.
_________________
A Game is a machine that can get into action only if the players consent to become puppets for a time.
--Marshall McLuhan,
Understanding Media
_________________
A Game is a machine that can get into action only if the players consent to become puppets for a time.
--Marshall McLuhan,
Understanding Media
- IceThorn
- Team Member; Retired with Honors
- Posts: 5291
- Joined: Mon Jan 10, 2005 2:06 pm
- Location: Austin, Tx. (Central Time; GMT-6)
- Contact:
Yea, that's better. I was using ints. Thanks.Heed wrote:Get the function to check for an original appearance variable before changing it.
i.e.
if (GetLocalString(OBJECT_SELF, "SHS_ORIG_APPEAR") == "")
{
SetLocalString(OBJECT_SELF, "SHS_ORIG_APPEAR", IntToString(GetAppearanceType(OBJECT_SELF)));
}
Don't want to use ints since appearance type can be 0.
Unless I'm misunderstanding what you're after.
- IceThorn
- Team Member; Retired with Honors
- Posts: 5291
- Joined: Mon Jan 10, 2005 2:06 pm
- Location: Austin, Tx. (Central Time; GMT-6)
- Contact:
I used Heed’s code above for the appearance (strings instead of ints), and it works great. But it doesn’t revert to the original, no matter what, until the duration has elapsed. So dispel, resting, etc. doesn’t revert the appearance. I’m guessing that a line could be added to all the dispels for that, but isn’t the resting hard coded? Not sure if it’s worth the trouble.
Are you applying the effect as a supernatural one? Make sure you use a magical type effect if you want it to behave like spell effects do.IceThorn wrote:I used Heed’s code above for the appearance (strings instead of ints), and it works great. But it doesn’t revert to the original, no matter what, until the duration has elapsed. So dispel, resting, etc. doesn’t revert the appearance. I’m guessing that a line could be added to all the dispels for that, but isn’t the resting hard coded? Not sure if it’s worth the trouble.
EDIT: Ah, nevermind. You're using SetCreatureAppearanceType() which isn't an effect.
Thought thinks itself.
_________________
A Game is a machine that can get into action only if the players consent to become puppets for a time.
--Marshall McLuhan,
Understanding Media
_________________
A Game is a machine that can get into action only if the players consent to become puppets for a time.
--Marshall McLuhan,
Understanding Media