Jump to content
Sign in to follow this  
opendome

BIS_alice_mainscope setVariable ["vehicleRarity" not working

Recommended Posts

Hi everyone!

 

Im trying to prevent alice from spawning these unsung civilians. Im using this code

 

 

BIS_alice_mainscope setVariable ["vehicleRarity",["uns_civ_doctor",10,"uns_civ_gvt_m",10,"uns_civ_gvt_f",10,"uns_civ_town_m",10,"uns_civ_town_f",10,"uns_civ_town_m2",10,"uns_civ_town_f2",10]]; 

 

but it doesn't seem to work?

Share this post


Link to post
Share on other sites

I think the Wiki has a typo, try "civilianRarity" instead of "vehicleRarity"

Share this post


Link to post
Share on other sites

Thanks for the reply! Unfortunately I tried that as well but Im having the same issue, it almost seems like its spawning more of those

Share this post


Link to post
Share on other sites

Try other values than 10, like 0 or -1.

 

Alice and Silvie have been exhibiting some strange behaviour under the latest patches.

 

What sort of mission do you have? Maybe there's another way to go?

Share this post


Link to post
Share on other sites

Hmmm yea its been a struggle every step of the way thats for sure. Im trying to make an MSO Vietnam mission (http://www.armaholic.com/page.php?id=13336) and it uses the (AEF)Wolffy.au Civ Setup Script

 

//////////////////////////////////////////////////////////////////
// Function file for Armed Assault
// Created by: (AEF)Wolffy.au
// Created: 20110315
// Modified: 20110926
// Purpose: Setup amibent civilian module
///////////////////////////////////////////////////////////////////
 
waitUntil{!isNil "BIS_fnc_init"};
waitUntil{!isNil "BIS_alice_mainscope"};
 
// Override default BIS_ALICE2_fnc_civilianSet function with MIP patch
// - Fixed issues with units spawning on roofs in Chernarus
// - Fixed some typos
// - Added bis_alice_emptydoor code for A2 building compatibility
// - Reduced default AI skill for less CPU
// - Changed unit speed to LIMITED
 
//BIS_alice_mainscope setVariable ["debug", true];
 
// list of places where civilians will be spawned. Can be location logic (created by BIS_fnc_locations), array in format [center,distance] or trigger. 
// BIS_alice_mainscope setVariable ["townlist",[bis_loc_acityc_mogilevka,[position this,3000],trigger1],t1,t2,23,t4]; 
 
// distance of player(s) to town logic (in metres) in which system is starting to spawn civilians. 
// BIS_alice_mainscope setVariable ["spawnDistance", 400]; 
 
// distance of player(s) to town logic (in metres) in which system is starting to spawn civilian traffic. 
// BIS_alice_mainscope setVariable ["trafficDistance", 500]; 
 
// Changing civilian rarity numbers (e.g. to have villagers spawned in cities, or to disable spawning of given class completely with unusual number like 10). Default rarity numbers are set in config under rarityUrban value (in range from 0/village to 1/city) 
// BIS_alice_mainscope setVariable ["civilianRarity",["uns_civ_doctor",10,"uns_civ_gvt_m",10,"uns_civ_gvt_f",10,"uns_civ_town_m",10,"uns_civ_town_f",10,"uns_civ_town_m2",10,"uns_civ_town_f2",10]]; 
 
// formula on which basis system calculates number of civilians for locations. %1 is number of buildings with door (memory points called "AIDoor1", "AIDoor2", ...) in 500 metres from location. 
// BIS_alice_mainscope setVariable ["civilianCount","round (4 * (sqrt %1))"]; 
 
switch toLower(worldName) do {
        case "chernarus": { 
                BIS_alice_mainscope setvariable ["trafficDistance",1000];
                BIS_alice_mainscope setvariable ["spawnDistance",800];
BIS_alice_mainscope setvariable ["ALICE_townsize",800];
                BIS_alice_mainscope setVariable ["townsFaction",["CIV","CIV_RU"]];
BIS_alice_mainscope setVariable ["civilianCount","round (2 * (sqrt %1))"];
        };        
        case "eden": {                
                BIS_alice_mainscope setvariable ["trafficDistance",700];                
                BIS_alice_mainscope setvariable ["spawnDistance",600];                
BIS_alice_mainscope setvariable ["ALICE_townsize",600];
                BIS_alice_mainscope setVariable ["townsFaction",["cwr2_civ","CIV","CIV_RU"]];                
        };
        case "fallujah": {                
                BIS_alice_mainscope setvariable ["trafficDistance",800];      
                BIS_alice_mainscope setvariable ["spawnDistance",600];      
BIS_alice_mainscope setvariable ["ALICE_townsize",600];
                BIS_alice_mainscope setVariable ["townsFaction",["BIS_TK_CIV"]];
};  
        case "mcn_hazarkot": {
                BIS_alice_mainscope setvariable ["trafficDistance",500];
                BIS_alice_mainscope setvariable ["spawnDistance",400];
BIS_alice_mainscope setvariable ["ALICE_townsize",400];
                BIS_alice_mainscope setVariable ["townsFaction",["BIS_TK_CIV"]];
//BIS_alice_mainscope setVariable ["civilianCount","round (2 * (sqrt %1))"];
        };       
        case "isladuala": {      
                BIS_alice_mainscope setvariable ["trafficDistance",1000];             
                BIS_alice_mainscope setvariable ["spawnDistance",700];            
BIS_alice_mainscope setvariable ["ALICE_townsize",700];
                BIS_alice_mainscope setVariable ["civilianCount","round (5 * (sqrt %1))"];   
        };       
        case "lingor": { 
                BIS_alice_mainscope setvariable ["trafficDistance", 500];
                BIS_alice_mainscope setvariable ["spawnDistance", 400]; 
BIS_alice_mainscope setvariable ["ALICE_townsize",400];
                BIS_alice_mainscope setVariable ["townsFaction", ["CIV_LGR"]]; 
                BIS_alice_mainscope setVariable ["civilianCount", "round (1.5 * (sqrt %1))"]; 
        }; 
        case "takistan": {   
                BIS_alice_mainscope setvariable ["trafficDistance",1000]; // default 500
                BIS_alice_mainscope setvariable ["spawnDistance",800]; // default 400
BIS_alice_mainscope setvariable ["ALICE_townsize",800]; // default 266.667
BIS_alice_mainscope setVariable ["civilianCount","round (2 * (sqrt %1))"]; // default round (4 * (sqrt %1))
                // Add some rare english speaking civilians to the mix
                BIS_alice_mainscope setVariable ["townsFaction",["BIS_TK_CIV"]];
        };   
        case "torabora": {       
                BIS_alice_mainscope setvariable ["trafficDistance",1500];       
                BIS_alice_mainscope setvariable ["spawnDistance",600];        
BIS_alice_mainscope setvariable ["ALICE_townsize",600];
                BIS_alice_mainscope setVariable ["townsFaction",["BIS_TK_CIV"]];  
        };
        case "utes": {        
                BIS_alice_mainscope setvariable ["trafficDistance",650];      
                BIS_alice_mainscope setvariable ["spawnDistance",500];       
BIS_alice_mainscope setvariable ["ALICE_townsize",500];
                BIS_alice_mainscope setVariable ["townsFaction",["CIV","CIV_RU"]];  
BIS_alice_mainscope setVariable ["civilianCount","round (2 * (sqrt %1))"];
        };
        case "zargabad": { 
                BIS_alice_mainscope setvariable ["trafficDistance",750];      
                BIS_alice_mainscope setvariable ["spawnDistance",600];      
BIS_alice_mainscope setvariable ["ALICE_townsize",600];
                BIS_alice_mainscope setVariable ["civilianCount","round (2 * (sqrt %1))"];   
                // Add some rare english speaking civilians to the mix            
                BIS_alice_mainscope setVariable ["townsFaction",["BIS_TK_CIV"]];  
                //[bIS_alice_mainscope, "civilianRarity",["CIV_EuroWoman01_EP1", 5, "CIV_EuroWoman02_EP1", 5, "Dr_Annie_Baker_EP1", 10, "Rita_Ensler_EP1", 10, "CIV_EuroMan01_EP1", 5, "CIV_EuroMan02_EP1", 5, "Haris_Press_EP1", 10, "Dr_Hladik_EP1", 10, "Citizen2_EP1", 5, "Citizen3_EP1", 5, "Profiteer2_EP1", 5, "Functionary1_EP1", 5, "Functionary2_EP1", 3]] call BIS_fnc_variableSpaceAdd;
        };
        case "mbg_celle2": {
            BIS_alice_mainscope setvariable ["trafficDistance",1000];                
                BIS_alice_mainscope setvariable ["spawnDistance",700];                
BIS_alice_mainscope setvariable ["ALICE_townsize",700];
                BIS_alice_mainscope setVariable ["townsFaction",["CIV","CIV_RU"]];                
BIS_alice_mainscope setVariable ["civilianCount","round (1.5 * (sqrt %1))"]; 
        };
case "clafghan": {   
                BIS_alice_mainscope setvariable ["trafficDistance",1200]; // default 500
                BIS_alice_mainscope setvariable ["spawnDistance",800]; // default 400
BIS_alice_mainscope setvariable ["ALICE_townsize",800]; // default 266.667
BIS_alice_mainscope setVariable ["civilianCount","round (2 * (sqrt %1))"]; // default round (4 * (sqrt %1))
                // Add some rare english speaking civilians to the mix
                BIS_alice_mainscope setVariable ["townsFaction",["BIS_TK_CIV"]];
        };
        case "esbekistan": {   
                BIS_alice_mainscope setvariable ["trafficDistance",1000]; // default 500
                BIS_alice_mainscope setvariable ["spawnDistance",700]; // default 400
BIS_alice_mainscope setvariable ["ALICE_townsize",700]; // default 266.667
BIS_alice_mainscope setVariable ["civilianCount","round (2 * (sqrt %1))"]; // default round (4 * (sqrt %1))
                // Add some rare english speaking civilians to the mix
                BIS_alice_mainscope setVariable ["townsFaction",["BIS_TK_CIV"]];
        };
        case "tavi": { 
                BIS_alice_mainscope setvariable ["trafficDistance",1000];
                BIS_alice_mainscope setvariable ["spawnDistance",700];
BIS_alice_mainscope setvariable ["ALICE_townsize",700];
                BIS_alice_mainscope setVariable ["townsFaction",["CIV","CIV_RU"]];
BIS_alice_mainscope setVariable ["civilianCount","round (2 * (sqrt %1))"];
        };
        case "tigeria": { 
                BIS_alice_mainscope setvariable ["trafficDistance", 500];
                BIS_alice_mainscope setvariable ["spawnDistance", 400]; 
BIS_alice_mainscope setvariable ["ALICE_townsize",400];
                BIS_alice_mainscope setVariable ["townsFaction", ["UNSUNG_C"]]; 
                BIS_alice_mainscope setVariable ["civilianCount", "round (1.5 * (sqrt %1))"]; 
        }; 
        case "vte_quanbinhson": {                
                BIS_alice_mainscope setvariable ["trafficDistance",800];      
                BIS_alice_mainscope setvariable ["spawnDistance",600];      
BIS_alice_mainscope setvariable ["ALICE_townsize",600];
                BIS_alice_mainscope setVariable ["townsFaction",["UNSUNG_C"]];
                BIS_alice_mainscope setVariable ["civilianCount", "round (1.5 * (sqrt %1))"]; 
BIS_alice_mainscope setVariable ["vehicleRarity",["uns_civ_doctor",10,"uns_civ_gvt_m",10,"uns_civ_gvt_f",10,"uns_civ_town_m",10,"uns_civ_town_f",10,"uns_civ_town_m2",10,"uns_civ_town_f2",10]]
};
};
 
// list of action categories from CfgCivilianActions 
// BIS_alice_mainscope setVariable ["civilianActions",["BIS"]];
 
// 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.15]; 
 
// Value which is removed from town threat every 5 seconds (until threat reaches 0) 
// BIS_alice_mainscope setVariable ["threatDecay",0.07 ];
 
// array of codes which is executed upon every civilian unit created. 
// [bIS_alice_mainscope,"ALICE_civilianinit",[{_this addweapon "Mk_48"}]] call bis_fnc_variablespaceadd; 
// Dumb down civilian units to use less CPU (see http://creobellum.org/node/175)
[bIS_alice_mainscope,"ALICE_civilianinit",[
//        {
//            if (leader group _this == _this) then {_this setVariable ["rmm_gtk_exclude", true]};
//        },
        {_this setSkill 0},
        { 
                {_this disableAI _x} count ["AUTOTARGET","TARGET"]
        },
        {removeAllWeapons _this}, 
        {removeAllItems _this},
        {
if (random 1 > 0.1) then {
_this setSkill 0.2;
{_this enableAI _x} count ["AUTOTARGET","TARGET"];
_this addMagazine "HandGrenade_Stone";
_this addMagazine "HandGrenade_Stone";
_this addMagazine "HandGrenade_Stone";
_this addMagazine "HandGrenade_Stone";
_this addMagazine "HandGrenade_Stone";
_this addMagazine "HandGrenade_Stone";
_this addMagazine "HandGrenade_Stone";
_this addMagazine "HandGrenade_Stone";
// if(!("Throw" in weapons _this)) then {_this addWeapon "Throw";};
};
                if (random 1 > 0.95 && (_this isKindOf "Woman_EP1" || _this isKindOf "Woman")) then {
_this setSkill 0.1;
{_this enableAI _x} count ["AUTOTARGET","TARGET"];
                        if (random 1 > 0.5) then {
                                _this addMagazine "8Rnd_9x18_Makarov";
                                _this addMagazine "8Rnd_9x18_Makarov";
                                _this addWeapon "Makarov";
                        } else {
                                _this addMagazine "6Rnd_45ACP";
                                _this addMagazine "6Rnd_45ACP";
                                _this addWeapon "revolver_EP1";
                        };
                };
        }
 
]] call BIS_fnc_variableSpaceAdd;

Share this post


Link to post
Share on other sites

Because Alice doesn't exist for A3, there are a bunch of different civilian spawning scripts which might be ported to A2.

Civilian Occupation System, for instance, allows you to specify the classnames of civvies to spawn...

Share this post


Link to post
Share on other sites

Oh this is for arma 2 oa and the scripts been out for longer than a3. Im trying to use it on an arma 2 oa mission

Share this post


Link to post
Share on other sites

What I mean is, I've taken A3 scripts and made them work in A2 with a little modification. If all you need is some civilians wandering around the villages, it shouldn't be that hard.

Share this post


Link to post
Share on other sites

hmmm yea it just won't seem to work :( ive tried values like 100, -20, 10, 79 and they still spawn

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  

×