Jump to content

last unknown field in inventory structure


Avenger

Recommended Posts

The create item for days effect (0xff) creates items with their 'no steal' bit set, and the unknown field also contains a value, most likely it is the expiration time in hours.

 

The can't steal flag has no effect on the vanishing feature.

If a creature has items with this field filled in, then the game will correctly adjust the expiration by the time the creature was loaded.

 

0x0000 8 (resref) Resource name of the ITM file holding the particular item

0x0008 2 (word) unknown <---- expiration hour

0x000a 2 (word) "usage1" -- typically, the count of the item, or the number of uses remaining in the item if it is not a "stackable" item.

0x000a 2 (word) "usage2" -- the second parameter passed when the script function "CreateItem" is called. This might only be used for wands and other magical items which have multiple uses (i.e. cast fireball n times and aganazzar's scorcher m times)

0x000c 2 (word) "usage3" -- the third parameter passed when the script function "CreateItem" is called. Presumably like 'usage2'.

0x000e 4 (dword) Flags:

 

* bit 1: identified

* bit 2: can't steal

* bit 4: "stolen"

* bit 8: cannot move

 

 

Also, in IWD/IWD2 the cannot move flag is different, it means the item is magical - (when identified the item's icon is still surrounded by a blue rectangle).

Link to comment

You are right. I should have tested this field when you reported it.

The short versions of item creation truly start an item removal opcode, but the create item for days opcode utilises this field.

This opcode is more reliable (for item removal), because the item expiration field transits to stores and containers.

Link to comment

Any thoughts on the timer format? I'm not sure why they did it that way (note that Nythrun's table is off a little for the longer durations) or how the engine gets the expiry time when there's nothing in the second byte.

 

I can't remember at the moment, but I don't think any of the other effects are ever used to create removable items (so persisting across various locations doesn't apply).

Link to comment

I know of the old style proficiencies still somewhat alive in bg2 thingie.

I believe you could even give them name and use them (though they wouldn't be settable by the gui). You could give them to special npcs.

 

Probably this is a way to create npc only items.

Link to comment
I believe you could even give them name and use them (though they wouldn't be settable by the gui). You could give them to special npcs.

 

Probably this is a way to create npc only items.

These are the old-style profs in CRE files. If you set them, the CRE gets the expected bonuses when using applicable items (based on category vs. item prof). So giving a CRE 3 "starts" in the old-style spears prof (0x71) gives them 3 stars when using any weapon with the spears (29) or halberds (30) category.

 

They appear to work exactly as they did in Baldur's Gate (where there was no item prof value). They correctly use the new rules from the 2DAs, and according to Nythrun, the engine evaluates both styles and picks the best proficiency for the equipped weapon (so if I have SW1H04 with category long swords (20) and prof long sword (90) and 2 stars in new-style long swords and 3 stars old-style large swords (0x6e), the engine gives the 3-star bonuses).

 

The proficiencies show up on the record screen using the old names, but the proficiencies are otherwise not directly manipulatable (they'll show up if already set, but there's no way to modify them in-game).

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...