Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Cleaned up everything, Added several new methods & actually added in …
Browse files Browse the repository at this point in the history
…planned item changes and not just example/test items
  • Loading branch information
Tsukino-uwu committed Jun 7, 2020
1 parent 6f5874b commit c270881
Show file tree
Hide file tree
Showing 12 changed files with 196 additions and 113 deletions.
Binary file modified .vs/NekoTweakMod/v16/.suo
Binary file not shown.
51 changes: 51 additions & 0 deletions Items/AddTooltip.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using Terraria.ID;
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;

namespace NekoTweakMod.Items
{
public class AddTooltip : GlobalItem
{
public override void ModifyTooltips(Item item, List<TooltipLine> tooltips) // Allows you to modify tooltip properties for items
{
base.ModifyTooltips(item, tooltips);
if (item.type == ItemID.Shackle) // Specifies what item
{
TooltipLine newTooltip = new TooltipLine(mod, "Tooltip0", "Enemies are more likely to target you");
// Creates a new TooltipLine for your mod with the name Tooltip0
//"Tooltip#" - A tooltip line of the item. # will be 0 for the first line, 1 for the second, etc.
tooltips.Add(newTooltip);
//Adds the Tooltip to the list
}
{
if (item.type == ItemID.TitanGlove)
{
TooltipLine newTooltip = new TooltipLine(mod, "Tooltip0", "12% increased melee speed");
tooltips.Add(newTooltip);
}
}
{
if (item.type == ItemID.PowerGlove)
{
TooltipLine newTooltip = new TooltipLine(mod, "Tooltip0", "Enables auto swing for melee weapons");
tooltips.Add(newTooltip);
}
}
{
if (item.type == ItemID.MechanicalGlove)
{
TooltipLine newTooltip = new TooltipLine(mod, "Tooltip0", "Enables auto swing for melee weapons");
tooltips.Add(newTooltip);
}
}
{
if (item.type == ItemID.FireGauntlet)
{
TooltipLine newTooltip = new TooltipLine(mod, "Tooltip0", "Enables auto swing for melee weapons");
tooltips.Add(newTooltip);
}
}
}
}
}
25 changes: 0 additions & 25 deletions Items/DisplayName.cs

This file was deleted.

33 changes: 21 additions & 12 deletions Items/ModifyTooltip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,34 @@ public class ModifyTooltip : GlobalItem
{
public override void ModifyTooltips(Item item, List<TooltipLine> tooltips) // Allows you to set/change all available tooltips
{
if (item.type == ItemID.Carrot) // specifies what item
if (item.type == ItemID.FeralClaws) // Specifies what item to change, If its this specific item the code below will be used
{
// Optional code to remove tooltips
// Optional code to remove a tooltips
// tooltips.RemoveAll(x => x.Name == "Tooltip0" && x.mod == "Terraria");

TooltipLine line = tooltips.FirstOrDefault(x => x.Name == "Tooltip0" && x.mod == "Terraria");
// Grabs the vanilla tooltip "tooltip0" from mod, In this case from vanilla "Terraria" and not from a mod
// Grabs Name(name of the tooltip) from the tooltip "tooltip0" from a mod with the name "Terraria"
// In this case from vanilla Terraria, and not from a mod
// And changes the line(string) value from tooltips into the text
// The Specified item has to have the tooltip that we are trying to grab else nothing will

if (line != null) // If the item dont have the specified tooltip you are trying to change nothing will change/appear in game
{
line.text = "UwU custom tooltip text"; // This is the Text that appear as your item tooltip in game
}
// THIS 2nd item CODE IS BORKED ^^, can only change 1 item per file right now
if (item.type == ItemID.Gel)
if (line != null)
line.text = "owo";
if (line != null) // If the line(String) is not empty, do the code below
// If the item dont have the specified tooltip you are trying to change nothing will change/appear in game
// you will crash in game without this when you try to check the tooltip of an item
{
line.text = "Enables auto swing for melee weapons"; // This is the Text that appear as your tooltip on the item in game
}
}
{
/* if(item.type == ItemID.PowerGlove) // Changing multiple tooltip lines at once
// Tooltip0 will be the first tooltip line & tooltip1 the second, etc
{
TooltipLine line2 = tooltips.FirstOrDefault(x => x.Name == "Tooltip0" && x.mod == "Terraria");
if (line2 != null) line2.text = "powerglove knockback text";
TooltipLine line3 = tooltips.FirstOrDefault(x => x.Name == "Tooltip1" && x.mod == "Terraria");
if (line3 != null) line3.text = "12% increased melee speed";
} */
}
}
}
}
Expand Down Expand Up @@ -84,4 +93,4 @@ public class ModifyTooltip : GlobalItem
"Expert" - Tells whether the item is from expert-mode.
"SpecialPrice" - Tells the alternate currency price of an item.
"Price" - Tells the price of an item.
*/
*/
21 changes: 13 additions & 8 deletions Items/SetDefaultVanilla.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ public class SetDefaultVanilla : GlobalItem // class name & vanilla hook
public override void SetDefaults(Item item) // SetDefaults allows you to set/change properties of items
{
base.SetDefaults(item);
if (item.type == ItemID.Muramasa) // specifies what item to change
item.damage = 26; // changes the items damage
{ // seperation between each "if" statement when trying to change another item

if (item.type == ItemID.WormScarf) // second item to change
item.defense = 2;
// if (item.type == ItemID.BabyBirdStaff) // disabled until tmod v1.4
// specifies what item to change
{
item.damage = 9; // changes the items damage
item.knockBack = 0;
}
if (item.type == ItemID.WormScarf) item.defense = 2; // Single line if statement as we are only changing 1 property
if (item.type == ItemID.Muramasa) item.damage = 26;
{
if (item.type == ItemID.ReaverShark)
{
//if (item.type == ItemID.WoodenBow)
//item.damage = 5000;
item.useTime = 19; // Makes it sligthly faster
item.useAnimation = 19;
}
}
}
Expand All @@ -26,6 +30,7 @@ public class SetDefaultVanilla : GlobalItem // class name & vanilla hook
/*
Other item. alternatives if you want to change something else
item.CloneDefaults(ItemID.GoldenKey); // Gives you all the default values for an item
item.damage = 26; // The damage your item deals
item.melee = true; // Whether your item is part of the melee class
item.width = 40; // The item texture's width
Expand Down
18 changes: 18 additions & 0 deletions Items/SetNameOverride.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace NekoTweakMod.Items
{
public class SetNameOverride : GlobalItem // class name & vanilla hook
{
public override void SetDefaults(Item item) // SetDefaults allows you to set/change properties of items
{
base.SetDefaults(item);
if (item.type == ItemID.IvyWhip) item.SetNameOverride("Ivy Hook"); // Ocd fix due to summoners having whip weapons
// specifies what item to change
// Set the name of the specified item to "Name"
// seperation between each "if" statement when trying to change another item
}
}
}
37 changes: 37 additions & 0 deletions Items/UpdateAccessories.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;

namespace NekoTweakMod.Items
{
public class UpdateAccessories : GlobalItem
{
public override void UpdateAccessory(Item item, Player player, bool hideVisual)
{
base.UpdateAccessory(item, player, hideVisual);
{
if (item.type == ItemID.FeralClaws)
{
player.meleeSpeed -= 0.12f; // Gives -12% melee speed
player.kbGlove = false; // Sets this item as a knockback glove
player.releaseUseItem = true; // Gives the accessory autoReuse/AutoSwing
}
}
{
//single-line "if" statement examples, changing 1 property only for each if statement
if (item.type == ItemID.TitanGlove) player.meleeSpeed += 0.12f; // 12% increased melee speed
if (item.type == ItemID.Shackle) player.aggro += 50; // increases players aggro by 50+
if (item.type == ItemID.PowerGlove) player.releaseUseItem = true;
if (item.type == ItemID.MechanicalGlove) player.releaseUseItem = true;
}
{
if (item.type == ItemID.FireGauntlet)
{
player.releaseUseItem = true;
player.meleeDamage += 0.02f;// 2% increase
player.meleeSpeed += 0.02f;
}
}
}
}
}
79 changes: 34 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,42 @@
- [direwolf420](https://forums.terraria.org/index.php?members/direwolf420.123064/)
- thegamemagic1234

# **Features**
**Most files should have plenty of comments if you are wondering about how something works**
# **Current Features**

**Everything is WIP right now, setting up the basics so i can do the things on the list**
- Sharpening Station,Ammo Box,Crystal Ball,slice of cake & Bewitching Table etc
(Now work like campfires giving the buff permanently while you are nearby one and for 10minutes if you go away from them, similar to honey buff if you leave the honey)

- Muramasa damage changed from 21 to 26
(Bit more competetive damage as it can't apply any debuffs, but also not to much due to its fast attack speed)

- Feral claws changed from "12% increased melee speed" to "melee autoswing"
(Melee Autoswing also applies to summoner whips)

- Titan glove changed from " 100% increased melee knockback & melee autoswing" to "100% increased melee knockback 12% increased melee speed"

- Fire gauntlet melee damage & speed increased from 10% to 12%

- Reaver Shark(Pickaxe) Use time changed from 22 to 19 (Slightly faster)

- Worm Scarf now has 2 defense along with the 17% damage reduction
(Due to BoC 2.0 being a thing)

- Finch Staff knockback changed from 4 to 0, damage changed from 7 to 9
(Won't knock enemies into you anymore & bit more damage so it can be useful for more than killing slimes)
^this one is disabled until tmod updates to v1.4

- Shackle now gives 50 aggro & also have the tooltip "Enemies are more likely to target you"
(Weak aggro to have the option to "tank" pre hardmode)

- Ivy whip renamed to "Ivy hook" to prevent confusions with the summoner whip weapons







**Everything below here is WIP/Planned~ and might change**

**Fishing related:**

Expand Down Expand Up @@ -57,44 +88,16 @@

**Weapon/Armor/Accessorie related:**

- Feral claws changed from "12% increased melee speed" to "melee autoswing"
(Melee Autoswing also applies to summoner whips)

- Titan glove changed from " 100% increased melee knockback & melee autoswing" to "100% increased melee knockback 12% increased melee speed"

- Fire gauntlet melee damage & speed increased from 10% to 12%

- Reaver Shark(Pickaxe) Use time changed from 22 to 19 (Slightly faster)

- Ninja set becoming a summoner armor

- Obsidian Outlaw Hat now gives "Increases minion damage by 5%" instead of having no bonus

- Obsidian armor now has a set effect giving "Increases your max number of minions by 1" instead of having no set effect
(To have a summoner armor obtainable pre boss, while still not making it obtainable instantly from wood armor etc and to not compete directly with bee armor later)

- Worm Scarf now has 2 defense along with the 17% damage reduction
(Due to BoC 2.0 being a thing)

- Finch Staff knockback changed from 4 to 0, damage changed from 7 to 9
(Won't knock enemies into you anymore & bit more damage so it can be useful for more than killing slimes)

- Flesh Knuckles,Berserker's Glove & Hero Shield defense changed from 7 to 10
(Evens it out a bit compared to Putrid scent "worth" wise)

- Muramasa damage changed from 21 to 26
(Bit more competetive damage as it can't apply any debuffs, but also not to much due to its fast attack speed)

- Shackle now gives 50 aggro & also have the tooltip "Enemies are more likely to target you"
(Weak aggro to have the option to "tank" pre hardmode)



**Pet/Mount related:**

- All master mode pets/mounts added to expert mode boss bags



**NPC related:**

Expand All @@ -119,26 +122,12 @@
- Obsidian block mining power requirement changed from 65% to 55%
(bone/gold/plat or better, so its possible to break pre bosses without requiring bombs)

- Sharpening Station,Ammo Box,Crystal Ball,slice of cake & Bewitching Table etc
(Now work like campfires giving the buff permanently while you are nearby one and for 10minutes if you go away from them, similar to honey buff if you leave the honey)

- All Master mode boss furniture added to expert mode boss bags

- Trapped Chests now work like Dead Man's Chests and can be used for storage

- corruption/crimson version of mud/jungle blocks
(Keeping the jungle biome active even if it gets infected by an evil biome)



**ocd/text changes:**

- All instances of "critical strike chance" on vanilla armor/accessory tooltips now say "critical chance" instead

- Ivy whip name changed to "ivy hook" to prevent confusions with the summoner whip weapons



**Custom items:**

- Make [Ambient objects](https://terraria.gamepedia.com/Ambient_objects) lootable/placeable as furniture
Expand Down
21 changes: 10 additions & 11 deletions Tiles/NearbyEffect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@
namespace NekoTweakMod.Tiles
//Namespace is where the code start and end with { & }
{
public class NearbyEffect : GlobalTile // class name & vanilla tiles
//Class
public class NearbyEffect : GlobalTile // class name & vanilla tiles
{
public override void NearbyEffects(int i, int j, int type, bool closer) //Apply something if nearby specified tile
//Methods inside the Class
{
base.NearbyEffects(i, j, type, closer);
if (type == TileID.WorkBenches)//Gives this specific tile a NearbyEffect
Main.LocalPlayer.AddBuff(BuffID.Regeneration, 35999); // (BuffID.BuffName, duration);
//NearbyEffect give a buff to player nearby players. Duration is set in ticks not seconds. 60ticks = 1second. 36000 = 10 minutes
{ // seperation between each "if" statement so syntax stay organized

if (type == TileID.Torches)// Second Tile that will get changed
Main.LocalPlayer.AddBuff(BuffID.Ironskin, 35999);// the buff that will apply to the second tile
}
base.NearbyEffects(i, j, type, closer);
if (type == TileID.AmmoBox) Main.LocalPlayer.AddBuff(BuffID.AmmoBox, 35999); // Duration is set in ticks not seconds. 60ticks = 1second. 36000 = 10 minutes
//Gives this specific tile a NearbyEffect
// (BuffID.BuffName, duration);
//NearbyEffect makes an item do something while nearby it. In this case the Tiles give the player a buff
if (type == TileID.BewitchingTable) Main.LocalPlayer.AddBuff(BuffID.Bewitched, 35999);
if (type == TileID.CrystalBall) Main.LocalPlayer.AddBuff(BuffID.Clairvoyance, 35999);
if (type == TileID.SharpeningStation) Main.LocalPlayer.AddBuff(BuffID.Sharpened, 35999);
//if (type == TileID.SliceOfCake) Main.LocalPlayer.AddBuff(BuffID.SugarRush, 35999); temporary disabled until tmod v1.4
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions build.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
displayName = Neko's Tweak Mod
author = Neko
version = 0.1.0.1
homepage = https://forums.terraria.org/index.php?members/neko.6574/
version = 0.1.1.0
homepage = https://forums.terraria.org/index.php?threads/nekos-tweak-mod.93711/
buildIgnore = obj\*, bin\*, *.csproj, .git\*, .gitattributes, .gitignore, .psd, .sln, ..vs\*, LICENSE

0 comments on commit c270881

Please sign in to comment.