Jump to content
Sign in to follow this  
wolffy.au

cB - BIS Ambient Civilians, Custom CityCenters and HouseEffects hack

Recommended Posts

Download:

http://creobellum.org/node/183

Some other work I've recently done is trying to get custom CityCenters to work. These are useful if you're trying to populate "empty" towns when using ALICE2.

To use these, first you need to patches, found in the CA folder in the demo missions. Just copy the CA folder to your mission directory.

To place a custom CityCenter, use the GameLogic/Location objects in the editor, name the object (eg loc_1) and place the following in the INIT:

this setVariable ["name", "Lighthouse"];
this setVariable ["demography", ["CIV",0,"CIV_RU",1]];

You only need the Demography setting, if its anything other than Takistan Civilians.

Then in your ALICE2 and Ambient Civilian Vehicles modules inthe Editor, place the following in their INIT:

this setVariable ["townlist",[[],loc_1,loc_2,loc_3]];
this setvariable ["debug",true];

Use the Debug flag if you want to see markers of all the civilians and vehicles.

Lastly, you will need to override the BIS_fnc_locations function with my patched version. In the Functions module, add the following to the INIT:

BIS_fnc_locations = compile preprocessFileLineNumbers "CA\modules\functions\systems\fn_locations.sqf";

The HouseEffects hack basically lights up windows in houses at night and chimney smoke, when playing on Utes or Chernarus.

Changes made:

  • Fixed a number of syntax bugs in ALICE2 and SYLVIE
  • Added ability for ALICE2 to spawn units in ALICE1 buildings (AIDoors on Utes/Chernarus)
  • Added debug on ALICE2 Traffic
  • Fixed ALICE2 Traffic despawn only when players are not around
  • Fixed debug markers of custom locations in BIS_fnc_locations

Edited by Wolffy.au

Share this post


Link to post
Share on other sites

Many thanks I just could not get the normal one to populate the island I have had a quick try of your package and I must say kudos I set up a few markets in the OA map and it is very very good Ill be keeping an eye open for any of the other modules you start tweaking I already have the Animals you released again many thanks for your hard work in this project

Been playing around with it and it fill almost every house that is amazing but is there any way to get more them on the streets and not so many in the houses or do they move out of the houses if left long enough Ill just have to try more testing, are the any of the other commands working with this module like

BIS_alice_mainscope setvariable ["civilianCount","round (%1 / 10)"];

BIS_silvie_mainscope setvariable ["vehicleRarity",["skodaRed",10,"skodaBlue",0.8]];

and this sort of thing or is this writen from the ground up ?

Edited by longskater

Share this post


Link to post
Share on other sites

Whether they hide in their houses or run around is dependent on the town's respect for your faction. If someone died, you'll notice everyone will hide in their houses. Enable the debug markers and you'll see what I mean.

All those settings can be found here:

http://community.bistudio.com/wiki/Ambient_Civilians

http://community.bistudio.com/wiki/Ambient_Civilian_Vehicles

Here are my personal preferences:

// See [url]http://community.bistudio.com/wiki/Ambient_Civilians[/url]

// Enables debug markers
BIS_alice_mainscope setvariable ["debug",true, true];

// Increase spawn distance for ALICE2 traffic
BIS_alice_mainscope setvariable ["trafficDistance",1000, true];

// Reduce unit count formula to try to reduce number of civilian units
BIS_alice_mainscope setvariable ["civilianCount","round (3 * (sqrt %1))", true];

// Dumb down civilian units to use less CPU (see [url]http://creobellum.org/node/175[/url])
[bIS_alice_mainscope,"ALICE_civilianinit",[{_this setSkill 0},{{_this disableAI _x} count ["AUTOTARGET","TARGET"]},{_this allowFleeing 1;},{removeAllWeapons _this;},{removeAllItems _this;}]] call BIS_fnc_variableSpaceAdd;

// Add some rare english speaking civilians to the mix for intelligence gathering
BIS_alice_mainscope setVariable ["townsFaction",["BIS_TK_CIV","BIS_CIV_special"], true];
[bIS_alice_mainscope, "civilianRarity",["CIV_EuroWoman01_EP1", 0.05, "CIV_EuroWoman02_EP1", 0.05, "Dr_Annie_Baker_EP1", 0, "Rita_Ensler_EP1", 0, "CIV_EuroMan01_EP1", 0.05, "CIV_EuroMan02_EP1", 0.05, "Haris_Press_EP1", 0, "Dr_Hladik_EP1", 0, "Citizen2_EP1", 0.05, "Citizen3_EP1", 0.05, "Profiteer2_EP1", 0.05, "Functionary1_EP1", 0.05, "Functionary2_EP1", 0.05]] call BIS_fnc_variableSpaceAdd;

// These last two change the behaviour of the civvies. If you kill one, you'll notice they'll all go hide in their houses.
// Artificial coeficient to set how much will be town's respect decreased once some civilian is hit or killed.
// The higher the number is, the more is respect towards killer's faction decreased. 
BIS_alice_mainscope setvariable ["respectModifyCoef", 0.7, true]; 

// Value which is removed from town threat every 5 seconds (until threat reaches 0) 
BIS_alice_mainscope setvariable ["threatDecay", 0.000005, true];

// http://community.bistudio.com/wiki/Ambient_Civilian_Vehicles

// Enables debug markers
BIS_silvie_mainscope setvariable ["debug",true, true];

// Reduce vehicle count formula to try to reduce number of civilian vehicles
BIS_silvie_mainscope setvariable ["vehicleCount","round ((sqrt %1) * 0.5)", true];

// adds OA motorbikes and bicycles to Ambient Vehicles
BIS_silvie_mainscope setvariable ["vehicleRarity",["TT650_TK_CIV_EP1",0,"Old_bike_TK_CIV_EP1",0,"Old_moto_TK_Civ_EP1",0], true]; 

// randomly lock and vary fuel
BIS_silvie_mainscope setvariable ["vehicleInit",{if (random 1>0.2) then {_this lock true} else {_this  setfuel (random 1)}}, true];

Share this post


Link to post
Share on other sites
I've been wondering ... will this work with the Sahrani civilians addon too?

There are a few dependencies such as demography of the towns and factions of the units.

These are your best bet to play around with.

// Add some rare english speaking civilians to the mix for intelligence gathering
BIS_alice_mainscope setVariable ["townsFaction",["BIS_TK_CIV","BIS_CIV_special"], true];
[bIS_alice_mainscope, "civilianRarity",["CIV_EuroWoman01_EP1", 0.05, "CIV_EuroWoman02_EP1", 0.05, "Dr_Annie_Baker_EP1", 0, "Rita_Ensler_EP1", 0, "CIV_EuroMan01_EP1", 0.05, "CIV_EuroMan02_EP1", 0.05, "Haris_Press_EP1", 0, "Dr_Hladik_EP1", 0, "Citizen2_EP1", 0.05, "Citizen3_EP1", 0.05, "Profiteer2_EP1", 0.05, "Functionary1_EP1", 0.05, "Functionary2_EP1", 0.05]] call BIS_fnc_variableSpaceAdd;

Share this post


Link to post
Share on other sites

Ok Im using this and a few questions:

1) can I adjust only one towns spawn distance?

2) can I modify(adjust variables) the spawn count in a script to be ran during only that mission?

Thanks for this though, so far its looking pretty good. Good luck sniping the target I have picked out LOL. There should be so many civvies running around its going to be ridiculous...

Share this post


Link to post
Share on other sites

Yes to both. Use 'bis_alice_mainscope setVariable ["spawnDistance", 400]' to adjust for all towns and the civilianCount variable for the spawn count.

Share this post


Link to post
Share on other sites

thanks for the quick reply buddy.

so what am I supposed to just put in the standard format commands into my scripts?

BIS_alice_mainscope setvariable ["spawnDistance",800];
BIS_alice_mainscope setvariable ["civilianCount","round (%1 / 10)"];

So they are global and I can change them whenever I want?

also im having trouble with this:

BIS_loc_acityc_kozlovka setvariable ["ALICE_populationCoef",1];

Where can I find the BIS_loc town names list?

Again thanks a lot.

**How do you turn off a force population? I plan to force the population on task assignent, I need to turn it off on completion. ?**

Ive had to continue on to other objectives but this is going to be used a lot in my mission. I cant figure this out tho, help!?

Edited by WildFire8

Share this post


Link to post
Share on other sites

Hello Wolffy !

I got a question. Code 34 uses alice in his "war in takistan " mission . now i ported it to duala and i wanna use icebreakr's duala civillians.

Code did'nt place any alice module in the editor, afaik he put some code into a sqf, that looks like this :

wcalice = createGroup civilian;
wccivilianmodule = wcalice createUnit ["Alice2Manager",[0,0,0],[],0,"NONE"];
wccivilianmodule setVariable ["townlist", wcadd];

Do you have any clue how to modify this for my needs or can u give me a hint?

i already tried this:

this setVariable ["demography", ["CIV_AFR",0]];

But i'm not that familiar with alice. Also, when i change Alice2Manager to AliceManager (first arma2 version) , some cherna guys and women respawn, but they are also inside houses, and it seems they cannot get out, 'cause on duala you can't get into most of the buildings..

Would be great if you could help me

edit: it seems to be combined with that warcontext -engine

Share this post


Link to post
Share on other sites

Wolffy, Do the civilians get into cars and drive around? Can I force them to use vehicles more, I would really like to see them driving between towns. Cheers, Jas

Edited by WallyJas

Share this post


Link to post
Share on other sites

ok should be fine then ..... anyway of forcing more civies to use the cars?

Share this post


Link to post
Share on other sites

Greet. How do to make to they in data place civilians did not create? in Ambient Animals BIS_ARZ_0 is. It and how does look in Ambient Civilians?

Edited by artek3333

Share this post


Link to post
Share on other sites
ok should be fine then ..... anyway of forcing more civies to use the cars?

Nah, not really. In the latest version of Module Improvement Project (http://dev-heaven.net/projects/mip) I made traffic proportional to population, so more people in the town, more traffic you'll see.

Greet. How do to make to they in data place civilians did not create? in Ambient Animals BIS_ARZ_0 is. It and how does look in Ambient Civilians?

There appears to be a "blacklist" variable in ALICE2, (probably the same as Ambient Vehicles), but I can't confirm if it works. There is no mention of it on the WIki page (http://community.bistudio.com/wiki/Ambient_Civilians) so it may be a "hidden feature". :)

Share this post


Link to post
Share on other sites

Can that civilians are not formed by a class of buildings, for example.

BIS_silvie_mainscope setvariable ["blackList",["house1","house2"]];

Can to civilians formed only in a specific place in BIS_zora_0 For example..

this setvariable ["townlist",[bIS_zora_0,BIS_zora_1]];

Command does not work

this setvariable ["blackList",[bIS_zora_0,BIS_zora_1]];
which stops the creation of civilians in BIS_zora_0.

I do not know how the command is to be :(

Edited by artek3333

Share this post


Link to post
Share on other sites
I do not know how the command is to be :(

I don't think the command works unfortunately.

Share this post


Link to post
Share on other sites
Hello Wolffy !

I got a question. Code 34 uses alice in his "war in takistan " mission . now i ported it to duala and i wanna use icebreakr's duala civillians.

Code did'nt place any alice module in the editor, afaik he put some code into a sqf, that looks like this :

wcalice = createGroup civilian;
wccivilianmodule = wcalice createUnit ["Alice2Manager",[0,0,0],[],0,"NONE"];
wccivilianmodule setVariable ["townlist", wcadd];

Do you have any clue how to modify this for my needs or can u give me a hint?

i already tried this:

this setVariable ["demography", ["CIV_AFR",0]];

But i'm not that familiar with alice. Also, when i change Alice2Manager to AliceManager (first arma2 version) , some cherna guys and women respawn, but they are also inside houses, and it seems they cannot get out, 'cause on duala you can't get into most of the buildings..

Would be great if you could help me

edit: it seems to be combined with that warcontext -engine

Fruity_Rudy, I'm not exactly sure what you're trying to do, but I have no problem spawning Icebreakr's African civilians into custom town centers (http://forums.bistudio.com/showpost.php?p=1625271&postcount=25) by putting

this setVariable ["demography", ["CIV_AFR",0]];

into each town center.

Hope this helps.

Share this post


Link to post
Share on other sites

This is awesome, however, how would I get civilians to spawn in the woods?

I want random civilians to be in the woods away from towns when the player enters the woods there is a chance for several civilians to be wandering about.

I guess all I need to know is if it's possible with the alice, and if so, would it be possible to have alice just spawn civ's at a marker(s) placed where I want them?

Thanks in advance for any help :)

Edited by enforcer_dayzeast

Share this post


Link to post
Share on other sites

can anyone explain what "demography" setting means? is the value RARITY? or FREQUENCY?

this setVariable ["demography", ["CIV_AFR",0]]; spawns AFR civs implies that 0 is rarity, and so 0 means a lot of them

i'm trying to spawn vietnamese civs in unsung maps and having a nightmare - and so trying to pick this all apart one item at a time

i've made a house under each village as a fake door, used wollfy's patched code, and i can occasionally spawn russian civs

i have added this to the init of my mission (is that right?)

BIS_alice_mainscope setVariable ["townsFaction",["UNSUNG_C"], true];

my logics look like this

class Item28

{

side="LOGIC";

class Vehicles

{

items=1;

class Item0

{

position[]={-994.20197,1.6229893,1239.9241};

id=260;

side="LOGIC";

vehicle="Alice2Manager";

lock="UNLOCKED";

skill=0.60000002;

text="civtownarray";

init="this setvariable [""townlist"",[[],town1,town2,town3,town4,town5,town6,town7,town8,town9,town10,town11,town12,town13,town14,town15,town16,town17,town18,town19,town20,town21,town22,town23,town24,town25,town26,town27,town28,town29,town30,town31,town32,town33,town34]]; ";

};

};

};

etc

class Item0

{

position[]={912.21375,9.7473392,449.1011};

azimut=140;

id=264;

side="LOGIC";

vehicle="LocationLogicCityCenter";

leader=1;

skill=0.60000002;

text="town1";

init="this setVariable [""name"", ""Town1""];this setVariable [""demography"", [""CIV"",1,""UNSUNG_C"",0]];";

};

can anyone help?

Edited by eggbeast

Share this post


Link to post
Share on other sites

eggbeast, this download is no longer available, and I believe Wolffy.au refers to the MIP. I'm currently looking at the code in MSO, which I believe is based on the MIP work.

Here's a couple of suggestions:

1. Use only one or the other, this setVariable ["demography", ["UNSUNG_C",0]] in the LocationLogicCityCenter, or this setVariable ["townsFaction",["UNSUNG_C"], true] in the Alice2 logic init field. The "demography" variable will override the "townsFaction" variable if it exists.

If you want to use BIS_alice_mainscope setVariable ["townsFaction",["UNSUNG_C"], true], you'll need to wait until BIS_alice_mainscope exists...

2. Get rid of the empty array in your townlist:

this setvariable [""townlist"",[[color="#FF0000"][][/color],town1,town2,town3,town4,town5,town6,town7,town8,t own9,town10,town11,town12,town13,town14,town15,tow n16,town17,town18,town19,town20,town21,town22,town 23,town24,town25,town26,town27,town28,town29,town3 0,town31,town32,town33,town34]];

Here's a couple of decent posts which may offer some help:

Super Simple Ambient Civilians on any map

Clayman - ALICE and SILVIE modules working on a custom island

And Wolffy's patch request:

Patch Submission: ALICE2 fixed on Chernarus/Utes

Edited by panther42

Share this post


Link to post
Share on other sites

it totally works panther - you totally rock man!!! :D

woohoo cheers!

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
Sign in to follow this  

×