Server Totals
Visimontium - (1)
Le'Or - (0)
Ferrell - (0)
Elysia - (0)
M'Chek - (0)
Deglos - (0)
Wilderness - (0)
Underdark - (0)
Mikona - (0)
Total players: 1
Gallery
  • Helbyssia Final Battle
    Album name: DM Events
    Uploaded by: krackq
    Uploaded: Mon Aug 18, 2014 4:59 am

Links Menu

SetAppearance

Moderators: Nighthawk4, Dungeon Masters

SetAppearance

PostAuthor: Gurky_Bogglewig » Thu Dec 01, 2005 9:16 am

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.
User avatar
Gurky_Bogglewig
Team Member; Retired with Honors
 
Posts: 2181
Images: 0
Joined: Sat Sep 04, 2004 1:28 pm
Timezone: Eastern (GMT-4)

PostAuthor: p0m » Thu Dec 01, 2005 9:23 am

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
Player of: Dannar Sunrise/Blighte
Gennor Visson
Jert Vilodel
User avatar
p0m
Scholar
 
Posts: 1366
Joined: Tue May 10, 2005 12:02 am
Location: Brisbane, Australia
Timezone: +10
DM Avatar: Wintermute

PostAuthor: IceThorn » Wed Apr 12, 2006 1:27 pm

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).
User avatar
IceThorn
Team Member; Retired with Honors
 
Posts: 5292
Joined: Mon Jan 10, 2005 2:06 pm
Location: Austin, Tx. (Central Time; GMT-6)

PostAuthor: Heed » Wed Apr 12, 2006 2:25 pm

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.
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
User avatar
Heed
Scholar of Fools
 
Posts: 378
Joined: Sat Jul 17, 2004 11:13 am
Location: Dasein

PostAuthor: IceThorn » Wed Apr 12, 2006 3:06 pm

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.


Yea, that's better. I was using ints. Thanks.
User avatar
IceThorn
Team Member; Retired with Honors
 
Posts: 5292
Joined: Mon Jan 10, 2005 2:06 pm
Location: Austin, Tx. (Central Time; GMT-6)

PostAuthor: IceThorn » Mon Apr 17, 2006 1:18 pm

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.
User avatar
IceThorn
Team Member; Retired with Honors
 
Posts: 5292
Joined: Mon Jan 10, 2005 2:06 pm
Location: Austin, Tx. (Central Time; GMT-6)

PostAuthor: Heed » Mon Apr 17, 2006 1:38 pm

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.


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.

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
User avatar
Heed
Scholar of Fools
 
Posts: 378
Joined: Sat Jul 17, 2004 11:13 am
Location: Dasein


Return to NWN Scripting

Who is online

Registered users: Bing [Bot], Google [Bot]