public BookValues() { InitializeComponent(); skillComboBox.Tag = new JsonFormTag( "skill", "The skill this book trains.", true, "none"); reqlevelNumeric.Tag = new JsonFormTag( "required_level", "The minimum skill level needed to understand this book."); maxlevelNumeric.Tag = new JsonFormTag( "max_level", "The maximum skill level that can be achieved with this book."); intNumeric.Tag = new JsonFormTag( "intelligence", "The minimum intelligence needed to understand this book."); funNumeric.Tag = new JsonFormTag( "fun", "Morale bonus given by reading this book."); timeNumeric.Tag = new JsonFormTag( "time", "Time in minutes on reading session on this book takes."); WinformsUtil.ControlsAttachHooks(Controls[0]); WinformsUtil.TagsSetDefaults(Controls[0]); Form1.Instance.ReloadLists += LoadSkills; }
public ItemGroupValues() { InitializeComponent(); idTextBox.Tag = new JsonFormTag( "id", "A unique string identifier for this item group,"); itemidTextBox.Tag = new JsonFormTag( null, "The id of the item to spawn."); ((JsonFormTag)itemidTextBox.Tag).dataSource = JsonFormTag.DataSourceType.ITEMS; freqNumeric.Tag = new JsonFormTag( null, "The relative frequency of this item to spawn."); itemsListBox.Tag = new JsonFormTag( "items", "The list of items in this group and their relative frequencies."); ListBoxTagData listBoxData = new ListBoxTagData(); listBoxData.backingList = items; listBoxData.defaultValue = new object[] { "null", 0 }; listBoxData.deleteButton = deleteButton; listBoxData.newButton = newButton; listBoxData.keyControl = itemidTextBox; listBoxData.valueControl = freqNumeric; ((JsonFormTag)itemsListBox.Tag).listBoxData = listBoxData; WinformsUtil.ControlsAttachHooks(this); WinformsUtil.TagsSetDefaults(this); }
public GunmodValues() { InitializeComponent(); damageNumeric.Tag = new JsonFormTag( "damage_modifier", "This mod alters the damage of the affected weapon by this amount."); loudnessNumeric.Tag = new JsonFormTag( "loudness_modifier", "This mod alters the noise emitted by the affected weapon by this amount."); dispersionNumeric.Tag = new JsonFormTag( "dispersion_modifier", "This mod alters the dispersion of shots from the affected weapon by this amount. It is measured in quarter-degrees."); recoilNumeric.Tag = new JsonFormTag( "recoil_modifier", "This mod alters the recoil amount of the affected weapon by this amount."); burstNumeric.Tag = new JsonFormTag( "burst_modifier", "This mod alters the number of rounds in a burst fire by this amount."); clipsizeNumeric.Tag = new JsonFormTag( "clip_size_modifier", "This mod increases the clip size of the affected weapon by the specified percentage."); ammoComboBox.Tag = new JsonFormTag( "ammo_modifier", "This mod changes the ammo type used by the affected weapon to this type."); ammoCheckedListBox.Tag = new JsonFormTag( "acceptable_ammo", "If set, this mod can only be applied to guns using one of the specified ammo types."); typesCheckedListBox.Tag = new JsonFormTag( "mod_targets", "This mod can only be attached to weapon types specified here."); WinformsUtil.ControlsAttachHooks(this); WinformsUtil.TagsSetDefaults(this); }
public ItemGroupValues() { InitializeComponent(); idTextBox.Tag = new JsonFormTag( "id", "A unique string identifier for this item group,"); itemidTextBox.Tag = new JsonFormTag( null, "The id of the item to spawn."); ((JsonFormTag)itemidTextBox.Tag).isItemId = true; freqNumeric.Tag = new JsonFormTag( null, "The relative frequency of this item to spawn."); itemsListBox.Tag = new JsonFormTag( null, "The list of items in this group and their relative frequencies."); WinformsUtil.ControlsAttachHooks(Controls[0]); WinformsUtil.TagsSetDefaults(Controls[0]); itemsListBox.DataSource = items; itemsListBox.DisplayMember = "Display"; WinformsUtil.OnReset += Reset; WinformsUtil.OnLoadItem += LoadItem; }
public ToolValues() { InitializeComponent(); ammoComboBox.Tag = new JsonFormTag( "ammo", "The ammo type consumed by this tool.", true, "NULL"); revertsTextBox.Tag = new JsonFormTag( "revert_to", "The item ID of the item to revert to when this item runs out of charges.", true, "null"); ((JsonFormTag)revertsTextBox.Tag).dataSource = JsonFormTag.DataSourceType.ITEMS; maxChargesNumeric.Tag = new JsonFormTag( "max_charges", "The maximum number of charges this tool can hold at once."); spawnChargesNumeric.Tag = new JsonFormTag( "initial_charges", "The number of charges this tool has when it is spawned."); turnsPerNumeric.Tag = new JsonFormTag( "turns_per_charge", "Every time this many turns elapse, the item consumes one charge."); useChargesNumeric.Tag = new JsonFormTag( "charges_per_use", "The number of charges this tool consumes for each use."); WinformsUtil.ControlsAttachHooks(this); WinformsUtil.TagsSetDefaults(this); }
public ComestibleValues() { InitializeComponent(); comesttypeComboBox.Tag = new JsonFormTag( "comestible_type", "Is this comestible a food, a drink, or a med?", true, "FOOD"); toolTextBox.Tag = new JsonFormTag( "tool", "The item id of an item that is required to ingest this comestible.", true, "null"); ((JsonFormTag)toolTextBox.Tag).dataSource = JsonFormTag.DataSourceType.ITEMS; containerTextBox.Tag = new JsonFormTag( "container", "The item id of an item that will be the default container for this comestible.", true, "null"); ((JsonFormTag)containerTextBox.Tag).dataSource = JsonFormTag.DataSourceType.ITEMS; nutritionNumeric.Tag = new JsonFormTag( "nutrition", "The amount applied to the player's hunger level when this comestible is taken."); quenchNumeric.Tag = new JsonFormTag( "quench", "The amount applied to the player's thirst level when this comestible is taken."); spoilsNumeric.Tag = new JsonFormTag( "spoils_in", "The amount of time it takes for this item to rot, in hours."); addictionNumeric.Tag = new JsonFormTag( "addiction_potential", "The amount applied to the player's addiction level when this comestible is taken."); chargesNumeric.Tag = new JsonFormTag( "charges", "The number of uses in one instance of this item.", true, 1); stackSizeNumeric.Tag = new JsonFormTag( "stack_size", "The maximum stack size for a stack of this item.", false); stimNumeric.Tag = new JsonFormTag( "stim", "The amount applied to the player's stimulus level when this comestible is taken."); healNumeric.Tag = new JsonFormTag( "heal", "The amount applied to the player's hidden Shealth level when this comestible is taken."); funNumeric.Tag = new JsonFormTag( "fun", "The amount applied to the player's morale level when this comestible is taken."); addictionTypeComboBox.Tag = new JsonFormTag( "addiction_type", "The type of addiction a player can get from taking this comestible.", true, "none"); WinformsUtil.ControlsAttachHooks(this); WinformsUtil.TagsSetDefaults(this); }
public AmmoValues() { InitializeComponent(); ammoComboBox.Tag = new JsonFormTag( "ammo_type", "The type classification of this ammo."); countNumeric.Tag = new JsonFormTag( "count", "The size of spawned stacks of this ammo."); dispersionNumeric.Tag = new JsonFormTag( "dispersion", "The dispersion contributed to attacks by this ammo."); recoilNumeric.Tag = new JsonFormTag( "recoil", "The recoil contributed to attacks by this ammo."); damageNumeric.Tag = new JsonFormTag( "damage", "The damage contributed to attacks by this ammo."); pierceNumeric.Tag = new JsonFormTag( "pierce", "The armor pierce rating of this ammo."); rangeNumeric.Tag = new JsonFormTag( "range", "The range modifier for this ammo."); effectsCheckedListBox.Tag = new JsonFormTag( "effects", "Special effects of this ammo.", false); WinformsUtil.ControlsAttachHooks(Controls[0]); WinformsUtil.TagsSetDefaults(Controls[0]); }
public ArmorValues() { InitializeComponent(); coversCheckedListBox.Tag = new JsonFormTag( "covers", "A list of body parts the armor protects."); encumberanceNumeric.Tag = new JsonFormTag( "encumberance", "The encumberance this armor inflicts on covered body parts."); coverageNumeric.Tag = new JsonFormTag( "coverage", "The percent chance that this armor covers any particular point in its worn area."); thicknessNumeric.Tag = new JsonFormTag( "material_thickness", ""); enviProtectNumeric.Tag = new JsonFormTag( "enviromental_protection", "The amount of environmental protection this armor provides when worn."); warmthNumeric.Tag = new JsonFormTag( "warmth", "The amount of warmth this armor provides when worn."); storageNumeric.Tag = new JsonFormTag( "storage", "The amount of storage volume this armor provides when worn."); powerArmorCheckBox.Tag = new JsonFormTag( "power_armor", "Is this armor power armor? Power armor can only be worn with other power armor.", false, false); WinformsUtil.ControlsAttachHooks(Controls[0]); WinformsUtil.TagsSetDefaults(Controls[0]); }
public ContainValues() { InitializeComponent(); containsNumeric.Tag = new JsonFormTag( "contains", "The number of items or fluid units this container holds.", true, 1); WinformsUtil.ControlsAttachHooks(Controls[0]); WinformsUtil.TagsSetDefaults(Controls[0]); }
public GunValues() { InitializeComponent(); ammoComboBox.Tag = new JsonFormTag( "ammo", "The type of ammo fired by this weapon."); skillComboBox.Tag = new JsonFormTag( "skill", "The skill used and trained when firing this weapon."); ((JsonFormTag)skillComboBox.Tag).dataSource = JsonFormTag.DataSourceType.GUN_SKILLS; damageNumeric.Tag = new JsonFormTag( "ranged_damage", "Base damage dealt by this weapon."); rangeNumeric.Tag = new JsonFormTag( "range", "The weapon's range."); dispersionNumeric.Tag = new JsonFormTag( "dispersion", "Disperion or inaccuracy of the weapon. It is measured in quarter-degrees."); recoilNumeric.Tag = new JsonFormTag( "recoil", "The amount of recoil inflicted by the weapon."); durabilityNumeric.Tag = new JsonFormTag( "durability", "The durability of the weapon."); burstNumeric.Tag = new JsonFormTag( "burst", "The burst fire size of the weapon."); clipsizeNumeric.Tag = new JsonFormTag( "clip_size", "The number of rounds in one clip for the weapon."); reloadTimeNumeric.Tag = new JsonFormTag( "reload", "Time it takes to reload the weapon."); pierceNumeric.Tag = new JsonFormTag( "pierce", "Armor pierce value of the weapon.", false); ammoEffectsListBox.Tag = new JsonFormTag( "ammo_effects", "Additional ammo effects this weapon grants to its ammo when fired.", false); ((JsonFormTag)ammoEffectsListBox.Tag).dataSource = JsonFormTag.DataSourceType.AMMO_EFFECTS; WinformsUtil.ControlsAttachHooks(this); WinformsUtil.TagsSetDefaults(this); }
public AmmoValues() { InitializeComponent(); ammoComboBox.Tag = new JsonFormTag( "ammo_type", "The type classification of this ammo."); countNumeric.Tag = new JsonFormTag( "count", "The size of spawned stacks of this ammo."); dispersionNumeric.Tag = new JsonFormTag( "dispersion", "The dispersion contributed to attacks by this ammo."); recoilNumeric.Tag = new JsonFormTag( "recoil", "The recoil contributed to attacks by this ammo."); damageNumeric.Tag = new JsonFormTag( "damage", "The damage contributed to attacks by this ammo."); pierceNumeric.Tag = new JsonFormTag( "pierce", "The armor pierce rating of this ammo."); rangeNumeric.Tag = new JsonFormTag( "range", "The range modifier for this ammo."); effectsCheckedListBox.Tag = new JsonFormTag( "effects", "Special effects of this ammo.", false); ((JsonFormTag)effectsCheckedListBox.Tag).dataSource = JsonFormTag.DataSourceType.AMMO_EFFECTS; stackSizeNumeric.Tag = new JsonFormTag( "stack_size", "The maximum stack size for this item.", false); casingTextBox.Tag = new JsonFormTag( "casing", "Item ID of the 'casing' item this ammo drops when it's fired.", false); ((JsonFormTag)casingTextBox.Tag).dataSource = JsonFormTag.DataSourceType.ITEMS; WinformsUtil.ControlsAttachHooks(this); WinformsUtil.TagsSetDefaults(this); }
public GunValues() { InitializeComponent(); ammoComboBox.Tag = new JsonFormTag( "ammo", "The type of ammo fired by this weapon."); skillComboBox.Tag = new JsonFormTag( "skill", "The skill used and trained when firing this weapon."); damageNumeric.Tag = new JsonFormTag( "ranged_damage", "Base damage dealt by this weapon."); rangeNumeric.Tag = new JsonFormTag( "range", "The weapon's range."); dispersionNumeric.Tag = new JsonFormTag( "dispersion", "Disperion or inaccuracy of the weapon. It is measured in quarter-degrees."); recoilNumeric.Tag = new JsonFormTag( "recoil", "The amount of recoil inflicted by the weapon."); durabilityNumeric.Tag = new JsonFormTag( "durability", "The durability of the weapon."); burstNumeric.Tag = new JsonFormTag( "burst", "The burst fire size of the weapon."); clipsizeNumeric.Tag = new JsonFormTag( "clip_size", "The number of rounds in one clip for the weapon."); reloadTimeNumeric.Tag = new JsonFormTag( "reload", "Time it takes to reload the weapon."); WinformsUtil.ControlsAttachHooks(Controls[0]); WinformsUtil.TagsSetDefaults(Controls[0]); Form1.Instance.ReloadLists += LoadGunSkills; }
public RecipeControl() { InitializeComponent(); resultTextBox.Tag = new JsonFormTag( "result", "The id of the item this recipe produces."); ((JsonFormTag)resultTextBox.Tag).dataSource = JsonFormTag.DataSourceType.ITEMS; suffixTextBox.Tag = new JsonFormTag( "id_suffix", "You need to set this to a unique value if multiple recipes produce the same item.", false); skill1ComboBox.Tag = new JsonFormTag( "skill_used", "The main skill used in crafting this recipe.", false); ((JsonFormTag)skill1ComboBox.Tag).dataSource = JsonFormTag.DataSourceType.SKILLS; diffNumeric.Tag = new JsonFormTag( "difficulty", "The skill level required to craft this recipe."); timeNumeric.Tag = new JsonFormTag( "time", "The amount of time required to craft this recipe (in seconds?)."); categoryComboBox.Tag = new JsonFormTag( "category", "The tab this recipe appears under in the crafting menu."); ((JsonFormTag)categoryComboBox.Tag).dataSource = JsonFormTag.DataSourceType.CRAFT_CATEGORIES; autolearnCheckBox.Tag = new JsonFormTag( "autolearn", "Is this recipe automatically learned at the appropriate skill level?", true, true); reversibleCheckBox.Tag = new JsonFormTag( "reversible", "Can this recipe be used to take the result item apart?", false, false); disLearnNumeric.Tag = new JsonFormTag( "decomp_learn", "The skill level required to learn this recipe by disassembling the result item (-1 forbids this).", false, -1); //Fields that aren't saved directly toolsListBox.Tag = new JsonFormTag( null, "A list of tool items required to craft this recipe."); componentsListBox.Tag = new JsonFormTag( null, "A list of ingredients needed to craft this recipe."); itemsListBox.Tag = new JsonFormTag( null, "A list of interchangeable items used by this particular component or tool group."); itemIdTextField.Tag = new JsonFormTag( null, "The string id of this item."); ((JsonFormTag)itemIdTextField.Tag).dataSource = JsonFormTag.DataSourceType.ITEMS; quantityNumeric.Tag = new JsonFormTag( null, "For components, the quantity used. For tools, the number of charges used (-1 for no charges)."); bookIdTextBox.Tag = new JsonFormTag( null, "The string id of the book."); ((JsonFormTag)bookIdTextBox.Tag).dataSource = JsonFormTag.DataSourceType.BOOKS; bookReqLevelNumeric.Tag = new JsonFormTag( null, "The level required before this recipe can be learned from this book."); booksListBox.Tag = new JsonFormTag( "book_learn", "A list of books that this recipe might be learned from.", false); ListBoxTagData listBoxData = new ListBoxTagData(); listBoxData.backingList = bookGroup; listBoxData.defaultValue = new object[] { "null", 0 }; listBoxData.deleteButton = deleteBook; listBoxData.newButton = newBook; listBoxData.keyControl = bookIdTextBox; listBoxData.valueControl = bookReqLevelNumeric; ((JsonFormTag)booksListBox.Tag).listBoxData = listBoxData; reqSkillComboBox.Tag = new JsonFormTag( null, "The identifier of the skill required."); ((JsonFormTag)reqSkillComboBox.Tag).dataSource = JsonFormTag.DataSourceType.SKILLS; reqSkillLevelNumeric.Tag = new JsonFormTag( null, "The required level in the specified skill."); skillsListBox.Tag = new JsonFormTag( "requires_skills", "A list of skill levels required to craft this item.", false); listBoxData = new ListBoxTagData(); listBoxData.backingList = requireSkills; listBoxData.defaultValue = new object[] { "null", 0 }; listBoxData.deleteButton = deleteSkillButton; listBoxData.newButton = newSkillButton; listBoxData.keyControl = reqSkillComboBox; listBoxData.valueControl = reqSkillLevelNumeric; ((JsonFormTag)skillsListBox.Tag).listBoxData = listBoxData; WinformsUtil.ControlsAttachHooks(this); WinformsUtil.TagsSetDefaults(this); toolsListBox.DataSource = toolGroups; toolsListBox.DisplayMember = "Display"; componentsListBox.DataSource = componentGroups; componentsListBox.DisplayMember = "Display"; WinformsUtil.OnReset += Reset; WinformsUtil.OnLoadItem += LoadItem; }
public GenericItemValues() { InitializeComponent(); flagsHelp = new BindingList <JsonFormTag.HelpItem>(); //flagsHelp.Add(new JsonFormTag.HelpItem("FIT", "This piece of clothing fits the player, reducing its encumberance.")); flagsHelp.Add(new JsonFormTag.HelpItem("VARSIZE", "This clothing can have its size adjusted by the player.")); flagsHelp.Add(new JsonFormTag.HelpItem("OVERSIZE", "This clothing goes over other clothing, ignoring some restrictions.")); flagsHelp.Add(new JsonFormTag.HelpItem("HOOD", "This clothing gives head warmth if head is cold and player isn't wearing a helmet (not implemented).")); flagsHelp.Add(new JsonFormTag.HelpItem("POCKETS", "This clothing gives hand warmth if hands are cold and player isn't wielding anything.")); flagsHelp.Add(new JsonFormTag.HelpItem("WATCH", "This clothing allows the player to know the current time.")); flagsHelp.Add(new JsonFormTag.HelpItem("ALARM", "This item has an alarm clock feature (not implemented).")); flagsHelp.Add(new JsonFormTag.HelpItem("SEALS", "This container can safely contain liquids.")); flagsHelp.Add(new JsonFormTag.HelpItem("RIGID", "This container has hard walls (not implemented).")); flagsHelp.Add(new JsonFormTag.HelpItem("WATERTIGHT", "This container can hold liquids.")); flagsHelp.Add(new JsonFormTag.HelpItem("HOT", "This item is hot.")); flagsHelp.Add(new JsonFormTag.HelpItem("EATEN_HOT", "This item is hot when crafted.")); flagsHelp.Add(new JsonFormTag.HelpItem("MODE_AUX", "This weapon mod grants an alternate fire mode.")); flagsHelp.Add(new JsonFormTag.HelpItem("MODE_BURST", "This weapon or mod has a burst fire mode")); flagsHelp.Add(new JsonFormTag.HelpItem("STR_RELOAD", "This weapon's reload time is reduced with a high strength stat.")); flagsHelp.Add(new JsonFormTag.HelpItem("STAB", "This weapon mod grants a stabbing attack.")); flagsHelp.Add(new JsonFormTag.HelpItem("NO_UNLOAD", "Ammo and items loaded into this item can't be unloaded.")); flagsHelp.Add(new JsonFormTag.HelpItem("UNARMED_WEAPON", "This is an unarmed style.")); //flagsHelp.Add(new JsonFormTag.HelpItem("DOUBLE_AMMO", "This tool has doubled battery capacity.")); flagsHelp.Add(new JsonFormTag.HelpItem("GRENADE", "")); flagsHelp.Add(new JsonFormTag.HelpItem("RELOAD_AND_SHOOT", "This gun reloads and shoots in one action (i.e. bows).")); flagsHelp.Add(new JsonFormTag.HelpItem("RELOAD_ONE", "This gun reloads rounds one at a time.")); flagsHelp.Add(new JsonFormTag.HelpItem("CHARGE", "This gun needs to charge from a UPS before firing.")); flagsHelp.Add(new JsonFormTag.HelpItem("FIRE_100", "This gun requires 100 charges to fire.")); flagsHelp.Add(new JsonFormTag.HelpItem("BACKBLAST", "This gun has rocket-launcher backblast.")); flagsHelp.Add(new JsonFormTag.HelpItem("USE_UPS", "This gun requires 5 charges from a UPS to fire.")); flagsHelp.Add(new JsonFormTag.HelpItem("STR8_DRAW", "This gun requires strength 8 to fire.")); flagsHelp.Add(new JsonFormTag.HelpItem("STR10_DRAW", "This gun requires strength 10 to fire.")); flagsHelp.Add(new JsonFormTag.HelpItem("STR12_DRAW", "This gun requires strength 12 to fire.")); flagsHelp.Add(new JsonFormTag.HelpItem("LIGHT_1", "This item emits light.")); flagsHelp.Add(new JsonFormTag.HelpItem("LIGHT_2", "This item emits light.")); flagsHelp.Add(new JsonFormTag.HelpItem("LIGHT_8", "This item emits light.")); flagsHelp.Add(new JsonFormTag.HelpItem("LIGHT_20", "This item emits light.")); flagsCheckedListBox.DataSource = flagsHelp; flagsCheckedListBox.DisplayMember = "Display"; techniquesHelp = new BindingList <JsonFormTag.HelpItem>(); techniquesHelp.Add(new JsonFormTag.HelpItem("SWEEP", "This attack downs enemies.")); techniquesHelp.Add(new JsonFormTag.HelpItem("PRECISE", "This attack inflicts a stun and extra pain.")); techniquesHelp.Add(new JsonFormTag.HelpItem("BRUTAL", "This attack causes a stun and has knockback.")); techniquesHelp.Add(new JsonFormTag.HelpItem("GRAB", "")); techniquesHelp.Add(new JsonFormTag.HelpItem("WIDE", "This attack hits all adjacent enemies.")); techniquesHelp.Add(new JsonFormTag.HelpItem("RAPID", "This attack is fast.")); techniquesHelp.Add(new JsonFormTag.HelpItem("FEINT", "")); techniquesHelp.Add(new JsonFormTag.HelpItem("THROW", "This attack has knockback and downs enemies.")); techniquesHelp.Add(new JsonFormTag.HelpItem("DISARM", "This attack causes the opponent to drop their weapon.")); techniquesHelp.Add(new JsonFormTag.HelpItem("FLAMING", "This attack lights enemies on fire.")); techniquesHelp.Add(new JsonFormTag.HelpItem("BLOCK", "Reduces bash damage of attacks.")); techniquesHelp.Add(new JsonFormTag.HelpItem("BLOCK_LEGS", "")); techniquesHelp.Add(new JsonFormTag.HelpItem("WBLOCK_1", "Weapon grants a small chance to block attacks.")); techniquesHelp.Add(new JsonFormTag.HelpItem("WBLOCK_2", "Weapon grants a chance to block attacks.")); techniquesHelp.Add(new JsonFormTag.HelpItem("WBLOCK_3", "Weapon grants a good chance to block attacks.")); techniquesHelp.Add(new JsonFormTag.HelpItem("COUNTER", "")); techniquesHelp.Add(new JsonFormTag.HelpItem("BREAK", "This attack breaks grabs.")); techniquesHelp.Add(new JsonFormTag.HelpItem("DEF_THROW", "")); techniquesHelp.Add(new JsonFormTag.HelpItem("DEF_DISARM", "")); techniquesCheckedListBox.DataSource = techniquesHelp; techniquesCheckedListBox.DisplayMember = "Display"; idTextBox.Tag = new JsonFormTag( "id", "A unique string ID for the object, used in recipes and the code."); symbolTextBox.Tag = new JsonFormTag( "symbol", "A single character used to display this item on the map.", true, "_"); typeComboBox.Tag = new JsonFormTag( "type", "The type of the object, controlling what extra information it needs.", false); colorComboBox.Tag = new JsonFormTag( "color", "The color used to display this item on the map.", true, "light_gray"); nameTextBox.Tag = new JsonFormTag( "name", "The displayed name of the object. Should be all lowercase except in special cases (like proper nouns and acronyms)."); materialsCheckedListBox.Tag = new JsonFormTag( "material", "The materials making up this item (max 2).", false); descriptionTextBox.Tag = new JsonFormTag( "description", "The displayed description of the item."); phaseComboBox.Tag = new JsonFormTag( "phase", "The default phase of matter of the object. The only effect is that liquids are drinkable and require containers.", false); rarityNumeric.Tag = new JsonFormTag( "rarity", "The rarity of the object. This value is not currently used."); priceNumeric.Tag = new JsonFormTag( "price", "The monetary value of the object."); volumeNumeric.Tag = new JsonFormTag( "volume", "The inventory volume taken up by this object."); weightNumeric.Tag = new JsonFormTag( "weight", "How much this object weighs."); bashNumeric.Tag = new JsonFormTag( "bashing", "Bonus bash damage from this object when wielded as a weapon."); cutNumeric.Tag = new JsonFormTag( "cutting", "Bonus cut damage from this object when wielded as a weapon."); tohitNumeric.Tag = new JsonFormTag( "to_hit", "To-hit modifier for this object when wielded as a weapon."); techniquesCheckedListBox.Tag = new JsonFormTag( "techniques", "Technique flags for this item when used as a weapon.", false); flagsCheckedListBox.Tag = new JsonFormTag( "flags", "Special flags giving specific functionality to the object.", false); functionComboBox.Tag = new JsonFormTag( "use_action", "A game function to call when the item is applied or used.", false); WinformsUtil.ControlsAttachHooks(Controls[0]); WinformsUtil.TagsSetDefaults(Controls[0]); //TODO: warning on load if symbol length > 1 Form1.Instance.ReloadLists += LoadMaterials; }
public RecipeControl() { InitializeComponent(); resultTextBox.Tag = new JsonFormTag( "result", "The id of the item this recipe produces."); ((JsonFormTag)resultTextBox.Tag).isItemId = true; suffixTextBox.Tag = new JsonFormTag( "id_suffix", "You need to set this to a unique value if multiple recipes produce the same item.", false); skill1ComboBox.Tag = new JsonFormTag( "skill_pri", "The main skill used in crafting this recipe.", false); skill2ComboBox.Tag = new JsonFormTag( "skill_sec", "A secondary skill used in crafting this recipe.", false); diffNumeric.Tag = new JsonFormTag( "difficulty", "The skill level required to craft this recipe."); timeNumeric.Tag = new JsonFormTag( "time", "The amount of time required to craft this recipe (in seconds?)."); categoryComboBox.Tag = new JsonFormTag( "category", "The tab this recipe appears under in the crafting menu."); autolearnCheckBox.Tag = new JsonFormTag( "autolearn", "Is this recipe automatically learned at the appropriate skill level?", true, true); reversibleCheckBox.Tag = new JsonFormTag( "reversible", "Can this recipe be used to take the result item apart?", false, false); disLearnNumeric.Tag = new JsonFormTag( "decomp_learn", "The skill level required to learn this recipe by disassembling the result item (-1 forbids this).", false, -1); //Fields that aren't saved directly toolsListBox.Tag = new JsonFormTag( null, "A list of tool items required to craft this recipe."); componentsListBox.Tag = new JsonFormTag( null, "A list of ingredients needed to craft this recipe."); itemsListBox.Tag = new JsonFormTag( null, "A list of interchangeable items used by this particular component or tool group."); itemIdTextField.Tag = new JsonFormTag( null, "The string id of this item."); ((JsonFormTag)itemIdTextField.Tag).isItemId = true; quantityNumeric.Tag = new JsonFormTag( null, "For components, the quantity used. For tools, the number of charges used (-1 for no charges)."); booksListBox.Tag = new JsonFormTag( null, "A list of books that this recipe might be learned from."); bookIdTextBox.Tag = new JsonFormTag( null, "The string id of the book."); ((JsonFormTag)bookIdTextBox.Tag).isBookId = true; bookReqLevelNumeric.Tag = new JsonFormTag( null, "The level required before this recipe can be learned from this book."); WinformsUtil.ControlsAttachHooks(Controls[0]); WinformsUtil.TagsSetDefaults(Controls[0]); toolsListBox.DataSource = toolGroups; toolsListBox.DisplayMember = "Display"; componentsListBox.DataSource = componentGroups; componentsListBox.DisplayMember = "Display"; booksListBox.DataSource = bookGroup; booksListBox.DisplayMember = "Display"; Form1.Instance.ReloadLists += LoadLists; WinformsUtil.OnReset += Reset; WinformsUtil.OnLoadItem += LoadItem; }
public GenericItemValues() { InitializeComponent(); idTextBox.Tag = new JsonFormTag( "id", "A unique string ID for the object, used in recipes and the code."); symbolTextBox.Tag = new JsonFormTag( "symbol", "A single character used to display this item on the map.", true, "_"); typeComboBox.Tag = new JsonFormTag( "type", "The type of the object, controlling what extra information it needs.", false); colorComboBox.Tag = new JsonFormTag( "color", "The color used to display this item on the map.", true, "light_gray"); ((JsonFormTag)colorComboBox.Tag).dataSource = JsonFormTag.DataSourceType.COLOR; nameTextBox.Tag = new JsonFormTag( "name", "The displayed name of the object. Should be all lowercase except in special cases (like proper nouns and acronyms)."); materialsCheckedListBox.Tag = new JsonFormTag( "material", "The materials making up this item (max 2).", false); ((JsonFormTag)materialsCheckedListBox.Tag).dataSource = JsonFormTag.DataSourceType.MATERIALS; descriptionTextBox.Tag = new JsonFormTag( "description", "The displayed description of the item."); phaseComboBox.Tag = new JsonFormTag( "phase", "The default phase of matter of the object. The only effect is that liquids are drinkable and require containers.", false); priceNumeric.Tag = new JsonFormTag( "price", "The monetary value of the object."); volumeNumeric.Tag = new JsonFormTag( "volume", "The inventory volume taken up by this object."); weightNumeric.Tag = new JsonFormTag( "weight", "How much this object weighs."); bashNumeric.Tag = new JsonFormTag( "bashing", "Bonus bash damage from this object when wielded as a weapon."); cutNumeric.Tag = new JsonFormTag( "cutting", "Bonus cut damage from this object when wielded as a weapon."); tohitNumeric.Tag = new JsonFormTag( "to_hit", "To-hit modifier for this object when wielded as a weapon."); techniquesCheckedListBox.Tag = new JsonFormTag( "techniques", "Technique flags for this item when used as a weapon.", false); ((JsonFormTag)techniquesCheckedListBox.Tag).dataSource = JsonFormTag.DataSourceType.TECHNIQUES; flagsCheckedListBox.Tag = new JsonFormTag( "flags", "Special flags giving specific functionality to the object.", false); ((JsonFormTag)flagsCheckedListBox.Tag).dataSource = JsonFormTag.DataSourceType.FLAGS; functionComboBox.Tag = new JsonFormTag( "use_action", "A game function to call when the item is applied or used.", false); WinformsUtil.SetupCharDisplayLabel(charDisplayLabel, symbolTextBox, colorComboBox); WinformsUtil.ControlsAttachHooks(this); WinformsUtil.TagsSetDefaults(this); //TODO: warning on load if symbol length > 1 }
public VehiclePartValues() { InitializeComponent(); idTextBox.Tag = new JsonFormTag( "id", "A unique string identifier for this part."); nameTextBox.Tag = new JsonFormTag( "name", "The display name for this part in vehicle menus."); symbolTextBox.Tag = new JsonFormTag( "symbol", "The display symbol for this part on the map."); colorComboBox.Tag = new JsonFormTag( "color", "The display color for this part on the map."); ((JsonFormTag)colorComboBox.Tag).dataSource = JsonFormTag.DataSourceType.COLOR; brokeSymbolTextBox.Tag = new JsonFormTag( "broken_symbol", "The display symbol for the broken version of this part on the map."); brokeColorComboBox.Tag = new JsonFormTag( "broken_color", "The display color for the broken version of this part on the map."); ((JsonFormTag)brokeColorComboBox.Tag).dataSource = JsonFormTag.DataSourceType.COLOR; damModNumeric.Tag = new JsonFormTag( "damage_modifier", "A percentage applied to damage taken by this part. If 0, the part will not take damage.", false, 0); itemNameTextBox.Tag = new JsonFormTag( "item", "The id of the item this part is built out of."); ((JsonFormTag)itemNameTextBox.Tag).dataSource = JsonFormTag.DataSourceType.ITEMS; vehicleFlagsListBox.Tag = new JsonFormTag( "flags", "A list of flags that apply certain properties to this part."); ((JsonFormTag)vehicleFlagsListBox.Tag).dataSource = JsonFormTag.DataSourceType.VEHICLEPART_FLAGS; fuelTypeComboBox.Tag = new JsonFormTag( "fuel_type", "The type of fuel this part uses, if it has the ENGINE flag.", false); ((JsonFormTag)fuelTypeComboBox.Tag).dataSource = JsonFormTag.DataSourceType.FUEL; par1Numeric.Tag = new JsonFormTag( "par1", ""); powerNumeric.Tag = new JsonFormTag( "power", ""); sizeNumeric.Tag = new JsonFormTag( "size", ""); wheelWidthNumeric.Tag = new JsonFormTag( "wheel_width", "The width of this part if it has the WHEEL flag."); bonusNumeric.Tag = new JsonFormTag( "bonus", ""); WinformsUtil.SetupCharDisplayLabel(charDisplayLabel, symbolTextBox, colorComboBox); WinformsUtil.SetupCharDisplayLabel(charDisplayLabelBroken, brokeSymbolTextBox, brokeColorComboBox); WinformsUtil.ControlsAttachHooks(this); WinformsUtil.TagsSetDefaults(this); WinformsUtil.OnLoadItem += LoadItem; }
public ProfessionValues() { InitializeComponent(); idTextBox.Tag = new JsonFormTag( "ident", "A unique string identifier for this profession."); nameTextBox.Tag = new JsonFormTag( "name", "The displayed name of this profession."); descTextBox.Tag = new JsonFormTag( "description", "A description, in a few sentences, of this profession and its perks."); pointsNumeric.Tag = new JsonFormTag( "points", "The number of character creation points this profession costs."); //TODO: flags? itemIdTextBox.Tag = new JsonFormTag( null, "The string identifier for this item."); ((JsonFormTag)itemIdTextBox.Tag).dataSource = JsonFormTag.DataSourceType.ITEMS; itemListBox.Tag = new JsonFormTag( "items", "A list of items a player choosing this profession starts with."); ListBoxTagData listBoxData = new ListBoxTagData(); listBoxData.backingList = items; listBoxData.defaultValue = "null"; listBoxData.deleteButton = deleteItemButton; listBoxData.newButton = newItemButton; listBoxData.keyControl = itemIdTextBox; listBoxData.valueControl = null; ((JsonFormTag)itemListBox.Tag).listBoxData = listBoxData; skillComboBox.Tag = new JsonFormTag( null, "The string identifier for the skill used."); ((JsonFormTag)skillComboBox.Tag).dataSource = JsonFormTag.DataSourceType.SKILLS; skillLevelNumeric.Tag = new JsonFormTag( null, "The number of levels given to the specified skill."); skillsListBox.Tag = new JsonFormTag( "skills", "A list of skills a player choosing this profession starts with."); listBoxData = new ListBoxTagData(); listBoxData.backingList = skills; Dictionary <string, object> newitem = new Dictionary <string, object>(); newitem.Add("name", "null"); newitem.Add("level", 0); listBoxData.defaultValue = newitem; listBoxData.deleteButton = deleteSkillButton; listBoxData.newButton = newSkillButton; listBoxData.keyControl = skillComboBox; listBoxData.valueControl = skillLevelNumeric; ((JsonFormTag)skillsListBox.Tag).listBoxData = listBoxData; addictionTypeComboBox.Tag = new JsonFormTag( null, "The string identifier for this addiction."); ((JsonFormTag)addictionTypeComboBox.Tag).dataSource = JsonFormTag.DataSourceType.ADDICTION_TYPES; addictionStrengthNumeric.Tag = new JsonFormTag( null, "The initial strength of the addiction."); addictionsListBox.Tag = new JsonFormTag( "addictions", "A list of addictions a player choosing this profession starts with."); listBoxData = new ListBoxTagData(); listBoxData.backingList = addictions; newitem = new Dictionary <string, object>(); newitem.Add("type", "null"); newitem.Add("intensity", 0); listBoxData.defaultValue = newitem; listBoxData.deleteButton = deleteAddiction; listBoxData.newButton = newAddiction; listBoxData.keyControl = addictionTypeComboBox; listBoxData.valueControl = addictionStrengthNumeric; ((JsonFormTag)addictionsListBox.Tag).listBoxData = listBoxData; WinformsUtil.ControlsAttachHooks(this); WinformsUtil.TagsSetDefaults(this); }