JackysExplosion - Immersive Explosion for v3.4

JackysExplosion - Immersive Explosion for v3.4

Update the explosion block damage mechanics. Now damage progresses through destroyed blocks, instead of only targeting blocks in free line of sights and stopping at layer 1.

[size=4][b]Description[/b][/size]
[color=#D4D4D8]Update the explosion block damage mechanics. Now damage progresses through destroyed blocks, instead of only targeting blocks in free line of sights and stopping at layer 1.[/color]

I did not like the explosion system in the base game, since they felt underwhelming and unrealistic.
So I had the idea to write a small update to the Explosion::AttackBlocks() function (replace), in order to update its mechanics:

[list]
[]Basically it calculates the shortest direct paths (block rays) and see which blocks can be targeted within its radius.[/]
[]Then it simulates if the block are still present after damage is dealt and blocks the damage to others blocks hiding behind the targeted block (last part is like vanilla). [/]
[]But if the blocks gets destroyed, now the explosion can travel further and target blocks behind it (different like in the vanilla game). [/]
[]Distance decreases the explosion damage, as well as the explosion-resistance attribute of the blocks material.[/]
[]Further, all blocks slightly decrease the damage to blocks behind them, after they are destroyed. The explosion-resistance plays a role here as well![/]
[/list]
In addition I added a template preperation for the most used materials and items entries used for explosion relevant calculations and effects, like "BlockDamage", "EntityDamage", "RadiusBlocks", "RadiusEntities", "ParticleIndex", "explosionresistance", "Hardness" and "MaxDamage".
So users can quickly update their xml configurations for blocks and explosive items and adjust the destructiveness.
Base values should be the vanilla ones!

The Mod uses the Harmony-framework and some simple xml edits.

[size=4][font=Arial][b]Some notes related to AI usage[/b][/font][/size]
This mod was assisted by ChatGPT who handled most of the coding parts for this mod (vibe coded). This was my first experiment for vibe coding a small modification.
Planning, ideas and the creation of other related files was done by me.

[size=4][b]Installation instructions[/b][/size]
[size=3][color=#D4D4D8]Put the contents of the mod in your "<7d2d>/Mods"-directory. [/color][/size]
[size=3][color=#D4D4D8]Start the game without EasyAntiCheat.[/color][/size]
[size=3][color=#D4D4D8]For servers: both clients and server needs the modifications![/color][/size]

[size=4][b]Requirements[/b][/size]
[size=4][b][color=#00ff00]7d2d V3.4[/color][/b][/size]
I build it for the recent version 3.4 of 7d2d, which also includes the 0Harmony.dll and LogLibrary.dll libraries, so you dont need anything more.
Might even work on older 3.* versions!

[size=4][b]Shout outs[/b][/size]
[color=#D4D4D8]Community Modding [url=https://7d2dmodding.wiki.gg/wiki/Harmony_Patch_Targets]Wiki[/url],[/color]
[size=3][color=#D4D4D8]ChatGPT Free Version lol[/color][/size]