Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0000130Dwarf FortressDwarf Mode -- Jobs, Itemspublic2010-04-02 07:302014-01-17 10:03
Toady One 
PCWindowsXp Sp 3
0000130: Forge jobs always use only a single bar
Regardless of material size, anything made at a Forge/Magma Forge requires only a single metal bar to make.
I haven't tried every single metal out yet, nor have I tried making anything out of adamantine wafers. (Might be a problem with the size of bars)

Note that the job cancel message is still correct: if you try to forge a statue out of a material you don't have, it'll tell you that you need 3 metal bars.
binary patch, forge, reactions, workshop
has duplicate 0001360closed Footkerchief Weaponsmithing/Armoring just need one bar per item 
has duplicate 0000493closed Footkerchief Forge jobs don't consume proper number of bars 
has duplicate 0001663closed Footkerchief Electrum furniture from a single electrum bar at magma forge 
has duplicate 0002696resolved Logical2u Dwarves will make anything out of 1 bar or 1 wafer 
related to 0000063resolved Toady One Steel Bar Cancel - 150 Iron Bars 
related to 0001484resolved Toady One Item MATERIAL_SIZE may be off by a factor of 150 
related to 0000801acknowledged Toady One Forges don't care if bars have a small PRODUCT_DIMENSION 
related to 0005029resolved Toady One Tool forging ignores MATERIAL_SIZE 
related to 0004979resolved Toady One Tool weight ignores [SIZE] 
Issue History
2010-04-02 07:30WtamerNew Issue
2010-04-02 08:17arcanerTag Attached: workshop
2010-04-15 05:24peregarrettTag Attached: forge
2010-04-15 05:24peregarrettTag Attached: reactions
2010-04-20 01:10FootkerchiefRelationship addedrelated to 0000063
2010-04-20 01:11FootkerchiefRelationship addedhas duplicate 0000483
2010-04-20 01:11FootkerchiefRelationship addedhas duplicate 0001360
2010-04-20 01:11FootkerchiefRelationship deletedhas duplicate 0000483
2010-04-20 01:11FootkerchiefRelationship addedhas duplicate 0000493
2010-04-20 01:12FootkerchiefSummaryForge reactions use improper amount of materials => Forge jobs always use only a single bar
2010-04-20 01:15Rafal99Note Added: 0004315
2010-04-20 01:17NimrodNote Added: 0004316
2010-04-20 01:24RhenayaNote Added: 0004317
2010-04-20 08:28QuietustNote Added: 0004333
2010-04-23 11:20KwahnNote Added: 0004748
2010-04-23 12:32FootkerchiefNote Added: 0004756
2010-04-23 12:32FootkerchiefIssue Monitored: Footkerchief
2010-04-24 00:52FootkerchiefRelationship addedrelated to 0001484
2010-04-27 21:57VastinNote Added: 0005469
2010-04-28 14:00FootkerchiefCategoryGeneral => Dwarf Mode -- Jobs, Items
2010-04-30 13:34FootkerchiefRelationship addedhas duplicate 0001663
2010-05-04 10:06MephansterasNote Added: 0006092
2010-05-04 13:14hyndisNote Added: 0006113
2010-06-27 01:37schlappiNote Added: 0009163
2010-06-27 01:39schlappiNote Edited: 0009163bug_revision_view_page.php?bugnote_id=0009163#r3512
2010-06-27 04:29BoomClapIssue Monitored: BoomClap
2010-07-14 19:54Logical2uRelationship addedhas duplicate 0002696
2010-10-08 04:58Malibu StaceyNote Added: 0013253
2010-10-08 05:51QuietustNote Added: 0013257
2010-11-19 00:14Khym ChanurIssue Monitored: Khym Chanur
2010-11-19 04:08wRARIssue Monitored: wRAR
2010-11-20 18:30FrogwarriorNote Added: 0014074
2010-11-20 19:11QuietustNote Added: 0014075
2010-11-20 20:19FrogwarriorNote Added: 0014076
2010-11-20 21:30FrogwarriorNote Added: 0014079
2010-11-23 13:44rephikulNote Added: 0014184
2011-07-09 02:51DwarfuRelationship addedrelated to 0000801
2011-09-12 00:11FrogwarriorNote Added: 0018709
2011-09-12 09:15Xen0nNote Added: 0018713
2011-09-12 18:01Xen0nNote Edited: 0018713bug_revision_view_page.php?bugnote_id=0018713#r7026
2011-09-12 18:02Xen0nNote Edited: 0018713bug_revision_view_page.php?bugnote_id=0018713#r7027
2012-01-14 20:45QuietustNote Added: 0019390
2012-01-14 20:46QuietustTag Attached: binary patch
2012-01-14 20:48QuietustNote Edited: 0019390bug_revision_view_page.php?bugnote_id=0019390#r7266
2012-01-18 06:42QuietustNote Edited: 0019390bug_revision_view_page.php?bugnote_id=0019390#r7273
2012-01-22 18:27QuietustNote Edited: 0019390bug_revision_view_page.php?bugnote_id=0019390#r7281
2012-01-22 19:16FootkerchiefRelationship addedrelated to 0005029
2012-01-23 12:41FootkerchiefRelationship addedrelated to 0004979
2012-02-01 10:15QuietustNote Added: 0019449
2012-02-16 16:50Toady OneNote Added: 0019866
2012-02-16 16:50Toady OneStatusnew => resolved
2012-02-16 16:50Toady OneFixed in Version => Next Version
2012-02-16 16:50Toady OneResolutionopen => fixed
2012-02-16 16:50Toady OneAssigned To => Toady One
2014-01-15 14:49Kirig Stonebeard IIIssue Monitored: Kirig Stonebeard II
2014-01-17 10:03Kirig StonebeardIssue Monitored: Kirig Stonebeard

2010-04-20 01:15   
I can confirm this. Tried with iron and steel breastplates, mail shirts, doors, floodgates and grates.
2010-04-20 01:17   
2010-04-20 01:24   
ah damn have not searched for forge jobs :x
2010-04-20 08:28   
Most likely, the hardcoded smithing reactions are forgetting to multiply by 150 (the "dimension" of metal bars) - when smelting metal bars into alloys when you don't have enough, it'll complain that you need 150 times as many bars as you'd expect (e.g. "Urist McSmelter cancels Make nickel silver bars: Needs 300 nickel bars").
2010-04-23 11:20   
I've had up to 3 silver bars and bronze bars used in any given project... can't confirm this one...
2010-04-23 12:32   
Maybe it depends on item types? Rafal99 mentioned "iron and steel breastplates, mail shirts, doors, floodgates and grates." Does it reproduce for those?
2010-04-27 21:57   
I've been forging a lot of steel objects in my recent fort.

I noticed a little ways in that all my armor was requiring 1 steel bar each, regardless of size (breastplates, helms, greaves, etc).

Likewise I just started producing Large Serrated steel discs for my traps, and they too are only requiring one bar.

I'm currently working with magma forges, but in my last fort I seem to remember getting the same result with a standard forge.
2010-05-04 10:06   
I noticed similar issues last night when testing out some modded in armor and weapons. Material size does not seem to effect the number of bars used at the moment.
2010-05-04 13:14   
Is this a bug or intended behavior? It may very well be intended behavior. Certainly simplifies things, so that metal bars now work the same as wood, cloth, and stone. 1 unit of raw materials = 1 finished item.
2010-06-27 01:37   
(edited on: 2010-06-27 01:39)
I can confirm - at a forge, one bar produces one item, even though it states the correct amount in the cancel message if you don't have a single bar available.

Easy to observe too, just watch the material used in the forges while production is in process.

Malibu Stacey   
2010-10-08 04:58   
Maybe I'm missing some change in 0.31.xx but isn't this how stuff has always worked in 40d?

Are raw materials now supposed contain a number of 'units' so you can create multiple items from one bar of metal/one stack of cloth/one wooden log etc? If so that's pretty awesome (although it makes the abundance of ore in 0.31.xx even more ridiculous as in theory you'll use a hell of a lot less metal if it works).
2010-10-08 05:51   
The "subunits" on bars were created solely for health care (specifically, bars of soap), so every other job in the game had to be adjusted to take item dimension into account (but most of them weren't, hence this bug).

hyndis: the fact that having zero bars of metal causes the job cancellation to indicate up to 3 bars (or 9 wafers) means this is definitely a bug. If non-healthcare jobs were actually respecting item dimension (and leaving the rest of the bars behind for future use), then it would be possible to make fifty barrels with one bar.
2010-11-20 18:30   
I found that this can be fixed for armor and weapons by multiplying all the MATERIAL_SIZE tokens by 150. So if a breastplate is 1350, then it will cost 3 bars of metal, chain shirts or greaves at 900 take 2 bars, etc. (You have to regen though.) Of course, this fix reintroduces the bug where if you don't have enough you get crazy numbers - if you don't have three bars when you try to make a breastplate, it will say "need 450 bars." Maybe he fixed that bug wrong the first time around?

Sadly, no luck on barrels and furniture with this fix though.
2010-11-20 19:11   
Frogwarrior: are you certain that this doesn't break the case of melting down said goods? Right now, while everything forges from a single bar, melting goods down does seem to reclaim the expected amount of metal, so boosting the material size might result in a single breastplate melting down into 150 bars...
2010-11-20 20:19   
Actually, I just tested that, and melting seems to be just fine. Two chain leggings makes a bar, as does a chain shirt and a shield.

But, actually, making things IS still a bit buggy... battle axes, shields, chain leggings, and anything else with material size over 450 (formerly 3) now takes 2 bars...

Gonna need to run more tests.
2010-11-20 21:30   
OK, it's obviously not making 150 times as many bars if you melt things, but it's also a little more than expected. Huh. Not really sure what's going on here.

Oh well, I'll prolly play like this anyway.
2010-11-23 13:44   
.18 here, a physical bar is 450 units. Material size is rounded down to last 10 divisible i.e. 461 -> 460 then divided to 450 i.e. 460/450 -> 1.02 then rounded up to calc the amount of bar needed for production i.e. 1.02 -> 2. Melting for objects made from multiple bars is kinda wierd tho.
2011-09-12 00:11   
So after testing, it appears that the amount of metal you get back is independent of MATERIAL_SIZE. I would guess that, like the value of objects, it is a function of armor type and such?

2011-09-12 09:15   
(edited on: 2011-09-12 18:02)
I'm curious, would Frogwarrior's workaround of increasing the MATERIAL_SIZE tokens also increase the amount of non-metal materials needed to make an object? For example, I just implemented the 'multiply MATERIAL_SIZE by 150 fix,' but then realised than helms can be made from metal OR bone. So would a bone helm take 300 bones now? Well, no, I tested it and it took just 1 bone. But why didn't it take 300? Is MATERIAL_SIZE only applicable to metals? Also, would the 'x 150' fix adversely affect other things, like the surface area (and therefore ability to spread out force from attacks) on armor, etc. ?

2012-01-14 20:45   
(edited on: 2012-01-22 18:27)
For the Win32 SDL 0.31.25 build, the following binary patch should fix smithing jobs to use the correct number of bars/wafers:

380DE1 : DE F3 FF FF -> 25 01 00 00 (for adamantine non-cloth, call the routine below)
380F0B : 91 21 FF FF -> 35 D4 01 00 (for normal metal, call the routine below)
39E344 : CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC -> 50 8B 41 10 69 C0 96 00 00 00 89 41 10 C7 41 64 96 00 00 00 58 E9 42 4D FD FF (multiply count by 150 and set min_dimension)

2012-02-01 10:15   
Binary patch for version 0.31.25 Linux: (untested)
60D201 : E8 8A C0 F8 FF -> E8 CC F5 FF FF
60C7D2 : 8D B4 26 00 00 00 00 8D BC 27 00 00 00 00 -> 85 C0 0F 85 B6 CA F8 FF 50 8B 46 10 EB E3
60C7C3 : 90 8D 74 26 00 -> E9 AA FE FF FF
60C672 : 8D B4 26 00 00 00 00 8D BC 27 00 -> 69 C0 96 00 00 00 89 46 10 EB BA
60C637 : 89 F6 8D BC 27 00 00 00 00 -> C7 46 34 96 00 00 00 EB CA
60C60A : 8D B6 00 00 00 00 -> 58 E9 80 CC F8 FF
Toady One   
2012-02-16 16:50   
I think this is working now. Thanks Quietust!