The "type" you are looking at is NOT the item type as used in the /item command.
If you notice in the LIST_CAP.STB file, ALL 'common' hats have a type of 123 while soldier hats have 121 and so on.
This number is used in the game as a reference in many other STBs but NOT in the way that you want.
The actual types for the /item command are as follows.
1 == Faceitem (mask)
2 == Hat
3 == Body armor
4 == glove
5 == shoe
6 == back item. (wing, bag)
7 == jewelry
8 == weapon
9 == shield
10 == consumable (food, drink, skillbook)
11 == gem
12 == natural
13 == quest item. Use this at your own risk. Results can be ..... strange to say the least
14 == PAT (cart, CG)
So if you want to make that green hat, its ID is 2 (index column of the STB) and it's type is 2
/item 2 2 1
Yo might also want to consider using /cha instead of /item. It automatically equips the item you create, even if you could not normally use it.
The same green cap would be
/cha cap 2
The /cha command will destroy any item already equipped in that slot though so be careful.