tModLoader

tModLoader

Minion ModifyWeaponDamage Patch
28 Comments
Lord Foog The 2st Jan 22 @ 7:57am 
Good to know, thanks for the quick reply. Seriously enjoying your mods!
BlockCrusader  [author] Jan 22 @ 7:41am 
@Lord Foog The 2st, yes the effects of this mod are already integrated into all my other mods so you won't need it for those.

This one is basically discontinued, really. I just leave it available in case there are mods out there that would benefit from it (Though I don't know of any).
I oughta update the mod's description here to reflect this.
Lord Foog The 2st Jan 22 @ 7:33am 
Hey! Is this patch already included in your weapon levelling/augments mods? Just double checking whether I need to get this one as well.
Rei Da Tecnologia Jul 15, 2024 @ 10:07am 
Well this was an interesting read!
Freak4Leeks Feb 17, 2024 @ 10:23pm 
Thanks, Appreciated!
BlockCrusader  [author] Jan 24, 2024 @ 5:26am 
@ValcomDrifty, this primarily affects summons/sentries, not whips.
One way tModLoader provides modders venues to modify weapon damage is through a hook called 'ModifyWeaponDamage'.
The problem is that, due to the way summons/sentries update their damage constantly (Which was done by Re-Logic in 1.4 to prevent damage build exploits used in 1.3), they are not affected by any damage changes made via. ModifyWeaponDamage.

It's very hard to say when this will impact you as a summoner because modders don't just announce 'hey this mod is using ModifyWeaponDamage' (Why would they?), but from my experience it's relatively common to see it used by mods which add ways to level up or otherwise upgrade your weapons. I made this patch because I noticed this problem when making such mods myself.
Valcom Jan 23, 2024 @ 7:36pm 
Could you maybe elaborate what the bug even is? I basically only play Summoner so I just want to know how it affects me. Like specifically what vanilla weapons have this bug and how much it would affect me (like if the bug only triggers when I use a wrath potion or a reforge for example)
BlockCrusader  [author] Nov 12, 2023 @ 4:46am 
@matheusverli24, I'm not really able to give a proper solution without knowing what mod has that bug, and also since it's not my mod. If enchantments are applied based on the held item, that may be intended behavior. It'd be best to ask the creator of whatever mod has the problem you've described.
Diablo B.Blake Nov 11, 2023 @ 9:53pm 
hi, sorry for the possible spelling errors, I don't speak English so I'm using a translator, but then I noticed a bug unrelated to your mobs that I would like to know if you know how to solve, apparently the enchantments made on the summon staffs only Summons apply when holding the staff, this applies to any item, minions benefit from enchantments placed on other items as long as you have it in your hand, but only those in your hand, ignoring their own
andro951 Oct 6, 2023 @ 8:09am 
The specific hooks I use are GlobalItem.ModifyWeaponDamage() and ModPlayer.ModifyHitNPCWithProj(Projectile proj, NPC target, ref NPC.HitModifiers modifiers) { modifiers *= multiplier }
I also store a reference to the source item in GlobalProjectile.OnSpawn by getting it from the source that created the projectile so that the GlobalItem with the modifier can be accessed in the ModPlayer hook.

This solution doesn't update the actual projectile damage if that's something you need.
BlockCrusader  [author] Oct 6, 2023 @ 8:01am 
@andro951, ok, thx for testing and the info. This should help me with making those changes once I get to them.
andro951 Oct 6, 2023 @ 7:40am 
I did test with Last Prism last night, and it deals normal damage with the patch. I commented out my "patch" and lowered the damage of last prism to 5, and it was still doing 200+. The way I track the damage bonus is by storing the multiplier on a global item that applies to all weapons, then just multiplying the damage they deal by the multiplier.

I just looked in tModLoader for all references of ContinuouslyUpdateDamageStats and it's related obsolete ContinuouslyUpdateDamage, and it is a tMod property. There aren't any vanilla weapons that use it. I think Last Prism's ai was just made very strangely since it boosts its damage when all beams collide, and doesn't use the damage stat in the calculations.
BlockCrusader  [author] Oct 6, 2023 @ 6:23am 
@andro951 (Continued), I think what I'll do in the future is, if I can figure out adding the patch to my mods individually, I'll keep this one as is on the side in case players find it useful for some other mods. Then again, that doesn't solve the compatibility problem you've described, but at the same time I dunno if I could blacklist certain mods' adjustments on this mod's side of things alone.

As for Last Prism, I think it may be covered by this mod already? Any projectiles with 'ContinuouslyUpdateDamageStats' set to true should be covered alongside minions/sentries, so that might catch Last Prism. I'll have to check and make sure some time.
BlockCrusader  [author] Oct 6, 2023 @ 6:19am 
@andro951, thx for letting me know. Atm the mod didn't single out my own mods for two reasons; first, I didn't realize some other mods (Such as your own) already had this patch built-in and figured it might be nice for some users to have, and second, my initial attempts to individually build-in the patch to each of my mods caused even worse problems because I wasn't able to just capture each singular mods' adjustments, so the result ended up applying all the boosts like 3 times at once which instantly made minions hit wayyy too hard. Obviously such a thing is possible since you do it with your mod, but I'm not exactly sure how to do it myself.
andro951 Oct 5, 2023 @ 9:26pm 
Fixed this mod conflicting with Weapon Enchantments since I apply the damage bonus from my mod to minion damage manually.

I suggest changing this mod to only affect the damage bonuses from your mods instead of trying to fix it for every mod to prevent conflicts like this or at least adding a config to allow the option.

FWI, Last Prism has the same issue of not updating damage like minions. Please let me know if you decide to add support for it so I can bypass mine when this mod is enabled.
BlockCrusader  [author] Sep 16, 2023 @ 3:06pm 
@MercuryDoll, it's actually either weapon or player. It's a very confusing topic because it's a singular method of adjusting damage (There are multiple ways in most cases...) that causes problems.
MercuryDoll Sep 16, 2023 @ 2:13pm 
So from what i get this mod is necessary we use a mod that dynamically changes the WEAPON's stats directly instead of the player's (class) stat? This is good to know, i'll keep this mod in mind
professional clown Sep 11, 2023 @ 10:43pm 
i didn't understand anything, but it's very interesting
BlockCrusader  [author] Sep 11, 2023 @ 9:52am 
@The Spot, not really, since it's a bug with a certain 'function' used by tML mods.

Here's the simplest I can come up with;

Some mods add features that allow weapon damage to scale; a lot of leveling mods do this. However, due to how minions and sentries work, they are unable to receive modifications to their damage in this manner (Though their tooltip will display adjusted damage).

This mod offers a fix to that bug by trying to find those modifications made by mods, and manually adding them unto the minion/sentry's damage.
This isn't perfect because it only gets the adjustment at the point in time when the minion/sentry spawned. If the modification changes afterwards the minion won't update accordingly until you spawn a new one.
Dr. Gregory House Sep 11, 2023 @ 9:27am 
can you explain what this does in a more layman way?
BlockCrusader  [author] Sep 11, 2023 @ 8:55am 
@AskaHope, basically the issue is too complex to make a flawless solution. Working with 'OriginalDamage', which controls the damage of minions and stuff, is a very finicky matter.
AskaHope Sep 11, 2023 @ 7:24am 
Is there a TL;DR for why this patch is not into the core mod?
Jonte Sep 10, 2023 @ 10:39pm 
This is much needed; I'm doing a summoner playthrough! Sadly that playthrough is on 1.4.3...
Omega Sep 10, 2023 @ 2:35pm 
A much needed patch for a much needed class. (I like summoner lol so I use it often) Thanks!
MLPMDog Sep 9, 2023 @ 12:02pm 
If its put in a collection and people sub to it it counts as a sub and not a view. ^>^
BlockCrusader  [author] Sep 9, 2023 @ 11:47am 
I just notice this thing has over 4K subs and more subs than views somehow. Thanks for all the support everyone, I hope this mod is helping ya'll out.
MLPMDog Sep 9, 2023 @ 11:41am 
I KNEW I WASNT GOING CRAZY! THANK YOU!!!
Moka_Flare Aug 28, 2023 @ 8:51pm 
this will be useful, thank you.