anchor.diff:    private
       fOnSetLogLinesMaxCnt: TIntegerEvent;
       procedure LogStr(const aText: String);
  +
  +    procedure _AIGroupsFormationSetEx(aPlayer: TKMHandID; aGroupType: TKMGroupType; aCount, aColumns: Integer; aMethodName: string);
     public
       property OnSetLogLinesMaxCnt: TIntegerEvent read fOnSetLogLinesMaxCnt write fOnSetLogLinesMaxCnt;
   
  
positive.code: end;
  
  
  //* Version: 5778
  //* Sets the formation the AI uses for defence positions
  procedure TKMScriptActions.AIGroupsFormationSet(aPlayer, aType: Byte; aCount, aColumns: Word);
  var
    gt: TKMGroupType;
  begin
    try
      if InRange(aPlayer, 0, gHands.Count - 1) and (gHands[aPlayer].Enabled)
      and InRange(aType, 0, 3)
      and (aCount > 0) and (aColumns > 0) then
      begin
        gt := TKMGroupType(aType);
        gHands[aPlayer].AI.General.DefencePositions.TroopFormations[gt].NumUnits := aCount;
        gHands[aPlayer].AI.General.DefencePositions.TroopFormations[gt].UnitsPerRow := aColumns;
      end
      else
        LogParamWarning('Actions.AIGroupsFormationSet', [aPlayer, aType, aCount, aColumns]);
    except
      gScriptEvents.ExceptionOutsideScript := True; //Don't blame script for this exception
      raise;
    end;
  end;
  
  
  
negative.code: //* Sets the formation the AI uses for defence positions
  procedure TKMScriptActions.AIGroupsFormationSetEx(aPlayer: TKMHandID; aGroupType: TKMGroupType; aCount, aColumns: Integer);
  begin
    _AIGroupsFormationSetEx(aPlayer, aGroupType, aCount, aColumns, 'Actions.AIGroupsFormationSetEx');
  end;
  
  
  