Sorry it took me a bit to respond. I wasn't alerted via email, so thanks for the PM.
The data file (randomdat.txt) reads each of the sections a different way. The first part isn't read line-for-line - you could insert new items or remove them without any serious consequences. The second one is. If you remove a line, it'll take the data and try to use it anyway. For example... changing this:
[SHIELD:ITEM_SHIELD_SHIELD],[SHIELD:ITEM_SHIELD_BUCKLER]
[INSTRUMENT:ITEM_INSTRUMENT_FLUTE],[INSTRUMENT:ITEM_INSTRUMENT_TRUMPET],[INSTRUMENT:ITEM_INSTRUMENT_HARP],[INSTRUMENT:ITEM_INSTRUMENT_DRUM],[INSTRUMENT:ITEM_INSTRUMENT_PICCOLO]
[TOOL:ITEM_TOOL_CAULDRON],[TOOL:ITEM_TOOL_LADLE],[TOOL:ITEM_TOOL_BOWL],[TOOL:ITEM_TOOL_MORTAR],[TOOL:ITEM_TOOL_PESTLE],[TOOL:ITEM_TOOL_KNIFE_CARVING],[TOOL:ITEM_TOOL_KNIFE_SLICING],[TOOL:ITEM_TOOL_KNIFE_MEAT_CLEAVER],[TOOL:ITEM_TOOL_FORK_CARVING],[TOOL:ITEM_TOOL_NEST_BOX],[TOOL:ITEM_TOOL_JUG],[TOOL:ITEM_TOOL_LARGE_POT],[TOOL:ITEM_TOOL_HIVE],[TOOL:ITEM_TOOL_HONEYCOMB],[TOOL:ITEM_TOOL_POUCH],[TOOL:ITEM_TOOL_MINECART],[TOOL:ITEM_TOOL_WHEELBARROW]
[TOY:ITEM_TOY_PUZZLEBOX],[TOY:ITEM_TOY_BOAT],[TOY:ITEM_TOY_HAMMER],[TOY:ITEM_TOY_AXE],[TOY:ITEM_TOY_MINIFORGE]
to this:
[SHIELD:ITEM_SHIELD_SHIELD],[SHIELD:ITEM_SHIELD_BUCKLER]
[INSTRUMENT:ITEM_INSTRUMENT_FLUTE],[INSTRUMENT:ITEM_INSTRUMENT_TRUMPET],[INSTRUMENT:ITEM_INSTRUMENT_HARP],[INSTRUMENT:ITEM_INSTRUMENT_DRUM],[INSTRUMENT:ITEM_INSTRUMENT_PICCOLO]
[TOY:ITEM_TOY_PUZZLEBOX],[TOY:ITEM_TOY_BOAT],[TOY:ITEM_TOY_HAMMER],[TOY:ITEM_TOY_AXE],[TOY:ITEM_TOY_MINIFORGE]
i.e., removing the TOOL line, It'll treat the toys as tools. Further on down the list, it'll treat "ART_IMAGE,GLAZED,RINGS_HANGING,BANDS,SPIKES,ITEMSPECIFIC,THREAD,CLOTH,SEWN_IMAGE" as ethic entries.
Could that be the issue you're having? Deleting lines here isn't the best idea, but that could possibly be it... If you tell me what you need removed, I could look into it.