Author Topic: CreateItemOnObject: Change appearance of an item?  (Read 315 times)

Legacy_AmbrosiaPW

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +0/-0
CreateItemOnObject: Change appearance of an item?
« on: April 22, 2011, 06:39:10 pm »


               Hello,

I have an NPC that hands out 5 delivery quests. I'd like each item to be delivered to look different. Do I have to make 5 different items or is there a way to dynamically change the appearance of an item?

The reason why I'm asking is I have 10 or more NPC's with 5 quests, and I'd like the items to be different but I don't think I should have to make 50 different items. Or do I?

I was hoping to have a list of the image resref's I wanted and pick one randomly when I create the item.


Thanks for your help! 
               
               

               


                     Modifié par AmbrosiaPW, 22 avril 2011 - 05:48 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
CreateItemOnObject: Change appearance of an item?
« Reply #1 on: April 22, 2011, 06:50:42 pm »


               

AmbrosiaPW wrote...

I was hoping to have a list of the image resref's and pick one randomly when I create an item.


Thanks for your help! 


What you are asking to do is not a simple as you would think.  What you are really asking is to change the model for the Item. there is no way to change the model for the item.  The closest thing you can do is
Function - CopyItemAndModify
 an already exsisting instance of an item.
               
               

               


                     Modifié par Lightfoot8, 22 avril 2011 - 05:52 .
                     
                  


            

Legacy_AmbrosiaPW

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +0/-0
CreateItemOnObject: Change appearance of an item?
« Reply #2 on: April 22, 2011, 07:07:58 pm »


               You are the man! Thank you so much. I mean I do lots of research trying to find these things but it's tough sometimes finding the function to do what I want. I figure most of the time if it isn't easy I'm going about it the wrong way. I'm just having fun though.

I'd think if I can change the appearance of an item with this Function, then I could easily do a random roll and grab a random image resref from a list. Is it not that simple?
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
CreateItemOnObject: Change appearance of an item?
« Reply #3 on: April 22, 2011, 07:56:17 pm »


               

AmbrosiaPW wrote...

You are the man! Thank you so much. I mean I do lots of research trying to find these things but it's tough sometimes finding the function to do what I want. I figure most of the time if it isn't easy I'm going about it the wrong way. I'm just having fun though.

I'd think if I can change the appearance of an item with this Function, then I could easily do a random roll and grab a random image resref from a list. Is it not that simple?



Yes and No.   Yes it is that simple,  But it is not that simple to generate a valid random index number.  The real problem is that the model numbers do not have to be sequental, So you will have to figure out a way to scan through the models to see which ones are valid and which are invalid.   For a better understanding you may want to look at section 4 in: Documentation: Item Format
               
               

               
            

Legacy_AmbrosiaPW

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +0/-0
CreateItemOnObject: Change appearance of an item?
« Reply #4 on: April 22, 2011, 08:28:22 pm »


               Cool thanks. yes after testing it I see what you mean. I guess I can store the index numbers I like.

I'm loving this! It's doing exactly what I want it to! Thank you!!':wizard:'
               
               

               


                     Modifié par AmbrosiaPW, 22 avril 2011 - 07:28 .