Author Topic: Need Help With A Script  (Read 350 times)

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Need Help With A Script
« on: June 01, 2011, 12:10:29 am »


               Anyone know if its possible to access the greyscale channel of a PLT image via scripting. Here's why I'm asking:

I've designed a special "Purgatory" tileset that uses all greyscale textures. When a character dies they are sent to Purgatory until ressurected, revived, etc. I want the PC to be all grey while on this plane, as having a colorful model running around just looks out of place.

               
               

               
            

Legacy_TSMDude

  • Hero Member
  • *****
  • Posts: 1515
  • Karma: +0/-0
Need Help With A Script
« Reply #1 on: June 01, 2011, 12:35:16 am »


               Coul you not just apply the stoneskin effect? Even if you have removed it from the spell you can still apply the effect just fine.
               
               

               
            

Legacy_Rubies

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +0/-0
Need Help With A Script
« Reply #2 on: June 01, 2011, 12:47:27 am »


               Hi there, it may not be exactly what you're after, but you could achieve the same solution with a set of integers with the GetColor()/SetColor() functions, along with the CopyItemAndModify() function. Those let you modify the PC's colors and the armour's colours, respectively - might be a tad more work than you were expecting, though.
               
               

               


                     Modifié par Rubies, 31 mai 2011 - 11:47 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Need Help With A Script
« Reply #3 on: June 01, 2011, 12:50:08 am »


               Or even a ghostly effect may work..  

The other option can get a litle messy.  The PC is not that big of a deal.   You can use GetColor to save what the PC current colors are and SetColor to make him the color you want.

Armor are a little mor messy you would have to use Function - GetItemAppearance to save what the item is currently at.  Then Function - CopyItemAndModify to make a new item for every color channel you wanted to change.  Of cource destroying the old copys as you went along. 

On second thought forget about storing the state of the items color and Just store the players original item somewhere( DB and/or out of the way chest)  That way when the player leaves the plane you can just destroy there drab item and give then there old one back.

This can get messy, I do not know if NWNx has a better way of doing it or not.   Of cource having there items remade for them will also allow you to remove things like flaming effects/props  that also don't look right.

EDIT:  Another thought would be to unequip all there items and give them some drab spirit robes.  If they try to change there aromr out or reach for a sword, just send them a message that there hand passes right through it. and unequip it.
               
               

               


                     Modifié par Lightfoot8, 31 mai 2011 - 11:59 .
                     
                  


            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Need Help With A Script
« Reply #4 on: June 01, 2011, 02:50:13 am »


               Armor color isn't a concern since the PC is stripped of everything when they die (they leave a lootable corse with all their item - using the HCR). I've been through the GetColor and SetColor routine for the standard color channels (skin, hair, tattoo 1 and tattoo 2) - works great except for one problem. The blooming underwear is always brown.

I even thought about making a new vfx, but it seems that the texture reskinning is hardcoded (the ProgFX_Duration column in visualeffects.2da). I can make the vfx, but the skin texturing takes on whatever texture and alpha setting is defined by that column.

In either case, I've opted for a simpler approach - using campaign lore to explain why the PC is colored as opposed to everything else around them...

               
               

               
            

Legacy__six

  • Hero Member
  • *****
  • Posts: 1436
  • Karma: +0/-0
Need Help With A Script
« Reply #5 on: June 01, 2011, 08:23:10 pm »


               The underwear is a problem you have to live with I believe, as the game doesn't actually store the clothing colour values in either the placed creature file or blueprint, so can only use default. A simple CC fix might be to make the PLT use tattoo colour instead, or "go mature".