Author Topic: Modifying the appearance of several item parts simultaneously  (Read 397 times)

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
Modifying the appearance of several item parts simultaneously
« on: November 05, 2011, 07:10:53 pm »


               Hi,

I'm looking for a way to change the appearance of items(according to material) created by a random loot generator(under MySQL), and although CopyItemAndModify() can do this, it implies calling it as many times as the item has different parts, on each creature drop, wich is too slow and creates lag, even though the loot system itself is very fast. Does anyone know a better solution than using the aforementioned function?

Thank you!

Kato
               
               

               


                     Modifié par Kato_Yang, 05 novembre 2011 - 07:34 .
                     
                  


            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Modifying the appearance of several item parts simultaneously
« Reply #1 on: November 05, 2011, 07:51:16 pm »


               

Kato_Yang wrote...

Hi,

I'm looking for a way to change the appearance of items(according to material) created by a random loot generator(under MySQL), and although CopyItemAndModify() can do this, it implies calling it as many times as the item has different parts, on each creature drop, wich is too slow and creates lag, even though the loot system itself is very fast. Does anyone know a better solution than using the aforementioned function?

Thank you!

Kato


Do you care about the variables? If not, you could create from premade models and copy the item properties over.
               
               

               
            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
Modifying the appearance of several item parts simultaneously
« Reply #2 on: November 05, 2011, 08:10:18 pm »


               No, the items have no variables set on them. I wanted to avoid creating one new item of each different material to keep the palettes clean, yet it seems I have no choice...
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Modifying the appearance of several item parts simultaneously
« Reply #3 on: November 05, 2011, 09:00:19 pm »


               If you're using nwnx anyways, nwnx_resman might be an option for you.  As I understand it, any item templates put in the directory it accesses can be created by script, but still won't appear in the DM or toolset palette.
               
               

               
            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
Modifying the appearance of several item parts simultaneously
« Reply #4 on: November 05, 2011, 09:08:07 pm »


               True. Thank you all for the guidance '<img'>

Kato