Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
005491b
Added the visual effect to diamondheads ability
DestroyerMob Feb 14, 2026
49c109d
Balance changes, working on adding shader to heatblast
DestroyerMob Feb 16, 2026
5a50819
Shader finished
DestroyerMob Feb 16, 2026
a585684
Fixed meteorite generation
DestroyerMob Feb 20, 2026
25f3dc9
Added eyeguy, revamped UI, added stat bar, implemented a working reca…
DestroyerMob Feb 24, 2026
508cb38
Fixed ghostfreak's phasing ability. Changed the ability system to use…
DestroyerMob Feb 26, 2026
abad08a
Improved Ghostfreak possession
DestroyerMob Feb 27, 2026
98830f9
Boom
DestroyerMob Feb 27, 2026
89a899d
Replaced heatblast wings with an extra jump accessory
DestroyerMob Feb 27, 2026
4ae3f7e
Added ultimate abilities to some other aliens
DestroyerMob Mar 2, 2026
9da44fe
Fixed buzzshock minion
DestroyerMob Mar 2, 2026
d391554
Working on ultimate abilities and refining already existing abilites
DestroyerMob Mar 3, 2026
97bf87a
Working on XLR8's timestop ability
DestroyerMob Mar 3, 2026
adc7bfa
Got a basic shader working
DestroyerMob Mar 5, 2026
642b40f
Added the compiler for shaders
DestroyerMob Mar 5, 2026
5784064
Fixed up xlr8 ability and added the screen shader
DestroyerMob Mar 5, 2026
541591d
More shader work
DestroyerMob Mar 5, 2026
eb0c9a7
Started work on Bigchill
DestroyerMob Mar 6, 2026
ea76ff0
Adding more stuff to bigchill
DestroyerMob Mar 6, 2026
e8c3aca
Pushing next update
DestroyerMob Mar 6, 2026
9317042
Added version number
DestroyerMob Mar 6, 2026
603834c
Trying to get big chill shader working and adding more util stuff
DestroyerMob Mar 7, 2026
a7e8784
Added the ultimatrix and the evolution function
DestroyerMob Mar 9, 2026
a86a331
Reconfigured to make things easier
DestroyerMob Mar 9, 2026
a0de893
Starting to refactor to a more modular code base to make it easier to…
DestroyerMob Mar 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 50 additions & 8 deletions Ben10Mod.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,53 @@
using System.IO;
using Ben10Mod.Content.Items.Accessories;
using Ben10Mod.Content.Items.Vanity.ShaderDyes;
using Ben10Mod.Enums;
using Microsoft.Xna.Framework.Graphics;
using Mono.Cecil;
using ReLogic.Content;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;

namespace Ben10Mod
{
public class Ben10Mod : Mod
{
public override void Load() {
base.Load();
}
}
namespace Ben10Mod {
public class Ben10Mod : Mod {
public override void Load() {
if (Main.netMode != NetmodeID.Server) {
Asset<Effect> dyeShader = this.Assets.Request<Effect>("Effects/MyDyes");
Asset<Effect> filterShader = this.Assets.Request<Effect>("Effects/MyFilters");


GameShaders.Armor.BindShader(ModContent.ItemType<DiscoDye>(),
new ArmorShaderData(dyeShader, "BasicTint"));


Filters.Scene["Ben10Mod:Grayscale"] = new Filter(new ScreenShaderData(filterShader, "Grayscale"), EffectPriority.Medium);
Filters.Scene["Ben10Mod:Bluescale"] = new Filter(new ScreenShaderData(filterShader, "Bluescale"), EffectPriority.Medium);
}
}

// Add this enum anywhere in the class (or in a separate file)
public enum MessageType : byte {
UnlockTransformation
}

public override void HandlePacket(BinaryReader reader, int whoAmI) {
MessageType msgType = (MessageType)reader.ReadByte();

switch (msgType) {
case MessageType.UnlockTransformation:
int playerIndex = reader.ReadByte();
TransformationEnum transformation = (TransformationEnum)reader.ReadInt32();

if (playerIndex >= 0 && playerIndex < Main.maxPlayers) {
var modPlayer = Main.player[playerIndex].GetModPlayer<OmnitrixPlayer>();
modPlayer.AddTransformation(transformation); // client will apply it locally
}

break;
}
}
}
}
85 changes: 85 additions & 0 deletions Common/CustomVisuals/DiamondHeadShimmerLayer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
using System;
using Ben10Mod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.DataStructures;
using Terraria.GameContent;
using Terraria.ModLoader;

namespace Ben10Mod.Common.CustomVisuals;

public class DiamondHeadShimmerLayer : PlayerDrawLayer {

public override bool GetDefaultVisibility(PlayerDrawSet drawInfo) {
Player player = drawInfo.drawPlayer;
var omp = player.GetModPlayer<OmnitrixPlayer>();

return omp.currTransformation == TransformationEnum.DiamondHead && omp.PrimaryAbilityEnabled;
}

// Position after armor/body
public override Position GetDefaultPosition()
{
// Draw after armor layer so we overlay everything the player is wearing
return new AfterParent(PlayerDrawLayers.ArmOverItem);
}

protected override void Draw(ref PlayerDrawSet drawInfo)
{
Player player = drawInfo.drawPlayer;

// If our player is dead or invisible, skip
if (player.dead || player.invis)
return;

// How many existing draw entries there are; we only clone the originals
int originalCount = drawInfo.DrawDataCache.Count;
if (originalCount == 0)
return;

// Pulsing alpha between 0.3 and 0.5
float pulse = (float)((System.Math.Sin(Main.GameUpdateCount / 15f) + 1f) * 0.5f); // 0..1
float alpha = MathHelper.Lerp(0.3f, 0.5f, pulse);

// Rainbow shimmer color
Color baseColor = Color.White;
Color rainbow = Main.DiscoColor; // built-in cycling rainbow
Color shimmerColor = Color.Lerp(baseColor, rainbow, 0.75f) * alpha;

// Slight random offset (1–2 px in a random direction each frame)
Vector2 jitter = new Vector2(
Main.rand.NextFloat(-2f, 2f),
Main.rand.NextFloat(-2f, 2f)
);

// Clone each original DrawData and add a tinted copy with small offset
for (int i = 0; i < originalCount; i++)
{
var data = drawInfo.DrawDataCache[i];

// Optional: skip shadows, or stuff not attached to the player
// (Here we just clone everything; you can add filters if needed)

var copy = data;
copy.position += jitter;

// Multiply color by our shimmer; we also respect original alpha
// by combining them.
Color originalColor = data.color;
// Combine original color and shimmer; you can simplify this if you want
Color combined = new Color(
(byte)(originalColor.R * alpha + shimmerColor.R * (1f - alpha)),
(byte)(originalColor.G * alpha + shimmerColor.G * (1f - alpha)),
(byte)(originalColor.B * alpha + shimmerColor.B * (1f - alpha)),
(byte)(originalColor.A * alpha)
);

copy.color = combined;

// Add the draw to the cache so tML draws it after the original
drawInfo.DrawDataCache.Add(copy);
}

}
}
70 changes: 70 additions & 0 deletions Common/CustomVisuals/HeatShimmerLayer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
using System;
using Ben10Mod.Enums;
using Microsoft.Build.Tasks;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.DataStructures;
using Terraria.GameContent;
using Terraria.ModLoader;

namespace Ben10Mod.Common.CustomVisuals;

public class HeatShimmerLayer : PlayerDrawLayer {

public override bool GetDefaultVisibility(PlayerDrawSet drawInfo) {
Player player = drawInfo.drawPlayer;
var omp = player.GetModPlayer<OmnitrixPlayer>();

return omp.currTransformation == TransformationEnum.HeatBlast;
}

// Position after armor/body
public override Position GetDefaultPosition()
{
// Draw after armor layer so we overlay everything the player is wearing
return new AfterParent(PlayerDrawLayers.ArmOverItem);
}

protected override void Draw(ref PlayerDrawSet drawInfo) {
Player player = drawInfo.drawPlayer;
int originalCount = drawInfo.DrawDataCache.Count;
if (originalCount <= 0)
return;

float t = (float)Main.GameUpdateCount;

// Keep it subtle
float baseAlpha = 0.10f; // lower = subtler
float wobble = 2.5f; // pixel offset magnitude

// Warm colors cycling
Color c1 = new Color(255, 140, 40, 0);
Color c2 = new Color(255, 90, 20, 0);

// Multiple tiny offset passes for refractive feel
Vector2[] offsets = new Vector2[]
{
new Vector2((float)System.Math.Sin(t * 0.18f), (float)System.Math.Cos(t * 0.15f)) * wobble,
new Vector2((float)System.Math.Cos(t * 0.21f), (float)System.Math.Sin(t * 0.19f)) * (wobble * 0.8f),
new Vector2((float)System.Math.Sin(t * 0.25f + 1.3f), (float)System.Math.Cos(t * 0.22f + 0.7f)) * (wobble * 0.6f),
};

for (int i = 0; i < originalCount; i++)
{
var src = drawInfo.DrawDataCache[i];

for (int p = 0; p < offsets.Length; p++)
{
var copy = src;
copy.position += offsets[p];

Color tint = Color.Lerp(c1, c2, (float)p / (offsets.Length - 1));
copy.color = tint * baseAlpha;
copy.scale *= new Vector2(1.2f, 1.2f);

drawInfo.DrawDataCache.Add(copy);
}
}
}
}
4 changes: 2 additions & 2 deletions Common/Systems/GenPasses/CongealedCodonOreGenPass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public CongealedCodonOreGenPass(string name, float weight) : base(name, weight)
protected override void ApplyPass(GenerationProgress progress, GameConfiguration configuration) {
progress.Message = "Spawning Congealed Codon Ore";

int maxToSpawn = WorldGen.genRand.Next(325, 350);
int maxToSpawn = WorldGen.genRand.Next(275, 325);
int numSpawned = 0;
int attempts = 0;

Expand All @@ -28,7 +28,7 @@ protected override void ApplyPass(GenerationProgress progress, GameConfiguration

Tile tile = Framing.GetTileSafely(x, y);
if (tile.TileType == TileID.Stone) {
WorldGen.TileRunner(x, y, WorldGen.genRand.Next(10, 15), WorldGen.genRand.Next(1, 4), ModContent.TileType<CongealedCodonOreTile>());
WorldGen.TileRunner(x, y, WorldGen.genRand.Next(8, 13), WorldGen.genRand.Next(1, 4), ModContent.TileType<CongealedCodonOreTile>());
numSpawned++;
}

Expand Down
Loading
Loading