anchor.diff:        begin
           if TKMUnitWarrior(CurUnit).fCommander = nil then //Parse only Commanders
           begin
  -          AddCommand(ct_SetGroup,6,GetUnitScriptID(CurUnit.UnitType),CurUnit.GetPosition.X-1,CurUnit.GetPosition.Y-1,byte(CurUnit.Direction)-1,TKMUnitWarrior(CurUnit).UnitsPerRow,TKMUnitWarrior(CurUnit).fMapEdMembersCount+1);
  +          AddCommand(ct_SetGroup, [GetUnitScriptID(CurUnit.UnitType),CurUnit.GetPosition.X-1,CurUnit.GetPosition.Y-1,byte(CurUnit.Direction)-1,TKMUnitWarrior(CurUnit).UnitsPerRow,TKMUnitWarrior(CurUnit).fMapEdMembersCount+1]);
             if CurUnit.Condition = UNIT_MAX_CONDITION then
  -            AddCommand(ct_SetGroupFood);
  +            AddCommand(ct_SetGroupFood, []);
           end;
         end
         else
  -        AddCommand(ct_SetUnit,3,GetUnitScriptID(CurUnit.UnitType),CurUnit.GetPosition.X-1,CurUnit.GetPosition.Y-1);
  +        AddCommand(ct_SetUnit, [GetUnitScriptID(CurUnit.UnitType),CurUnit.GetPosition.X-1,CurUnit.GetPosition.Y-1]);
       end;
   
       AddData(''); //NL
  
positive.code:   CurHouse: TKMHouse;
    ReleaseAllHouses: boolean;
    SaveString: string;
    procedure AddData(aText:string);
    begin
      if CommandLayerCount <> -1 then
      begin
        if (CommandLayerCount mod COMMANDLAYERS) = 0 then
          SaveString :=  SaveString + #13#10 + aText //Put a line break every 4 commands
        else
          SaveString := SaveString + ' ' + aText; //Just put spaces so commands "layer"
        inc(CommandLayerCount);
      end
      else
        SaveString := SaveString + aText + #13#10; //Add to the string normally
    end;
  
    procedure AddCommand(aCommand:TKMCommandType; ParamCount:byte=0; aParam1:integer = 0; aParam2:integer = 0; aParam3:integer = 0;
                         aParam4:integer = 0; aParam5:integer = 0; aParam6:integer = 0; aComParam:TKMCommandParamType=cpt_Unknown);
    var OutData: string;
    begin
      OutData := '!'+COMMANDVALUES[aCommand];
      if aComParam <> cpt_Unknown then
        OutData := OutData+' '+PARAMVALUES[aComParam];
      if ParamCount >= 1 then OutData := OutData + ' ' + IntToStr(aParam1);
      if ParamCount >= 2 then OutData := OutData + ' ' + IntToStr(aParam2);
      if ParamCount >= 3 then OutData := OutData + ' ' + IntToStr(aParam3);
      if ParamCount >= 4 then OutData := OutData + ' ' + IntToStr(aParam4);
      if ParamCount >= 5 then OutData := OutData + ' ' + IntToStr(aParam5);
      if ParamCount >= 6 then OutData := OutData + ' ' + IntToStr(aParam6);
      AddData(OutData);
    end;
  
    procedure AddCommandParam(aCommand:TKMCommandType; aComParam:TKMCommandParamType=cpt_Unknown; ParamCount:byte=0; aParam1:integer = 0; aParam2:integer = 0; aParam3:integer = 0);
    begin AddCommand(aCommand,ParamCount,aParam1,aParam2,aParam3,0,0,0,aComParam); end;
  begin
    //Write out a KaM format mission file to aFileName
  
    //Put data into stream
    SaveString := '';
  
negative.code:     begin
        if not fPlayers.Player[i].Stats.AllowToBuild[k] then
        begin
          AddCommand(ct_BlockHouse, [k-1]);
          ReleaseAllHouses := false;
        end
        else
          if fPlayers.Player[i].Stats.BuildReqDone[k] then
            AddCommand(ct_ReleaseHouse, [k-1])
          else
            ReleaseAllHouses := false;
      end;
      if ReleaseAllHouses then
        AddCommand(ct_ReleaseAllHouses, []);
  
      //Houses
      for k:=0 to fPlayers.Player[i].Houses.Count-1 do
  