Jump to content

Recommended Posts

y4mpn9DA9JUk7NbUTbXAFMXj2W3dL-W1wap2rNvb

 

Engima's Civilians v0.90.40

by Engima

 
Description:
Engima's Civilians is a script that adds dynamic civilians to an Arma 3 mission. Civilians spawn near player(s) and are removed again when they are far away. Works on maps with enterable buildings.

You can customize how many civilians there will be, civilian units classes, the maximum number of groups to use, minimum spawn distance, maximum spawn distance, and blacklist markers to define areas where no civilians will be. You also add callbacks if you want to do something when units spawn or being removed.

Script works in singleplayer, multiplayer, hosted, dedicated, for JIPs, and on any map with enterable buildings.

Media:
Youtube video - How to create a quick mission with civilians.
https://youtu.be/OVirxev6wjw

Download:
Download Link at Armaholic.
Also released as CPack Engima.Civilians for the TypeSqf Editor.
 
Installation:
Manually:
1. Copy folder "Engima" to root of your mission folder.
2. Create the file "init.sqf" in your mission folder (if you don't already have it). Add the following line to the top of the init.sqf:

call compile preprocessFileLineNumbers "Engima\Civilians\Init.sqf";

3. Customize the script in the file "Engima\Civilians\ConfigAndStart.sqf".
 
TypeSqf
1. Open the CPack console and run command "install Engima.Civilians".

Usage:
Here is the simplest example that starts the civilian script with all default parameters. This code is to be put in Engima\Civilians\ConfigAndStart.sqf.

[] spawn ENGIMA_CIVILIANS_StartCivilians;

Here is an example that uses all parameters and first saves them in a variable named "_parameters". The function call (or spawn) that starts the civilian script is beneath. This code are to be put in Engima\Civilians\ConfigAndStart.sqf.

// Set civilian parameters.
_parameters = [
    ["UNIT_CLASSES", ["C_man_1", "C_man_1_1_F", "C_man_1_2_F"]],
    ["UNITS_PER_BUILDING", 0.1],
    ["MAX_GROUPS_COUNT", 100],
    ["MIN_SPAWN_DISTANCE", 50],
    ["MAX_SPAWN_DISTANCE", 500],
    ["BLACKLIST_MARKERS", []],
    ["HIDE_BLACKLIST_MARKERS", true],
    ["ON_UNIT_SPAWNED_CALLBACK", {}],
    ["ON_UNIT_REMOVE_CALLBACK", { true }],
    ["DEBUG", true]
];

// Start the civilian script
_parameters spawn ENGIMA_CIVILIANS_StartCivilians;

Documentation and a complete reference of set up parameters can be found in file "Engima\Civilians\Documentation.txt".

How to update from older version:
Manually:
1. Back up your own customization file (Engima\Civilians\ConfigAndStart.sqf).
2. Replace the folder Engima\Civilians with the corresponding folder in the download package.
3. Replace the original ConfigAndStart.sqf with your own ConfigAndStart.sqf that was backed up in step 1.

TypeSqf:
1. Open the CPack console and run command "update Engima.Civilians".

Change log:
v0.90.40
- First version.
 
Requirements:
Arma 3.

Other releases
Engima's Traffic
Engima's Simple Tasks
The ASCOM protocol

  • Like 8
  • Thanks 3

Share this post


Link to post
Share on other sites

Nice work , a quick question what do the civ's do when they detect gunfire do they run and hide or just stand there like idiots and block you  :)

 

Would be awesome to interact with them at some point .

Share this post


Link to post
Share on other sites

For now they act by Arma 3 default behaviour, i.e. lay down, crawl away. This is v0.9 though, so I have some idéas of improving behaviours in different situations as well as including more personalities.

You can interact with them if you write an "interaction callback".

  • Like 1

Share this post


Link to post
Share on other sites

Does this support headless clients? As in have the option to run the script and the related AI on a separate HC all together without having to worry about load other than what the civilian entities would cause on their own on the server?

Share this post


Link to post
Share on other sites

@enigma

Can they "simulate" some behaviours like chating each other, watching on something, simple staying, car usage?

I ask because on the movie i see each of them only wandering in area.

 

Can you add to UNIT_CLASSES as default all civilian classes of A3? Of course i can do it by myself but I think it would be reasonable to not making not neccesary effort :)

Share this post


Link to post
Share on other sites

@enigma

Can they "simulate" some behaviours like chating each other, watching on something, simple staying, car usage?

I ask because on the movie i see each of them only wandering in area.

Can you add to UNIT_CLASSES as default all civilian classes of A3? Of course i can do it by myself but I think it would be reasonable to not making not neccesary effort :)

I'm trying right now to add using external scripts some random animations,it would be really nice to improve them and add car usage(basically,an actual npc)!

Share this post


Link to post
Share on other sites

This and your traffic script are real game changers for making missions.  Loved your original escape mission for A2 engima.  Thank you so much for these scripts  B)

Share this post


Link to post
Share on other sites

Does this support headless clients? As in have the option to run the script and the related AI on a separate HC all together without having to worry about load other than what the civilian entities would cause on their own on the server?

No. Not if you mean this: https://community.bistudio.com/wiki/Arma_3_Headless_Client

Share this post


Link to post
Share on other sites

Cool....but how I download this?....

Download link at Armaholic now added. I had to wait for Armaholic update.

  • Like 1

Share this post


Link to post
Share on other sites

@enigma

Can they "simulate" some behaviours like chating each other, watching on something, simple staying, car usage?

I ask because on the movie i see each of them only wandering in area.

 

Can you add to UNIT_CLASSES as default all civilian classes of A3? Of course i can do it by myself but I think it would be reasonable to not making not neccesary effort :)

 

This is version 0.9. I intend to extend the script with more personalities with some of the things you mention. For now they are all "citizens", which means they spawn in houses and either move to another house or moves to a random position to just watch or wait a few minutes. I have thoughts on adding "friends" that when they see each other they will stop together, maybe one or another group. They cannot use cars, but you can use this script together with script "Engima's Traffic" if you want civilians driving around (https://forums.bistudio.com/topic/186976-engimas-traffic-script-release/?hl=engima%26%2339%3Bs+traffic).

 

The default unit classes are all civilians in Arma 3 (DLCs excluded).

Share this post


Link to post
Share on other sites

Download link at Armaholic now added. I had to wait for Armaholic update.

Thank you!!!!!! This + traffic=VERY cool!!!

Share this post


Link to post
Share on other sites

This is version 0.9. I intend to extend the script with more personalities with some of the things you mention. For now they are all "citizens", which means they spawn in houses and either move to another house or moves to a random position to just watch or wait a few minutes. I have thoughts on adding "friends" that when they see each other they will stop together, maybe one or another group. They cannot use cars, but you can use this script together with script "Engima's Traffic" if you want civilians driving around (https://forums.bistudio.com/topic/186976-engimas-traffic-script-release/?hl=engima%26%2339%3Bs+traffic).

 

The default unit classes are all civilians in Arma 3 (DLCs excluded).

 

I am litlle bit supraised there are only three classes of civs but other side it is not so strange...

You should bold info that there is another script. If you hadn't mentioned about it, I hadn't knew.

Are there any others?

I wait for version 1.0. Good ambient module is wanted!

Share this post


Link to post
Share on other sites

Ok, the text above is just an example. The first example (without parameters) use all a3 civ classes as default. The second one is an example of when the developer has limited the the classes to three (I didn't want all 40 classes in the example). Check the original file in the package, it has them all.

Thanks for the idéa of listing my other scripts if someone might be interested. Yes, there are some more. I will do that.

  • Like 1

Share this post


Link to post
Share on other sites

Engima, could we use this script for simulating an occupation?  Use Opfor classnames for random occuping / patrolling units?

 

The classnames don't have to be civilians do they?

Share this post


Link to post
Share on other sites

Well, maybe it should work. I have not tested it with other units than civilians, but if you look in Engima\Civilians\Init.sqf you find some variables that can be tweaked. There is one for side and two for skill, so maybe it will be that easy. However, these will be one unit in each group (if you don't add more using the spawn callback), and their combat behaviour will be quite Arma 3 default.

I guess I have a script that would be better for you. It is called Engima.PatrolledAreas and is a little more on the subject. It is not released on Armaholic though, but you can get it if you download it with the TypeSqf editor. Here is the editor and here is the script

  • Like 1

Share this post


Link to post
Share on other sites

Thanks engima for writing this script, really adds a missing level of ambience. I also add RDS civilians into it, more variety. Of course if I load a mideastern map all those civvies suddenly look out of place haha.

Share this post


Link to post
Share on other sites

Thanks engima for writing this script, really adds a missing level of ambience. I also add RDS civilians into it, more variety. Of course if I load a mideastern map all those civvies suddenly look out of place haha.

Not tested, but if you change the "UNIT CLASSES" in the ConfigAndStarts.sqf you should be able to use other civis...like the ones from any Taliban-middle eastern-Takistan popular mods.....shouldn't it?

Share this post


Link to post
Share on other sites

Great script Engima! 

 

One question though, I'm struggling to spawn civies with an 'addAction'... I tried to follow instructions from the documentation file, but with no success. 

 

The original line was 

talk = _this addAction ["Talk", "talk\talk_init.sqf", [true, false, false, false]];

Any suggestion on what I should try? 

Share this post


Link to post
Share on other sites

Argument sent into callback is an array. Unit is first element:

_talk = (_this select 0) addAction ["Talk", "talk\talk_init.sqf", [true, false, false, false]];

Share this post


Link to post
Share on other sites

Well, maybe it should work. I have not tested it with other units than civilians, but if you look in Engima\Civilians\Init.sqf you find some variables that can be tweaked. There is one for side and two for skill, so maybe it will be that easy. However, these will be one unit in each group (if you don't add more using the spawn callback), and their combat behaviour will be quite Arma 3 default.

I guess I have a script that would be better for you. It is called Engima.PatrolledAreas and is a little more on the subject. It is not released on Armaholic though, but you can get it if you download it with the TypeSqf editor. Here is the editor and here is the script

 

Yep, that script is pretty much the behavior I was looking for.  Thank you sir, much appreciated!

Share this post


Link to post
Share on other sites

Argument sent into callback is an array. Unit is first element:

 

_talk = (_this select 0) addAction ["Talk", "talk\talk_init.sqf", [true, false, false, false]];

Works perfectly! Thanks! 

Share this post


Link to post
Share on other sites

Not tested, but if you change the "UNIT CLASSES" in the ConfigAndStarts.sqf you should be able to use other civis...like the ones from any Taliban-middle eastern-Takistan popular mods.....shouldn't it?

 

Yes, that is correct.

  • 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

×