View Issue Details

IDProjectCategoryView StatusLast Update
0005732Dwarf FortressWorld Generation -- Generalpublic2014-07-18 16:51
Reporterthe_game_hunt Assigned ToToady One  
PrioritylowSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformWindows 
Product Version0.34.07 
Fixed in Version0.40.04 
Summary0005732: Site finder doesn't see flux/coal if metal ores are present
DescriptionWhen 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.
Steps To Reproduce1. Generate new world
2. use the site finder and search for flux stone
3. all the map is goind to be marked without flux
Additional InformationI 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.
Tagsbinary patch, site finder

Relationships

related to 0002440 resolvedToady One Flux is ignored in the Site Finder 
has duplicate 0005885 resolveduser6 Site finder can't find flux 
has duplicate 0006024 resolveduser6 Searching for Flux via "Find desired location" on world with minerals set to "everywhere" 
has duplicate 0004425 resolveduser6 No lignite or bioluminous coal 
has duplicate 0007241 resolveduser6 Finder cannot find flux stone 
related to 0004451 resolveduser11 Site finder ignores flux/soil depth without warning. Low evil =/= good 

Activities

dree12

2012-03-30 17:05

reporter   ~0021919

Limestone is a flux stone, so the site finder seems to be correct.

the_game_hunt

2012-03-30 17:13

reporter   ~0021920

Last edited: 2012-03-30 17:13

It says the map HASNT any flux stone. However after embark the first stone layer IS limestone.

user6

2012-03-30 20:01

  ~0021929

Reminder sent to: dree12

Tags like Intentional/Expected are for manager use only.

user6

2012-03-30 20:03

  ~0021930

I've attempted to clarify the description. Need info about whether other people can reproduce this.

dree12

2012-03-31 15:13

reporter   ~0021959

(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?

Kogut

2012-04-01 01:08

reporter   ~0021971

Exactly.

Maristo

2012-04-01 01:15

reporter   ~0021972

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.

Kogut

2012-04-01 02:51

reporter   ~0021976

Last edited: 2012-04-01 02:51

minerals set to "Everywhere" may result in killing flux as flux is not a ore

Steb

2012-04-02 04:27

reporter   ~0022013

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.

Kogut

2012-04-02 04:31

reporter   ~0022014

Somebody posted on forums that his/her world returned 0 hits for places with flux and 0 hits for places without flux.

tatterdemalian

2012-04-03 21:16

reporter   ~0022068

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.

Thoranius

2012-06-20 21:26

reporter   ~0023070

Just tested and confirmed this bug still exists in version 34.11.

pedrolance

2012-06-28 02:32

reporter   ~0023118

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.

AlienDjinn

2012-06-30 10:28

reporter   ~0023130

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.

drakythe

2012-07-06 06:16

reporter   ~0023172

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.

Quietust

2013-05-27 12:57

reporter   ~0023983

Last edited: 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
}


Xolroc

2013-06-14 08:07

reporter   ~0024004

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.

Issue History

Date Modified Username Field Change
2012-03-30 17:00 the_game_hunt New Issue
2012-03-30 17:05 dree12 Note Added: 0021919
2012-03-30 17:05 dree12 Tag Attached: Intentional/Expected
2012-03-30 17:13 the_game_hunt Note Added: 0021920
2012-03-30 17:13 the_game_hunt Note Edited: 0021920
2012-03-30 17:16 the_game_hunt Tag Attached: site finder
2012-03-30 20:01 user6 Note Added: 0021929
2012-03-30 20:01 user6 Tag Detached: Intentional/Expected
2012-03-30 20:02 user6 Description Updated
2012-03-30 20:03 user6 Note Added: 0021930
2012-03-31 15:13 dree12 Note Added: 0021959
2012-04-01 01:08 Kogut Note Added: 0021971
2012-04-01 01:15 Maristo Note Added: 0021972
2012-04-01 02:51 Kogut Note Added: 0021976
2012-04-01 02:51 Kogut Note Edited: 0021976
2012-04-01 09:08 user6 Summary Site finder doesnt have correct flux stone detectation => Site finder too pessimistic about presence of flux stone
2012-04-02 04:27 Steb Note Added: 0022013
2012-04-02 04:31 Kogut Note Added: 0022014
2012-04-03 21:16 tatterdemalian Note Added: 0022068
2012-05-15 07:19 user6 Relationship added has duplicate 0005885
2012-06-15 09:05 user6 Relationship added related to 0002440
2012-06-15 09:06 user6 Relationship added has duplicate 0006024
2012-06-15 09:09 user6 Summary Site finder too pessimistic about presence of flux stone => Setting mineral occurrence to EVERYWHERE results in flux/coal getting crowded out
2012-06-15 09:10 user6 Relationship added has duplicate 0004425
2012-06-20 21:26 Thoranius Note Added: 0023070
2012-06-28 02:32 pedrolance Note Added: 0023118
2012-06-30 10:28 AlienDjinn Note Added: 0023130
2012-07-06 06:16 drakythe Note Added: 0023172
2013-05-27 12:57 Quietust Note Added: 0023983
2013-05-27 13:01 Quietust Note Edited: 0023983
2013-06-14 08:07 Xolroc Note Added: 0024004
2013-11-25 15:00 user11 Sticky Issue No => Yes
2013-11-25 15:03 user11 Additional Information Updated
2013-11-25 15:03 user11 Additional Information Updated
2013-11-29 14:53 user6 Tag Attached: binary patch
2014-03-25 13:40 user11 Assigned To => user11
2014-03-25 13:40 user11 Status new => acknowledged
2014-07-13 17:49 user6 Relationship added has duplicate 0007241
2014-07-13 17:50 user6 Summary Setting 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:55 Toady One Status acknowledged => resolved
2014-07-18 11:55 Toady One Fixed in Version => Next Version
2014-07-18 11:55 Toady One Resolution open => fixed
2014-07-18 11:55 Toady One Assigned To user11 => Toady One
2014-07-18 13:01 user11 Sticky Issue Yes => No
2014-07-26 12:07 user11 Relationship added related to 0004451