public override void ModifyTooltips(Item item, List <TooltipLine> tooltips) { if (item.type == ItemID.PlatinumPickaxe) { tooltips.RemoveAll(x => x.Name == "Tooltip0" && x.mod == "Terraria"); TooltipLine line = tooltips.FirstOrDefault(x => x.Name == "Tooltip0" && x.mod == "Terraria"); if (line != null) { line.text = "Can mine Meteorite and Vulcrain"; } } }
public override void ModifyTooltips(List <TooltipLine> tooltips) { string maxBullet = "" + maxBullets; var line2 = new TooltipLine(mod, "", "Reloads every " + maxBullet + " shots"); tooltips.Add(line2); TooltipLine line1 = new TooltipLine(mod, "Damage", "Dahl"); line1.overrideColor = new Color(176, 157, 127); tooltips.Add(line1); }
public override void ModifyTooltips(List <TooltipLine> tooltips) { Player player = Main.player[Main.myPlayer]; string text1 = Language.GetTextValue("Mods.AlchemistNPC.Pip-Boy4ktext1") + (int)((player.meleeDamage * 100) - 100) + "%" + " / " + (player.meleeCrit - 4) + "%"; string text2 = Language.GetTextValue("Mods.AlchemistNPC.Pip-Boy4ktext2") + (int)((player.rangedDamage * 100) - 100) + "%" + " / " + (player.rangedCrit - 4) + "%"; string text3 = Language.GetTextValue("Mods.AlchemistNPC.Pip-Boy4ktext3") + (int)((player.magicDamage * 100) - 100) + "%" + " / " + (player.magicCrit - 4) + "%"; string text4 = Language.GetTextValue("Mods.AlchemistNPC.Pip-Boy4ktext4") + (int)((player.thrownDamage * 100) - 100) + "%" + " / " + (player.thrownCrit - 4) + "%"; string text5 = Language.GetTextValue("Mods.AlchemistNPC.Pip-Boy4ktext5") + (int)((player.minionDamage * 100) - 100) + "%"; string text6 = Language.GetTextValue("Mods.AlchemistNPC.Pip-Boy4ktext6") + (int)(player.endurance * 100) + "%"; string text7 = Language.GetTextValue("Mods.AlchemistNPC.Pip-Boy4ktext7") + (int)((player.moveSpeed * 100) - 100) + "%"; string text8 = Language.GetTextValue("Mods.AlchemistNPC.Pip-Boy4ktext8") + (player.statLifeMax2 - player.statLifeMax); string text9 = Language.GetTextValue("Mods.AlchemistNPC.Pip-Boy4ktext9") + (player.lifeRegen); string text10 = Language.GetTextValue("Mods.AlchemistNPC.Pip-Boy4ktext10") + (int)((player.manaCost * 100) - 100) + "%"; string text11 = Language.GetTextValue("Mods.AlchemistNPC.Pip-Boy4ktext11") + player.maxMinions + " / " + player.maxTurrets; string text12 = Language.GetTextValue("Mods.AlchemistNPC.Pip-Boy4ktext12") + (int)(player.meleeSpeed * 100) + "%"; TooltipLine line = new TooltipLine(mod, "text1", text1); TooltipLine line2 = new TooltipLine(mod, "text2", text2); TooltipLine line3 = new TooltipLine(mod, "text3", text3); TooltipLine line4 = new TooltipLine(mod, "text4", text4); TooltipLine line5 = new TooltipLine(mod, "text5", text5); TooltipLine line6 = new TooltipLine(mod, "text6", text6); TooltipLine line7 = new TooltipLine(mod, "text7", text7); TooltipLine line8 = new TooltipLine(mod, "text8", text8); TooltipLine line9 = new TooltipLine(mod, "text9", text9); TooltipLine line10 = new TooltipLine(mod, "text10", text10); TooltipLine line11 = new TooltipLine(mod, "text11", text11); TooltipLine line12 = new TooltipLine(mod, "text12", text12); line.overrideColor = Color.Red; line2.overrideColor = Color.LimeGreen; line3.overrideColor = Color.SkyBlue; line4.overrideColor = Color.Orange; line5.overrideColor = Color.MediumVioletRed; line6.overrideColor = Color.Gray; line7.overrideColor = Color.Green; line8.overrideColor = Color.Yellow; line9.overrideColor = Color.Brown; line10.overrideColor = Color.SkyBlue; line11.overrideColor = Color.Magenta; line12.overrideColor = Color.Red; tooltips.Insert(2, line); tooltips.Insert(3, line2); tooltips.Insert(4, line3); tooltips.Insert(5, line4); tooltips.Insert(6, line5); tooltips.Insert(7, line6); tooltips.Insert(8, line7); tooltips.Insert(9, line8); tooltips.Insert(10, line9); tooltips.Insert(11, line10); tooltips.Insert(12, line11); tooltips.Insert(13, line12); }
public override void ModifyTooltips(List <TooltipLine> tooltips) { TooltipLine tt = tooltips.FirstOrDefault(x => x.Name == "Damage" && x.mod == "Terraria"); if (tt != null) { string[] splitText = tt.text.Split(' '); string damageValue = splitText.First(); string damageWord = splitText.Last(); tt.text = damageValue + " banish " + damageWord; } }
public override void ModifyTooltips(List <TooltipLine> tooltips) { int line = tooltips.FindLastIndex(x => x.mod == "Terraria" && x.Name == "Tooltip0"); if (line >= 0) { TooltipLine newtip = new TooltipLine(mod, "Warning", "Only works if no other vanilla dash accessory or Solar Armor set bonus is active"); newtip.overrideColor = new Color(255, 0, 0); tooltips.Insert(line + 1, newtip); } base.ModifyTooltips(tooltips); }
public override void ModifyTooltips(List <TooltipLine> tooltips) { Player player = Main.player[Main.myPlayer]; item.defense = ad; ad = 5; if (NPC.downedQueenBee) { ad = 6; } if (NPC.downedBoss3) { ad = 7; } if (Main.hardMode) { ad = 10; } if (NPC.downedMechBossAny) { ad = 12; } if (NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3) { ad = 14; } if (NPC.downedPlantBoss) { ad = 16; } if (NPC.downedGolemBoss) { ad = 18; } if (NPC.downedFishron) { ad = 20; } if (NPC.downedAncientCultist) { ad = 21; } if (NPC.downedMoonlord) { ad = 24; } string text1 = ad + " defense"; TooltipLine line = new TooltipLine(mod, "text1", text1); line.overrideColor = Color.White; tooltips.RemoveAt(2); tooltips.Insert(2, line); }
//////////////// private void AddCustomTooltips(Item item, List <TooltipLine> tooltips) { ErgophobiaConfig config = ErgophobiaConfig.Instance; string modName = "[c/FFFF88:" + ErgophobiaMod.Instance.DisplayName + "] - "; // void addTip(string ctx, string desc) { TooltipLine tip = new TooltipLine(this.mod, "Ergophobia" + ctx, modName + desc); ItemInformationAttributeLibraries.ApplyTooltipAt(tooltips, tip); } // switch (item.type) { case ItemID.Wood: addTip("Wood", "May be used to craft framing planks"); break; case ItemID.WoodPlatform: if (config.Get <int>(nameof(config.MaxPlatformBridgeLength)) > 0) { addTip("Platform", "Only placeable in short ledges attached to something solid"); } break; case ItemID.Rope: case ItemID.SilkRope: case ItemID.VineRope: case ItemID.WebRope: case ItemID.Chain: addTip("Rope", "Can only be lowered, unless placed against walls"); break; case ItemID.MinecartTrack: addTip("Track1", "Can only bridge gaps or be placed downwards"); addTip("Track2", "May be used to craft track deployment kits"); break; } // if (item.createTile > -1) { if (!TileLogic.CanPlace(item.createTile)) { addTip("Placeable", "This tile is not allowed to be placed"); } } }
public override void ModifyTooltips(List <TooltipLine> tooltips) { Player player = Main.player[item.owner]; float num7 = 5E-06f; float num8 = 15 * player.minionDamage; var aga = new TooltipLine(mod, "summonDamageText", (int)(num8 + num7) + " summon damage"); tooltips.Add(aga); var aga2 = new TooltipLine(mod, "summonDamageText2", "Creates a chain of lightning between you and your minions that deal damage"); tooltips.Add(aga2); }
public override void ModifyTooltips(List <TooltipLine> tooltips) { TooltipLine stats = tooltips.FirstOrDefault(t => t.Name == "Damage" && t.mod == "Terraria"); if (stats != null) { string[] split = stats.text.Split(' '); string damageValue = split.First(); string damageWord = split.Last(); stats.text = damageValue + " explosive " + damageWord; } }
public override void ModifyTooltips(List <TooltipLine> tooltips) { Player player = Main.player[Main.myPlayer]; string text1 = "Melee damage/critical strike chance boosts are " + (int)((player.meleeDamage * 100) - 100) + "%" + " / " + (player.meleeCrit - 4) + "%"; string text2 = "Ranged damage/critical strike chance boosts are " + (int)((player.rangedDamage * 100) - 100) + "%" + " / " + (player.rangedCrit - 4) + "%"; string text3 = "Magic damage/critical strike chance boosts are " + (int)((player.magicDamage * 100) - 100) + "%" + " / " + (player.magicCrit - 4) + "%"; string text4 = "Thrown damage/critical strike chance boosts are " + (int)((player.thrownDamage * 100) - 100) + "%" + " / " + (player.thrownCrit - 4) + "%"; string text5 = "Summoner damage boost is " + (int)((player.minionDamage * 100) - 100) + "%"; string text6 = "Damage Reduction boost is " + (int)(player.endurance * 100) + "%"; string text7 = "Movement speed boost is " + (int)((player.moveSpeed * 100) - 100) + "%"; string text8 = "Max life boost is " + (player.statLifeMax2 - player.statLifeMax); string text9 = "Life regeneration is " + (player.lifeRegen); string text10 = "Mana usage reduction is " + (int)((player.manaCost * 100) - 100) + "%"; string text11 = "Max amounts of minions/sentries are " + player.maxMinions + " / " + player.maxTurrets; string text12 = "Melee swing time is " + (int)(player.meleeSpeed * 100) + "%"; TooltipLine line = new TooltipLine(mod, "text1", text1); TooltipLine line2 = new TooltipLine(mod, "text2", text2); TooltipLine line3 = new TooltipLine(mod, "text3", text3); TooltipLine line4 = new TooltipLine(mod, "text4", text4); TooltipLine line5 = new TooltipLine(mod, "text5", text5); TooltipLine line6 = new TooltipLine(mod, "text6", text6); TooltipLine line7 = new TooltipLine(mod, "text7", text7); TooltipLine line8 = new TooltipLine(mod, "text8", text8); TooltipLine line9 = new TooltipLine(mod, "text9", text9); TooltipLine line10 = new TooltipLine(mod, "text10", text10); TooltipLine line11 = new TooltipLine(mod, "text11", text11); TooltipLine line12 = new TooltipLine(mod, "text12", text12); line.overrideColor = Color.Red; line2.overrideColor = Color.LimeGreen; line3.overrideColor = Color.SkyBlue; line4.overrideColor = Color.Orange; line5.overrideColor = Color.MediumVioletRed; line6.overrideColor = Color.Gray; line7.overrideColor = Color.Green; line8.overrideColor = Color.Yellow; line9.overrideColor = Color.Brown; line10.overrideColor = Color.SkyBlue; line11.overrideColor = Color.Magenta; line12.overrideColor = Color.Red; tooltips.Insert(2, line); tooltips.Insert(3, line2); tooltips.Insert(4, line3); tooltips.Insert(5, line4); tooltips.Insert(6, line5); tooltips.Insert(7, line6); tooltips.Insert(8, line7); tooltips.Insert(9, line8); tooltips.Insert(10, line9); tooltips.Insert(11, line10); tooltips.Insert(12, line11); tooltips.Insert(13, line12); }
public override void ModifyTooltips(List <TooltipLine> tooltips) { string geneInfo = "Level " + level + "\n" + "Experience: " + curExp + "/" + expToUpgrade + "\n" + "ATK " + (int)(atkModifier * 100 + 1) + "\n" + "DEF " + (int)(defModifier * 100 + 1) + "\n" + "SPD " + (int)(spdModifier * 100 + 1) + "\n" + "LUK " + (int)(luckModifier * 100 + 1) + "\n"; var geneTooltip = new TooltipLine(ChaosRings3Mod.instance, "GeneInfo", geneInfo); tooltips.Add(geneTooltip); }
public override void SafeModifyTooltips(List <TooltipLine> tooltips) { TooltipLine nameline = tooltips.FirstOrDefault(n => n.Name == "ItemName" && n.mod == "Terraria"); nameline.text = Main.LocalPlayer.name + "`s Dragon Egg"; nameline.overrideColor = new Color(255, 220, 50); TooltipLine line = new TooltipLine(mod, "n", "Perhaps it would hatch if it had a nest..."); line.overrideColor = new Color(255, 255, 200); tooltips.Add(line); }
public override void ModifyTooltips(List <TooltipLine> tooltips) { TooltipLine BerserkerWeapon = tooltips.FirstOrDefault(x => x.Name == "Damage" && x.mod == "Terraria"); if (BerserkerWeapon != null) { string[] splitText = BerserkerWeapon.text.Split(' '); string damageValue = splitText.First(); string damageWord = splitText.Last(); BerserkerWeapon.text = damageValue + " неистовый урон"; } }
public override void ModifyTooltips(List <TooltipLine> tooltips) { Mod thoriumMod = OrchidMod.ThoriumMod; if (thoriumMod != null) { tooltips.Insert(1, new TooltipLine(mod, "ClassTag", "-Gambler Class-") { overrideColor = new Color(255, 200, 0) }); } TooltipLine tt = tooltips.FirstOrDefault(x => x.Name == "Damage" && x.mod == "Terraria"); if (tt != null) { tooltips.Remove(tt); } tt = tooltips.FirstOrDefault(x => x.Name == "CritChance" && x.mod == "Terraria"); if (tt != null) { tooltips.Remove(tt); } tt = tooltips.FirstOrDefault(x => x.Name == "Knockback" && x.mod == "Terraria"); if (tt != null) { tooltips.Remove(tt); } tt = tooltips.FirstOrDefault(x => x.Name == "Speed" && x.mod == "Terraria"); if (tt != null) { tooltips.Remove(tt); } int index = tooltips.FindIndex(ttip => ttip.mod.Equals("Terraria") && ttip.Name.Equals("Tooltip0")); if (index != -1) { tooltips.Insert(index, new TooltipLine(mod, "DiceDuration", "Lasts " + this.diceDuration + " seconds")); if (this.diceCost < 2) { tooltips.Insert(index, new TooltipLine(mod, "DiceCost", "Uses " + this.diceCost + " chip")); } else { tooltips.Insert(index, new TooltipLine(mod, "DiceCost", "Uses " + this.diceCost + " chips")); } } }
public override void ModifyTooltips(List <TooltipLine> tooltips) { // Find the tooltip line that corresponds to 'Heals ... life' // See https://tmodloader.github.io/tModLoader/html/class_terraria_1_1_mod_loader_1_1_tooltip_line.html for a list of vanilla tooltip line names TooltipLine line = tooltips.FirstOrDefault(x => x.mod == "Terraria" && x.Name == "HealLife"); if (line != null) { // Change the text to 'Heals max/2 (max/4 when quick healing) life' line.text = Language.GetTextValue("CommonItemTooltip.RestoresLife", $"{Main.LocalPlayer.statLifeMax2 / 2} ({Main.LocalPlayer.statLifeMax2 / 4} when quick healing)"); } }
public override void ModifyTooltips(List <TooltipLine> tooltips) { TooltipLine nameLine = tooltips.FirstOrDefault(t => t.Name == "ItemName" && t.mod == "Terraria"); foreach (TooltipLine line2 in tooltips) { if (line2.mod == "Terraria" && line2.Name == "ItemName") { line2.overrideColor = new Color(105, 207, 112); } } }
public override void ModifyTooltips(Item item, List <TooltipLine> tooltips) { TooltipLine tooltip = tooltips.FirstOrDefault(x => x.Name == "Tooltip0" && x.mod == "Terraria"); if (CalamityChangesConfig.Instance.pickaxeTooltips) { if (tooltip != null) { if (item.type == ItemID.DeathbringerPickaxe || item.type == ItemID.NightmarePickaxe) { tooltip.text += "\n" + LangUtils.GetCalamityTextValue("Tooltips.MineAerialite"); } if (item.type == ItemID.Picksaw) { tooltip.text += "\n" + LangUtils.GetCalamityTextValue("Tooltips.MineAstral"); } if (item.type == ModContent.ItemType <FlamebeakHampick>()) { tooltip.text += "\n" + LangUtils.GetCalamityTextValue("Tooltips.MineScoriaAstral"); } if (item.type == ItemID.SolarFlarePickaxe || item.type == ItemID.VortexPickaxe || item.type == ItemID.NebulaPickaxe || item.type == ItemID.StardustPickaxe || item.type == ModContent.ItemType <GallantPickaxe>()) { tooltip.text += "\n" + LangUtils.GetCalamityTextValue("Tooltips.MineExodium"); } } else { if (item.type == ItemID.GoldPickaxe || item.type == ItemID.PlatinumPickaxe) { tooltips.Add(new TooltipLine(mod, $"{mod.Name}:PickSeaPrism", LangUtils.GetCalamityTextValue("Tooltips.MineSeaPrism"))); } if (item.type == ItemID.AdamantitePickaxe || item.type == ItemID.TitaniumPickaxe) { tooltips.Add(new TooltipLine(mod, $"{mod.Name}:PickCryonicCharred", LangUtils.GetCalamityTextValue("Tooltips.MineCryonicCharred"))); } if (item.type == ItemID.PickaxeAxe || item.type == ItemID.Drax || item.type == ItemID.ChlorophytePickaxe) { tooltips.Add(new TooltipLine(mod, $"{mod.Name}:PickPerennial", LangUtils.GetCalamityTextValue("Tooltips.Perennial"))); } if (item.type == ItemID.SolarFlarePickaxe || item.type == ItemID.VortexPickaxe || item.type == ItemID.NebulaPickaxe || item.type == ItemID.StardustPickaxe) { tooltips.Add(new TooltipLine(mod, $"{mod.Name}:PickExodium", LangUtils.GetCalamityTextValue("Tooltips.MineExodium"))); } } } }
public override void ModifyTooltips(List <TooltipLine> tooltips) { TooltipLine line = new TooltipLine(mod, "Face", SpellbladeMod.classTitleText) { overrideColor = SpellbladeMod.classTextColor }; tooltips.Insert(1, line); TooltipLine manaRestore = new TooltipLine(mod, "Tooltip0", "Radiates arcane energy"); tooltips.Add(manaRestore); }
public override void ModifyTooltips(List <TooltipLine> tooltips) { if (Main.player[item.owner].EE().AnarchistCookbook) { var synergyTooltipLine = new TooltipLine(mod, "synergyTooltipLine", $"Cookbook Synergies:\n" + $"Allows full control over fuse length\n" + $"Bombs ignore gravity\n" + $"Explosions spawn damaging spores\n" + $"Bombs home in on enemies"); synergyTooltipLine.overrideColor = Color.LightCyan; tooltips.Add(synergyTooltipLine); } }
public override void ModifyTooltips(Item item, List <TooltipLine> tooltips) { TooltipLine name = tooltips.FirstOrDefault((TooltipLine t) => t.Name == "ItemName" && t.mod == "Terraria"); if (item.rare == ExpiryRarity.Expiry) { name.overrideColor = Color.Lerp(Color.DarkGreen, Color.Lime, (float)(Math.Sin(Main.GameUpdateCount / 20f) + 1f) / 2f); } else if (item.rare == ExpiryRarity.ShaderRarityExample) { name.overrideColor = Color.White; } }
public override void ModifyTooltips(List <TooltipLine> tooltips) { base.ModifyTooltips(tooltips); int index = tooltips.FindIndex(tooltip => tooltip.Name.Equals("ItemName")); if (index >= 0) { TooltipLine name = tooltips.ElementAt(index); TooltipLine line = new TooltipLine(mod, "ItemNameSub", "'" + CandyNames[Variant] + "'"); tooltips.Insert(index + 1, line); } }
public override void ModifyTooltips(List <TooltipLine> tooltips) { var line = new TooltipLine(mod, "Verbose:RemoveMe", "This tooltip won't show in-game"); tooltips.Add(line); foreach (TooltipLine line2 in tooltips) { if (line2.mod == "Terraria" && line2.Name == "ItemName") { line2.overrideColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); } } }
public override void ModifyTooltips(List <TooltipLine> tooltips) { if (topLeft.X != -1 && topLeft.Y != -1) { TooltipLine lineH2 = new TooltipLine(mod, "head2", "ReceverChest [" + topLeft.X + "," + topLeft.Y + "]\n "); tooltips.Insert(2, lineH2); } else { TooltipLine lineH2 = new TooltipLine(mod, "head2", "Chest [ none ]\n "); tooltips.Insert(2, lineH2); } }
public override void ModifyTooltips(List <TooltipLine> tooltips) { var quote = new TooltipLine(mod, "", "'Float like a butterfly…'"); quote.overrideColor = Color.Red; var chargeTooltip = new TooltipLine(mod, "chargeToolTip", $"shield current health: {CurrentHealth} "); chargeTooltip.overrideColor = Color.OrangeRed; tooltips.Add(new TooltipLine(mod, "", $"Shield maximum capacity: {MaxHealth} ")); tooltips.Add(new TooltipLine(mod, "", $"Shield recharge rate: {RechargeRate} ")); tooltips.Add(chargeTooltip); tooltips.Add(quote); }
public override void ModifyTooltips(List <TooltipLine> tooltips) { TooltipLine tt = tooltips.FirstOrDefault(x => x.Name == "Damage" && x.mod == "Terraria"); if (tt != null) { string[] splitText = tt.text.Split(' '); string damageValue = splitText.First(); string damageWord = splitText.Last(); // Change the tooltip text tt.text = "Deals your current bow's damage"; } }
public override void ModifyTooltips(List <TooltipLine> tooltips) { if (!QuestManager.GetQuest <ItsNoSalmon>().IsCompleted) { TooltipLine line = new TooltipLine(mod, "ItemName", "Quest Item"); line.overrideColor = new Color(100, 222, 122); tooltips.Add(line); } TooltipLine line1 = new TooltipLine(mod, "FavoriteDesc", "'It buzzes and blubs at the same time'"); line1.overrideColor = new Color(255, 255, 255); tooltips.Add(line1); }
/*public override void AddRecipes() //How to craft this item * { * ModRecipe recipe = new ModRecipe(mod); * recipe.AddIngredient(null, "ChaosMaterial", 20); //you need 20 Wind * recipe.AddTile(TileID.SkyMill); //at work bench * recipe.SetResult(this); * recipe.AddRecipe(); * }*/ public override void ModifyTooltips(List <TooltipLine> tooltips) { Player player = Main.player[item.owner]; for (int i = 0; i < tooltips.Count; i++) { TooltipLine tip; tip = new TooltipLine(mod, "", tooltips[i].text); tip.overrideColor = new Color(255, 32, 174, 200); tooltips.RemoveAt(i); tooltips.Insert(i, tip); } }
public override void ModifyTooltips(List <TooltipLine> tooltips) { TooltipLine line = new TooltipLine(mod, "Face", SpellbladeMod.classTitleText) { overrideColor = SpellbladeMod.classTextColor }; tooltips.Insert(1, line); TooltipLine manaRestore = new TooltipLine(mod, "Tooltip0", "Vibrates in tune with reality"); tooltips.Add(manaRestore); }
public override void ModifyTooltips(List <TooltipLine> tooltips) { if (!ContainsCandy) { return; } TooltipLine line = new TooltipLine(mod, "BagContents", "Contains " + pieces + (pieces == 1?" piece":" pieces") + " of Candy"); tooltips.Add(line); line = new TooltipLine(mod, "RightclickHint", "Right click to take a piece of Candy"); tooltips.Add(line); }
public override void ModifyTooltips(List <TooltipLine> tooltips) { //for runs faster than foreach for (int tooltip = 0; tooltip < tooltips.Count; tooltip++) { TooltipLine line = tooltips[tooltip]; if (line.mod == "Terraria" && line.Name == "ItemName") { line.overrideColor = Main.DiscoColor; } } }