• PC NEWS: 1.4.2.3 update is out! More info here. Report bugs here
  • Journey's End on Xbox and PlayStation!: Get all the info by clicking here. A new patch is in QA - expect some Gamepad love, the return of Red's Pick and more. Click here for Known Issues and FAQ. For any other bugs, report them (with as much detail as possible) here.
  • MOBILE NEWS: Stay up to date with the latest mobile news here. Report mobile bugs here

tModLoader Elemental Weapon Enhancements

Jofairden

Duke Fishron
tModLoader
Notice! I stopped production! Shockah is working on something very promising (an affix mod) which can do much more than just this! Also, it is a lot of work to create something like this, and I do not have such time as I need to invest all free time I have into negadium! Thank you for understanding!

Elemental Weapon Enhancements

Adds secondary weapon damage support! Allows for custom damage elements!
af108f0214264eb2886b1aa44e202da6.png
f3741a185c9a4757a706e775aace0d3a.png
163e894d66d34005b6dcdcebcdfd359e.png
ba449bb4542c42d8b8c64d4b1849b864.png
Download this mod
Mod Site

Latest version: 0.0.5.1-prealpha
Author(s): @Gorateron
Want to help develop this mod? The source is available on GitHub. HMU if you want to join!

About this mod

This mod is a dynamic framework that allows other mods to add their own elemental damage types.
These damage types can be rolled on any weapon that functions as an additional damage source for that weapon.
Elements can have their own custom behaviour!

How to work with this mod?

I am creating a wiki as we speak, please wait a moment!
You can attach the .dll in the release as a reference in your mod project, then browse through 'ElementalFramework'
There's also an ElementalTestMod.cs example file that shows how to do things.

What is custom behaviour?

Custom behaviour allows you to control how your custom element(s) behave.
For example, the ElementalTestMod.cs file adds an element called 'Fire' which inflicts the On Fire! debuff on enemies!

What are the medallions sold by the merchant?

These medallions are mainly examples on how you can work with the framework.
The Chronic Shifter changes the damage value of element on the weapon
The Element Shifter changes the element type on the weapon
Please note that these medallions only alter the weapon that is located in your first hotbar slot (slot numbered '1')
These medallions will move out of the framework and into the test mod along the way.

Final words

Thanks to @Willsm for the medallion sprites.

Change log

v0.0.5.1-prealpha
  • Fixed dropped items always getting an element
v0.0.5-prealpha
  • Custom damage calculation not working
  • Reforging now reforges the element
  • Element identifiers are now actually unique (md5 hashed in GUID)

To-do
  • NPC resistances
  • Custom blacklists
 
Last edited:

Mechantera

Official Terrarian
Well, the obvious next step is to implement weaknesses and resistances. For example, jungle mobs are weak to fire but resist water and earth, sky mobs are resistant to earth, but weak to water, underworld mobs are weak to earth and water, but resist air and fire, ocean mobs resist fire and water but are weak to air. Mix that up as you will, I probably did this wrong.
 

Jofairden

Duke Fishron
tModLoader
Well, the obvious next step is to implement weaknesses and resistances. For example, jungle mobs are weak to fire but resist water and earth, sky mobs are resistant to earth, but weak to water, underworld mobs are weak to earth and water, but resist air and fire, ocean mobs resist fire and water but are weak to air. Mix that up as you will, I probably did this wrong.
Yup, that is one of the next steps.
 

neoselket

Ice Queen
this looks really cool! thinking about adding it to my modpack. a few suggestions i have would be to make certain mobs have invulnerability/resistance to certain elements and weaknesses to others, as well as adding a few more elements:
ice
shock/lightning
dark
light
unholy(corruption/crimson)
holy(hallow)
also, certain weapons could have a higher chance to get certain elements, for example water bolt gets water damage but a much lower chance for fire damage, etc. also, i think the chance to get elemental damage should be lowered, and not changeable by dropping and picking up. otherwise, looks pretty good!
 

Jofairden

Duke Fishron
tModLoader
this looks really cool! thinking about adding it to my modpack. a few suggestions i have would be to make certain mobs have invulnerability/resistance to certain elements and weaknesses to others, as well as adding a few more elements:
ice
shock/lightning
dark
light
unholy(corruption/crimson)
holy(hallow)
also, certain weapons could have a higher chance to get certain elements, for example water bolt gets water damage but a much lower chance for fire damage, etc. also, i think the chance to get elemental damage should be lowered, and not changeable by dropping and picking up. otherwise, looks pretty good!
I think it could be better if some weapons just had a set element attached to them. A Water Bolt would always be water, A Flamelash always fire, etc.

But normal weapons like Harpoons and Muskets could have any element.
In the next update, it will be possible to add your own custom element types. It is possible to only have a chance of getting element damage ONE time it is dropped by a mob, and then having a chance when reforging it. The next update also adds a chance to get it when an item is crafted.
Behold, custom damage types:
(don't mind the 0 dmg, it was a bug)

quick note: framework changed quite drastically, the way to add and modify elements and modifiers will be slightly different.
 
Last edited:

Link2411

Terrarian
How about making Elemental Damage deals extra damage to the element that it counters. Like in Pokemon or something. It might be a little too much to ask for though.
 

Jofairden

Duke Fishron
tModLoader
How about making Elemental Damage deals extra damage to the element that it counters. Like in Pokemon or something. It might be a little too much to ask for though.
All interesting ideas, but the plan is to allow for custom elements and custom behaviour
 

Jofairden

Duke Fishron
tModLoader
New version! Updated to 0.0.3
In this version you can easily create your own custom elements, see the example in the thread on how to do so!
You can also go here to see how the examples work in action. To review changes, go here.
With this update, I completely made a new framework from scratch to allow for more customizability.
Tentative plans are to implement a resistance system (X mob or player has X resistance, thus reducing the damage they take from that element) and custom behaviour.
If you feel like helping me with this project, feel free to PM me. I'm looking for 1 or 2 good programmers willing to help ;)
 

Kami

Terrarian
Hey!
Dont forget to make this mod compatible with the EnemyMods, wich add a bunch of prefixes to enemies.
I mean, it whould be cool to see an interaction.
+1, gonna follow this mod, looks great.
 

Jofairden

Duke Fishron
tModLoader
Hey!
Dont forget to make this mod compatible with the EnemyMods, wich add a bunch of prefixes to enemies.
I mean, it whould be cool to see an interaction.
+1, gonna follow this mod, looks great.
I don't see why it wouldn't be compatible right now.
 

Jofairden

Duke Fishron
tModLoader
I want you guys to know progress is going great. In the next update, custom behaviour will be supported. This means you can do your own custom things in a custom OnHitNPC method for example. (just like your normally would)
 

Jofairden

Duke Fishron
tModLoader
Version 0.0.4 update!
Hooray, the first bits of custom behaviour are now possible! Currently supports: OnHit hooks and ModifyHit hooks, including those for projectiles.
Check out ElementalTestMod.cs to see how it's done.

A few new calls were added: GetElementType and GetModElements (and possibly more that I have forgotten)

I highly advise you checkout ElementalTestMod to see how custom elements and behaviour are done, the thread might no longer be up to date.

Plans for 0.0.5:

  • Implement NPC resistances
  • Allow custom damage calculation?
  • Allow custom rules on getting the element?
  • Move 4 standard elements (Earth, Water, Air, Fire) from the framework to the ElementalTestMod as examples
  • New framework. No more ugly Calls blabla, provide a .dll as reference and call methods from there. (much easier element / behaviour implementation)
 
Last edited:
Top Bottom