Пример #1
0
        public static void AmbiguateTile(Tile tile)
        {
            tile.Ground = 0;
            tile.GroundSet = 10;
            tile.GroundAnim = 0;
            tile.GroundAnimSet = 10;
            tile.Mask = 0;
            tile.MaskSet = 10;
            tile.Anim = 0;
            tile.AnimSet = 10;
            tile.Mask2 = 0;
            tile.Mask2Set = 10;
            tile.M2Anim = 0;
            tile.M2AnimSet = 10;
            tile.Fringe = 0;
            tile.FringeSet = 10;
            tile.FAnim = 0;
            tile.FAnimSet = 10;
            tile.Fringe2 = 0;
            tile.Fringe2Set = 10;
            tile.F2Anim = 0;
            tile.F2AnimSet = 10;

            tile.Type = Enums.TileType.Ambiguous;
            tile.Data1 = 0;
            tile.Data2 = 0;
            tile.Data3 = 0;
            tile.String1 = "";
            tile.String2 = "";
            tile.String3 = "";
        }
Пример #2
0
 public RDungeonFloor()
 {
     GroundTile = new Tile(new DataManager.Maps.Tile());
     HallTile = new Tile(new DataManager.Maps.Tile());
     WaterTile = new Tile(new DataManager.Maps.Tile());
     WallTile = new Tile(new DataManager.Maps.Tile());
     SpecialTiles = new List<RDungeonTrap>();
     Weather = new List<Enums.Weather>();
     Npcs = new List<MapNpcPreset>();
     Items = new List<RDungeonItem>();
     options = new GeneratorOptions();
 }
Пример #3
0
        public static RDungeon LoadRDungeon(int dungeonNum)
        {
            RDungeon dungeon = new RDungeon(dungeonNum);
            string FilePath = IO.Paths.RDungeonsFolder + "rdungeon" + dungeonNum.ToString() + ".dat";
            using (System.IO.StreamReader reader = new System.IO.StreamReader(FilePath)) {
                while (!(reader.EndOfStream)) {
                    string[] parse = reader.ReadLine().Split('|');
                    switch (parse[0].ToLower()) {
                        case "rdungeondata":
                            if (parse[1].ToLower() != "v3") {
                                reader.Close();
                                reader.Dispose();
                                return null;
                            }
                            break;
                        case "data":
                            dungeon.DungeonName = parse[1];
                            dungeon.Direction = (Enums.Direction)parse[2].ToInt();
                            dungeon.MaxFloors = parse[3].ToInt();
                            dungeon.Recruitment = parse[4].ToBool();
                            dungeon.Exp = parse[5].ToBool();
                            dungeon.WindTimer = parse[6].ToInt();
                            break;
                        case "floor": {
                                RDungeonFloor floor = new RDungeonFloor();
                                floor.Options.TrapMin = parse[1].ToInt();
                                floor.Options.TrapMax = parse[2].ToInt();
                                floor.Options.ItemMin = parse[3].ToInt();
                                floor.Options.ItemMax = parse[4].ToInt();
                                floor.Options.RoomWidthMin = parse[5].ToInt();
                                floor.Options.RoomWidthMax = parse[6].ToInt();
                                floor.Options.RoomLengthMin = parse[7].ToInt();
                                floor.Options.RoomLengthMax = parse[8].ToInt();
                                floor.Options.HallTurnMin = parse[9].ToInt();
                                floor.Options.HallTurnMax = parse[10].ToInt();
                                floor.Options.HallVarMin = parse[11].ToInt();
                                floor.Options.HallVarMax = parse[12].ToInt();
                                floor.Options.WaterFrequency = parse[13].ToInt();
                                floor.Options.Craters = parse[14].ToInt();
                                floor.Options.CraterMinLength = parse[15].ToInt();
                                floor.Options.CraterMaxLength = parse[16].ToInt();
                                floor.Options.CraterFuzzy = parse[17].ToBool();

                                floor.Darkness = parse[18].ToInt();
                                floor.GoalType = (Enums.RFloorGoalType)parse[19].ToInt();
                                floor.GoalMap = parse[20].ToInt();
                                floor.GoalX = parse[21].ToInt();
                                floor.GoalY = parse[22].ToInt();
                                floor.Music = parse[23];

                                #region terrain

                                #region wall
                                floor.StairsX = parse[24].ToInt();
                                floor.StairsSheet = parse[25].ToInt();

                                floor.mGroundX = parse[26].ToInt();
                                floor.mGroundSheet = parse[27].ToInt();

                                floor.mTopLeftX = parse[28].ToInt();
                                floor.mTopLeftSheet = parse[29].ToInt();
                                floor.mTopCenterX = parse[30].ToInt();
                                floor.mTopCenterSheet = parse[31].ToInt();
                                floor.mTopRightX = parse[32].ToInt();
                                floor.mTopRightSheet = parse[33].ToInt();

                                floor.mCenterLeftX = parse[34].ToInt();
                                floor.mCenterLeftSheet = parse[35].ToInt();
                                floor.mCenterCenterX = parse[36].ToInt();
                                floor.mCenterCenterSheet = parse[37].ToInt();
                                floor.mCenterRightX = parse[38].ToInt();
                                floor.mCenterRightSheet = parse[39].ToInt();

                                floor.mBottomLeftX = parse[40].ToInt();
                                floor.mBottomLeftSheet = parse[41].ToInt();
                                floor.mBottomCenterX = parse[42].ToInt();
                                floor.mBottomCenterSheet = parse[43].ToInt();
                                floor.mBottomRightX = parse[44].ToInt();
                                floor.mBottomRightSheet = parse[45].ToInt();

                                floor.mInnerTopLeftX = parse[46].ToInt();
                                floor.mInnerTopLeftSheet = parse[47].ToInt();
                                floor.mInnerBottomLeftX = parse[48].ToInt();
                                floor.mInnerBottomLeftSheet = parse[49].ToInt();

                                floor.mInnerTopRightX = parse[50].ToInt();
                                floor.mInnerTopRightSheet = parse[51].ToInt();
                                floor.mInnerBottomRightX = parse[52].ToInt();
                                floor.mInnerBottomRightSheet = parse[53].ToInt();

                                floor.mColumnTopX = parse[54].ToInt();
                                floor.mColumnTopSheet = parse[55].ToInt();
                                floor.mColumnCenterX = parse[56].ToInt();
                                floor.mColumnCenterSheet = parse[57].ToInt();
                                floor.mColumnBottomX = parse[58].ToInt();
                                floor.mColumnBottomSheet = parse[59].ToInt();

                                floor.mRowLeftX = parse[60].ToInt();
                                floor.mRowLeftSheet = parse[61].ToInt();
                                floor.mRowCenterX = parse[62].ToInt();
                                floor.mRowCenterSheet = parse[63].ToInt();
                                floor.mRowRightX = parse[64].ToInt();
                                floor.mRowRightSheet = parse[65].ToInt();

                                floor.mIsolatedWallX = parse[66].ToInt();
                                floor.mIsolatedWallSheet = parse[67].ToInt();

                                floor.mGroundAltX = parse[68].ToInt();
                                floor.mGroundAltSheet = parse[69].ToInt();
                                floor.mGroundAlt2X = parse[70].ToInt();
                                floor.mGroundAlt2Sheet = parse[71].ToInt();

                                floor.mTopLeftAltX = parse[72].ToInt();
                                floor.mTopLeftAltSheet = parse[73].ToInt();
                                floor.mTopCenterAltX = parse[74].ToInt();
                                floor.mTopCenterAltSheet = parse[75].ToInt();
                                floor.mTopRightAltX = parse[76].ToInt();
                                floor.mTopRightAltSheet = parse[77].ToInt();

                                floor.mCenterLeftAltX = parse[78].ToInt();
                                floor.mCenterLeftAltSheet = parse[79].ToInt();
                                floor.mCenterCenterAltX = parse[80].ToInt();
                                floor.mCenterCenterAltSheet = parse[81].ToInt();
                                floor.mCenterCenterAlt2X = parse[82].ToInt();
                                floor.mCenterCenterAlt2Sheet = parse[83].ToInt();
                                floor.mCenterRightAltX = parse[84].ToInt();
                                floor.mCenterRightAltSheet = parse[85].ToInt();

                                floor.mBottomLeftAltX = parse[86].ToInt();
                                floor.mBottomLeftAltSheet = parse[87].ToInt();
                                floor.mBottomCenterAltX = parse[88].ToInt();
                                floor.mBottomCenterAltSheet = parse[89].ToInt();
                                floor.mBottomRightAltX = parse[90].ToInt();
                                floor.mBottomRightAltSheet = parse[91].ToInt();

                                floor.mInnerTopLeftAltX = parse[92].ToInt();
                                floor.mInnerTopLeftAltSheet = parse[93].ToInt();
                                floor.mInnerBottomLeftAltX = parse[94].ToInt();
                                floor.mInnerBottomLeftAltSheet = parse[95].ToInt();

                                floor.mInnerTopRightAltX = parse[96].ToInt();
                                floor.mInnerTopRightAltSheet = parse[97].ToInt();
                                floor.mInnerBottomRightAltX = parse[98].ToInt();
                                floor.mInnerBottomRightAltSheet = parse[99].ToInt();

                                floor.mColumnTopAltX = parse[100].ToInt();
                                floor.mColumnTopAltSheet = parse[101].ToInt();
                                floor.mColumnCenterAltX = parse[102].ToInt();
                                floor.mColumnCenterAltSheet = parse[103].ToInt();
                                floor.mColumnBottomAltX = parse[104].ToInt();
                                floor.mColumnBottomAltSheet = parse[105].ToInt();

                                floor.mRowLeftAltX = parse[106].ToInt();
                                floor.mRowLeftAltSheet = parse[107].ToInt();
                                floor.mRowCenterAltX = parse[108].ToInt();
                                floor.mRowCenterAltSheet = parse[109].ToInt();
                                floor.mRowRightAltX = parse[110].ToInt();
                                floor.mRowRightAltSheet = parse[111].ToInt();

                                floor.mIsolatedWallAltX = parse[112].ToInt();
                                floor.mIsolatedWallAltSheet = parse[113].ToInt();

                                #endregion

                                #region water

                                floor.mWaterX = parse[114].ToInt();
                                floor.mWaterSheet = parse[115].ToInt();
                                floor.mWaterAnimX = parse[116].ToInt();
                                floor.mWaterAnimSheet = parse[117].ToInt();

                                floor.mShoreTopLeftX = parse[118].ToInt();
                                floor.mShoreTopLeftSheet = parse[119].ToInt();
                                floor.mShoreTopRightX = parse[120].ToInt();
                                floor.mShoreTopRightSheet = parse[121].ToInt();
                                floor.mShoreBottomRightX = parse[122].ToInt();
                                floor.mShoreBottomRightSheet = parse[123].ToInt();
                                floor.mShoreBottomLeftX = parse[124].ToInt();
                                floor.mShoreBottomLeftSheet = parse[125].ToInt();
                                floor.mShoreDiagonalForwardX = parse[126].ToInt();
                                floor.mShoreDiagonalForwardSheet = parse[127].ToInt();
                                floor.mShoreDiagonalBackX = parse[128].ToInt();
                                floor.mShoreDiagonalBackSheet = parse[129].ToInt();

                                floor.mShoreTopX = parse[130].ToInt();
                                floor.mShoreTopSheet = parse[131].ToInt();
                                floor.mShoreRightX = parse[132].ToInt();
                                floor.mShoreRightSheet = parse[133].ToInt();
                                floor.mShoreBottomX = parse[134].ToInt();
                                floor.mShoreBottomSheet = parse[135].ToInt();
                                floor.mShoreLeftX = parse[136].ToInt();
                                floor.mShoreLeftSheet = parse[137].ToInt();
                                floor.mShoreVerticalX = parse[138].ToInt();
                                floor.mShoreVerticalSheet = parse[139].ToInt();
                                floor.mShoreHorizontalX = parse[140].ToInt();
                                floor.mShoreHorizontalSheet = parse[141].ToInt();

                                floor.mShoreInnerTopLeftX = parse[142].ToInt();
                                floor.mShoreInnerTopLeftSheet = parse[143].ToInt();
                                floor.mShoreInnerTopRightX = parse[144].ToInt();
                                floor.mShoreInnerTopRightSheet = parse[145].ToInt();
                                floor.mShoreInnerBottomRightX = parse[146].ToInt();
                                floor.mShoreInnerBottomRightSheet = parse[147].ToInt();
                                floor.mShoreInnerBottomLeftX = parse[148].ToInt();
                                floor.mShoreInnerBottomLeftSheet = parse[149].ToInt();

                                floor.mShoreInnerTopX = parse[150].ToInt();
                                floor.mShoreInnerTopSheet = parse[151].ToInt();
                                floor.mShoreInnerRightX = parse[152].ToInt();
                                floor.mShoreInnerRightSheet = parse[153].ToInt();
                                floor.mShoreInnerBottomX = parse[154].ToInt();
                                floor.mShoreInnerBottomSheet = parse[155].ToInt();
                                floor.mShoreInnerLeftX = parse[156].ToInt();
                                floor.mShoreInnerLeftSheet = parse[157].ToInt();

                                floor.mShoreSurroundedX = parse[158].ToInt();
                                floor.mShoreSurroundedSheet = parse[159].ToInt();

                                floor.mShoreTopLeftAnimX = parse[160].ToInt();
                                floor.mShoreTopLeftAnimSheet = parse[161].ToInt();
                                floor.mShoreTopRightAnimX = parse[162].ToInt();
                                floor.mShoreTopRightAnimSheet = parse[163].ToInt();
                                floor.mShoreBottomRightAnimX = parse[164].ToInt();
                                floor.mShoreBottomRightAnimSheet = parse[165].ToInt();
                                floor.mShoreBottomLeftAnimX = parse[166].ToInt();
                                floor.mShoreBottomLeftAnimSheet = parse[167].ToInt();
                                floor.mShoreDiagonalForwardAnimX = parse[168].ToInt();
                                floor.mShoreDiagonalForwardAnimSheet = parse[169].ToInt();
                                floor.mShoreDiagonalBackAnimX = parse[170].ToInt();
                                floor.mShoreDiagonalBackAnimSheet = parse[171].ToInt();

                                floor.mShoreTopAnimX = parse[172].ToInt();
                                floor.mShoreTopAnimSheet = parse[173].ToInt();
                                floor.mShoreRightAnimX = parse[174].ToInt();
                                floor.mShoreRightAnimSheet = parse[175].ToInt();
                                floor.mShoreBottomAnimX = parse[176].ToInt();
                                floor.mShoreBottomAnimSheet = parse[177].ToInt();
                                floor.mShoreLeftAnimX = parse[178].ToInt();
                                floor.mShoreLeftAnimSheet = parse[179].ToInt();
                                floor.mShoreVerticalAnimX = parse[180].ToInt();
                                floor.mShoreVerticalAnimSheet = parse[181].ToInt();
                                floor.mShoreHorizontalAnimX = parse[182].ToInt();
                                floor.mShoreHorizontalAnimSheet = parse[183].ToInt();

                                floor.mShoreInnerTopLeftAnimX = parse[184].ToInt();
                                floor.mShoreInnerTopLeftAnimSheet = parse[185].ToInt();
                                floor.mShoreInnerTopRightAnimX = parse[186].ToInt();
                                floor.mShoreInnerTopRightAnimSheet = parse[187].ToInt();
                                floor.mShoreInnerBottomRightAnimX = parse[188].ToInt();
                                floor.mShoreInnerBottomRightAnimSheet = parse[189].ToInt();
                                floor.mShoreInnerBottomLeftAnimX = parse[190].ToInt();
                                floor.mShoreInnerBottomLeftAnimSheet = parse[191].ToInt();

                                floor.mShoreInnerTopAnimX = parse[192].ToInt();
                                floor.mShoreInnerTopAnimSheet = parse[193].ToInt();
                                floor.mShoreInnerRightAnimX = parse[194].ToInt();
                                floor.mShoreInnerRightAnimSheet = parse[195].ToInt();
                                floor.mShoreInnerBottomAnimX = parse[196].ToInt();
                                floor.mShoreInnerBottomAnimSheet = parse[197].ToInt();
                                floor.mShoreInnerLeftAnimX = parse[198].ToInt();
                                floor.mShoreInnerLeftAnimSheet = parse[199].ToInt();

                                floor.mShoreSurroundedAnimX = parse[200].ToInt();
                                floor.mShoreSurroundedAnimSheet = parse[201].ToInt();

                                #endregion
                                #endregion

                                floor.GroundTile.Type = (Enums.TileType)parse[202].ToInt();
                                floor.GroundTile.Data1 = parse[203].ToInt();
                                floor.GroundTile.Data2 = parse[204].ToInt();
                                floor.GroundTile.Data3 = parse[205].ToInt();
                                floor.GroundTile.String1 = parse[206];
                                floor.GroundTile.String2 = parse[207];
                                floor.GroundTile.String3 = parse[208];

                                floor.HallTile.Type = (Enums.TileType)parse[209].ToInt();
                                floor.HallTile.Data1 = parse[210].ToInt();
                                floor.HallTile.Data2 = parse[211].ToInt();
                                floor.HallTile.Data3 = parse[212].ToInt();
                                floor.HallTile.String1 = parse[213];
                                floor.HallTile.String2 = parse[214];
                                floor.HallTile.String3 = parse[215];

                                floor.WaterTile.Type = (Enums.TileType)parse[216].ToInt();
                                floor.WaterTile.Data1 = parse[217].ToInt();
                                floor.WaterTile.Data2 = parse[218].ToInt();
                                floor.WaterTile.Data3 = parse[219].ToInt();
                                floor.WaterTile.String1 = parse[220];
                                floor.WaterTile.String2 = parse[221];
                                floor.WaterTile.String3 = parse[222];

                                floor.WallTile.Type = (Enums.TileType)parse[223].ToInt();
                                floor.WallTile.Data1 = parse[224].ToInt();
                                floor.WallTile.Data2 = parse[225].ToInt();
                                floor.WallTile.Data3 = parse[226].ToInt();
                                floor.WallTile.String1 = parse[227];
                                floor.WallTile.String2 = parse[228];
                                floor.WallTile.String3 = parse[229];

                                floor.NpcSpawnTime = parse[230].ToInt();
                                floor.NpcMin = parse[231].ToInt();
                                floor.NpcMax = parse[232].ToInt();

                                int maxItems = parse[233].ToInt();
                                int maxNpcs = parse[234].ToInt();
                                int maxSpecialTiles = parse[235].ToInt();
                                int maxWeather = parse[236].ToInt();

                                int n = 237;

                                RDungeonItem item;
                                RDungeonNpc npc;
                                Tile specialTile;

                                for (int i = 0; i < maxItems; i++) {
                                        item = new RDungeonItem();
                                    item.ItemNum = parse[n].ToInt();
                                    item.MinAmount = parse[n+1].ToInt();
                                    item.MaxAmount = parse[n+2].ToInt();
                                    item.AppearanceRate = parse[n+3].ToInt();
                                    item.StickyRate = parse[n+4].ToInt();
                                    item.Tag = parse[n+5];
                                    item.Hidden = parse[n+6].ToBool();
                                    item.OnGround = parse[n+7].ToBool();
                                    item.OnWater = parse[n+8].ToBool();
                                    item.OnWall = parse[n+9].ToBool();
                                    floor.Items.Add(item);
                                    n += 10;
                                }

                                for (int i = 0; i < maxNpcs; i++) {
                                        npc = new RDungeonNpc();
                                    npc.NpcNum = parse[n].ToInt();
                                    npc.MinLevel = parse[n + 1].ToInt();
                                    npc.MaxLevel = parse[n + 2].ToInt();
                                    npc.AppearanceRate = parse[n + 3].ToInt();
                                    floor.Npcs.Add(npc);
                                    n+= 4;
                                }

                                for (int i = 0; i < maxSpecialTiles; i++) {
                                        specialTile = new Tile(new DataManager.Maps.Tile());
                                        specialTile.Type = (Enums.TileType)parse[n].ToInt();
                                        specialTile.Data1 = parse[n + 1].ToInt();
                                        specialTile.Data2 = parse[n + 2].ToInt();
                                        specialTile.Data3 = parse[n + 3].ToInt();
                                        specialTile.String1 = parse[n + 4];
                                        specialTile.String2 = parse[n + 5];
                                        specialTile.String3 = parse[n + 6];
                                        specialTile.Ground = parse[n + 7].ToInt();
                                        specialTile.GroundSet = parse[n + 8].ToInt();
                                        //specialTile.GroundAnim = parse[n + 9].ToInt();
                                        //specialTile.GroundAnimSet = parse[n + 10].ToInt();
                                        specialTile.Mask = parse[n + 11].ToInt();
                                        specialTile.MaskSet = parse[n + 12].ToInt();
                                        specialTile.Anim	 = parse[n + 13].ToInt();
                                        specialTile.AnimSet = parse[n + 14].ToInt();
                                        specialTile.Mask2 = parse[n + 15].ToInt();
                                        specialTile.Mask2Set = parse[n + 16].ToInt();
                                        specialTile.M2Anim = parse[n + 17].ToInt();
                                        specialTile.M2AnimSet = parse[n + 18].ToInt();
                                        specialTile.Fringe = parse[n + 19].ToInt();
                                        specialTile.FringeSet = parse[n + 20].ToInt();
                                        specialTile.FAnim = parse[n + 21].ToInt();
                                        specialTile.FAnimSet = parse[n + 22].ToInt();
                                        specialTile.Fringe2 = parse[n + 23].ToInt();
                                        specialTile.Fringe2Set = parse[n + 24].ToInt();
                                        specialTile.F2Anim = parse[n + 25].ToInt();
                                        specialTile.F2AnimSet = parse[n + 26].ToInt();
                                        specialTile.RDungeonMapValue = parse[n + 27].ToInt();
                                        floor.SpecialTiles.Add(specialTile);
                                    n+= 28;
                                }

                                for (int i = 0; i < maxWeather; i++) {
                                    floor.Weather.Add((Enums.Weather)parse[n].ToInt());
                                    n++;
                                }
                                dungeon.Floors.Add(floor);
                            }
                            break;

                    }
                }
            }
            return dungeon;
        }
Пример #4
0
 public static void CloneTile(IMap map, int x, int y, Tile tile)
 {
     tile.Ground = map.Tile[x, y].Ground;
     tile.GroundAnim = map.Tile[x, y].GroundAnim;
     tile.Mask = map.Tile[x, y].Mask;
     tile.Anim = map.Tile[x, y].Anim;
     tile.Mask2 = map.Tile[x, y].Mask2;
     tile.M2Anim = map.Tile[x, y].M2Anim;
     tile.Fringe = map.Tile[x, y].Fringe;
     tile.FAnim = map.Tile[x, y].FAnim;
     tile.Fringe2 = map.Tile[x, y].Fringe2;
     tile.F2Anim = map.Tile[x, y].F2Anim;
     tile.Type = map.Tile[x, y].Type;
     tile.Data1 = map.Tile[x, y].Data1;
     tile.Data2 = map.Tile[x, y].Data2;
     tile.Data3 = map.Tile[x, y].Data3;
     tile.String1 = map.Tile[x, y].String1;
     tile.String2 = map.Tile[x, y].String2;
     tile.String3 = map.Tile[x, y].String3;
     tile.RDungeonMapValue = map.Tile[x, y].RDungeonMapValue;
     tile.GroundSet = map.Tile[x, y].GroundSet;
     tile.GroundAnimSet = map.Tile[x, y].GroundAnimSet;
     tile.MaskSet = map.Tile[x, y].MaskSet;
     tile.AnimSet = map.Tile[x, y].AnimSet;
     tile.Mask2Set = map.Tile[x, y].Mask2Set;
     tile.M2AnimSet = map.Tile[x, y].M2AnimSet;
     tile.FringeSet = map.Tile[x, y].FringeSet;
     tile.FAnimSet = map.Tile[x, y].FAnimSet;
     tile.Fringe2Set = map.Tile[x, y].Fringe2Set;
     tile.F2AnimSet = map.Tile[x, y].F2AnimSet;
 }
Пример #5
0
        public static void ConvertV2ToV3(int num)
        {
            DataConverter.RDungeons.V3.RDungeon rdungeonV3 = new Server.DataConverter.RDungeons.V3.RDungeon(num);

              DataConverter.RDungeons.V2.RDungeon rdungeonV2 = Server.DataConverter.RDungeons.V2.RDungeonManager.LoadRDungeon(num);

              rdungeonV3.DungeonName = rdungeonV2.DungeonName;
            rdungeonV3.Direction = rdungeonV2.Direction;
            rdungeonV3.MaxFloors = rdungeonV2.MaxFloors;
            rdungeonV3.Recruitment = rdungeonV2.Recruitment;
            rdungeonV3.Exp = rdungeonV2.Exp;
            rdungeonV3.WindTimer = 1000;

            for (int i = 0; i < rdungeonV2.Floors.Count; i++) {
            DataConverter.RDungeons.V3.RDungeonFloor floor = new DataConverter.RDungeons.V3.RDungeonFloor();

            floor.Options.TrapMin = rdungeonV2.Floors[i].Options.TrapMin;
            floor.Options.TrapMax = rdungeonV2.Floors[i].Options.TrapMax;
            floor.Options.ItemMin = 5;
            floor.Options.ItemMax = 8;
            floor.Options.RoomWidthMin = rdungeonV2.Floors[i].Options.RoomWidthMin;
            floor.Options.RoomWidthMax = rdungeonV2.Floors[i].Options.RoomWidthMax;
            floor.Options.RoomLengthMin = rdungeonV2.Floors[i].Options.RoomLengthMin;
            floor.Options.RoomLengthMax = rdungeonV2.Floors[i].Options.RoomLengthMax;
            floor.Options.HallTurnMin = rdungeonV2.Floors[i].Options.HallTurnMin;
            floor.Options.HallTurnMax = rdungeonV2.Floors[i].Options.HallTurnMax;
            floor.Options.HallVarMin = rdungeonV2.Floors[i].Options.HallVarMin;
            floor.Options.HallVarMax = rdungeonV2.Floors[i].Options.HallVarMax;
            floor.Options.WaterFrequency = rdungeonV2.Floors[i].Options.WaterFrequency;
            floor.Options.Craters = rdungeonV2.Floors[i].Options.Craters;
            floor.Options.CraterMinLength = rdungeonV2.Floors[i].Options.CraterMinLength;
            floor.Options.CraterMaxLength = rdungeonV2.Floors[i].Options.CraterMaxLength;
            floor.Options.CraterFuzzy = rdungeonV2.Floors[i].Options.CraterFuzzy;

            floor.Darkness = -1;
            floor.GoalType = rdungeonV2.Floors[i].GoalType;
            floor.GoalMap = rdungeonV2.Floors[i].GoalMap;
            floor.GoalX = rdungeonV2.Floors[i].GoalX;
            floor.GoalY = rdungeonV2.Floors[i].GoalY;
            floor.Music = rdungeonV2.Floors[i].Music;

            floor.StairsX = rdungeonV2.Floors[i].StairsX;
            floor.StairsSheet = rdungeonV2.Floors[i].StairsSheet;

            floor.mGroundX = rdungeonV2.Floors[i].mGroundX;
            floor.mGroundSheet = rdungeonV2.Floors[i].mGroundSheet;

            floor.mTopLeftX = rdungeonV2.Floors[i].mTopLeftX;
            floor.mTopLeftSheet = rdungeonV2.Floors[i].mTopLeftSheet;
            floor.mTopCenterX = rdungeonV2.Floors[i].mTopCenterX;
            floor.mTopCenterSheet = rdungeonV2.Floors[i].mTopCenterSheet;
            floor.mTopRightX = rdungeonV2.Floors[i].mTopRightX;
            floor.mTopRightSheet = rdungeonV2.Floors[i].mTopRightSheet;

            floor.mCenterLeftX = rdungeonV2.Floors[i].mCenterLeftX;
            floor.mCenterLeftSheet = rdungeonV2.Floors[i].mCenterLeftSheet;
            floor.mCenterCenterX = rdungeonV2.Floors[i].mCenterCenterX;
            floor.mCenterCenterSheet = rdungeonV2.Floors[i].mCenterCenterSheet;
            floor.mCenterRightX = rdungeonV2.Floors[i].mCenterRightX;
            floor.mCenterRightSheet = rdungeonV2.Floors[i].mCenterRightSheet;

            floor.mBottomLeftX = rdungeonV2.Floors[i].mBottomLeftX;
            floor.mBottomLeftSheet = rdungeonV2.Floors[i].mBottomLeftSheet;
            floor.mBottomCenterX = rdungeonV2.Floors[i].mBottomCenterX;
            floor.mBottomCenterSheet = rdungeonV2.Floors[i].mBottomCenterSheet;
            floor.mBottomRightX = rdungeonV2.Floors[i].mBottomRightX;
            floor.mBottomRightSheet = rdungeonV2.Floors[i].mBottomRightSheet;

            floor.mInnerTopLeftX = rdungeonV2.Floors[i].mInnerTopLeftX;
            floor.mInnerTopLeftSheet = rdungeonV2.Floors[i].mInnerTopLeftSheet;
            floor.mInnerBottomLeftX = rdungeonV2.Floors[i].mInnerBottomLeftX;
            floor.mInnerBottomLeftSheet = rdungeonV2.Floors[i].mInnerBottomLeftSheet;
            floor.mInnerTopRightX = rdungeonV2.Floors[i].mInnerTopRightX;
            floor.mInnerTopRightSheet = rdungeonV2.Floors[i].mInnerTopRightSheet;
            floor.mInnerBottomRightX = rdungeonV2.Floors[i].mInnerBottomRightX;
            floor.mInnerBottomRightSheet = rdungeonV2.Floors[i].mInnerBottomRightSheet;

            floor.mIsolatedWallX = rdungeonV2.Floors[i].mIsolatedWallX;
            floor.mIsolatedWallSheet = rdungeonV2.Floors[i].mIsolatedWallSheet;

            floor.mColumnTopX = rdungeonV2.Floors[i].mColumnTopX;
            floor.mColumnTopSheet = rdungeonV2.Floors[i].mColumnTopSheet;
            floor.mColumnCenterX = rdungeonV2.Floors[i].mColumnCenterX;
            floor.mColumnCenterSheet = rdungeonV2.Floors[i].mColumnCenterSheet;
            floor.mColumnBottomX = rdungeonV2.Floors[i].mColumnBottomX;
            floor.mColumnBottomSheet = rdungeonV2.Floors[i].mColumnBottomSheet;

            floor.mRowLeftX = rdungeonV2.Floors[i].mRowLeftX;
            floor.mRowLeftSheet = rdungeonV2.Floors[i].mRowLeftSheet;
            floor.mRowCenterX = rdungeonV2.Floors[i].mRowCenterX;
            floor.mRowCenterSheet = rdungeonV2.Floors[i].mRowCenterSheet;
            floor.mRowRightX = rdungeonV2.Floors[i].mRowRightX;
            floor.mRowRightSheet = rdungeonV2.Floors[i].mRowRightSheet;

            floor.mWaterX = rdungeonV2.Floors[i].mWaterX;
            floor.mWaterSheet = rdungeonV2.Floors[i].mWaterSheet;
            floor.mWaterAnimX = rdungeonV2.Floors[i].mWaterAnimX;
            floor.mWaterAnimSheet = rdungeonV2.Floors[i].mWaterAnimSheet;

            floor.mShoreTopLeftX = rdungeonV2.Floors[i].mShoreTopLeftX;
            floor.mShoreTopLeftSheet = rdungeonV2.Floors[i].mShoreTopLeftSheet;
            floor.mShoreTopRightX = rdungeonV2.Floors[i].mShoreTopRightX;
            floor.mShoreTopRightSheet = rdungeonV2.Floors[i].mShoreTopRightSheet;
            floor.mShoreBottomRightX = rdungeonV2.Floors[i].mShoreBottomRightX;
            floor.mShoreBottomRightSheet = rdungeonV2.Floors[i].mShoreBottomRightSheet;
            floor.mShoreBottomLeftX = rdungeonV2.Floors[i].mShoreBottomLeftX;
            floor.mShoreBottomLeftSheet = rdungeonV2.Floors[i].mShoreBottomLeftSheet;
            floor.mShoreDiagonalForwardX = rdungeonV2.Floors[i].mShoreDiagonalForwardX;
            floor.mShoreDiagonalForwardSheet = rdungeonV2.Floors[i].mShoreDiagonalForwardSheet;
            floor.mShoreDiagonalBackX = rdungeonV2.Floors[i].mShoreDiagonalBackX;
            floor.mShoreDiagonalBackSheet = rdungeonV2.Floors[i].mShoreDiagonalBackSheet;
            floor.mShoreTopX = rdungeonV2.Floors[i].mShoreTopX;
            floor.mShoreTopSheet = rdungeonV2.Floors[i].mShoreTopSheet;
            floor.mShoreRightX = rdungeonV2.Floors[i].mShoreRightX;
            floor.mShoreRightSheet = rdungeonV2.Floors[i].mShoreRightSheet;
            floor.mShoreBottomX = rdungeonV2.Floors[i].mShoreBottomX;
            floor.mShoreBottomSheet = rdungeonV2.Floors[i].mShoreBottomSheet;
            floor.mShoreLeftX = rdungeonV2.Floors[i].mShoreLeftX;
            floor.mShoreLeftSheet = rdungeonV2.Floors[i].mShoreLeftSheet;
            floor.mShoreVerticalX = rdungeonV2.Floors[i].mShoreVerticalX;
            floor.mShoreVerticalSheet = rdungeonV2.Floors[i].mShoreVerticalSheet;
            floor.mShoreHorizontalX = rdungeonV2.Floors[i].mShoreHorizontalX;
            floor.mShoreHorizontalSheet = rdungeonV2.Floors[i].mShoreHorizontalSheet;
            floor.mShoreInnerTopLeftX = rdungeonV2.Floors[i].mShoreInnerTopLeftX;
            floor.mShoreInnerTopLeftSheet = rdungeonV2.Floors[i].mShoreInnerTopLeftSheet;
            floor.mShoreInnerTopRightX = rdungeonV2.Floors[i].mShoreInnerTopRightX;
            floor.mShoreInnerTopRightSheet = rdungeonV2.Floors[i].mShoreInnerTopRightSheet;
            floor.mShoreInnerBottomRightX = rdungeonV2.Floors[i].mShoreInnerBottomRightX;
            floor.mShoreInnerBottomRightSheet = rdungeonV2.Floors[i].mShoreInnerBottomRightSheet;
            floor.mShoreInnerBottomLeftX = rdungeonV2.Floors[i].mShoreInnerBottomLeftX;
            floor.mShoreInnerBottomLeftSheet = rdungeonV2.Floors[i].mShoreInnerBottomLeftSheet;
            floor.mShoreInnerTopX = rdungeonV2.Floors[i].mShoreInnerTopX;
            floor.mShoreInnerTopSheet = rdungeonV2.Floors[i].mShoreInnerTopSheet;
            floor.mShoreInnerRightX = rdungeonV2.Floors[i].mShoreInnerRightX;
            floor.mShoreInnerRightSheet = rdungeonV2.Floors[i].mShoreInnerRightSheet;
            floor.mShoreInnerBottomX = rdungeonV2.Floors[i].mShoreInnerBottomX;
            floor.mShoreInnerBottomSheet = rdungeonV2.Floors[i].mShoreInnerBottomSheet;
            floor.mShoreInnerLeftX = rdungeonV2.Floors[i].mShoreInnerLeftX;
            floor.mShoreInnerLeftSheet = rdungeonV2.Floors[i].mShoreInnerLeftSheet;
            floor.mShoreSurroundedX = rdungeonV2.Floors[i].mShoreSurroundedX;
            floor.mShoreSurroundedSheet = rdungeonV2.Floors[i].mShoreSurroundedSheet;

            floor.GroundTile.Type = Enums.TileType.Walkable;
            floor.HallTile.Type = Enums.TileType.Hallway;
            floor.WaterTile.Type = Enums.TileType.MobileBlock;
            floor.WaterTile.Data1 = 2;
            floor.WallTile.Type = Enums.TileType.MobileBlock;
            floor.WallTile.Data1 = 16;

            floor.NpcSpawnTime = 10;
            floor.NpcMin = 5;
            floor.NpcMax = 8;

            RDungeonItem item;
            RDungeonNpc npc;
            Tile specialTile;

            for (int j = 0; j < 16; j++) {
            if (rdungeonV2.Floors[i].Items[j] > 0) {
                item = new RDungeonItem();
                item.ItemNum = rdungeonV2.Floors[i].Items[j];
                item.MaxAmount = rdungeonV2.Floors[i].ItemSpawnRate;
                item.OnGround = true;
                item.AppearanceRate = 100;
                floor.Items.Add(item);
            }

            }
            for (int j = 0; j < 15; j++) {
            if (rdungeonV2.Floors[i].Npc[j].NpcNum > 0) {
                npc = new RDungeonNpc();
                npc.NpcNum = rdungeonV2.Floors[i].Npc[j].NpcNum;
                npc.MinLevel = rdungeonV2.Floors[i].Npc[j].MinLevel;
                npc.MaxLevel = rdungeonV2.Floors[i].Npc[j].MinLevel;
                npc.AppearanceRate = 100;
                floor.Npcs.Add(npc);
            }

            }
            foreach (int j in rdungeonV2.Floors[i].Traps) {
            specialTile = new Tile(new DataManager.Maps.Tile());
            specialTile.Type = Enums.TileType.Scripted;
            specialTile.Ground = rdungeonV2.Floors[i].mGroundX;
            specialTile.GroundSet = rdungeonV2.Floors[i].mGroundSheet;
            specialTile.Data1 = TrapNumToScript(j);
            floor.SpecialTiles.Add(specialTile);
            }

            foreach (Enums.Weather j in rdungeonV2.Floors[i].Weather) {
            floor.Weather.Add(j);
            }

            rdungeonV3.Floors.Add(floor);
            }

              Server.DataConverter.RDungeons.V3.RDungeonManager.SaveRDungeon(rdungeonV3,num);
        }