Minion ModifyWeaponDamage Patch
Изображение 1 из 2. Материалы автора из Steam Workshop.
О материале
«Minion ModifyWeaponDamage Patch» — материал мастерской tModLoader. Моды Terraria для tModLoader: новый контент, удобство игры и библиотеки. Для установки откройте оригинал в Steam Workshop, проверьте требования автора и подпишитесь. Совместимость с версией игры редакцией не проверена.
Описание автора
Minion ModifyWeaponDamage Patch
NOTICE: This mod is discontinued, but will remain available on the workshop (for tML v1.4.4.x) for those that have a use for it.
This is a simple mod that fixes a tML bug*****, in which minions, sentries, and other projectiles which continuously update their damage don't scale with their parent weapon/player's damage modifications from mods' usage of the ModifyWeaponDamage hook.
Players:
Just download (Via. subscribing to the Steam Workshop item) and enable this mod and it'll do its thing. You probably only need this mod if you're a summoner playing with a mod(s) that has an issue similar to what is described above.
Modders:
If you utilize the ModifyWeaponDamage hook in your mod, you may want to investigate the damage of minions/sentries and make sure they work fine. If they don't, this mod may fix your problems. This mod is open-source, so feel free to just copy the code instead of depending on this mod. There isn't a public repository (Ex: GitHub), so use tMod's extract function to access the source.
Outline of how the patch works (For Modders):
This mod affects minions, sentries, and any projectile with ContinuouslyUpdateDamageStats set to true. It attempts to find the parent player and item, uses that info to call CombinedHooks.ModifyWeaponDamage and saves the result to a StatModifier. The mod then uses the PreAI hook to re-create vanilla code that updates projectile.damage, and builds in the saved StatModifier from CombinedHooks.ModifyWeaponDamage. To clarify, all of this is done within a GlobalProjectile class.
Compatibility/Multiplayer
Should be compatible with multiplayer and just about every other mod. The only potential for mod incompatibility is if another mod already has its own patch for this bug, or otherwise messes with projectiles that continuously update their damage. My mods already have this mod's effects integrated into them, so there's no need to use it with them!
Disclaimers
Be warned that this is NOT a perfect solution; akin to how minion damage used to 'snapshot' stat boosts on-summon, this workaround will 'snapshot' boosts from ModifyWeaponDamage. This means if ModifyWeaponDamage is used in a dynamic way (Which it often is), minion/sentry damage will be stuck in the state given on-spawn. This means you'll have to re-summon minions/sentries if you want them to update their benefits from ModifyWeaponDamage, and kind of opens up old pre-1.4 damage build 'exploits' but with regard to ModifyWeaponDamage instead of stat boosts.
*****There is no need to report this bug on the tML GitHub; I already have done so! It is not likely to be patched due the complexity of messing with the OriginalDamage varaible, and the complication described in the previous disclaimer. Solving the issue would take more effort than it's worth, considering workarounds like this are possible.
Developed By BlockCrusader
Как установить и запустить
Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.