Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0005732Dwarf FortressWorld Generation -- Generalpublic2012-03-30 17:002014-07-18 16:51
the_game_hunt 
Toady One 
lowmajoralways
resolvedfixed 
Windows
0.34.07 
0.40.04 
0005732: Site finder doesn't see flux/coal if metal ores are present
When you want to play dwarf mode, and select flux stone on site finder, the area is marked as not having flux stone.

However after embark the first stone layer is limestone.
1. Generate new world
2. use the site finder and search for flux stone
3. all the map is goind to be marked without flux
I dont know if i need to upload save, all world i generate appears to have this on all maps

See 0005732:0023983 for a likely solution.
binary patch, site finder
related to 0002440resolved Toady One Flux is ignored in the Site Finder 
has duplicate 0005885resolved Footkerchief Site finder can't find flux 
has duplicate 0006024resolved Footkerchief Searching for Flux via "Find desired location" on world with minerals set to "everywhere" 
has duplicate 0004425resolved Footkerchief No lignite or bioluminous coal 
has duplicate 0007241resolved Footkerchief Finder cannot find flux stone 
related to 0004451resolved Dwarfu Site finder ignores flux/soil depth without warning. Low evil =/= good 
Issue History
2012-03-30 17:00the_game_huntNew Issue
2012-03-30 17:05dree12Note Added: 0021919
2012-03-30 17:05dree12Tag Attached: Intentional/Expected
2012-03-30 17:13the_game_huntNote Added: 0021920
2012-03-30 17:13the_game_huntNote Edited: 0021920bug_revision_view_page.php?bugnote_id=0021920#r8153
2012-03-30 17:16the_game_huntTag Attached: site finder
2012-03-30 20:01FootkerchiefIssue Monitored: dree12
2012-03-30 20:01FootkerchiefNote Added: 0021929
2012-03-30 20:01FootkerchiefTag Detached: Intentional/Expected
2012-03-30 20:02FootkerchiefDescription Updatedbug_revision_view_page.php?rev_id=8157#r8157
2012-03-30 20:03FootkerchiefNote Added: 0021930
2012-03-31 15:13dree12Note Added: 0021959
2012-03-31 15:53Logical2uNote Added: 0021960
2012-03-31 15:54Logical2uNote Deleted: 0021960
2012-04-01 01:08KogutNote Added: 0021971
2012-04-01 01:15MaristoNote Added: 0021972
2012-04-01 02:51KogutNote Added: 0021976
2012-04-01 02:51KogutNote Edited: 0021976bug_revision_view_page.php?bugnote_id=0021976#r8173
2012-04-01 09:08FootkerchiefSummarySite finder doesnt have correct flux stone detectation => Site finder too pessimistic about presence of flux stone
2012-04-02 04:27StebNote Added: 0022013
2012-04-02 04:31KogutNote Added: 0022014
2012-04-02 07:40BeeskeeNote Added: 0022029
2012-04-02 07:54BeeskeeIssue Monitored: Beeskee
2012-04-03 02:23BeeskeeNote Deleted: 0022029
2012-04-03 06:27Dame de la LicorneIssue Monitored: Dame de la Licorne
2012-04-03 21:16tatterdemalianNote Added: 0022068
2012-05-15 07:19FootkerchiefRelationship addedhas duplicate 0005885
2012-06-15 09:05FootkerchiefRelationship addedrelated to 0002440
2012-06-15 09:06FootkerchiefRelationship addedhas duplicate 0006024
2012-06-15 09:06FootkerchiefIssue Monitored: Zara
2012-06-15 09:09FootkerchiefSummarySite finder too pessimistic about presence of flux stone => Setting mineral occurrence to EVERYWHERE results in flux/coal getting crowded out
2012-06-15 09:10FootkerchiefRelationship addedhas duplicate 0004425
2012-06-20 21:26ThoraniusNote Added: 0023070
2012-06-28 02:32pedrolanceNote Added: 0023118
2012-06-30 10:28AlienDjinnNote Added: 0023130
2012-07-01 12:27AlienDjinnIssue Monitored: AlienDjinn
2012-07-06 06:16drakytheNote Added: 0023172
2013-05-27 12:57QuietustNote Added: 0023983
2013-05-27 13:01QuietustNote Edited: 0023983bug_revision_view_page.php?bugnote_id=0023983#r8931
2013-06-14 08:07XolrocNote Added: 0024004
2013-11-25 15:00DwarfuSticky IssueNo => Yes
2013-11-25 15:03DwarfuAdditional Information Updatedbug_revision_view_page.php?rev_id=9053#r9053
2013-11-25 15:03DwarfuAdditional Information Updatedbug_revision_view_page.php?rev_id=9054#r9054
2013-11-29 14:53FootkerchiefTag Attached: binary patch
2014-01-15 14:46Kirig Stonebeard IIIssue Monitored: Kirig Stonebeard II
2014-01-17 10:08Kirig StonebeardIssue Monitored: Kirig Stonebeard
2014-03-25 13:40DwarfuAssigned To => Dwarfu
2014-03-25 13:40DwarfuStatusnew => acknowledged
2014-07-13 17:49FootkerchiefRelationship addedhas duplicate 0007241
2014-07-13 17:50FootkerchiefSummarySetting mineral occurrence to EVERYWHERE results in flux/coal getting crowded out => Site finder doesn't see flux/coal if metal ores are present
2014-07-18 11:55Toady OneStatusacknowledged => resolved
2014-07-18 11:55Toady OneFixed in Version => Next Version
2014-07-18 11:55Toady OneResolutionopen => fixed
2014-07-18 11:55Toady OneAssigned ToDwarfu => Toady One
2014-07-18 13:01DwarfuSticky IssueYes => No
2014-07-18 16:51Dame de la LicorneIssue End Monitor: Dame de la Licorne
2014-07-26 12:07DwarfuRelationship addedrelated to 0004451

Notes
(0021919)
dree12   
2012-03-30 17:05   
Limestone is a flux stone, so the site finder seems to be correct.
(0021920)
the_game_hunt   
2012-03-30 17:13   
It says the map HASNT any flux stone. However after embark the first stone layer IS limestone.

(0021929)
Footkerchief   
2012-03-30 20:01   
Reminder sent to: dree12

Tags like Intentional/Expected are for manager use only.
(0021930)
Footkerchief   
2012-03-30 20:03   
I've attempted to clarify the description. Need info about whether other people can reproduce this.
(0021959)
dree12   
2012-03-31 15:13   
(Sorry about the Intentional/Expected thing, it isn't documented or enforced anywhere and I've used it in the past.)

I still don't quite understand the steps to reproduce: it sounds like one should select Flux stone: NO on the site finder, and be able to find a site without flux - but the site still has flux?
(0021971)
Kogut   
2012-04-01 01:08   
Exactly.
(0021972)
Maristo   
2012-04-01 01:15   
I just fired up DF 0.34.07 for the first time. After generating 5 worlds, I have yet to encounter a world that has flux stone in it, according to the site finder. I have not embarked to determine whether or not flux stone actually exists in the world, but considering I've generated several large worlds with minerals set to "Everywhere" I think it's reasonable to expect that there be some flux stone somewhere. Regardless, the site finder always indicates that there is none.
(0021976)
Kogut   
2012-04-01 02:51   
minerals set to "Everywhere" may result in killing flux as flux is not a ore

(0022013)
Steb   
2012-04-02 04:27   
Perhaps the finder is indicating flux deposits but not flux layers? If Kogut is correct and minerals "Everywhere" kills off flux deposits then the only flux available would be where it forms a whole layer.
(0022014)
Kogut   
2012-04-02 04:31   
Somebody posted on forums that his/her world returned 0 hits for places with flux and 0 hits for places without flux.
(0022068)
tatterdemalian   
2012-04-03 21:16   
Had that bug too.

Site finder => Flux: Yes, No Match
Site finder => Flux: No, No Match
DFHack => Prospect: 300k chalk, 200k marble
Embark: Chalk everywhere.
(0023070)
Thoranius   
2012-06-20 21:26   
Just tested and confirmed this bug still exists in version 34.11.
(0023118)
pedrolance   
2012-06-28 02:32   
This issue happens to me when following the Getting Started with Dwarf Fortress book steps which leds to not being able to find a single suitable place using the finder function.
(0023130)
AlienDjinn   
2012-06-30 10:28   
Yeah, just got the O'Reilly book yesterday and I'm having the same issue following the tutorial. IT doesn't find any Flux to build a starting location.
(0023172)
drakythe   
2012-07-06 06:16   
I too am in the O'Reilly boat. I went ahead and turned minerals down to the level below the max, and now the site finder can find Flux quite easily.
(0023983)
Quietust   
2013-05-27 12:57   
(edited on: 2013-05-27 13:01)
I've done a bit of disassembly diving, and I think I see what's going wrong here:

When you're browsing embark locations, it displays a list of attributes (Shallow metal[s], Deep metal[s], Soil, Clay, Aquifer, etc.), and one of those attributes is "Flux". As it counts up metal ores, it first checks the layer material itself (in case you modded a layer stone to be smeltable into metal) and then all of the inclusions within it, and once it's done that it checks the "material" for [REACTION_CLASS:FLUX]; unfortunately, the material it checks is the last one it checked for metal ores, so it will only report Flux being present if either the last vein stone in the list is Calcite (which is unlikely) or if there are zero inclusions and the layer is made of flux.

It is likely that the site finder uses the same logic and thus has the same bug.


Effectively, this is what the code appears to be doing:

foreach geo_biome->layers as layer {
   inorganic_material *mat;
   mat = LoadMaterial(layer->material, layer->matgloss);
   if (mat->metal_ores.size()) { increment shallow_metal or deep_metal depending on depth; }
   foreach layer->veins as vein {
      /* this overwrites the above variable */
      mat = world.LoadMaterial(vein->material, vein->matgloss);
      if (mat->metal_ores.size()) { increment shallow_metal or deep_metal depending on depth; }
   }
   /* if there were any veins above, "mat" still refers to the last one, otherwise it refers to the layer itself */
   if (mat->reaction_class == "FLUX") { has_flux = 1; }
   // also check if the layer material is made of clay
}


(0024004)
Xolroc   
2013-06-14 08:07   
If it is that simple, then all that Toady (or a person writing a binary patch) would have to do is move that check for flux into the foreach, right? Before the mat = world.LoadMaterial(...); so that it'll check the layerstone as well. Though I think that might leave out the very last vein..? So perhaps copy it, and leave the original check where it is.