I need help with Appearance Scripts and Camera Scripts

I need help with 2 scripts:

  1. I need a detailed yet simple explanation of how to use the cut-scene script, because when I look at the compiler explanation I stare at it dumbfounded, ultimately what would be helpful is a descriptive brake-down of each piece of the script, a possible visual aid, and a simple modual that I can test the cut-scene script in and test changes I make to see what it does, because I need cut-scenes for a cut-scene heavy modual I’m working on.

  2. I also need a script that can store a PC’s Appearance, and portrait, skin color id, hair color id, tattoo 1 color id, and tattoo 2 color id as well as all individual parts such as head id, torso id, pelvis id, left arm id, right arm id, legs ids, hand ids and foot ids, so if I test an appearance change script on them I can easily recall the PC’s Appearance, and portrait id, skin color id, hair color id, tattoo 1 color id, and tattoo 2 color id as well as all individual parts such as head id, torso id, pelvis id, left arm id, right arm id, legs ids, hand ids and foot ids at a moments notice. Also I forgot to mention it would also be good for npc’s as well so a script that could do both would be much appreciated. Sorry if I repeated myself.

Any help on the above 2 scripts or both would be much appreciated.


I posted this same discussion on steam on May 26, 2018 @ 11:04pm and no one has still replied so I thought I’d try my luck here but with spelling corrections, as I state above any help would be appreciated.

Note: I tried looking for the doppelganger script from the campaign and couldn’t find it, I also tried my luck at looking at other peoples cut scene scripts and as I stated above I couldn’t make sense of it. So Please help. Also bold formatting is additions to my original statement.

There’s a Cutscene Tutorial on the Lexicon.

That explains how to use the native cutscene functions. However, I’d recommend using the Gestalt cutscene system instead. It’s essentially a wrapper for the same functions, but it handles a lot of the timing issues for you, and really reduces the work involved, especially in complicated camera movements.

To save a PC / NPC appearance, you don’t really need to do a lot of work if the new temporary appearance is not part-based. In that case, just store the result of GetApperanceType, then, when you’re done, use SetCreatureAppearanceType to restore the appearance in full. This works because the game stores the detailed part-based appearance behind the scenes, even though the PC looks like a bear or whatever.

If you’re aiming to change them to a part-based appearance, you’ll need an additonal set of functions to store the existing appearance, create the new look, and restore the old one. These functions, described in the Lexicon, are Get / SetPortraitID, Get / SetColor and Get / SetCreatureBodyPart.

If you need help with scripting in general, there are tutorials in the Lexicon and the Vault. I understand that Tarot Redhand’s guides cover most of the basics, for example.

1 Like

I’d second the Gestalt system. Doesn’t just work well. It gradually builds your cutscene in stages and talks you through what the script is doing at each stage. The result looks great.

So for example would GetCreatureBodyPart of Player and SetCreatureBodyPart the same Id on NPC, GetPortraitId of Player and SetPortraitId the same Id on NPC, GetPhenoType of Player and SetPhenoType the same Id on NPC, GetColor of player part and SetColor of part on NPC work, I know the scripting details but in any case would the examples work.

That would work, but there’s an easier way - CopyObject on a PC creates an NPC who looks exactly the same.

The Gestalt package also allows you to create an NPC doppleganger of the PC, so that the PC appears to be acting in the cutscene, but is actually an invisible camera operator, viewing the scene from a different perspective.

I didn’t even realize the CopyObject was a function that existed, was it added in NWN:EE or has it been there since NWN:Diamond Edition and earlier because I’ve always used SetApperance and either picked an appearance from the list of appearance variables or GetApperance. So would the CopyObject also work say if I want to get the appearance of a creature and set it to the appearance of the PC, because if it does that would dramatically cut down my script lengths.

CopyObject creates a new object the same as the copied one. I’m not sure I’m parsing your sentence correctly but it sounds like you want to change an existing object, which is not what this does.

Correct - in the case of a PC, CopyObject creates a new object which is an NPC with default creature scripts, but otherwise identical to the PC, not only in appearance, but in inventory and talents, too.

It was introduced by Bioware in release 1.61, long before EE.

Ok, so now an addition to that say if I cleared the players inventory with a script and this NPC had all my items how could I get say the items back to the player upon that NPC’s death or through scripting. Say for example I wanted to make the PC a doppelganger of a criminal that’s at large in the world as say by a curse and the curse is resolved how can I get the items back if the curse say switched the inventory of the player with the criminal in the case of creating a PC doppelganger since the script creates an exact copy of inventory, how would I get the players Items back or say switched back to the player. Because when you kill creatures they don’t drop items unless the item/s in question is set to Droppable. If it’s not possible then I may have to set an area that the player puts his or her Items into a chest before proceeding and going back to that area at a later time. Sorry if this is confusing. If this is not relevant to my topic just tell me since I noticed your a moderator and I’ll open a new topic and link that topic to this one. If I can that is or rather figure it out to.

In the NPC OnDeath event, you can loop through their inventory, using SetDroppableFlag to make all their items droppable.

Earlier, after copying the PC, you may need to make the NPC leave a lootable corpse - see Example on the SetLootable page.

Caution : that example assumes that the NPC is running the script. If not, use ActionDoCommand to make the NPC execute SetIsDestroyable.