Forum Jump :

Author Message


Posts: 9
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name: wolfenswan

 
#1 Posted at 2013-03-20 13:55        
     
Description
Urban combat against regular forces is fun, but what's even more fun is the tension of not knowing if those angry looking civilians are harmless or carrying heat.

This script allows you to turn either specific civilians, all civilians in the mission and/or all civilians spawned by the ALICE module into hidden sleepers (with either a fixed or random chance of triggering).

They will wait until either a set amount of units of a specific site OR a specific unit (a VIP for example) are in their trigger-area and will then engage the target after a short while.

There is no way of telling if a civilian is dangerous or not from a distance as they are considered "civilian" in in-game terms until the moment they pull a gun (where the script adds them to a group of the opposing faction).

Usage
Instructions are included in the code itself.

ARMA 3:
By default the script is set up to run with ARMA 2, but the only thing you need to change are the weapon classes (for the randomized selection of small arms the sleepers may pull; an example is already in the script) and marker classes for the Debug mode (how-to in the script).

As soon as I figure out how exactly the new site modules work I might modify the code to work with them, similar to how it does with ALICE. For now you should be good by executing the script in "affect all" mode through a trigger after the mission has launched and the site modules have populated the towns.

Download:
github
Most recent change: 04.10.2013

Video demonstration:
Youtube

This post was edited by wolfenswan (2013-10-04 16:27, ago)


Author Message


Posts: 20729
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 45
In-game name: Foxhound

 
#2 Posted at 2013-03-20 19:51        
     
This looks like fun, thanks for posting the script here :-)
News is on the frontpage and you can find our mirror here:



This post was edited by Foxhound (2013-03-23 09:25, ago)


Advertisement


Author Message


Posts: 1
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2013-03-21 03:45        
     
can't seem to get it to work :( i put it in the ambient civilian module init. section. and put the file in my missions folder. is there something else i need to do? no civilians have shot at me yet. really want this to work because it seems so awesome!


Author Message


Posts: 9
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name: wolfenswan

 
#4 Posted at 2013-03-21 12:13        
     
# darrenin : can't seem to get it to work :( i put it in the ambient civilian module init. section. and put the file in my missions folder. is there something else i need to do? no civilians have shot at me yet. really want this to work because it seems so awesome!

Can you poste the code you put in the ALICE init?
Also can you run both ws_assassins and ALICE with debug mode on? (for the former just change _debug in the script to true, for the latter put this setVariable ["debug",true]; in the module init.

Which map are you running it on? It might be that there aren't any towns ALICE recognizes.

Edit:
I noticed a typo in my documentation:
[BIS_alice_mainscope,"ALICE_civilianinit",[{nul = [_this,"ran",number,number,side OR unitname,number of targets present (1-n), skill (0-1),false] execVM 'ws_assassins.sqf'}]] call BIS_fnc_variableSpaceAdd;

I forgot the numbers of targets present param, so it read skill as bool and that might have tripped it up...
Updated github Repo and the 7z.

This post was edited by wolfenswan (2013-03-21 12:35, ago)


Author Message


Posts: 6
Rank:


Level: Member

Country: de
Location: Hassia
Occupation:
Age:
In-game name: Solesurvivor

 
#5 Posted at 2013-03-31 17:41        
     
Hi, does not work for me eighter...

Ive tried to use this script with the "ambiente civillians expansion" module on the reshmaan province map. Spawns lots of civillians... but no one ever engaged me.

Module init code is:

[BIS_alice_mainscope,"ALICE_civilianinit",[{nul = [_this,"ran",100,50,west,1, 0.8,false] execVM 'ws_assassins.sqf'}]] call BIS_fnc_variableSpaceAdd;


Author Message


Posts: 13
Rank:


Level: Member

Country: mx
Location:
Occupation:
Age:
In-game name: A. Mayer

 
#6 Posted at 2013-04-30 22:03        
     
# wolfenswan : Description
Urban combat against regular forces is fun, but what's even more fun is the tension of not knowing if those angry looking civilians are harmless or carrying heat.

This script allows you to turn either specific civilians, all civilians in the mission and/or all civilians spawned by the ALICE module into hidden sleepers (with either a fixed or random chance of triggering).

They will wait until either a set amount of units of a specific site OR a specific unit (a VIP for example) are in their trigger-area and will then engage the target after a short while.

There is no way of telling if a civilian is dangerous or not from a distance as they are considered "civilian" in in-game terms until the moment they pull a gun (where the script adds them to a group of the opposing faction).

Usage
Instructions are included in the code itself.

ARMA 3:
By default the script is set up to run with ARMA 2, but the only thing you need to change are the weapon classes (for the randomized selection of small arms the sleepers may pull; an example is already in the script) and marker classes for the Debug mode (how-to in the script).

As soon as I figure out how exactly the new site modules work I might modify the code to work with them, similar to how it does with ALICE. For now you should be good by executing the script in "affect all" mode through a trigger after the mission has launched and the site modules have populated the towns.

Download:
ws_assassins.7z
ws_assassins on github (if in doubt this will always be the more recent version)
Most recent change: 22.03.2013

Video demonstration:
Youtube

GITHUB LINK BROKEN!!! 04/30/2013 16:06p.m. (Mexico city)
Hey Hi there!!
Im editing an ACE Insurgency mission in Fallujah. Tried Wölle's mip which dramatically performs better than the regular CA fmss of the regular ambient civs in-game module. Actually, I already have ALICE module on map with custom settings like "CivilianInit" to arm them with m4's, ieds, stones, m73a cn granades. Watched your video and im just eager to try it, lol. Of course, to make regular civs to engage wesy changed their friend relation to engage west, but your way seems to fit my needs. I'll report results later!!
This is just the thing I w
as s trying to find

Added 8 minutes later:

# Solesurvivor : Hi, does not work for me eighter...

Ive tried to use this script with the "ambiente civillians expansion" module on the reshmaan province map. Spawns lots of civillians... but no one ever engaged me.

Module init code is:

[BIS_alice_mainscope,"ALICE_civilianinit",[{nul = [_this,"ran",100,50,west,1, 0.8,false] execVM 'ws_assassins.sqf'}]] call BIS_fnc_variableSpaceAdd;

the string "ALICE_civilianinit" works for an object, array to add in the unit gear. but never to run settings which are related to custom variables like [_unit, "action", some distance, another range or distance, side, value, either skill either civilian count, value] (EXECV) which are called in a function file which overrides the regular BIS_fcn_variableSpaceAdd;
Maybe the syntax is wrong.

Added 24 minutes later:

wolfenswan :
Hey is there any chance to increase mags for this magic?

_weaponmag = (getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines")) select 0;

Added 1 minute later:

like this:
_this addMagazine "ACE_20Rnd_556x45_S_Stanag"; _this addMagazine "ACE_20Rnd_556x45_S_Stanag"; _this addMagazine "PMC_ied_v2"; _this addMagazine "PMC_ied_v2"; _this addMagazine "ACE_20Rnd_556x45_S_Stanag"; _this addMagazine "ACE_M7A3"; _this addMagazine "ACE_TORCH_C"; _this addMagazine "HandGrenade_Stone"; _this addMagazine "ACE_20Rnd_556x45_S_Stanag"; _this addWeapon "ACE_GlassesGasMask_RU"; _this addWeapon "ACE_M4_Aim";

Added 10 minutes later:

Ummmm wondering what if....
instead of "ran" I define the weapon classnames directly instead of using the definition variable " _weaponarr = ". lol if I fail I will just use your magical mags autoloader line.

Added 31 minutes later:

1ST REPORT
alice module init:

accordingly to the example:

For use with ALICE:
// Put this in the ALICE module init:
// [BIS_alice_mainscope,"ALICE_civilianinit",[{nul = [_this,"ran",number,number,side OR unitname,number of targets present (1-n), skill (0-1),false] execVM 'ws_assassins.sqf'}]] call BIS_fnc_variableSpaceAdd;

I have set this settings:

any of the spawned civilians is armed with any of the default weapons and will be potentially a killer when a single west unit is close to 10 meters and their attacking skill will be a random value between 0 and 0.3, for all spawned civilians.

[BIS_alice_mainscope,"ALICE_civilianinit",[{nul = [_this,"ran",100,1,west,1,random 0.3),true] execVM 'ws_assassins.sqf'}]] call BIS_fnc_variableSpaceAdd;


script already on mission folder & the module just fails to accept the init line.


Any suggestion??

This post was edited by A. Mayer (2013-04-30 23:23, ago)


Author Message


Posts: 41
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name: {god-father}

 
#7 Posted at 2013-05-21 14:26        
     
Great Script , works very well in A3 lets hope Salomone works out how to add stuff to Sites !


Author Message


Posts: 1
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#8 Posted at 2013-08-23 22:34        
     
I can't manage to get it working with Alice; the citizens don't become hostile. I'm using:
[BIS_alice_mainscope,"ALICE_civilianinit",[{nul = [_this,"ran",100,10,west,1,1,false] execVM 'ws_assassins.sqf'}]] call BIS_fnc_variableSpaceAdd;


Author Message


Posts: 9
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name: wolfenswan

 
#9 Posted at 2013-10-03 12:53        
     
Hey everyone. I knew I was forgetting something, turns out it was monitoring this thread :-[

Anyway, I've done some work on the script to optimize it's performance, clear it up and make it work nicer with ARMA 3.
Also civilians do not loose their waypoints and other commands anymore before they actually start engaging a target.
If you have civs spawning dynamically it should be enough to run the script again (or loop it and have it run every x seconds). It'll only touch the civilians that haven't been run through the script already (no matter if they have been made sleepers or not).

get it here:
https://github.com/Wolfenswan/ws_scripts/blob/master/ws_assassins.sqf

A known caveat with ARMA3 is that as civilian "uniforms" do not carry many magazines, most sleepers end up with only 2 mags. I didn't want to start randomly adding vests or changing uniforms but I guess it's necessary if you want to give the sleepers enough ammo for sustained firefights.

If I get around to it I'll make another video but on the surface it's still the same for the A2 release.


Author Message


Posts: 20729
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 45
In-game name: Foxhound

 
#10 Posted at 2013-10-03 21:10        
     
Thanks for the updated :-)
News is up on the frontpage and you can find our mirror here:




Author Message


Posts: 2
Rank:


Level: Member

Country: at
Location:
Occupation:
Age:
In-game name: Grumpy Old Man

 
#11 Posted at 2013-10-04 08:00        
     
Hey Wolfenswan, thanks for updating this awesome script!

I'm a longtime happy user of it and it really helps making your squadmates paranoid at all times!
This script changed escort missions and patrol missions for me. Making (suitable) missions without it feels just wrong.

Just registered to let you know that I might have discovered two minor issues that might have to do with the current A3 AI, not really sure:

With your recent update it seems like the sleepers are fleeing all the time, even when no shots were fired. When giving them Waypoints they are fleeing for random amounts of time, then return back to their initial spawn location just to start fleeing again. When setting the fleeing value in your script to 0 this is no longer the case, now it's working as intended.

Another small issue is that the sleepers forget about their targets if you're not in their field of view when they start engaging. Even with a skill of 1 they just won't turn around if the target is behind them, unless the target starts moving and therefor makes noise so they can spot the target.
I added a reveal command after line 285 so the target gets revealed to the sleeper with a rating of 4.
Currently I have to adjust this value for each mission, so sleepers won't get a full reveal on the target when it's darkest night and they don't have any NVGs on. My scripting knowledge is in no means good enough to add a daytime/weather check for the reveal value but maybe you could add something like that.

I really like the changes you made, especially since you can use sleepers with other scripts like ups or upsmon now, pushes replayability and tension to a whole new level!

Mach weiter so and keep up the good work! *THUMBS UP*


Author Message


Posts: 9
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name: wolfenswan

 
#12 Posted at 2013-10-04 15:06        
     
Thanks for the kudos and glad you enjoy it.

I noticed as well that sleepers tend to flee easily but haven't really found an aedaquate solution. I'm afraid it might be because of how A3 handles civilians/weapon-less units.

I also never really understood how the allowFleeing value works in the engine. It's pretty straightforward in theory but in practice results are all over the place.

Using reveal to make sure the sleeper knows about the target is a good idea. I think I'll implement sth. like that. Do you use greater distances for the sleepers to be "activated"? I've always had values of <10m in mind where a reveal of 4 would be reasonable even at night/storm.

Alternatively a "_unit lookAt _victim" before the target might be enough.

Added 1 hour 16 minutes later:

Updated the script.

I'm not still not really happy about how A3 civilians engage but I'm afraid it's outside my control. It's apparently down to the FSM as when I apply the script to run on a weapon-less non-civilian unit they engage much more reliably.

A workaround for this would be to write a small script that strips nato/csat/aaf/fia units naked and gives them random civilian clothes. By grouping them to a civilian group leader with probability 0% they'll also be considered part of the civilian faction and the script will touch them in "affect all" mode.

Allowfleeing seems to be a bit wonky as well when set to 1 at first and later set to 0. I'd suggest leaving it on a value < 1 by default.

I've also updated the way skill works:
It's now an (optional) modifier, while the real skills are defined in the _skillSet array inside the script. Instead of just setting one total skill the script now sets different values for accuracy, courage etc.

This post was edited by wolfenswan (2013-10-04 16:29, ago)


Author Message


Posts: 20729
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 45
In-game name: Foxhound

 
#13 Posted at 2013-10-05 10:31        
     
Thanks again for the updated version :-)
News is up on the frontpage and you can find our updated mirror here:




Author Message


Posts: 2
Rank:


Level: Member

Country: at
Location:
Occupation:
Age:
In-game name: Grumpy Old Man

 
#14 Posted at 2013-10-05 14:28        
     
Well that was a quick update!

According to the wiki an "allowfleeing" value of 1 means constant fleeing:
http://community.bistudio.com/wiki/allowFleeing

I always thought of it as an on/off thing but apparently it's more complicated like that.
What I also encountered was that civilians will just look at you after engaging, even with their weapons drawn.

For revealing I always used 4, since my usual trigger area for this script is below 10m. So if you're patroling a town and walk past a civilian you'll never know if he's pulling a gun behind your back, which leads to another point:

Civilians announce it when engaging their targets. Which takes away the moment of surprise.

I can't wrap my head around a solution other than changing the assassins behaviour to stealth which makes them more quiet, but at 10m you still can hear them. On top of that you need to fix their stance to standing upright or they will waste time going prone which makes them stand out in a crowd aswell.
On the other hand it's eerie as hell hearing someone whispering right behind you and opening fire shortly afterwards.

Now I tried it with grouping a soldier to a 0% civilian and came to the same results as you. They engage much better but I guess the doTarget/doFire command is messing it up somehow. Especially the loop at lines 307-309 makes them fire blindly.
I disabled lines 285 and the loop at 307-309 in your most recent version and the results were a bit more reliable.
I think it's actually possible that forcing a unit to fire could mess up the FSM routine somehow. Could that be?

Cheers :-)


Author Message


Posts: 9
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name: wolfenswan

 
#15 Posted at 2013-10-15 15:28        
     
I think it's actually possible that forcing a unit to fire could mess up the FSM routine somehow.

Well the loop just bruteforces them to engage, which appears to be the only option when not using non-civilian units. I'm happy to remove it though if field tests suggest so, I've yet to implement it in a proper mission of mine.

Forcing them to go Stealth is an interesting solution for the yelling, I might implement that in the next update.