The way I understand it, the question is about modding an item group to spawn items with flags inserted. Which, to my knowledge, isn’t possible at the moment without changes to code itself.
item_group.h has Item_modifier class, which contains fields like damage, charges, contents etc., but no flags or properties.
[quote=“Valiant, post:5, topic:10673”]I plan to make a mod that adds “squeamish” trait. All clothing that were dropped by zeds will have some flag, let’s say “Filthy”. It will prevent characters with aforementioned trait to wear it, much like wool allergy prevents from wearing items made of wool (or maybe it will give huge morale penalty for wearing it).
I suppose all this information should be in The Lab, but I have some coding difficulties.
I understand how to add flag and how to add trait (sort of). But I failed when I tried to look into a matter of dropping items and adding flag to them.[/quote]
The only easy way I see to add it would be to edit monster::drop_items_on_death(), check for some sort of “filthy_monster” flag there, then add it to all armors dropped.
Note that filthy items will still be reduced to clean rags when cut.