Exemple #1
0
        public GameItemInfoScreen()
        {
            while (_selIndex != -1)
            {
                DeleteSelections();
                Clear();
                AddSelection("This screen allows the editting of the properties of items that affect the items system.", 0, false);

                _valueStructs = new List <InputStruct> {
                    GameStructs.BuildInputStruct("Money", "The name of the game's currency.", "Enter the new name.", false, new List <string> {
                    }, InputChecker.OneLineStringCheck),
                    GameStructs.BuildInputStruct("Categories", "All the possible types of items in the game. Every item will fall into one of these categories.", "Enter the new categories. The max length for each is the width of the game minus 2. Use the '|' character to separate categories.", false, new List <string> {
                    }, InputChecker.CategoriesPropertyCheck),
                    GameStructs.BuildInputStruct("Max Stack", "The largest number of one item that can exist in one stack.", "Enter the new max stack. Minimum is 1.", false, new List <string> {
                    }, InputChecker.Min1Max999Check),
                    GameStructs.BuildInputStruct("No Items Text", "Text for when the player tries to the items screen from the game menu when he/she has no items.", "Enter the new text.", false, new List <string> {
                    }, InputChecker.WrappedStringCheck)
                };

                foreach (InputStruct vs in _valueStructs)
                {
                    AddSelection(Helper.BuildProperty(vs.name, vs.desc, GameFile.ItemInfo [vs.name]), 1, true);
                }

                DrawSelections();
                GetSelection(true, _selIndex);

                if (_selIndex != -1)
                {
                    InputStruct currentStruct = _valueStructs [_selIndex - 1];
                    int         currentLine   = _selectionLines [_selIndex] + _selections [_selIndex].Count();
                    InputGetter.GetInput(currentStruct, GameFile.ItemInfo, currentLine);
                }
            }
        }
Exemple #2
0
        public GameBattleScreen()
        {
            while (_selIndex != -1)
            {
                DeleteSelections();
                Clear();
                AddSelection("This screen allows the editting of all the text that can appear during a battle, as well as the chance of escaping from a battle.", 0, false);

                _valueStructs = new List <InputStruct> {
                    GameStructs.BuildInputStruct("No Units Text", "Text for when the player tries to enter a battle with no available units.", "Enter the new text.", false, new List <string> {
                    }, InputChecker.WrappedStringCheck),
                    GameStructs.BuildInputStruct("Main Menu Text", "Text for when the player is on the main menu of a battle.", "Enter the new text. The '@' character will be replaced with the player's unit's name.", AlphAndNums() + "-:'!?,.@#|", Convert.ToInt32(GameFile.General ["Width"]), false, InputChecker.BlankCheck, new string [] {}, ValueType.String),
                    GameStructs.BuildInputStruct("Fight Menu Text", "Text for when the player is on the fight menu of a battle.", "Enter the new text. The '@' character will be replaced with the player's unit's name.", AlphAndNums() + "-:'!?,.@#|", Convert.ToInt32(GameFile.General ["Width"]), false, InputChecker.BlankCheck, new string [] {}, ValueType.String),
                    GameStructs.BuildInputStruct("Fight", "The label for the Fight menu on the Main menu of a battle.", "Enter the new label. The maximum width is " + (Convert.ToInt32(GameFile.General ["Width"]) / 2 - 1).ToString() + ".", AlphAndNums() + "-:'!?,.@#|", Convert.ToInt32(GameFile.General ["Width"]), false, InputChecker.BlankCheck, new string [] {}, ValueType.String),
                    GameStructs.BuildInputStruct("Bag", "The label for the items screen on the Main menu of a battle.", "Enter the new label. The maximum width is " + (Convert.ToInt32(GameFile.General ["Width"]) / 2 - 1).ToString() + ".", AlphAndNums() + "-:'!?,.@#|", Convert.ToInt32(GameFile.General ["Width"]), false, InputChecker.BlankCheck, new string [] {}, ValueType.String),
                    GameStructs.BuildInputStruct("Units", "The label for the unit-swapping screen on the Main menu of a battle.", "Enter the new label. The maximum width is " + (Convert.ToInt32(GameFile.General ["Width"]) / 2 - 1).ToString() + ".", AlphAndNums() + "-:'!?,.@#|", Convert.ToInt32(GameFile.General ["Width"]), false, InputChecker.BlankCheck, new string [] {}, ValueType.String),
                    GameStructs.BuildInputStruct("Escape", "The label for the escape action on the Main menu of a battle.", "Enter the new label. The maximum width is " + (Convert.ToInt32(GameFile.General ["Width"]) / 2 - 1).ToString() + ".", AlphAndNums() + "-:'!?,.@#|", Convert.ToInt32(GameFile.General ["Width"]), false, InputChecker.BlankCheck, new string [] {}, ValueType.String),
                    GameStructs.BuildInputStruct("Run Chance Level Difference", "The minimum level difference between both parties to augment the chance of escape to either 100% or 0%.", "Enter the new level difference. If the difference is 5, when the player's unit is 5 levels lower than the enemy unit, the escape chance is 0%, 100% if 5 levels higher. If both units are equal, the chance is 50%.", 1, 9999, InputChecker.BlankCheck, new string [] {}, ValueType.Int),
                    GameStructs.BuildInputStruct("Escape Success Text", "Text for when the player escapes from a battle.", "Enter the new text.", AlphAndNums() + "-:'!?,.@#|", 10, 16, false, InputChecker.BlankCheck, new string [] {}, ValueType.WrappedString),
                    GameStructs.BuildInputStruct("Escape Fail Text", "Text for when the player fails to escape from a battle.", "Enter the new text.", AlphAndNums() + "-:'!?,.@#|", 10, 16, false, InputChecker.BlankCheck, new string [] {}, ValueType.WrappedString),
                    GameStructs.BuildInputStruct("Cannot Escape Text", "Text for when the player tries to escape from a battle which cannot be escaped from.", "Enter the new text.", AlphAndNums() + "-:'!?,.@#|", 10, 16, false, InputChecker.BlankCheck, new string [] {}, ValueType.WrappedString),
                    GameStructs.BuildInputStruct("Send Out Unit Text", "Text for when the player's unit is introduced in a battle.", "Enter the new text. The '@' character will be replaced with the unit's name.", AlphAndNums() + "-:'!?,.@#|", 10, 16, false, InputChecker.BlankCheck, new string [] {}, ValueType.WrappedString),
                    GameStructs.BuildInputStruct("Swap Unit Text", "Text for when the player enters the unit-swapping screen.", "Enter the new text. The '@' character will be replaced with the unit's name.", AlphAndNums() + "-:'!?,.@#|", 10, 16, false, InputChecker.BlankCheck, new string [] {}, ValueType.WrappedString),
                    GameStructs.BuildInputStruct("Cannot Swap Unit Text", "Text for when the player enters the unit-swapping screen with no available units.", "Enter the new text. The '@' character will be replaced with the unit's name.", AlphAndNums() + "-:'!?,.@#|", 10, 16, false, InputChecker.BlankCheck, new string [] {}, ValueType.WrappedString),
                    GameStructs.BuildInputStruct("Unit Return Text", "Text for when the player recalls his current unit before swapping with another.", "Enter the new text. The '@' character will be replaced with the unit's name.", AlphAndNums() + "-:'!?,.@#|", 10, 16, false, InputChecker.BlankCheck, new string [] {}, ValueType.WrappedString),
                    GameStructs.BuildInputStruct("Replace Unit Text", "Text for when the player enters the unit-swapping screen due to his current unit dying.", "Enter the new text. The '@' character will be replaced with the unit's name.", AlphAndNums() + "-:'!?,.@#|", 10, 16, false, InputChecker.BlankCheck, new string [] {}, ValueType.WrappedString),
                    GameStructs.BuildInputStruct("Your Unit Died Text", "Text for when the player's unit dies.", "Enter the new text. The '@' character will be replaced with the unit's name.", AlphAndNums() + "-:'!?,.@#|", 10, 16, false, InputChecker.BlankCheck, new string [] {}, ValueType.WrappedString),
                    GameStructs.BuildInputStruct("All Units Died Text", "Text for when the player's unit dies and has no available units to continue the battle.", "Enter the new text.", AlphAndNums() + "-:'!?,.@#|", 10, 16, false, InputChecker.BlankCheck, new string [] {}, ValueType.WrappedString),
                    GameStructs.BuildInputStruct("Cannot Catch Unit Text", "Text for when the player tries to catch a unit which cannot be caught.", "Enter the new text. The '@' character will be replaced with the unit's name.", AlphAndNums() + "-:'!?,.@#|", 10, 16, false, InputChecker.BlankCheck, new string [] {}, ValueType.WrappedString),
                };//when wrapping text, take into account the max name length of units


                foreach (InputStruct vs in _valueStructs)
                {
                    AddSelection(Helper.BuildProperty(vs.name, vs.desc, GameFile.Battle [vs.name]), 1, true);
                }

                DrawSelections();
                GetSelection(true, _selIndex);

                if (_selIndex != -1)
                {
                    switch (_valueStructs [_selIndex - 1].valueType)
                    {
                    case ValueType.String:
                        InputGetter.GetString((StringValue)_valueStructs [_selIndex - 1], GameFile.Battle, _selectionLines [_selIndex] + _selections [_selIndex].Count());
                        break;

                    case ValueType.WrappedString:
                        InputGetter.GetWrappedString((WrappedStringValue)_valueStructs [_selIndex - 1], GameFile.Battle, _selectionLines [_selIndex] + _selections [_selIndex].Count());
                        break;

                    case ValueType.Int:
                        InputGetter.GetInt((IntValue)_valueStructs [_selIndex - 1], GameFile.Battle, _selectionLines [_selIndex] + _selections [_selIndex].Count());
                        break;
                    }
                }
            }
        }
Exemple #3
0
        public GameGeneralScreen()
        {
            while (_selIndex != -1)
            {
                DeleteSelections();
                Clear();
                AddSelection("This screen allows the editting of the overall visuals of the game, they do not affect the actual gameplay.", 0, false);

                _valueStructs = new List <InputStruct> {
                    GameStructs.BuildInputStruct("Title", "The title of the game", "Enter the new title. Player files are based on the title, meaning a file for \"Mario\" will not work for \"Mario 2\".", false, new List <string> {
                    }, InputChecker.OneLineStringCheck),
                    GameStructs.BuildInputStruct("Description", "The description that will appear when the user is selecting an RPG.", "Enter the new description. It has to be short.", false, new List <string> {
                    }, InputChecker.WrappedStringCheck),
                    GameStructs.BuildInputStruct("Width", "The width of the window.", "Enter the new width. Minimum width is 30. Maximum width is 76.", false, new List <string> {
                    }, InputChecker.WidthPropertyCheck),
                    GameStructs.BuildInputStruct("Above Height", "The height of the space from the third line to the line above the dialog divider.", "Enter the new height. Minimum height is 10. Maximum height is 16.", false, new List <string> {
                    }, InputChecker.AbovePropertyCheck),
                    GameStructs.BuildInputStruct("Dialog Height", "The height of the space after the dialog divider.", "Enter the new height. Minimum height is 3. Maximum height is 5.", false, new List <string> {
                    }, InputChecker.DialogPropertyCheck),
                    GameStructs.BuildInputStruct("Selection Color", "The color of an enabled selection.", "Enter the new color.", false, Enum.GetNames(typeof(ConsoleColor)).ToList(), InputChecker.ColorPropertyCheck),
                    GameStructs.BuildInputStruct("Current Selection Color", "The color of the current selection.", "Enter the new color.", false, Enum.GetNames(typeof(ConsoleColor)).ToList(), InputChecker.ColorPropertyCheck),
                    GameStructs.BuildInputStruct("Disabled Selection Color", "The color of a disabled selection.", "Enter the new color.", false, Enum.GetNames(typeof(ConsoleColor)).ToList(), InputChecker.ColorPropertyCheck),
                    GameStructs.BuildInputStruct("About", "Text that show up in the About screen", "Enter the new text. Use the '|' character to indicate a new line", false, new List <string> {
                    }, InputChecker.AboutPropertyCheck),
                };

                foreach (InputStruct vs in _valueStructs)
                {
                    AddSelection(Helper.BuildProperty(vs.name, vs.desc, GameFile.General [vs.name]), 1, true);
                }

                DrawSelections();
                GetSelection(true, _selIndex);

                if (_selIndex != -1)
                {
                    InputStruct currentStruct = _valueStructs [_selIndex - 1];
                    int         currentLine   = _selectionLines [_selIndex] + _selections [_selIndex].Count();
                    InputGetter.GetInput(currentStruct, GameFile.General, currentLine);
                }
            }
        }
Exemple #4
0
        public GameUnitInfoScreen()
        {
            while (_selIndex != -1)
            {
                DeleteSelections();
                Clear();
                AddSelection("This screen allows the editting of the text and properties that affect the units system.", 0, false);

                _valueStructs = new List <InputStruct> {
                    GameStructs.BuildInputStruct("Stat Names", "The names of all the stats of a unit.", "Enter the new stat names (Name|Level|HP|Ailment|EXP|Attack|S.Attack|Defense|S.Defense|Speed). Use the '|' character to separate stat names.", false, new List <string> {
                    }, InputChecker.StatNamesPropertyCheck),
                    GameStructs.BuildInputStruct("Stat Descriptions", "The descriptions of all the stats of a unit.", "Enter the new stat descriptions (Level|HP|Ailment|EXP|Attack|S.Attack|Defense|S.Defense|Speed). Use the '|' character to separate stat descriptions.", false, new List <string> {
                    }, InputChecker.StatDescriptionsPropertyCheck),
                    GameStructs.BuildInputStruct("HP Short Name", "The label for HP shown in battles and menus.", "Enter the new name. 3 characters max.", false, new List <string> {
                    }, InputChecker.ShortNameCheck),
                    GameStructs.BuildInputStruct("Level Short Name", "The label for Level shown in battles and menus", "Enter the new name. 3 characters max.", false, new List <string> {
                    }, InputChecker.ShortNameCheck),
                    GameStructs.BuildInputStruct("EXP Short Name", "The label for EXP shown in battles.", "Enter the new name. 3 characters max.", false, new List <string> {
                    }, InputChecker.ShortNameCheck),
                    GameStructs.BuildInputStruct("Max Length of Name", "The maximum length of the name a unit can have.", "Enter the new maximum name length.", false, new List <string> {
                    }, InputChecker.NameLengthPropertyCheck),
                    GameStructs.BuildInputStruct("Minimum Units Required", "The minimum number of units the player must have at all times (currently has no use).", "Enter the new minimum.", false, new List <string> {
                    }, InputChecker.Min0Max999Check),
                    GameStructs.BuildInputStruct("Maximum Possible Units", "The maximum number of units the player can have at a time.", "Enter the new maximum.", false, new List <string> {
                    }, InputChecker.Min1Max999Check),
                    GameStructs.BuildInputStruct("Max Level", "The maximum level a unit can reach.", "Enter the new maximum level.", false, new List <string> {
                    }, InputChecker.Min1Max999Check),
                    GameStructs.BuildInputStruct("Cannot Level Up Text", "Text for when a unit receives exp but cannot level up.", "Enter the new text. The '@' character will be replaced by the unit's name.", false, new List <string> {
                    }, InputChecker.WrappedStringCheck),
                    GameStructs.BuildInputStruct("Too Few Units Text", "Text for when the player tries to get rid of a unit but doing so would go under the minimum units required (currently has no use).", "Enter the new text (currently has no use).", false, new List <string> {
                    }, InputChecker.WrappedStringCheck),
                    GameStructs.BuildInputStruct("Caught Unit Text", "Text for when the player catches a unit.", "Enter the new text. The '@' character will be replaced by the unit's name.", false, new List <string> {
                    }, InputChecker.WrappedStringCheck),
                    GameStructs.BuildInputStruct("No Space Text", "Text for when the player catches a unit but already have the maximum number of units possible.", "Enter the new text.", false, new List <string> {
                    }, InputChecker.WrappedStringCheck),
                    GameStructs.BuildInputStruct("Rename Question", "Text for when the player is asked if he/she wants to rename the newly caught unit.", "Enter the new question. The '@' character will be replaced by the unit's name.", false, new List <string> {
                    }, InputChecker.WrappedStringCheck),
                    GameStructs.BuildInputStruct("New Name Before Text", "Text for when the player is renaming the newly caught unit.", "Enter the new text. The '@' character will be replaced by the unit's name.", false, new List <string> {
                    }, InputChecker.WrappedStringCheck),
                    GameStructs.BuildInputStruct("New Name After Text", "Text for after the player renamed the newly caught unit.", "Enter the new text. The '@' and '#' characters will be replaced by the unit's old and new name.", false, new List <string> {
                    }, InputChecker.WrappedStringCheck),
                    GameStructs.BuildInputStruct("No Units Text", "Text for when the player tries to enter the units screen from the game menu when he/she has no units.", "Enter the new text.", false, new List <string> {
                    }, InputChecker.WrappedStringCheck),
                    GameStructs.BuildInputStruct("Gain EXP Text", "Text for when a unit gains EXP.", "Enter the new text. The '@' and '#' characters will be replaced by the unit's name and the EXP amount.", false, new List <string> {
                    }, InputChecker.WrappedStringCheck),
                    GameStructs.BuildInputStruct("Level Up Text", "Text for when a unit levels up.", "Enter the new text. The '@' character will be replaced by the unit's name.", false, new List <string> {
                    }, InputChecker.WrappedStringCheck),
                    GameStructs.BuildInputStruct("Max Moves", "The maximum number of moves a unit can know at a time.", "Enter the new maximum.", false, new List <string> {
                    }, InputChecker.Min1Max999Check),
                    GameStructs.BuildInputStruct("EXP Next Base", "The EXP required for a unit to reach Level 2.", "Enter the new EXP base.", false, new List <string> {
                    }, InputChecker.ExpNextBasePropertyCheck),
                    GameStructs.BuildInputStruct("EXP Next Multiplier", "The multiplier for the EXP required for each level.", "Enter the new EXP multiplier.", false, new List <string> {
                    }, InputChecker.ExpMultiplierCheck),
                    GameStructs.BuildInputStruct("Enemy EXP Multiplier", "The multiplier for the EXP that enemy units give.", "Enter the new EXP multiplier.", false, new List <string> {
                    }, InputChecker.ExpMultiplierCheck),
                };

                foreach (InputStruct vs in _valueStructs)
                {
                    AddSelection(Helper.BuildProperty(vs.name, vs.desc, GameFile.UnitInfo [vs.name]), 1, true);
                }

                DrawSelections();
                GetSelection(true, _selIndex);

                if (_selIndex != -1)
                {
                    InputStruct currentStruct = _valueStructs [_selIndex - 1];
                    int         currentLine   = _selectionLines [_selIndex] + _selections [_selIndex].Count();
                    InputGetter.GetInput(currentStruct, GameFile.General, currentLine);
                }
            }
        }