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

Commit

Permalink
Added fishing stuffs & few other things
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsukino-uwu committed Jun 8, 2020
1 parent 40b251f commit fff135c
Show file tree
Hide file tree
Showing 17 changed files with 225 additions and 75 deletions.
Binary file modified .vs/NekoTweakMod/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file modified .vs/NekoTweakMod/v16/.suo
Binary file not shown.
6 changes: 3 additions & 3 deletions Items/AddTooltip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ public class AddTooltip : GlobalItem
{
public override void ModifyTooltips(Item item, List<TooltipLine> tooltips) // Allows you to modify tooltip properties for items
{
if (item.type == ItemID.Shackle) // Specifies what item
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.
// "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
// Adds the Tooltip to the list
}
{
if (item.type == ItemID.TitanGlove)
Expand Down
37 changes: 37 additions & 0 deletions Items/Fishing/AddItemToCrate.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.Fishing
{
public class AddItemToCrate : GlobalItem
{
public string Context;
public bool RandomBool; // still no idea how either string or bool works here, but got errors without using InstancePerEntity & code works fine

public override bool InstancePerEntity => true;

public override GlobalItem Clone(Item item, Item itemClone)
{
AddItemToCrate myClone = (AddItemToCrate)base.Clone(item, itemClone);
myClone.Context = Context;
myClone.RandomBool = RandomBool;
return myClone;
}
public override void OpenVanillaBag(string context, Player player, int arg)
{
if (context == "crate" && arg == ItemID.IronCrate)
// if context & arg is = text & item id
// Context has to be one of these examples: "present", "bossBag", "crate", "lockBox", "herbBag", or "goodieBag"
// arg specifies the present/bag/crate itemid
{
// Each item here will roll individually, but it is possible to get multiple of them at once
if (Main.rand.NextBool(33)) player.QuickSpawnItem(ItemID.WoodenSword); // number/100 or "100% if its at 1" chance/rng & also Specifies the item to add to the present/bag/crate
// if (Main.rand.NextBool(25)) player.QuickSpawnItem(ItemID.Meowmere);
// if (Main.rand.NextBool(50)) player.QuickSpawnItem(ItemID.PlanteraBossBag);
// if (Main.rand.NextBool(75)) player.QuickSpawnItem(ItemID.HotlineFishingHook);

}
}
}
}
24 changes: 24 additions & 0 deletions Items/Fishing/FishingRods.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;

namespace NekoTweakMod.Items
{
public class FishingRods : GlobalItem // class name & vanilla hook
{
public override void SetDefaults(Item item) // SetDefaults allows you to set/change properties of items
{ // Single line "if" statements as we are only changing 1 property
if (item.type == ItemID.WoodFishingPole) item.fishingPole = 15; // sets fishing power to 15%
if (item.type == ItemID.ReinforcedFishingPole) item.fishingPole = 20;
//if (item.type == ItemID.ScarabFishingRod) item.fishingPole = 30;
//if (item.type == ItemID.ChumCaster) item.fishingPole = 30;
if (item.type == ItemID.FiberglassFishingPole) item.fishingPole = 30;
if (item.type == ItemID.SittingDucksFishingRod) item.fishingPole = 33;
if (item.type == ItemID.FisherofSouls) item.fishingPole = 35;
if (item.type == ItemID.Fleshcatcher) item.fishingPole = 37;
if (item.type == ItemID.MechanicsRod) item.fishingPole = 45;
if (item.type == ItemID.HotlineFishingHook) item.fishingPole = 47;

}
}
}
49 changes: 49 additions & 0 deletions Items/ModifyAccessories.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;

namespace NekoTweakMod.Items
{
public class ModifyAccessories : GlobalItem
{
public override void UpdateAccessory(Item item, Player player, bool hideVisual)
{
if (item.type == ItemID.FeralClaws)
{
player.meleeSpeed -= 0.12f; // Gives -12% melee speed
player.kbGlove = false; // Sets this item as a knockback glove
if (player.HeldItem.melee || player.HeldItem.summon) // if the player is holding/using either a melee or summoner weapon
// Thanks to Oli for telling me about player.helditem
{
player.releaseUseItem = true; // Makes the accessory give autoReuse/AutoSwing to the players item/weapon
}

}
{
//single-line "if" statement examples, changing 1 property only for each 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.FireGauntlet)
{
player.meleeDamage += 0.02f;// 2% increase
player.meleeSpeed += 0.02f;
if (player.HeldItem.melee || player.HeldItem.summon) player.releaseUseItem = true;
}
}
{
if (item.type == ItemID.MechanicalGlove)
{
if (player.HeldItem.melee || player.HeldItem.summon) player.releaseUseItem = true;
}
}
{
if (item.type == ItemID.PowerGlove)
{
if (player.HeldItem.melee || player.HeldItem.summon) player.releaseUseItem = true;
}
}
}
}
}
6 changes: 4 additions & 2 deletions Items/SetDefaultVanilla.cs → Items/ModifyEquipment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace NekoTweakMod.Items
{
public class SetDefaultVanilla : GlobalItem // class name & vanilla hook
public class ModifyEquipment : GlobalItem // class name & vanilla hook
{
public override void SetDefaults(Item item) // SetDefaults allows you to set/change properties of items
{
Expand All @@ -15,7 +15,9 @@ public class SetDefaultVanilla : GlobalItem // class name & vanilla hook
//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.Muramasa) item.damage = 26;
if (item.type == ItemID.MiningShirt) item.shopCustomPrice = 40000; // changes the sale value
if (item.type == ItemID.MiningPants) item.shopCustomPrice = 40000;
{
if (item.type == ItemID.ReaverShark)
{
Expand Down
13 changes: 5 additions & 8 deletions Items/ModifyTooltip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,11 @@ public class ModifyTooltip : GlobalItem
}
}
{
/* 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";
} */
if (item.type == ItemID.FireGauntlet)
{
TooltipLine line2 = tooltips.FirstOrDefault(x => x.Name == "Tooltip1" && x.mod == "Terraria");
if (line2 != null) line2.text = "12% increased melee damage and speed";
}
}
}
}
Expand Down
62 changes: 62 additions & 0 deletions Items/NoFakeChests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;

namespace NekoTweakMod.Items
{
public class NoFakeChests : GlobalItem
{
public override void SetDefaults(Item item)
{
}
} // still missing few 1.4 fake chests
} // hopefully this simple code change them to working chests~
/*
if(item.type == ItemID.Fake_BlueDungeonChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_BoneChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_BorealWoodChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_CactusChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_Chest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_CorruptionChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_CrimsonChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_CrystalChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_DynastyChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_EbonwoodChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_FleshChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_FrozenChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_GlassChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_GoldChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_GoldenChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_GraniteChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_GreenDungeonChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_HallowedChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_HoneyChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_IceChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_IvyChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_JungleChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_LihzahrdChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_LivingWoodChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_MarbleChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_MartianChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_MeteoriteChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_MushroomChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_newchest1) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_newchest2) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_ObsidianChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_PalmWoodChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_PearlwoodChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_PinkDungeonChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_PumpkinChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_RichMahoganyChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_ShadewoodChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_ShadowChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_SkywareChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_SlimeChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_SpookyChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_SteampunkChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_WaterChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_WebCoveredChest) item.CloneDefaults(ItemID.DeadMansChest);
}
}
}
*/
5 changes: 2 additions & 3 deletions Items/SetNameOverride.cs → Items/ReplaceItemName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@

namespace NekoTweakMod.Items
{
public class SetNameOverride : GlobalItem // class name & vanilla hook
public class ReplaceItemName : GlobalItem // class name & vanilla hook
{
public override void SetDefaults(Item item) // SetDefaults allows you to set/change properties of items
{
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
// Set the name of the specified item to ("Name")
}
}
}
36 changes: 0 additions & 36 deletions Items/UpdateAccessories.cs

This file was deleted.

22 changes: 22 additions & 0 deletions NPCs/NPCshops.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace NekoTweakMod.NPCs
{
public class NPCshops : GlobalNPC
{
public override void SetupShop(int type, Chest shop, ref int nextSlot) // Allows you to add items to NPC shops
{
if(type == NPCID.Merchant) // Specifies the npc we are changing
{
shop.item[nextSlot].SetDefaults(ItemID.MiningShirt); // Add an item with the itemid to the next available slot in the NPCs shop
shop.item[nextSlot].shopCustomPrice = 40000; // sets the purchase cost, 40000 = 4 gold
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.MiningPants);
shop.item[nextSlot].shopCustomPrice = 40000;
nextSlot++;
}
}
}
}
1 change: 1 addition & 0 deletions NekoTweakMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ namespace NekoTweakMod
{
public class NekoTweakMod : Mod
{
//owo whats this
}
}
21 changes: 7 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Lyker
- [direwolf420](https://forums.terraria.org/index.php?members/direwolf420.123064/)
- thegamemagic1234
- Oli

# **Current Features**

Expand All @@ -22,6 +23,11 @@
- 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)

- A more linear fishing rod progression with buffs/nerfs to all rods, better early rods

- Living Tree & Pyramid chest loot from fishing crates *still WIP*
(Finch staff & Sandstorm in a Bottle etc)

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

Expand All @@ -43,8 +49,7 @@

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



- Merchant now sell the full mining set so its achievable early on



Expand Down Expand Up @@ -75,15 +80,6 @@
- Corrupt,Defiled,Crimson & Hematic crates crates now have a chance to give Bloody tear & Chum Caster
(Makes it possible to get bloody tears when no blood moons are happening from evil biome fishing)

- Scarab Fishing Rod & Chum Caster fishing power changed from 25% to 27%

- Fisher of Souls(20%) & Fleshcatcher(22%) fishing powered changed to 30% and 32% respectively
(corruption/crimson difference

- Sitting Duck's Fishing Pole fishing power changed from 40% to 35%

- Mechanic's Rod fishing power changed from 30% to 40%



**Weapon/Armor/Accessorie related:**
Expand All @@ -101,9 +97,6 @@

**NPC related:**

- Merchant now sell Mining Shirt & Mining Pants for 3 & 2 gold respectively
(So its usable early game and not just vanity once you would have farmed for all pieces. Sell price for both of these still stay at 10silver each)

- Dryad now sell opposite evil biome powder in graveyard biomes

- Steampunker now sells the opposite evil biome solution in graveyard biomes
Expand Down
2 changes: 1 addition & 1 deletion 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.1.1
version = 0.1.2.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 fff135c

Please sign in to comment.