You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to make a plugin for DPS and % contribution to bosses calculation.
The way it works is by using TSAPI's extension of the Npc.Strike hook I add each boss to a dictionary with the needed information for the calculation. And then when the boss dies, using TSAPI's extension of the Npc.Killed hook I remove the boss from the dictionary.
It works fine for bosses like King Slime, Eye of Cthulhu and such (one part) bosses, but it gets very complicated when dealing with multiple part bosses (Skeletron Prime, Skeletron not included because their arms are not part of the boss's max health).
Eater of Worlds specifically can't be removed from the dictionary because while a part of it dies, the 'boss' is still alive.
I tried to go around it by getting the total number of segments of the boss (head and tail don't count, only type ID 14) and then only removing it after the number of segments dead is the same as total but that seemed to be less reliable as the boss split apart, and then some other bugs where I used a strong weapon and hit the boss after it was dead. All of my calculations would be possible, and easier to do if there was a hook for bosses dying with the Terraria.NPC property in it.
With such a hook, all I'd have to do is remove the NPC from my dictionary and it's done, no counting or anything.
The text was updated successfully, but these errors were encountered:
I'm trying to make a plugin for DPS and % contribution to bosses calculation.
The way it works is by using TSAPI's extension of the Npc.Strike hook I add each boss to a dictionary with the needed information for the calculation. And then when the boss dies, using TSAPI's extension of the Npc.Killed hook I remove the boss from the dictionary.
It works fine for bosses like King Slime, Eye of Cthulhu and such (one part) bosses, but it gets very complicated when dealing with multiple part bosses (Skeletron Prime, Skeletron not included because their arms are not part of the boss's max health).
Eater of Worlds specifically can't be removed from the dictionary because while a part of it dies, the 'boss' is still alive.
I tried to go around it by getting the total number of segments of the boss (head and tail don't count, only type ID 14) and then only removing it after the number of segments dead is the same as total but that seemed to be less reliable as the boss split apart, and then some other bugs where I used a strong weapon and hit the boss after it was dead. All of my calculations would be possible, and easier to do if there was a hook for bosses dying with the Terraria.NPC property in it.
With such a hook, all I'd have to do is remove the NPC from my dictionary and it's done, no counting or anything.
The text was updated successfully, but these errors were encountered: