Author Topic: How is "droppable" inventory flag for creature inventory stored in UTC?  (Read 628 times)

Legacy_MrZork

  • Hero Member
  • *****
  • Posts: 1643
  • Karma: +0/-0


               I am probably looking in the wrong Aurora documentation, but I am curious how the "droppable" and "pickpocketable" flags for items in a creature's inventory are stored. I was interested in reading them outside the game with Letoscript, but I am not sure how to. But, beyond the specifics of doing it with Letoscript, I can't even pin down just how the information is stored at all. All that I am seeing how to get is the resref for the item in each inventory slot and the resref and inventory positions of the main inventory items.

In fact, though I think this information is stored in UTC file, I am not even 100% sure of that. I tested by checking and unchecking the flag in the Toolset and looking at the UTC file. It changes size and changes back when the droppable flag is changed back and I am not seeing changes in any other file. So, the info is probably stored in the UTC, but I don't know how to read it and the Aurora Creature Format documentation doesn't seem to say anything about it. I may have to dig around the binary to see what's going on, but any info or a pointer to the right documentation would be a huge headache-saver.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
How is "droppable" inventory flag for creature inventory stored in UTC?
« Reply #1 on: September 14, 2012, 05:49:58 am »


               It will be within the

--ItemList
-- List
--List of InventoryObjects in the creature's backpack See Section 3. Inventory Objects, in the Items GFF document.

Within the UTI files in the ItemList. It will be the Cursed entry.

--Cursed
--BYTE
-- 1 if the item cannot be removed from its container (ie., undroppable, unsellable, unpickpocketable). 0 if the item can be removed from its container.
               
               

               


                     Modifié par Lightfoot8, 14 septembre 2012 - 04:50 .
                     
                  


            

Legacy_MrZork

  • Hero Member
  • *****
  • Posts: 1643
  • Karma: +0/-0
How is "droppable" inventory flag for creature inventory stored in UTC?
« Reply #2 on: September 14, 2012, 09:41:37 am »


               Thanks, Lightfoot8. Sorry if I misunderstood your reply, but I think I wasn't clear on which flag I was talking about.

I didn't mean the undropable flag that one normally sets in the item's entry in the toolset. I think that's the one you describe above and I can read that in each item's UTI entry. I mean the dropable flag (which is right next to the pickpocketable flag) that's shown for each item in the Inventory Contents (without examining the item itself) when one clicks the Inventory button in the creature's entry. In other words, the flag that determines whether the item is left as loot in the creature's remains when it is killed. Here's a picture with the widget open for a standard ettercap's inventory that shows its silk gland that drops when it's killed. In the lower-right Options box are the two flags I am looking for,

'Image

Any idea where that resides?
               
               

               


                     Modifié par MrZork, 14 septembre 2012 - 08:42 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
How is "droppable" inventory flag for creature inventory stored in UTC?
« Reply #3 on: September 15, 2012, 03:33:53 pm »


               

MrZork wrote...

Thanks, Lightfoot8. Sorry if I misunderstood your reply, but I think I wasn't clear on which flag I was talking about.



Nope, You did not misunderstand it. 

Yep,  you where clear on what you wanted,  I just gave the wrong answer.

You are also correct that it does not seem to be covered in the file format documentation.   I had to pull out the GFF editor to see what is going on.  I have never used leto script So I am not sure  If you can edit this with it or not.   The reason is that The flags have entries, in the GFF,  only if the Flags are set.  If the flags are not set there is simply no entry in the GFF. 

 I am probably looking in the wrong Aurora documentation, but I am curious how the "droppable" and "pickpocketable" flags for items in a creature's inventory are stored. I was interested in reading them outside the game with Letoscript, but I am not sure how to. But, beyond the specifics of doing it with Letoscript, I can't even pin down just how the information is stored at all. All that I am seeing how to get is the resref for the item in each inventory slot and the resref and inventory positions of the main inventory items.

 


Ok,  You are lookng in the correct place and have the names of the flags correct.  The only problem I think you are running into is that there is  no entry  pressent,  if the flag is not set. 
The Flags, if present, are stored the same way in both blueprints and instances of the creature.  
               
               

               


                     Modifié par Lightfoot8, 15 septembre 2012 - 02:36 .
                     
                  


            

Legacy_MrZork

  • Hero Member
  • *****
  • Posts: 1643
  • Karma: +0/-0
How is "droppable" inventory flag for creature inventory stored in UTC?
« Reply #4 on: September 15, 2012, 10:06:32 pm »


               Excellent! That's exactly what I needed to know. I am less than a week into Letoscript, but I am pretty sure it does something reasonable if a requested field isn't in a struct, either returning a null variable of some sort (0 int, empty string, etc.) or producing a trappable error. Either way, I can work with it.

BTW, as much as it bugs me to have to come back up to speed with a perl-like scripting language, I have to admit that letoscript is kind of awesome. It allows automation of so many things that are tedious to do for many objects in the Toolset.

Thanks again!