tModLoader Elemental Weapon Enhancements

WOW, this looks incredible.
Thanks. It might be best to wait for next version, because things will be much easier.
*cough* let me showcase it
Code:
                    // Create a new 'Earth' Element, the CreateElement method returns the type of the newly added element.
                    // If something went wrong, it will return -1
                    int earth = ElementalFramework.CreateElement(this, "Earth", Color.RosyBrown);
                    myElements.Add(earth); // add our index so we can use it in other classes such as our accessory
                    // Add our custom behaviour to our element
                    ElementalFramework.CreateOnHitBehaviour(earth, new ElementalFramework.Behaviour.OnHitNPC(EarthOnHitNPC), null, new ElementalFramework.Behaviour.ProjectileOnHitNPC(EarthProjectileOnHitNPC));
                    // Add our custom damage calculation to our element
                    ElementalFramework.ModifyDamage(earth, new ElementalFramework.Info.CalculateDamage(EarthDamageCalc));
                    // Misc
                    ElementalFramework.SetWeight(earth, 200); // Our element has twice the chance to roll (default weight: 100)
                    ElementalFramework.CreateDisplayName(earth, "earth"); // just to showcase this method :P
 
Off-topic: I might introduce this in my modpack when the next update's up...wonder if the mob elemental resistances are changeable with other mods too?
on-topic: I approve of this mod.
 
My character crash when I enable the mod.

Unable to read beyond the end of the stream.
at System.IO.BinaryReader.ReadByte()
at System.IO.BinaryReader.Read7BitEncodedInt()
at System.IO.BinaryReader.ReadString()
at ElementalWeaponEnhancements.ElementalItem.LoadCustomData(Item item, BinaryReader reader) in c:\Users\Admin\Documents\My Games\Terraria\ModLoader\Mod Sources\ElementalWeaponEnhancements\ElementalItem.cs:line 89
at Terraria.ModLoader.IO.ItemIO.ReadCustomData(Item item, Byte[] data, Boolean hasGlobalSaving)
 
Typo detected, posting..
5992eec8ff.png
 
This is really cool! Definitely has potential when combined with other mods.
In fact, I might end up adding some elemental accessories to Miscellania at some point.:D

Also, I noticed that you use Github to host the .tmod file. I just wanted to mention that Github has a Releases system, and it works much better than just storing the .tmod file in your repository. It'll allow you to host all versions of your mod (with changelogs, too) instead of just the latest one. So if you accidentally break something really really badly in the new version, users can download an older version while you fix the nasty bug. :)

And FYI you can create a link that always points to the latest release. Hopefully that was helpful!

Oh, and another thing. I think you shouldn't move the 4 basic elements into an example/test mod or whatever. That would make it difficult to have mod compatibility (instead of just one mod adding Fire damage we'll end up with multiple mods trying to add the same element which will cause lots of confusion).
 
Last edited:
This is really cool! Definitely has potential when combined with other mods.
In fact, I might end up adding some elemental accessories to Miscellania at some point.:D

Also, I noticed that you use Github to host the .tmod file. I just wanted to mention that Github has a Releases system, and it works much better than just storing the .tmod file in your repository. It'll allow you to host all versions of your mod (with changelogs, too) instead of just the latest one. So if you accidentally break something really really badly in the new version, users can download an older version while you fix the nasty bug. :)

And FYI you can create a link that always points to the latest release. Hopefully that was helpful!

Oh, and another thing. I think you shouldn't move the 4 basic elements into an example/test mod or whatever. That would make it difficult to have mod compatibility (instead of just one mod adding Fire damage we'll end up with multiple mods trying to add the same element which will cause lots of confusion).
Ty for the tip. I'll look into it.... sometime... maybe... ever....
 
I really like this mode, but how can i (if i can) change the chance of getting elemental damage from 25 to 10 (for example) and change the price of 2 medallions from 5 to 25 (it will be more balanced for my opinion).
P.s: This mod is really great.
P.s.s: Sorry for my bad english.
 
I really like this mode, but how can i (if i can) change the chance of getting elemental damage from 25 to 10 (for example) and change the price of 2 medallions from 5 to 25 (it will be more balanced for my opinion).
P.s: This mod is really great.
P.s.s: Sorry for my bad english.
Still need to figure out how to allow custom chances.
The medallions will move to the example mod, and go out of the framework mod. (just to show how those things can be done)
 
When you first pick up an item, there's a 25% chance to get any element. This can only happen once. This means you can drop items you already own once for a chance. If you do not succeed getting one, each reforge also has a 25% chance to obtain an element. Also, the same chance applies for crafting an item.
Hi there,

while its indeed possible to get items with elements via first pick up and crafting it seems its impossible to get them via reforging
i spend around 100 gold on modded and unmodded early weapons like wand of sparking (only with atleast 10 damage so i dont miss the 10% roll) and didnt got any element while i got one with element via crafting
 
The mod has update to v0.0.5 prealpha
Go to this release here or use this (latest)
The mod now has a much more dynamic framework, making custom elements and behaviour easier.

Bug fixes:
  • Custom damage calculation not working
  • Reforging now reforges the element
  • Element identifiers are now actually unique (md5 hashed in GUID)
 
umm cunfused i installed the mod i hae these 2 elenmt items idk what to do with them pls help me ;-;
The element shifter changes the item's element type in your first hotbar slot to a new type. The chronic shifter changes the damage. (as if you roll it anew)
The item needs to have an element in the first place though. This mod itself does not add any elements, either your mod needs to do that or another mod needs to.
Here you can see an example mod that adds some elements: https://github.com/gorateron/Elemen.../download/v0.0.5-prealpha/ElementalTestMod.cs
 
Hey, I found a bit of an issue, the custom damage calculation doesn't seem to work when elements are created initially on weapons. To get the correct values, you have to use the Chronic Shifter to set the damage.

For example, I have an Earth element that should be 5-35% of damage, and a Giga element that should be 50-100% of damage. But both of these elements give around the same damage when first generated. Once I used the Chronic Shifteron them both, however, it was clear what the expected damage value would be.

Hopefully this can be fixed, as all elements are currently giving the same initial damage range!
 
Hey, I found a bit of an issue, the custom damage calculation doesn't seem to work when elements are created initially on weapons. To get the correct values, you have to use the Chronic Shifter to set the damage.

For example, I have an Earth element that should be 5-35% of damage, and a Giga element that should be 50-100% of damage. But both of these elements give around the same damage when first generated. Once I used the Chronic Shifteron them both, however, it was clear what the expected damage value would be.

Hopefully this can be fixed, as all elements are currently giving the same initial damage range!
I'm pretty sure I fixed that bug already. What version are you using?
 
So we can make our own type of damage, with our own outing? Glass Cannon finally possible in Terraria? This is one of the best mods out there, really.
 
So we can make our own type of damage, with our own outing? Glass Cannon finally possible in Terraria? This is one of the best mods out there, really.
Yes, you can make your own damage type. It's added on top of the regular damage though. I might also make a seperate feature that allows the custom damage to be in place of the regular damage.
 
Back
Top Bottom