Jump to content
brians200

Randomly generated roadside IEDs

Recommended Posts

The side can be a single side, or an array of sides

Ex. "West" or ["West,"East"]

Excuse my lack of scripting ability but is the above a typo or my lack of expertise, I wish to add civilians to set off ieds as well would below be the correct way or have I failed badly.

iedArray = [

["AllCities","West", "CIV"],

["AllVillages","West", "CIV"],

ETC.

Thank you very much in advance.

Share this post


Link to post
Share on other sites

If you want multiple sides, you must put them in an array

iedArray = [
["AllCities",["West", "CIV"]],
["AllVillages",["West", "CIV"]],
ETC.

Share this post


Link to post
Share on other sites

Awesome, thank you very much, The guys are going to hate me, they have nearly mastered finding and dodging the IEDs, now some random Civilian will walk past one and detonate it while friendlies are close by and it will take them out.

Share this post


Link to post
Share on other sites

You can always change what items the IEDs are hidden in ;)

This was a great way to get some more explosions going in our server.

Share this post


Link to post
Share on other sites

Great addon ! I'm impressed.

One question, would it be interesting to consider vehicles equiped with counter-IED antenna? (they would not detect IED but neither would they blow on them...)

Secondly, I recalled an addon on Arma2 for IED disruptor. Not sure if this would come on Arma 3 but would you then consider possibility to disarm IED for units equiped with specific tools (Disruptors, bots, EOD Dogs...)

Thanks and congrats again for this very good work.

Share this post


Link to post
Share on other sites

Suggestion : + some ambush with A.I.bots could be great

anybody how to do it?

Share this post


Link to post
Share on other sites
Suggestion : + some ambush with A.I.bots could be great

anybody how to do it?

You are more than welcome to have some AI bots come running to the area if you wish. If the object named ied_# becomes null, you know that that IED went off. Then you can send AI over to there.

Great addon ! I'm impressed.

One question, would it be interesting to consider vehicles equiped with counter-IED antenna? (they would not detect IED but neither would they blow on them...)

Secondly, I recalled an addon on Arma2 for IED disruptor. Not sure if this would come on Arma 3 but would you then consider possibility to disarm IED for units equiped with specific tools (Disruptors, bots, EOD Dogs...)

Thanks and congrats again for this very good work.

Correct me if I am wrong, but doesn't adding items to ARMA 3 require players to download mods?

You are probably thinking about TankBuster's work that is linked on the first post. If my first assumption is wrong and somebody can point me to some decent documentation, I will consider adding support for stuff like that. As it stands, I don't want people to have to download yet another mod just to play a map. If we can get adding items working, I would also like to add the IED models bis already has in the game. I don't currently use them, because they have the red triangle on them and if you try to use the default deactivate, it throws a script error. That would already be on top of mine...

Share this post


Link to post
Share on other sites

Secondly, I recalled an addon on Arma2 for IED disruptor. Not sure if this would come on Arma 3 but would you then consider possibility to disarm IED for units equiped with specific tools (Disruptors, bots, EOD Dogs...)

.

The disruptor is mine. It won't work in A3 for two reasons; firstly because it has BAF as a dependency and secondly, because the disruptor was an addon and needed the accompanying script suite to work.

That said, I'd consider requests to fix it up and bring it into A3

Edited by Tankbuster

Share this post


Link to post
Share on other sites

Sorry for the late reply as i have been very busy the last few days, but THANKS BRAINS for adding the multiple sides option, this is exactly what i needed for PvP !!

Share this post


Link to post
Share on other sites

Unfortunately this script collides with several other things i am running in my mission, it just wont work. suspecting it might be some of the following:

INS revive needs 2 lines of code in the init:

//if (!isServer && isNull player) then {isJIP=true;} else {isJIP=false;};
//if (!isDedicated) then {waitUntil {!isNull player && isPlayer player};};

then there is my mission parameters pharsing:

Grab parameters and put them into readable variables
for [ {_i = 0}, {_i < count(paramsArray)}, {_i = _i + 1} ] do
{
call compile format
[
	"PARAMS_%1 = %2",
	(configName ((missionConfigFile >> "Params") select _i)),
	(paramsArray select _i)
];
};

And there must be something else it doesn't like that i cannot isolate yet. Spend 2 full days but cannot find out what the problem is exactly.

anyway for your own troubleshooting pleasure here are the mods i run in my mission file:

INS-revive

MarKeR - Vehicle Hud

holo89 - 3D Markers

Tophe - Simple Vehicle Respawn Script

Tonic - Virtual Ammobox System (VAS)

Tonic - View distance script

MAD T - MAD Ambient Life - (SP/MP)

Shuko - Task manager system

Meatball - Random Weather Generator

Riouken - MP Ammo Box script

zealot111 - Realistic repair script

Killzone_Kid - Map Clock and Watch sync

wildw1ng - Weapon restriction script

Alex Wise - Sling loading script

AhoyWorld.co.uk - Unit setup script

Hope you figure it out at one point as i really really like this ied script, it's just plain awesome !

Share this post


Link to post
Share on other sites

That is not enough for me to go on.. Can you send me your mission in a pm?

Share this post


Link to post
Share on other sites

Glad to be able to say that the issue wasn't that much of a issue after all, just that the feedback of the IED script was disabled with the debug setting of Taskmaster config, so i was under the impression that nothing was happening...:o

Thz again Brains200, fantastic support !

Share this post


Link to post
Share on other sites

Is it possible to detect the IED? In my mission, i would like AI EOD team to be able to detect the IED on their own.

Share this post


Link to post
Share on other sites

The only way to detect an IED is to move up to it with the appropriate gear and you will get the Disarm option if it is real.

I have not done any AI programming, so I don't know how to give them options.

Share this post


Link to post
Share on other sites

LOVING IT...

It's active on our public server - gratuitous Advert :-)

b_560_95_1.png

Come and blow yourself up...

Share this post


Link to post
Share on other sites

I am looking for the opinion of the people that use this. Would you like to have a tinnitus and a disorienting effect if you are close to the explosion?

Something like:

If you are within 40 meters, you get tinnitus and a disorienting effect.

If you are within 75 meters, you get tinnitus.

Inspiration comes from here. http://forums.bistudio.com/showthread.php?172864-Any-idea-how-this-was-done

Share this post


Link to post
Share on other sites
I am looking for the opinion of the people that use this. Would you like to have a tinnitus and a disorienting effect if you are close to the explosion?

Something like:

If you are within 40 meters, you get tinnitus and a disorienting effect.

If you are within 75 meters, you get tinnitus.

Inspiration comes from here. http://forums.bistudio.com/showthread.php?172864-Any-idea-how-this-was-done

Very cool! I think being that close to *any* explosion and surviving should have that sort of effect!

Question: I'm trying to use your script with large area markers only covering sections of rural roads. I'm also using ALiVE on a dedicated server so replay value is a must. What I would like is a way to have only a few (two or three) locations per marker and a very slight chance of any of them being an IED, so most of the time they are "fakes" but a real one shows up enough just to keep the players on their toes. In other words driving over 10 km of road covered by the markers (crossing three or four markers) should produce one real IED, maybe two, other times none at all, with half a dozen fakes scattered in there for fun. Is there a way to randomize this each time the mission is restarted so it can't become too predictable?

Further, I would really like a way to have IEDs planted at random during the mission... so if the mission hasn't been restarted for several hours the players might use a section of road once and when they come back over it a few hours later there is an IED where there wasn't one before, especially if the road goes through an opfor controlled sector. Is this possible?

Thanks in advance!

Share this post


Link to post
Share on other sites

I like the idea of random re-placement...

Perhaps we could specific a specific Hot-Spot where that would be more common, i.e. a marker IED_Re_spawn or something.

I would also like the ability to add IED's to non road locations, but randomly and intelligently. I.e. without me the editor knowing where they are. At the moment it's roads only.

We run the insurgency script on our Takistan ALiVE didi and it has a script which places "Intel" around buildings in key cities, might be run to be able to specify a level of IED threat within compounds, or buildings etc ?

I.e. the arched entrances to compounds, or perhaps in the houses themselves?

SJ

Share this post


Link to post
Share on other sites

I'm using EOS scripts as well to set up areas where vehicles far from any base or village can come under fire from "random" patrols. In fact I'm using the same markers for EOS as I am for the IEDs. Once a EOS marker is clear of opfor (very difficult to do) they do not respawn either, AFAIK. But it would be cool to some how tie the IED re-placement with the occupation of those markers... check EOS marker status maybe... so if my wandering opfor are present in a marker area there is a chance that they will have replanted an IED. Once the marker area is clear of opfor of course there should be no one there to replant them and safety in the area should go up.

---------- Post added at 03:32 PM ---------- Previous post was at 02:35 PM ----------


Second: A random might be very useful... for example, using a marker: ["EOS1",1,5,"WEST"], what if the first number was a probability of an actual IED and the second number was how many locations? So you could present it like this instead: ["EOS1",0.1,5,"WEST"], which would represent five locations in the marker, each one with a 10% chance of being an IED and not a fake? Or you could add an option line in the settings:

fakeChance =50; //Chance that a dud or fake IED will be chosen.
smallChance = 25; //Chance that a small IED will be chosen.
mediumChance = 20; //Chance that a medium IED will be chosen.
largeChance = 5; //Chance that a medium IED will be chosen.

I'm no scripter... I may have no idea what I'm talking about. Just suggestions. :) But it would be nice (along side the planting of IEDs during the mission) to have a higher range of randomness to play with. Maybe ["EOS1",1,5,"WEST"] could be a minimum of one location with a maximum of five, within marker "EOS1", and each instance would fall back to the probability options in settings I suggested above (including fake/dud)?

Share this post


Link to post
Share on other sites

A great method, if possible, would be to do a scan across the entire map and identity various roads (main roads, small roads, dirt roads, etc). IEDs could then be randomly placed along the identified roads - spotting patterns in placements (from markers) would be impossible as each play-through would have completely different IED placement.

What would be really great as well (and others have suggested this) is if IEDs were only placed at locations nearby where enemy units are located. Using this approach, the idea of IEDs that respawn would be equally as random and dynamic.

Would you be able to do this? Would be brilliant if you could :)

Btw, I love that ear-ringing effect you've done - really adds to the trauma of being hit by an IED :p

Share this post


Link to post
Share on other sites

Change Log:

Version 1.6

  • Added a tinnitus and disorientation effect, based on how far away you are from the IED. Special Thanks to IndeedPete
  • Renamed the debug variable so it is unique to the script to prevent conflicts with other scripts.

Very cool! I think being that close to *any* explosion and surviving should have that sort of effect!

Question: I'm trying to use your script with large area markers only covering sections of rural roads. I'm also using ALiVE on a dedicated server so replay value is a must. What I would like is a way to have only a few (two or three) locations per marker and a very slight chance of any of them being an IED, so most of the time they are "fakes" but a real one shows up enough just to keep the players on their toes. In other words driving over 10 km of road covered by the markers (crossing three or four markers) should produce one real IED, maybe two, other times none at all, with half a dozen fakes scattered in there for fun. Is there a way to randomize this each time the mission is restarted so it can't become too predictable?

Further, I would really like a way to have IEDs planted at random during the mission... so if the mission hasn't been restarted for several hours the players might use a section of road once and when they come back over it a few hours later there is an IED where there wasn't one before, especially if the road goes through an opfor controlled sector. Is this possible?

Thanks in advance!

In the current state, you can put a random number in the IED array for randomness.

["Lakka", floor random 2, floor random 8, "West" ]

As for your other request, I will work on that when I have some time again. Trying to finish up my masters degree.

I like the idea of random re-placement...

Perhaps we could specific a specific Hot-Spot where that would be more common, i.e. a marker IED_Re_spawn or something.

I would also like the ability to add IED's to non road locations, but randomly and intelligently. I.e. without me the editor knowing where they are. At the moment it's roads only.

We run the insurgency script on our Takistan ALiVE didi and it has a script which places "Intel" around buildings in key cities, might be run to be able to specify a level of IED threat within compounds, or buildings etc ?

I.e. the arched entrances to compounds, or perhaps in the houses themselves?

SJ

I will create some ways to spawn IEDs mid mission when I get some time again.

I will also add other options for spawning them around towns.

I'm using EOS scripts as well to set up areas where vehicles far from any base or village can come under fire from "random" patrols. In fact I'm using the same markers for EOS as I am for the IEDs. Once a EOS marker is clear of opfor (very difficult to do) they do not respawn either, AFAIK. But it would be cool to some how tie the IED re-placement with the occupation of those markers... check EOS marker status maybe... so if my wandering opfor are present in a marker area there is a chance that they will have replanted an IED. Once the marker area is clear of opfor of course there should be no one there to replant them and safety in the area should go up.

---------- Post added at 03:32 PM ---------- Previous post was at 02:35 PM ----------


Second: A random might be very useful... for example, using a marker: ["EOS1",1,5,"WEST"], what if the first number was a probability of an actual IED and the second number was how many locations? So you could present it like this instead: ["EOS1",0.1,5,"WEST"], which would represent five locations in the marker, each one with a 10% chance of being an IED and not a fake? Or you could add an option line in the settings:

fakeChance =50; //Chance that a dud or fake IED will be chosen.
smallChance = 25; //Chance that a small IED will be chosen.
mediumChance = 20; //Chance that a medium IED will be chosen.
largeChance = 5; //Chance that a medium IED will be chosen.

I'm no scripter... I may have no idea what I'm talking about. Just suggestions. :) But it would be nice (along side the planting of IEDs during the mission) to have a higher range of randomness to play with. Maybe ["EOS1",1,5,"WEST"] could be a minimum of one location with a maximum of five, within marker "EOS1", and each instance would fall back to the probability options in settings I suggested above (including fake/dud)?

I will look into respawning areas when I get some more time.

For the second part, you can kind of use the random function still, but I can expand it further when I am not busy.

For right now, if you wanted 1 to 5 real ones, you can use 1+floor random 5 as your argument.

A great method, if possible, would be to do a scan across the entire map and identity various roads (main roads, small roads, dirt roads, etc). IEDs could then be randomly placed along the identified roads - spotting patterns in placements (from markers) would be impossible as each play-through would have completely different IED placement.

What would be really great as well (and others have suggested this) is if IEDs were only placed at locations nearby where enemy units are located. Using this approach, the idea of IEDs that respawn would be equally as random and dynamic.

Would you be able to do this? Would be brilliant if you could :)

Btw, I love that ear-ringing effect you've done - really adds to the trauma of being hit by an IED :p

I am not sure I follow what you are asking for. You can already place a marker of size 1000 and get completely different results every time the server starts. As far as finding the all the roads on the map, the only method I know of so far is using the nearRoads command, which takes a long time to run if you give it the size of the map. If somebody could point me to where it is in the config or similar that would be excellent. As far as determining road type, I am not sure how to do that either. nearRoads returns an object that only uses a number when you try to print it. It doesn't allow you to use typeof, so I would need some guidance there as well...

As I have told the others, I will look into when I get some more time.

Share this post


Link to post
Share on other sites

Nice!

Thanks for the update. School before fun :)

For right now, if you wanted 1 to 5 real ones, you can use 1+floor random 5 as your argument.

So the argument for zero to 2 would be floor random 2?

I also caught this looking into random: "Be careful using random numbers in multiplayer, each client will come up with a different result." I'm assuming you know what you are doing in these regards (more than I do!)... but is random safe to use in this script if it's being ran on a dedicated server?

Thanks again

Edited by Oktyabr

Share this post


Link to post
Share on other sites

You are close.

0 to 2 inclusive would be floor random 3

You don't need to worry about that warning for this instance. Only the server is running that code.

It is warning that if my computer generates a number and your computer generates a number, they probably aren't going to be the same.

Edited by brians200

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

×