tModLoader Regen From Bosses

This mod requires tModLoader. This mod can be downloaded either through the in-game mod browser or through GitHub here.

icon.png

Source code available on GitHub!

Regen From Bosses makes your character regenerate some life per second, based on the amount of bosses that you have slain at least once in a world.
This mod exists to make Squire's Great Helm and Valhalla Knight's Breastplate less essential for people who don't want to use consumable health potions, although this mod does stack with those items.

The maximum life and mana regeneration per second from this mod can be configured through the Mods menu within tModLoader. The default is up to 10 life per second, and no mana per second. (For multiplayer players, it's completely safe to have differing configuration files. The server's configuration decides the regeneration for all clients.)

This regeneration stacks with other kinds of life regeneration, but like those other kinds, it is halted by life-draining debuffs (such as burning).


Unfortunately, support for other mods' bosses is currently hardcoded (meaning that it's manually coded into this mod, not automatic). See the below list for what's currently supported:
Keep in mind that while the mod support has been validated, it has not been tested through a normal playthrough. Bosses added to mods in updates after the ones listed below will not be accounted for by this mod yet.
"Integration" with the Boss Checklist mod has been considered for wide automatic mod-boss support, but I can't figure out a way to accomplish that at the moment.

This mod seems to have no effect in multiplayer. I don't know why. Sorry. (This mod is open-source (see the top of this post), so if you want to take a look at it to see if you can find out why it's broken, feel free to do so.)


Also, here's a changelog:
Version 3.1:
- Updated support for Mod of Redemption

Version 3.0.2:
- Fixed two "sums" in the mod configuration menu being listed at wrong places in the menu

Version 3.0.1:
- Coloured the headers in the mod configuration menu for this mod, just to make it look prettier
- Minor source code cleanup

Version 3.0:
- Updated to tModLoader 0.11+, and uses the ModConfig system introduced in it
- (This means that any configuration from previous versions before 3.0 no longer applies, though the new method is more user-friendly)
- You can now adjust how much maximum life regeneration you can obtain by slaying all bosses/mini-bosses/events in a world, and how much it stacks with life regeneration from other sources, within the game
- Now supports additional life regeneration for slaying mini-bosses and events, as well as an always-active passive bonus, although none of those things are enabled by default (though they can be configured in-game)
- You can now also make it so that this mod gives you some extra mana regeneration. This is also disabled by default... but you can configure it if you really want to, because "why not". This is not tested yet
- No longer hangs in multiplayer... but based on one-player tests, doesn't seem to have any effect in it, anyway... So, multiplayer is still not supported, but at least playable now?
- Updated support for Calamity Mod (No Calamity Music)

Version 2.1:
- Added support for Tremor Mod Remastered and Varia (Open Beta)
- Updated support for Calamity Mod (No Calamity Music), Mod of Redemption, Thorium Mod, and Spirit Mod
- (All supported mods are now fully supported; No mods are only partially supported anymore)
- No longer recalculates the life regeneration amount upon respawning. Considering that it recalculates it when slaying a boss or re-joining the world, that should be often enough.

Version 2.0:
- Life regeneration is now based on the percentage of bosses that have been slain
- (This means that you won't get a higher maximum regeneration by using lots of boss-adding mods)
- The maximum regeneration amount can be adjusted in the configuration file: -/Terraria/ModLoader/Mod Configs/RegenFromBosses.json
- The default is up to 10 life per second (which is 20 in the config)
- (The previous maximum from vanilla Terraria's bosses was 7 per second, so this is a slight buff if no more than 6 mod bosses are also added, but a nerf if so)
- Partial rewrite and more restructuring of the source code
- Some "debug" stuff is now displayed when calculating the regeneration if Modder's Toolkit is loaded
- In theory, multiplayer synchronization has been improved much more, but in practice, it has been completely destroyed

Version 1.2:
- Added full support for Mod of Redemption

Version 1.1:
- Added full support for Crystilium, Echoes of the Ancients, Example Mod, Exodus Mod, Pumpking's Mod, and W1K's Mod Redux
- Added partial support for Spirit Mod
- Restructuring of source code
- Possible multiplayer synchronization improvement, although multiplayer synchronization was unknown before and is still unknown, so whether it's better, worse, or unchanged is unknown

Version 1.0.0.1:
- Hotfix for Antiaris mod support checking Calamity Mod's bosses instead, causing double-regen from Calamity Mod or a crash if Calamity Mod is not loaded when Antiaris is

Version 1.0:
- Initial release
- Added full support for Antiaris and Ocram 'n Stuff
- Added partial support for Calamity Mod and Thorium Mod
 
Last edited:
This mod requires tModLoader. This mod can be downloaded either through the in-game mod browser or through GitHub here.


Regen From Bosses makes your character regenerate some life per second, based on the amount of bosses that you have slain at least once in a world.
This mod exists to make Squire's Great Helm and Valhalla Knight's Breastplate less essential for people who don't want to use consumable health potions, although this mod does stack with those items.

For each boss that you have slain, you will automatically regenerate 0.5 life per second. This stacks with other kinds of life regeneration, but it is halted by life-draining debuffs (such as burning).


Unfortunately, support for other mods' bosses is currently hardcoded (meaning that it's manually coded into this mod, not automatic). See the below list for what's currently supported:
Keep in mind that the mod support is not fully tested, and the listed support amount may be incorrect.
"Integration" with the Boss Checklist mod has been considered for wide automatic mod-boss support, but I can't figure out a way to accomplish that at the moment.

I don't know how this mod fares in multiplayer. So while I think that it'll work fine, please be warned that unexpected issues might pop up.


Also, here's a changelog:
Version 1.1:
- Added full support for Crystilium, Echoes of the Ancients, Example Mod, Exodus Mod, Pumpking's Mod, and W1K's Mod Redux
- Added partial support for Spirit Mod
- Restructuring of source code
- Possible multiplayer synchronization improvement, although multiplayer synchronization was unknown before and is still unknown, so whether it's better, worse, or unchanged is unknown

Version 1.0.0.1:
- Hotfix for Antiaris mod support checking Calamity Mod's bosses instead, causing double-regen from Calamity Mod or a crash if Calamity Mod is not loaded when Antiaris is

Version 1.0:
- Initial release
- Added full support for Antiaris and Ocram 'n Stuff
- Added partial support for Calamity Mod and Thorium Mod
Please add support for the Mod of Redemption
 
Oh yeah, btw this mod causes problems with multiplayer. Whenever you try to start a server, it stops at recieving tile data:complete.
I'm aware of that. I don't know how to fix it, however, as there doesn't seem to be any fully-up-to-date variable-synchronization guides for tModLoader, while what I've done looks theoretically-correct to me, and my (non-Discord) questions about it have been left unanswered.
 
I'm aware of that. I don't know how to fix it, however, as there doesn't seem to be any fully-up-to-date variable-synchronization guides for tModLoader, while what I've done looks theoretically-correct to me, and my (non-Discord) questions about it have been left unanswered.
That's tough, i was using your mod along with dragon ball terraria to make myself op lmao.
 
This mod requires tModLoader. This mod can be downloaded either through the in-game mod browser or through GitHub here.


Regen From Bosses makes your character regenerate some life per second, based on the amount of bosses that you have slain at least once in a world.
This mod exists to make Squire's Great Helm and Valhalla Knight's Breastplate less essential for people who don't want to use consumable health potions, although this mod does stack with those items.

The maximum life regeneration per second can be adjusted with a text editor in the configuration file at -/Terraria/ModLoader/Mod Configs/RegenFromBosses.json. The maximum regeneration per second will be half of the value listed in the configuration file, which by default is 20 (meaning 10 per second). (For multiplayer players, it should be completely safe to have differing configuration files. The server's configuration file (hopefully) decides the regeneration for all clients.)

This regeneration stacks with other kinds of life regeneration, but like those other kinds, it is halted by life-draining debuffs (such as burning).


Unfortunately, support for other mods' bosses is currently hardcoded (meaning that it's manually coded into this mod, not automatic). See the below list for what's currently supported:
Keep in mind that the mod support is not fully tested, and the listed support amount may be incorrect.
"Integration" with the Boss Checklist mod has been considered for wide automatic mod-boss support, but I can't figure out a way to accomplish that at the moment.

I don't know how this mod fares in multiplayer. So while I think that it'll work fine, please be warned that unexpected issues might pop up.


Also, here's a changelog:
Version 2.0:
- Life regeneration is now based on the percentage of bosses that have been slain
- (This means that you won't get a higher maximum regeneration by using lots of boss-adding mods)
- The maximum regeneration amount can be adjusted in the configuration file: -/Terraria/ModLoader/Mod Configs/RegenFromBosses.json
- The default is up to 10 life per second (which is 20 in the config)
- (The previous maximum from vanilla Terraria's bosses was 7 per second, so this is a slight buff if no more than 6 mod bosses are also added, but a nerf if so)
- Partial rewrite and more restructuring of the source code
- Some "debug" stuff is now displayed when calculating the regeneration if Modder's Toolkit is loaded
- In theory, multiplayer synchronization has been improved much more, but it's still unknown whether it works or not in practice

Version 1.2:
- Added full support for Mod of Redemption

Version 1.1:
- Added full support for Crystilium, Echoes of the Ancients, Example Mod, Exodus Mod, Pumpking's Mod, and W1K's Mod Redux
- Added partial support for Spirit Mod
- Restructuring of source code
- Possible multiplayer synchronization improvement, although multiplayer synchronization was unknown before and is still unknown, so whether it's better, worse, or unchanged is unknown

Version 1.0.0.1:
- Hotfix for Antiaris mod support checking Calamity Mod's bosses instead, causing double-regen from Calamity Mod or a crash if Calamity Mod is not loaded when Antiaris is

Version 1.0:
- Initial release
- Added full support for Antiaris and Ocram 'n Stuff
- Added partial support for Calamity Mod and Thorium Mod
Could you please add support for the Varia mod? (I'm pretty sure it only has 5 bosses)
 
This mod requires tModLoader. This mod can be downloaded either through the in-game mod browser or through GitHub here.


Regen From Bosses makes your character regenerate some life per second, based on the amount of bosses that you have slain at least once in a world.
This mod exists to make Squire's Great Helm and Valhalla Knight's Breastplate less essential for people who don't want to use consumable health potions, although this mod does stack with those items.

The maximum life regeneration per second can be adjusted with a text editor in the configuration file at -/Terraria/ModLoader/Mod Configs/RegenFromBosses.json. The maximum regeneration per second will be half of the value listed in the configuration file, which by default is 20 (meaning 10 per second). (For multiplayer players, it should be completely safe to have differing configuration files. The server's configuration file (hopefully) decides the regeneration for all clients.)

This regeneration stacks with other kinds of life regeneration, but like those other kinds, it is halted by life-draining debuffs (such as burning).


Unfortunately, support for other mods' bosses is currently hardcoded (meaning that it's manually coded into this mod, not automatic). See the below list for what's currently supported:
Keep in mind that while the mod support has been validated, it has not been tested through a normal playthrough. Bosses added to mods in updates after the ones listed below will not be accounted for by this mod yet.
"Integration" with the Boss Checklist mod has been considered for wide automatic mod-boss support, but I can't figure out a way to accomplish that at the moment.

This mod completely breaks multiplayer. Sorry. (This mod is open-source (see the top of this post), so if you want to take a look at it to see if you can find out why it's broken, feel free to do so.)


Also, here's a changelog:
Version 2.1:
- Added support for Tremor Mod Remastered and Varia (Open Beta)
- Updated support for Calamity Mod (No Calamity Music), Mod of Redemption, Thorium Mod, and Spirit Mod
- (All supported mods are now fully supported; No mods are only partially supported anymore)
- No longer recalculates the life regeneration amount upon respawning. Considering that it recalculates it when slaying a boss or re-joining the world, that should be often enough.

Version 2.0:
- Life regeneration is now based on the percentage of bosses that have been slain
- (This means that you won't get a higher maximum regeneration by using lots of boss-adding mods)
- The maximum regeneration amount can be adjusted in the configuration file: -/Terraria/ModLoader/Mod Configs/RegenFromBosses.json
- The default is up to 10 life per second (which is 20 in the config)
- (The previous maximum from vanilla Terraria's bosses was 7 per second, so this is a slight buff if no more than 6 mod bosses are also added, but a nerf if so)
- Partial rewrite and more restructuring of the source code
- Some "debug" stuff is now displayed when calculating the regeneration if Modder's Toolkit is loaded
- In theory, multiplayer synchronization has been improved much more, but in practice, it has been completely destroyed

Version 1.2:
- Added full support for Mod of Redemption

Version 1.1:
- Added full support for Crystilium, Echoes of the Ancients, Example Mod, Exodus Mod, Pumpking's Mod, and W1K's Mod Redux
- Added partial support for Spirit Mod
- Restructuring of source code
- Possible multiplayer synchronization improvement, although multiplayer synchronization was unknown before and is still unknown, so whether it's better, worse, or unchanged is unknown

Version 1.0.0.1:
- Hotfix for Antiaris mod support checking Calamity Mod's bosses instead, causing double-regen from Calamity Mod or a crash if Calamity Mod is not loaded when Antiaris is

Version 1.0:
- Initial release
- Added full support for Antiaris and Ocram 'n Stuff
- Added partial support for Calamity Mod and Thorium Mod
Calamity support is broken right now. The namespace was changed from CalamityMod.CalamityWorld to CalamityMod.World.CalamityWorld.
 
Calamity support is broken right now. The namespace was changed from CalamityMod.CalamityWorld to CalamityMod.World.CalamityWorld.
I don't get it... I've just updated to Calamity Mod (No Calamity Music) v1.4.2.101, and Regen From Bosses v2.1 seems to work just fine with those bosses, while Modders Toolkit v0.12's C# module thing also seems to claim that Calamity's "boss downed" variables are still CalamityMod.CalamityWorld.downedX (which seems correct in practice, too, as Regen From Bosses still gets affected by Calamity's bosses being defeated).
So, just make sure that you have the latest versions of Calamity and Regen From Bosses, and it should work.

(Is there some kind of beta update for Calamity, not hosted on tModLoader's mod browser, that I'm unaware of?)
 
I don't get it... I've just updated to Calamity Mod (No Calamity Music) v1.4.2.101, and Regen From Bosses v2.1 seems to work just fine with those bosses, while Modders Toolkit v0.12's C# module thing also seems to claim that Calamity's "boss downed" variables are still CalamityMod.CalamityWorld.downedX (which seems correct in practice, too, as Regen From Bosses still gets affected by Calamity's bosses being defeated).
So, just make sure that you have the latest versions of Calamity and Regen From Bosses, and it should work.

(Is there some kind of beta update for Calamity, not hosted on tModLoader's mod browser, that I'm unaware of?)
The newest version of calamity is v1.4.2.102. It is not a beta, but it isn't on the mod browser. You can download it here: MEGA
(The best way to get calamity updates is by joining the discord)
Oh, and heres the error message in my logs:
Silently Caught Exception: Could not load type 'CalamityMod.CalamityWorld' from assembly 'CalamityMod_0, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. at RegenFromBosses.RegenFromBosses.ModSupportCalamityMod()
at RegenFromBosses.RegenFromBosses.HardcodedModSupport() at DMD<Terraria.ModLoader.ModCompile+<>c::<ActivateExceptionReporting>b__15_0>(<>c , Object , FirstChanceExceptionEventArgs )
at TerrariaHooks.TerrariaHooksManager.OnLogSilentException(Action`3 orig, Object self, Object sender, FirstChanceExceptionEventArgs exceptionArgs)
at Hook<Terraria.ModLoader.ModCompile+<>c::<ActivateExceptionReporting>b__15_0>?31352418(<>c , Object , FirstChanceExceptionEventArgs )
at RegenFromBosses.RegenFromBosses.ModSupportCalamityMod()
at RegenFromBosses.RegenFromBosses.HardcodedModSupport()
at RegenFromBosses.RegenFromBosses.CalculateRegen()
at RegenFromBosses.RegenFromBosses_World.PostUpdate()
at Terraria.ModLoader.WorldHooks.PostUpdate()
at Terraria.WorldGen.UpdateWorld()
at Terraria.Main.DoUpdate(GameTime gameTime)
at Terraria.Main.Update(GameTime gameTime)
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
at Microsoft.Xna.Framework.GameHost.OnIdle()
at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run()
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at Terraria.Program.LaunchGame(String[] args, Boolean monoArgs)
at Terraria.WindowsLaunch.Main(String[] args)
 
Last edited:
The newest version of calamity is v1.4.2.102. It is not a beta, but it isn't on the mod browser. - (The best way to get calamity updates is by joining the discord) -
Well, feel free to let me know once it becomes available in the in-tModLoader mod browser. I'm going to guess that 95%-99% of Calamity users get it from just the in-tModLoader mod browser, so I'm not going to break Regen From Bosses compatibility with most people's copies of Calamity, while I don't think that it's possible for me to have a single version of Regen From Bosses be compatible with multiple namespace places of different versions of a mod (tModLoader "links" cross-mod access stuff on mod-compile-time, I think; If I use the old version of Calamity, I can't access differently-named stuff of new versions, and if I use the new version, I can't access differently-named stuff of old versions).

TL;DR: I can't support both the new and the old Calamity namespace simultaneously, (Edit: and I don't want to un-support the version of Calamity in the mod browser,) so I'm not going to support the new one until Calamity gets updated in the in-tModLoader mod browser.
 
Well, feel free to let me know once it becomes available in the in-tModLoader mod browser. I'm going to guess that 95%-99% of Calamity users get it from just the in-tModLoader mod browser, so I'm not going to break Regen From Bosses compatibility with most people's copies of Calamity, while I don't think that it's possible for me to have a single version of Regen From Bosses be compatible with multiple namespace places of different versions of a mod (tModLoader "links" cross-mod access stuff on mod-compile-time, I think; If I use the old version of Calamity, I can't access differently-named stuff of new versions, and if I use the new version, I can't access differently-named stuff of old versions).

TL;DR: I can't support both the new and the old Calamity namespace simultaneously, (Edit: and I don't want to un-support the version of Calamity in the mod browser,) so I'm not going to support the new one until Calamity gets updated in the in-tModLoader mod browser.
A new version of calamity is out on the mod browser. Make sure to be on tModLoader 0.11.3.
 
A new version of calamity is out on the mod browser. Make sure to be on tModLoader 0.11.3.
There's a problem with that: Modder's Toolkit specifically disallows itself from being loaded in tModLoader 0.11.3 (for the time being, at least), and that's what I used to use to make mod compatibility with mods (or rather, figure out the exact variable names that I should use in Regen From Bosses' code). I could get around it if Calamity was open-source, but it's not.
 
There's a problem with that: Modder's Toolkit specifically disallows itself from being loaded in tModLoader 0.11.3 (for the time being, at least), and that's what I used to use to make mod compatibility with mods (or rather, figure out the exact variable names that I should use in Regen From Bosses' code). I could get around it if Calamity was open-source, but it's not.
Modder's toolkit does work with 0.11.3, it only has an error when you reload mods. (So enable it, exit the game and go back in.)
 
Back
Top Bottom