View Issue Details

IDProjectCategoryView StatusLast Update
0000808Dwarf FortressDwarf Mode -- Jobs, Fishingpublic2014-08-03 14:03
ReporterZeg Assigned ToToady One  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version0.31.01 
Fixed in Version0.40.06 
Summary0000808: Processing Raw Turtles only makes one shell per stack, and other stack size issues
DescriptionProcessing a stack of Raw Turtles only seems to make one turtle shell per stack, rather than the same number as turtles in the stack.

Also, it doesn't seem to produce any bones at all. I guess that may possibly be intentional, since logically turtle bones should be too small for most of the applications they used to be used for (5 turtle bone bolts from one turtle).
Tagsbinary patch, bones, fish, food, shell

Relationships

related to 0000347 resolvedToady One Rendering a stack of fat yields individual tallow items rather than a stack 
parent of 0002117 resolvedToady One stacked lye only produces 1 potash 
parent of 0002161 resolvedToady One Render fat job gets queued at multiple kitchens for single stack of fat 
parent of 0002011 resolvedToady One Decorating with bone/horn uses whole stack 
parent of 0001436 resolvedToady One Animal traps get baited with a whole stack of meat/fish 
parent of 0003034 resolvedToady One bone greaves require 3 stacks of bone (not just 3 bones) 
parent of 0004616 resolvedToady One Spinning stacks of wool only produces a single yarn thread 
parent of 0003898 resolvedToady One Entire Bone Stacks are used in Reactions instead of a single Bone 
parent of 0003151 resolvedToady One Shell crafts use up the entire stack 
related to 0000231 resolvedToady One Body parts from large creatures (bones, meat, leather, tusks, etc) slow workshops down due to clutter 
related to 0000510 new Striking with stacked ammo gives a momentum bonus but no contact area penalty 
related to 0000867 confirmeduser11 Bad interaction between repeated bone-using jobs & new one-bone-per-job behavior causes cancellation spam 
related to 0004593 resolvedToady One shearing sometimes produces stack of 1 wool, which cannot be used 
related to 0006420 acknowledgeduser6 Strange mood requests don't take item dimension into account for decoration materials 

Activities

user6

2010-04-08 10:48

  ~0002089

The lack of bones is intentional, yeah -- you now only get bones if the creature has enough bone tissue in its body (for example, kittens usually won't give you any bones).

Can anyone confirm about only getting one shell per stack?

Greyhawk

2010-04-08 21:11

reporter   ~0002250

Yeah, I've seen turtle [5] and (just one) turtle shell at the fishery.

derigo

2010-04-08 21:54

reporter   ~0002259

my fisher wasn't as skilled (or something) so my turtles were in stacks of 3, and yes, 1 shell per stack.

greycat

2011-03-03 05:32

reporter   ~0015700

I've been seeing this throughout the entire 0.31.* series. Still happens in 0.31.19.

JmzLost

2011-03-24 22:17

reporter   ~0016547

Still happening in 31.22. However, when a stack of turtles rots I get 1 shell per turtle. Seems like the fishery is just losing the other shells.

JMZ

greycat

2011-04-05 20:03

reporter   ~0017117

Producing soap with a barrel of lye [10] from the caravan uses up the entire barrel (plus 1 tallow) and only gives 1 bar of soap. (When soap is made from a bucket or barrel with a single lye, you still get 1 bar of soap.)

I'm not sure if you want this to be a separate bug report, to be marked as a child of this one, or if including it here is best.

I can provide a save game if needed.

RossM

2011-04-06 11:59

reporter   ~0017138

I can confirm the lye problem.

freeze

2011-04-12 12:21

reporter   ~0017322

other container/liquid/stack issues i've run across

*soap/potash production consumes all units of lye in a container
-this is true for a barrel from the caravan (lye[10]) and a barrel/pot of homemade lye (lye lye lye ...)

*collected liquids (milk, honey, lye) are not combined
-I'd love to see this addressed as being able to produce larger than single unit stacks of cheese and mead would make the industries worth doing

*liquid production job (lye, etc) can occur on non-empty container

*soldiers assigned drinks can use non-empty containers (vials of golden salve)

Producing bolts from a stack of bone works as expected, in that multiple units of bone bolts[5] are produced. I guess that this is also true for decorating, etc, from a stack of bone, while moods will consume multiple entire stacks.

RossM

2011-04-12 12:27

reporter   ~0017323

Using non-empty containers to produce liquids is 0001324.

Kumquat

2011-04-16 05:55

reporter   ~0017403

Stacks of rotting mussels only leave behind a single shell, too.

kwieland

2011-05-18 19:14

reporter   ~0017780

@freeze I agree that processing bone[7] produces 7 stacks of bolts[5]. However, in previous version processing bone[7] would yield bolt[35], in a single job. 0000867 doesn't directly address this. If it is posted already please pardon the post.

ellindsey

2011-07-13 06:48

reporter   ~0018221

Further stack weirdness:

If you somehow create a stack of rough gems (only possible with modding), the 'cut gem' operation will consume the entire stack and only generate a single cut gem.

If you somehow create a stack of metal ore (again, only possible with modding), the smelter will consume the entire stack yet only generate a single bar of metal.

krazykatboy

2011-08-23 14:30

reporter   ~0018618

Also, more stack stuff: Arrows and bolts created at different times or recovered from the field won't stack with pre-existing arrows/bolts of the same material. While this makes sense for used ammo, which could have sustained damage when it hit, this is rather confusing with new ammo.

Quietust

2011-08-23 16:17

reporter   ~0018619

krazykatboy: this bug is only dealing with jobs not taking stack size into account (i.e. producing fewer goods as a result), not with merging existing stacks together (which has been an issue since, well, forever, and isn't going away any time soon).

ag

2012-09-19 03:28

reporter   ~0023590

I have made two experimental patches for linux and windows that fix reagent consumption in dwarf mode custom reactions:

http://pastebin.com/x84UWvS0
http://pastebin.com/cGrJFSkG

The [pseudo]code change amounts to basically this. Since multiplying rsz by granularity makes no sense, I expect that this was intended to work correctly, but a typo crept in. Adventure reactions use a different function, but with code seemingly copied from the dwarf mode verbatim.

for (i = 0; i < num_items; i++)
{
    ridx = reagent_idx[i];
    sz = reagent_quantity[ridx]; // used quantity
    if (sz <= 0) continue;
    reag = reagent[ridx];
    if (reag->flags.PRESERVE_REAGENT) continue;
    rsz = items[i]->getTotalDimension();
<<<<<<<<
    if (reag->flags3.ANY_RAW_MATERIAL)
        rsz *= BASE_SIZE(items[i]->getType());
    if (items[i]->subtractDimension(rsz))
========
    /* Not in patch, but necessary for full correctness:
    if (reag->flags3.ANY_RAW_MATERIAL)
        rsz /= BASE_SIZE(items[i]->getType());
    */
    if (reag->flags3.ANY_RAW_MATERIAL)
        sz *= BASE_SIZE(items[i]->getType());
    if (items[i]->subtractDimension(sz))
>>>>>>>>
        destroy_item(items[i]);
    reagent_quantity[ridx] -= rsz
    if (reagent_quantity[ridx] < 0)
        reagent_quantity[ridx] = 0;
}

Note also that this directly exposes another issue: the subtractDimension (name arbitrarily guessed) virtual method does nothing when called on a stack and the amount is smaller than one item. A simple solution to that would be to split the stack as necessary if within a container, or round the subtracted amount up if not.

sark

2014-07-07 22:31

reporter   ~0024934

Still present in 0.40.01. Stack of 5 lye and 1 tallow = no more lye and 1 soap.

Issue History

Date Modified Username Field Change
2010-04-08 10:38 Zeg New Issue
2010-04-08 10:40 Zeg Tag Attached: bones
2010-04-08 10:40 Zeg Tag Attached: fish
2010-04-08 10:40 Zeg Tag Attached: food
2010-04-08 10:40 Zeg Tag Attached: shell
2010-04-08 10:48 user6 Note Added: 0002089
2010-04-08 21:11 Greyhawk Note Added: 0002250
2010-04-08 21:54 derigo Note Added: 0002259
2010-06-06 10:53 user6 Summary Processing Raw Turtles only makes one shell per stack, always produces no bones. => Processing Raw Turtles only makes one shell per stack
2010-06-22 09:02 user6 Relationship added child of 0000347
2010-06-22 09:03 user6 Relationship added parent of 0002117
2010-06-22 09:03 user6 Relationship added parent of 0002161
2010-06-22 09:03 user6 Relationship replaced related to 0000347
2010-06-22 09:04 user6 Relationship added parent of 0002011
2010-06-22 09:05 user6 Relationship added related to 0000231
2010-06-22 09:06 user6 Summary Processing Raw Turtles only makes one shell per stack => Processing Raw Turtles only makes one shell per stack, and other stack size issues
2010-06-22 09:06 user6 Relationship added related to 0000510
2010-06-22 09:06 user6 Relationship added related to 0000867
2010-06-22 09:07 user6 Relationship added parent of 0001436
2010-06-22 09:11 user6 Sticky Issue No => Yes
2010-08-15 13:11 user11 Relationship added related to 0003034
2010-08-15 16:33 user6 Relationship replaced parent of 0003034
2011-03-03 05:32 greycat Note Added: 0015700
2011-03-24 22:17 JmzLost Note Added: 0016547
2011-04-05 20:03 greycat Note Added: 0017117
2011-04-06 11:59 RossM Note Added: 0017138
2011-04-12 12:21 freeze Note Added: 0017322
2011-04-12 12:27 RossM Note Added: 0017323
2011-04-16 05:55 Kumquat Note Added: 0017403
2011-05-07 08:05 user6 Relationship added parent of 0004616
2011-05-07 11:28 user6 Relationship added related to 0004593
2011-05-18 19:14 kwieland Note Added: 0017780
2011-07-13 06:48 ellindsey Note Added: 0018221
2011-08-23 14:30 krazykatboy Note Added: 0018618
2011-08-23 16:17 Quietust Note Added: 0018619
2012-09-19 03:28 ag Note Added: 0023590
2013-09-22 17:12 user6 Tag Attached: binary patch
2014-01-26 17:55 user6 Relationship added related to 0006420
2014-03-25 13:41 user11 Assigned To => user11
2014-03-25 13:41 user11 Status new => acknowledged
2014-07-07 22:31 sark Note Added: 0024934
2014-07-29 15:33 user11 Status acknowledged => confirmed
2014-07-30 12:12 Toady One Relationship added parent of 0003898
2014-07-30 12:12 Toady One Relationship added parent of 0003151
2014-07-31 10:57 Toady One Status confirmed => resolved
2014-07-31 10:57 Toady One Fixed in Version => Next Version
2014-07-31 10:57 Toady One Resolution open => fixed
2014-07-31 10:57 Toady One Assigned To user11 => Toady One
2014-08-03 14:03 lethosor Sticky Issue Yes => No