Unfortunately, this is very difficult right now. The item type definitions (which are expressed as XML in the source files) are loaded into much more efficient C++ structures at the beginning of the game. Furthermore, those C++ structures have no set methods (since they are only initialized from XML) and have no capability for saving themselves. That means that even if you could change any of the structures, they would lose all the changes across a game save/restore.Karl wrote:1. Are there any general functions for reading and writing information to items and classes of items?
The only parts of an item that are mutable are the parts that are associated with an item instance:
A pointer to the item type
16-bits for a count (the number of items)
8-bits for flags (damaged is the only flag implemented)
8-bits for install location (forward armor, rear armor, etc.)
8-bits for charges (for credit cards, disposable missile launcher, etc)
16-bits for enhancements (effect of barrels, crystals, etc.)
I believe there are functions to get/set all of these fields (although they may not be very consistent).
Short term, you might experiment with (shpEnhanceItem). I'll post a separate message with documentation.