コード例 #1
0
        public override bool Equals(object obj)
        {
            if (!(obj is MapNpcSettings))
            {
                return(false);
            }
            MapNpcSettings npc = obj as MapNpcSettings;

            if (NpcNum != npc.NpcNum)
            {
                return(false);
            }
            if (SpawnX != npc.SpawnX)
            {
                return(false);
            }
            if (SpawnY != npc.SpawnY)
            {
                return(false);
            }
            if (MinLevel != npc.MinLevel)
            {
                return(false);
            }
            if (MaxLevel != npc.MaxLevel)
            {
                return(false);
            }
            if (AppearanceRate != npc.AppearanceRate)
            {
                return(false);
            }
            if (StartStatus != npc.StartStatus)
            {
                return(false);
            }
            if (StartStatusCounter != npc.StartStatusCounter)
            {
                return(false);
            }
            if (StartStatusChance != npc.StartStatusChance)
            {
                return(false);
            }
            return(true);
        }
コード例 #2
0
        public winProperties()
            : base("winProperties")
        {
            this.Windowed = true;
            this.ShowInWindowSwitcher = false;
            this.TitleBar.Text = "Map Properties";
            this.TitleBar.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 12);
            this.TitleBar.CloseButton.Visible = true;
            this.AlwaysOnTop = true;
            this.BackColor = Color.White;
            //this.BorderStyle = SdlDotNet.Widgets.BorderStyle.FixedSingle;
            //this.BorderWidth = 1;
            //this.BorderColor = Color.Black;
            this.Size = new Size(500, 500);
            this.Location = DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size);

            properties = Maps.MapHelper.ActiveMap.ExportToPropertiesClass();

            pnlGeneral = new Panel("pnlGeneral");
            pnlGeneral.Size = this.Size;
            pnlGeneral.Location = new Point(0, 34);
            pnlGeneral.BackColor = Color.White;
            pnlGeneral.Visible = true;

            btnGeneral = new Button("btnGeneral");
            btnGeneral.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            btnGeneral.Size = new System.Drawing.Size(134, 32);
            btnGeneral.Location = new Point(49, 0);
            btnGeneral.Text = "General Options";
            btnGeneral.Selected = true;
            Skins.SkinManager.LoadButtonGui(btnGeneral);
            btnGeneral.Click += new EventHandler<MouseButtonEventArgs>(btnGeneral_Click);

            pnlNPC = new Panel("pnlNPC");
            pnlNPC.Size = this.Size;
            pnlNPC.Location = new Point(0, 34);
            pnlNPC.BackColor = Color.White;
            pnlNPC.Visible = false;

            btnNPC = new Button("btnNPC");
            btnNPC.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            btnNPC.Size = new System.Drawing.Size(134, 32);
            btnNPC.Location = new Point(183, 0);
            btnNPC.Text = "NPC";
            btnNPC.Selected = false;
            Skins.SkinManager.LoadButtonGui(btnNPC);
            btnNPC.Click += new EventHandler<MouseButtonEventArgs>(btnNPC_Click);

            pnlScroll = new Panel("pnlScroll");
            pnlScroll.Size = this.Size;
            pnlScroll.Location = new Point(0, 34);
            pnlScroll.BackColor = Color.White;
            pnlScroll.Visible = false;

            btnScroll = new Button("btnScroll");
            btnScroll.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            btnScroll.Size = new System.Drawing.Size(134, 32);
            btnScroll.Location = new Point(317, 0);
            btnScroll.Text = "Scroll";
            btnScroll.Selected = false;
            Skins.SkinManager.LoadButtonGui(btnScroll);
            btnScroll.Click += new EventHandler<MouseButtonEventArgs>(btnScroll_Click);

            #region General
            txtMapName = new TextBox("txtMapName");
            txtMapName.Size = new System.Drawing.Size(300, 18);
            txtMapName.Location = new Point(100, 10);
            txtMapName.Text = properties.Name;

            lblMapName = new Label("lblMapName");
            lblMapName.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            lblMapName.AutoSize = true;
            lblMapName.Location = new Point(20, 10);
            lblMapName.Text = "Map Name: ";

            lblMapSwitchover = new Label("lblMapSwitchover");
            lblMapSwitchover.Font = Logic.Graphics.FontManager.LoadFont("PMU", 22);
            lblMapSwitchover.AutoSize = true;
            lblMapSwitchover.Location = new Point(20, 40);
            lblMapSwitchover.Text = "Map Switchover";

            lblNorth = new Label("lblNorth");
            lblNorth.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            lblNorth.AutoSize = true;
            lblNorth.Location = new Point(20, 65);
            lblNorth.Text = "North: ";

            txtNorth = new TextBox("txtNorth");
            txtNorth.Size = new System.Drawing.Size(50, 18);
            txtNorth.Location = new Point(100, 65);
            txtNorth.Text = properties.Up.ToString();

            lblSouth = new Label("lblSouth");
            lblSouth.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            lblSouth.AutoSize = true;
            lblSouth.Location = new Point(20, 85);
            lblSouth.Text = "South: ";

            txtSouth = new TextBox("txtSouth");
            txtSouth.Size = new System.Drawing.Size(50, 18);
            txtSouth.Location = new Point(100, 85);
            txtSouth.Text = properties.Down.ToString();

            lblEast = new Label("lblEast");
            lblEast.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            lblEast.AutoSize = true;
            lblEast.Location = new Point(20, 105);
            lblEast.Text = "East: ";

            txtEast = new TextBox("txtEast");
            txtEast.Size = new System.Drawing.Size(50, 18);
            txtEast.Location = new Point(100, 105);
            txtEast.Text = properties.Right.ToString();

            lblWest = new Label("lblWest");
            lblWest.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            lblWest.AutoSize = true;
            lblWest.Location = new Point(20, 125);
            lblWest.Text = "West: ";

            txtWest = new TextBox("txtWest");
            txtWest.Size = new System.Drawing.Size(50, 18);
            txtWest.Location = new Point(100, 125);
            txtWest.Text = properties.Left.ToString();

            chkIndoors = new CheckBox("chkIndoors");
            chkIndoors.Text = "Indoors";
            chkIndoors.Size = new System.Drawing.Size(100, 16);
            chkIndoors.Location = new Point(10, 155);
            chkIndoors.BackColor = Color.Transparent;
            chkIndoors.Checked = properties.Indoors;

            chkHunger = new CheckBox("chkHunger");
            chkHunger.Location = new Point(100, 155);
            chkHunger.Size = new System.Drawing.Size(100, 16);
            chkHunger.Text = "Hunger";
            chkHunger.BackColor = Color.Transparent;
            chkHunger.Checked = properties.Belly;

            chkRecruit = new CheckBox("chkRecruit");
            chkRecruit.Location = new Point(190, 155);
            chkRecruit.Size = new System.Drawing.Size(100, 16);
            chkRecruit.Text = "Recruit";
            chkRecruit.BackColor = Color.Transparent;
            chkRecruit.Checked = properties.Recruit;

            chkExp = new CheckBox("chkExp");
            chkExp.Location = new Point(280, 155);
            chkExp.Size = new System.Drawing.Size(100, 16);
            chkExp.Text = "Exp";
            chkExp.BackColor = Color.Transparent;
            chkExp.Checked = properties.Exp;

            chkInstanced = new CheckBox("chkInstanced");
            chkInstanced.Location = new Point(370, 155);
            chkInstanced.Size = new System.Drawing.Size(100, 16);
            chkInstanced.Text = "Instanced";
            chkInstanced.BackColor = Color.Transparent;
            chkInstanced.Checked = properties.Instanced;

            lblGlobal = new Label("lblGlobal");
            lblGlobal.Font = Logic.Graphics.FontManager.LoadFont("PMU", 22);
            lblGlobal.AutoSize = true;
            lblGlobal.Location = new Point(260, 40);
            lblGlobal.Text = "Global Options";

            lblMapMorality = new Label("lblMapMorality");
            lblMapMorality.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            lblMapMorality.AutoSize = true;
            lblMapMorality.Location = new Point(240, 65);
            lblMapMorality.Text = "Moral: ";

            cmbMapMorality = new ComboBox("cmbMapMorality");
            //cmbMapMorality.Font = Graphics.FontManager.LoadFont("PMU", 18);
            cmbMapMorality.Size = new System.Drawing.Size(150, 18);
            cmbMapMorality.Location = new Point(300, 65);
            //cmbMapMorality.Text = "Map Morality";
            cmbMapMorality.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("PMU", 18), "None"));
            cmbMapMorality.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("PMU", 18), "Safe Zone"));
            cmbMapMorality.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("PMU", 18), "No Death Penalty"));
            cmbMapMorality.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("PMU", 18), "House"));
            cmbMapMorality.SelectItem((int)properties.Moral);

            lblMapWeather = new Label("lblMapWeather");
            lblMapWeather.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            lblMapWeather.AutoSize = true;
            lblMapWeather.Location = new Point(240, 85);
            lblMapWeather.Text = "Weather: ";

            cmbMapWeather = new ComboBox("cmbMapWeather");
            cmbMapWeather.Size = new System.Drawing.Size(150, 18);
            cmbMapWeather.Location = new Point(300, 85);
            cmbMapWeather.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("PMU", 18), "Ambiguous"));
            cmbMapWeather.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("PMU", 18), "None"));
            cmbMapWeather.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("PMU", 18), "Raining"));
            cmbMapWeather.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("PMU", 18), "Snowing"));
            cmbMapWeather.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("PMU", 18), "Thunder"));
            cmbMapWeather.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("PMU", 18), "Hail"));
            cmbMapWeather.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("PMU", 18), "Diamond Dust"));
            cmbMapWeather.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("PMU", 18), "Cloudy"));
            cmbMapWeather.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("PMU", 18), "Fog"));
            cmbMapWeather.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("PMU", 18), "Sunny"));
            cmbMapWeather.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("PMU", 18), "Sandstorm"));
            cmbMapWeather.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("PMU", 18), "Snowstorm"));
            cmbMapWeather.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("PMU", 18), "Ashfall"));
            cmbMapWeather.SelectItem((int)properties.Weather);

            lblMapDarkness = new Label("lblMapDarkness");
            lblMapDarkness.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            lblMapDarkness.AutoSize = true;
            lblMapDarkness.Location = new Point(240, 105);
            lblMapDarkness.Text = "Darkness: ";

            nudDarkness = new NumericUpDown("nudDarkness");
            nudDarkness.Size = new System.Drawing.Size(150, 18);
            nudDarkness.Location = new Point(300, 105);
            nudDarkness.Minimum = -1;
            nudDarkness.Maximum = 30;
            nudDarkness.Value = properties.Darkness;

            lblMapTimeLimit = new Label("lblMapTimeLimit");
            lblMapTimeLimit.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            lblMapTimeLimit.AutoSize = true;
            lblMapTimeLimit.Location = new Point(240, 125);
            lblMapTimeLimit.Text = "Time: ";

            nudTimeLimit = new NumericUpDown("nudTimeLimit");
            nudTimeLimit.Size = new System.Drawing.Size(150, 18);
            nudTimeLimit.Location = new Point(300, 125);
            nudTimeLimit.Minimum = -1;
            nudTimeLimit.Maximum = Int32.MaxValue;
            nudTimeLimit.Value = properties.TimeLimit;

            lblMusic = new Label("lblMusic");
            lblMusic.Font = Logic.Graphics.FontManager.LoadFont("PMU", 22);
            lblMusic.AutoSize = true;
            lblMusic.Location = new Point(20, 170);
            lblMusic.Text = "Music";

            cmbMusic = new ComboBox("cmbMusic");
            cmbMusic.Size = new System.Drawing.Size(375, 30);
            cmbMusic.Location = new Point(25, 200);

            btnPlay = new Button("btnPlay");
            btnPlay.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            btnPlay.Size = new System.Drawing.Size(75, 30);
            btnPlay.Location = new Point(410, 200);
            Skins.SkinManager.LoadButtonGui(btnPlay);
            btnPlay.Text = "Play";
            btnPlay.Click += new EventHandler<MouseButtonEventArgs>(btnPlay_Click);

            btnStop = new Button("btnStop");
            btnStop.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            btnStop.Size = new System.Drawing.Size(75, 30);
            btnStop.Location = new Point(410, 230);
            Skins.SkinManager.LoadButtonGui(btnStop);
            btnStop.Text = "Stop";
            btnStop.Click += new EventHandler<MouseButtonEventArgs>(btnStop_Click);

            btnOk = new Button("btnOk");
            btnOk.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            btnOk.Size = new System.Drawing.Size(75, 30);
            btnOk.Location = new Point(0, 365);
            Skins.SkinManager.LoadButtonGui(btnOk);
            btnOk.Text = "Ok";
            btnOk.Click += new EventHandler<MouseButtonEventArgs>(btnOk_Click);

            btnCancel = new Button("btnCancel");
            btnCancel.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            btnCancel.Size = new System.Drawing.Size(75, 30);
            btnCancel.Location = new Point(0, 395);
            Skins.SkinManager.LoadButtonGui(btnCancel);
            btnCancel.Text = "Cancel";
            btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click);

            #endregion

            #region NPC

            //lblNpcSelector = new Label("lblNpcSelector");
            //lblNpcSelector.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            //lblNpcSelector.AutoSize = true;
            //lblNpcSelector.Location = new Point(5, 10);
            //lblNpcSelector.Text = "Select an NPC to edit:";

            //cmbNpcSelector = new ComboBox("cmbNpcSelector");
            //cmbNpcSelector.Size = new System.Drawing.Size(150, 22);
            //cmbNpcSelector.Location = new Point(lblNpcSelector.X + lblNpcSelector.Width + 5, lblNpcSelector.Y);
            //for (int i = 0; i < MaxInfo.MAX_MAP_NPCS; i++) {
            //    cmbNpcSelector.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("PMU", 18), "NPC " + (i + 1)));
            //}
            //cmbNpcSelector.ItemSelected += new EventHandler(cmbNpcSelector_ItemSelected);

            //lblNpcNum = new Label("lblNpcNum");
            //lblNpcNum.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            //lblNpcNum.AutoSize = true;
            //lblNpcNum.Location = new Point(lblNpcSelector.X, lblNpcSelector.Y + lblNpcSelector.Height + 10);
            //lblNpcNum.Text = "NPC Number:";

            //nudNpcNum = new NumericUpDown("nudNpcNum");
            //nudNpcNum.Size = new System.Drawing.Size(100, 18);
            //nudNpcNum.Location = new Point(lblNpcNum.X + lblNpcNum.Width + 5, lblNpcNum.Y);
            //nudNpcNum.Maximum = MaxInfo.MaxNpcs;
            //nudNpcNum.Minimum = 0;
            //nudNpcNum.ValueChanged += new EventHandler<ValueChangedEventArgs>(nudNpcNum_ValueChanged);

            //lblNpcNumInfo = new Label("lblNpcNumInfo");
            //lblNpcNumInfo.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            //lblNpcNumInfo.AutoSize = true;
            //lblNpcNumInfo.Location = new Point(nudNpcNum.X + nudNpcNum.Width + 5, nudNpcNum.Y);

            //lblNpcSpawnX = new Label("lblNpcSpawnX");
            //lblNpcSpawnX.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            //lblNpcSpawnX.AutoSize = true;
            //lblNpcSpawnX.Location = new Point(lblNpcNum.X, lblNpcNum.Y + lblNpcNum.Height + 5);
            //lblNpcSpawnX.Text = "Spawn X:";

            //nudNpcSpawnX = new NumericUpDown("nudNpcSpawnX");
            //nudNpcSpawnX.Size = new System.Drawing.Size(100, 20);
            //nudNpcSpawnX.Location = new Point(lblNpcSpawnX.X + lblNpcSpawnX.Width + 5, lblNpcSpawnX.Y);
            //nudNpcSpawnX.Maximum = properties.MaxX;
            //nudNpcSpawnX.Minimum = 0;

            //lblNpcSpawnY = new Label("lblNpcSpawnY");
            //lblNpcSpawnY.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            //lblNpcSpawnY.AutoSize = true;
            //lblNpcSpawnY.Location = new Point(nudNpcSpawnX.X + nudNpcSpawnX.Width + 5, nudNpcSpawnX.Y);
            //lblNpcSpawnY.Text = "Spawn Y:";

            //nudNpcSpawnY = new NumericUpDown("nudNpcSpawnY");
            //nudNpcSpawnY.Size = new System.Drawing.Size(100, 20);
            //nudNpcSpawnY.Location = new Point(lblNpcSpawnY.X + lblNpcSpawnY.Width + 5, lblNpcSpawnY.Y);
            //nudNpcSpawnY.Maximum = properties.MaxY;
            //nudNpcSpawnY.Minimum = 0;

            //lblNpcLevel = new Label("lblNpcLevel");
            //lblNpcLevel.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            //lblNpcLevel.AutoSize = true;
            //lblNpcLevel.Location = new Point(lblNpcSpawnX.X, lblNpcSpawnX.Y + lblNpcSpawnX.Height + 5);
            //lblNpcLevel.Text = "Level:";

            //nudNpcLevel = new NumericUpDown("nudNpcLevel");
            //nudNpcLevel.Size = new System.Drawing.Size(100, 20);
            //nudNpcLevel.Location = new Point(lblNpcLevel.X + lblNpcLevel.Width + 5, lblNpcLevel.Y);
            //nudNpcLevel.Maximum = 100;
            //nudNpcLevel.Minimum = 1;

            //btnSaveNpc = new Button("btnSaveNpc");
            //btnSaveNpc.Size = new System.Drawing.Size(100, 30);
            //btnSaveNpc.Location = new Point(lblNpcLevel.X, lblNpcLevel.Y + lblNpcLevel.Height + 5);
            //btnSaveNpc.Text = "Save NPC";
            //btnSaveNpc.Click += new EventHandler<MouseButtonEventArgs>(btnSaveNpc_Click);

            //btnClearNpc = new Button("btnClearNpc");
            //btnClearNpc.Size = new System.Drawing.Size(100, 30);
            //btnClearNpc.Location = new Point(btnSaveNpc.X + btnSaveNpc.Width + 5, btnSaveNpc.Y);
            //btnClearNpc.Text = "Clear NPC";
            //btnClearNpc.Click += new EventHandler<MouseButtonEventArgs>(btnClearNpc_Click);

            //ListBox lbxItems;
            lbxNpcs = new ListBox("lbxNpcs");
            lbxNpcs.Location = new Point(10, 200);
            lbxNpcs.Size = new Size(480, 280);
            lbxNpcs.Items.Clear();
            for (int npc = 0; npc < properties.Npcs.Count; npc++)
            {
                MapNpcSettings newNpc = new MapNpcSettings();
                newNpc.NpcNum = properties.Npcs[npc].NpcNum;
                newNpc.MinLevel = properties.Npcs[npc].MinLevel;
                newNpc.MaxLevel = properties.Npcs[npc].MaxLevel;
                newNpc.AppearanceRate = properties.Npcs[npc].AppearanceRate;
                newNpc.StartStatus = properties.Npcs[npc].StartStatus;
                //newNpc.StartStatusCounter = properties.Npcs[npc].StartStatusCounter;
                newNpc.StartStatusChance = properties.Npcs[npc].StartStatusChance;

                //properties.Npcs.Add(newNpc);
                lbxNpcs.Items.Add(new ListBoxTextItem(Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10), (npc + 1) + ": "
                    + "(" + newNpc.AppearanceRate + "%) " + "Lv." + newNpc.MinLevel + "-" + newNpc.MaxLevel + " " + Npc.NpcHelper.Npcs[newNpc.NpcNum].Name
                    + " [" + newNpc.StartStatusChance + "% " + newNpc.StartStatus.ToString() + "]"));
            }

            //Label lblNpcSpawnTime;
            lblNpcSpawnTime = new Label("lblNpcSpawnTime");
            lblNpcSpawnTime.Font = Client.Logic.Graphics.FontManager.LoadFont("Tahoma", 10);
            lblNpcSpawnTime.Text = "Spawn Time:";
            lblNpcSpawnTime.AutoSize = true;
            lblNpcSpawnTime.Location = new Point(65, 10);
            //NumericUpDown nudNpcSpawnTime;
            nudNpcSpawnTime = new NumericUpDown("nudNpcSpawnTime");
            nudNpcSpawnTime.Minimum = 1;
            nudNpcSpawnTime.Maximum = 100;
            nudNpcSpawnTime.Size = new Size(80, 20);
            nudNpcSpawnTime.Location = new Point(65, 26);
            nudNpcSpawnTime.Font = Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            nudNpcSpawnTime.Value = properties.NpcSpawnTime;

            lblNpcMin = new Label("lblNpcMin");
            lblNpcMin.Font = Client.Logic.Graphics.FontManager.LoadFont("Tahoma", 10);
            lblNpcMin.Text = "Min Npcs";
            lblNpcMin.AutoSize = true;
            lblNpcMin.Location = new Point(210, 10);
            //NumericUpDown nudNpcMin;
            nudNpcMin = new NumericUpDown("nudNpcMin");
            nudNpcMin.Minimum = 0;
            nudNpcMin.Maximum = MaxInfo.MAX_MAP_NPCS;
            nudNpcMin.Size = new Size(80, 20);
            nudNpcMin.Location = new Point(210, 26);
            nudNpcMin.Font = Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            nudNpcMin.Value = properties.MinNpcs;

            //Label lblNpcMax;
            lblNpcMax = new Label("lblNpcMax");
            lblNpcMax.Font = Client.Logic.Graphics.FontManager.LoadFont("Tahoma", 10);
            lblNpcMax.Text = "Max Npcs";
            lblNpcMax.AutoSize = true;
            lblNpcMax.Location = new Point(355, 10);
            //NumericUpDown nudNpcMax;
            nudNpcMax = new NumericUpDown("nudNpcMax");
            nudNpcMax.Minimum = 0;
            nudNpcMax.Maximum = MaxInfo.MAX_MAP_NPCS;
            nudNpcMax.Size = new Size(80, 20);
            nudNpcMax.Location = new Point(355, 26);
            nudNpcMax.Font = Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            nudNpcMax.Value = properties.MaxNpcs;

            //Label lblNpcNum;
            lblNpcNum = new Label("lblNpcNum");
            lblNpcNum.Font = Client.Logic.Graphics.FontManager.LoadFont("Tahoma", 10);
            lblNpcNum.Text = "NPC #";
            lblNpcNum.AutoSize = true;
            lblNpcNum.Location = new Point(65, 70);
            //NumericUpDown nudNpcNum;
            nudNpcNum = new NumericUpDown("nudNpcNum");
            nudNpcNum.Minimum = 1;
            nudNpcNum.Maximum = MaxInfo.MaxItems;
            nudNpcNum.Size = new Size(80, 20);
            nudNpcNum.Location = new Point(65, 84);
            nudNpcNum.Font = Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            nudNpcNum.ValueChanged += new EventHandler<ValueChangedEventArgs>(nudNpcNum_ValueChanged);

            //Label lblNpcSpawnX;
            lblNpcSpawnX = new Label("lblNpcSpawnX");
            lblNpcSpawnX.Font = Client.Logic.Graphics.FontManager.LoadFont("Tahoma", 10);
            lblNpcSpawnX.Text = "Spawn X";
            lblNpcSpawnX.AutoSize = true;
            lblNpcSpawnX.Location = new Point(210, 70);
            //NumericUpDown nudNpcSpawnX;
            nudNpcSpawnX = new NumericUpDown("nudNpcSpawnX");
            nudNpcSpawnX.Minimum = -1;
            nudNpcSpawnX.Maximum = properties.MaxX;
            nudNpcSpawnX.Size = new Size(80, 20);
            nudNpcSpawnX.Location = new Point(210, 84);
            nudNpcSpawnX.Font = Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10);

            //Label lblNpcSpawnY;
            lblNpcSpawnY = new Label("lblNpcSpawnY");
            lblNpcSpawnY.Font = Client.Logic.Graphics.FontManager.LoadFont("Tahoma", 10);
            lblNpcSpawnY.Text = "Spawn Y";
            lblNpcSpawnY.AutoSize = true;
            lblNpcSpawnY.Location = new Point(355, 70);
            //NumericUpDown nudNpcSpawnY;
            nudNpcSpawnY = new NumericUpDown("nudNpcSpawnY");
            nudNpcSpawnY.Minimum = -1;
            nudNpcSpawnY.Maximum = properties.MaxY;
            nudNpcSpawnY.Size = new Size(80, 20);
            nudNpcSpawnY.Location = new Point(355, 84);
            nudNpcSpawnY.Font = Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10);

            //Label lblNpcSpawnRate;
            lblNpcSpawnRate = new Label("lblNpcSpawnRate");
            lblNpcSpawnRate.Font = Client.Logic.Graphics.FontManager.LoadFont("Tahoma", 10);
            lblNpcSpawnRate.Text = "Spawn Rate:";
            lblNpcSpawnRate.AutoSize = true;
            lblNpcSpawnRate.Location = new Point(65, 104);
            //NumericUpDown nudNpcSpawnRate;
            nudNpcSpawnRate = new NumericUpDown("nudNpcSpawnRate");
            nudNpcSpawnRate.Minimum = 1;
            nudNpcSpawnRate.Maximum = 100;
            nudNpcSpawnRate.Size = new Size(80, 20);
            nudNpcSpawnRate.Location = new Point(65, 118);
            nudNpcSpawnRate.Font = Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10);

            lblMinLevel = new Label("lblMinLevel");
            lblMinLevel.Font = Client.Logic.Graphics.FontManager.LoadFont("Tahoma", 10);
            lblMinLevel.Text = "Min Level";
            lblMinLevel.AutoSize = true;
            lblMinLevel.Location = new Point(210, 104);
            //NumericUpDown nudMinLevel;
            nudMinLevel = new NumericUpDown("nudMinLevel");
            nudMinLevel.Minimum = 1;
            nudMinLevel.Maximum = 100;
            nudMinLevel.Size = new Size(80, 20);
            nudMinLevel.Location = new Point(210, 118);
            nudMinLevel.Font = Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10);

            //Label lblMaxLevel;
            lblMaxLevel = new Label("lblMaxLevel");
            lblMaxLevel.Font = Client.Logic.Graphics.FontManager.LoadFont("Tahoma", 10);
            lblMaxLevel.Text = "Max Level";
            lblMaxLevel.AutoSize = true;
            lblMaxLevel.Location = new Point(355, 104);
            //NumericUpDown nudMaxLevel;
            nudMaxLevel = new NumericUpDown("nudMaxLevel");
            nudMaxLevel.Minimum = 1;
            nudMaxLevel.Maximum = 100;
            nudMaxLevel.Size = new Size(80, 20);
            nudMaxLevel.Location = new Point(355, 118);
            nudMaxLevel.Font = Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10);

            lblNpcStartStatus = new Label("lblNpcStartStatus");
            lblNpcStartStatus.Font = Logic.Graphics.FontManager.LoadFont("Tahoma", 10);
            lblNpcStartStatus.AutoSize = true;
            lblNpcStartStatus.Location = new Point(65, 138);
            lblNpcStartStatus.Text = "Start Status:";

            cbNpcStartStatus = new ComboBox("cbNpcStartStatus");
            cbNpcStartStatus.Size = new System.Drawing.Size(80, 20);
            cbNpcStartStatus.Location = new Point(65, 152);
            for (int i = 0; i < 6; i++) {
                cbNpcStartStatus.Items.Add(new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("Tahoma", 10), ((Enums.StatusAilment)i).ToString()));
            }
            cbNpcStartStatus.SelectItem(0);

            lblStatusCounter = new Label("lblStatusCounter");
            lblStatusCounter.Font = Client.Logic.Graphics.FontManager.LoadFont("Tahoma", 10);
            lblStatusCounter.Text = "Status Counter";
            lblStatusCounter.AutoSize = true;
            lblStatusCounter.Location = new Point(210, 138);
            //NumericUpDown nudStatusCounter;
            nudStatusCounter = new NumericUpDown("nudStatusCounter");
            nudStatusCounter.Minimum = Int32.MinValue;
            nudStatusCounter.Maximum = Int32.MaxValue;
            nudStatusCounter.Size = new Size(80, 20);
            nudStatusCounter.Location = new Point(210, 152);
            nudStatusCounter.Font = Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10);

            //Label lblStatusChance;
            lblStatusChance = new Label("lblStatusChance");
            lblStatusChance.Font = Client.Logic.Graphics.FontManager.LoadFont("Tahoma", 10);
            lblStatusChance.Text = "Status Chance";
            lblStatusChance.AutoSize = true;
            lblStatusChance.Location = new Point(355, 138);
            //NumericUpDown nudStatusChance;
            nudStatusChance = new NumericUpDown("nudStatusChance");
            nudStatusChance.Minimum = 1;
            nudStatusChance.Maximum = 100;
            nudStatusChance.Size = new Size(80, 20);
            nudStatusChance.Location = new Point(355, 152);
            nudStatusChance.Font = Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10);

            //Button btnAddNpc;
            btnAddNpc = new Button("btnAddNpc");
            btnAddNpc.Location = new Point(10, 180);
            btnAddNpc.Font = Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            btnAddNpc.Size = new System.Drawing.Size(64, 16);
            btnAddNpc.Visible = true;
            btnAddNpc.Text = "Add Npc";
            btnAddNpc.Click += new EventHandler<MouseButtonEventArgs>(btnAddNpc_Click);
            //Button btnRemoveNpc;
            btnRemoveNpc = new Button("btnRemoveNpc");
            btnRemoveNpc.Location = new Point(110, 180);
            btnRemoveNpc.Font = Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            btnRemoveNpc.Size = new System.Drawing.Size(64, 16);
            btnRemoveNpc.Visible = true;
            btnRemoveNpc.Text = "Remove Npc";
            btnRemoveNpc.Click += new EventHandler<MouseButtonEventArgs>(btnRemoveNpc_Click);
            //Button btnLoadNpc;
            btnLoadNpc = new Button("btnLoadNpc");
            btnLoadNpc.Location = new Point(210, 180);
            btnLoadNpc.Font = Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            btnLoadNpc.Size = new System.Drawing.Size(64, 16);
            btnLoadNpc.Visible = true;
            btnLoadNpc.Text = "Load Npc";
            btnLoadNpc.Click += new EventHandler<MouseButtonEventArgs>(btnLoadNpc_Click);

            #endregion

            chkScroll = new CheckBox("chkScroll");
            chkScroll.Text = "Use scroll maps?";
            chkScroll.Size = new System.Drawing.Size(200, 16);
            chkScroll.Location = new Point(54, 60);
            chkScroll.BackColor = Color.Transparent;

            lblMaxX = new Label("lblMaxX");
            lblMaxX.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            lblMaxX.AutoSize = true;
            lblMaxX.Location = new Point(54, 0);
            lblMaxX.Text = "Max X:";

            lblMaxY = new Label("lblMaxY");
            lblMaxY.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            lblMaxY.AutoSize = true;
            lblMaxY.Location = new Point(280, 0);
            lblMaxY.Text = "Max Y:";

            txtMaxX = new TextBox("txtMaxX");
            txtMaxX.Size = new System.Drawing.Size(134, 18);
            txtMaxX.Location = new Point(59, 25);
            txtMaxX.Text = properties.MaxX.ToString();

            txtMaxY = new TextBox("txtMaxY");
            txtMaxY.Size = new System.Drawing.Size(134, 18);
            txtMaxY.Location = new Point(285, 25);
            txtMaxY.Text = properties.MaxY.ToString();

            this.AddWidget(pnlGeneral);
            this.AddWidget(btnGeneral);
            this.AddWidget(pnlNPC);
            this.AddWidget(btnNPC);
            this.AddWidget(pnlScroll);
            this.AddWidget(btnScroll);

            #region General
            pnlGeneral.AddWidget(txtMapName);
            pnlGeneral.AddWidget(lblMapName);
            pnlGeneral.AddWidget(lblMapSwitchover);
            pnlGeneral.AddWidget(lblNorth);
            pnlGeneral.AddWidget(lblSouth);
            pnlGeneral.AddWidget(lblEast);
            pnlGeneral.AddWidget(lblWest);
            pnlGeneral.AddWidget(txtNorth);
            pnlGeneral.AddWidget(txtSouth);
            pnlGeneral.AddWidget(txtEast);
            pnlGeneral.AddWidget(txtWest);
            pnlGeneral.AddWidget(chkHunger);
            pnlGeneral.AddWidget(chkRecruit);
            pnlGeneral.AddWidget(chkExp);
            pnlGeneral.AddWidget(chkIndoors);
            pnlGeneral.AddWidget(chkInstanced);
            pnlGeneral.AddWidget(lblGlobal);
            pnlGeneral.AddWidget(lblMapMorality);
            pnlGeneral.AddWidget(lblMapWeather);
            pnlGeneral.AddWidget(lblMapDarkness);
            pnlGeneral.AddWidget(lblMapTimeLimit);
            pnlGeneral.AddWidget(cmbMapMorality);
            pnlGeneral.AddWidget(cmbMapWeather);
            pnlGeneral.AddWidget(nudDarkness);
            pnlGeneral.AddWidget(nudTimeLimit);
            pnlGeneral.AddWidget(lblMusic);
            pnlGeneral.AddWidget(cmbMusic);
            pnlGeneral.AddWidget(btnPlay);
            pnlGeneral.AddWidget(btnStop);
            pnlGeneral.AddWidget(btnOk);
            pnlGeneral.AddWidget(btnCancel);
            #endregion

            #region NPC
            //pnlNPC.AddWidget(lblNpcSelector);
            //pnlNPC.AddWidget(cmbNpcSelector);
            //pnlNPC.AddWidget(lblNpcNum);
            //pnlNPC.AddWidget(nudNpcNum);
            //pnlNPC.AddWidget(lblNpcNumInfo);
            //pnlNPC.AddWidget(lblNpcSpawnX);
            //pnlNPC.AddWidget(nudNpcSpawnX);
            //pnlNPC.AddWidget(lblNpcSpawnY);
            //pnlNPC.AddWidget(nudNpcSpawnY);
            //pnlNPC.AddWidget(lblNpcLevel);
            //pnlNPC.AddWidget(nudNpcLevel);
            //pnlNPC.AddWidget(btnSaveNpc);
            //pnlNPC.AddWidget(btnClearNpc);

            pnlNPC.AddWidget(lblNpcSpawnTime);
            pnlNPC.AddWidget(nudNpcSpawnTime);

            pnlNPC.AddWidget(lblNpcMin);
            pnlNPC.AddWidget(nudNpcMin);
            pnlNPC.AddWidget(lblNpcMax);
            pnlNPC.AddWidget(nudNpcMax);

            pnlNPC.AddWidget(lbxNpcs);

            pnlNPC.AddWidget(lblNpcNum);
            pnlNPC.AddWidget(nudNpcNum);
            pnlNPC.AddWidget(lblNpcSpawnX);
            pnlNPC.AddWidget(nudNpcSpawnX);
            pnlNPC.AddWidget(lblNpcSpawnY);
            pnlNPC.AddWidget(nudNpcSpawnY);
            pnlNPC.AddWidget(lblMinLevel);
            pnlNPC.AddWidget(nudMinLevel);
            pnlNPC.AddWidget(lblMaxLevel);
            pnlNPC.AddWidget(nudMaxLevel);
            pnlNPC.AddWidget(lblNpcSpawnRate);
            pnlNPC.AddWidget(nudNpcSpawnRate);
            pnlNPC.AddWidget(lblNpcStartStatus);
            pnlNPC.AddWidget(cbNpcStartStatus);
            pnlNPC.AddWidget(lblStatusCounter);
            pnlNPC.AddWidget(nudStatusCounter);
            pnlNPC.AddWidget(lblStatusChance);
            pnlNPC.AddWidget(nudStatusChance);
            pnlNPC.AddWidget(btnAddNpc);
            pnlNPC.AddWidget(btnRemoveNpc);
            pnlNPC.AddWidget(btnLoadNpc);
            #endregion

            pnlScroll.AddWidget(chkScroll);
            pnlScroll.AddWidget(txtMaxX);
            pnlScroll.AddWidget(txtMaxY);
            pnlScroll.AddWidget(lblMaxX);
            pnlScroll.AddWidget(lblMaxY);

            this.LoadComplete();

            LoadMusic();
        }
コード例 #3
0
        void btnAddNpc_Click(object sender, SdlDotNet.Widgets.MouseButtonEventArgs e)
        {
            if (nudNpcNum.Value > 0)
            {
                MapNpcSettings newNpc = new MapNpcSettings();
                newNpc.NpcNum = nudNpcNum.Value;
                newNpc.SpawnX = nudNpcSpawnX.Value;
                newNpc.SpawnY = nudNpcSpawnY.Value;
                newNpc.MinLevel = nudMinLevel.Value;
                newNpc.MaxLevel = nudMaxLevel.Value;
                newNpc.AppearanceRate = nudNpcSpawnRate.Value;
                newNpc.StartStatus = (Enums.StatusAilment)cbNpcStartStatus.SelectedIndex;
                newNpc.StartStatusCounter = nudStatusCounter.Value;
                newNpc.StartStatusChance = nudStatusChance.Value;

                properties.Npcs.Add(newNpc);
                lbxNpcs.Items.Add(new ListBoxTextItem(Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10), properties.Npcs.Count + ": "
                    + "(" + newNpc.AppearanceRate + "%) " + "Lv." + newNpc.MinLevel + "-" + newNpc.MaxLevel + " " + Npc.NpcHelper.Npcs[newNpc.NpcNum].Name
                    + " [" + newNpc.StartStatusChance + "% " + newNpc.StartStatus.ToString() + "]"));
            }
        }
コード例 #4
0
ファイル: winRDungeonPanel.cs プロジェクト: MandL27/Client
        void btnAddNpc_Click(object sender, SdlDotNet.Widgets.MouseButtonEventArgs e)
        {
            if (nudNpcNum.Value > 0) {
                MapNpcSettings newNpc = new MapNpcSettings();
                newNpc.NpcNum = nudNpcNum.Value;
                newNpc.MinLevel = nudMinLevel.Value;
                newNpc.MaxLevel = nudMaxLevel.Value;
                newNpc.AppearanceRate = nudNpcSpawnRate.Value;
                newNpc.StartStatus = (Enums.StatusAilment)cbNpcStartStatus.SelectedIndex;
                newNpc.StartStatusCounter = nudStatusCounter.Value;
                newNpc.StartStatusChance = nudStatusChance.Value;

                if (chkBulkNpc.Checked) {
                    for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) {
                        if (lbxNpcs.SelectedIndex >= 0 && lbxNpcs.SelectedIndex < rdungeon.Floors[floor].Npcs.Count) {
                            rdungeon.Floors[floor].Npcs.Insert(lbxNpcs.SelectedIndex, newNpc);
                        } else {
                            rdungeon.Floors[floor].Npcs.Add(newNpc);
                        }

                    }

                    npcList.Clear();
                    lbxNpcs.Items.Clear();
                    EditableRDungeonFloor loadingfloor = rdungeon.Floors[nudFirstFloor.Value - 1];
                    for (int npc = 0; npc < loadingfloor.Npcs.Count; npc++) {
                        MapNpcSettings newLoadNpc = new MapNpcSettings();
                        newLoadNpc.NpcNum = loadingfloor.Npcs[npc].NpcNum;
                        newLoadNpc.MinLevel = loadingfloor.Npcs[npc].MinLevel;
                        newLoadNpc.MaxLevel = loadingfloor.Npcs[npc].MaxLevel;
                        newLoadNpc.AppearanceRate = loadingfloor.Npcs[npc].AppearanceRate;
                        newLoadNpc.StartStatus = loadingfloor.Npcs[npc].StartStatus;
                        newLoadNpc.StartStatusCounter = loadingfloor.Npcs[npc].StartStatusCounter;
                        newLoadNpc.StartStatusChance = loadingfloor.Npcs[npc].StartStatusChance;

                        npcList.Add(newLoadNpc);
                        lbxNpcs.Items.Add(new ListBoxTextItem(Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10), (npc + 1) + ": "
                    + "(" + newLoadNpc.AppearanceRate + "%) " + "Lv." + newLoadNpc.MinLevel + "-" + newLoadNpc.MaxLevel + " " + Npc.NpcHelper.Npcs[newLoadNpc.NpcNum].Name
                    + " [" + newLoadNpc.StartStatusChance + "% " + newLoadNpc.StartStatus.ToString() + "]"));
                    }

                } else {
                    if (lbxNpcs.SelectedIndex >= 0 && lbxNpcs.SelectedIndex < lbxNpcs.Items.Count) {
                        npcList.Insert(lbxNpcs.SelectedIndex, newNpc);
                    } else {
                        npcList.Add(newNpc);
                    }

                    lbxNpcs.Items.Clear();
                    for (int npc = 0; npc < npcList.Count; npc++) {

                        lbxNpcs.Items.Add(new ListBoxTextItem(Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10), (npc + 1) + ": "
                        + "(" + npcList[npc].AppearanceRate + "%) " + "Lv." + npcList[npc].MinLevel + "-" + npcList[npc].MaxLevel + " "
                        + Npc.NpcHelper.Npcs[npcList[npc].NpcNum].Name
                        + " [" + npcList[npc].StartStatusChance + "% " + npcList[npc].StartStatus.ToString() + "]"));
                    }

                }
            }
        }
コード例 #5
0
ファイル: winRDungeonPanel.cs プロジェクト: MandL27/Client
        public void LoadRDungeon(string[] parse)
        {
            //load Rdungeon from packet
            rdungeon = new EditableRDungeon(parse[1].ToInt());
            rdungeon.DungeonName = parse[2];
            rdungeon.Direction = (Enums.Direction)parse[3].ToInt();
            rdungeon.MaxFloors = parse[4].ToInt();
            rdungeon.Recruitment = parse[5].ToBool();
            rdungeon.Exp = parse[6].ToBool();
            rdungeon.WindTimer = parse[7].ToInt();
            rdungeon.DungeonIndex = parse[8].ToInt();
            int n = 9;
            for (int i = 0; i < rdungeon.MaxFloors; i++) {
                rdungeon.Floors.Add(new EditableRDungeonFloor());
                rdungeon.Floors[i].TrapMin = parse[n].ToInt();
                rdungeon.Floors[i].TrapMax = parse[n + 1].ToInt();
                rdungeon.Floors[i].ItemMin = parse[n + 2].ToInt();
                rdungeon.Floors[i].ItemMax = parse[n + 3].ToInt();
                rdungeon.Floors[i].Intricacy = parse[n + 4].ToInt();
                rdungeon.Floors[i].RoomWidthMin = parse[n + 5].ToInt();
                rdungeon.Floors[i].RoomWidthMax = parse[n + 6].ToInt();
                rdungeon.Floors[i].RoomLengthMin = parse[n + 7].ToInt();
                rdungeon.Floors[i].RoomLengthMax = parse[n + 8].ToInt();
                rdungeon.Floors[i].HallTurnMin = parse[n + 9].ToInt();
                rdungeon.Floors[i].HallTurnMax = parse[n + 10].ToInt();
                rdungeon.Floors[i].HallVarMin = parse[n + 11].ToInt();
                rdungeon.Floors[i].HallVarMax = parse[n + 12].ToInt();
                rdungeon.Floors[i].WaterFrequency = parse[n + 13].ToInt();
                rdungeon.Floors[i].Craters = parse[n + 14].ToInt();
                rdungeon.Floors[i].CraterMinLength = parse[n + 15].ToInt();
                rdungeon.Floors[i].CraterMaxLength = parse[n + 16].ToInt();
                rdungeon.Floors[i].CraterFuzzy = parse[n + 17].ToBool();
                rdungeon.Floors[i].MinChambers = parse[n + 18].ToInt();
                rdungeon.Floors[i].MaxChambers = parse[n + 19].ToInt();
                rdungeon.Floors[i].Darkness = parse[n + 20].ToInt();
                rdungeon.Floors[i].GoalType = (Enums.RFloorGoalType)parse[n + 21].ToInt();
                rdungeon.Floors[i].GoalMap = parse[n + 22].ToInt();
                rdungeon.Floors[i].GoalX = parse[n + 23].ToInt();
                rdungeon.Floors[i].GoalY = parse[n + 24].ToInt();
                rdungeon.Floors[i].Music = parse[n + 25];

                n += 26;

                rdungeon.Floors[i].StairsX = parse[n].ToInt();
                rdungeon.Floors[i].StairsSheet = parse[n + 1].ToInt();

                rdungeon.Floors[i].mGroundX = parse[n + 2].ToInt();
                rdungeon.Floors[i].mGroundSheet = parse[n + 3].ToInt();

                rdungeon.Floors[i].mTopLeftX = parse[n + 4].ToInt();
                rdungeon.Floors[i].mTopLeftSheet = parse[n + 5].ToInt();
                rdungeon.Floors[i].mTopCenterX = parse[n + 6].ToInt();
                rdungeon.Floors[i].mTopCenterSheet = parse[n + 7].ToInt();
                rdungeon.Floors[i].mTopRightX = parse[n + 8].ToInt();
                rdungeon.Floors[i].mTopRightSheet = parse[n + 9].ToInt();

                rdungeon.Floors[i].mCenterLeftX = parse[n + 10].ToInt();
                rdungeon.Floors[i].mCenterLeftSheet = parse[n + 11].ToInt();
                rdungeon.Floors[i].mCenterCenterX = parse[n + 12].ToInt();
                rdungeon.Floors[i].mCenterCenterSheet = parse[n + 13].ToInt();
                rdungeon.Floors[i].mCenterRightX = parse[n + 14].ToInt();
                rdungeon.Floors[i].mCenterRightSheet = parse[n + 15].ToInt();

                rdungeon.Floors[i].mBottomLeftX = parse[n + 16].ToInt();
                rdungeon.Floors[i].mBottomLeftSheet = parse[n + 17].ToInt();
                rdungeon.Floors[i].mBottomCenterX = parse[n + 18].ToInt();
                rdungeon.Floors[i].mBottomCenterSheet = parse[n + 19].ToInt();
                rdungeon.Floors[i].mBottomRightX = parse[n + 20].ToInt();
                rdungeon.Floors[i].mBottomRightSheet = parse[n + 21].ToInt();

                rdungeon.Floors[i].mInnerTopLeftX = parse[n + 22].ToInt();
                rdungeon.Floors[i].mInnerTopLeftSheet = parse[n + 23].ToInt();
                rdungeon.Floors[i].mInnerBottomLeftX = parse[n + 24].ToInt();
                rdungeon.Floors[i].mInnerBottomLeftSheet = parse[n + 25].ToInt();
                rdungeon.Floors[i].mInnerTopRightX = parse[n + 26].ToInt();
                rdungeon.Floors[i].mInnerTopRightSheet = parse[n + 27].ToInt();
                rdungeon.Floors[i].mInnerBottomRightX = parse[n + 28].ToInt();
                rdungeon.Floors[i].mInnerBottomRightSheet = parse[n + 29].ToInt();

                rdungeon.Floors[i].mIsolatedWallX = parse[n + 30].ToInt();
                rdungeon.Floors[i].mIsolatedWallSheet = parse[n + 31].ToInt();
                rdungeon.Floors[i].mColumnTopX = parse[n + 32].ToInt();
                rdungeon.Floors[i].mColumnTopSheet = parse[n + 33].ToInt();
                rdungeon.Floors[i].mColumnCenterX = parse[n + 34].ToInt();
                rdungeon.Floors[i].mColumnCenterSheet = parse[n + 35].ToInt();
                rdungeon.Floors[i].mColumnBottomX = parse[n + 36].ToInt();
                rdungeon.Floors[i].mColumnBottomSheet = parse[n + 37].ToInt();

                rdungeon.Floors[i].mRowLeftX = parse[n + 38].ToInt();
                rdungeon.Floors[i].mRowLeftSheet = parse[n + 39].ToInt();
                rdungeon.Floors[i].mRowCenterX = parse[n + 40].ToInt();
                rdungeon.Floors[i].mRowCenterSheet = parse[n + 41].ToInt();
                rdungeon.Floors[i].mRowRightX = parse[n + 42].ToInt();
                rdungeon.Floors[i].mRowRightSheet = parse[n + 43].ToInt();

                rdungeon.Floors[i].mGroundAltX = parse[n + 44].ToInt();
                rdungeon.Floors[i].mGroundAltSheet = parse[n + 45].ToInt();
                rdungeon.Floors[i].mGroundAlt2X = parse[n + 46].ToInt();
                rdungeon.Floors[i].mGroundAlt2Sheet = parse[n + 47].ToInt();

                rdungeon.Floors[i].mTopLeftAltX = parse[n + 48].ToInt();
                rdungeon.Floors[i].mTopLeftAltSheet = parse[n + 49].ToInt();
                rdungeon.Floors[i].mTopCenterAltX = parse[n + 50].ToInt();
                rdungeon.Floors[i].mTopCenterAltSheet = parse[n + 51].ToInt();
                rdungeon.Floors[i].mTopRightAltX = parse[n + 52].ToInt();
                rdungeon.Floors[i].mTopRightAltSheet = parse[n + 53].ToInt();

                rdungeon.Floors[i].mCenterLeftAltX = parse[n + 54].ToInt();
                rdungeon.Floors[i].mCenterLeftAltSheet = parse[n + 55].ToInt();
                rdungeon.Floors[i].mCenterCenterAltX = parse[n + 56].ToInt();
                rdungeon.Floors[i].mCenterCenterAltSheet = parse[n + 57].ToInt();
                rdungeon.Floors[i].mCenterCenterAlt2X = parse[n + 58].ToInt();
                rdungeon.Floors[i].mCenterCenterAlt2Sheet = parse[n + 59].ToInt();
                rdungeon.Floors[i].mCenterRightAltX = parse[n + 60].ToInt();
                rdungeon.Floors[i].mCenterRightAltSheet = parse[n + 61].ToInt();

                rdungeon.Floors[i].mBottomLeftAltX = parse[n + 62].ToInt();
                rdungeon.Floors[i].mBottomLeftAltSheet = parse[n + 63].ToInt();
                rdungeon.Floors[i].mBottomCenterAltX = parse[n + 64].ToInt();
                rdungeon.Floors[i].mBottomCenterAltSheet = parse[n + 65].ToInt();
                rdungeon.Floors[i].mBottomRightAltX = parse[n + 66].ToInt();
                rdungeon.Floors[i].mBottomRightAltSheet = parse[n + 67].ToInt();

                rdungeon.Floors[i].mInnerTopLeftAltX = parse[n + 68].ToInt();
                rdungeon.Floors[i].mInnerTopLeftAltSheet = parse[n + 69].ToInt();
                rdungeon.Floors[i].mInnerBottomLeftAltX = parse[n + 70].ToInt();
                rdungeon.Floors[i].mInnerBottomLeftAltSheet = parse[n + 71].ToInt();
                rdungeon.Floors[i].mInnerTopRightAltX = parse[n + 72].ToInt();
                rdungeon.Floors[i].mInnerTopRightAltSheet = parse[n + 73].ToInt();
                rdungeon.Floors[i].mInnerBottomRightAltX = parse[n + 74].ToInt();
                rdungeon.Floors[i].mInnerBottomRightAltSheet = parse[n + 75].ToInt();

                rdungeon.Floors[i].mIsolatedWallAltX = parse[n + 76].ToInt();
                rdungeon.Floors[i].mIsolatedWallAltSheet = parse[n + 77].ToInt();
                rdungeon.Floors[i].mColumnTopAltX = parse[n + 78].ToInt();
                rdungeon.Floors[i].mColumnTopAltSheet = parse[n + 79].ToInt();
                rdungeon.Floors[i].mColumnCenterAltX = parse[n + 80].ToInt();
                rdungeon.Floors[i].mColumnCenterAltSheet = parse[n + 81].ToInt();
                rdungeon.Floors[i].mColumnBottomAltX = parse[n + 82].ToInt();
                rdungeon.Floors[i].mColumnBottomAltSheet = parse[n + 83].ToInt();

                rdungeon.Floors[i].mRowLeftAltX = parse[n + 84].ToInt();
                rdungeon.Floors[i].mRowLeftAltSheet = parse[n + 85].ToInt();
                rdungeon.Floors[i].mRowCenterAltX = parse[n + 86].ToInt();
                rdungeon.Floors[i].mRowCenterAltSheet = parse[n + 87].ToInt();
                rdungeon.Floors[i].mRowRightAltX = parse[n + 88].ToInt();
                rdungeon.Floors[i].mRowRightAltSheet = parse[n + 89].ToInt();

                n += 90;

                rdungeon.Floors[i].mWaterX = parse[n].ToInt();
                rdungeon.Floors[i].mWaterSheet = parse[n + 1].ToInt();
                rdungeon.Floors[i].mWaterAnimX = parse[n + 2].ToInt();
                rdungeon.Floors[i].mWaterAnimSheet = parse[n + 3].ToInt();

                rdungeon.Floors[i].mShoreTopLeftX = parse[n + 4].ToInt();
                rdungeon.Floors[i].mShoreTopLeftSheet = parse[n + 5].ToInt();
                rdungeon.Floors[i].mShoreTopRightX = parse[n + 6].ToInt();
                rdungeon.Floors[i].mShoreTopRightSheet = parse[n + 7].ToInt();
                rdungeon.Floors[i].mShoreBottomRightX = parse[n + 8].ToInt();
                rdungeon.Floors[i].mShoreBottomRightSheet = parse[n + 9].ToInt();
                rdungeon.Floors[i].mShoreBottomLeftX = parse[n + 10].ToInt();
                rdungeon.Floors[i].mShoreBottomLeftSheet = parse[n + 11].ToInt();

                rdungeon.Floors[i].mShoreDiagonalForwardX = parse[n + 12].ToInt();
                rdungeon.Floors[i].mShoreDiagonalForwardSheet = parse[n + 13].ToInt();
                rdungeon.Floors[i].mShoreDiagonalBackX = parse[n + 14].ToInt();
                rdungeon.Floors[i].mShoreDiagonalBackSheet = parse[n + 15].ToInt();

                rdungeon.Floors[i].mShoreTopX = parse[n + 16].ToInt();
                rdungeon.Floors[i].mShoreTopSheet = parse[n + 17].ToInt();
                rdungeon.Floors[i].mShoreRightX = parse[n + 18].ToInt();
                rdungeon.Floors[i].mShoreRightSheet = parse[n + 19].ToInt();
                rdungeon.Floors[i].mShoreBottomX = parse[n + 20].ToInt();
                rdungeon.Floors[i].mShoreBottomSheet = parse[n + 21].ToInt();
                rdungeon.Floors[i].mShoreLeftX = parse[n + 22].ToInt();
                rdungeon.Floors[i].mShoreLeftSheet = parse[n + 23].ToInt();

                rdungeon.Floors[i].mShoreVerticalX = parse[n + 24].ToInt();
                rdungeon.Floors[i].mShoreVerticalSheet = parse[n + 25].ToInt();
                rdungeon.Floors[i].mShoreHorizontalX = parse[n + 26].ToInt();
                rdungeon.Floors[i].mShoreHorizontalSheet = parse[n + 27].ToInt();

                rdungeon.Floors[i].mShoreInnerTopLeftX = parse[n + 28].ToInt();
                rdungeon.Floors[i].mShoreInnerTopLeftSheet = parse[n + 29].ToInt();
                rdungeon.Floors[i].mShoreInnerTopRightX = parse[n + 30].ToInt();
                rdungeon.Floors[i].mShoreInnerTopRightSheet = parse[n + 31].ToInt();
                rdungeon.Floors[i].mShoreInnerBottomRightX = parse[n + 32].ToInt();
                rdungeon.Floors[i].mShoreInnerBottomRightSheet = parse[n + 33].ToInt();
                rdungeon.Floors[i].mShoreInnerBottomLeftX = parse[n + 34].ToInt();
                rdungeon.Floors[i].mShoreInnerBottomLeftSheet = parse[n + 35].ToInt();

                rdungeon.Floors[i].mShoreInnerTopX = parse[n + 36].ToInt();
                rdungeon.Floors[i].mShoreInnerTopSheet = parse[n + 37].ToInt();
                rdungeon.Floors[i].mShoreInnerRightX = parse[n + 38].ToInt();
                rdungeon.Floors[i].mShoreInnerRightSheet = parse[n + 39].ToInt();
                rdungeon.Floors[i].mShoreInnerBottomX = parse[n + 40].ToInt();
                rdungeon.Floors[i].mShoreInnerBottomSheet = parse[n + 41].ToInt();
                rdungeon.Floors[i].mShoreInnerLeftX = parse[n + 42].ToInt();
                rdungeon.Floors[i].mShoreInnerLeftSheet = parse[n + 43].ToInt();
                rdungeon.Floors[i].mShoreSurroundedX = parse[n + 44].ToInt();
                rdungeon.Floors[i].mShoreSurroundedSheet = parse[n + 45].ToInt();

                rdungeon.Floors[i].mShoreTopLeftAnimX = parse[n + 46].ToInt();
                rdungeon.Floors[i].mShoreTopLeftAnimSheet = parse[n + 47].ToInt();
                rdungeon.Floors[i].mShoreTopRightAnimX = parse[n + 48].ToInt();
                rdungeon.Floors[i].mShoreTopRightAnimSheet = parse[n + 49].ToInt();
                rdungeon.Floors[i].mShoreBottomRightAnimX = parse[n + 50].ToInt();
                rdungeon.Floors[i].mShoreBottomRightAnimSheet = parse[n + 51].ToInt();
                rdungeon.Floors[i].mShoreBottomLeftAnimX = parse[n + 52].ToInt();
                rdungeon.Floors[i].mShoreBottomLeftAnimSheet = parse[n + 53].ToInt();

                rdungeon.Floors[i].mShoreDiagonalForwardAnimX = parse[n + 54].ToInt();
                rdungeon.Floors[i].mShoreDiagonalForwardAnimSheet = parse[n + 55].ToInt();
                rdungeon.Floors[i].mShoreDiagonalBackAnimX = parse[n + 56].ToInt();
                rdungeon.Floors[i].mShoreDiagonalBackAnimSheet = parse[n + 57].ToInt();

                rdungeon.Floors[i].mShoreTopAnimX = parse[n + 58].ToInt();
                rdungeon.Floors[i].mShoreTopAnimSheet = parse[n + 59].ToInt();
                rdungeon.Floors[i].mShoreRightAnimX = parse[n + 60].ToInt();
                rdungeon.Floors[i].mShoreRightAnimSheet = parse[n + 61].ToInt();
                rdungeon.Floors[i].mShoreBottomAnimX = parse[n + 62].ToInt();
                rdungeon.Floors[i].mShoreBottomAnimSheet = parse[n + 63].ToInt();
                rdungeon.Floors[i].mShoreLeftAnimX = parse[n + 64].ToInt();
                rdungeon.Floors[i].mShoreLeftAnimSheet = parse[n + 65].ToInt();

                rdungeon.Floors[i].mShoreVerticalAnimX = parse[n + 66].ToInt();
                rdungeon.Floors[i].mShoreVerticalAnimSheet = parse[n + 67].ToInt();
                rdungeon.Floors[i].mShoreHorizontalAnimX = parse[n + 68].ToInt();
                rdungeon.Floors[i].mShoreHorizontalAnimSheet = parse[n + 69].ToInt();

                rdungeon.Floors[i].mShoreInnerTopLeftAnimX = parse[n + 70].ToInt();
                rdungeon.Floors[i].mShoreInnerTopLeftAnimSheet = parse[n + 71].ToInt();
                rdungeon.Floors[i].mShoreInnerTopRightAnimX = parse[n + 72].ToInt();
                rdungeon.Floors[i].mShoreInnerTopRightAnimSheet = parse[n + 73].ToInt();
                rdungeon.Floors[i].mShoreInnerBottomRightAnimX = parse[n + 74].ToInt();
                rdungeon.Floors[i].mShoreInnerBottomRightAnimSheet = parse[n + 75].ToInt();
                rdungeon.Floors[i].mShoreInnerBottomLeftAnimX = parse[n + 76].ToInt();
                rdungeon.Floors[i].mShoreInnerBottomLeftAnimSheet = parse[n + 77].ToInt();

                rdungeon.Floors[i].mShoreInnerTopAnimX = parse[n + 78].ToInt();
                rdungeon.Floors[i].mShoreInnerTopAnimSheet = parse[n + 79].ToInt();
                rdungeon.Floors[i].mShoreInnerRightAnimX = parse[n + 80].ToInt();
                rdungeon.Floors[i].mShoreInnerRightAnimSheet = parse[n + 81].ToInt();
                rdungeon.Floors[i].mShoreInnerBottomAnimX = parse[n + 82].ToInt();
                rdungeon.Floors[i].mShoreInnerBottomAnimSheet = parse[n + 83].ToInt();
                rdungeon.Floors[i].mShoreInnerLeftAnimX = parse[n + 84].ToInt();
                rdungeon.Floors[i].mShoreInnerLeftAnimSheet = parse[n + 85].ToInt();

                rdungeon.Floors[i].mShoreSurroundedAnimX = parse[n + 86].ToInt();
                rdungeon.Floors[i].mShoreSurroundedAnimSheet = parse[n + 87].ToInt();

                n += 88;

                rdungeon.Floors[i].GroundTile.Type = (Enums.TileType)parse[n].ToInt();
                rdungeon.Floors[i].GroundTile.Data1 = parse[n + 1].ToInt();
                rdungeon.Floors[i].GroundTile.Data2 = parse[n + 2].ToInt();
                rdungeon.Floors[i].GroundTile.Data3 = parse[n + 3].ToInt();
                rdungeon.Floors[i].GroundTile.String1 = parse[n + 4];
                rdungeon.Floors[i].GroundTile.String2 = parse[n + 5];
                rdungeon.Floors[i].GroundTile.String3 = parse[n + 6];

                rdungeon.Floors[i].HallTile.Type = (Enums.TileType)parse[n + 7].ToInt();
                rdungeon.Floors[i].HallTile.Data1 = parse[n + 8].ToInt();
                rdungeon.Floors[i].HallTile.Data2 = parse[n + 9].ToInt();
                rdungeon.Floors[i].HallTile.Data3 = parse[n + 10].ToInt();
                rdungeon.Floors[i].HallTile.String1 = parse[n + 11];
                rdungeon.Floors[i].HallTile.String2 = parse[n + 12];
                rdungeon.Floors[i].HallTile.String3 = parse[n + 13];

                rdungeon.Floors[i].WaterTile.Type = (Enums.TileType)parse[n + 14].ToInt();
                rdungeon.Floors[i].WaterTile.Data1 = parse[n + 15].ToInt();
                rdungeon.Floors[i].WaterTile.Data2 = parse[n + 16].ToInt();
                rdungeon.Floors[i].WaterTile.Data3 = parse[n + 17].ToInt();
                rdungeon.Floors[i].WaterTile.String1 = parse[n + 18];
                rdungeon.Floors[i].WaterTile.String2 = parse[n + 19];
                rdungeon.Floors[i].WaterTile.String3 = parse[n + 20];

                rdungeon.Floors[i].WallTile.Type = (Enums.TileType)parse[n + 21].ToInt();
                rdungeon.Floors[i].WallTile.Data1 = parse[n + 22].ToInt();
                rdungeon.Floors[i].WallTile.Data2 = parse[n + 23].ToInt();
                rdungeon.Floors[i].WallTile.Data3 = parse[n + 24].ToInt();
                rdungeon.Floors[i].WallTile.String1 = parse[n + 25];
                rdungeon.Floors[i].WallTile.String2 = parse[n + 26];
                rdungeon.Floors[i].WallTile.String3 = parse[n + 27];

                rdungeon.Floors[i].NpcSpawnTime = parse[n + 28].ToInt();
                rdungeon.Floors[i].NpcMin = parse[n + 29].ToInt();
                rdungeon.Floors[i].NpcMax = parse[n + 30].ToInt();

                n += 31;

                for (int item = 0; item < parse[n].ToInt(); item++) {
                    EditableRDungeonItem newItem = new EditableRDungeonItem();
                    newItem.ItemNum = parse[n + item * 10 + 1].ToInt();
                    newItem.MinAmount = parse[n + item * 10 + 2].ToInt();
                    newItem.MaxAmount = parse[n + item * 10 + 3].ToInt();
                    newItem.AppearanceRate = parse[n + item * 10 + 4].ToInt();
                    newItem.StickyRate = parse[n + item * 10 + 5].ToInt();
                    newItem.Tag = parse[n + item * 10 + 6];
                    newItem.Hidden = parse[n + item * 10 + 7].ToBool();
                    newItem.OnGround = parse[n + item * 10 + 8].ToBool();
                    newItem.OnWater = parse[n + item * 10 + 9].ToBool();
                    newItem.OnWall = parse[n + item * 10 + 10].ToBool();

                    rdungeon.Floors[i].Items.Add(newItem);
                }
                n += rdungeon.Floors[i].Items.Count * 10 + 1;

                for (int npc = 0; npc < parse[n].ToInt(); npc++) {
                    MapNpcSettings newNpc = new MapNpcSettings();
                    newNpc.NpcNum = parse[n + npc * 7 + 1].ToInt();
                    newNpc.MinLevel = parse[n + npc * 7 + 2].ToInt();
                    newNpc.MaxLevel = parse[n + npc * 7 + 3].ToInt();
                    newNpc.AppearanceRate = parse[n + npc * 7 + 4].ToInt();
                    newNpc.StartStatus = (Enums.StatusAilment)parse[n + npc * 7 + 5].ToInt();
                    newNpc.StartStatusCounter = parse[n + npc * 7 + 6].ToInt();
                    newNpc.StartStatusChance = parse[n + npc * 7 + 7].ToInt();

                    rdungeon.Floors[i].Npcs.Add(newNpc);
                }
                n += rdungeon.Floors[i].Npcs.Count * 7 + 1;

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

                    rdungeon.Floors[i].SpecialTiles.Add(newTile);

                }
                n += rdungeon.Floors[i].SpecialTiles.Count * 29 + 1;

                for (int weather = 0; weather < parse[n].ToInt(); weather++) {
                    rdungeon.Floors[i].Weather.Add((Enums.Weather)parse[n + 1 + weather].ToInt());

                }
                n += rdungeon.Floors[i].Weather.Count + 1;

                for (int chamber = 0; chamber < parse[n].ToInt(); chamber++) {
                    EditableRDungeonChamber newChamber = new EditableRDungeonChamber();
                    newChamber.ChamberNum = parse[n + chamber * 4 + 1].ToInt();
                    newChamber.String1 = parse[n + chamber * 4 + 2];
                    newChamber.String2 = parse[n + chamber * 4 + 3];
                    newChamber.String3 = parse[n + chamber * 4 + 4];
                    rdungeon.Floors[i].Chambers.Add(newChamber);
                }
                n += rdungeon.Floors[i].Chambers.Count * 4 + 1;

            }

            pnlRDungeonList.Visible = false;
            btnEdit.Text = "Edit";

            txtDungeonName.Text = rdungeon.DungeonName;
            if (rdungeon.Direction == Enums.Direction.Up) {
                optUp.Checked = true;
            } else {
                optDown.Checked = true;
            }
            nudMaxFloors.Value = rdungeon.MaxFloors;
            chkRecruiting.Checked = rdungeon.Recruitment;
            chkEXPGain.Checked = rdungeon.Exp;
            nudWindTimer.Value = rdungeon.WindTimer;

            pnlRDungeonGeneral.Visible = true;
            this.Size = new System.Drawing.Size(pnlRDungeonGeneral.Width, pnlRDungeonGeneral.Height);

            //btnGeneral.Visible = true;
            //btnFloors.Visible = true;
            //btnTerrain.Visible = true;
            //btnGeneral.Size = new Size((pnlRDungeonGeneral.Width - 21) / 3, 32);
            //btnFloors.Location = new Point((pnlRDungeonGeneral.Width - 21) / 3 + 10, 0);
            //btnFloors.Size = new Size((pnlRDungeonGeneral.Width - 21) / 3, 32);
            //btnFloors.Visible = true;
            //btnTerrain.Location = new Point((pnlRDungeonGeneral.Width - 21) / 3 * 2 + 10, 0);
            //btnTerrain.Size = new Size((pnlRDungeonGeneral.Width - 21) / 3, 32);
            //btnGeneral.Selected = true;

            //this.TitleBar.Text = "General Random Dungeon Options";
        }
コード例 #6
0
ファイル: winRDungeonPanel.cs プロジェクト: MandL27/Client
        void btnSaveFloor_Click(object sender, SdlDotNet.Widgets.MouseButtonEventArgs e)
        {
            for (int i = rdungeon.Floors.Count; i < nudMaxFloors.Value; i++) {
                rdungeon.Floors.Add(new EditableRDungeonFloor());
            }

            if (nudFirstFloor.Value > nudMaxFloors.Value || nudLastFloor.Value > nudMaxFloors.Value) {
                lblSaveLoadMessage.Text = "Cannot save floor(s) above the maximum.";
                return;
            }

            if (pnlRDungeonFloorSettingSelection.Visible == true) {
                LoadpnlRDungeonStructure();
                LoadpnlRDungeonLandTiles();
                LoadpnlRDungeonLandAltTiles();
                LoadpnlRDungeonWaterTiles();
                LoadpnlRDungeonWaterAnimTiles();
                LoadpnlRDungeonAttributes();
                LoadpnlRDungeonItems();
                LoadpnlRDungeonNpcs();
                LoadpnlRDungeonTraps();
                LoadpnlRDungeonWeather();
                LoadpnlRDungeonGoal();
                LoadpnlRDungeonChambers();
                LoadpnlRDungeonMisc();

                //Structure
                for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) {

                    rdungeon.Floors[floor].TrapMin = nudTrapMin.Value;
                    rdungeon.Floors[floor].TrapMax = nudTrapMax.Value;
                    rdungeon.Floors[floor].ItemMin = nudItemMin.Value;
                    rdungeon.Floors[floor].ItemMax = nudItemMax.Value;
                    rdungeon.Floors[floor].RoomWidthMin = nudRoomWidthMin.Value;
                    rdungeon.Floors[floor].RoomWidthMax = nudRoomWidthMax.Value;
                    rdungeon.Floors[floor].RoomLengthMin = nudRoomLengthMin.Value;
                    rdungeon.Floors[floor].RoomLengthMax = nudRoomLengthMax.Value;
                    rdungeon.Floors[floor].HallTurnMin = nudHallTurnMin.Value;
                    rdungeon.Floors[floor].HallTurnMax = nudHallTurnMax.Value;
                    rdungeon.Floors[floor].HallVarMin = nudHallVarMin.Value;
                    rdungeon.Floors[floor].HallVarMax = nudHallVarMax.Value;
                    rdungeon.Floors[floor].WaterFrequency = nudWaterFrequency.Value;
                    rdungeon.Floors[floor].Craters = nudCraters.Value;
                    rdungeon.Floors[floor].CraterMinLength = nudCraterMinLength.Value;
                    rdungeon.Floors[floor].CraterMaxLength = nudCraterMaxLength.Value;
                    rdungeon.Floors[floor].CraterFuzzy = chkCraterFuzzy.Checked;

                    //Land Tiles
                    rdungeon.Floors[floor].StairsSheet = landTileNumbers[0, 19];
                    rdungeon.Floors[floor].mGroundSheet = landTileNumbers[0, 16];
                    rdungeon.Floors[floor].mTopLeftSheet = landTileNumbers[0, 10];
                    rdungeon.Floors[floor].mTopCenterSheet = landTileNumbers[0, 6];
                    rdungeon.Floors[floor].mTopRightSheet = landTileNumbers[0, 2];
                    rdungeon.Floors[floor].mCenterLeftSheet = landTileNumbers[0, 9];
                    rdungeon.Floors[floor].mCenterCenterSheet = landTileNumbers[0, 5];
                    rdungeon.Floors[floor].mCenterRightSheet = landTileNumbers[0, 1];
                    rdungeon.Floors[floor].mBottomLeftSheet = landTileNumbers[0, 8];
                    rdungeon.Floors[floor].mBottomCenterSheet = landTileNumbers[0, 4];
                    rdungeon.Floors[floor].mBottomRightSheet = landTileNumbers[0, 0];
                    rdungeon.Floors[floor].mInnerTopLeftSheet = landTileNumbers[0, 17];
                    rdungeon.Floors[floor].mInnerTopRightSheet = landTileNumbers[0, 20];
                    rdungeon.Floors[floor].mInnerBottomLeftSheet = landTileNumbers[0, 18];
                    rdungeon.Floors[floor].mInnerBottomRightSheet = landTileNumbers[0, 21];
                    rdungeon.Floors[floor].mIsolatedWallSheet = landTileNumbers[0, 15];
                    rdungeon.Floors[floor].mColumnTopSheet = landTileNumbers[0, 12];
                    rdungeon.Floors[floor].mColumnCenterSheet = landTileNumbers[0, 13];
                    rdungeon.Floors[floor].mColumnBottomSheet = landTileNumbers[0, 14];
                    rdungeon.Floors[floor].mRowLeftSheet = landTileNumbers[0, 3];
                    rdungeon.Floors[floor].mRowCenterSheet = landTileNumbers[0, 7];
                    rdungeon.Floors[floor].mRowRightSheet = landTileNumbers[0, 11];

                    rdungeon.Floors[floor].StairsX = landTileNumbers[1, 19];
                    rdungeon.Floors[floor].mGroundX = landTileNumbers[1, 16];
                    rdungeon.Floors[floor].mTopLeftX = landTileNumbers[1, 10];
                    rdungeon.Floors[floor].mTopCenterX = landTileNumbers[1, 6];
                    rdungeon.Floors[floor].mTopRightX = landTileNumbers[1, 2];
                    rdungeon.Floors[floor].mCenterLeftX = landTileNumbers[1, 9];
                    rdungeon.Floors[floor].mCenterCenterX = landTileNumbers[1, 5];
                    rdungeon.Floors[floor].mCenterRightX = landTileNumbers[1, 1];
                    rdungeon.Floors[floor].mBottomLeftX = landTileNumbers[1, 8];
                    rdungeon.Floors[floor].mBottomCenterX = landTileNumbers[1, 4];
                    rdungeon.Floors[floor].mBottomRightX = landTileNumbers[1, 0];
                    rdungeon.Floors[floor].mInnerTopLeftX = landTileNumbers[1, 17];
                    rdungeon.Floors[floor].mInnerTopRightX = landTileNumbers[1, 20];
                    rdungeon.Floors[floor].mInnerBottomLeftX = landTileNumbers[1, 18];
                    rdungeon.Floors[floor].mInnerBottomRightX = landTileNumbers[1, 21];
                    rdungeon.Floors[floor].mIsolatedWallX = landTileNumbers[1, 15];
                    rdungeon.Floors[floor].mColumnTopX = landTileNumbers[1, 12];
                    rdungeon.Floors[floor].mColumnCenterX = landTileNumbers[1, 13];
                    rdungeon.Floors[floor].mColumnBottomX = landTileNumbers[1, 14];
                    rdungeon.Floors[floor].mRowLeftX = landTileNumbers[1, 3];
                    rdungeon.Floors[floor].mRowCenterX = landTileNumbers[1, 7];
                    rdungeon.Floors[floor].mRowRightX = landTileNumbers[1, 11];

                    //Land Alt Tiles
                    rdungeon.Floors[floor].mGroundAlt2Sheet = landAltTileNumbers[0, 19];
                    rdungeon.Floors[floor].mGroundAltSheet = landAltTileNumbers[0, 16];
                    rdungeon.Floors[floor].mTopLeftAltSheet = landAltTileNumbers[0, 10];
                    rdungeon.Floors[floor].mTopCenterAltSheet = landAltTileNumbers[0, 6];
                    rdungeon.Floors[floor].mTopRightAltSheet = landAltTileNumbers[0, 2];
                    rdungeon.Floors[floor].mCenterLeftAltSheet = landAltTileNumbers[0, 9];
                    rdungeon.Floors[floor].mCenterCenterAltSheet = landAltTileNumbers[0, 5];
                    rdungeon.Floors[floor].mCenterCenterAlt2Sheet = landAltTileNumbers[0, 22];
                    rdungeon.Floors[floor].mCenterRightAltSheet = landAltTileNumbers[0, 1];
                    rdungeon.Floors[floor].mBottomLeftAltSheet = landAltTileNumbers[0, 8];
                    rdungeon.Floors[floor].mBottomCenterAltSheet = landAltTileNumbers[0, 4];
                    rdungeon.Floors[floor].mBottomRightAltSheet = landAltTileNumbers[0, 0];
                    rdungeon.Floors[floor].mInnerTopLeftAltSheet = landAltTileNumbers[0, 17];
                    rdungeon.Floors[floor].mInnerTopRightAltSheet = landAltTileNumbers[0, 20];
                    rdungeon.Floors[floor].mInnerBottomLeftAltSheet = landAltTileNumbers[0, 18];
                    rdungeon.Floors[floor].mInnerBottomRightAltSheet = landAltTileNumbers[0, 21];
                    rdungeon.Floors[floor].mIsolatedWallAltSheet = landAltTileNumbers[0, 15];
                    rdungeon.Floors[floor].mColumnTopAltSheet = landAltTileNumbers[0, 12];
                    rdungeon.Floors[floor].mColumnCenterAltSheet = landAltTileNumbers[0, 13];
                    rdungeon.Floors[floor].mColumnBottomAltSheet = landAltTileNumbers[0, 14];
                    rdungeon.Floors[floor].mRowLeftAltSheet = landAltTileNumbers[0, 3];
                    rdungeon.Floors[floor].mRowCenterAltSheet = landAltTileNumbers[0, 7];
                    rdungeon.Floors[floor].mRowRightAltSheet = landAltTileNumbers[0, 11];

                    rdungeon.Floors[floor].mGroundAlt2X = landAltTileNumbers[1, 19];
                    rdungeon.Floors[floor].mGroundAltX = landAltTileNumbers[1, 16];
                    rdungeon.Floors[floor].mTopLeftAltX = landAltTileNumbers[1, 10];
                    rdungeon.Floors[floor].mTopCenterAltX = landAltTileNumbers[1, 6];
                    rdungeon.Floors[floor].mTopRightAltX = landAltTileNumbers[1, 2];
                    rdungeon.Floors[floor].mCenterLeftAltX = landAltTileNumbers[1, 9];
                    rdungeon.Floors[floor].mCenterCenterAltX = landAltTileNumbers[1, 5];
                    rdungeon.Floors[floor].mCenterCenterAlt2X = landAltTileNumbers[1, 22];
                    rdungeon.Floors[floor].mCenterRightAltX = landAltTileNumbers[1, 1];
                    rdungeon.Floors[floor].mBottomLeftAltX = landAltTileNumbers[1, 8];
                    rdungeon.Floors[floor].mBottomCenterAltX = landAltTileNumbers[1, 4];
                    rdungeon.Floors[floor].mBottomRightAltX = landAltTileNumbers[1, 0];
                    rdungeon.Floors[floor].mInnerTopLeftAltX = landAltTileNumbers[1, 17];
                    rdungeon.Floors[floor].mInnerTopRightAltX = landAltTileNumbers[1, 20];
                    rdungeon.Floors[floor].mInnerBottomLeftAltX = landAltTileNumbers[1, 18];
                    rdungeon.Floors[floor].mInnerBottomRightAltX = landAltTileNumbers[1, 21];
                    rdungeon.Floors[floor].mIsolatedWallAltX = landAltTileNumbers[1, 15];
                    rdungeon.Floors[floor].mColumnTopAltX = landAltTileNumbers[1, 12];
                    rdungeon.Floors[floor].mColumnCenterAltX = landAltTileNumbers[1, 13];
                    rdungeon.Floors[floor].mColumnBottomAltX = landAltTileNumbers[1, 14];
                    rdungeon.Floors[floor].mRowLeftAltX = landAltTileNumbers[1, 3];
                    rdungeon.Floors[floor].mRowCenterAltX = landAltTileNumbers[1, 7];
                    rdungeon.Floors[floor].mRowRightAltX = landAltTileNumbers[1, 11];

                    //Water Tiles
                    rdungeon.Floors[floor].mShoreSurroundedSheet = waterTileNumbers[0, 15];
                    rdungeon.Floors[floor].mShoreInnerTopLeftSheet = waterTileNumbers[0, 0];
                    rdungeon.Floors[floor].mShoreTopSheet = waterTileNumbers[0, 4];
                    rdungeon.Floors[floor].mShoreInnerTopRightSheet = waterTileNumbers[0, 8];
                    rdungeon.Floors[floor].mShoreLeftSheet = waterTileNumbers[0, 1];
                    rdungeon.Floors[floor].mWaterSheet = waterTileNumbers[0, 5];
                    rdungeon.Floors[floor].mShoreRightSheet = waterTileNumbers[0, 9];
                    rdungeon.Floors[floor].mShoreInnerBottomLeftSheet = waterTileNumbers[0, 2];
                    rdungeon.Floors[floor].mShoreBottomSheet = waterTileNumbers[0, 6];
                    rdungeon.Floors[floor].mShoreInnerBottomRightSheet = waterTileNumbers[0, 10];
                    rdungeon.Floors[floor].mShoreTopLeftSheet = waterTileNumbers[0, 16];
                    rdungeon.Floors[floor].mShoreTopRightSheet = waterTileNumbers[0, 19];
                    rdungeon.Floors[floor].mShoreBottomLeftSheet = waterTileNumbers[0, 17];
                    rdungeon.Floors[floor].mShoreBottomRightSheet = waterTileNumbers[0, 20];
                    rdungeon.Floors[floor].mShoreDiagonalForwardSheet = waterTileNumbers[0, 18];
                    rdungeon.Floors[floor].mShoreDiagonalBackSheet = waterTileNumbers[0, 21];
                    rdungeon.Floors[floor].mShoreInnerTopSheet = waterTileNumbers[0, 12];
                    rdungeon.Floors[floor].mShoreVerticalSheet = waterTileNumbers[0, 13];
                    rdungeon.Floors[floor].mShoreInnerBottomSheet = waterTileNumbers[0, 14];
                    rdungeon.Floors[floor].mShoreInnerLeftSheet = waterTileNumbers[0, 3];
                    rdungeon.Floors[floor].mShoreHorizontalSheet = waterTileNumbers[0, 7];
                    rdungeon.Floors[floor].mShoreInnerRightSheet = waterTileNumbers[0, 11];

                    rdungeon.Floors[floor].mShoreSurroundedX = waterTileNumbers[1, 15];
                    rdungeon.Floors[floor].mShoreInnerTopLeftX = waterTileNumbers[1, 0];
                    rdungeon.Floors[floor].mShoreTopX = waterTileNumbers[1, 4];
                    rdungeon.Floors[floor].mShoreInnerTopRightX = waterTileNumbers[1, 8];
                    rdungeon.Floors[floor].mShoreLeftX = waterTileNumbers[1, 1];
                    rdungeon.Floors[floor].mWaterX = waterTileNumbers[1, 5];
                    rdungeon.Floors[floor].mShoreRightX = waterTileNumbers[1, 9];
                    rdungeon.Floors[floor].mShoreInnerBottomLeftX = waterTileNumbers[1, 2];
                    rdungeon.Floors[floor].mShoreBottomX = waterTileNumbers[1, 6];
                    rdungeon.Floors[floor].mShoreInnerBottomRightX = waterTileNumbers[1, 10];
                    rdungeon.Floors[floor].mShoreTopLeftX = waterTileNumbers[1, 16];
                    rdungeon.Floors[floor].mShoreTopRightX = waterTileNumbers[1, 19];
                    rdungeon.Floors[floor].mShoreBottomLeftX = waterTileNumbers[1, 17];
                    rdungeon.Floors[floor].mShoreBottomRightX = waterTileNumbers[1, 20];
                    rdungeon.Floors[floor].mShoreDiagonalForwardX = waterTileNumbers[1, 18];
                    rdungeon.Floors[floor].mShoreDiagonalBackX = waterTileNumbers[1, 21];
                    rdungeon.Floors[floor].mShoreInnerTopX = waterTileNumbers[1, 12];
                    rdungeon.Floors[floor].mShoreVerticalX = waterTileNumbers[1, 13];
                    rdungeon.Floors[floor].mShoreInnerBottomX = waterTileNumbers[1, 14];
                    rdungeon.Floors[floor].mShoreInnerLeftX = waterTileNumbers[1, 3];
                    rdungeon.Floors[floor].mShoreHorizontalX = waterTileNumbers[1, 7];
                    rdungeon.Floors[floor].mShoreInnerRightX = waterTileNumbers[1, 11];

                    //Water Anim Tiles
                    rdungeon.Floors[floor].mShoreSurroundedAnimSheet = waterAnimTileNumbers[0, 15];
                    rdungeon.Floors[floor].mShoreInnerTopLeftAnimSheet = waterAnimTileNumbers[0, 0];
                    rdungeon.Floors[floor].mShoreTopAnimSheet = waterAnimTileNumbers[0, 4];
                    rdungeon.Floors[floor].mShoreInnerTopRightAnimSheet = waterAnimTileNumbers[0, 8];
                    rdungeon.Floors[floor].mShoreLeftAnimSheet = waterAnimTileNumbers[0, 1];
                    rdungeon.Floors[floor].mWaterAnimSheet = waterAnimTileNumbers[0, 5];
                    rdungeon.Floors[floor].mShoreRightAnimSheet = waterAnimTileNumbers[0, 9];
                    rdungeon.Floors[floor].mShoreInnerBottomLeftAnimSheet = waterAnimTileNumbers[0, 2];
                    rdungeon.Floors[floor].mShoreBottomAnimSheet = waterAnimTileNumbers[0, 6];
                    rdungeon.Floors[floor].mShoreInnerBottomRightAnimSheet = waterAnimTileNumbers[0, 10];
                    rdungeon.Floors[floor].mShoreTopLeftAnimSheet = waterAnimTileNumbers[0, 16];
                    rdungeon.Floors[floor].mShoreTopRightAnimSheet = waterAnimTileNumbers[0, 19];
                    rdungeon.Floors[floor].mShoreBottomLeftAnimSheet = waterAnimTileNumbers[0, 17];
                    rdungeon.Floors[floor].mShoreBottomRightAnimSheet = waterAnimTileNumbers[0, 20];
                    rdungeon.Floors[floor].mShoreDiagonalForwardAnimSheet = waterAnimTileNumbers[0, 18];
                    rdungeon.Floors[floor].mShoreDiagonalBackAnimSheet = waterAnimTileNumbers[0, 21];
                    rdungeon.Floors[floor].mShoreInnerTopAnimSheet = waterAnimTileNumbers[0, 12];
                    rdungeon.Floors[floor].mShoreVerticalAnimSheet = waterAnimTileNumbers[0, 13];
                    rdungeon.Floors[floor].mShoreInnerBottomAnimSheet = waterAnimTileNumbers[0, 14];
                    rdungeon.Floors[floor].mShoreInnerLeftAnimSheet = waterAnimTileNumbers[0, 3];
                    rdungeon.Floors[floor].mShoreHorizontalAnimSheet = waterAnimTileNumbers[0, 7];
                    rdungeon.Floors[floor].mShoreInnerRightAnimSheet = waterAnimTileNumbers[0, 11];

                    rdungeon.Floors[floor].mShoreSurroundedAnimX = waterAnimTileNumbers[1, 15];
                    rdungeon.Floors[floor].mShoreInnerTopLeftAnimX = waterAnimTileNumbers[1, 0];
                    rdungeon.Floors[floor].mShoreTopAnimX = waterAnimTileNumbers[1, 4];
                    rdungeon.Floors[floor].mShoreInnerTopRightAnimX = waterAnimTileNumbers[1, 8];
                    rdungeon.Floors[floor].mShoreLeftAnimX = waterAnimTileNumbers[1, 1];
                    rdungeon.Floors[floor].mWaterAnimX = waterAnimTileNumbers[1, 5];
                    rdungeon.Floors[floor].mShoreRightAnimX = waterAnimTileNumbers[1, 9];
                    rdungeon.Floors[floor].mShoreInnerBottomLeftAnimX = waterAnimTileNumbers[1, 2];
                    rdungeon.Floors[floor].mShoreBottomAnimX = waterAnimTileNumbers[1, 6];
                    rdungeon.Floors[floor].mShoreInnerBottomRightAnimX = waterAnimTileNumbers[1, 10];
                    rdungeon.Floors[floor].mShoreTopLeftAnimX = waterAnimTileNumbers[1, 16];
                    rdungeon.Floors[floor].mShoreTopRightAnimX = waterAnimTileNumbers[1, 19];
                    rdungeon.Floors[floor].mShoreBottomLeftAnimX = waterAnimTileNumbers[1, 17];
                    rdungeon.Floors[floor].mShoreBottomRightAnimX = waterAnimTileNumbers[1, 20];
                    rdungeon.Floors[floor].mShoreDiagonalForwardAnimX = waterAnimTileNumbers[1, 18];
                    rdungeon.Floors[floor].mShoreDiagonalBackAnimX = waterAnimTileNumbers[1, 21];
                    rdungeon.Floors[floor].mShoreInnerTopAnimX = waterAnimTileNumbers[1, 12];
                    rdungeon.Floors[floor].mShoreVerticalAnimX = waterAnimTileNumbers[1, 13];
                    rdungeon.Floors[floor].mShoreInnerBottomAnimX = waterAnimTileNumbers[1, 14];
                    rdungeon.Floors[floor].mShoreInnerLeftAnimX = waterAnimTileNumbers[1, 3];
                    rdungeon.Floors[floor].mShoreHorizontalAnimX = waterAnimTileNumbers[1, 7];
                    rdungeon.Floors[floor].mShoreInnerRightAnimX = waterAnimTileNumbers[1, 11];

                    //Attributes
                    rdungeon.Floors[floor].GroundTile.Type = (Enums.TileType)cbGroundType.SelectedIndex;
                    rdungeon.Floors[floor].GroundTile.Data1 = nudGroundData1.Value;
                    rdungeon.Floors[floor].GroundTile.Data2 = nudGroundData2.Value;
                    rdungeon.Floors[floor].GroundTile.Data3 = nudGroundData3.Value;
                    rdungeon.Floors[floor].GroundTile.String1 = txtGroundString1.Text;
                    rdungeon.Floors[floor].GroundTile.String2 = txtGroundString2.Text;
                    rdungeon.Floors[floor].GroundTile.String3 = txtGroundString3.Text;

                    rdungeon.Floors[floor].HallTile.Type = (Enums.TileType)cbHallType.SelectedIndex;
                    rdungeon.Floors[floor].HallTile.Data1 = nudHallData1.Value;
                    rdungeon.Floors[floor].HallTile.Data2 = nudHallData2.Value;
                    rdungeon.Floors[floor].HallTile.Data3 = nudHallData3.Value;
                    rdungeon.Floors[floor].HallTile.String1 = txtHallString1.Text;
                    rdungeon.Floors[floor].HallTile.String2 = txtHallString2.Text;
                    rdungeon.Floors[floor].HallTile.String3 = txtHallString3.Text;

                    rdungeon.Floors[floor].WaterTile.Type = (Enums.TileType)cbWaterType.SelectedIndex;
                    rdungeon.Floors[floor].WaterTile.Data1 = nudWaterData1.Value;
                    rdungeon.Floors[floor].WaterTile.Data2 = nudWaterData2.Value;
                    rdungeon.Floors[floor].WaterTile.Data3 = nudWaterData3.Value;
                    rdungeon.Floors[floor].WaterTile.String1 = txtWaterString1.Text;
                    rdungeon.Floors[floor].WaterTile.String2 = txtWaterString2.Text;
                    rdungeon.Floors[floor].WaterTile.String3 = txtWaterString3.Text;

                    rdungeon.Floors[floor].WallTile.Type = (Enums.TileType)cbWallType.SelectedIndex;
                    rdungeon.Floors[floor].WallTile.Data1 = nudWallData1.Value;
                    rdungeon.Floors[floor].WallTile.Data2 = nudWallData2.Value;
                    rdungeon.Floors[floor].WallTile.Data3 = nudWallData3.Value;
                    rdungeon.Floors[floor].WallTile.String1 = txtWallString1.Text;
                    rdungeon.Floors[floor].WallTile.String2 = txtWallString2.Text;
                    rdungeon.Floors[floor].WallTile.String3 = txtWallString3.Text;

                    //Items
                    rdungeon.Floors[floor].Items.Clear();
                    for (int item = 0; item < itemList.Count; item++) {
                        EditableRDungeonItem newItem = new EditableRDungeonItem();
                        newItem.ItemNum = itemList[item].ItemNum;
                        newItem.MinAmount = itemList[item].MinAmount;
                        newItem.MaxAmount = itemList[item].MaxAmount;
                        newItem.AppearanceRate = itemList[item].AppearanceRate;
                        newItem.StickyRate = itemList[item].StickyRate;
                        newItem.Tag = itemList[item].Tag;
                        newItem.Hidden = itemList[item].Hidden;
                        newItem.OnGround = itemList[item].OnGround;
                        newItem.OnWater = itemList[item].OnWater;
                        newItem.OnWall = itemList[item].OnWall;

                        rdungeon.Floors[floor].Items.Add(newItem);
                    }

                    //Npcs
                    rdungeon.Floors[floor].NpcSpawnTime = nudNpcSpawnTime.Value;
                    rdungeon.Floors[floor].NpcMin = nudNpcMin.Value;
                    rdungeon.Floors[floor].NpcMax = nudNpcMax.Value;

                    rdungeon.Floors[floor].Npcs.Clear();
                    for (int npc = 0; npc < npcList.Count; npc++) {
                        MapNpcSettings newNpc = new MapNpcSettings();
                        newNpc.NpcNum = npcList[npc].NpcNum;
                        newNpc.MinLevel = npcList[npc].MinLevel;
                        newNpc.MaxLevel = npcList[npc].MaxLevel;
                        newNpc.AppearanceRate = npcList[npc].AppearanceRate;
                        newNpc.StartStatus = npcList[npc].StartStatus;
                        newNpc.StartStatusCounter = npcList[npc].StartStatusCounter;
                        newNpc.StartStatusChance = npcList[npc].StartStatusChance;

                        rdungeon.Floors[floor].Npcs.Add(newNpc);
                    }

                    //Traps
                    rdungeon.Floors[floor].SpecialTiles.Clear();
                    for (int traps = 0; traps < trapList.Count; traps++) {
                        EditableRDungeonTrap newTile = new EditableRDungeonTrap();

                        newTile.SpecialTile.Ground = trapList[traps].SpecialTile.Ground;
                        newTile.SpecialTile.GroundAnim = trapList[traps].SpecialTile.GroundAnim;
                        newTile.SpecialTile.Mask = trapList[traps].SpecialTile.Mask;
                        newTile.SpecialTile.Anim = trapList[traps].SpecialTile.Anim;
                        newTile.SpecialTile.Mask2 = trapList[traps].SpecialTile.Mask2;
                        newTile.SpecialTile.M2Anim = trapList[traps].SpecialTile.M2Anim;
                        newTile.SpecialTile.Fringe = trapList[traps].SpecialTile.Fringe;
                        newTile.SpecialTile.FAnim = trapList[traps].SpecialTile.FAnim;
                        newTile.SpecialTile.Fringe2 = trapList[traps].SpecialTile.Fringe2;
                        newTile.SpecialTile.F2Anim = trapList[traps].SpecialTile.F2Anim;

                        newTile.SpecialTile.GroundSet = trapList[traps].SpecialTile.GroundSet;
                        newTile.SpecialTile.GroundAnimSet = trapList[traps].SpecialTile.GroundAnimSet;
                        newTile.SpecialTile.MaskSet = trapList[traps].SpecialTile.MaskSet;
                        newTile.SpecialTile.AnimSet = trapList[traps].SpecialTile.AnimSet;
                        newTile.SpecialTile.Mask2Set = trapList[traps].SpecialTile.Mask2Set;
                        newTile.SpecialTile.M2AnimSet = trapList[traps].SpecialTile.M2AnimSet;
                        newTile.SpecialTile.FringeSet = trapList[traps].SpecialTile.FringeSet;
                        newTile.SpecialTile.FAnimSet = trapList[traps].SpecialTile.FAnimSet;
                        newTile.SpecialTile.Fringe2Set = trapList[traps].SpecialTile.Fringe2Set;
                        newTile.SpecialTile.F2AnimSet = trapList[traps].SpecialTile.F2AnimSet;

                        newTile.SpecialTile.Type = trapList[traps].SpecialTile.Type;
                        newTile.SpecialTile.Data1 = trapList[traps].SpecialTile.Data1;
                        newTile.SpecialTile.Data2 = trapList[traps].SpecialTile.Data2;
                        newTile.SpecialTile.Data3 = trapList[traps].SpecialTile.Data3;
                        newTile.SpecialTile.String1 = trapList[traps].SpecialTile.String1;
                        newTile.SpecialTile.String2 = trapList[traps].SpecialTile.String2;
                        newTile.SpecialTile.String3 = trapList[traps].SpecialTile.String3;

                        newTile.AppearanceRate = trapList[traps].AppearanceRate;

                        rdungeon.Floors[floor].SpecialTiles.Add(newTile);
                    }

                    //Weather
                    rdungeon.Floors[floor].Weather.Clear();
                    for (int weather = 0; weather < lbxWeather.Items.Count; weather++) {
                        string[] weatherindex = lbxWeather.Items[weather].TextIdentifier.Split(':');
                        if (weatherindex[1].IsNumeric()) {
                            rdungeon.Floors[floor].Weather.Add((Enums.Weather)weatherindex[1].ToInt());
                        }
                    }

                    //Goal
                    if (optNextFloor.Checked) {
                        rdungeon.Floors[floor].GoalType = Enums.RFloorGoalType.NextFloor;
                    } else if (optMap.Checked) {
                        rdungeon.Floors[floor].GoalType = Enums.RFloorGoalType.Map;
                    } else if (optScripted.Checked) {
                        rdungeon.Floors[floor].GoalType = Enums.RFloorGoalType.Scripted;
                    } else {
                        rdungeon.Floors[floor].GoalType = Enums.RFloorGoalType.NextFloor;
                    }

                    rdungeon.Floors[floor].GoalMap = nudData1.Value;
                    rdungeon.Floors[floor].GoalX = nudData2.Value;
                    rdungeon.Floors[floor].GoalY = nudData3.Value;

                    //chambers
                    rdungeon.Floors[floor].Chambers.Clear();
                    for (int chamber = 0; chamber < chamberList.Count; chamber++) {
                        EditableRDungeonChamber addedChamber = new EditableRDungeonChamber();
                        addedChamber.ChamberNum = chamberList[chamber].ChamberNum;
                        addedChamber.String1 = chamberList[chamber].String1;
                        addedChamber.String2 = chamberList[chamber].String2;
                        addedChamber.String3 = chamberList[chamber].String3;
                        rdungeon.Floors[floor].Chambers.Add(addedChamber);

                    }

                    //Misc
                    rdungeon.Floors[floor].Darkness = nudDarkness.Value;
                    if (lbxMusic.SelectedItems.Count != 1 || lbxMusic.Items[0].Selected) {
                        rdungeon.Floors[floor].Music = "";
                    } else {
                        rdungeon.Floors[floor].Music = lbxMusic.SelectedItems[0].TextIdentifier;
                    }

                }

                lblSaveLoadMessage.Text = "All settings saved to floor(s)";
            } else if (pnlRDungeonStructure != null && pnlRDungeonStructure.Visible == true) {
                for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) {

                    rdungeon.Floors[floor].TrapMin = nudTrapMin.Value;
                    rdungeon.Floors[floor].TrapMax = nudTrapMax.Value;
                    rdungeon.Floors[floor].ItemMin = nudItemMin.Value;
                    rdungeon.Floors[floor].ItemMax = nudItemMax.Value;
                    rdungeon.Floors[floor].RoomWidthMin = nudRoomWidthMin.Value;
                    rdungeon.Floors[floor].RoomWidthMax = nudRoomWidthMax.Value;
                    rdungeon.Floors[floor].RoomLengthMin = nudRoomLengthMin.Value;
                    rdungeon.Floors[floor].RoomLengthMax = nudRoomLengthMax.Value;
                    rdungeon.Floors[floor].HallTurnMin = nudHallTurnMin.Value;
                    rdungeon.Floors[floor].HallTurnMax = nudHallTurnMax.Value;
                    rdungeon.Floors[floor].HallVarMin = nudHallVarMin.Value;
                    rdungeon.Floors[floor].HallVarMax = nudHallVarMax.Value;
                    rdungeon.Floors[floor].WaterFrequency = nudWaterFrequency.Value;
                    rdungeon.Floors[floor].Craters = nudCraters.Value;
                    rdungeon.Floors[floor].CraterMinLength = nudCraterMinLength.Value;
                    rdungeon.Floors[floor].CraterMaxLength = nudCraterMaxLength.Value;
                    rdungeon.Floors[floor].CraterFuzzy = chkCraterFuzzy.Checked;

                }
                lblSaveLoadMessage.Text = "Structure settings saved to floor(s)";
            } else if (pnlRDungeonLandTiles != null && pnlRDungeonLandTiles.Visible == true) {
                for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) {

                    rdungeon.Floors[floor].StairsSheet = landTileNumbers[0, 19];
                    rdungeon.Floors[floor].mGroundSheet = landTileNumbers[0, 16];
                    rdungeon.Floors[floor].mTopLeftSheet = landTileNumbers[0, 10];
                    rdungeon.Floors[floor].mTopCenterSheet = landTileNumbers[0, 6];
                    rdungeon.Floors[floor].mTopRightSheet = landTileNumbers[0, 2];
                    rdungeon.Floors[floor].mCenterLeftSheet = landTileNumbers[0, 9];
                    rdungeon.Floors[floor].mCenterCenterSheet = landTileNumbers[0, 5];
                    rdungeon.Floors[floor].mCenterRightSheet = landTileNumbers[0, 1];
                    rdungeon.Floors[floor].mBottomLeftSheet = landTileNumbers[0, 8];
                    rdungeon.Floors[floor].mBottomCenterSheet = landTileNumbers[0, 4];
                    rdungeon.Floors[floor].mBottomRightSheet = landTileNumbers[0, 0];
                    rdungeon.Floors[floor].mInnerTopLeftSheet = landTileNumbers[0, 17];
                    rdungeon.Floors[floor].mInnerTopRightSheet = landTileNumbers[0, 20];
                    rdungeon.Floors[floor].mInnerBottomLeftSheet = landTileNumbers[0, 18];
                    rdungeon.Floors[floor].mInnerBottomRightSheet = landTileNumbers[0, 21];
                    rdungeon.Floors[floor].mIsolatedWallSheet = landTileNumbers[0, 15];
                    rdungeon.Floors[floor].mColumnTopSheet = landTileNumbers[0, 12];
                    rdungeon.Floors[floor].mColumnCenterSheet = landTileNumbers[0, 13];
                    rdungeon.Floors[floor].mColumnBottomSheet = landTileNumbers[0, 14];
                    rdungeon.Floors[floor].mRowLeftSheet = landTileNumbers[0, 3];
                    rdungeon.Floors[floor].mRowCenterSheet = landTileNumbers[0, 7];
                    rdungeon.Floors[floor].mRowRightSheet = landTileNumbers[0, 11];

                    rdungeon.Floors[floor].StairsX = landTileNumbers[1, 19];
                    rdungeon.Floors[floor].mGroundX = landTileNumbers[1, 16];
                    rdungeon.Floors[floor].mTopLeftX = landTileNumbers[1, 10];
                    rdungeon.Floors[floor].mTopCenterX = landTileNumbers[1, 6];
                    rdungeon.Floors[floor].mTopRightX = landTileNumbers[1, 2];
                    rdungeon.Floors[floor].mCenterLeftX = landTileNumbers[1, 9];
                    rdungeon.Floors[floor].mCenterCenterX = landTileNumbers[1, 5];
                    rdungeon.Floors[floor].mCenterRightX = landTileNumbers[1, 1];
                    rdungeon.Floors[floor].mBottomLeftX = landTileNumbers[1, 8];
                    rdungeon.Floors[floor].mBottomCenterX = landTileNumbers[1, 4];
                    rdungeon.Floors[floor].mBottomRightX = landTileNumbers[1, 0];
                    rdungeon.Floors[floor].mInnerTopLeftX = landTileNumbers[1, 17];
                    rdungeon.Floors[floor].mInnerTopRightX = landTileNumbers[1, 20];
                    rdungeon.Floors[floor].mInnerBottomLeftX = landTileNumbers[1, 18];
                    rdungeon.Floors[floor].mInnerBottomRightX = landTileNumbers[1, 21];
                    rdungeon.Floors[floor].mIsolatedWallX = landTileNumbers[1, 15];
                    rdungeon.Floors[floor].mColumnTopX = landTileNumbers[1, 12];
                    rdungeon.Floors[floor].mColumnCenterX = landTileNumbers[1, 13];
                    rdungeon.Floors[floor].mColumnBottomX = landTileNumbers[1, 14];
                    rdungeon.Floors[floor].mRowLeftX = landTileNumbers[1, 3];
                    rdungeon.Floors[floor].mRowCenterX = landTileNumbers[1, 7];
                    rdungeon.Floors[floor].mRowRightX = landTileNumbers[1, 11];

                }
                lblSaveLoadMessage.Text = "Land Tile settings saved to floor(s)";
            } else if (pnlRDungeonLandAltTiles != null && pnlRDungeonLandAltTiles.Visible == true) {
                for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) {
                    rdungeon.Floors[floor].mGroundAlt2Sheet = landAltTileNumbers[0, 19];
                    rdungeon.Floors[floor].mGroundAltSheet = landAltTileNumbers[0, 16];
                    rdungeon.Floors[floor].mTopLeftAltSheet = landAltTileNumbers[0, 10];
                    rdungeon.Floors[floor].mTopCenterAltSheet = landAltTileNumbers[0, 6];
                    rdungeon.Floors[floor].mTopRightAltSheet = landAltTileNumbers[0, 2];
                    rdungeon.Floors[floor].mCenterLeftAltSheet = landAltTileNumbers[0, 9];
                    rdungeon.Floors[floor].mCenterCenterAltSheet = landAltTileNumbers[0, 5];
                    rdungeon.Floors[floor].mCenterCenterAlt2Sheet = landAltTileNumbers[0, 22];
                    rdungeon.Floors[floor].mCenterRightAltSheet = landAltTileNumbers[0, 1];
                    rdungeon.Floors[floor].mBottomLeftAltSheet = landAltTileNumbers[0, 8];
                    rdungeon.Floors[floor].mBottomCenterAltSheet = landAltTileNumbers[0, 4];
                    rdungeon.Floors[floor].mBottomRightAltSheet = landAltTileNumbers[0, 0];
                    rdungeon.Floors[floor].mInnerTopLeftAltSheet = landAltTileNumbers[0, 17];
                    rdungeon.Floors[floor].mInnerTopRightAltSheet = landAltTileNumbers[0, 20];
                    rdungeon.Floors[floor].mInnerBottomLeftAltSheet = landAltTileNumbers[0, 18];
                    rdungeon.Floors[floor].mInnerBottomRightAltSheet = landAltTileNumbers[0, 21];
                    rdungeon.Floors[floor].mIsolatedWallAltSheet = landAltTileNumbers[0, 15];
                    rdungeon.Floors[floor].mColumnTopAltSheet = landAltTileNumbers[0, 12];
                    rdungeon.Floors[floor].mColumnCenterAltSheet = landAltTileNumbers[0, 13];
                    rdungeon.Floors[floor].mColumnBottomAltSheet = landAltTileNumbers[0, 14];
                    rdungeon.Floors[floor].mRowLeftAltSheet = landAltTileNumbers[0, 3];
                    rdungeon.Floors[floor].mRowCenterAltSheet = landAltTileNumbers[0, 7];
                    rdungeon.Floors[floor].mRowRightAltSheet = landAltTileNumbers[0, 11];

                    rdungeon.Floors[floor].mGroundAlt2X = landAltTileNumbers[1, 19];
                    rdungeon.Floors[floor].mGroundAltX = landAltTileNumbers[1, 16];
                    rdungeon.Floors[floor].mTopLeftAltX = landAltTileNumbers[1, 10];
                    rdungeon.Floors[floor].mTopCenterAltX = landAltTileNumbers[1, 6];
                    rdungeon.Floors[floor].mTopRightAltX = landAltTileNumbers[1, 2];
                    rdungeon.Floors[floor].mCenterLeftAltX = landAltTileNumbers[1, 9];
                    rdungeon.Floors[floor].mCenterCenterAltX = landAltTileNumbers[1, 5];
                    rdungeon.Floors[floor].mCenterCenterAlt2X = landAltTileNumbers[1, 22];
                    rdungeon.Floors[floor].mCenterRightAltX = landAltTileNumbers[1, 1];
                    rdungeon.Floors[floor].mBottomLeftAltX = landAltTileNumbers[1, 8];
                    rdungeon.Floors[floor].mBottomCenterAltX = landAltTileNumbers[1, 4];
                    rdungeon.Floors[floor].mBottomRightAltX = landAltTileNumbers[1, 0];
                    rdungeon.Floors[floor].mInnerTopLeftAltX = landAltTileNumbers[1, 17];
                    rdungeon.Floors[floor].mInnerTopRightAltX = landAltTileNumbers[1, 20];
                    rdungeon.Floors[floor].mInnerBottomLeftAltX = landAltTileNumbers[1, 18];
                    rdungeon.Floors[floor].mInnerBottomRightAltX = landAltTileNumbers[1, 21];
                    rdungeon.Floors[floor].mIsolatedWallAltX = landAltTileNumbers[1, 15];
                    rdungeon.Floors[floor].mColumnTopAltX = landAltTileNumbers[1, 12];
                    rdungeon.Floors[floor].mColumnCenterAltX = landAltTileNumbers[1, 13];
                    rdungeon.Floors[floor].mColumnBottomAltX = landAltTileNumbers[1, 14];
                    rdungeon.Floors[floor].mRowLeftAltX = landAltTileNumbers[1, 3];
                    rdungeon.Floors[floor].mRowCenterAltX = landAltTileNumbers[1, 7];
                    rdungeon.Floors[floor].mRowRightAltX = landAltTileNumbers[1, 11];

                }
                lblSaveLoadMessage.Text = "Land Alt Tile settings saved to floor(s)";
            } else if (pnlRDungeonWaterTiles != null && pnlRDungeonWaterTiles.Visible == true) {
                for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) {

                    rdungeon.Floors[floor].mShoreSurroundedSheet = waterTileNumbers[0, 15];
                    rdungeon.Floors[floor].mShoreInnerTopLeftSheet = waterTileNumbers[0, 0];
                    rdungeon.Floors[floor].mShoreTopSheet = waterTileNumbers[0, 4];
                    rdungeon.Floors[floor].mShoreInnerTopRightSheet = waterTileNumbers[0, 8];
                    rdungeon.Floors[floor].mShoreLeftSheet = waterTileNumbers[0, 1];
                    rdungeon.Floors[floor].mWaterSheet = waterTileNumbers[0, 5];
                    rdungeon.Floors[floor].mShoreRightSheet = waterTileNumbers[0, 9];
                    rdungeon.Floors[floor].mShoreInnerBottomLeftSheet = waterTileNumbers[0, 2];
                    rdungeon.Floors[floor].mShoreBottomSheet = waterTileNumbers[0, 6];
                    rdungeon.Floors[floor].mShoreInnerBottomRightSheet = waterTileNumbers[0, 10];
                    rdungeon.Floors[floor].mShoreTopLeftSheet = waterTileNumbers[0, 16];
                    rdungeon.Floors[floor].mShoreTopRightSheet = waterTileNumbers[0, 19];
                    rdungeon.Floors[floor].mShoreBottomLeftSheet = waterTileNumbers[0, 17];
                    rdungeon.Floors[floor].mShoreBottomRightSheet = waterTileNumbers[0, 20];
                    rdungeon.Floors[floor].mShoreDiagonalForwardSheet = waterTileNumbers[0, 18];
                    rdungeon.Floors[floor].mShoreDiagonalBackSheet = waterTileNumbers[0, 21];
                    rdungeon.Floors[floor].mShoreInnerTopSheet = waterTileNumbers[0, 12];
                    rdungeon.Floors[floor].mShoreVerticalSheet = waterTileNumbers[0, 13];
                    rdungeon.Floors[floor].mShoreInnerBottomSheet = waterTileNumbers[0, 14];
                    rdungeon.Floors[floor].mShoreInnerLeftSheet = waterTileNumbers[0, 3];
                    rdungeon.Floors[floor].mShoreHorizontalSheet = waterTileNumbers[0, 7];
                    rdungeon.Floors[floor].mShoreInnerRightSheet = waterTileNumbers[0, 11];

                    rdungeon.Floors[floor].mShoreSurroundedX = waterTileNumbers[1, 15];
                    rdungeon.Floors[floor].mShoreInnerTopLeftX = waterTileNumbers[1, 0];
                    rdungeon.Floors[floor].mShoreTopX = waterTileNumbers[1, 4];
                    rdungeon.Floors[floor].mShoreInnerTopRightX = waterTileNumbers[1, 8];
                    rdungeon.Floors[floor].mShoreLeftX = waterTileNumbers[1, 1];
                    rdungeon.Floors[floor].mWaterX = waterTileNumbers[1, 5];
                    rdungeon.Floors[floor].mShoreRightX = waterTileNumbers[1, 9];
                    rdungeon.Floors[floor].mShoreInnerBottomLeftX = waterTileNumbers[1, 2];
                    rdungeon.Floors[floor].mShoreBottomX = waterTileNumbers[1, 6];
                    rdungeon.Floors[floor].mShoreInnerBottomRightX = waterTileNumbers[1, 10];
                    rdungeon.Floors[floor].mShoreTopLeftX = waterTileNumbers[1, 16];
                    rdungeon.Floors[floor].mShoreTopRightX = waterTileNumbers[1, 19];
                    rdungeon.Floors[floor].mShoreBottomLeftX = waterTileNumbers[1, 17];
                    rdungeon.Floors[floor].mShoreBottomRightX = waterTileNumbers[1, 20];
                    rdungeon.Floors[floor].mShoreDiagonalForwardX = waterTileNumbers[1, 18];
                    rdungeon.Floors[floor].mShoreDiagonalBackX = waterTileNumbers[1, 21];
                    rdungeon.Floors[floor].mShoreInnerTopX = waterTileNumbers[1, 12];
                    rdungeon.Floors[floor].mShoreVerticalX = waterTileNumbers[1, 13];
                    rdungeon.Floors[floor].mShoreInnerBottomX = waterTileNumbers[1, 14];
                    rdungeon.Floors[floor].mShoreInnerLeftX = waterTileNumbers[1, 3];
                    rdungeon.Floors[floor].mShoreHorizontalX = waterTileNumbers[1, 7];
                    rdungeon.Floors[floor].mShoreInnerRightX = waterTileNumbers[1, 11];

                }
                lblSaveLoadMessage.Text = "Water Tile settings saved to floor(s)";
            } else if (pnlRDungeonWaterAnimTiles != null && pnlRDungeonWaterAnimTiles.Visible == true) {
                for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) {

                    rdungeon.Floors[floor].mShoreSurroundedAnimSheet = waterAnimTileNumbers[0, 15];
                    rdungeon.Floors[floor].mShoreInnerTopLeftAnimSheet = waterAnimTileNumbers[0, 0];
                    rdungeon.Floors[floor].mShoreTopAnimSheet = waterAnimTileNumbers[0, 4];
                    rdungeon.Floors[floor].mShoreInnerTopRightAnimSheet = waterAnimTileNumbers[0, 8];
                    rdungeon.Floors[floor].mShoreLeftAnimSheet = waterAnimTileNumbers[0, 1];
                    rdungeon.Floors[floor].mWaterAnimSheet = waterAnimTileNumbers[0, 5];
                    rdungeon.Floors[floor].mShoreRightAnimSheet = waterAnimTileNumbers[0, 9];
                    rdungeon.Floors[floor].mShoreInnerBottomLeftAnimSheet = waterAnimTileNumbers[0, 2];
                    rdungeon.Floors[floor].mShoreBottomAnimSheet = waterAnimTileNumbers[0, 6];
                    rdungeon.Floors[floor].mShoreInnerBottomRightAnimSheet = waterAnimTileNumbers[0, 10];
                    rdungeon.Floors[floor].mShoreTopLeftAnimSheet = waterAnimTileNumbers[0, 16];
                    rdungeon.Floors[floor].mShoreTopRightAnimSheet = waterAnimTileNumbers[0, 19];
                    rdungeon.Floors[floor].mShoreBottomLeftAnimSheet = waterAnimTileNumbers[0, 17];
                    rdungeon.Floors[floor].mShoreBottomRightAnimSheet = waterAnimTileNumbers[0, 20];
                    rdungeon.Floors[floor].mShoreDiagonalForwardAnimSheet = waterAnimTileNumbers[0, 18];
                    rdungeon.Floors[floor].mShoreDiagonalBackAnimSheet = waterAnimTileNumbers[0, 21];
                    rdungeon.Floors[floor].mShoreInnerTopAnimSheet = waterAnimTileNumbers[0, 12];
                    rdungeon.Floors[floor].mShoreVerticalAnimSheet = waterAnimTileNumbers[0, 13];
                    rdungeon.Floors[floor].mShoreInnerBottomAnimSheet = waterAnimTileNumbers[0, 14];
                    rdungeon.Floors[floor].mShoreInnerLeftAnimSheet = waterAnimTileNumbers[0, 3];
                    rdungeon.Floors[floor].mShoreHorizontalAnimSheet = waterAnimTileNumbers[0, 7];
                    rdungeon.Floors[floor].mShoreInnerRightAnimSheet = waterAnimTileNumbers[0, 11];

                    rdungeon.Floors[floor].mShoreSurroundedAnimX = waterAnimTileNumbers[1, 15];
                    rdungeon.Floors[floor].mShoreInnerTopLeftAnimX = waterAnimTileNumbers[1, 0];
                    rdungeon.Floors[floor].mShoreTopAnimX = waterAnimTileNumbers[1, 4];
                    rdungeon.Floors[floor].mShoreInnerTopRightAnimX = waterAnimTileNumbers[1, 8];
                    rdungeon.Floors[floor].mShoreLeftAnimX = waterAnimTileNumbers[1, 1];
                    rdungeon.Floors[floor].mWaterAnimX = waterAnimTileNumbers[1, 5];
                    rdungeon.Floors[floor].mShoreRightAnimX = waterAnimTileNumbers[1, 9];
                    rdungeon.Floors[floor].mShoreInnerBottomLeftAnimX = waterAnimTileNumbers[1, 2];
                    rdungeon.Floors[floor].mShoreBottomAnimX = waterAnimTileNumbers[1, 6];
                    rdungeon.Floors[floor].mShoreInnerBottomRightAnimX = waterAnimTileNumbers[1, 10];
                    rdungeon.Floors[floor].mShoreTopLeftAnimX = waterAnimTileNumbers[1, 16];
                    rdungeon.Floors[floor].mShoreTopRightAnimX = waterAnimTileNumbers[1, 19];
                    rdungeon.Floors[floor].mShoreBottomLeftAnimX = waterAnimTileNumbers[1, 17];
                    rdungeon.Floors[floor].mShoreBottomRightAnimX = waterAnimTileNumbers[1, 20];
                    rdungeon.Floors[floor].mShoreDiagonalForwardAnimX = waterAnimTileNumbers[1, 18];
                    rdungeon.Floors[floor].mShoreDiagonalBackAnimX = waterAnimTileNumbers[1, 21];
                    rdungeon.Floors[floor].mShoreInnerTopAnimX = waterAnimTileNumbers[1, 12];
                    rdungeon.Floors[floor].mShoreVerticalAnimX = waterAnimTileNumbers[1, 13];
                    rdungeon.Floors[floor].mShoreInnerBottomAnimX = waterAnimTileNumbers[1, 14];
                    rdungeon.Floors[floor].mShoreInnerLeftAnimX = waterAnimTileNumbers[1, 3];
                    rdungeon.Floors[floor].mShoreHorizontalAnimX = waterAnimTileNumbers[1, 7];
                    rdungeon.Floors[floor].mShoreInnerRightAnimX = waterAnimTileNumbers[1, 11];

                }
                lblSaveLoadMessage.Text = "Water Anim Tile settings saved to floor(s)";
            } else if (pnlRDungeonAttributes != null && pnlRDungeonAttributes.Visible == true) {
                for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) {

                    rdungeon.Floors[floor].GroundTile.Type = (Enums.TileType)cbGroundType.SelectedIndex;
                    rdungeon.Floors[floor].GroundTile.Data1 = nudGroundData1.Value;
                    rdungeon.Floors[floor].GroundTile.Data2 = nudGroundData2.Value;
                    rdungeon.Floors[floor].GroundTile.Data3 = nudGroundData3.Value;
                    rdungeon.Floors[floor].GroundTile.String1 = txtGroundString1.Text;
                    rdungeon.Floors[floor].GroundTile.String2 = txtGroundString2.Text;
                    rdungeon.Floors[floor].GroundTile.String3 = txtGroundString3.Text;

                    rdungeon.Floors[floor].HallTile.Type = (Enums.TileType)cbHallType.SelectedIndex;
                    rdungeon.Floors[floor].HallTile.Data1 = nudHallData1.Value;
                    rdungeon.Floors[floor].HallTile.Data2 = nudHallData2.Value;
                    rdungeon.Floors[floor].HallTile.Data3 = nudHallData3.Value;
                    rdungeon.Floors[floor].HallTile.String1 = txtHallString1.Text;
                    rdungeon.Floors[floor].HallTile.String2 = txtHallString2.Text;
                    rdungeon.Floors[floor].HallTile.String3 = txtHallString3.Text;

                    rdungeon.Floors[floor].WaterTile.Type = (Enums.TileType)cbWaterType.SelectedIndex;
                    rdungeon.Floors[floor].WaterTile.Data1 = nudWaterData1.Value;
                    rdungeon.Floors[floor].WaterTile.Data2 = nudWaterData2.Value;
                    rdungeon.Floors[floor].WaterTile.Data3 = nudWaterData3.Value;
                    rdungeon.Floors[floor].WaterTile.String1 = txtWaterString1.Text;
                    rdungeon.Floors[floor].WaterTile.String2 = txtWaterString2.Text;
                    rdungeon.Floors[floor].WaterTile.String3 = txtWaterString3.Text;

                    rdungeon.Floors[floor].WallTile.Type = (Enums.TileType)cbWallType.SelectedIndex;
                    rdungeon.Floors[floor].WallTile.Data1 = nudWallData1.Value;
                    rdungeon.Floors[floor].WallTile.Data2 = nudWallData2.Value;
                    rdungeon.Floors[floor].WallTile.Data3 = nudWallData3.Value;
                    rdungeon.Floors[floor].WallTile.String1 = txtWallString1.Text;
                    rdungeon.Floors[floor].WallTile.String2 = txtWallString2.Text;
                    rdungeon.Floors[floor].WallTile.String3 = txtWallString3.Text;

                }
                lblSaveLoadMessage.Text = "Attribute settings saved to floor(s)";
            } else if (pnlRDungeonItems != null && pnlRDungeonItems.Visible == true) {
                for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) {

                    rdungeon.Floors[floor].Items.Clear();
                    for (int item = 0; item < itemList.Count; item++) {
                        EditableRDungeonItem newItem = new EditableRDungeonItem();
                        newItem.ItemNum = itemList[item].ItemNum;
                        newItem.MinAmount = itemList[item].MinAmount;
                        newItem.MaxAmount = itemList[item].MaxAmount;
                        newItem.AppearanceRate = itemList[item].AppearanceRate;
                        newItem.StickyRate = itemList[item].StickyRate;
                        newItem.Tag = itemList[item].Tag;
                        newItem.Hidden = itemList[item].Hidden;
                        newItem.OnGround = itemList[item].OnGround;
                        newItem.OnWater = itemList[item].OnWater;
                        newItem.OnWall = itemList[item].OnWall;

                        rdungeon.Floors[floor].Items.Add(newItem);
                    }

                }
                lblSaveLoadMessage.Text = "Item settings saved to floor(s)";
            } else if (pnlRDungeonNpcs != null && pnlRDungeonNpcs.Visible == true) {
                for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) {

                    rdungeon.Floors[floor].NpcSpawnTime = nudNpcSpawnTime.Value;
                    rdungeon.Floors[floor].NpcMin = nudNpcMin.Value;
                    rdungeon.Floors[floor].NpcMax = nudNpcMax.Value;

                    rdungeon.Floors[floor].Npcs.Clear();
                    for (int npc = 0; npc < npcList.Count; npc++) {
                        MapNpcSettings newNpc = new MapNpcSettings();
                        newNpc.NpcNum = npcList[npc].NpcNum;
                        newNpc.MinLevel = npcList[npc].MinLevel;
                        newNpc.MaxLevel = npcList[npc].MaxLevel;
                        newNpc.AppearanceRate = npcList[npc].AppearanceRate;
                        newNpc.StartStatus = npcList[npc].StartStatus;
                        newNpc.StartStatusCounter = npcList[npc].StartStatusCounter;
                        newNpc.StartStatusChance = npcList[npc].StartStatusChance;

                        rdungeon.Floors[floor].Npcs.Add(newNpc);
                    }

                }
                lblSaveLoadMessage.Text = "Npc settings saved to floor(s)";
            } else if (pnlRDungeonTraps != null && pnlRDungeonTraps.Visible == true) {
                for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) {

                    rdungeon.Floors[floor].SpecialTiles.Clear();
                    for (int traps = 0; traps < trapList.Count; traps++) {
                        EditableRDungeonTrap newTile = new EditableRDungeonTrap();

                        newTile.SpecialTile.Ground = trapList[traps].SpecialTile.Ground;
                        newTile.SpecialTile.GroundAnim = trapList[traps].SpecialTile.GroundAnim;
                        newTile.SpecialTile.Mask = trapList[traps].SpecialTile.Mask;
                        newTile.SpecialTile.Anim = trapList[traps].SpecialTile.Anim;
                        newTile.SpecialTile.Mask2 = trapList[traps].SpecialTile.Mask2;
                        newTile.SpecialTile.M2Anim = trapList[traps].SpecialTile.M2Anim;
                        newTile.SpecialTile.Fringe = trapList[traps].SpecialTile.Fringe;
                        newTile.SpecialTile.FAnim = trapList[traps].SpecialTile.FAnim;
                        newTile.SpecialTile.Fringe2 = trapList[traps].SpecialTile.Fringe2;
                        newTile.SpecialTile.F2Anim = trapList[traps].SpecialTile.F2Anim;

                        newTile.SpecialTile.GroundSet = trapList[traps].SpecialTile.GroundSet;
                        newTile.SpecialTile.GroundAnimSet = trapList[traps].SpecialTile.GroundAnimSet;
                        newTile.SpecialTile.MaskSet = trapList[traps].SpecialTile.MaskSet;
                        newTile.SpecialTile.AnimSet = trapList[traps].SpecialTile.AnimSet;
                        newTile.SpecialTile.Mask2Set = trapList[traps].SpecialTile.Mask2Set;
                        newTile.SpecialTile.M2AnimSet = trapList[traps].SpecialTile.M2AnimSet;
                        newTile.SpecialTile.FringeSet = trapList[traps].SpecialTile.FringeSet;
                        newTile.SpecialTile.FAnimSet = trapList[traps].SpecialTile.FAnimSet;
                        newTile.SpecialTile.Fringe2Set = trapList[traps].SpecialTile.Fringe2Set;
                        newTile.SpecialTile.F2AnimSet = trapList[traps].SpecialTile.F2AnimSet;

                        newTile.SpecialTile.Type = trapList[traps].SpecialTile.Type;
                        newTile.SpecialTile.Data1 = trapList[traps].SpecialTile.Data1;
                        newTile.SpecialTile.Data2 = trapList[traps].SpecialTile.Data2;
                        newTile.SpecialTile.Data3 = trapList[traps].SpecialTile.Data3;
                        newTile.SpecialTile.String1 = trapList[traps].SpecialTile.String1;
                        newTile.SpecialTile.String2 = trapList[traps].SpecialTile.String2;
                        newTile.SpecialTile.String3 = trapList[traps].SpecialTile.String3;

                        newTile.AppearanceRate = trapList[traps].AppearanceRate;

                        rdungeon.Floors[floor].SpecialTiles.Add(newTile);
                    }

                }
                lblSaveLoadMessage.Text = "Trap settings saved to floor(s)";
            } else if (pnlRDungeonWeather != null && pnlRDungeonWeather.Visible == true) {
                for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) {

                    rdungeon.Floors[floor].Weather.Clear();
                    for (int weather = 0; weather < lbxWeather.Items.Count; weather++) {
                        string[] weatherindex = lbxWeather.Items[weather].TextIdentifier.Split(':');
                        if (weatherindex[1].IsNumeric()) {
                            rdungeon.Floors[floor].Weather.Add((Enums.Weather)weatherindex[1].ToInt());
                        }
                    }

                }
                lblSaveLoadMessage.Text = "Weather settings saved to floor(s)";
            } else if (pnlRDungeonGoal != null && pnlRDungeonGoal.Visible == true) {
                for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) {

                    if (optNextFloor.Checked) {
                        rdungeon.Floors[floor].GoalType = Enums.RFloorGoalType.NextFloor;
                    } else if (optMap.Checked) {
                        rdungeon.Floors[floor].GoalType = Enums.RFloorGoalType.Map;
                    } else if (optScripted.Checked) {
                        rdungeon.Floors[floor].GoalType = Enums.RFloorGoalType.Scripted;
                    } else {
                        rdungeon.Floors[floor].GoalType = Enums.RFloorGoalType.NextFloor;
                    }

                    rdungeon.Floors[floor].GoalMap = nudData1.Value;
                    rdungeon.Floors[floor].GoalX = nudData2.Value;
                    rdungeon.Floors[floor].GoalY = nudData3.Value;

                }
                lblSaveLoadMessage.Text = "Goal settings saved to floor(s)";
            } else if (pnlRDungeonChambers != null && pnlRDungeonChambers.Visible == true) {
                for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) {

                    rdungeon.Floors[floor].Chambers.Clear();
                    for (int chamber = 0; chamber < chamberList.Count; chamber++) {
                        EditableRDungeonChamber addedChamber = new EditableRDungeonChamber();
                        addedChamber.ChamberNum = chamberList[chamber].ChamberNum;
                        addedChamber.String1 = chamberList[chamber].String1;
                        addedChamber.String2 = chamberList[chamber].String2;
                        addedChamber.String3 = chamberList[chamber].String3;
                        rdungeon.Floors[floor].Chambers.Add(addedChamber);

                    }

                }
                lblSaveLoadMessage.Text = "Chamber settings saved to floor(s)";
            } else if (pnlRDungeonMisc != null && pnlRDungeonMisc.Visible == true) {
                for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) {

                    rdungeon.Floors[floor].Darkness = nudDarkness.Value;
                    if (lbxMusic.SelectedItems.Count != 1 || lbxMusic.Items[0].Selected) {
                        rdungeon.Floors[floor].Music = "";
                    } else {
                        rdungeon.Floors[floor].Music = lbxMusic.SelectedItems[0].TextIdentifier;
                    }

                }

                lblSaveLoadMessage.Text = "Misc settings saved to floor(s)";
            }
        }
コード例 #7
0
ファイル: winRDungeonPanel.cs プロジェクト: MandL27/Client
        void btnRemoveNpc_Click(object sender, SdlDotNet.Widgets.MouseButtonEventArgs e)
        {
            if (lbxNpcs.SelectedIndex > -1) {

                if (chkBulkNpc.Checked) {

                    for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) {
                        for (int j = rdungeon.Floors[floor].Npcs.Count - 1; j >= 0; j--) {
                            if (npcList[lbxNpcs.SelectedIndex].Equals(rdungeon.Floors[floor].Npcs[j])) {
                                rdungeon.Floors[floor].Npcs.RemoveAt(j);
                            }
                        }
                    }

                    npcList.Clear();
                    lbxNpcs.Items.Clear();
                    EditableRDungeonFloor loadingfloor = rdungeon.Floors[nudFirstFloor.Value - 1];
                    for (int npc = 0; npc < loadingfloor.Npcs.Count; npc++) {
                        MapNpcSettings newLoadNpc = new MapNpcSettings();
                        newLoadNpc.NpcNum = loadingfloor.Npcs[npc].NpcNum;
                        newLoadNpc.MinLevel = loadingfloor.Npcs[npc].MinLevel;
                        newLoadNpc.MaxLevel = loadingfloor.Npcs[npc].MaxLevel;
                        newLoadNpc.AppearanceRate = loadingfloor.Npcs[npc].AppearanceRate;
                        newLoadNpc.StartStatus = loadingfloor.Npcs[npc].StartStatus;
                        newLoadNpc.StartStatusCounter = loadingfloor.Npcs[npc].StartStatusCounter;
                        newLoadNpc.StartStatusChance = loadingfloor.Npcs[npc].StartStatusChance;

                        npcList.Add(newLoadNpc);
                        lbxNpcs.Items.Add(new ListBoxTextItem(Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10), (npc + 1) + ": "
                    + "(" + newLoadNpc.AppearanceRate + "%) " + "Lv." + newLoadNpc.MinLevel + "-" + newLoadNpc.MaxLevel + " " + Npc.NpcHelper.Npcs[newLoadNpc.NpcNum].Name
                    + " [" + newLoadNpc.StartStatusChance + "% " + newLoadNpc.StartStatus.ToString() + "]"));
                    }

                } else {
                    npcList.RemoveAt(lbxNpcs.SelectedIndex);

                    lbxNpcs.Items.Clear();
                    for (int npc = 0; npc < npcList.Count; npc++) {

                        lbxNpcs.Items.Add(new ListBoxTextItem(Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10), (npc + 1) + ": "
                        + "(" + npcList[npc].AppearanceRate + "%) " + "Lv." + npcList[npc].MinLevel + "-" + npcList[npc].MaxLevel + " "
                        + Npc.NpcHelper.Npcs[npcList[npc].NpcNum].Name
                        + " [" + npcList[npc].StartStatusChance + "% " + npcList[npc].StartStatus.ToString() + "]"));
                    }

                }

            }
        }
コード例 #8
0
ファイル: winRDungeonPanel.cs プロジェクト: MandL27/Client
        void btnLoadFloor_Click(object sender, SdlDotNet.Widgets.MouseButtonEventArgs e)
        {
            for (int i = rdungeon.Floors.Count; i < nudMaxFloors.Value; i++) {
                rdungeon.Floors.Add(new EditableRDungeonFloor());
            }
            if (nudFirstFloor.Value > nudMaxFloors.Value) {
                lblSaveLoadMessage.Text = "Cannot load floor above the maximum.";
                return;
            }

            EditableRDungeonFloor loadingfloor = rdungeon.Floors[nudFirstFloor.Value - 1];

            if (pnlRDungeonFloorSettingSelection.Visible == true) {
                LoadpnlRDungeonStructure();
                LoadpnlRDungeonLandTiles();
                LoadpnlRDungeonLandAltTiles();
                LoadpnlRDungeonWaterTiles();
                LoadpnlRDungeonWaterAnimTiles();
                LoadpnlRDungeonAttributes();
                LoadpnlRDungeonItems();
                LoadpnlRDungeonNpcs();
                LoadpnlRDungeonTraps();
                LoadpnlRDungeonWeather();
                LoadpnlRDungeonGoal();
                LoadpnlRDungeonChambers();
                LoadpnlRDungeonMisc();

                //Structure
                nudTrapMin.Value = loadingfloor.TrapMin;
                nudTrapMax.Value = loadingfloor.TrapMax;
                nudItemMin.Value = loadingfloor.ItemMin;
                nudItemMax.Value = loadingfloor.ItemMax;
                nudRoomWidthMin.Value = loadingfloor.RoomWidthMin;
                nudRoomWidthMax.Value = loadingfloor.RoomWidthMax;
                nudRoomLengthMin.Value = loadingfloor.RoomLengthMin;
                nudRoomLengthMax.Value = loadingfloor.RoomLengthMax;
                nudHallTurnMin.Value = loadingfloor.HallTurnMin;
                nudHallTurnMax.Value = loadingfloor.HallTurnMax;
                nudHallVarMin.Value = loadingfloor.HallVarMin;
                nudHallVarMax.Value = loadingfloor.HallVarMax;
                nudWaterFrequency.Value = loadingfloor.WaterFrequency;
                nudCraters.Value = loadingfloor.Craters;
                nudCraterMinLength.Value = loadingfloor.CraterMinLength;
                nudCraterMaxLength.Value = loadingfloor.CraterMaxLength;
                chkCraterFuzzy.Checked = loadingfloor.CraterFuzzy;

                //Land Tiles
                landTileNumbers[0, 19] = loadingfloor.StairsSheet;
                landTileNumbers[0, 16] = loadingfloor.mGroundSheet;
                landTileNumbers[0, 10] = loadingfloor.mTopLeftSheet;
                landTileNumbers[0, 6] = loadingfloor.mTopCenterSheet;
                landTileNumbers[0, 2] = loadingfloor.mTopRightSheet;
                landTileNumbers[0, 9] = loadingfloor.mCenterLeftSheet;
                landTileNumbers[0, 5] = loadingfloor.mCenterCenterSheet;
                landTileNumbers[0, 1] = loadingfloor.mCenterRightSheet;
                landTileNumbers[0, 8] = loadingfloor.mBottomLeftSheet;
                landTileNumbers[0, 4] = loadingfloor.mBottomCenterSheet;
                landTileNumbers[0, 0] = loadingfloor.mBottomRightSheet;
                landTileNumbers[0, 17] = loadingfloor.mInnerTopLeftSheet;
                landTileNumbers[0, 20] = loadingfloor.mInnerTopRightSheet;
                landTileNumbers[0, 18] = loadingfloor.mInnerBottomLeftSheet;
                landTileNumbers[0, 21] = loadingfloor.mInnerBottomRightSheet;
                landTileNumbers[0, 15] = loadingfloor.mIsolatedWallSheet;
                landTileNumbers[0, 12] = loadingfloor.mColumnTopSheet;
                landTileNumbers[0, 13] = loadingfloor.mColumnCenterSheet;
                landTileNumbers[0, 14] = loadingfloor.mColumnBottomSheet;
                landTileNumbers[0, 3] = loadingfloor.mRowLeftSheet;
                landTileNumbers[0, 7] = loadingfloor.mRowCenterSheet;
                landTileNumbers[0, 11] = loadingfloor.mRowRightSheet;

                landTileNumbers[1, 19] = loadingfloor.StairsX;
                landTileNumbers[1, 16] = loadingfloor.mGroundX;
                landTileNumbers[1, 10] = loadingfloor.mTopLeftX;
                landTileNumbers[1, 6] = loadingfloor.mTopCenterX;
                landTileNumbers[1, 2] = loadingfloor.mTopRightX;
                landTileNumbers[1, 9] = loadingfloor.mCenterLeftX;
                landTileNumbers[1, 5] = loadingfloor.mCenterCenterX;
                landTileNumbers[1, 1] = loadingfloor.mCenterRightX;
                landTileNumbers[1, 8] = loadingfloor.mBottomLeftX;
                landTileNumbers[1, 4] = loadingfloor.mBottomCenterX;
                landTileNumbers[1, 0] = loadingfloor.mBottomRightX;
                landTileNumbers[1, 17] = loadingfloor.mInnerTopLeftX;
                landTileNumbers[1, 20] = loadingfloor.mInnerTopRightX;
                landTileNumbers[1, 18] = loadingfloor.mInnerBottomLeftX;
                landTileNumbers[1, 21] = loadingfloor.mInnerBottomRightX;
                landTileNumbers[1, 15] = loadingfloor.mIsolatedWallX;
                landTileNumbers[1, 12] = loadingfloor.mColumnTopX;
                landTileNumbers[1, 13] = loadingfloor.mColumnCenterX;
                landTileNumbers[1, 14] = loadingfloor.mColumnBottomX;
                landTileNumbers[1, 3] = loadingfloor.mRowLeftX;
                landTileNumbers[1, 7] = loadingfloor.mRowCenterX;
                landTileNumbers[1, 11] = loadingfloor.mRowRightX;

                for (int i = 0; i < 22; i++) {
                    picLandTileset[i].Image = Graphics.GraphicsManager.Tiles[landTileNumbers[0, i]][landTileNumbers[1, i]];
                }

                //Land Alt Tiles
                landAltTileNumbers[0, 19] = loadingfloor.mGroundAlt2Sheet;
                landAltTileNumbers[0, 16] = loadingfloor.mGroundAltSheet;
                landAltTileNumbers[0, 10] = loadingfloor.mTopLeftAltSheet;
                landAltTileNumbers[0, 6] = loadingfloor.mTopCenterAltSheet;
                landAltTileNumbers[0, 2] = loadingfloor.mTopRightAltSheet;
                landAltTileNumbers[0, 9] = loadingfloor.mCenterLeftAltSheet;
                landAltTileNumbers[0, 5] = loadingfloor.mCenterCenterAltSheet;
                landAltTileNumbers[0, 22] = loadingfloor.mCenterCenterAlt2Sheet;
                landAltTileNumbers[0, 1] = loadingfloor.mCenterRightAltSheet;
                landAltTileNumbers[0, 8] = loadingfloor.mBottomLeftAltSheet;
                landAltTileNumbers[0, 4] = loadingfloor.mBottomCenterAltSheet;
                landAltTileNumbers[0, 0] = loadingfloor.mBottomRightAltSheet;
                landAltTileNumbers[0, 17] = loadingfloor.mInnerTopLeftAltSheet;
                landAltTileNumbers[0, 20] = loadingfloor.mInnerTopRightAltSheet;
                landAltTileNumbers[0, 18] = loadingfloor.mInnerBottomLeftAltSheet;
                landAltTileNumbers[0, 21] = loadingfloor.mInnerBottomRightAltSheet;
                landAltTileNumbers[0, 15] = loadingfloor.mIsolatedWallAltSheet;
                landAltTileNumbers[0, 12] = loadingfloor.mColumnTopAltSheet;
                landAltTileNumbers[0, 13] = loadingfloor.mColumnCenterAltSheet;
                landAltTileNumbers[0, 14] = loadingfloor.mColumnBottomAltSheet;
                landAltTileNumbers[0, 3] = loadingfloor.mRowLeftAltSheet;
                landAltTileNumbers[0, 7] = loadingfloor.mRowCenterAltSheet;
                landAltTileNumbers[0, 11] = loadingfloor.mRowRightAltSheet;

                landAltTileNumbers[1, 19] = loadingfloor.mGroundAlt2X;
                landAltTileNumbers[1, 16] = loadingfloor.mGroundAltX;
                landAltTileNumbers[1, 10] = loadingfloor.mTopLeftAltX;
                landAltTileNumbers[1, 6] = loadingfloor.mTopCenterAltX;
                landAltTileNumbers[1, 2] = loadingfloor.mTopRightAltX;
                landAltTileNumbers[1, 9] = loadingfloor.mCenterLeftAltX;
                landAltTileNumbers[1, 5] = loadingfloor.mCenterCenterAltX;
                landAltTileNumbers[1, 22] = loadingfloor.mCenterCenterAlt2X;
                landAltTileNumbers[1, 1] = loadingfloor.mCenterRightAltX;
                landAltTileNumbers[1, 8] = loadingfloor.mBottomLeftAltX;
                landAltTileNumbers[1, 4] = loadingfloor.mBottomCenterAltX;
                landAltTileNumbers[1, 0] = loadingfloor.mBottomRightAltX;
                landAltTileNumbers[1, 17] = loadingfloor.mInnerTopLeftAltX;
                landAltTileNumbers[1, 20] = loadingfloor.mInnerTopRightAltX;
                landAltTileNumbers[1, 18] = loadingfloor.mInnerBottomLeftAltX;
                landAltTileNumbers[1, 21] = loadingfloor.mInnerBottomRightAltX;
                landAltTileNumbers[1, 15] = loadingfloor.mIsolatedWallAltX;
                landAltTileNumbers[1, 12] = loadingfloor.mColumnTopAltX;
                landAltTileNumbers[1, 13] = loadingfloor.mColumnCenterAltX;
                landAltTileNumbers[1, 14] = loadingfloor.mColumnBottomAltX;
                landAltTileNumbers[1, 3] = loadingfloor.mRowLeftAltX;
                landAltTileNumbers[1, 7] = loadingfloor.mRowCenterAltX;
                landAltTileNumbers[1, 11] = loadingfloor.mRowRightAltX;

                for (int i = 0; i < 23; i++) {
                    picLandAltTileset[i].Image = Graphics.GraphicsManager.Tiles[landAltTileNumbers[0, i]][landAltTileNumbers[1, i]];
                }

                //Water Tiles
                waterTileNumbers[0, 15] = loadingfloor.mShoreSurroundedSheet;
                waterTileNumbers[0, 0] = loadingfloor.mShoreInnerTopLeftSheet;
                waterTileNumbers[0, 4] = loadingfloor.mShoreTopSheet;
                waterTileNumbers[0, 8] = loadingfloor.mShoreInnerTopRightSheet;
                waterTileNumbers[0, 1] = loadingfloor.mShoreLeftSheet;
                waterTileNumbers[0, 5] = loadingfloor.mWaterSheet;
                waterTileNumbers[0, 9] = loadingfloor.mShoreRightSheet;
                waterTileNumbers[0, 2] = loadingfloor.mShoreInnerBottomLeftSheet;
                waterTileNumbers[0, 6] = loadingfloor.mShoreBottomSheet;
                waterTileNumbers[0, 10] = loadingfloor.mShoreInnerBottomRightSheet;
                waterTileNumbers[0, 16] = loadingfloor.mShoreTopLeftSheet;
                waterTileNumbers[0, 19] = loadingfloor.mShoreTopRightSheet;
                waterTileNumbers[0, 17] = loadingfloor.mShoreBottomLeftSheet;
                waterTileNumbers[0, 20] = loadingfloor.mShoreBottomRightSheet;
                waterTileNumbers[0, 18] = loadingfloor.mShoreDiagonalForwardSheet;
                waterTileNumbers[0, 21] = loadingfloor.mShoreDiagonalBackSheet;
                waterTileNumbers[0, 12] = loadingfloor.mShoreInnerTopSheet;
                waterTileNumbers[0, 13] = loadingfloor.mShoreVerticalSheet;
                waterTileNumbers[0, 14] = loadingfloor.mShoreInnerBottomSheet;
                waterTileNumbers[0, 3] = loadingfloor.mShoreInnerLeftSheet;
                waterTileNumbers[0, 7] = loadingfloor.mShoreHorizontalSheet;
                waterTileNumbers[0, 11] = loadingfloor.mShoreInnerRightSheet;

                waterTileNumbers[1, 15] = loadingfloor.mShoreSurroundedX;
                waterTileNumbers[1, 0] = loadingfloor.mShoreInnerTopLeftX;
                waterTileNumbers[1, 4] = loadingfloor.mShoreTopX;
                waterTileNumbers[1, 8] = loadingfloor.mShoreInnerTopRightX;
                waterTileNumbers[1, 1] = loadingfloor.mShoreLeftX;
                waterTileNumbers[1, 5] = loadingfloor.mWaterX;
                waterTileNumbers[1, 9] = loadingfloor.mShoreRightX;
                waterTileNumbers[1, 2] = loadingfloor.mShoreInnerBottomLeftX;
                waterTileNumbers[1, 6] = loadingfloor.mShoreBottomX;
                waterTileNumbers[1, 10] = loadingfloor.mShoreInnerBottomRightX;
                waterTileNumbers[1, 16] = loadingfloor.mShoreTopLeftX;
                waterTileNumbers[1, 19] = loadingfloor.mShoreTopRightX;
                waterTileNumbers[1, 17] = loadingfloor.mShoreBottomLeftX;
                waterTileNumbers[1, 20] = loadingfloor.mShoreBottomRightX;
                waterTileNumbers[1, 18] = loadingfloor.mShoreDiagonalForwardX;
                waterTileNumbers[1, 21] = loadingfloor.mShoreDiagonalBackX;
                waterTileNumbers[1, 12] = loadingfloor.mShoreInnerTopX;
                waterTileNumbers[1, 13] = loadingfloor.mShoreVerticalX;
                waterTileNumbers[1, 14] = loadingfloor.mShoreInnerBottomX;
                waterTileNumbers[1, 3] = loadingfloor.mShoreInnerLeftX;
                waterTileNumbers[1, 7] = loadingfloor.mShoreHorizontalX;
                waterTileNumbers[1, 11] = loadingfloor.mShoreInnerRightX;

                for (int i = 0; i < 22; i++) {
                    picWaterTileset[i].Image = Graphics.GraphicsManager.Tiles[waterTileNumbers[0, i]][waterTileNumbers[1, i]];
                }

                //Water Anim Tiles
                waterAnimTileNumbers[0, 15] = loadingfloor.mShoreSurroundedAnimSheet;
                waterAnimTileNumbers[0, 0] = loadingfloor.mShoreInnerTopLeftAnimSheet;
                waterAnimTileNumbers[0, 4] = loadingfloor.mShoreTopAnimSheet;
                waterAnimTileNumbers[0, 8] = loadingfloor.mShoreInnerTopRightAnimSheet;
                waterAnimTileNumbers[0, 1] = loadingfloor.mShoreLeftAnimSheet;
                waterAnimTileNumbers[0, 5] = loadingfloor.mWaterAnimSheet;
                waterAnimTileNumbers[0, 9] = loadingfloor.mShoreRightAnimSheet;
                waterAnimTileNumbers[0, 2] = loadingfloor.mShoreInnerBottomLeftAnimSheet;
                waterAnimTileNumbers[0, 6] = loadingfloor.mShoreBottomAnimSheet;
                waterAnimTileNumbers[0, 10] = loadingfloor.mShoreInnerBottomRightAnimSheet;
                waterAnimTileNumbers[0, 16] = loadingfloor.mShoreTopLeftAnimSheet;
                waterAnimTileNumbers[0, 19] = loadingfloor.mShoreTopRightAnimSheet;
                waterAnimTileNumbers[0, 17] = loadingfloor.mShoreBottomLeftAnimSheet;
                waterAnimTileNumbers[0, 20] = loadingfloor.mShoreBottomRightAnimSheet;
                waterAnimTileNumbers[0, 18] = loadingfloor.mShoreDiagonalForwardAnimSheet;
                waterAnimTileNumbers[0, 21] = loadingfloor.mShoreDiagonalBackAnimSheet;
                waterAnimTileNumbers[0, 12] = loadingfloor.mShoreInnerTopAnimSheet;
                waterAnimTileNumbers[0, 13] = loadingfloor.mShoreVerticalAnimSheet;
                waterAnimTileNumbers[0, 14] = loadingfloor.mShoreInnerBottomAnimSheet;
                waterAnimTileNumbers[0, 3] = loadingfloor.mShoreInnerLeftAnimSheet;
                waterAnimTileNumbers[0, 7] = loadingfloor.mShoreHorizontalAnimSheet;
                waterAnimTileNumbers[0, 11] = loadingfloor.mShoreInnerRightAnimSheet;

                waterAnimTileNumbers[1, 15] = loadingfloor.mShoreSurroundedAnimX;
                waterAnimTileNumbers[1, 0] = loadingfloor.mShoreInnerTopLeftAnimX;
                waterAnimTileNumbers[1, 4] = loadingfloor.mShoreTopAnimX;
                waterAnimTileNumbers[1, 8] = loadingfloor.mShoreInnerTopRightAnimX;
                waterAnimTileNumbers[1, 1] = loadingfloor.mShoreLeftAnimX;
                waterAnimTileNumbers[1, 5] = loadingfloor.mWaterAnimX;
                waterAnimTileNumbers[1, 9] = loadingfloor.mShoreRightAnimX;
                waterAnimTileNumbers[1, 2] = loadingfloor.mShoreInnerBottomLeftAnimX;
                waterAnimTileNumbers[1, 6] = loadingfloor.mShoreBottomAnimX;
                waterAnimTileNumbers[1, 10] = loadingfloor.mShoreInnerBottomRightAnimX;
                waterAnimTileNumbers[1, 16] = loadingfloor.mShoreTopLeftAnimX;
                waterAnimTileNumbers[1, 19] = loadingfloor.mShoreTopRightAnimX;
                waterAnimTileNumbers[1, 17] = loadingfloor.mShoreBottomLeftAnimX;
                waterAnimTileNumbers[1, 20] = loadingfloor.mShoreBottomRightAnimX;
                waterAnimTileNumbers[1, 18] = loadingfloor.mShoreDiagonalForwardAnimX;
                waterAnimTileNumbers[1, 21] = loadingfloor.mShoreDiagonalBackAnimX;
                waterAnimTileNumbers[1, 12] = loadingfloor.mShoreInnerTopAnimX;
                waterAnimTileNumbers[1, 13] = loadingfloor.mShoreVerticalAnimX;
                waterAnimTileNumbers[1, 14] = loadingfloor.mShoreInnerBottomAnimX;
                waterAnimTileNumbers[1, 3] = loadingfloor.mShoreInnerLeftAnimX;
                waterAnimTileNumbers[1, 7] = loadingfloor.mShoreHorizontalAnimX;
                waterAnimTileNumbers[1, 11] = loadingfloor.mShoreInnerRightAnimX;

                for (int i = 0; i < 22; i++) {
                    picWaterAnimTileset[i].Image = Graphics.GraphicsManager.Tiles[waterAnimTileNumbers[0, i]][waterAnimTileNumbers[1, i]];
                }

                //Attributes
                cbGroundType.SelectItem((int)loadingfloor.GroundTile.Type);
                nudGroundData1.Value = loadingfloor.GroundTile.Data1;
                nudGroundData2.Value = loadingfloor.GroundTile.Data2;
                nudGroundData3.Value = loadingfloor.GroundTile.Data3;
                txtGroundString1.Text = loadingfloor.GroundTile.String1;
                txtGroundString2.Text = loadingfloor.GroundTile.String2;
                txtGroundString3.Text = loadingfloor.GroundTile.String3;

                cbHallType.SelectItem((int)loadingfloor.HallTile.Type);
                nudHallData1.Value = loadingfloor.HallTile.Data1;
                nudHallData2.Value = loadingfloor.HallTile.Data2;
                nudHallData3.Value = loadingfloor.HallTile.Data3;
                txtHallString1.Text = loadingfloor.HallTile.String1;
                txtHallString2.Text = loadingfloor.HallTile.String2;
                txtHallString3.Text = loadingfloor.HallTile.String3;

                cbWaterType.SelectItem((int)loadingfloor.WaterTile.Type);
                nudWaterData1.Value = loadingfloor.WaterTile.Data1;
                nudWaterData2.Value = loadingfloor.WaterTile.Data2;
                nudWaterData3.Value = loadingfloor.WaterTile.Data3;
                txtWaterString1.Text = loadingfloor.WaterTile.String1;
                txtWaterString2.Text = loadingfloor.WaterTile.String2;
                txtWaterString3.Text = loadingfloor.WaterTile.String3;

                cbWallType.SelectItem((int)loadingfloor.WallTile.Type);
                nudWallData1.Value = loadingfloor.WallTile.Data1;
                nudWallData2.Value = loadingfloor.WallTile.Data2;
                nudWallData3.Value = loadingfloor.WallTile.Data3;
                txtWallString1.Text = loadingfloor.WallTile.String1;
                txtWallString2.Text = loadingfloor.WallTile.String2;
                txtWallString3.Text = loadingfloor.WallTile.String3;

                //Items
                itemList.Clear();
                lbxItems.Items.Clear();
                for (int item = 0; item < loadingfloor.Items.Count; item++) {
                    EditableRDungeonItem newItem = new EditableRDungeonItem();
                    newItem.ItemNum = loadingfloor.Items[item].ItemNum;
                    newItem.MinAmount = loadingfloor.Items[item].MinAmount;
                    newItem.MaxAmount = loadingfloor.Items[item].MaxAmount;
                    newItem.AppearanceRate = loadingfloor.Items[item].AppearanceRate;
                    newItem.StickyRate = loadingfloor.Items[item].StickyRate;
                    newItem.Tag = loadingfloor.Items[item].Tag;
                    newItem.Hidden = loadingfloor.Items[item].Hidden;
                    newItem.OnGround = loadingfloor.Items[item].OnGround;
                    newItem.OnWater = loadingfloor.Items[item].OnWater;
                    newItem.OnWall = loadingfloor.Items[item].OnWall;

                    itemList.Add(newItem);
                    lbxItems.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (item + 1) + ": (" + newItem.AppearanceRate + "%) " + newItem.MinAmount + "-" + newItem.MaxAmount + " " + Items.ItemHelper.Items[newItem.ItemNum].Name + " (" + newItem.StickyRate + "% Sticky)"));
                }

                //Npcs
                nudNpcSpawnTime.Value = loadingfloor.NpcSpawnTime;
                nudNpcMin.Value = loadingfloor.NpcMin;
                nudNpcMax.Value = loadingfloor.NpcMax;

                npcList.Clear();
                lbxNpcs.Items.Clear();
                for (int npc = 0; npc < loadingfloor.Npcs.Count; npc++) {
                    MapNpcSettings newNpc = new MapNpcSettings();
                    newNpc.NpcNum = loadingfloor.Npcs[npc].NpcNum;
                    newNpc.MinLevel = loadingfloor.Npcs[npc].MinLevel;
                    newNpc.MaxLevel = loadingfloor.Npcs[npc].MaxLevel;
                    newNpc.AppearanceRate = loadingfloor.Npcs[npc].AppearanceRate;
                    newNpc.StartStatus = loadingfloor.Npcs[npc].StartStatus;
                    newNpc.StartStatusCounter = loadingfloor.Npcs[npc].StartStatusCounter;
                    newNpc.StartStatusChance = loadingfloor.Npcs[npc].StartStatusChance;

                    npcList.Add(newNpc);
                    lbxNpcs.Items.Add(new ListBoxTextItem(Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10), (npc + 1) + ": "
                + "(" + newNpc.AppearanceRate + "%) " + "Lv." + newNpc.MinLevel + "-" + newNpc.MaxLevel + " " + Npc.NpcHelper.Npcs[newNpc.NpcNum].Name
                + " [" + newNpc.StartStatusChance + "% " + newNpc.StartStatus.ToString() + "]"));
                }

                //Traps
                trapList.Clear();
                lbxTraps.Items.Clear();
                for (int traps = 0; traps < loadingfloor.SpecialTiles.Count; traps++) {
                    EditableRDungeonTrap newTile = new EditableRDungeonTrap();

                    newTile.SpecialTile.Ground = loadingfloor.SpecialTiles[traps].SpecialTile.Ground;
                    newTile.SpecialTile.GroundAnim = loadingfloor.SpecialTiles[traps].SpecialTile.GroundAnim;
                    newTile.SpecialTile.Mask = loadingfloor.SpecialTiles[traps].SpecialTile.Mask;
                    newTile.SpecialTile.Anim = loadingfloor.SpecialTiles[traps].SpecialTile.Anim;
                    newTile.SpecialTile.Mask2 = loadingfloor.SpecialTiles[traps].SpecialTile.Mask2;
                    newTile.SpecialTile.M2Anim = loadingfloor.SpecialTiles[traps].SpecialTile.M2Anim;
                    newTile.SpecialTile.Fringe = loadingfloor.SpecialTiles[traps].SpecialTile.Fringe;
                    newTile.SpecialTile.FAnim = loadingfloor.SpecialTiles[traps].SpecialTile.FAnim;
                    newTile.SpecialTile.Fringe2 = loadingfloor.SpecialTiles[traps].SpecialTile.Fringe2;
                    newTile.SpecialTile.F2Anim = loadingfloor.SpecialTiles[traps].SpecialTile.F2Anim;

                    newTile.SpecialTile.GroundSet = loadingfloor.SpecialTiles[traps].SpecialTile.GroundSet;
                    newTile.SpecialTile.GroundAnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.GroundAnimSet;
                    newTile.SpecialTile.MaskSet = loadingfloor.SpecialTiles[traps].SpecialTile.MaskSet;
                    newTile.SpecialTile.AnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.AnimSet;
                    newTile.SpecialTile.Mask2Set = loadingfloor.SpecialTiles[traps].SpecialTile.Mask2Set;
                    newTile.SpecialTile.M2AnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.M2AnimSet;
                    newTile.SpecialTile.FringeSet = loadingfloor.SpecialTiles[traps].SpecialTile.FringeSet;
                    newTile.SpecialTile.FAnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.FAnimSet;
                    newTile.SpecialTile.Fringe2Set = loadingfloor.SpecialTiles[traps].SpecialTile.Fringe2Set;
                    newTile.SpecialTile.F2AnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.F2AnimSet;

                    newTile.SpecialTile.Type = loadingfloor.SpecialTiles[traps].SpecialTile.Type;
                    newTile.SpecialTile.Data1 = loadingfloor.SpecialTiles[traps].SpecialTile.Data1;
                    newTile.SpecialTile.Data2 = loadingfloor.SpecialTiles[traps].SpecialTile.Data2;
                    newTile.SpecialTile.Data3 = loadingfloor.SpecialTiles[traps].SpecialTile.Data3;
                    newTile.SpecialTile.String1 = loadingfloor.SpecialTiles[traps].SpecialTile.String1;
                    newTile.SpecialTile.String2 = loadingfloor.SpecialTiles[traps].SpecialTile.String2;
                    newTile.SpecialTile.String3 = loadingfloor.SpecialTiles[traps].SpecialTile.String3;

                    newTile.AppearanceRate = loadingfloor.SpecialTiles[traps].AppearanceRate;

                    trapList.Add(newTile);
                    lbxTraps.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (traps + 1) + ": " + newTile.SpecialTile.Type + "/" + newTile.SpecialTile.Data1 + "/" + newTile.SpecialTile.Data2 + "/" + newTile.SpecialTile.Data3));
                }

                //Weather
                lbxWeather.Items.Clear();
                for (int weather = 0; weather < loadingfloor.Weather.Count; weather++) {
                    lbxWeather.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (weather + 1) + ":" + (int)loadingfloor.Weather[weather] + ": " + Enum.GetName(typeof(Enums.Weather), loadingfloor.Weather[weather])));
                }

                //Goal
                switch (loadingfloor.GoalType) {
                    case Enums.RFloorGoalType.NextFloor: {
                            optNextFloor.Checked = true;
                        }
                        break;
                    case Enums.RFloorGoalType.Map: {
                            optMap.Checked = true;
                        }
                        break;
                    case Enums.RFloorGoalType.Scripted: {
                            optScripted.Checked = true;
                        }
                        break;
                    default: {
                            optNextFloor.Checked = true;
                        }
                        break;
                }

                nudData1.Value = loadingfloor.GoalMap;
                nudData2.Value = loadingfloor.GoalX;
                nudData3.Value = loadingfloor.GoalY;

                //chambers
                chamberList.Clear();
                lbxChambers.Items.Clear();
                for (int chamber = 0; chamber < loadingfloor.Chambers.Count; chamber++) {
                    EditableRDungeonChamber newChamber = new EditableRDungeonChamber();
                    newChamber.ChamberNum = loadingfloor.Chambers[chamber].ChamberNum;
                    newChamber.String1 = loadingfloor.Chambers[chamber].String1;
                    newChamber.String2 = loadingfloor.Chambers[chamber].String2;
                    newChamber.String3 = loadingfloor.Chambers[chamber].String3;
                    chamberList.Add(newChamber);
                    lbxChambers.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), "#" + loadingfloor.Chambers[chamber].ChamberNum + "/" + loadingfloor.Chambers[chamber].String1 + "/" + loadingfloor.Chambers[chamber].String2 + "/" + loadingfloor.Chambers[chamber].String3));
                }

                //Misc
                nudDarkness.Value = loadingfloor.Darkness;
                if (loadingfloor.Music == "") {
                    lbxMusic.SelectItem(0);
                } else {
                    for (int i = 0; i < lbxMusic.Items.Count; i++) {
                        if (lbxMusic.Items[i].TextIdentifier == loadingfloor.Music) {
                            lbxMusic.SelectItem(i);
                        }
                    }
                }
                lblSaveLoadMessage.Text = "All settings loaded";
            } else if (pnlRDungeonStructure != null && pnlRDungeonStructure.Visible == true) {

                nudTrapMin.Value = loadingfloor.TrapMin;
                nudTrapMax.Value = loadingfloor.TrapMax;
                nudItemMin.Value = loadingfloor.ItemMin;
                nudItemMax.Value = loadingfloor.ItemMax;
                nudRoomWidthMin.Value = loadingfloor.RoomWidthMin;
                nudRoomWidthMax.Value = loadingfloor.RoomWidthMax;
                nudRoomLengthMin.Value = loadingfloor.RoomLengthMin;
                nudRoomLengthMax.Value = loadingfloor.RoomLengthMax;
                nudHallTurnMin.Value = loadingfloor.HallTurnMin;
                nudHallTurnMax.Value = loadingfloor.HallTurnMax;
                nudHallVarMin.Value = loadingfloor.HallVarMin;
                nudHallVarMax.Value = loadingfloor.HallVarMax;
                nudWaterFrequency.Value = loadingfloor.WaterFrequency;
                nudCraters.Value = loadingfloor.Craters;
                nudCraterMinLength.Value = loadingfloor.CraterMinLength;
                nudCraterMaxLength.Value = loadingfloor.CraterMaxLength;
                chkCraterFuzzy.Checked = loadingfloor.CraterFuzzy;

                lblSaveLoadMessage.Text = "Structure settings loaded";
            } else if (pnlRDungeonLandTiles != null && pnlRDungeonLandTiles.Visible == true) {

                landTileNumbers[0, 19] = loadingfloor.StairsSheet;
                landTileNumbers[0, 16] = loadingfloor.mGroundSheet;
                landTileNumbers[0, 10] = loadingfloor.mTopLeftSheet;
                landTileNumbers[0, 6] = loadingfloor.mTopCenterSheet;
                landTileNumbers[0, 2] = loadingfloor.mTopRightSheet;
                landTileNumbers[0, 9] = loadingfloor.mCenterLeftSheet;
                landTileNumbers[0, 5] = loadingfloor.mCenterCenterSheet;
                landTileNumbers[0, 1] = loadingfloor.mCenterRightSheet;
                landTileNumbers[0, 8] = loadingfloor.mBottomLeftSheet;
                landTileNumbers[0, 4] = loadingfloor.mBottomCenterSheet;
                landTileNumbers[0, 0] = loadingfloor.mBottomRightSheet;
                landTileNumbers[0, 17] = loadingfloor.mInnerTopLeftSheet;
                landTileNumbers[0, 20] = loadingfloor.mInnerTopRightSheet;
                landTileNumbers[0, 18] = loadingfloor.mInnerBottomLeftSheet;
                landTileNumbers[0, 21] = loadingfloor.mInnerBottomRightSheet;
                landTileNumbers[0, 15] = loadingfloor.mIsolatedWallSheet;
                landTileNumbers[0, 12] = loadingfloor.mColumnTopSheet;
                landTileNumbers[0, 13] = loadingfloor.mColumnCenterSheet;
                landTileNumbers[0, 14] = loadingfloor.mColumnBottomSheet;
                landTileNumbers[0, 3] = loadingfloor.mRowLeftSheet;
                landTileNumbers[0, 7] = loadingfloor.mRowCenterSheet;
                landTileNumbers[0, 11] = loadingfloor.mRowRightSheet;

                landTileNumbers[1, 19] = loadingfloor.StairsX;
                landTileNumbers[1, 16] = loadingfloor.mGroundX;
                landTileNumbers[1, 10] = loadingfloor.mTopLeftX;
                landTileNumbers[1, 6] = loadingfloor.mTopCenterX;
                landTileNumbers[1, 2] = loadingfloor.mTopRightX;
                landTileNumbers[1, 9] = loadingfloor.mCenterLeftX;
                landTileNumbers[1, 5] = loadingfloor.mCenterCenterX;
                landTileNumbers[1, 1] = loadingfloor.mCenterRightX;
                landTileNumbers[1, 8] = loadingfloor.mBottomLeftX;
                landTileNumbers[1, 4] = loadingfloor.mBottomCenterX;
                landTileNumbers[1, 0] = loadingfloor.mBottomRightX;
                landTileNumbers[1, 17] = loadingfloor.mInnerTopLeftX;
                landTileNumbers[1, 20] = loadingfloor.mInnerTopRightX;
                landTileNumbers[1, 18] = loadingfloor.mInnerBottomLeftX;
                landTileNumbers[1, 21] = loadingfloor.mInnerBottomRightX;
                landTileNumbers[1, 15] = loadingfloor.mIsolatedWallX;
                landTileNumbers[1, 12] = loadingfloor.mColumnTopX;
                landTileNumbers[1, 13] = loadingfloor.mColumnCenterX;
                landTileNumbers[1, 14] = loadingfloor.mColumnBottomX;
                landTileNumbers[1, 3] = loadingfloor.mRowLeftX;
                landTileNumbers[1, 7] = loadingfloor.mRowCenterX;
                landTileNumbers[1, 11] = loadingfloor.mRowRightX;

                for (int i = 0; i < 22; i++) {
                    picLandTileset[i].Image = Graphics.GraphicsManager.Tiles[landTileNumbers[0, i]][landTileNumbers[1, i]];
                }

                lblSaveLoadMessage.Text = "Land Tile settings loaded";
            } else if (pnlRDungeonLandAltTiles != null && pnlRDungeonLandAltTiles.Visible == true) {

                landAltTileNumbers[0, 19] = loadingfloor.mGroundAlt2Sheet;
                landAltTileNumbers[0, 16] = loadingfloor.mGroundAltSheet;
                landAltTileNumbers[0, 10] = loadingfloor.mTopLeftAltSheet;
                landAltTileNumbers[0, 6] = loadingfloor.mTopCenterAltSheet;
                landAltTileNumbers[0, 2] = loadingfloor.mTopRightAltSheet;
                landAltTileNumbers[0, 9] = loadingfloor.mCenterLeftAltSheet;
                landAltTileNumbers[0, 5] = loadingfloor.mCenterCenterAltSheet;
                landAltTileNumbers[0, 22] = loadingfloor.mCenterCenterAlt2Sheet;
                landAltTileNumbers[0, 1] = loadingfloor.mCenterRightAltSheet;
                landAltTileNumbers[0, 8] = loadingfloor.mBottomLeftAltSheet;
                landAltTileNumbers[0, 4] = loadingfloor.mBottomCenterAltSheet;
                landAltTileNumbers[0, 0] = loadingfloor.mBottomRightAltSheet;
                landAltTileNumbers[0, 17] = loadingfloor.mInnerTopLeftAltSheet;
                landAltTileNumbers[0, 20] = loadingfloor.mInnerTopRightAltSheet;
                landAltTileNumbers[0, 18] = loadingfloor.mInnerBottomLeftAltSheet;
                landAltTileNumbers[0, 21] = loadingfloor.mInnerBottomRightAltSheet;
                landAltTileNumbers[0, 15] = loadingfloor.mIsolatedWallAltSheet;
                landAltTileNumbers[0, 12] = loadingfloor.mColumnTopAltSheet;
                landAltTileNumbers[0, 13] = loadingfloor.mColumnCenterAltSheet;
                landAltTileNumbers[0, 14] = loadingfloor.mColumnBottomAltSheet;
                landAltTileNumbers[0, 3] = loadingfloor.mRowLeftAltSheet;
                landAltTileNumbers[0, 7] = loadingfloor.mRowCenterAltSheet;
                landAltTileNumbers[0, 11] = loadingfloor.mRowRightAltSheet;

                landAltTileNumbers[1, 19] = loadingfloor.mGroundAlt2X;
                landAltTileNumbers[1, 16] = loadingfloor.mGroundAltX;
                landAltTileNumbers[1, 10] = loadingfloor.mTopLeftAltX;
                landAltTileNumbers[1, 6] = loadingfloor.mTopCenterAltX;
                landAltTileNumbers[1, 2] = loadingfloor.mTopRightAltX;
                landAltTileNumbers[1, 9] = loadingfloor.mCenterLeftAltX;
                landAltTileNumbers[1, 5] = loadingfloor.mCenterCenterAltX;
                landAltTileNumbers[1, 22] = loadingfloor.mCenterCenterAlt2X;
                landAltTileNumbers[1, 1] = loadingfloor.mCenterRightAltX;
                landAltTileNumbers[1, 8] = loadingfloor.mBottomLeftAltX;
                landAltTileNumbers[1, 4] = loadingfloor.mBottomCenterAltX;
                landAltTileNumbers[1, 0] = loadingfloor.mBottomRightAltX;
                landAltTileNumbers[1, 17] = loadingfloor.mInnerTopLeftAltX;
                landAltTileNumbers[1, 20] = loadingfloor.mInnerTopRightAltX;
                landAltTileNumbers[1, 18] = loadingfloor.mInnerBottomLeftAltX;
                landAltTileNumbers[1, 21] = loadingfloor.mInnerBottomRightAltX;
                landAltTileNumbers[1, 15] = loadingfloor.mIsolatedWallAltX;
                landAltTileNumbers[1, 12] = loadingfloor.mColumnTopAltX;
                landAltTileNumbers[1, 13] = loadingfloor.mColumnCenterAltX;
                landAltTileNumbers[1, 14] = loadingfloor.mColumnBottomAltX;
                landAltTileNumbers[1, 3] = loadingfloor.mRowLeftAltX;
                landAltTileNumbers[1, 7] = loadingfloor.mRowCenterAltX;
                landAltTileNumbers[1, 11] = loadingfloor.mRowRightAltX;

                for (int i = 0; i < 23; i++) {
                    picLandAltTileset[i].Image = Graphics.GraphicsManager.Tiles[landAltTileNumbers[0, i]][landAltTileNumbers[1, i]];
                }

                lblSaveLoadMessage.Text = "Land Alt Tile settings loaded";
            } else if (pnlRDungeonWaterTiles != null && pnlRDungeonWaterTiles.Visible == true) {

                waterTileNumbers[0, 15] = loadingfloor.mShoreSurroundedSheet;
                waterTileNumbers[0, 0] = loadingfloor.mShoreInnerTopLeftSheet;
                waterTileNumbers[0, 4] = loadingfloor.mShoreTopSheet;
                waterTileNumbers[0, 8] = loadingfloor.mShoreInnerTopRightSheet;
                waterTileNumbers[0, 1] = loadingfloor.mShoreLeftSheet;
                waterTileNumbers[0, 5] = loadingfloor.mWaterSheet;
                waterTileNumbers[0, 9] = loadingfloor.mShoreRightSheet;
                waterTileNumbers[0, 2] = loadingfloor.mShoreInnerBottomLeftSheet;
                waterTileNumbers[0, 6] = loadingfloor.mShoreBottomSheet;
                waterTileNumbers[0, 10] = loadingfloor.mShoreInnerBottomRightSheet;
                waterTileNumbers[0, 16] = loadingfloor.mShoreTopLeftSheet;
                waterTileNumbers[0, 19] = loadingfloor.mShoreTopRightSheet;
                waterTileNumbers[0, 17] = loadingfloor.mShoreBottomLeftSheet;
                waterTileNumbers[0, 20] = loadingfloor.mShoreBottomRightSheet;
                waterTileNumbers[0, 18] = loadingfloor.mShoreDiagonalForwardSheet;
                waterTileNumbers[0, 21] = loadingfloor.mShoreDiagonalBackSheet;
                waterTileNumbers[0, 12] = loadingfloor.mShoreInnerTopSheet;
                waterTileNumbers[0, 13] = loadingfloor.mShoreVerticalSheet;
                waterTileNumbers[0, 14] = loadingfloor.mShoreInnerBottomSheet;
                waterTileNumbers[0, 3] = loadingfloor.mShoreInnerLeftSheet;
                waterTileNumbers[0, 7] = loadingfloor.mShoreHorizontalSheet;
                waterTileNumbers[0, 11] = loadingfloor.mShoreInnerRightSheet;

                waterTileNumbers[1, 15] = loadingfloor.mShoreSurroundedX;
                waterTileNumbers[1, 0] = loadingfloor.mShoreInnerTopLeftX;
                waterTileNumbers[1, 4] = loadingfloor.mShoreTopX;
                waterTileNumbers[1, 8] = loadingfloor.mShoreInnerTopRightX;
                waterTileNumbers[1, 1] = loadingfloor.mShoreLeftX;
                waterTileNumbers[1, 5] = loadingfloor.mWaterX;
                waterTileNumbers[1, 9] = loadingfloor.mShoreRightX;
                waterTileNumbers[1, 2] = loadingfloor.mShoreInnerBottomLeftX;
                waterTileNumbers[1, 6] = loadingfloor.mShoreBottomX;
                waterTileNumbers[1, 10] = loadingfloor.mShoreInnerBottomRightX;
                waterTileNumbers[1, 16] = loadingfloor.mShoreTopLeftX;
                waterTileNumbers[1, 19] = loadingfloor.mShoreTopRightX;
                waterTileNumbers[1, 17] = loadingfloor.mShoreBottomLeftX;
                waterTileNumbers[1, 20] = loadingfloor.mShoreBottomRightX;
                waterTileNumbers[1, 18] = loadingfloor.mShoreDiagonalForwardX;
                waterTileNumbers[1, 21] = loadingfloor.mShoreDiagonalBackX;
                waterTileNumbers[1, 12] = loadingfloor.mShoreInnerTopX;
                waterTileNumbers[1, 13] = loadingfloor.mShoreVerticalX;
                waterTileNumbers[1, 14] = loadingfloor.mShoreInnerBottomX;
                waterTileNumbers[1, 3] = loadingfloor.mShoreInnerLeftX;
                waterTileNumbers[1, 7] = loadingfloor.mShoreHorizontalX;
                waterTileNumbers[1, 11] = loadingfloor.mShoreInnerRightX;

                for (int i = 0; i < 22; i++) {
                    picWaterTileset[i].Image = Graphics.GraphicsManager.Tiles[waterTileNumbers[0, i]][waterTileNumbers[1, i]];
                }

                lblSaveLoadMessage.Text = "Water Tile settings loaded";
            } else if (pnlRDungeonWaterAnimTiles != null && pnlRDungeonWaterAnimTiles.Visible == true) {

                waterAnimTileNumbers[0, 15] = loadingfloor.mShoreSurroundedAnimSheet;
                waterAnimTileNumbers[0, 0] = loadingfloor.mShoreInnerTopLeftAnimSheet;
                waterAnimTileNumbers[0, 4] = loadingfloor.mShoreTopAnimSheet;
                waterAnimTileNumbers[0, 8] = loadingfloor.mShoreInnerTopRightAnimSheet;
                waterAnimTileNumbers[0, 1] = loadingfloor.mShoreLeftAnimSheet;
                waterAnimTileNumbers[0, 5] = loadingfloor.mWaterAnimSheet;
                waterAnimTileNumbers[0, 9] = loadingfloor.mShoreRightAnimSheet;
                waterAnimTileNumbers[0, 2] = loadingfloor.mShoreInnerBottomLeftAnimSheet;
                waterAnimTileNumbers[0, 6] = loadingfloor.mShoreBottomAnimSheet;
                waterAnimTileNumbers[0, 10] = loadingfloor.mShoreInnerBottomRightAnimSheet;
                waterAnimTileNumbers[0, 16] = loadingfloor.mShoreTopLeftAnimSheet;
                waterAnimTileNumbers[0, 19] = loadingfloor.mShoreTopRightAnimSheet;
                waterAnimTileNumbers[0, 17] = loadingfloor.mShoreBottomLeftAnimSheet;
                waterAnimTileNumbers[0, 20] = loadingfloor.mShoreBottomRightAnimSheet;
                waterAnimTileNumbers[0, 18] = loadingfloor.mShoreDiagonalForwardAnimSheet;
                waterAnimTileNumbers[0, 21] = loadingfloor.mShoreDiagonalBackAnimSheet;
                waterAnimTileNumbers[0, 12] = loadingfloor.mShoreInnerTopAnimSheet;
                waterAnimTileNumbers[0, 13] = loadingfloor.mShoreVerticalAnimSheet;
                waterAnimTileNumbers[0, 14] = loadingfloor.mShoreInnerBottomAnimSheet;
                waterAnimTileNumbers[0, 3] = loadingfloor.mShoreInnerLeftAnimSheet;
                waterAnimTileNumbers[0, 7] = loadingfloor.mShoreHorizontalAnimSheet;
                waterAnimTileNumbers[0, 11] = loadingfloor.mShoreInnerRightAnimSheet;

                waterAnimTileNumbers[1, 15] = loadingfloor.mShoreSurroundedAnimX;
                waterAnimTileNumbers[1, 0] = loadingfloor.mShoreInnerTopLeftAnimX;
                waterAnimTileNumbers[1, 4] = loadingfloor.mShoreTopAnimX;
                waterAnimTileNumbers[1, 8] = loadingfloor.mShoreInnerTopRightAnimX;
                waterAnimTileNumbers[1, 1] = loadingfloor.mShoreLeftAnimX;
                waterAnimTileNumbers[1, 5] = loadingfloor.mWaterAnimX;
                waterAnimTileNumbers[1, 9] = loadingfloor.mShoreRightAnimX;
                waterAnimTileNumbers[1, 2] = loadingfloor.mShoreInnerBottomLeftAnimX;
                waterAnimTileNumbers[1, 6] = loadingfloor.mShoreBottomAnimX;
                waterAnimTileNumbers[1, 10] = loadingfloor.mShoreInnerBottomRightAnimX;
                waterAnimTileNumbers[1, 16] = loadingfloor.mShoreTopLeftAnimX;
                waterAnimTileNumbers[1, 19] = loadingfloor.mShoreTopRightAnimX;
                waterAnimTileNumbers[1, 17] = loadingfloor.mShoreBottomLeftAnimX;
                waterAnimTileNumbers[1, 20] = loadingfloor.mShoreBottomRightAnimX;
                waterAnimTileNumbers[1, 18] = loadingfloor.mShoreDiagonalForwardAnimX;
                waterAnimTileNumbers[1, 21] = loadingfloor.mShoreDiagonalBackAnimX;
                waterAnimTileNumbers[1, 12] = loadingfloor.mShoreInnerTopAnimX;
                waterAnimTileNumbers[1, 13] = loadingfloor.mShoreVerticalAnimX;
                waterAnimTileNumbers[1, 14] = loadingfloor.mShoreInnerBottomAnimX;
                waterAnimTileNumbers[1, 3] = loadingfloor.mShoreInnerLeftAnimX;
                waterAnimTileNumbers[1, 7] = loadingfloor.mShoreHorizontalAnimX;
                waterAnimTileNumbers[1, 11] = loadingfloor.mShoreInnerRightAnimX;

                for (int i = 0; i < 22; i++) {
                    picWaterAnimTileset[i].Image = Graphics.GraphicsManager.Tiles[waterAnimTileNumbers[0, i]][waterAnimTileNumbers[1, i]];
                }

                lblSaveLoadMessage.Text = "Water Anim Tile settings loaded";
            } else if (pnlRDungeonAttributes != null && pnlRDungeonAttributes.Visible == true) {

                cbGroundType.SelectItem((int)loadingfloor.GroundTile.Type);
                nudGroundData1.Value = loadingfloor.GroundTile.Data1;
                nudGroundData2.Value = loadingfloor.GroundTile.Data2;
                nudGroundData3.Value = loadingfloor.GroundTile.Data3;
                txtGroundString1.Text = loadingfloor.GroundTile.String1;
                txtGroundString2.Text = loadingfloor.GroundTile.String2;
                txtGroundString3.Text = loadingfloor.GroundTile.String3;

                cbHallType.SelectItem((int)loadingfloor.HallTile.Type);
                nudHallData1.Value = loadingfloor.HallTile.Data1;
                nudHallData2.Value = loadingfloor.HallTile.Data2;
                nudHallData3.Value = loadingfloor.HallTile.Data3;
                txtHallString1.Text = loadingfloor.HallTile.String1;
                txtHallString2.Text = loadingfloor.HallTile.String2;
                txtHallString3.Text = loadingfloor.HallTile.String3;

                cbWaterType.SelectItem((int)loadingfloor.WaterTile.Type);
                nudWaterData1.Value = loadingfloor.WaterTile.Data1;
                nudWaterData2.Value = loadingfloor.WaterTile.Data2;
                nudWaterData3.Value = loadingfloor.WaterTile.Data3;
                txtWaterString1.Text = loadingfloor.WaterTile.String1;
                txtWaterString2.Text = loadingfloor.WaterTile.String2;
                txtWaterString3.Text = loadingfloor.WaterTile.String3;

                cbWallType.SelectItem((int)loadingfloor.WallTile.Type);
                nudWallData1.Value = loadingfloor.WallTile.Data1;
                nudWallData2.Value = loadingfloor.WallTile.Data2;
                nudWallData3.Value = loadingfloor.WallTile.Data3;
                txtWallString1.Text = loadingfloor.WallTile.String1;
                txtWallString2.Text = loadingfloor.WallTile.String2;
                txtWallString3.Text = loadingfloor.WallTile.String3;

                lblSaveLoadMessage.Text = "Attribute settings loaded";
            } else if (pnlRDungeonItems != null && pnlRDungeonItems.Visible == true) {

                itemList.Clear();
                lbxItems.Items.Clear();
                for (int item = 0; item < loadingfloor.Items.Count; item++) {
                    EditableRDungeonItem newItem = new EditableRDungeonItem();
                    newItem.ItemNum = loadingfloor.Items[item].ItemNum;
                    newItem.MinAmount = loadingfloor.Items[item].MinAmount;
                    newItem.MaxAmount = loadingfloor.Items[item].MaxAmount;
                    newItem.AppearanceRate = loadingfloor.Items[item].AppearanceRate;
                    newItem.StickyRate = loadingfloor.Items[item].StickyRate;
                    newItem.Tag = loadingfloor.Items[item].Tag;
                    newItem.Hidden = loadingfloor.Items[item].Hidden;
                    newItem.OnGround = loadingfloor.Items[item].OnGround;
                    newItem.OnWater = loadingfloor.Items[item].OnWater;
                    newItem.OnWall = loadingfloor.Items[item].OnWall;

                    itemList.Add(newItem);
                    lbxItems.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (item + 1) + ": (" + newItem.AppearanceRate + "%) " + newItem.MinAmount + "-" + newItem.MaxAmount + " " + Items.ItemHelper.Items[newItem.ItemNum].Name + " (" + newItem.StickyRate + "% Sticky)"));
                }

                lblSaveLoadMessage.Text = "Item settings loaded";
            } else if (pnlRDungeonNpcs != null && pnlRDungeonNpcs.Visible == true) {

                nudNpcSpawnTime.Value = loadingfloor.NpcSpawnTime;
                nudNpcMin.Value = loadingfloor.NpcMin;
                nudNpcMax.Value = loadingfloor.NpcMax;

                npcList.Clear();
                lbxNpcs.Items.Clear();
                for (int npc = 0; npc < loadingfloor.Npcs.Count; npc++) {
                    MapNpcSettings newNpc = new MapNpcSettings();
                    newNpc.NpcNum = loadingfloor.Npcs[npc].NpcNum;
                    newNpc.MinLevel = loadingfloor.Npcs[npc].MinLevel;
                    newNpc.MaxLevel = loadingfloor.Npcs[npc].MaxLevel;
                    newNpc.AppearanceRate = loadingfloor.Npcs[npc].AppearanceRate;
                    newNpc.StartStatus = loadingfloor.Npcs[npc].StartStatus;
                    newNpc.StartStatusCounter = loadingfloor.Npcs[npc].StartStatusCounter;
                    newNpc.StartStatusChance = loadingfloor.Npcs[npc].StartStatusChance;

                    npcList.Add(newNpc);
                    lbxNpcs.Items.Add(new ListBoxTextItem(Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10), (npc + 1) + ": "
                + "(" + newNpc.AppearanceRate + "%) " + "Lv." + newNpc.MinLevel + "-" + newNpc.MaxLevel + " " + Npc.NpcHelper.Npcs[newNpc.NpcNum].Name
                + " [" + newNpc.StartStatusChance + "% " + newNpc.StartStatus.ToString() + "]"));

                }

                lblSaveLoadMessage.Text = "Npc settings loaded";
            } else if (pnlRDungeonTraps != null && pnlRDungeonTraps.Visible == true) {

                trapList.Clear();
                lbxTraps.Items.Clear();
                for (int traps = 0; traps < loadingfloor.SpecialTiles.Count; traps++) {
                    EditableRDungeonTrap newTile = new EditableRDungeonTrap();

                    newTile.SpecialTile.Ground = loadingfloor.SpecialTiles[traps].SpecialTile.Ground;
                    newTile.SpecialTile.GroundAnim = loadingfloor.SpecialTiles[traps].SpecialTile.GroundAnim;
                    newTile.SpecialTile.Mask = loadingfloor.SpecialTiles[traps].SpecialTile.Mask;
                    newTile.SpecialTile.Anim = loadingfloor.SpecialTiles[traps].SpecialTile.Anim;
                    newTile.SpecialTile.Mask2 = loadingfloor.SpecialTiles[traps].SpecialTile.Mask2;
                    newTile.SpecialTile.M2Anim = loadingfloor.SpecialTiles[traps].SpecialTile.M2Anim;
                    newTile.SpecialTile.Fringe = loadingfloor.SpecialTiles[traps].SpecialTile.Fringe;
                    newTile.SpecialTile.FAnim = loadingfloor.SpecialTiles[traps].SpecialTile.FAnim;
                    newTile.SpecialTile.Fringe2 = loadingfloor.SpecialTiles[traps].SpecialTile.Fringe2;
                    newTile.SpecialTile.F2Anim = loadingfloor.SpecialTiles[traps].SpecialTile.F2Anim;

                    newTile.SpecialTile.GroundSet = loadingfloor.SpecialTiles[traps].SpecialTile.GroundSet;
                    newTile.SpecialTile.GroundAnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.GroundAnimSet;
                    newTile.SpecialTile.MaskSet = loadingfloor.SpecialTiles[traps].SpecialTile.MaskSet;
                    newTile.SpecialTile.AnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.AnimSet;
                    newTile.SpecialTile.Mask2Set = loadingfloor.SpecialTiles[traps].SpecialTile.Mask2Set;
                    newTile.SpecialTile.M2AnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.M2AnimSet;
                    newTile.SpecialTile.FringeSet = loadingfloor.SpecialTiles[traps].SpecialTile.FringeSet;
                    newTile.SpecialTile.FAnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.FAnimSet;
                    newTile.SpecialTile.Fringe2Set = loadingfloor.SpecialTiles[traps].SpecialTile.Fringe2Set;
                    newTile.SpecialTile.F2AnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.F2AnimSet;

                    newTile.SpecialTile.Type = loadingfloor.SpecialTiles[traps].SpecialTile.Type;
                    newTile.SpecialTile.Data1 = loadingfloor.SpecialTiles[traps].SpecialTile.Data1;
                    newTile.SpecialTile.Data2 = loadingfloor.SpecialTiles[traps].SpecialTile.Data2;
                    newTile.SpecialTile.Data3 = loadingfloor.SpecialTiles[traps].SpecialTile.Data3;
                    newTile.SpecialTile.String1 = loadingfloor.SpecialTiles[traps].SpecialTile.String1;
                    newTile.SpecialTile.String2 = loadingfloor.SpecialTiles[traps].SpecialTile.String2;
                    newTile.SpecialTile.String3 = loadingfloor.SpecialTiles[traps].SpecialTile.String3;

                    newTile.AppearanceRate = loadingfloor.SpecialTiles[traps].AppearanceRate;

                    trapList.Add(newTile);
                    lbxTraps.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (traps + 1) + ": " + newTile.SpecialTile.Type + "/" + newTile.SpecialTile.Data1 + "/" + newTile.SpecialTile.Data2 + "/" + newTile.SpecialTile.Data3));
                }

                lblSaveLoadMessage.Text = "Trap settings loaded";
            } else if (pnlRDungeonWeather != null && pnlRDungeonWeather.Visible == true) {

                lbxWeather.Items.Clear();
                for (int weather = 0; weather < loadingfloor.Weather.Count; weather++) {
                    lbxWeather.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (weather + 1) + ":" + (int)loadingfloor.Weather[weather] + ": " + Enum.GetName(typeof(Enums.Weather), loadingfloor.Weather[weather])));
                }

                lblSaveLoadMessage.Text = "Weather settings loaded";
            } else if (pnlRDungeonGoal != null && pnlRDungeonGoal.Visible == true) {

                switch (loadingfloor.GoalType) {
                    case Enums.RFloorGoalType.NextFloor: {
                            optNextFloor.Checked = true;
                        }
                        break;
                    case Enums.RFloorGoalType.Map: {
                            optMap.Checked = true;
                        }
                        break;
                    case Enums.RFloorGoalType.Scripted: {
                            optScripted.Checked = true;
                        }
                        break;
                    default: {
                            optNextFloor.Checked = true;
                        }
                        break;
                }

                nudData1.Value = loadingfloor.GoalMap;
                nudData2.Value = loadingfloor.GoalX;
                nudData3.Value = loadingfloor.GoalY;

                lblSaveLoadMessage.Text = "Goal settings loaded";
            } else if (pnlRDungeonChambers != null && pnlRDungeonChambers.Visible == true) {

                chamberList.Clear();
                lbxChambers.Items.Clear();
                for (int chamber = 0; chamber < loadingfloor.Chambers.Count; chamber++) {
                    EditableRDungeonChamber newChamber = new EditableRDungeonChamber();
                    newChamber.ChamberNum = loadingfloor.Chambers[chamber].ChamberNum;
                    newChamber.String1 = loadingfloor.Chambers[chamber].String1;
                    newChamber.String2 = loadingfloor.Chambers[chamber].String2;
                    newChamber.String3 = loadingfloor.Chambers[chamber].String3;
                    chamberList.Add(newChamber);
                    lbxChambers.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), "#" + loadingfloor.Chambers[chamber].ChamberNum + "/" + loadingfloor.Chambers[chamber].String1 + "/" + loadingfloor.Chambers[chamber].String2 + "/" + loadingfloor.Chambers[chamber].String3));
                }

                lblSaveLoadMessage.Text = "Chamber settings loaded";
            } else if (pnlRDungeonMisc != null && pnlRDungeonMisc.Visible == true) {

                nudDarkness.Value = loadingfloor.Darkness;
                if (loadingfloor.Music == "") {
                    lbxMusic.SelectItem(0);
                } else {
                    for (int i = 0; i < lbxMusic.Items.Count; i++) {
                        if (lbxMusic.Items[i].TextIdentifier == loadingfloor.Music) {
                            lbxMusic.SelectItem(i);
                        }
                    }
                }

                lblSaveLoadMessage.Text = "Misc settings loaded";
            }
        }