Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0003071Dwarf FortressMaterial Propertiespublic2010-08-19 12:372012-03-17 07:13
Quietust 
Toady One 
normalminoralways
resolvedfixed 
0.31.12 
0.31.22 
0003071: All hardcoded materials (glass etc) have uninitialized MAX_EDGE and ABSORPTION and crappy yield/fracture/strain values
In an attempt to determine the various material properties of green glass, clear glass, and crystal glass, I've discovered that the game fails to initialize their MAX_EDGE values at all, resulting in them being mostly random each time you begin a game.

Using a memory viewer, one run in Arena mode resulted in green glass having max edge 102, clear glass having 1, and crystal glass having 93, while another run had 0 for green glass, 2 for clear glass, and 507 for crystal glass. In the data for the various metal types, the value is being set correctly.

On a related note, the physical properties for glass all seem to be placeholder values - all of the YIELD and FRACTURE values are 10000 and all of the STRAIN_AT_YIELD values are 0.
This may explain the observation in 0002813 that glass trap components are ineffective.
No tags attached.
related to 0004108new  Mussels and oysters lack any material based on PEARL_TEMPLATE, despite having the [PEARL] token 
parent of 0002813resolved Toady One Glass weapons (in traps) are comically ineffective 
related to 0003612resolved Toady One Banditry default leads to rampant dwarf/elf banditry 
related to 0004058new  Forgotten Beasts/Demons of certain materials are far too weak. 
related to 0003498new  Some hardcoded materials are unrealistically immune to heat/cold 
related to 0004050resolved Toady One Plants stored in large glass pots are not used by jobs, and other irregularities with pots 
Issue History
2010-08-19 12:37QuietustNew Issue
2010-08-19 12:54Hieronymous AlloyIssue Monitored: Hieronymous Alloy
2010-08-19 13:04QuietustNote Added: 0011929
2010-08-19 17:52Logical2uRelationship addedrelated to 0002813
2010-08-27 09:16BeeskeeIssue Monitored: Beeskee
2010-09-08 12:42QuietustNote Added: 0012517
2010-09-08 12:44QuietustNote Edited: 0012517bug_revision_view_page.php?bugnote_id=0012517#r4854
2010-09-08 15:43BeeskeeNote Added: 0012519
2010-11-19 06:48FootkerchiefRelationship addedrelated to 0003612
2011-02-22 06:36QuietustNote Added: 0015393
2011-02-22 07:10FootkerchiefSummaryGlass's MAX_EDGE is uninitialized => Glass's MAX_EDGE and ABSORPTION are uninitialized
2011-02-23 07:19FootkerchiefRelationship addedrelated to 0004058
2011-03-02 09:36FootkerchiefSummaryGlass's MAX_EDGE and ABSORPTION are uninitialized => All hardcoded materials (glass etc) have uninitialized MAX_EDGE and ABSORPTION
2011-03-02 09:37FootkerchiefRelationship addedrelated to 0003498
2011-03-02 09:38FootkerchiefRelationship replacedparent of 0002813
2011-03-02 09:38FootkerchiefRelationship addedrelated to 0004108
2011-03-02 09:38FootkerchiefSticky IssueNo => Yes
2011-03-02 09:39FootkerchiefSummaryAll hardcoded materials (glass etc) have uninitialized MAX_EDGE and ABSORPTION => All hardcoded materials (glass etc) have uninitialized MAX_EDGE and ABSORPTION and crappy yield/fracture/strain values
2011-03-03 13:51Khym ChanurIssue Monitored: Khym Chanur
2011-03-06 19:31FootkerchiefRelationship addedrelated to 0004054
2011-03-07 09:33QuietustNote Edited: 0015393bug_revision_view_page.php?bugnote_id=0015393#r5981
2011-03-09 04:05Toady OneStatusnew => resolved
2011-03-09 04:05Toady OneFixed in Version => 0.31.22
2011-03-09 04:05Toady OneResolutionopen => fixed
2011-03-09 04:05Toady OneAssigned To => Toady One
2011-03-09 11:26FootkerchiefRelationship addedrelated to 0004050
2011-03-09 11:26FootkerchiefRelationship deletedrelated to 0004054
2011-03-09 17:23Khym ChanurIssue End Monitor: Khym Chanur
2012-03-17 07:13DwarfuSticky IssueYes => No

Notes
(0011929)
Quietust   
2010-08-19 13:04   
This assumes that MAX_EDGE is used when determining the amount of damage inflicted by EDGE attacks (which it ought to), as opposed to only the YIELD/FRACTURE/STRAIN values.
(0012517)
Quietust   
2010-09-08 12:42   
(edited on: 2010-09-08 12:44)
Further memory hacking seems to indicate that ALL of the hardcoded materials ("rock", amber, coral, green glass, clear glass, crystal glass, water, coal, potash, ash, pearlash, lye, mud, vomit, salt, brown filth, yellow filth, unknown substance, and grime) have an undefined MAX_EDGE, though in practice this only affects glass. They also all seem to use the same yield/fracture/strain values of 10000/10000/0, which may cause titans/demons/forgotten beasts made of these materials to be less dangerous than they ought to be.

(0012519)
Beeskee   
2010-09-08 15:43   
You are a god.

And, just so I actually contribute something useful to the bug report, I've seen glass be pretty useless in several of my forts. I'm actually using the uselessness as part of a weapon design now.
(0015393)
Quietust   
2011-02-22 06:36   
(edited on: 2011-03-07 09:33)
It should be noted that ABSORPTION is also uninitialized, which means that glass jugs and pots will frequently be unusable for liquid storage.