Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Solved: Depot Destroyed - Can't Interact with Items  (Read 982 times)

lament

  • Bay Watcher
    • View Profile
Solved: Depot Destroyed - Can't Interact with Items
« on: November 27, 2021, 01:01:06 am »

Hello All,

My depot was destroyed by a troll when there were still some trade good inside. The items are now all over the ground but I can't interact with them. A few of the items have the TSK marker but nobody comes to pick anything up. I've tried forbidding, un-forbidding and marking them for dump. Nothing seems to work. Any other suggestions?

Thanks,
« Last Edit: November 27, 2021, 05:04:24 am by lament »
Logged

Mobbstar

  • Bay Watcher
  • aka Mossbird
    • View Profile
    • my website
Re: Depot Destroyed - Can't Interact with Items
« Reply #1 on: November 27, 2021, 02:27:55 am »

You can check what the TaSK is in the [j]ob menu.

I believe there is an issue with imported books/scrolls due to their artifact-like status.

lament

  • Bay Watcher
    • View Profile
Re: Depot Destroyed - Can't Interact with Items
« Reply #2 on: November 27, 2021, 03:48:55 am »

You can check what the TaSK is in the [j]ob menu.

I believe there is an issue with imported books/scrolls due to their artifact-like status.

Thanks. There are some books/scrolls in the pile, but there are other things as well. I wouldn't mind deleting everything at this point. Can DF hack do that?

Update: When the traders showed up in the fall and I started moving finished goods to the new depot. This must have triggered something because the dwarves started cleaning up the mess. I didn't assign the goods to be traded at the new depot. They started taking them directly to their proper locations.
« Last Edit: November 27, 2021, 05:01:05 am by lament »
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Depot Destroyed - Can't Interact with Items
« Reply #3 on: November 27, 2021, 04:28:19 am »

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: [Select]
[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]
Logged

lament

  • Bay Watcher
    • View Profile
Re: Depot Destroyed - Can't Interact with Items
« Reply #4 on: November 27, 2021, 05:03:35 am »

Thanks. I will keep that for future use. It's working now. See previous post I edited but didn't save until after you replied.
Logged