Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Globs in Adventure Mode  (Read 778 times)

Jazz Cat

  • Bay Watcher
  • Adept stringed instrumentalist
    • View Profile
Globs in Adventure Mode
« on: September 17, 2017, 05:59:33 pm »

Okay. I've been tearing my hair out over this for a few days now; I posted in the .43 questions thread but I haven't heard back about it. Here's the problem.

Globs don't seem to work right as reagents in Adventure Mode. I'm trying to make some custom reactions with fat, I'm getting some serious issues.
If I specify in my reaction that it needs [REAGENT:fat:150:GLOB:NONE:NONE:NONE], then when I get into Adventure Mode, the reaction will ask me for 150 items. If I give it a single item—one glob of fat, sized 150 units—the reaction will ask me for a further 0 items and it will not continue until I've given it a second glob or stack of fat. If I give it a stack of fat to begin with (say, aardvark fat [2]), then the reaction will take the entire stack and ask me for a further -150 (that's negative one hundred and fifty) items. The reaction again will not continue until I've given it a second glob or stack of fat. In either case, the reaction goes through as normal once it's gotten its separate reagents, and will use all the fat accordingly (one product per each glob of fat, so that "aardvark fat [2]" and "aardvark fat [3]" become "lard brew [5]").
I can get around the strange prompting for negative fat if I instead specify [REAGENT:fat:1:GLOB:NONE:NONE:NONE]. If I do that, the reaction doesn't ask me for any more fat after I've provided it a single piece or stack of fat. Based on the above behavior, I'd expect it to ask for a further -149 items, but it doesn't. The issue with this is that since a glob of fat is 150 units big, I get 150 products out of the reaction, which is really more than I need. I could limit the reaction with another reagent, but I don't want to have to repeat the reaction dozens of times if I'm trying to use up large stacks of fat.

This problem persists if I specify [REAGENT:fat:1(or 50):NONE:NONE:NONE:NONE], [REAGENT:fat:1:ANY_RAW_MATERIAL:NONE:NONE:NONE], or any of those variants with the [HAS_MATERIAL_REACTION_PRODUCT:RENDER_MAT] or [REACTION_CLASS:FAT] tags.

I honestly am at my wit's end here. There's nothing on the wiki or in the forums about this, as far as I can tell. Please, someone tell me there's either a solution or this is a known bug so I can stop banging my head against the wall.
Logged
Give your dwarves a pet
My holiday mod (only offensive to elves)
The check-laundry script

Quote
Just give the Crossbow weapon the [AMMO:CROSSBOW] tag in the raws. You can make a crossbow that shoots crossbows.

peasant cretin

  • Bay Watcher
  • [MEANDERER][GNAWER]
    • View Profile
Re: Globs in Adventure Mode
« Reply #1 on: September 18, 2017, 07:01:08 pm »

This isn't a GLOB problem, it's a stacking problem.

A reaction's reading/handling of stacks from a single inventory entry is buggy.

The workarounds you've noted are the ones that can be used: exact amount single item stacks (150 separate globs of fat), or having the reaction pull from from multiple quantity stacks (fat [150] + fat [50] + fat [75]).

Pulling from from multiple quantity stacks requires a surplus, in order for the reaction to process that line before being able to move onto the next.

Just DF weirdness.
Logged

Jazz Cat

  • Bay Watcher
  • Adept stringed instrumentalist
    • View Profile
Re: Globs in Adventure Mode
« Reply #2 on: September 18, 2017, 08:52:55 pm »

Oh, well. Hopefully it'll get fixed at some point. Thanks!
Logged
Give your dwarves a pet
My holiday mod (only offensive to elves)
The check-laundry script

Quote
Just give the Crossbow weapon the [AMMO:CROSSBOW] tag in the raws. You can make a crossbow that shoots crossbows.