Menu

#2978 silver incorrectly produced on terrain where minerals can occur but are not present

Fixed_0.12.0
closed-fixed
nobody
None
5
2022-05-01
2016-07-23
Lone_Wolf
No

trunk rev c2f2db5

load e676a0ce_Dutch_1621_1_Spring.fsg
check 35,44 terrain details : marsh + road
open colony venlo at 34,45 : notice that the free colonist working 35,44 is producing silver !
(see also screenshots).

in freecol-specification > tile-types > marsh
silver is a production output with base value 0.
It seems likely this is needed to allow marsh with minerals to produce silver .
Other terrains that can have minerals like swamp show the same behaviour.

Some approaches to solve this :

1 add a check for base_value= 0 and don't any apply bonuses/maluses (rebel, tile improvement) in that case.
2 add seperate tile-type fields for terrain + resources combo (marsh, marsh+minerals ).
these would be statically defined, prob changing the whole resource handling.
3 keep resource specifications separate from tile-type , but allow resource creation/changing to modify tile-type production fields.
this would be like a dynamic version of 2.

Approach 1 seems the simplest one, though imo it's not the cleanest / most flexible approach..

Most of the above is invalid as i forgot we have both additive and multiplicative resources.
adding a check base_value = 0 and skipping any bonuses/maluses seems like the best/simplest solution by far.

4 Attachments

Discussion

  • Lone_Wolf

    Lone_Wolf - 2016-07-23
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -10,7 +10,7 @@
     It seems likely this is needed to allow marsh with minerals to produce silver .
     Other terrains that can have minerals like swamp show the same behaviour.
    
    -Some approaches to solve this :
    +<s>Some approaches to solve this :
    
     1 add a check for base_value= 0 and don't any apply bonuses/maluses (rebel, tile improvement) in that case.
     2 add seperate tile-type fields for terrain + resources combo (marsh, marsh+minerals ).
    @@ -19,3 +19,7 @@
     this would be like a dynamic version of 2.
    
     Approach 1 seems the simplest one, though imo it's not the cleanest / most flexible approach..
    +</s>
    +
    +Most the above is invalid as i forgot we have both additive and multiplicative resources.
    +adding a check base_value = 0 and skipping any bonuses/maluses seems like the best/simplest solution by far.
    
     
  • Lone_Wolf

    Lone_Wolf - 2016-07-23
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -21,5 +21,5 @@
     Approach 1 seems the simplest one, though imo it's not the cleanest / most flexible approach..
     </s>
    
    -Most the above is invalid as i forgot we have both additive and multiplicative resources.
    +Most of the <s>above</s> is invalid as i forgot we have both additive and multiplicative resources.
     adding a check base_value = 0 and skipping any bonuses/maluses seems like the best/simplest solution by far.
    
     
  • Lone_Wolf

    Lone_Wolf - 2016-07-24
    • summary: silver being produced on terrain where minerals could occur --> silver incorrectly produced on terrain where minerals can occur but are not present
     
  • Mike Pope

    Mike Pope - 2016-07-26

    in freecol-specification > tile-types > marsh silver is a production output with base value 0. It seems likely this is needed to allow marsh with minerals to produce silver. Other terrains that can have minerals like swamp show the same behaviour.

    Correct. The zero production entry is needed so that early tests in the (complicated:-S) production calculation can tell that silver is allowed to be produced on marsh at all.

    So to clarify, in your opinion it is a bug that silver is being produced on marsh-without-minerals?

     
  • Lone_Wolf

    Lone_Wolf - 2016-07-27

    yes, i feel it is a bug.
    In Col1 Silver is rare and its rarity is reflected in the high price.

    Minerals themselves are not very common, but can appear on 5 terrains :
    wetland forest
    rain forest
    marsh
    swamp
    tundra

    If all those 5 terrains can produce silver without minerals present, silver is way to common for its price.

    I realise the complexity of the production calculations.
    Even though i'm convinced there is a -relatively- simple underlying formula we haven't grasped yet , it will have many exceptions (and silver production looks like it may need its own special formula ).

     
  • Mike Pope

    Mike Pope - 2016-07-29

    git.71c5267 should fix this (although not immediately with your game, the assignment to produce silver will remain, possibly working, until you move the unit). However it was fixed at an annoyingly low level in the production code, so I am very suspicious that something else will have broken. So I will leave this open for a while.

     
  • wintertime

    wintertime - 2017-02-06

    Can't this be set to fixed?

     
    • Mike Pope

      Mike Pope - 2017-02-07

      There is a cluster of production bugs (2978,2979,2981) that I have been leaving open due to low confidence that there is nothing else lurking. However, it seems six months or so has passed, so perhaps it is due.

       
  • Mike Pope

    Mike Pope - 2017-07-29

    TIme to set to Pending.

     
  • Mike Pope

    Mike Pope - 2017-07-29
    • status: open --> pending-fixed
    • Group: Current --> Fixed_trunk
     
  • Mike Pope

    Mike Pope - 2022-05-01
    • Group: Fixed_trunk --> Fixed_0.12.0
     
  • Mike Pope

    Mike Pope - 2022-05-01
    • Status: pending-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB