Odd result - when I traded 240,000,000 worth of goods to the caravan for a single steel bar, the result was that the trader said he was "Unwilling to trade" instead of the normal "ecstatic", and immediately left.
It's sort of like when you offend the elves, or something.
Heh, integer overflow.
Yeah, it's an integer overflow. It turns out Toady uses a "mere" integer, so the maximum value for trades is a "mere" 2,147,483,647. Because my extreme value goblets are 500,000,000 apiece, they cause integer overflows easily.
I apparently caused an integer overflow with 2,000,000,000 value trade deals, so apparently, it's calculating the whole caravan's value when doing this.
I'll try trading one masterwork and one exceptional, for a total of 1,700,000,000 and seeing if that doesn't cause an overflow...
EDIT: 1,000,000,000 was the limit I could trade to them without causing an overflow. I guess they were already carrying over 1,000,000,000 in trade goods already. I shouldn't have traded more than about 40,000,000 to them, already, so these caravans really balloon in size. (Of course, I have a massive TRADE_CAPACITY boost...)
Extreme value trade did not raise the save file significantly. Apparently, only the data on the goblets I trade away is saved. The caravan junk that isn't traded is simply deleted.
Memory use is also at 370 megs, which is actually less than last year, somehow...
Memory stays at 370 megs even with caravans on the map.
Even after trading them over a billion in value last time, they aren't arriving with more goods, and have 10 million in excess weight with which to bring those goods. I think I'm hitting some sort of caravan cap, which is at roughly 100 total goods (counting stacks as 1).
Integer Overflow Example Save