anchor.diff:  end;
   
   
  -//
  +// City initialization, estimation of maximal possible production and restriction by peace time and loc properties
   procedure TKMCityPredictor.CityInitialization(aGoldMineCnt, aIronMineCnt, aFieldCnt, aBuildCnt: Integer);
   
     procedure AddCitizens(aUT: TKMUnitType; aCnt: Word; aOverride: Boolean = False);
  
positive.code:                           + ProductionColor+'%.2f'+COLOR_WHITE+';' + #9
                            + ActualConsumptionColor+'%.2f'+COLOR_WHITE+';' + #9
                            + FinalConsumptionColor+'%.2f'+COLOR_WHITE+';'  + #9
                            + FractionColor+'%.2f '+COLOR_WHITE+';' + #9
                            + ExhaustionColor+'%.2f'+COLOR_WHITE+')|',
                            [aSpecificText, Production, ActualConsumption, FinalConsumption, Fraction, Exhaustion]);
      end;
  
negative.code: const
    IRON_WARFARE: set of TKMWareType = [wt_MetalShield, wt_MetalArmor, wt_Sword, wt_Hallebard, wt_Arbalet];
    STANDARD_WARFARE: array[0..3] of TKMWareType = (wt_Axe, wt_Pike, wt_Bow, wt_Shield);
    SPACE_COEF = 1 / 750.0; // factor for iron weapons
    FERTILITY_COEF = 1 / 800.0; // factor for wood weapons
    MIN_WOOD_PRODUCTION = 1;
    MAX_WOOD_PRODUCTION = 4;
    SCALE_MIN_PEACE_TIME = 50;
    SCALE_MAX_PEACE_TIME = 90;
    SCALE_PEACE_FACTOR = 1.0 / ((SCALE_MAX_PEACE_TIME - SCALE_MIN_PEACE_TIME)*1.0);
    WORKER_COEF = 1 / 105.0;
  var
    I: Integer;
    MaxIronWeapProd, MaxWoodWeapProd, PeaceFactor: Single;
    WT: TKMWareType;
  begin
    // Max field / build cnt ~ 8000 tiles in real map it is 1500-2500 for fields and 2000-4000 for build
    // Estimation of final weapons production (productions are independence - in builder will be higher priority given to iron weapons)
  
    PeaceFactor := (Min(SCALE_MAX_PEACE_TIME, gGame.GameOptions.Peacetime) - SCALE_MIN_PEACE_TIME) * SCALE_PEACE_FACTOR;
  
    // Iron weapons
    MaxIronWeapProd := Min(Round(aBuildCnt / SPACE_COEF), aIronMineCnt) * ProductionRate[wt_IronOre] * 0.5; // Division into half because of iron weapon and armor
    for WT in IRON_WARFARE do
      fWareBalance[WT].FinalConsumption := MaxIronWeapProd;
  
    // Wood weapons (depends on avaiable space) - here is maximal possible production in this loc
    MaxWoodWeapProd := Round(Min(aFieldCnt,aBuildCnt) * FERTILITY_COEF);
    // Consider peace time
    MaxWoodWeapProd := Max(1, MaxWoodWeapProd * PeaceFactor);
    // Transform to house production
    MaxWoodWeapProd := MaxWoodWeapProd * ProductionRate[wt_Axe];
    for I := Low(STANDARD_WARFARE) to High(STANDARD_WARFARE) do
      fWareBalance[ STANDARD_WARFARE[I] ].FinalConsumption := MaxWoodWeapProd;
    fWareBalance[wt_Armor].FinalConsumption := MaxWoodWeapProd;
    fWareBalance[wt_Shield].FinalConsumption := MaxWoodWeapProd / 5;
  
    // Decide count of workers + build nodes
    gHands[fOwner].AI.Setup.WorkerCount := Min(20 + Round(15 * PeaceFactor), Round((Min(aFieldCnt,aBuildCnt)+500) / WORKER_COEF));
  
    // Soldiers / min (only expected not final value)
    fMaxSoldiersInMin := MaxWoodWeapProd + MaxIronWeapProd;
    // Maybe there is no need to keep variable fMaxSoldiersInMin but I am afraid what scripters may do with fSetup
  