Piercing Mechanics Fix Plugin

Mail

Official Terrarian
I made a Terraria Tweaker 2 Plugin (for 1.4.1.2) to fix the vast majority of bugs in Terraria related to weapons or projectiles being unable to deal damage.

The problem with piercing weapons is that they tend to completely block other weapons from dealing damage.

Please give feedback on my changes and let me know if this plugin is on the right track.

Common problems this mod is meant to solve:

If you hit a minion with a boomerang or melee weapon, your summons and most types of magic stop doing damage temporarily. Bees can completely block the player from dealing damage with most types of magic, minions, and melee weapons. The problems with combining weapons are endless. Only a small selection of mostly endgame weapons were chosen to recieve fixes by the developers. Most older weapons have serious problems and will additionally prevent damage from being dealt by "fixed" weapons.

Known problems not fixed by this mod:

Shield of Cthulhu dash, solar flare armor dash, mount dashes, and slime bouncing still cause global immunity. Solar Eruption has an ugly hack that simultaneously gives global and local immunity with two different cooldowns, probably to prevent the explosion from dealing damage at the same time as the weapon itself. The behavior is broken so there is no obvious correct fix so it has been left unchanged for now. Currently with Solar Eruption you want to avoid hitting the target you want to deal the most damage to directly, otherwise it might not take damage from any of the explosions.

Immunity types explanation: (From worst to best.)

Global Immunity:
Each enemy has one damage cooldown per player.
All damage using global Immunity shares a single damage cooldown. Everything using global immunity can interfere with everything else using global immunity. Early in Terraria's development this was the only immunity type so most weapons use it. This setting is the bad old behavior from before "better" immunity types were added. It appears that many hand swung melee weapons only support this immunity type in vanilla Terraria. Global immunity is extremely problematic because it will also block static and local immunity type projectiles from dealing damage. Global immunity needs to be eliminated from the game as much as possible, yet hundreds of these remain.

Static Immunity: Each enemy has one damage cooldown per projectile type.
Each projectile type using static Immunity shares a single damage cooldown. This immunity type allows only one of each projectile to hit each enemy at a time. This is in theory intended for projectiles that have many projectiles overlapping and would deal way too much damage if they could all hit at once, but most weapons that have that problem still use global immunity. Currently this immunity mode is barely used, and is mostly relevant for a small number of summon minions. This setting undermines summoner single target dps by preventing multiple minions of the same type from dealing damage to a single target. Which minions have this setting is completely arbitrary, inconsistent, and in no way communicated by the game.

Grouped Static Immunity: Each enemy has one damage cooldown for a group of projectile types.
This is a special plugin feature not supported in the base game. This feature allows weapons that spawn multiple projectile types to deal damage similarly to as if it had global immunity with the one exception that it does not block unrelated weapons from dealing damage.

Local immunity: Each enemy has one damage cooldown per projectile.
With local immunity, many projectiles of various types can deal damage at the same time, but they will still be interrupted by other projectiles that use global immunity. This immunity type never blocks other sources of damage, but allowing weapons that produce large numbers of projectiles to deal damage with all of them at once breaks balance for weapons balanced around another immunity type.

No Immunity: Projectiles that don't penetrate enemies and aren't explicitly configured to use static or local immunity won't trigger any of these cooldowns, and can deal damage even when any other immunity is active. Non-piercing ranger weapons are common this category.


Mod Changes:

For starters, The unused first static immunity slot is now used for melee weapon immune times. With this mod, melee weapons that used to use global immunity can always deal damage! Slow swinging melee weapons won't reduce minion dps either. I won't list every weapon this influences but this includes almost all broadswords, pickaxes, and axes.

==These were global immunity weapons with custom immune times. A special fix gives them static immunity instead.
MagicMissile (8)
ExplosiveBullet (5)
Tempest (20)
Typhoon (6)
Electrosphere (8)
SpiritFlame (5)
LastPrismLaser (5)
Arkhalis (5)
Terragrim (5)
PiercingStarlight (4)
CandyCorn (7)
NailFriendly (1)
MechanicWrench (7)
CombatWrench (7)
NebulaBlaze1 (5)
NebulaBlaze2 (5) making these independent allows the Nebula Blaze Ex shot to always deal damage!

--Meteor Staff makes 3 projectile types that change from global to Grouped Static Immunity
Meteor1 (5)
Meteor2 (5)
Meteor3 (5)

--Stynger and fragments change from global to Grouped Static Immunity
Stynger (7)
StyngerShrapnel (7)

== These projectiles go from global to local immunity with the default immune time (10 frames or 1/6 of a second).
Shuriken
UnholyArrow
JestersArrow
EnchantedBoomerang
Starfury
FallingStar
Flamarang
GreenLaser
Harpoon
Bomb
Dynamite
Grenade
ThornChakram
StickyBomb
HellfireArrow
DarkLance
Trident
ThrowingKnife
Spear
WoodenBoomerang
PoisonedKnife
CobaltChainsaw
MythrilChainsaw
CobaltDrill
MythrilDrill
AdamantiteChainsaw
AdamantiteDrill
MythrilHalberd
EbonsandBallGun
AdamantiteGlaive
PearlSandBallGun
PurpleLaser
MagicDagger
CursedFlameFriendly
CobaltNaginata
Gungnir
LightDisc
Hamdrax
IceBoomerang
UnholyTridentFriendly
FrostBoltSword
EmeraldBolt
RubyBolt
DiamondBolt
MushroomSpear
RocketI
ProximityMineI
RocketII
ProximityMineII
RocketIII
ProximityMineIII
RocketIV
ProximityMineIV
TheRottedFork
CannonballFriendly
Flare
PossessedHatchet
PalladiumPike
PalladiumDrill
PalladiumChainsaw
OrichalcumHalberd
OrichalcumDrill
OrichalcumChainsaw
TitaniumTrident
TitaniumDrill
TitaniumChainsaw
FlowerPetal
ChlorophytePartisan
ChlorophyteDrill
ChlorophyteChainsaw
SporeCloud
ChlorophyteOrb
ChlorophyteJackhammer
BoulderStaffOfEarth
GolemFist
IceSickle
BoxingGlove
Bananarang
ChainKnife
DeathSickle
LostSoulFriendly
PaladinsHammerFriendly
FrostBlastFriendly
BlueFlare
BloodyMachete
Stake
StarAnise
FruitcakeChakram
RocketSnowmanI
RocketSnowmanII
RocketSnowmanIII
RocketSnowmanIV
NorthPoleWeapon
NorthPoleSpear
CrimsandBallGun
PulseBolt
FrostBoltStaff
ObsidianSwordfish
Swordfish
SawtoothShark
SpiderEgg
Anchor
StickyGrenade
Flairon
VortexChainsaw
VortexDrill
NebulaChainsaw
NebulaDrill
SolarFlareChainsaw
SolarFlareDrill
ScutlixLaserFriendly
LaserDrill
InfluxWaver
ChargedBlasterCannon
ChargedBlasterLaser
StickyDynamite
BoneArrowFromMerchant
CrystalDart
ChainGuillotine
Hellwing
FlyingKnife
ShadowFlameArrow
ShadowFlameKnife
Meowmere
StarWrath
JavelinFriendly
ButchersChainsaw
BouncyBomb
BouncyGrenade
BombFish
FrostDaggerfish
IchorSplash --Bladetongue
NurseSyringeHeal
ClothiersCurse
PartyGirlGrenade
MinecartMechLaser
AmberBolt
BoneJavelin
BoneDagger
SolarFlareRay -- unused?
SolarCounter -- Dash from Solar Flare armor?
StardustDrill
StardustChainsaw
StardustCellMinionShot --don't think this is needed
StardustGuardianExplosion --pretty sure this was removed from the game!
Daybreak
BouncyDynamite
DD2SquireSonicBoom
DD2ExplosiveTrapT1
DD2ExplosiveTrapT2
DD2ExplosiveTrapT3
FallingStarSpawner
ThunderSpear
ScarabBomb
ClusterRocketI
ClusterMineI
ClusterRocketII
ClusterMineII
WetRocket
WetMine
LavaRocket
LavaMine
HoneyRocket
HoneyGrenade
HoneyMine
MiniNukeRocketI
MiniNukeMineI
MiniNukeRocketII
MiniNukeMineII
DryRocket
DryMine
GladiusStab
ClusterSnowmanRocketI
ClusterSnowmanRocketII
WetSnowmanRocket
LavaSnowmanRocket
HoneySnowmanRocket
MiniNukeSnowmanRocketI
MiniNukeSnowmanRocketII
DrySnowmanRocket
BookOfSkullsSkull
RulerStab
Shroomerang
ZapinatorLaser
JoustingLance
ShadowJoustingLance
HallowJoustingLance
ZoologistStrikeGreen
WetBomb
LavaBomb
HoneyBomb
DryBomb
OrnamentStar
DirtBomb
DirtStickyBomb
DripplerFlailExtraBall
ZoologistStrikeRed
SantankMountRocket
PrincessWeapon
DemonScythe --less certain about this one, it is a buff to move it to local immunity.

==these projectiles get local immunity but are allowed to hit each target only once
CopperShortswordStab
TinShortswordStab
IronShortswordStab
LeadShortswordStab
SilverShortswordStab
TungstenShortswordStab
GoldShortswordStab
PlatinumShortswordStab

==problematic weapons that would gain DPS from overlapping projectiles get moved from global to static immunity
Bee
GiantBee
Wasp
SpikyBall
WaterBolt
RainFriendly
BloodRain
InfernoFriendlyBlast
WaterStream
Flames -- flamethrower
GoldenShowerFriendly
ShadowBeamFriendly
ClingerStaff
SoulDrain
CursedDartFlame
ShadowFlame --shadowflame hex doll
Spark --wand of sparking and chainsaw
ClusterFragmentsI
ClusterFragmentsII
ClusterSnowmanFragmentsI
ClusterSnowmanFragmentsII
MedusaHeadRay
DemonScythe
SuperStarSlash --hundreds of these can be spawned in a single shot!

==These weapons go from Global Immunity to Grouped Static Immunity. Groups of projectile types share iFrames. This feature was not supported in the base game.

--yoyos to share iFrames with counterweights
Code1
WoodYoyo
CorruptYoyo
CrimsonYoyo
JungleYoyo
Cascade
Chik
Code2
Rally
Yelets
RedsYoyo
ValkyrieYoyo
Amarok
HelFire
Kraken
TheEyeOfCthulhu
BlackCounterweight
BlueCounterweight
GreenCounterweight
PurpleCounterweight
RedCounterweight
YellowCounterweight
FormatC
Gradient
Valor
Terrarian
TerrarianBeam

--Vilethorn
VilethornBase
VilethornTip

--Rainbow Gun
RainbowFront
RainbowBack

--Magical Harp
QuarterNote
EighthNote
TiedEighthNote

--Nettle Burst
NettleBurstRight
NettleBurstLeft
NettleBurstEnd

--Molotov Cocktail
MolotovFire
MolotovFire2
MolotovFire3

--Crystal Vile Shard
CrystalVileShardHead
CrystalVileShardShaft

--Toxic Flask
ToxicCloud
ToxicCloud2
ToxicCloud3

--Spore Sac
SporeGas
SporeGas2
SporeGas3

==switch from static to local immunity
BabySlime
ImpFireball
Retanimini
Spazmamini
VenomSpider
JumperSpider
DangerousSpider
DeadlySphere
VampireFrog
VolatileGelatinBall
FlinxMinion
MiniRetinaLaser

Note that changing this allows all minions to deal damage consistently which allows the player to effectively summon than 3 spiders and more than 1 of the rest of the listed minions. Clearly a buff but the default behavior was embarrassingly inconsistent, so the risk of inbalance is my choice here.

edit: updated to 0.3.1.1
 

Attachments

  • PiercingFix.cs
    19.2 KB · Views: 136
Last edited:
Back
Top Bottom