Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0004573Dwarf FortressReactionspublic2011-04-25 08:512014-01-17 10:03
Toady One 
0004573: [MAGMA_BUILD_SAFE] reaction token does not work properly
While attempting to test the behavior of the various reaction tokens, I created a test reaction which would consume any magma-safe building material.

Once I created a handful of materials (boulders of sandstone, mudstone, shale, rock salt, and limestone, plus bars of copper, silver, gold, platinum, and zinc), all of the items were available for selection, even though only 2 of the items (sandstone and platinum) were actually magma-safe.

Further testing with custom materials revealed that [MAGMA_BUILD_SAFE] appears to be behaving exactly the same as [FIRE_BUILD_SAFE], filtering out all reagents made of materials that have an IGNITE_POINT not equal to "NONE" (60001).


    [NAME:make items]

    [NAME:use magma-safe material]
binary patch
related to 0000307new  No announcements for blistering/charring, and other fire-related problems 
related to 0005011confirmed Footkerchief Material fire-safety temperature inconsistent with actual fire temperature 
related to 0005514resolved Dwarfu Stones without MELTING_POINT can't be used to make magma buildings 
Issue History
2011-04-25 08:51QuietustNew Issue
2011-04-25 08:58QuietustNote Added: 0017506
2011-10-21 10:29QuietustNote Added: 0018872
2011-10-21 10:47QuietustNote Edited: 0018872bug_revision_view_page.php?bugnote_id=0018872#r7075
2011-10-21 16:55QuietustNote Edited: 0018872bug_revision_view_page.php?bugnote_id=0018872#r7076
2011-10-22 14:09QuietustNote Added: 0018879
2011-10-22 14:15QuietustNote Edited: 0018872bug_revision_view_page.php?bugnote_id=0018872#r7083
2011-10-22 14:22QuietustNote Deleted: 0017506
2011-10-22 14:28QuietustNote Edited: 0018872bug_revision_view_page.php?bugnote_id=0018872#r7084
2011-10-22 17:49RhenayaNote Added: 0018880
2011-10-22 19:52QuietustNote Added: 0018882
2011-10-22 19:53QuietustNote Edited: 0018882bug_revision_view_page.php?bugnote_id=0018882#r7086
2011-10-22 19:54QuietustNote Edited: 0018882bug_revision_view_page.php?bugnote_id=0018882#r7087
2011-11-25 19:56QuietustTag Attached: binary patch
2012-01-22 08:01FootkerchiefRelationship addedrelated to 0000307
2012-01-23 19:54QuietustNote Added: 0019420
2012-02-01 10:15QuietustNote Added: 0019446
2012-02-01 10:33FootkerchiefRelationship addedrelated to 0005011
2012-02-16 16:31Toady OneNote Added: 0019857
2012-02-16 16:31Toady OneStatusnew => resolved
2012-02-16 16:31Toady OneFixed in Version => Next Version
2012-02-16 16:31Toady OneResolutionopen => fixed
2012-02-16 16:31Toady OneAssigned To => Toady One
2012-02-29 20:17FootkerchiefRelationship addedrelated to 0005514
2014-01-15 14:50Kirig Stonebeard IIIssue Monitored: Kirig Stonebeard II
2014-01-17 10:03Kirig StonebeardIssue Monitored: Kirig Stonebeard

2011-10-21 10:29   
(edited on: 2011-10-22 14:28)
Looking at a disassembly, the problem appears to be that ALL fire-safety and magma-safety checks are broken - they're intending to compare the material's 5 special temperatures (HEATDAM_POINT, COLDDAM_POINT, IGNITE_POINT, MELTING_POINT, and BOILING_POINT) to 11000 and 12000 (for fire and magma, respectively) but are actually checking IGNITE_POINT all 5 times, resulting in failure if it's not equal to NONE (since the first 4 checks return failure if greater than or equal, but the 5th check which was meant for COLDDAM_POINT returns failure if less than or equal).

The only noticeable effects of this bug are that the game permits you to build forges and furnaces out of non-fire-safe materials and build magma forges and furnaces out of non-magma-safe materials.

A brief look at a disassembly of the fire/magma-safety check from version suggests that this has ALWAYS been broken...

2011-10-22 14:09   
Binary patch for version 0.31.25 Win32 SDL:
6246CC : 76 -> 78
6246E7 : 76 -> 7A
62471D : 76 -> 72
62472E : 76 -> 74
2011-10-22 17:49   
on an unrelated sidenote: the make stuff makes broken bars: it should be BARS:NONE:METAL:x instead of inorganic, some reaction will not use the inorganic bars
2011-10-22 19:52   
(edited on: 2011-10-22 19:54)
Rhenaya: that is incorrect - in 0.31.xx, METAL is nothing more than an alias for INORGANIC, since MATGLOSS_STONE and MATGLOSS_METAL from were merged together. The only reason the above reaction would produce "broken" bars is because I didn't specify [PRODUCT_DIMENSION:150] for each one, and that's because I really didn't care what size they were - after all, it was just an Arena mode test.

2012-01-23 19:54   
I can see this being related to 0005011, but it really has nothing to do with how temperatures actually interact with materials (and tissue layers, as in 0000307), just with how items are classified by certain workshop/building jobs...
2012-02-01 10:15   
Binary patch for version 0.31.25 Linux: (untested)
98F786 : 16 -> 18
98F7B8 : 16 -> 1A
98F802 : 16 -> 12
98F823 : 16 -> 14
Toady One   
2012-02-16 16:31   
It's especially funny seeing all the ignites in the code there... thanks to Quietust for this one. Fixed for next time.