Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Macros searching in trade  (Read 1016 times)

Trabber Shir

  • Bay Watcher
    • View Profile
Macros searching in trade
« on: February 11, 2020, 03:19:02 pm »

I am building a set of macros to split stacks of coins at the trade depot and working around the fact that ordering of goods can change between trades by searching for the relevant goods.

It seems to be working, but all threads I can find about splitting coin stacks (for attempting a coin star in my case) imply this macro is a real pain. So am I missing something obvious that is going to come back and bite me in the future?

My project has morphed into a script that generates macros to split an arbitrary collection of stacks and if I am missing something big this is going to hurt a lot in a couple days.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Macros searching in trade
« Reply #1 on: February 11, 2020, 05:01:06 pm »

I hope you're aware of the fact that coin-stars ceased to be useful somewhere in the 0.40.X arc? I had one at the time (my first and only), and when a DF update came along it suddenly started injuring dorfs badly (none died, but that was more luck than anything else).
Logged

Trabber Shir

  • Bay Watcher
    • View Profile
Re: Macros searching in trade
« Reply #2 on: February 11, 2020, 05:39:11 pm »

I have been seeing mixed reports on the forum. My interpretation is that when invented it was safe for unarmored dwarves but after the changes it was only safe for dwarves with protection for all areas, most notably the face which must be protected by dresses and robes.

I certainly don't count myself an expert and am planning to post the results of my experiment.
Logged

Trabber Shir

  • Bay Watcher
    • View Profile
Re: Macros searching in trade
« Reply #3 on: February 12, 2020, 06:19:36 pm »

I have found the big issue I am missing and am not sure what search terms to use to see if it is already reported in Mantis.

Quantities in the trade interface appear to be stored based on position in the list rather than by entity/object/stack.

Illustration Scenario:
1. Have available for trade 5 stacks each of 3 types of coin such that they are out of order in the trade window (my top 5 are silver, silver, gold, iron, iron).
2. Search for "iron coin" and mark 1 unit of each stack for trade (5 stacks total).
3. Change your search to "coin".
Expected result: the 5 stacks of iron coins will be marked to trade a single unit each
Actual result: the 2 stacks of Iron in the top 5 are marked to trade a single unit each and the other three are marked to trade the entire stack.

It does not fully torpedo my plans, but does make setting up the trade screen more complicated. I have to ensure that the trader starts with no coins no coins of a type I will be splitting and I don't have any coins I intend to keep in the full stack, etc. anything other than the coins to split and coins to use as payment. Searching should have made me not need all the manual setup.
« Last Edit: February 12, 2020, 06:42:23 pm by Trabber Shir »
Logged

Manzeenan

  • Bay Watcher
  • [SLOWLEARNER]
    • View Profile
Re: Macros searching in trade
« Reply #4 on: February 12, 2020, 09:46:34 pm »

I mean.... I just cook literally everything I can possibly gather and then I just have it buy one bolt/coin at a time. But usually adamantine because you can cheese more of it :p
Edit: I buy everything from the traders so that whatever I'm splitting is the only thing available to trade
Logged

Trabber Shir

  • Bay Watcher
    • View Profile
Re: Macros searching in trade
« Reply #5 on: February 13, 2020, 05:37:55 pm »

I got the trading working with a macro and have now discovered that using Ctrl+U with a big and complicated macro which seems to behave perfectly when executed manually is a bad idea. Not quite sure what went wrong but after about 6 runs it proceeded to give away all my full stacks of coins. Somewhat to my shame I am switching to Adamantine for my coinstar. But mostly because I have enough adamantine on this map to make all the coins I need for the test without using the dupe exploit. My zinc and tin was purchased from traders.
Logged

Trabber Shir

  • Bay Watcher
    • View Profile
Re: Macros searching in trade
« Reply #6 on: February 15, 2020, 02:21:01 am »

When I have full results I will make a thread to say it has been tested in 0.44.12. Preliminary (impatient) results on the coinstar say that a coinstar using silver coins is not safe even for armored dwarves. Significant bruising and bones broken through the cloak. Although for some reason I could not get this dwarf to equip the right mitten or the dress and most of his injuries come from hits to the upper right arm. There were also a spine fracture through the cloak from a hit to the neck (dress would have provided another layer of neck protection) and some blunt force damage from hits deflected by the armor. A caravan has arrived and I have 42 stacks of candy coins to split for the proper test which I am hoping will deal far less blunt force damage.

All my dwarves are omitting something, one won't put on his left boot this one won't put on his right mitten, one won't put on his breastplate, etc. Any advise on why that may be happening? They are set to replace clothing and stay in uniform while off duty. I have also turned off autolabor for mining, wood cutting, and hunting because it kept turning my military into miners which of course caused them to drop all their gear.
Logged

coalboat

  • Bay Watcher
    • View Profile
Re: Macros searching in trade
« Reply #7 on: February 15, 2020, 10:46:08 am »

Maybe the game lagged at one point and disrupted the process. I remember you can adjust the interval between each inputs in a macro.
Logged