Jump to content
M1ke_SK

[RELEASE] Simple Bomb Defuse [script]

Recommended Posts

Simple Bomb Defuse [script] - v1.2.2
 
 
Description:
Idea was to create simple "mini-game" / "chalenge" when defusing bombs in game, where unit have little time to think and create space for errors. With this script you can add possibility to "screw something" when deactivating mines. Script randomly generate string of 3 color matrix, where unit must identify which color have most appearances in matrix and cut that color wire accordingly. You can stress out unit with timer you set for deactivating the bomb. If unit cut wrong wire or timer runs out, then bomb will explode. Best object to make bomb is burning barrel, but you can use any object, just need to modify little attached objects. I added C4 and light and beeping sound to improve finding bomb in dark.
Bomb can be defused with any unit, just need to have toolkit in inventory. In future, I can modify script for demotilion class only if needed.
Should be working on multiplayer / dedicated server, need more testing.
 
Instalation:
- copy folder "bomb" into your mission folder
- include line 
#include "bomb\cfgFunctions.hpp"

into your CfgFunctions class in description.ext file

 
Example:
class CfgFunctions
{
    #include "bomb\cfgFunctions.hpp"
};

Usage:

- place unit in editor
- place object in editor (barrel)
- In object init line put
null = ["object", "time", "kit", "debug"] execVM "bomb\bomb.sqf";

Example:

null = [this, 10, true, false] execVM "bomb\bomb.sqf";

Configuration:

"object" - object to transform to bomb, default: this
"time" - time in seconds for bomb defuse, default: 10
"kit" - boolean value if needed tools to defuse bomb, default: true
"debug" - boolean value if need show right wire to cut, default: false
 
Settings:
open file ../bomb/settings.sqf in bomb folder where you can change internal settings of script.
 
_choices - array of choices to cut wires, more choices will have more colors to cut, default: red, green, blue
_explosion - change classname of explosion, possible values in comments
_matrix - show size of maxtrix with colors, default: big
_expertMultiplier - if expert is defusing bomb, unit will have more time to defuse bomb, default: 2  (time * 2x)

_disableAce3 - disable/enable ACE3 interaction menu

 
Features:
- friendly hint with instructions
- hint is showing only to defuser
- ace3 support
- JIP friendly
- multiplayer / dedicated server friendly
- easy installation
- plug & play system
- specialist have more time to defuse bomb
- custom time for specialist
- defusing bomb with ToolKit or DefusalKit
- random generation of matrix
- custom size of matrix
- custom choices (number of wires)
- beeping sound
- blinking light
 
Planned:
- dialog for cutting wires
- cutting wires in right order
- when wrong cut, timer will accelerate
- "slippery hands" ( this is where I move toolkit from unit inventory and spawn it next to him, as he can't cut wires when he dont have toolkit)
- probability of second wiring ( first wiring is dummy )
 
Changelog:

 

v1.2.2
- prevent attaching objects and sounds to object if class is not Land_MetalBarrel_F

 
v1.2.1
- added new config parameter "_disableAce3" to disable ACE3 interaction menu
 
v1.2
- reformat to functions
- added multiplayer / dedicated server support (tested)
- JIP friendly (tested)
- hint showing to only defuser (tested)
- battle-tested in real environment
- changed to "plug & play" system
- added settings.sqf file
- added readme.txt file for instructions
- cleaned code
 
v1.1
- added ace3 support
- added customizable explosion size
- added customizable size of maxtrix
- added more wires (custom)
- specialist have more time to defuse bomb
- custom time for specialist (default 2x time)
- custom internal settings
- added documentation
- added simple mission for test
 
v1.0
- public release
 
License:
Use it for public, non monetized purposes only. If you have modifications, use pull request in git repo. Will revise/include them in script.
 
Disclaimer:
Do not incorporate this script or portions of it in monetized products or servers without asking for permission and obtaining approval from me!
 
Credits:
Larrow - fix for c4 attachment
MILHAUS_CZ - testing JIP and DEDI
 
Issues:
- please use issue tracker
- hint showing to every player
- not damaging player with ace3
 
Download:
 
Preview:

 

 

 

 

Media:

 

mbBXssx.png

 

wbe0ok5.png

 

q2XCsnE.png

 

nQ3ewVR.png

 

K8p0cUO.png

 

kuzijy7.png

  • Like 17

Share this post


Link to post
Share on other sites
Guest

Great work,

thanks for sharing.

 

EDIT : Maybe add a little shoutout to Larrow ;)

Share this post


Link to post
Share on other sites

EDIT : Maybe add a little shoutout to Larrow ;)

 

He is mentioned in credits :)

  • Like 1

Share this post


Link to post
Share on other sites

Very cool, I like it.  I wonder if we could find a simple colored wiring diagram jpg to use instead of #s.  Give it a bit more realism.

  • Like 1

Share this post


Link to post
Share on other sites

Very cool, I like it.  I wonder if we could find a simple colored wiring diagram jpg to use instead of #s.  Give it a bit more realism.

 

I am planning to create Dialog for cutting wires

  • Like 4

Share this post


Link to post
Share on other sites

Sweet.  Just to flesh out my suggestion (no problem if you go a different path of course), but an image like this could be re-labeled to be more bomb-trigger oriented.  Then there could be different randomized cues to player on which wire to cut (i.e., make them find a wire described in the diagram, determine its color, then select color to cut).  "Cut the relay to ground wire", "Cut the 15 amp fuse wire", .etc.

 

Wire_Diagram.jpg

  • Like 3

Share this post


Link to post
Share on other sites
Guest

Sweet.  Just to flesh out my suggestion (no problem if you go a different path of course), but an image like this could be re-labeled to be more bomb-trigger oriented.  Then there could be different randomized cues to player on which wire to cut (i.e., make them find a wire described in the diagram, determine its color, then select color to cut).  "Cut the relay to ground wire", "Cut the 15 amp fuse wire", .etc.

 

Wire_Diagram.jpg

 

Maybe a bit complicated for a "simple" bomb defusal script ;)

Share this post


Link to post
Share on other sites

Maybe a bit complicated for a "simple" bomb defusal script ;)

:) Idea is one relatively simple diagram (just a jpg), but with 3 randomized cues to the player "must cut the xyz relay wire".  With time pressure, player has to read diagram, find the labeled wire, determine its color, then choose "cut color X wire".  Random instructions for which labeled wire to cut makes it so player can't memorize to always cut one particular wire color.

  • Like 3

Share this post


Link to post
Share on other sites

Maybe a bit complicated for a "simple" bomb defusal script ;)

 

You can create a "complicated bobb script " with ACE !   :rolleyes: PLEAS

Share this post


Link to post
Share on other sites

Looks really cool. Is this MP safe?

 

Should be. Tested only on MP, not dedicated.

  • Like 2

Share this post


Link to post
Share on other sites

Should be. Tested only on MP, not dedicated.

 

Ok cool. Will try it on a dedicated server.

Share this post


Link to post
Share on other sites

Looks great, and I'm sure it can be used to for nice missions.

 

Some ideas which could be implemented:

 

- "Simple Bomb"

This is just a box with n amount of randomly coloured wires, perhaps even part of a bigger bomb interface (requires some GUI editing), where you have to follow the given instructions.

eg. "Cut the <colour> wire", "Cut the most occurring colour", "Cut the nth wire", etc.

 

124a48y.png

 

- "Advanced Bomb":

Could have the same interface, although in this case you have to cut all the wires in a certain order.

eg. "Cut all the wires in order of the amount it has", "Cut all the wires. The BLUE wires must be cut on EVEN second, GREEN on UNEVEN seconds." (could be tricky in MP with lag), "Cut all the wires from right to left"

 

And this could even include something like checking the current (eg. "Cut all wires in order of HIGH to LOW current")

 

- Double Timer:

To make it more interesting for missions, the bomb could have 2 different timers.

1) a local timer, which is the same as it's now (30 seconds to read the instructions and press a button).

2) a global timer, in which the bomb must be disarmed (otherwise mission failed). This can be activated on mission start or through a trigger.

 

This could mean that someone can check the bomb before disarming it, without being stuck to the 30 second limit. Eg. someone checks the bomb but doesn't have a toolkit with him/her.

 

- Mod instead of script

Please, please, please, make a mod version of this ;)

This would mean more possibilities of using custom assets (images, sounds, objects, UI).

 

 

btw I also found this on the forums (probably doesn't work anymore): https://forums.bistudio.com/topic/163766-defuse-the-bomb/

  • Like 2

Share this post


Link to post
Share on other sites

- Double Timer:

 

- Mod instead of script

 

- Advamced bomb

 

- Double timer

You can implement double timer within your mission with another loop to set off bombs like:

if(timer == 0) exitWith 
{
    { /* detonate bombs here */  } forEach [bomb1, bomb2, bomb3, ...];
};

I think of that when I created this script but want to keep it "simple". You can always use trigger to count down when mission ends  (bombs will destroy objective) or something.

 

- Mod instead of script

 

About mod. I think you will have more freedom if you use script, because people dont need to download other things(mods) just to play your mission. This way it is just plug-and-play. I am more "use-vanilla-sources-guy" in my missions, but I will considerate making some mod in future.

 

- Advanced bomb

 

I have few ideas to improve cutting wires. Something like: 

 

- adding more colors (more wires)

- creating bigger matrix

- cutting wires in right order

- when wrong cut, timer will accelerate

- "slippery hands" ( this is where I move toolkit from unit inventory and spawn it next to him, as he can't cut wires when he dont have toolkit)

- probability of second wiring ( first wiring is dummy )

...

  • Like 4

Share this post


Link to post
Share on other sites

Is it poseble to change the toolkit to a ace defucer kit?

  • Like 1

Share this post


Link to post
Share on other sites
Guest

I don't know how it is handled but

"Acedefuserclassname" in assignedItems ?

Share this post


Link to post
Share on other sites

Is it poseble to change the toolkit to a ace defucer kit?

 

Yes, will be in next update. (ace3 support)

  • Like 3

Share this post


Link to post
Share on other sites

Updated to version 1.1

 

Changelog:
v1.1
- added ace3 support
- added customizable explosion size
- added customizable size of maxtrix
- added more wires (custom)
- specialist have more time to defuse bomb
- custom time for specialist (default 2x time)
- custom internal settings
- added documentation
- added simple mission for test
 
K8p0cUO.png kuzijy7.png nQ3ewVR.png
 

 
  • Like 3

Share this post


Link to post
Share on other sites

I reduced default timer to 10 seconds and added more colors and bigger matrix for more challenging defusing (you can customize it in script settings)

Also specialist (engineer or demo expert) will have 2x more time to defuse bomb, like in ace3 where medic can heal 2x quicker. You can modify this coeficient now.

Share this post


Link to post
Share on other sites

Hi,

 

great script but i noticed two things : first, when someone tries to defuse the bomb, everyone on the server get the message. Maybe its wanted or do you plan to fix this ?

Secondly, sometimes, people dont get killed or injured with the explosion. Maybe because we are using ace.

Share this post


Link to post
Share on other sites

Hi,

 

great script but i noticed two things : first, when someone tries to defuse the bomb, everyone on the server get the message. Maybe its wanted or do you plan to fix this ?

Secondly, sometimes, people dont get killed or injured with the explosion. Maybe because we are using ace.

 

1.

Are you using this on multiplayer or dedicated server ?

Hint was planned to be visible only for defuser.

 

2.

What settings are you using in ACE3 mod?

How do you set unconscious settings?

What explossion class are you using?

Are you using modded uniforms?

Are you using custom eventhandlers.

What mods are you using in your missions?

You can change explossion class in internal settings in script.

With mods, specially with ACE3, you need to look at each scenario differently. Script was mainly for vanilla use.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×