Make the Avalian Trader less robotic, add Avali Feather

This commit is contained in:
2025-11-11 11:43:58 +00:00
parent 7038741693
commit a9b0d1571d
13 changed files with 268 additions and 80 deletions
+21
View File
@@ -0,0 +1,21 @@
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;
using ForgottenWawiTech.Content.Rarities;
namespace ForgottenWawiTech.Content.Items.Materials
{
public class AvaliFeather : ModItem
{
public override void SetDefaults()
{
Item.width = 20;
Item.height = 20;
Item.maxStack = 9999;
Item.rare = ModContent.RarityType<AvalianItem>();
Item.value = Item.buyPrice(gold: 50);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

+2 -1
View File
@@ -1,4 +1,5 @@
// Animated by British_Raccoon
// and then Axl_The_Protogen
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;
@@ -13,7 +14,7 @@ namespace ForgottenWawiTech.Content.Items.Materials
{
public class RGBAlloy : ModItem
{
private const int FRAME_COUNT = 5;
private const int FRAME_COUNT = 7;
private const int TICKS_PER_FRAME = 10;
public override void SetStaticDefaults()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 28 KiB

+32 -1
View File
@@ -1,6 +1,8 @@
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;
using Terraria.DataStructures;
using Microsoft.Xna.Framework;
namespace ForgottenWawiTech.Content.Items.Materials
{
@@ -12,8 +14,37 @@ namespace ForgottenWawiTech.Content.Items.Materials
Item.width = 20;
Item.height = 20;
Item.maxStack = 9999;
Item.rare = ItemRarityID.White;
Item.rare = ItemRarityID.Expert; // temp rarity until custom rarity is added
Item.value = Item.buyPrice(gold: 10);
}
public override void OnStack(Item source, int numTransfered)
{
// Mark that RGBass has been obtained in this world
ForgottenWawiTechSystem.hasObtainedRGBass = true;
}
public override bool OnPickup(Player player)
{
// Mark that RGBass has been obtained in this world
ForgottenWawiTechSystem.hasObtainedRGBass = true;
return true;
}
}
public class RGBassFishingPlayer : ModPlayer
{
public override void CatchFish(FishingAttempt attempt, ref int itemDrop, ref int npcSpawn, ref AdvancedPopupRequest sonar, ref Vector2 sonarPosition)
{
// Only if Moon Lord has been defeated
if (!NPC.downedMoonlord)
return;
bool inWater = !attempt.inLava && !attempt.inHoney;
if (inWater && Main.rand.NextBool(20)) // 5% chance (1 in 20)
{
itemDrop = ModContent.ItemType<RGBass>();
}
}
}
}
+2 -1
View File
@@ -1,6 +1,7 @@
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;
using ForgottenWawiTech.Content.Rarities;
namespace ForgottenWawiTech.Content.Items.Materials
{
@@ -12,7 +13,7 @@ namespace ForgottenWawiTech.Content.Items.Materials
Item.width = 20;
Item.height = 20;
Item.maxStack = 9999;
Item.rare = ItemRarityID.White;
Item.rare = ModContent.RarityType<ProtogenItem>();
Item.value = Item.buyPrice(gold: 1);
}
}
+38 -14
View File
@@ -38,11 +38,11 @@ namespace ForgottenWawiTech.Content.NPCs.TownNPCs
NPC.width = 18;
NPC.height = 40;
NPC.aiStyle = 7;
NPC.damage = 10;
NPC.defense = 15;
NPC.lifeMax = 250;
NPC.damage = 30;
NPC.defense = 10;
NPC.lifeMax = 500;
NPC.HitSound = SoundID.NPCHit1;
NPC.DeathSound = SoundID.NPCDeath1;
NPC.DeathSound = SoundID.NPCDeath6;
NPC.knockBackResist = 0.5f;
AnimationType = NPCID.Guide;
@@ -50,8 +50,8 @@ namespace ForgottenWawiTech.Content.NPCs.TownNPCs
public override bool CanTownNPCSpawn(int numTownNPCs)
{
// Example: Always spawn if there's room
return true;
// Only spawn if a player has obtained RGBass in this world
return ForgottenWawiTechSystem.hasObtainedRGBass;
}
public override List<string> SetNPCNameList()
@@ -92,23 +92,47 @@ namespace ForgottenWawiTech.Content.NPCs.TownNPCs
public override void AddShops()
{
var npcShop = new NPCShop(Type)
new NPCShop(Type)
.Add<Items.Materials.RGBass>()
.Add<Items.Materials.VisorShard>()
.Add<Items.Materials.RGBAlloy>()
.Add<Items.Accessories.DevInfiniteMana>();
npcShop.Register();
.Add(ItemID.RainbowBrick) // TODO: Force Rainbow Brick to not have No Value.
.Add<Items.Materials.AvaliFeather>()
.Register();
}
public override string GetChat()
{
switch (0)
switch (Main.rand.Next(15))
{
case 0:
return "*avalian chirping*";
case 1:
return "Welcome! I've traveled far from Avalon to bring you the finest technology.";
case 2:
return "These feathers? They're not just for show - they're quite valuable!";
case 3:
return "RGB technology is all the rage back home. Everything needs more colors!";
case 4:
return "The visor shards I sell are fragments from our most advanced equipment.";
case 5:
return "My pack may be small, but I've traversed dimensions to get here.";
case 6:
return "*chirps excitedly* Oh, you're interested in our wares?";
case 7:
return "Avalon sends its regards! And its finest materials.";
case 8:
return "Don't underestimate the power of a well-crafted alloy.";
case 9:
return "The journey here was long, but your world has such fascinating resources!";
case 10:
return "*preens feathers* Presentation is important in any trade.";
case 11:
return "RGBass - it's not just a material, it's a lifestyle.";
case 12:
return "I wonder what the other traders back on Avalon would think of this place...";
case 13:
return "My species may be small, but we're excellent engineers!";
default:
return "I have no idea what to say.";
return "Need something? My shop is always open!";
}
}
+33
View File
@@ -0,0 +1,33 @@
using Terraria.ModLoader;
using Terraria;
using Microsoft.Xna.Framework;
using System;
namespace ForgottenWawiTech.Content.Rarities
{
public class AvalianItem : ModRarity
{
public override Color RarityColor
{
get
{
float time = Main.GlobalTimeWrappedHourly;
// Base color cycle: bright cyan <-> deep teal
const float cycleHz = 0.8f; // cycles per second
float t = (float)((Math.Sin(time * cycleHz * MathHelper.TwoPi) + 1f) * 0.5f); // 0..1
Color brightCyan = new Color(0, 255, 255); // Bright cyan
Color deepTeal = new Color(0, 128, 160); // Deep teal
Color baseColor = Color.Lerp(deepTeal, brightCyan, t);
// Add a subtle shimmer effect (faster, gentler than pulse)
const float shimmerHz = 2.0f;
float shimmer = (float)((Math.Sin(time * shimmerHz * MathHelper.TwoPi) + 1f) * 0.5f);
float brightness = 1f + 0.15f * shimmer; // subtle +15% max brightness variation
return baseColor * brightness;
}
}
}
}
+36
View File
@@ -0,0 +1,36 @@
using Terraria.ModLoader;
using Terraria;
using Microsoft.Xna.Framework;
using System;
namespace ForgottenWawiTech.Content.Rarities
{
public class ProtogenItem : ModRarity
{
// Cycles between bright neon blue and vibrant pink/magenta with digital-style pulses
// to represent Protogen visor displays and cybernetic aesthetic
public override Color RarityColor
{
get
{
float time = Main.GlobalTimeWrappedHourly;
// Base color cycle: neon blue <-> vibrant pink
const float cycleHz = 0.9f; // cycles per second
float t = (float)((Math.Sin(time * cycleHz * MathHelper.TwoPi) + 1f) * 0.5f); // 0..1
Color neonBlue = new Color(0, 180, 255); // Bright neon blue
Color vibrantPink = new Color(255, 0, 180); // Vibrant pink/magenta
Color baseColor = Color.Lerp(neonBlue, vibrantPink, t);
// Digital pulse effect (quick, sharp like LED displays)
const float pulseHz = 1.5f;
float s = (float)Math.Sin(time * pulseHz * MathHelper.TwoPi);
float pulse = (float)Math.Pow(Math.Max(0f, s), 2.5f); // sharper pulse
float brightness = 1f + 0.2f * pulse; // up to +20% brightness at pulse peak
return baseColor * brightness;
}
}
}
}
+30
View File
@@ -0,0 +1,30 @@
using Terraria.ModLoader;
using Terraria.ModLoader.IO;
namespace ForgottenWawiTech
{
public class ForgottenWawiTechSystem : ModSystem
{
public static bool hasObtainedRGBass = false;
public override void OnWorldLoad()
{
hasObtainedRGBass = false;
}
public override void OnWorldUnload()
{
hasObtainedRGBass = false;
}
public override void SaveWorldData(TagCompound tag)
{
tag["hasObtainedRGBass"] = hasObtainedRGBass;
}
public override void LoadWorldData(TagCompound tag)
{
hasObtainedRGBass = tag.GetBool("hasObtainedRGBass");
}
}
}
+67 -60
View File
@@ -4,8 +4,8 @@ Items: {
Nyanageddon: {
Tooltip:
'''
Mob the rainbow, taste the rainbow.
Ethically questionable.
Mob the rainbow, taste the rainbow.
Ethically questionable.
'''
DisplayName: Nyanageddon
}
@@ -18,9 +18,9 @@ Items: {
TrueNyanageddon: {
Tooltip:
'''
The ultimate evolution of the Meowmere.
Mob the rainbow, taste the rainbow, transcend the rainbow.
Ethically questionable.
The ultimate evolution of the Meowmere.
Mob the rainbow, taste the rainbow, transcend the rainbow.
Ethically questionable.
'''
DisplayName: True Nyanageddon
}
@@ -79,8 +79,8 @@ Items: {
DisplayName: Singularity-Infused Tome Of Unyielding
Tooltip:
'''
A tome radiating with the power of the void.
You probably shouldn't hold it so close.
A tome radiating with the power of the void.
You probably shouldn't hold it so close.
'''
}
@@ -88,8 +88,8 @@ Items: {
DisplayName: Shattered Prism
Tooltip:
'''
A Last Prism exposed to the power of several singularities.
The chaos within seems desperate to be released.
A Last Prism exposed to the power of several singularities.
The chaos within seems desperate to be released.
'''
}
@@ -97,9 +97,9 @@ Items: {
DisplayName: Infinite Mana
Tooltip:
'''
You shouldn't have this.
+1000 max mana.
Prevents mana from being drained.
You shouldn't have this.
+1000 max mana.
Prevents mana from being drained.
'''
}
@@ -112,8 +112,8 @@ Items: {
DisplayName: RGB Alloy
Tooltip:
'''
A high-tech alloy used in advanced crafting.
Shimmers with red, green, and blue hues.
A high-tech alloy used in advanced crafting.
Shimmers with red, green, and blue hues.
'''
}
@@ -121,16 +121,16 @@ Items: {
DisplayName: Visor Shard
Tooltip:
'''
A fragment of a high-tech visor.
Emits a faint glow.
A fragment of a high-tech visor.
Emits a faint glow.
'''
}
MiniSingularity: {
Tooltip:
'''
A small, contained singularity.
Handle with care.
A small, contained singularity.
Handle with care.
'''
DisplayName: Mini Singularity
}
@@ -138,8 +138,8 @@ Items: {
ControlledSingularity: {
Tooltip:
'''
A stabilized captive singularity for advanced applications.
Extremely volatile if mishandled.
A stabilized captive singularity for advanced applications.
Extremely volatile if mishandled.
'''
DisplayName: Controlled Singularity
}
@@ -148,13 +148,13 @@ Items: {
DisplayName: Singularity Chestplate
Tooltip:
'''
+50% damage
+40 max mana
+10% damage reduction
-50% mana cost
+1000 max life
+20 max minions
'You feel a strange power coursing through your veins.'
+50% damage
+40 max mana
+10% damage reduction
-50% mana cost
+1000 max life
+20 max minions
'You feel a strange power coursing through your veins.'
'''
}
@@ -162,11 +162,11 @@ Items: {
DisplayName: Singularity Helmet
Tooltip:
'''
+50% damage
+100% critical strike chance
+10% damage reduction
+500 max life
'Your mind feels sharper, as if touched by the void itself.'
+50% damage
+100% critical strike chance
+10% damage reduction
+500 max life
'Your mind feels sharper, as if touched by the void itself.'
'''
}
@@ -174,54 +174,61 @@ Items: {
DisplayName: Singularity Leggings
Tooltip:
'''
+500% movement speed
+50% damage
+10% damage reduction
+500 max life
Allows infinite flight.
'You feel lighter on your feet, as if gravity itself has less hold on you.'
+500% movement speed
+50% damage
+10% damage reduction
+500 max life
Allows infinite flight.
'You feel lighter on your feet, as if gravity itself has less hold on you.'
'''
}
SingularityAxe: {
DisplayName: Singularity Axe
Tooltip: ""
}
SingularityHammer: {
DisplayName: Singularity Hammer
Tooltip: ""
}
SingularityPickaxe: {
DisplayName: Singularity Pickaxe
Tooltip: ""
}
SingularityMultitool: {
Tooltip: ""
DisplayName: Singularity Multitool
}
ContainmentUnit: {
Tooltip: ""
Tooltip:
'''
A high-tech containment unit for stabilizing singularities.
Essential for advanced singularity research and applications.
'''
DisplayName: Containment Unit
}
SingularitySealingUnitItem: {
Tooltip: ""
Tooltip:
'''
A specialized device used to seal and stabilize singularities.
Used for singularity crafting.
'''
DisplayName: Singularity Sealing Unit Item
}
EnergyCore: {
Tooltip: ""
Tooltip:
'''
A core pulsating with concentrated energy.
Used in high-tech crafting and energy applications.
'''
DisplayName: Energy Core
}
SingularityAlloy: {
Tooltip: ""
Tooltip: A singularity formed into a stable, sturdy alloy.
DisplayName: Singularity Alloy
}
AvaliFeather: {
Tooltip: A feather from an Avali.
DisplayName: Avali Feather
}
}
NPCs: {
@@ -300,14 +307,14 @@ NPCs: {
DisplayName: Avalian Trader
TownNPCMood: {
Content: I am content.
NoHome: I hate not having a home.
FarFromHome: I am too far from home.
LoveSpace: I love having so much space.
DislikeCrowded: I dislike how crowded I am.
HateCrowded: I hate how crowded I am.
LikeNPC_Princess: I like {NPCName}.
Princess_LovesNPC: I like {NPCName}.
Content: "*chirps contentedly* Life here is good!
NoHome: *distressed chirping* I need a proper nest to store my wares!
FarFromHome: I've wandered too far from my shop... this feels wrong.
LoveSpace: *happy chirps* So much room for my inventory!
DislikeCrowded: *agitated chirping* Too many bodies, not enough space...
HateCrowded: *stressed chirping* I can barely spread my wings in here!
LikeNPC_Princess: I like {NPCName}. She appreciates quality craftsmanship!
Princess_LovesNPC: I like {NPCName}. They remind me of traders back on Avalon.
}
}
}
+4
View File
@@ -1,2 +1,6 @@
# The Forgotten Wawi Tech Mod
## A Terraria Mod
This is the source code repository for the Forgotten Wawi Tech mod for Terraria. This mod adds a variety of new content, including items, bosses, and rarities, to enhance the gameplay experience.
Depends on Calamity Mod for the best experience.
Not canon to Avali, Protogen or Calamity lore - we are just having fun.
+1 -1
View File
@@ -1,3 +1,3 @@
displayName = The Forgotten Wawi Tech
author = EclypsedMoonfall, Axl_the_Protogen
author = EclypsedMoonfall, Axl_the_Protogen, British_Raccoon
version = 0.1