Skip to content

(extension).SetupBasicItem

Aidanamite edited this page Oct 11, 2021 · 1 revision

Extension of: ItemMaster

Description:

Use to do the basic configuration of a ItemMaster object

Return Type: void

Arguments:

  • string Id This is the name id used for registration of this item. It can be anything you want it but must be different from any other item you've created.
  • string NameLocalizationKey This is the localization term for the item's name
  • string DescriptionLocalizationKey This is the localization term for the item's decription
  • string SpriteAssetName This is the asset name for the item's sprite
  • int GoldValue (default: 0)
  • ItemMaster.Culture Culture (default: ItemMaster.Culture.Merchant) This controls which notebook tab your item will appear in as well as your item's default chest spawn dungeon.
  • bool CanAppearInChest (default: false)
  • float SpawnWeight (default: 1) This controls the spawn chance of the item
  • int MaxStackSize (default: 1) This is the maximum size for a stack of the item (unless it is an equipment item it is recommended to be set to at least 4)
  • int MaxSpawnStack (default: 1) This is the maximum size stack that can spawn in a chest
  • int MinSpawnStack (default: 1) This is the minimum size stack that can spawn in a chest
  • int MinPlusLevel (default: 0) This is the minimum Plus Level that the item can appear at
  • ItemMaster.Tier Tier (default: ItemMaster.Tier.Tier1) This also controls the spawn chance of the item. See: Chest Spawn Chances
  • int WandererWeaponGoldCost (default: 0) This is the gold cost of the item in the Wanderer's Dungeon Merchant shop
  • int WandererWeaponSlimeCost (default: 0) This is the slime coin cost of the item in the Wanderer's Dungeon Merchant shop
  • bool DestroyedOnDungeonExit (default: false) If this is set to true the item will have the "Trick Item" curse

Example:

myItem.SetupBasicItem(
    Id: "MyItem",
    NameLocalizationKey: myItemName,
    DescriptionLocalizationKey: myItemDesc,
    SpriteAssetName: myItemSprite,
    MaxStackSize: 10,
    GoldValue: 1000,
    Culture: ItemMaster.Culture.Golem,
    CanAppearInChest: true,
    MinPlusLevel: 0,
    Tier: ItemMaster.Tier.Tier1);

Clone this wiki locally