Jump to content
bangabob

Civilian Occupation System (COS)

Recommended Posts

Hello to all fans of Armagh! Can somebody move the string in the script cosInit.sqf :string: COSpedestrians=true; //Spawn pedestrians;

COScars=true;// Spawn Cars; COSparked=true;// Spawn parked cars in a file ..... description.EXT, order to include Dimensions search during play.?

thank you

Share this post


Link to post
Share on other sites

I'd like to move this script to the headless client but I can't seem to get it to work.

I changed the isServer in the init script and on 1 of the first lines of the core script.

When turning on debug I can see the green marked areas from COS but nothing after that. The HC works with mcc spawned units so I'm overlooking something in the COS scripts..

Anyone any ideas ?

Share this post


Link to post
Share on other sites

Hello. I have been attempting to run some kind of suicide bomber/sleeper civ scripts in to COS with no luck. I have tried what you suggested in earlier post regarding random chance, it seems to add additional scripts errors when attempting.

Is there a chance Banga you could add something built in to the script to allow some kind of suicide bombers or civ sleeper units arming themselves as in hearts and minds by BTC? that would really be cool. thanks for any input. None of the below works that i can see.

_unit = (_this select 0);
_chance = 20 + (random 10);
if ((random 100) <= _chance) then
{
_unit addAction ["", {"scripts\[_unit,[WEST],"HandGrenade"] execVM "suicideBomber.sqf";"}];
};

_unit = (_this select 0);
_chance = 20 + (random 10);
if ((random 100) <= _chance) then
{
_unit addAction ["", {"scripts\hkRandom.sqf"}];
}
else
{
   _unit addAction = ["",{[((_this select 3) select 0),"",(0-100),(20 + random 20),west,1,0.5] execVM "scripts\ws_assassins.sqf"},[_unit]];
};

Share this post


Link to post
Share on other sites

I am not sure if this was asked earlier, but is it possible to have a blacklisted area marker with COS?

Share this post


Link to post
Share on other sites

Does this script offload spawned units to a Headless Client (if one is present) by default? 

also is this Dedicated Server friendly?

Share this post


Link to post
Share on other sites

Any way I can change the spawned unit's side? As in they will be civilians but on the BLUFOR side.

 

Inside COSinit.sqf I saw this: DefaultSide = Civilian;// Set side of units spawned

 

I tried to change it to:

 

DefaultSide = West;// Set side of units spawned

AND

DefaultSide = Blufor;// Set side of units spawned

 

But none of them worked. Any ideas?

 

Thanks In Advance,

MrCrazyDude115

Share this post


Link to post
Share on other sites

Any way I can change the spawned unit's side? As in they will be civilians but on the BLUFOR side.

 

Inside COSinit.sqf I saw this: DefaultSide = Civilian;// Set side of units spawned

 

I tried to change it to:

 

DefaultSide = West;// Set side of units spawned

AND

DefaultSide = Blufor;// Set side of units spawned

 

But none of them worked. Any ideas?

 

Thanks In Advance,

MrCrazyDude115

I am also very interested in using the COS framework to spawn BLUFOR and OPFOR, if this is possible. Has anyone figured out some way of doing it?

Share this post


Link to post
Share on other sites

did you change all == "civilian" to whatever group you want? I see its in 2 places (patrol_fnc). Could you add some code to the "Add_script_unit" to make them to a side?

Share this post


Link to post
Share on other sites

Perhaps I'm not understanding the whitelist feature. Will that populate the marker position when the mission loads? Right now I can't figure out how to get it to work. Also, the Darter drone doesn't seem to be considered an aerial vehicle.

 

Edit: A suggestion, if I may. It would be pretty cool if we can set specific AI units to populate towns nearby too. For example, I'm putting together a convoy mission right now but the Darter drone doesn't seem to be able to activate the populating. It would be awesome if the unit that I'm following can do it in "my" place.

 

Edit2: I was actually able to do it! I changed line 167 in cosInit.sqf to this:

_actCond="({vehicle _x in thisList && isplayer _x} count allunits > 0) || (({_x in thisList} count [truck1]) > 0)";

Now all I need to do is get Opfor to fire on the units that are spawned in.

Share this post


Link to post
Share on other sites

I can spawn enemies in place of civilians but then instead of spawning in a single town, they spawn all over the map. Even with the patrol fnc and init set to spawn as East.

Share this post


Link to post
Share on other sites

How would one go about adapting this to another map, or should it just work? Like, does it HAVE to be Altis?

 

Also, what file do I edit to change what types of civvies spawn? (Modded civvies like Takistanis, for example) EDIT: found it

 

EDIT 2: Testing on MOG now. WORKS! Beautiful!

 

Now trying to get this working with ws_assassins

 

I have this in addScript_Unit but it isn't working

 

[[_unit,["Hello","ws_assassins.sqf"]],"addAction",true,true,false] call BIS_fnc_MP;
[[_unit,["Hello",{null=[_unit] [true,"arifle_mas_ak74",100,100,west,1,0.3] execVM "ws_assassins.sqf"}]],"addAction",true,true,false] call BIS_fnc_MP;

 

(Using the Hello command to debug, would rather not use it and just exec the script regardless)

Share this post


Link to post
Share on other sites

Hello everybody

 

i have a problem implementing this great mod on Lingor.

 

When i use it vanilla, it spawns 36+ civs on Ralon, which is a hamlet of a ten of so houses, all in the middle of it, and  in Calamar it spawns 20 or so civs on a very large radius from city center, and several on the road to Ralon. 

 

There are also a few on the Airport, in the middle of the runways.

 

If i go to cgfworlds>>>lingor3>>>names, the data for radiusX and radiusY for Calamar are 90 (which is hardly a peck of the whole city), while there is a entry for ACityC_Calamar which has a radius of 480, but has a string like 

name=" "

while Ralon has 15 for Rx and Ry.

Following the script, it should count the houses in that radius and then assign the number of civs in the area of the named place: but theres no way that there are inbetween 70 and 140 in Ralon. if i modify the entry to see the spawn radius, the radius for calamar in a third than to that of ralon (dont know if that is the spawn radius, the city radius, or what).Generally in all the map the smaller the town the bigger this circle is. 

 

Using this init in a trigger i can find all the houses/building objects in the area:

hint str (count((nearestObjects [player, ["BUILDING"], 100]) - [player]));

where 100 is the area. in that 15x15 area where the Ralon marker lies in the cfgWorld there are just 2 houses, whereas in that 90x90 area in calamar there are 20 buildings: so it could be right for Calamar, but not for ralon...

 

 

Now: what kind of workaround can i find? I would like it that 50 or so civs were in Calamar, and some tens on Ralon and similar sized hamlets

 

How can i do it?

 

Thanks in advance :)

Share this post


Link to post
Share on other sites

this script works well on a3 maps but it does not on ported a2 maps.

i know it maybe can't find the old citys but it also doesn't work with placed markers...

 

any ideas?

  • Like 1

Share this post


Link to post
Share on other sites

this script works well on a3 maps but it does not on ported a2 maps.

i know it maybe can't find the old citys but it also doesn't work with placed markers...

 

any ideas?

Having same problem. I think it's just for Altis, but even placed markers doesn't work. How exactly you use whitelisted markers?

 

edit: Or is it because of the old buildings?

Edited by TheWaltsu

Share this post


Link to post
Share on other sites

Is there a way to use this on JUST placed markers as apposed to filling up the whole map ?

 

 

***Ignore  resolved ***

Can you share it with us how you did that?

Thank you mate!

Share this post


Link to post
Share on other sites

Yes mate go to cosinit.sqf

 

and change line 177  to :-

}foreach whiteListMkrs;

now it will just add civ's to your own markers in the Whitelist

  • Like 3

Share this post


Link to post
Share on other sites

I get errors in rpt. Looks like something wrong with BIS_fnc_DirTo.

12:31:14 Error in expression <hen {_pos1 = getpos _pos1};
if(typename _pos2 == "OBJECT") then {_pos2 = getpos >
12:31:14   Error position: <_pos2 == "OBJECT") then {_pos2 = getpos >
12:31:14   Error Undefined  variable in expression: _pos2
12:31:14 File A3\functions_f\geometry\fn_dirTo.sqf, line 21
12:31:14 Error in expression <tedTo select 0;
_direction = [_tempPos, _connectedRoad] call BIS_fnc_DirTo;

if >
12:31:14   Error position: <_connectedRoad] call BIS_fnc_DirTo;

if >
12:31:14   Error Undefined variable in expression: _connectedroad
12:31:14 File C:\Users\DaVidoSS\Documents\Arma 3\missions\battlezone_altis.Altis\cos\cosCore.sqf, line 131
12:31:15 Error in expression <veh, [], 0, "CAN_COLLIDE"];
_veh setdir _direction;

_unit assignAsDriver _veh;
>
12:31:15   Error position: <_direction;

_unit assignAsDriver _veh;
>
12:31:15   Error Undefined variable in expression: _direction
12:31:15 File C:\Users\DaVidoSS\Documents\Arma 3\missions\battlezone_altis.Altis\cos\cosCore.sqf, line 143
12:31:15 Error in expression <hen {_pos1 = getpos _pos1};
if(typename _pos2 == "OBJECT") then {_pos2 = getpos >
12:31:15   Error position: <_pos2 == "OBJECT") then {_pos2 = getpos >
12:31:15   Error Undefined variable in expression: _pos2
12:31:15 File A3\functions_f\geometry\fn_dirTo.sqf, line 21
12:31:15 Error in expression <tedTo select 0;
_direction = [_tempPos, _connectedRoad] call BIS_fnc_DirTo;

_ve>
12:31:15   Error position: <_connectedRoad] call BIS_fnc_DirTo;

_ve>
12:31:15   Error Undefined variable in expression: _connectedroad
12:31:15 File C:\Users\DaVidoSS\Documents\Arma 3\missions\battlezone_altis.Altis\cos\cosCore.sqf, line 186
12:31:15 Error in expression <, _tempPos, [], 0, "NONE"];
_veh setdir _direction;
_veh setPos [(getPos _veh se>
12:31:15   Error position: <_direction;
_veh setPos [(getPos _veh se>
12:31:15   Error Undefined variable in expression: _direction
12:31:15 File C:\Users\DaVidoSS\Documents\Arma 3\missions\battlezone_altis.Altis\cos\cosCore.sqf, line 189

Share this post


Link to post
Share on other sites

Yes mate go to cosinit.sqf

 

and change line 177  to :-

}foreach whiteListMkrs;

now it will just add civ's to your own markers in the Whitelist

Thank you mate!!!

Share this post


Link to post
Share on other sites

Hi i want to set killed event handler for each civilian unit spawned by COS. How do i get it to work?

Share this post


Link to post
Share on other sites

Hi BangaBob ;)

 

Just to tell you it seems that the script is broken with Stratis Airport !!... since Today (after game update)....

 

Everything is fine, until you go on the Stratis Airport !

 

Civilian stay freezed on the airport, and the script doesn't continue after that, even if you leave the area and enter in another one !

 

See you soon ;)

Share this post


Link to post
Share on other sites

Hi BangaBob ;)

 

Just to tell you it seems that the script is broken with Stratis Airport !!... since Today (after game update)....

 

Everything is fine, until you go on the Stratis Airport !

 

Civilian stay freezed on the airport, and the script doesn't continue after that, even if you leave the area and enter in another one !

 

See you soon ;)

I do not have this issue. Are you sure you have made no adjustments that breaks the cos? What does the rpt say?

Share this post


Link to post
Share on other sites

Hi i want to set killed event handler for each civilian unit spawned by COS. How do i get it to work?

addscript_unit.sqf is where you can add to individual spawned units.

Share this post


Link to post
Share on other sites

I do not have this issue. Are you sure you have made no adjustments that breaks the cos? What does the rpt say?

Yes ! i'm sure ! i didn't do nothing !

Just exported the scripts files to my folder, to verify the issue !

I'm making a new mission by scripts... and after the update, i had an error, then i shearched in my scripts, but after, i just tested the COS script to be sure... and "Bawww"... it was broken !

I think they have changed something in the config file map... or did an obvious mistake !?!

2:23:08 Starting mission:
22:23:08  Mission file: test_COS
22:23:08  Mission world: Stratis
22:23:08  Mission directory: C:\Users\####\Documents\Arma 3 - Other Profiles\chal00[FR]\missions\test_COS.Stratis\
22:23:09 Attempt to override final function - bis_functions_list
22:23:09 Attempt to override final function - bis_functions_listpreinit
22:23:09 Attempt to override final function - bis_functions_listpostinit
22:23:09 Attempt to override final function - bis_functions_listrecompile
22:23:09 Attempt to override final function - bis_fnc_missiontaskslocal
22:23:09 Attempt to override final function - bis_fnc_missionconversationslocal
22:23:09 Attempt to override final function - bis_fnc_missionflow
22:23:12  Mission id: ################################
22:23:13 No speaker given for Zaim Okoye
22:23:14 No speaker given for Zaim Osmani
22:23:14 Error in expression < %1, expected %2, on index %3, in %4", [_par] call _fnc_getTypeName, [_x] call _>
22:23:14   Error position: <_par] call _fnc_getTypeName, [_x] call _>
22:23:14   Error Variable indéfinie dans une expression: _par
22:23:14 File A3\functions_f\Debug\fn_errorParamsType.sqf, line 146
22:23:14 Error in expression <tedTo select 0;
_direction = [_tempPos, _connectedRoad] call BIS_fnc_DirTo;
 
if >
22:23:14   Error position: <_connectedRoad] call BIS_fnc_DirTo;
 
if >
22:23:14   Error Variable indéfinie dans une expression: _connectedroad
22:23:14 File C:\Users\g\Documents\Arma 3 - Other Profiles\chal00[FR]\missions\test_COS.Stratis\cos\cosCore.sqf, line 131
22:23:14 Error in expression <veh, [], 0, "CAN_COLLIDE"];
_veh setdir _direction;
 
_unit assignAsDriver _veh;
>
22:23:14   Error position: <_direction;
 
_unit assignAsDriver _veh;
>
22:23:14   Error Variable indéfinie dans une expression: _direction
22:23:14 File C:\Users\g\Documents\Arma 3 - Other Profiles\chal00[FR]\missions\test_COS.Stratis\cos\cosCore.sqf, line 143
22:23:14 Error in expression < %1, expected %2, on index %3, in %4", [_par] call _fnc_getTypeName, [_x] call _>
22:23:14   Error position: <_par] call _fnc_getTypeName, [_x] call _>
22:23:14   Error Variable indéfinie dans une expression: _par
22:23:14 File A3\functions_f\Debug\fn_errorParamsType.sqf, line 146
22:23:14 Error in expression <tedTo select 0;
_direction = [_tempPos, _connectedRoad] call BIS_fnc_DirTo;
 
if >
22:23:14   Error position: <_connectedRoad] call BIS_fnc_DirTo;
 
if >
22:23:14   Error Variable indéfinie dans une expression: _connectedroad
22:23:14 File C:\Users\g\Documents\Arma 3 - Other Profiles\chal00[FR]\missions\test_COS.Stratis\cos\cosCore.sqf, line 131
22:23:21 Weather was forced to change

Mission test : http://www.sendbox.fr/fa482fa0471f62f3/test_COS.Stratis.zip

Tested only with previsualisation !!

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

×