You are browsing as a guest. Sign up (or log in) to start making projects!

JJK Black Flash - Terraria TShock Plugin

  • 2 Devlogs
  • 7 Total hours

This is a tShock Terraria plugin that can be used in any server where it's included in. Currently, the plugin grants each player hit's damage to have a 50% chance to be exponentially increased by the power of 2.5, replicating the mechanics of Jujutsu Kaisen's "Black Flash". The chance to land a black flash will decrease in future versions, as it's only so high currently for testing purposes. The black flash includes its own custom damage numbers + a popup text indicating when a black flash is landed. In addition, a red fireworks sets off on the mob you attack to replicate the sparks of a black flash.

Open comments for this post

1h 37m 50s logged

Black Flash is (basically) finished!

Implementing PvP compatibility proved challenging as it used completely different methods and objects to obtain data from the game that I was completely unaware of. I encountered many problems along the way, most notably the health bar actually aligning to the damage being dealt by an attacking player. The number claiming the damage dealt didn’t actually change the health of the player. I later fixed this by manually changing the player’s health after a hit using other methods. Unfortunately, this wasn’t the only problems I encountered in the making of this project.

Upon testing, I figured out that black flash attacks were incapable of being lethal to a player. The modified damage was no longer dealt as soon as the player reached a health amount that would kill them via a black flash.

Each black flash hit dealt with a Copper Shortsword usually dealt about 60 damage. Continuously attacking a player with a black flash would, as it was supposed to, deal ~60 damage to the player. However, as soon as the player you were attacking reached a health below ~60, in which a black flash attack would kill them, the plugin stopped working altogether. The blue damage number being dealt would appear, but no ACTUAL changes would occur to the player’s health, at least not on the player’s end. I thought it was really annoying at first but it actually turned out to be a simple fix. I just needed a new if statement to handle killing the player when their health lowered towards a point in which it would die. Internally, the server viewed the player’s health as a negative. Since negative HP doesn’t exist in Terraria, I assume it defaulted to its original damage if an amount of damage dealt an amount that would make the player’s health negative. To fix this, I simply stated that if a player’s health fell below 0, the server itself would kill them automatically rather than the game itself killing them.

There are still some aspects of the plugin I would like to polish or add, but for now, its state is satisfactory. In the future, I would like to completely eliminate the firework being visible to create the explosion effect but I’ll be honest, this may not be within tShock’s capabilities (I’m probably wrong). I’d also like to completely replace the death message sent when a player dies to a black flash rather than sending a duplicate accompanying the regular death message. These things take longer than I thought they would. I’ll likely continue this as I seek to create fun, PvP plugins that can be used in servers such as this one.

Below is also a demonstration of said plugin in action! Like I said, there’s still plenty of things I’d like to improve on, so it’s likely not completely finished.

0
0
5
Open comments for this post

5h 8m 10s logged

Black Flash only currently works on NPCs. I plan to make it targets players in the future but honestly I have no idea how yet.

Some of its code is still a bit clunky, mainly because I learned about new ways on how to do stuff (like colors) mid-project.

0
0
18

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…