The cause is probably that the items are marked as being owned by the traders, which makes it impossible to interact with them.
The following script is used to claim the "books" visitors leave behind when they die of old age one entry to the embark or die at the hands of invaders.
You can modify it to claim everything (in which case you shouldn't use it while a caravan is on the map) by removing the the "if" section checking for ITEM_TOOL_SCROLL (as well as the "else" branch), only keeping "item.flags.tracer = false".
[code]
function claim_books ()
local dumped = 0
local dump_forbidden = 0
local dump_foreign = 0
local dump_trader = 0
local melt = 0
local trader_ground = 0
for i, item in ipairs (df.global.world.items.all) do
if item.flags.dump then
dumped = dumped + 1
if item.flags.forbid then
dump_forbidden = dump_forbidden + 1
end
if item.flags.foreign then
dump_foreign = dump_foreign + 1
end
if item.flags.trader then
dump_trader = dump_trader + 1
end
end
if item.flags.melt then
melt = melt + 1
end
if item.flags.on_ground and
item.flags.trader then
trader_ground = trader_ground + 1
if item.subtype.id == "ITEM_TOOL_SCROLL" then
item.flags.trader = false
dfhack.println ("Claiming scroll")
else
printall (item.subtype)
end
end
end
dfhack.println ("Dump designated: " .. tostring (dumped), "Foreign: " .. tostring (dump_foreign), "Trader: " .. tostring (dump_trader))
dfhack.println ("Melt designated: " .. tostring (melt))
dfhack.println ("Trader items on the ground: " .. tostring (trader_ground))
end
claim_books ()
[/code]