tModLoader Need help with modding - increasing damage on a type of ammo

galaximadi

Official Terrarian
I was wondering how to increase the damage on a type of ammunition, but an ammo type that doesn't have accessories that benefit this - darts. How would I go about making armor and accessories that benefit ONLY darts/dart weapons? Thanks.
 
Are these the vanilla Terraria darts that are shot by the blowgun, dart rifle, etc?

You could edit the vanilla weapons, and I believe you can override the Shoot method to instead shoot a stronger type of dart (this would be custom ammo) if a certain accessory is equipped. The accessory would set a player variable then you'd check for it with the weapon inside of Shoot. Sort of like how the Molten bow will convert wooden arrows to flaming arrows.

The other method would be a custom damage class, here's an example - tModLoader/ExampleMod/Items/ExampleDamageClass at master · tModLoader/tModLoader

There are probably other ways to do this, but hopefully someone else can chime in too.
 
Are these the vanilla Terraria darts that are shot by the blowgun, dart rifle, etc?

You could edit the vanilla weapons, and I believe you can override the Shoot method to instead shoot a stronger type of dart (this would be custom ammo) if a certain accessory is equipped. The accessory would set a player variable then you'd check for it with the weapon inside of Shoot. Sort of like how the Molten bow will convert wooden arrows to flaming arrows.

The other method would be a custom damage class, here's an example - tModLoader/ExampleMod/Items/ExampleDamageClass at master · tModLoader/tModLoader

There are probably other ways to do this, but hopefully someone else can chime in too.
I'm probably gonna use a custom damage class instead, thank you for answering!
 
Back
Top Bottom