Jump to content
bangabob

Civilian Occupation System (COS)

Recommended Posts

Hey guys,

I Have a problem were I need the civilian units array in cos to include a boss element. E.g the spawner will spawn half a dozed standard civilians and one boss from a boss array in one group?

Could somebody put me on the right path I'm just learning to use arrays and would appreciate some advice.

Also what setting do I change to make the civilians spawn further away from the roads and not directly in middle of roads?

Share this post


Link to post
Share on other sites

Has anyone had any luck with this script on Tanoa?   I'm getting script errors related to 'roadsConnectedTo'

+1 Same problem

I try it today, work great on altis but couldn't get it work on tanoa. I have a lot of lag for 20 seconds at the launch of the mission which I don't have on altis

Share this post


Link to post
Share on other sites

Hi BangaBob!

 

Been playing around with your script in Fallujah lately, I really love the ease of use you've put into this. Great work!

Looking at your code I see that you use createUnit to spawn civs? Have you considered spawning them as agents? I'm considering tweaking your script to try this for pedestrians, and see what framerate could be gained...

  • Like 2

Share this post


Link to post
Share on other sites

Hi BangaBob!

 

Been playing around with your script in Fallujah lately, I really love the ease of use you've put into this. Great work!

Looking at your code I see that you use createUnit to spawn civs? Have you considered spawning them as agents? I'm considering tweaking your script to try this for pedestrians, and see what framerate could be gained...

Haven't seen BangaBob on here for quite a while. Make a "Haleks COS" and give credit where it's due.....

  • Like 1

Share this post


Link to post
Share on other sites

Has anyone had any luck with this script on Tanoa?   I'm getting script errors related to 'roadsConnectedTo'

 

Yes same, I'm sure everyone is.  Would be great to see someone with some coding smarts pick this one up or fork from it in light of the above.

Share this post


Link to post
Share on other sites

I looked at this for 5 minutes this morning, while having the morning coffee. Looks like this is finding wonky roads segments being return by roadConnectedTo (https://community.bistudio.com/wiki/roadsConnectedTo), which then leads to the rest breaking since the _connectedRoad var is not defined. I will see if I can do work around after work today.

cosCore: ~129, ~185

_tempPos=_roadPosArray select _rdCount;_rdCount=_rdCount+1;		_roadConnectedTo = roadsConnectedTo _tempPos;_connectedRoad = _roadConnectedTo select 0;_direction = [_tempPos, _connectedRoad] call BIS_fnc_DirTo;

Share this post


Link to post
Share on other sites

I got everything done I added a game logic object and added the init in the init box. I then added it to the mission folder set new id and class item###

when I restart the server they only spawn where I put the logic object. and they all spawn in the middle of the road. Then only a handful go walking around. The rest just wait to be ran over by trucks and other road bound traffic.

How can I get everyone to start walking around as soon as they spawn. and not just some of them. I went to other towns but no civies there. Do I need to put server objects in every town? I am using Tanoa.

Share this post


Link to post
Share on other sites

I have some questions :)
1- Does this script work on all maps or just Altis?
2- If I put no towns in whitelist it populates all locations in map and if I put just some locations in whitelist it only populates those instead of all?

Share this post


Link to post
Share on other sites
On 10/5/2016 at 3:04 PM, Capt Childs said:

 

Yes same, I'm sure everyone is.  Would be great to see someone with some coding smarts pick this one up or fork from it in light of the above.

 Darn, sounds like this awesome mod needs updating.  I would if I could!!  :)

Share this post


Link to post
Share on other sites

 

On 06/10/2016 at 0:58 PM, thedubl said:

I looked at this for 5 minutes this morning, while having the morning coffee. Looks like this is finding wonky roads segments being return by roadConnectedTo (https://community.bistudio.com/wiki/roadsConnectedTo), which then leads to the rest breaking since the _connectedRoad var is not defined. I will see if I can do work around after work today.

cosCore: ~129, ~185


_tempPos=_roadPosArray select _rdCount;_rdCount=_rdCount+1;		_roadConnectedTo = roadsConnectedTo _tempPos;_connectedRoad = _roadConnectedTo select 0;_direction = [_tempPos, _connectedRoad] call BIS_fnc_DirTo;


Hi, thedudbl or anyone, is there some working solution with tanoa since the last year?

Share this post


Link to post
Share on other sites

I've been using Enigma's civilian script instead. That and his traffic script do a pretty good job of populating towns.

 

  • Like 1

Share this post


Link to post
Share on other sites

Thanks JD i've download and test him without config for my project some days ago.
I was searching for COS cause i've used him a lot of time.
After some look at him, it seems he's cool for my use, but i need to re-test cause the first time i was having a BIIIIIG lag at mission begin (in Georgetown..), and i suspect him to be the cause...
Test on the go !

Share this post


Link to post
Share on other sites

Looks Like the 1.68 update broke this script, it's causing crashes to arma3server.exe :( no more feral civies :(

Share this post


Link to post
Share on other sites
5 hours ago, jimbob6661 said:

Looks Like the 1.68 update broke this script, it's causing crashes to arma3server.exe :( no more feral civies :(

Interesting. I was running this script on my server last week when we encountered server crashes.

Can i ask, how do you know this script caused your server to crash?

Share this post


Link to post
Share on other sites

Yessir, I commented out 

null=[] execVM "cos\cosInit.sqf"; 

in the mission.sqm compiled the .pbo restarted the dedi and no more crashes. went back to notepad++ un-commented it re-compiled restarted, crash. Removed again no more crash. Server ran 8 hours until restart.

Now I will say it seemed like it was when they were to spawn in, but not sure if it was a marker trigger or city. 

Edited by jimbob6661
Forgot a comma :P

Share this post


Link to post
Share on other sites

Hey bob, I guess I could mention that the mission I'm running spawns ai missions via scrips as well and they don't cause any crashing or issues throughout an 8 hour uptime.

Share this post


Link to post
Share on other sites

Tried a new mission crash soon after they spawn in, took out the logic for COS again and no crashes.

Share this post


Link to post
Share on other sites

Hi guys,

I'd like to turn COS off if I get low fps. Does anyone know if and how I can turn it off? When turning it off it should delete all civilians first an then wait until I turn it on again.

 

 

On ‎29‎.‎03‎.‎2017 at 6:01 AM, jimbob6661 said:

Tried a new mission crash soon after they spawn in, took out the logic for COS again and no crashes.

I m using COS on my linux dedicated server for a few days and there was not a single crash. But I run it on a headless client.

 

On ‎19‎.‎09‎.‎2016 at 2:32 PM, haleks said:

Hi BangaBob!

 

Been playing around with your script in Fallujah lately, I really love the ease of use you've put into this. Great work!

Looking at your code I see that you use createUnit to spawn civs? Have you considered spawning them as agents? I'm considering tweaking your script to try this for pedestrians, and see what framerate could be gained...

Did you try anything performace related on COS? I would be happy to hear something about it.

Share this post


Link to post
Share on other sites
On 4/24/2017 at 3:00 AM, sarogahtyp said:

I m using COS on my linux dedicated server for a few days and there was not a single crash. But I run it on a headless client.

I wish I could do that with the mission I'm running, but cannot.

Share this post


Link to post
Share on other sites

Why can't i get the AddScript_Unit.sqf work on the dedicated server ??

It works fine when i run it on my local computer, both in editor and as a server, but when i try it on the MP Dedicated it doesn't work.

 

Any idéas ? 

Share this post


Link to post
Share on other sites

I am attempting to use this on Lythium. I just changed the unit pools for Takistani civilians. 

 

I get an error when running it, however not on the Altis sample mission.

 

https://steamuserimages-a.akamaihd.net/ugc/773903676818963583/D59C4CE807ABEC939638F6F15256890E3908687F/

 

Is it the map or did I make a mistake?

 

Any help is appreciated. Thank you.

Share this post


Link to post
Share on other sites

this errors meaning is as it is described in that error message.

It means that an argument of nearRoads should be a number but it is not.

just look at the wiki: nearRoads

the only argument which has to be a number is the radius.

in ur error message the radius is this: (_mSize + _rad)

it seems that this expression is no number and you should check that...

Share this post


Link to post
Share on other sites
50 minutes ago, sarogahtyp said:

this errors meaning is as it is described in that error message.

It means that an argument of nearRoads should be a number but it is not.

just look at the wiki: nearRoads

the only argument which has to be a number is the radius.

in ur error message the radius is this: (_mSize + _rad)

it seems that this expression is no number and you should check that...

 

I suppose_mSize isn't being properly stored because of the map change, because _mSize is derived from _sizeX and _sizeY which are declared from map config. So in order to work around it I've commented out those lines and manually inputted my own numbers _sizeX and _sizeY.

 

This gets the script running, although my initial thought was that _mSize was indicating the entire map's size, but it seems like it's an indication of the spawn radius instead. I'm experimenting with different values because it seems that they interfere with the manner of which the script works very, very much. 

 

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

×