tModLoader How to replace/alter the look of vanilla CombatText display?

CircleCly

Terrarian
Hi, I am now creating a mod using tModLoader and I want to alter the color of the damage numbers displayed when I hit an enemy.

My current solution is to override ModPlayer.ModifyHitNPCWithProj() and ModPlayer.ModifyHitNPC(), call CombatText.NewText() in these methods, decrease the enemy health there, and then set the damage to 0.

However, if the damage is simply set to 0, the vanilla game system still proceeds to check the damage amount, and the damage will be changed to 1 (Because damages lower than 1 will be set to 1 in Vanilla mechanism). Therefore, the original damage plus a damage of 1 will be dealt to the enemy, and two numbers are displayed.

So is there any way to change the look of vanilla CombatText display that will not cause the problem above to appear?
 
Back
Top Bottom