yes, Item structure is quite confusing and not so trivial to reverse. It's composed by 3 numbers (32-bit each) where the second is its count (apparently for splashes is its sprite index, for creatures is its id) and the third is its id (for creatures is 99).
The first is a special case and in my opinion, a big fail of cipsoft in the sense that they waste a lot of memory due this.
You only notice after watching tiles and messing around with items .dat property that this first number is a simple enum "HanglableState" where
- 18 - means this item has the flag "IsHangable" and currently is hanging horizontally. Do not confuse with item having "IsHangableHorizontal" property.
- 19 - means this item has the flag "IsHangable" and currently is hanging vertically. Do not confuse with item having "IsHangableVertical" property.
- 0 - means simply not 18 and not 19
Ex: Hang some of those skeletons on wall and look to this item in its respective tile. Also, some torches on wall has it.
Code:
enum HangableState
{
None = 0,
Horizontal = 18,
Vertical = 19
}
class Item
{
public HangableState HangableState;
public int Count;
public int Id;
}
Blaster explained well and moreover you're designing an API, it will be used for peoples and not only you, so everything need to be easy to reach/understand.
You should let tiles reading far later due its complexity. Why not Character List, Vip List?
A* is really amazing, but in my opinion you should do later, because cavebot-related are lasts steps to code. Why not attack, simple use items, or simple healing, ...?