I figured out a way to reasonably convert stacks of 500 coins, into stacks of 1 coin, without too many keystrokes. I recorded a "trade 10 of 6 items" Macro which I executed 99 times to split my stacks of coins into 10, and traded them to a human merchant, 50 times, in order to break all of my stacks of 500 (or less for some) candy coins into stacks of 10, which the merchant had possession of.
I then used Autohotkey to record an in-game macro of 229 "trade one" keystrokes, which I executed 99 times on a q-search for coins. It took 10-11 minutes for this c-u 99 c-p to execute once, and I had to run it 9 times before the merchant had only stacks of one coin remaining and I could just shift-enter after q-searching coins. 229*99 is slightly more than the number of stacks in order to ensure all stacks are touched.
This resulted in... well.... just a few single candy coins ready to be melted. It cost me 50 masterwork steel battleaxes in total to buy back all my coins, 5 axes 10 times.
Unfortunately, it seems that so many coins in one spot, has caused my depot to spontaneously combust immediately upon unpausing.
I don't believe that there were any oddly temped items which I bought from the merchant, and I did savescum to see if it happened the second time, which it did. I didn't take a third stab at it because on my machine, the entire process takes about 3-4 hours, it's well over 90 minutes total of just macro execution to buy back 1 of each stack of coins, 10-11 minutes execution 9 times. You also have to macro trade 10 from each stack to the merchant first, 50 times. It's possible one of the items I bought was the culprit, but given that I only bought bars, weapons, codexes and scroll copies, food, and gems, it seems unlikely. The fires also seem to be originating from several locations on the depot itself.
I've posted a
bug report, and also uploaded a
savefrom the month where the human caravan I used comes. I have had around 20k individual coins ready to be melted on the trade depot at times, though I've melted many of them already, but over 226k, it seems that dwarf fortress is reading the state of my RAM and reporting it in game. Execution of the large macro, the 229*99 one, results in a major FPS loss during macro execution once around 10,000 coins have been marked for trade. Sometimes more, sometimes it doesn't freeze up completely, but once ~10k has been reached, FPS at the trade window begins a quick drop, until it reaches zero sometime before 15k. Once 0 fps is reached, seconds per frame starts to become a more accurate way to measure, and the final tick may take 20 seconds or more. The macro continues executing and the game continues recording keystrokes though, and several thousand coins can be marked for trade during that last 20s frame.
Has anyone else ever seen >220k coins cause spontaneous depot combustion, and is that the bug I'm seeing, or is there something else going on? The easier test to see if it's the trade goods the merchant has is probably just to buy the entire merchant's stock and if the depot doesn't catch fire, it was the coins.
EDIT: Spontaneous depot construction would be funnier than combustion but not the bug I'm looking at right now