# Remotely detonated explosives

**URL:** <https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571>\
**Category:** The Drawing Board\
**Created:** [June 21, 2014, 7:15pm UTC](https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571 "2014-06-21T19:15:32Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![HunterAlpha1](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@HunterAlpha1](https://discourse.cataclysmdda.org/u/HunterAlpha1)\
**Post date:** [June 21, 2014, 7:15pm UTC](https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571/1 "2014-06-21T19:15:32Z")

</div>

'nuff said.

---

<div class="post-metadata">

**Author:** ![HunterAlpha1](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@HunterAlpha1](https://discourse.cataclysmdda.org/u/HunterAlpha1)\
**Post date:** [June 22, 2014, 11:42pm UTC](https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571/2 "2014-06-22T23:42:41Z")

</div>

Ok apparently not, so let me spell it out:

Add an item to the game called detonator, and another called remote. Use the detonator on a C4 explosives which becomes C4 explosives with detonator(active). Drop explosives where needed, move to a safe distance, then (a)ctivate remote.

---

<div class="post-metadata">

**Author:** ![Reaper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/reaper/32/74_2.png) [@Reaper](https://discourse.cataclysmdda.org/u/Reaper)\
**Post date:** [June 23, 2014, 2:56am UTC](https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571/3 "2014-06-23T02:56:33Z")

</div>

Good idea, but i don’t know how to code it.

---

<div class="post-metadata">

**Author:** ![Womble](https://avatars.discourse-cdn.com/v4/letter/w/f4b2a3/32.png) [@Womble](https://discourse.cataclysmdda.org/u/Womble)\
**Post date:** [June 23, 2014, 3:31am UTC](https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571/4 "2014-06-23T03:31:14Z")

</div>

Initially misread as “randomly detonated explosives”. Might be a better idea, tbh.

---

<div class="post-metadata">

**Author:** ![EditorRUS](https://avatars.discourse-cdn.com/v4/letter/e/9fc29f/32.png) [@EditorRUS](https://discourse.cataclysmdda.org/u/EditorRUS)\
**Post date:** [June 23, 2014, 6:00am UTC](https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571/5 "2014-06-23T06:00:58Z")

</div>

> Good idea, but i don't know how to code it.

Using "Charges" variable as storage for ID-numbers?

---

<div class="post-metadata">

**Author:** ![Hague](https://avatars.discourse-cdn.com/v4/letter/h/5f9b8f/32.png) [@Hague](https://discourse.cataclysmdda.org/u/Hague)\
**Post date:** [June 23, 2014, 8:02pm UTC](https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571/6 "2014-06-23T20:02:14Z")

</div>

Perhaps this would be the spot to lay the inevitable groundwork for radios? Create a framework sending packets through different radio frequencies and you can use the PTT on a two-way radio to trigger explosives tuned to the same frequency. I feel like if radios and such are gonna be used for mission environments and common faction interaction, then the radio system could be used as a vehicle for explosives and drones.

Alternately, I believe there is a drone system that works right now. Maybe you could hook your planted explosives into that and you’d use a laptop to trigger them.

I believe you might look at src/enums.h. It’s got a method in there that keeps track of known traps. Seems like it that would be where you’d start to make a map of placed explosives and a function to access their locations. Set a distance on the detonator. If you can match BevapDin’s work with the known traps map, it would be easier to convert when the Z-level issues are straightened out. You’d have to make sure you’re on the same z-level for now, or some other method to make sure the bomb was loaded in the world before it detonates. I guess it is possible to have it detonate off map if you can access the item while it’s unloaded and change it from C4(armed) to C4(active) so that it blows up when the map reloads. The time to detonate would effectively be 1. So it would detonate near-instantaneously.

I recommend making the detonator a weapon mod to the block of C4, dynamite, pipe bomb itself. That way you can have different types of detonators without cluttering up the data files with lots of different recipes and versions of the same explosive. If you add multiple mod slots to your explosives, you can make it so you can have a proximity detonator and a remote detonator an the same explosive. This could also modify the way explosives work currently. You can make a pipe bomb, but now you also need to make a fuse for your explosives. You start with short fuses, combining two short fuses makes a fuse, and two fuses makes a long fuse.

You’d have to change the activation menu to be context sensitive to what’s already attached the explosive. So if a fuse is attached, you’d need a lit fire source to activate the fuse. If the proximity detonator is attached, it will have a prompt to activate it and to set a delay on its proximity sensors’ activation, allowing you to place it and move to safety, or throw the explosive (c4 is pretty stable, it should be safe to throw, adding less-stable explosives, like nitro-glycerin, RDX crystals, is a possibility.) A radio detonator would prompt you to set the frequency of a channel and its tone: Blue, Red, Green, Yellow. This means you can have 4 different chains of explosives on the same frequency and prevents regular radio chatter from detonating the radio. However, people tuned to that radio frequency might hear the tones if the channel were open. Some explosives can’t use the same detonators. C4 can’t use gunpowder timed fuses, and would need a mechanical or digital timed detonator instead.

---

<div class="post-metadata">

**Author:** ![HunterAlpha1](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@HunterAlpha1](https://discourse.cataclysmdda.org/u/HunterAlpha1)\
**Post date:** [June 24, 2014, 4:48am UTC](https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571/7 "2014-06-24T04:48:56Z")

</div>

[quote=“Womble, post:4, topic:6571”]Initially misread as “randomly detonated explosives”. Might be a better idea, tbh.[/quote]Those would be… inconvenient.

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [June 25, 2014, 5:40am UTC](https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571/8 "2014-06-25T05:40:05Z")

</div>

I think stashing it with the player is reasonable as long as we don’t care about enabling a player other than the one who placed the explosives setting them off.

That brings up a point though, what exactly are we talking about doing? If it’s detonating an item remotely that’s in the reality bubble it’s not a big deal, just slap a reasonably unique id on it, have a way to copy that number to a remote ('a’ctivate remote, pick “tune detonator” menu item, and select explosive package), and when the remote is activated to trigger, it just searches all the items for a matching id.

If we want it to operate outside the reality bubble, it gets significantly more complicated, we’d have to:

1. Find the explosive even though it isn’t in the reality bubble.
2. Load enough map (and associated stuff, like monsters) around the explosive and set it off, while suppressing stuff like noise from explosions, since they won’t happen in the correct location.  
Those can be done, it’s just a pain, is that what we want to do?

Side issue, we have support for radio frequencies already, see iuse::radio\_on() for scanning for radio stations.  
It doesn’t help too much here though since the frequency is tied to a map entity, not sure we want to spawn one of those for every single detonator on the map.

---

<div class="post-metadata">

**Author:** ![RAM](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@RAM](https://discourse.cataclysmdda.org/u/RAM)\
**Post date:** [June 25, 2014, 7:34am UTC](https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571/9 "2014-06-25T07:34:40Z")

</div>

You could have it detonate as it reaches the edge of the reality-bubble. perhaps with a probability of detonating as it gets close. Call it accidentally pressing the button because you were strolling across the country-side with an armed detonator stashed someplace…

---

<div class="post-metadata">

**Author:** ![Arek\_PL](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@Arek\_PL](https://discourse.cataclysmdda.org/u/Arek_PL)\
**Post date:** [June 25, 2014, 12:06pm UTC](https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571/10 "2014-06-25T12:06:26Z")

</div>

allowing detonators only in reality bubble is realistic because radio have limited range

---

<div class="post-metadata">

**Author:** ![FunsizeNinja123](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/funsizeninja123/32/118_2.png) [@FunsizeNinja123](https://discourse.cataclysmdda.org/u/FunsizeNinja123)\
**Post date:** [June 25, 2014, 6:24pm UTC](https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571/11 "2014-06-25T18:24:01Z")

</div>

Or the game could give a message if you’re too far out of the range of the explosive, which means you’re not in the reality bubble.

---

<div class="post-metadata">

**Author:** ![cavefish](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/cavefish/32/321_2.png) [@cavefish](https://discourse.cataclysmdda.org/u/cavefish)\
**Post date:** [June 25, 2014, 6:58pm UTC](https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571/12 "2014-06-25T18:58:27Z")

</div>

Besides, detonating a bomb from a very long distance without being able to return to the scene promptly isn’t what you usually do gameplay wise.

---

<div class="post-metadata">

**Author:** ![Hague](https://avatars.discourse-cdn.com/v4/letter/h/5f9b8f/32.png) [@Hague](https://discourse.cataclysmdda.org/u/Hague)\
**Post date:** [June 25, 2014, 8:18pm UTC](https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571/13 "2014-06-25T20:18:26Z")

</div>

I think it would be pretty funny to tie it to radio transmissions. If there were channels, you could set explosives to the weather report channel and the bomb would go off when the weather report started.

---

<div class="post-metadata">

**Author:** ![FunsizeNinja123](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/funsizeninja123/32/118_2.png) [@FunsizeNinja123](https://discourse.cataclysmdda.org/u/FunsizeNinja123)\
**Post date:** [June 25, 2014, 8:29pm UTC](https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571/14 "2014-06-25T20:29:23Z")

</div>

> [@Hague](#):
>
> I think it would be pretty funny to tie it to radio transmissions. If there were channels, you could set explosives to the weather report channel and the bomb would go off when the weather report started.

That… Is awesome.

---

<div class="post-metadata">

**Author:** ![cavefish](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/cavefish/32/321_2.png) [@cavefish](https://discourse.cataclysmdda.org/u/cavefish)\
**Post date:** [June 25, 2014, 11:05pm UTC](https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571/15 "2014-06-25T23:05:32Z")

</div>

> [@Hague](#):
>
> I think it would be pretty funny to tie it to radio transmissions. If there were channels, you could set explosives to the weather report channel and the bomb would go off when the weather report started.

Or set it off accidentally by picking a wrong channel for the detonator.  
Imagine all the spectacular deaths it could cause.

---

<div class="post-metadata">

**Author:** ![KA101](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@KA101](https://discourse.cataclysmdda.org/u/KA101)\
**Post date:** [June 26, 2014, 12:00am UTC](https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571/16 "2014-06-26T00:00:22Z")

</div>

> [@cavefish](#):
>
> [quote=“Hague, post:13, topic:6571”]I think it would be pretty funny to tie it to radio transmissions. If there were channels, you could set explosives to the weather report channel and the bomb would go off when the weather report started.

Or set it off accidentally by picking a wrong channel for the detonator.  
Imagine all the spectacular deaths it could cause.[/quote]

I’ve never actually gotten a weather report in-game. Let’s not let players find out about that via killing themselves, hmm?

---

<div class="post-metadata">

**Author:** ![HunterAlpha1](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@HunterAlpha1](https://discourse.cataclysmdda.org/u/HunterAlpha1)\
**Post date:** [June 26, 2014, 8:50pm UTC](https://discourse.cataclysmdda.org/t/remotely-detonated-explosives/6571/17 "2014-06-26T20:50:01Z")

</div>

> [@FunsizeNinja123](#):
>
> [quote=“Hague, post:13, topic:6571”]I think it would be pretty funny to tie it to radio transmissions. If there were channels, you could set explosives to the weather report channel and the bomb would go off when the weather report started.

That… Is awesome.[/quote]“…and now for the weather, we can expect a thirty percent chance of-HOLY SHIT WHAT THE FUCK WAS THAT???”
