Skip to content

Explosive Emp

Robin Seifert edited this page Jul 14, 2023 · 1 revision

EMP

Blast that damages and drains electronic blocks in an area

Logic

Will detect blocks using the FE API and drain as much power as possible.

Tiles, entities, and items supporting the API can trigger other actions. Such as missiles falling out of the sky, electronics being disabled, or blocks exploding. It is up to each individual mod and content entry to decide how this works.

Content Interactions

Interaction is limited by what mods are willing to support. ICBM has the policy to not implement support for other mods directly. Instead support has to be implemented in each mod or via an interaction addon.

Content Interaction
Missile Kills flight system causing gravity to take over
Creeper Charges in the same way lighting does
Explosives Kills fuse trigger electronics
Energy Devices Attempts to set energy to zero using UniversalEnergy system. Limit support exists by default.

Config

Name Default Purpose
scale 50 radius of the explosive

Dev Resources

API tools are provided in ICBM to make support easy. Though it is recommended mods do not just implement energy drain logic. Instead stun effects or machine damage is recommended. As this provides more interesting gameplay and avoid players just spamming power generation. Testing in older versions has confirmed players will do this even without EMPs being a concept. When EMPs are in play it gets worse and results in mods like MFFS being nearly immune to attack.

Best way to support EMP is with capability. However, events do exist for non-tiles or soft dependencies. This can also be a great way to do odd effects. Such as generating lighting from metal bars or making vanilla creepers energized.

Each block pathed will fire an event EmpEvent.BlockPre to block interaction. For interaction not blocked CapabilityEMP can be used to customize effects. If not implemented the blast will default to drain energy logic. Partial implementation does exist for interaction handlers. See code for more details.

If inventory support is enabled. Any items exposed to external will be hit as well. Using the same capability mechanics as the blocks.

Entities also can support EMP effects and have their own event EmpEvent.EntityPre allowing for interaction to be blocked.

If either event is blocked any contained items are ignored as well.

Realism vs Fantasy

ICBM is based on fantasy concepts before realism in a lot of cases. This is by design and isn't due to lack of technical understanding. As current and past members have reasonable understanding of the concepts. Including electrical engineering understanding of how EMPs work and research materials found in public records. Showing both actual and theoretical effects of EMPs. Including how this disconnects from fantasy expectations of users. To meet the mod's design goals fantasy is favored over realism.

To understand why it is useful to have a rough understanding of the real version. Real EMPs work by inducing a current in electronics to cause damage. For those without electronics background current is movement of electrons. It is what moves the energy around to power homes and devices. Inducing or rather the act of induction is wireless energy. Though this is a simplification to something most people understand. Is used in a lot of different ways to make devices work. Such as changing voltages, tuning frequencies, and charging your phone wirelessly. This works via magnetic fields and for those interested there are wonderful videos online.

What this means for the EMP is that most devices are rather immune. Not in the sense they will survive a direct hit. Rather the effects are limited at distance. Even being a few 100 meters away can see smart phones survive. Especially if they are not plugged into the wall. Bigger devices can often outright survive if grounded/shielded well. With even cars showing no indication of issues extremely close. What often is actually impacted is larger scale systems such as power lines, substations, and generators. As these have a massive surface area to absorb energy from an EMP. Causing the lines to over charge and blow transformers. Something that often happens in thunder storms for slightly related reasons.

Common effects theorized from EMPs mostly come from nuclear weapons. Which also send out several types of electronic waves. As well can ionize the atmosphere causing wireless signals (radios communication) to fail. It is mostly the electronic waves that cause the EMP effect. With the energy dissipating quickly at distance due to inverse square law. As well can be weakened/stopped with minimal material between devices and the source. Such as a wall, soil (aka mountains) or even just trees.

For those interested a lot of well documented videos, papers, and books exist. Include practical research projects generating small to medium size EMPs. Where devices were placed nearby to see the effects. Not only for weapon research but to better understand the effects. As other events can generate an EMP such as power system failures.

Limited support

Due to FE and RF API not providing direct energy access support is very limited. Attempts have been made to fix this problem. However, makers of Forge's Forge Energy (FE) and Redstone Flux (RF) have rejected change requests. Requesting that we ask each mod or manually PR each mod to add support instead. Noting that each mod should decide to support EMP effects. Which from our view means few mods would consider it. Those that do likely will not implement it beyond some simple interactions. Making this a non-realistic path for a mod so heavily focused on PVP. When most mods that need the interaction are very PVE themed. Pull Requests in Thermal Expansion and other large mods have been rejected. Noting that RF is magic and not energy.

Our only options currently are to manually detect blocks per mod. Doing hacky solutions to access energy storage directly. Such as NBT save editing, reflection, and even ASM. Since this is frowned on by most modders minimal support is added. This is unlikely to change leaving the EMP useless with most mods.

Asking about this is likely to upset members of the ICBM team (Specifically Robin). Due to how painful the interaction was with Forge's team and other modders. Is the reason why mod support in general is extremely limited. As it was one of the driving factors causing development to pause.

History

  • Most mod support was removed at request of other modders and lack of API support
  • Previous version would use reflection and NBT hijacking to bypass energy limits
Clone this wiki locally