anchor.diff:    ct_SetMap:         begin
                          MyStr := RemoveQuotes(TextParam);
                          //Check for same filename.map in same folder first - Remake format
  -                       if CheckFileExists(ChangeFileExt(OpenedMissionName,'.map'),true) then
  -                         fTerrain.LoadFromFile(ChangeFileExt(OpenedMissionName,'.map'))
  +                       if CheckFileExists(ChangeFileExt(fOpenedMissionName,'.map'),true) then
  +                         fTerrain.LoadFromFile(ChangeFileExt(fOpenedMissionName,'.map'))
                          else
                          //Check for KaM format map path
                          if CheckFileExists(ExeDir+MyStr,true) then
  
positive.code:                        if InRange(ParamList[0],0,fPlayers.Count-1) then
                           fPlayers.Player[ParamList[0]].PlayerType:=pt_Computer
                         else //This command doesn't require an ID, just use the current player
                           fPlayers.Player[CurrentPlayerIndex].PlayerType:=pt_Computer;
                       end;
    ct_CenterScreen:   begin
                         fViewport.SetCenter(ParamList[0],ParamList[1]);
                       end;
    ct_ClearUp:        begin
                       if ParamList[0] = 255 then
                         fPlayers.Player[CurrentPlayerIndex].FogOfWar.RevealEverything
                       else
                         fPlayers.Player[CurrentPlayerIndex].FogOfWar.RevealCircle(KMPointX1Y1(ParamList[0],ParamList[1]), ParamList[2], 255);
                       end;
    ct_SetHouse:       begin
                       if InRange(ParamList[0],0,HOUSE_COUNT-1) then
                         LastHouse := fPlayers.Player[CurrentPlayerIndex].AddHouse(THouseType(ParamList[0]+1), ParamList[1]+1, ParamList[2]+1, false);
                       end;
    ct_SetHouseDamage: begin
                       if LastHouse <> nil then
                         LastHouse.AddDamage(ParamList[0]);
                       end;
    ct_SetUnit:        begin
                       if InRange(ParamList[0],0,31) then
                         fPlayers.Player[CurrentPlayerIndex].AddUnit(UnitsRemap[ParamList[0]],KMPointX1Y1(ParamList[1],ParamList[2]));
                       end;
    ct_SetUnitByStock: begin
                       if InRange(ParamList[0],0,31) then
                       begin
                         Storehouse:=TKMHouseStore(fPlayers.Player[CurrentPlayerIndex].FindHouse(ht_Store,1));
                         if Storehouse<>nil then
                           fPlayers.Player[CurrentPlayerIndex].AddUnit(UnitsRemap[ParamList[0]],KMPointY1(Storehouse.GetEntrance));
                       end;
                       end;
    ct_SetRoad:        begin
                         fPlayers.Player[CurrentPlayerIndex].AddRoadsToList(KMPointX1Y1(ParamList[0],ParamList[1]));
                       end;
    ct_SetField:       begin
                         fPlayers.Player[CurrentPlayerIndex].AddField(KMPointX1Y1(ParamList[0],ParamList[1]),ft_Corn);
                       end;
    ct_Set_Winefield:  begin
                         fPlayers.Player[CurrentPlayerIndex].AddField(KMPointX1Y1(ParamList[0],ParamList[1]),ft_Wine);
                       end;
    ct_SetStock:       begin //This command basically means: Put a storehouse here with road bellow it
                         LastHouse := fPlayers.Player[CurrentPlayerIndex].AddHouse(ht_Store, ParamList[0]+1,ParamList[1]+1, false);
                         fPlayers.Player[CurrentPlayerIndex].AddRoadsToList(KMPointX1Y1(ParamList[0],ParamList[1]+1));
                         fPlayers.Player[CurrentPlayerIndex].AddRoadsToList(KMPointX1Y1(ParamList[0]-1,ParamList[1]+1));
                         fPlayers.Player[CurrentPlayerIndex].AddRoadsToList(KMPointX1Y1(ParamList[0]-2,ParamList[1]+1));
                       end;
    ct_AddWare:        begin
                         MyInt:=ParamList[1];
                         if MyInt = -1 then MyInt:=High(Word); //-1 means maximum resources
                         MyInt:=EnsureRange(MyInt,0,High(Word)); //Sometimes user can define it to be 999999
                         Storehouse:=TKMHouseStore(fPlayers.Player[CurrentPlayerIndex].FindHouse(ht_Store,1));
                         if (Storehouse<>nil) and (InRange(ParamList[0]+1,1,28)) then Storehouse.AddMultiResource(TResourceType(ParamList[0]+1),MyInt);
                       end;
    ct_AddWareToAll:   begin
  
negative.code:   end;
  
  begin
  
    //Put data into stream
    SaveString := '';
  