Weapons & Equip Dyeable Weapons

Ok, I'll explain it.

I agree that there should be some weapon dye, but I don't agree that it works the way you described it.

Is that it would be cooler if it was possible to use normal dyes on weapons without having to use a crafting station or water to, supposedly, wash your weapon, thus removing its added color.
 
Last edited:
The question is, people who know the code, does adding a reforge on an item make it a different item ID or is it the same item ID but with different tags on it? (sorry if I'm not making sense IDK code and stuff at all xD)

Either way seems like a huge hassle and just think about reforging already dyed weapons... owchies.

I love the idea, I feel like it'd be much harder than you think though (and more than I think for that matter) :happy:
 
The question is, people who know the code, does adding a reforge on an item make it a different item ID or is it the same item ID but with different tags on it? (sorry if I'm not making sense IDK code and stuff at all xD)

Either way seems like a huge hassle and just think about reforging already dyed weapons... owchies.

I love the idea, I feel like it'd be much harder than you think though (and more than I think for that matter) :happy:
As someone who uses ids to say items in chat, it's a different tag
 
There actually was a dyeable weapons mod a while back, it didn't look nice though and it unfortunately would fail in vanilla for the exact same reasons. The reasons being: animated dyes often didn't look nice, and weapons which used particles such as the water bolt basically had dyes do nothing to them.
 
Let me start of my post by quoting from the Official - Terraria's 8th Anniversary - Ask Redigit and Cenx! thread:
Cenx said:
There are three that come to mind immediately- Rain accumulation, Weapon Dyes, and being able to grapple to trees.

...

The ability to dye weapons was always something we wanted to try and this was definitely a highly requested feature. Unfortunately, the way our dye and particle systems work does not play nicely with this, and we ended up having to scrap the system entirely.
Now, I don't know what the developers tested, what it looked like, or what the devs didn't like about it, so nothing I'm about to say is in any way representative of their findings or subsequent opinions. I do however want to hook in on the particle system issue they mentioned and how I experienced that myself, as a modder who's worked a lot with shaders, and dyes in specific.

To those who are not familiar with how particles work in Terraria, those are the little cross shaped things you occasionally see when you run, fly or hit things with projectiles. These particles (or Dusts, as they're called internally in the code) have their own system, and aren't drawn in the same way as players. When you equip a dye in a dye slot, the dye implicitly only dyes the item that dye slot is linked to. Any dusts related to that item are explicitly told to use that dye as well wherever they are created in the code. As you can imagine, there are a lot of places where dusts are created, so implementing the dye system to work with particles likely took a lot of work (likely, mind you, I don't know how they did it or how much time it took them).

Now, imagine we implement dyes for weapons. Dyeing the weapon sprite itself isn't all that complicated, but that's also only a small part of a weapon's visual. If a weapon creates dusts (which not all of them do, and all of them that do create them explicitly), then those dusts would have to be explicitly told to use dyes. All of them. Every single weapon in the game that creates dusts. Quite a bit of work, I can tell you.

But imagine you go that extra mile and dye all weapon dusts anyway. Then what do we do with weapons that create projectiles? That's virtually (if not actually) every magic weapon, every ranged weapon, every summoning weapon and even a lot of melee weapons (obviously stuff like the Terra Blade, but also yoyos, spears, flails boomerangs and even drills). And while dusts can be assigned shaders, projectiles can not: the game can keep track off which projectile is the player's light pet, and if the projectile it's currently trying to draw is the light pet, and if so check for dyes, but there's no such 'keeping track' for weapon projectiles. Yes, you could check who the projectile's owner is, but unless you're prepared to add additional checks to exclude special cases, then you'd be applying dye to all your projectiles, including ones already covered by other dye slots (like grappling hooks and light pets).

But imagine you also did that, and now every projectile is dyed as well. Surely we're done then?

Well, no. Because now you've died all weapons, all weapon dusts and all weapon projectiles. What you then still wouldn't have dyed would be weapon projectile dusts. Which means you'd have to go through every single weapon projectile in the game as well and explicitly tell every projectile to dye their dusts as well. Altogether that will take you a lot of time.

So there's the time aspect, but a different problem altogether is that dye effects, especially animated ones, are calibrated to player sized frames, that is to say frames with the same dimensions (width and height) as players. In other words, dyes look good, and more importantly, are primarily supposed to look good, on players. Because armours (head, torso and leg) are player sized frames, dyes look good on them. Anything that doesn't share the same dimensions (weapons, projectiles, and the dusts you've painstakingly made dye-able) may look different or flat out ugly under the effect of dyes. So not only would it take a lot of work to implement dyes for weapons, but there's a good chance that result wouldn't even look good to begin with.

To give you an example of this, consider one of my own dyes. Take note of the dust particles coming off the wings (especially when the frame is paused):

hLoRIwM.gif


As you can see, the dye looks rather less pretty on the dust particles than on the armour itself (an association with vomit wouldn't entirely be out of place, if I say so myself). How this would translate to other dyes I can not say, but I expect similar issues.

Again, these are entirely and exclusively my own, personal observations. I don't know what the official reasons were, nor do I pretend to know what they were. All I can say is that I can see several issues on my own accord.
 
Back
Top Bottom