//Call this method from the Start() method of your ETGModule extension class public static void Init() { //The name of the item string itemName = "Smoking Skull"; //Refers to an embedded png in the project. Make sure to embed your resources! Google it. string resourceName = "BleakMod/Resources/skull"; //Create new GameObject GameObject obj = new GameObject(itemName); //Add a ActiveItem component to the object var item = obj.AddComponent <SmokingSkull>(); //Adds a tk2dSprite component to the object and adds your texture to the item sprite collection ItemBuilder.AddSpriteToObject(itemName, resourceName, obj); //Ammonomicon entry variables string shortDesc = "Hold Of The Iron Ring"; string longDesc = "On use, chooses one of 3 of the Cannonbalrog's attacks to execute.\n\nAn artifact discovered in the binding tomb of a legendary beast. Its sole eye stares straight into your soul."; item.consumable = false; //Adds the item to the gungeon item list, the ammonomicon, the loot table, etc. //"kts" here is the item pool. In the console you'd type kts:sweating_bullets ItemBuilder.SetupItem(item, shortDesc, longDesc, "bb"); //Set the cooldown type and duration of the cooldown ItemBuilder.SetCooldownType(item, ItemBuilder.CooldownType.Damage, 400); //Adds a passive modifier, like curse, coolness, damage, etc. to the item. Works for passives and actives. ItemBuilder.AddPassiveStatModifier(item, PlayerStats.StatType.Curse, 1, StatModifier.ModifyMethod.ADDITIVE); ItemBuilder.AddToSubShop(item, ItemBuilder.ShopType.Cursula, 1f); //Set some other fields item.quality = ItemQuality.A; }
public static void Init() { string itemName = "Trickster's Gun"; string resourceName = "Items/Resources/tricksters_gun.png"; GameObject obj = new GameObject(itemName); var item = obj.AddComponent <TrickstersGun>(); ItemBuilder.AddSpriteToObject(itemName, resourceName, obj); string shortDesc = "A Memento"; string longDesc = "Use on a boss with less than 1/3 health remaining for a devastating finale!\n\nA gun once wielded by a powerful Trickster who sought defiance against those who abused power. A potent energy thrums from within it." + "\n\nIt's time for an all out attack!"; ItemBuilder.SetupItem(item, shortDesc, longDesc, "cel"); ItemBuilder.AddPassiveStatModifier(item, PlayerStats.StatType.Curse, 2, StatModifier.ModifyMethod.ADDITIVE); ItemBuilder.SetCooldownType(item, ItemBuilder.CooldownType.Damage, 1000); ItemBuilder.AddToSubShop(item, ItemBuilder.ShopType.Cursula); item.quality = ItemQuality.EXCLUDED; item.sprite.IsPerpendicular = true; }