Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: I Managed to merge stacks in adv mode (coins and meat)  (Read 1971 times)

velanos

  • Escaped Lunatic
    • View Profile
I Managed to merge stacks in adv mode (coins and meat)
« on: September 03, 2021, 09:12:02 am »

One of the things that bothered me in dwarf fortress was the inability to make decent stacks of coins as stacking is not implemented yet. This could result in split stacks that would never be united again and if you like collecting a treasure hoard like me(my hut is now stacked with chests full off 500+ value items) you end up with a list of coins that spans the screen. After some experiments with building reactions that would yield the same item I managed to restack meat and after that I managed to get one that stacks coins. As far as I have tested it, making a stack 2 out of single coins works but not when I make a reaction with a higher product quantity, weirdly the reaction will not finish. (now I think of it it might need 10 unique stacks so please test that for me if you want) I did found out luckily that using the stack of 2 reaction can use much more input (as it gets stacks). When using 2 stacks of 5 I got a stack of 10 of the qurrency local to the region. I hope I can make other people happy with these reaction and if you can expand or test it further for me please do let me know.
Anyways, here are the reactions:

[REACTION:MAKE COIN STACK]
   [NAME:make 100 coin stack]
   [ADVENTURE_MODE_ENABLED]
   [REAGENT:A:100:COIN:NONE:NONE:NONE]
   [PRODUCT:100:100:GET_ITEM_DATA_FROM_REAGENT:A:NONE]

[REACTION:MAKE SMALL COIN STACK]
   [NAME:make 10 coin stack]
   [ADVENTURE_MODE_ENABLED]
   [REAGENT:A:10:COIN:NONE:NONE:NONE]
   [PRODUCT:100:10:GET_ITEM_DATA_FROM_REAGENT:A:NONE]

[REACTION:MAKE VERY SMALL COIN STACK]
   [NAME:make 2 coin stack]
   [ADVENTURE_MODE_ENABLED]
   [REAGENT:A:2:COIN:NONE:NONE:NONE]
   [PRODUCT:100:2:GET_ITEM_DATA_FROM_REAGENT:A:NONE]

[REACTION:STACK MEAT]
   [NAME:stack some meat]
   [ADVENTURE_MODE_ENABLED]
   [REAGENT:A:2:MEAT:NONE:NONE:NONE]
   [PRODUCT:100:2:GET_ITEM_DATA_FROM_REAGENT:A:NONE]

just add them in the reaction_other script in the raw/objects folder and make a new world. I do hope this helps some people as it did with me.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: I Managed to merge stacks in adv mode (coins and meat)
« Reply #1 on: September 04, 2021, 10:02:51 pm »

Does this technique preserve the "coin batch" identity for the coins in question, or does it forget them and just give you generic coins?

Also, what happens if you try to stack two items that have different materials? Will it require them to be the same, or will it just take the second one and transform it into the first one (e.g. 1 copper coin + 1 gold coin -> 2 copper coins)?
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

velanos

  • Escaped Lunatic
    • View Profile
Re: I Managed to merge stacks in adv mode (coins and meat)
« Reply #2 on: September 05, 2021, 02:11:33 am »

I haven't tested it extensively yet but the coins keep their local names (like 5 ubert offugart gold coins in 2 stacks give 10 ubert offugart gold coins). I yet have to test if merchants take them and the mixed material thing.
Logged

velanos

  • Escaped Lunatic
    • View Profile
Re: I Managed to merge stacks in adv mode (coins and meat)
« Reply #3 on: September 06, 2021, 09:13:00 am »

I have found out this method does not seem to be airthight, where it works in one save it creates common coins in another. Why this happens is unclear to me. It does combine stacks of any number but might leave one odd coin out because stacks become even.
Logged