Elemental Combat

Elemental Combat

24.6k Downloads

CAUTION WITH ANY RELEASE BELOW 1.2 (I was a novice and made some unstable versions back then)



Hello!

Goal of this mod is to enhance the combat system by adding elemental and style properties to the combat. This means, that players, mobs and items all have new attack and defense properties, with most of them defined through a datapack and hence easy to change. Upon hitting some target, these properties will be checked and a new damage value will be calculated. New particles will tell you, how the target reacted to the attack.

I made this mod, because I noticed, that in a lot of modpacks you end up using the same weapon all the time. With this mod I hope there is an incentive to switch your weapon and armor depending on the monster you are about to fight.

I made a short YouTube video that gives a nice overview of the features (My first ever YouTube video. Please no hate, lol). See below, if you want a summary in text form.

Any attack has 2 new properties: element and style. On hit these properties are checked against the two new defense properties (one for element and one for style) of the target and a multiplactor will be calculated for each property. While the factor for style is capped at 0 (meaning no damage will be dealt), the factor for element can be negative, which will result in healing the target.
To compute the scaling I use a similar computation as the vanilla Enchantment Protection Factor-System. This means, that both of the scalings are computed via 1-(factor/maxFactor). You can read my code here.


The mod comes with predifined styles and elements. The elements are Fire, Ice, Water, Thunder (aka Lightning), Darkness, Light, Wind, Earth, Flora and Normal (the default value) and the styles are explosion, projectile, slash, stab, magic, punch (the default value) and environment (used for damage like drowning and so on). As you might have guessed I overwrote the behaviour of the vanilla enchantments so they will use my system instead. In addition I added new enchantments so you have more flexibility from the get go.
There are some server-configs. which gives the default element and style a value. Also the maxFactor can be changed here.

Every item, mob, projectile and natural damage source (like drowning and suffocating in a wall) has base attack properties which I defined through json files. This means, that they can be overwritten by datapacks. In theory it is possible to define that drowning deals fire damage. It is also possible to add completly new elements or styles through datapacks. However one needs to supply a resource pack, that includes an icon for the new element/style. Otherwise the 'missing resource' image (the black and purple square image) will be shown. Another nice feature is that one can supply a datapck that has files for items/mobs and so on from other mods. This means, that you can addproperties to the items from Botanica for example.
If you are a modpack creator, that wants to use this feature, you should also add Global Data- & Resourcepacks to your modpack. I also started to create datapacks for beloved mods that can be downloaded from my github repository. Any balance feedback is much appreciated here.

In addition to the static base properties (the ones that are can be defined through the datapack) the mod also provides an API that allows more dynamic behaviour. To showcase the power of the API I made a second mod Elemetal Combat - Weaponry, that add a style switching weapon, an element switching sword, an biome depending armor and some other fun stuff too. (However this mod is not balanced at all. I just played around with the elemental combat api to test it)

Best regards, Tavi007.

PS: I do not plan on backporting it. But I will try to update the mod to newer versions!