Jump to content
brians200

Randomly generated roadside IEDs

Recommended Posts

I tried to get in as many requests as I had time for. Enjoy.

Version 2.0

  • Projectile detection now looks in the config to see if a bullet is explosive, rather than maintaining a list of explosive projectiles.
  • Merged files that do similar things, to help make it easier to maintain. Refactored a lot of code.
  • All IED information is now stored in a dictionary, rather than ied_#. This means less variables being created. See the iedModel.sqf file if you are interested on a certain aspect. Special thanks to Sanjo http://www.armaholic.com/page.php?id=19449
  • IEDs now produce a simple form of fragmentation/shrapnel to make them deadlier.
  • Debug markers are now deleted when an IED gets blown up or disarmed
  • Increased the disarm action to 2 animations.
  • Added functions to create and remove sections of IEDs during a mission. People that are smarter than me can come up with a caching scheme if they want to.
  • Added the ability to not remove safeZone markers.
  • Added the ability to choose the ied size percentages on a case by case basis
  • Modified the way to check on the status of IED sections
  • Added lastIedExplosion variable that holds the last location of an IED explosion for people that want to do something special when an IED goes off. Ambush?
  • Faster initializiation
  • Other small things that I can't remember
  • Uploaded my repo to github https://github.com/Brians200/EPD-IED

Download Here v2.0

Edited by brians200

Share this post


Link to post
Share on other sites

Thanks for the update - testing now :)

hmm, not playing nice with my current Description.ext...

ok got it working....

#include "VAS\menu.hpp"


//IED Dictionary call
class CfgFunctions {
   class Dictionary {
       class Dictionary {
		file = "EPD\SanjosFunctions\dictionary";
           class new { description = "Returns a new empty dictionary. \nExample: _myDictionary = call Dictionary_fnc_new;"; };
           class get { description = "Returns the value of the key or objNull if the key doesn't exist. \nExample: [_myDictionary, _myKey] call Dictionary_fnc_get;"; };
           class set { description = "Sets the key to a new value. Overwrites the previous value if the key already existed. \nExample: [_myDictionary, _myNewKey, _myNewValue] call Dictionary_fnc_set;"; };
           class remove { description = "Removes a key from the dictionary. \nExample: _oldValue = [_myDictionary, _keyToRemove] call Dictionary_fnc_remove;"; };
           class isEmpty { description = "Returns true if the dictionary is empty. \nExample: _isDictionaryEmpty = _myDictionary call Dictionary_fnc_isEmpty;"; };
           class containsKey { description = "Returns true if the dictionary contains the key. \nExample: _dictionaryContainsKey = [_myDictionary, _myKey] call Dictionary_fnc_containsKey;"; };
           class containsValue { description = "Returns true if the dictionary contains the value. \nExample: _dictionaryContainsValue = [_myDictionary, _myValue] call Dictionary_fnc_containsValue;"; };
           class size { description = "Returns the number of elements in the dictionary. \nExample: _count = _myDictionary call Dictionary_fnc_size;"; };
           class keys { description = "Returns the keys as an array. \nExample: _keys = _myDictionary call Dictionary_fnc_keys;"; };
           class values { description = "Returns the values as an array. \nExample: _values = _myDictionary call Dictionary_fnc_values;"; };
       };
   };

   // Call VAS
   #include "VAS\cfgfunctions.hpp"
};

Edited by serjames

Share this post


Link to post
Share on other sites

Thanks for the update!

I'm very eager to give the improvements a whirl but wonder where I would find the "explosiveBullets" array that once existed in EPD\IED\Ied.sqf? I run some custom mods and have a careful selection of ammunition for this array.

Projectile detection now looks in the config to see if a bullet is explosive, rather than maintaining a list of explosive projectiles.

I understand you added this in this new version but is there not a way to manually override?

Thanks!

Edited by Oktyabr

Share this post


Link to post
Share on other sites
Thanks for the update - testing now :)

hmm, not playing nice with my current Description.ext...

ok got it working....

#include "VAS\menu.hpp"


//IED Dictionary call
class CfgFunctions {
   class Dictionary {
       class Dictionary {
		file = "EPD\SanjosFunctions\dictionary";
           class new { description = "Returns a new empty dictionary. \nExample: _myDictionary = call Dictionary_fnc_new;"; };
           class get { description = "Returns the value of the key or objNull if the key doesn't exist. \nExample: [_myDictionary, _myKey] call Dictionary_fnc_get;"; };
           class set { description = "Sets the key to a new value. Overwrites the previous value if the key already existed. \nExample: [_myDictionary, _myNewKey, _myNewValue] call Dictionary_fnc_set;"; };
           class remove { description = "Removes a key from the dictionary. \nExample: _oldValue = [_myDictionary, _keyToRemove] call Dictionary_fnc_remove;"; };
           class isEmpty { description = "Returns true if the dictionary is empty. \nExample: _isDictionaryEmpty = _myDictionary call Dictionary_fnc_isEmpty;"; };
           class containsKey { description = "Returns true if the dictionary contains the key. \nExample: _dictionaryContainsKey = [_myDictionary, _myKey] call Dictionary_fnc_containsKey;"; };
           class containsValue { description = "Returns true if the dictionary contains the value. \nExample: _dictionaryContainsValue = [_myDictionary, _myValue] call Dictionary_fnc_containsValue;"; };
           class size { description = "Returns the number of elements in the dictionary. \nExample: _count = _myDictionary call Dictionary_fnc_size;"; };
           class keys { description = "Returns the keys as an array. \nExample: _keys = _myDictionary call Dictionary_fnc_keys;"; };
           class values { description = "Returns the values as an array. \nExample: _values = _myDictionary call Dictionary_fnc_values;"; };
       };
   };

   // Call VAS
   #include "VAS\cfgfunctions.hpp"
};

Yes, due to the nature of the description.ext, you can only have one CfgFunctions{...}. If you already have one, you will have to merge them.

Thanks for the update!

I'm very eager to give the improvements a whirl but wonder where I would find the "explosiveBullets" array that once existed in EPD\IED\Ied.sqf? I run some custom mods and have a careful selection of ammunition for this array.

I understand you added this in this new version but is there not a way to manually override?

Thanks!

The array has been removed in version 2.0, as I didn't want to maintain that list. If you would like to add it back in yourself, you are more than welcome to.

That function now exists inside of EPD\IED\ExplosivesHandler.sqf in the function called EXPLOSION_EVENT_HANDLER.

The change can be found here: https://github.com/Brians200/EPD-IED/commit/94592be30fc3ac7c8bfc13c14378f25a58b8f9ed you will want the red lines and not the green lines.

You will also need to define the array somewhere.

EPD\Ied_Init.sqf seems like a good place. Just around the other 3 arrays after the isserver block.

Edited by brians200
Grammar

Share this post


Link to post
Share on other sites

Thanks! I'll give that a go.

Edited by Oktyabr

Share this post


Link to post
Share on other sites
Guest

New version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Is there a way to " tone " down the smoke effect ( make it shorter, especially, because in multiplayer the framerate suffers from it ) without breaking the script ?

Because i failed so far.

Share this post


Link to post
Share on other sites
I tried to get in as many requests as I had time for. Enjoy.

Version 2.0

  • Added lastIedExplosion variable that holds the last location of an IED explosion. Attach an addPublicVariableEventHandler if you want to do something special when an IED goes off. Ambush?

I am not really sure how to use this, but I would like to create ambushes after an IED set off. Could you build an easy example, how to use the addPublicVariablaEventHandler? Does it work with waypoints and triggers?

I really like your work, keep it up! :)

Share this post


Link to post
Share on other sites

Do you plan on creating a method for detection of the devices by EOD techs? Or is there a way to do it now?

Share this post


Link to post
Share on other sites
Do you plan on creating a method for detection of the devices by EOD techs? Or is there a way to do it now?

Explosion that is identical to the mod as you turned to vbs zbo to pbo?

Share this post


Link to post
Share on other sites
Do you plan on creating a method for detection of the devices by EOD techs? Or is there a way to do it now?

There's a line in the IED_Settings.sqf that lets you choose what classes (such as Engineer or Explosives Expert) are more efficient at disarming IEDs and what items are required (such as ToolKit or a MineSweeper) to perform the disarming of the IED.

Share this post


Link to post
Share on other sites
There's a line in the IED_Settings.sqf that lets you choose what classes (such as Engineer or Explosives Expert) are more efficient at disarming IEDs and what items are required (such as ToolKit or a MineSweeper) to perform the disarming of the IED.

I think he's looking for the same feature I would like to see... some way of *detecting* a real IED, without crawling up to it to see if you get the addaction, similar to how other A2 mods have done it in the past and how the mine detector can locate mines in BIS vanilla A3 now, i.e. "Spotted a mine!" with a visual icon.

Might be nice to incorporate a single BIS mine into the IED placement so a mine detector will go off although "disarming" the BIS mine would not automatically disarm the IED. Alternatively, have an array that could define an object and/or unit type capable of detecting an "IED" at a distance would be quiet useful, i.e. ["Explosives Expert"] or anyone with a "mine detector".

Edited by Oktyabr

Share this post


Link to post
Share on other sites
I think he's looking for the same feature I would like to see... some way of *detecting* a real IED, without crawling up to it to see if you get the addaction, similar to how other A2 mods have done it in the past and how the mine detector can locate mines in BIS vanilla A3 now, i.e. "Spotted a mine!" with a visual icon.

Share this post


Link to post
Share on other sites
I think he's looking for the same feature I would like to see... some way of *detecting* a real IED, without crawling up to it to see if you get the addaction, similar to how other A2 mods have done it in the past and how the mine detector can locate mines in BIS vanilla A3 now, i.e. "Spotted a mine!" with a visual icon.

Might be nice to incorporate a single BIS mine into the IED placement so a mine detector will go off although "disarming" the BIS mine would not automatically disarm the IED. Alternatively, have an array that could define an object and/or unit type capable of detecting an "IED" at a distance would be quiet useful, i.e. ["Explosives Expert"] or anyone with a "mine detector".

Right on the money...would like some kind of detection system or routine.

Sent from my HTC6435LVW using Tapatalk

Share this post


Link to post
Share on other sites

Exactly! Are you porting this over to A3?!?!

---------- Post added at 04:51 PM ---------- Previous post was at 04:48 PM ----------

Right on the money...would like some kind of detection system or routine.

Sent from my HTC6435LVW using Tapatalk

So far the work around I've been using is to insert this:

_mine = createMine ["APERSmine",_iedPos,[],0];

In to EPD\IED\CreationFunctions.sqf around line 156. This will add an APERSmine to each real IED, which a "mine detector" will detect. Be advised that this also means TWO threats that must be approached and disarmed instead of one. If you are just going to destroy it/them with a grenade or other explosive it really doesn't matter since if one explodes the other should too (a bad idea in my mission as it tends to attract OPFOR).

Share this post


Link to post
Share on other sites

Doesn't putting the APERs in create triangle map markers all over the place ?

Sj

Share this post


Link to post
Share on other sites
Is there a way to " tone " down the smoke effect ( make it shorter, especially, because in multiplayer the framerate suffers from it ) without breaking the script ?

Because i failed so far.

Look in ExplosionEffects.sqf.

The majority of smoke comes from the CREATE_RING function.

To create less smoke particles, increase the setDropInterval numbers.

I am not really sure how to use this, but I would like to create ambushes after an IED set off. Could you build an easy example, how to use the addPublicVariablaEventHandler? Does it work with waypoints and triggers?

I really like your work, keep it up! :)

I guess I was mistaken that the eventHandler would fire for the machine that calls it, but after reading the documentation, it appears it only fires on the other machines. You can just set up a loop to check the value of that variable every few seconds to see if it has changed. If it has, you know an ied went off at that location. I will update the first post.

Explosion that is identical to the mod as you turned to vbs zbo to pbo?

I am not sure what you are asking?

Share this post


Link to post
Share on other sites
Doesn't putting the APERs in create triangle map markers all over the place ?

Sj

Explosives placed by members of your own side will show up on the map, for members of that side. But since in this case it's being placed by a script, not a player, it doesn't show up on the map until detected and even that depends on what difficulty setting you playing at I guess. Once one is detected, yes, a triangle shows up on both the player's screen and on the map (not sure if that's for everyone or just the player that found it), at least in Regular mode. In higher difficulty levels I don't think one shows up at all.

Here is a good reference to A3 mines: http://steamcommunity.com/sharedfiles/filedetails/?id=173157668

Share this post


Link to post
Share on other sites
Exactly! Are you porting this over to A3?!?!

There's a number of issues to bringing it to A3, though IP isn't one of them. Both the disruptor and the detector addon were not made by me, but made for me and I have all usual rights over them.

The hurdles are purely technical. They both have A2 BAF as a dependency, but that could be worked out. The scripts that run them are 2011 vintage and so could definitely be bought up to date. For example, my IEDs didn't go off when the nearby players were prone. When I coded this, the 'stance' command didn't exist so I had to cobble together a way of detecting player stance. Also, the IED detector doesn't work 'stand alone'. It won't work if the player takes it and waves it around, it needs the mission maker to fire up client side scripts that make it work. I didn't have the expertise back then to embed these scripts into the addon itself, whereas now, I do.

I'm in discussion with Brians200 now, so watch this space.

Share this post


Link to post
Share on other sites

Tankbuster, great that you're working with Brians - Community spirit !!

SJ

Share this post


Link to post
Share on other sites

Hi all,

First of all, great addition to the game!.

I've got it working without much problems in Arma3, though while doing some tests between small/medium/large explosions i didn't really notice a lot of difference between them.

Even small explosives seem lethal to lighter vehicles, Two small explosions where enough to track a MBT.

When i went looking in the ExplosionFunctions.sqf i noticed the same sequences for small, medium & large. Should this not be different for each explosion?

Also, does the script pick one explosion out of the sequence to make for some randomness, or are they all actually fired off in this sequence?

EXPLOSIVESEQUENCE_SMALL = {

_explosiveSequence = ["M_PG_AT","M_Zephyr","M_Titan_AA_long","M_PG_AT"];

[_this, _explosiveSequence, true, true] spawn PRIMARY_EXPLOSION;

};

EXPLOSIVESEQUENCE_MEDIUM = {

_explosiveSequence = ["M_PG_AT","M_Zephyr","M_Titan_AA_long","M_PG_AT"];

[_this, _explosiveSequence, true, true] spawn PRIMARY_EXPLOSION;

};

EXPLOSIVESEQUENCE_LARGE = {

_explosiveSequence = ["M_PG_AT","M_Zephyr","M_Titan_AA_long","M_PG_AT"];

[_this, _explosiveSequence, true, true] spawn PRIMARY_EXPLOSION;

};

best regards

Badger

Share this post


Link to post
Share on other sites

Okay so i put the folder in patrol ops 3 and put the stuff in the description and init but im not sure if the script is working i havent seen any IEDS yet but is there a way to tell if the script is working?

Share this post


Link to post
Share on other sites

Rages,

Check the Ied_Settings.sqf file in the EPD folder. Make sure it says true for EPD_IED_debug, that will make the ieds show up on the map:

/***************SETTINGS***********************/

EPD_IED_debug = true;

Start your mission & open the map and you should see IED & false markers all over the map. Make sure its a mission on Altis to start first (sections are defined for that map).

Share this post


Link to post
Share on other sites
Hi all,

First of all, great addition to the game!.

I've got it working without much problems in Arma3, though while doing some tests between small/medium/large explosions i didn't really notice a lot of difference between them.

Even small explosives seem lethal to lighter vehicles, Two small explosions where enough to track a MBT.

When i went looking in the ExplosionFunctions.sqf i noticed the same sequences for small, medium & large. Should this not be different for each explosion?

Also, does the script pick one explosion out of the sequence to make for some randomness, or are they all actually fired off in this sequence?

best regards

Badger

Yeah I noticed that ALL the IED's were Holy Cow moments... Lots of FPS lag... lol

Might be a good idea to reduce the small and medium one to just stock mine/grenades effects ?

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

×