Demo mission in Nogova to test CoC UA. Debug mode on.
Populate your towns with as many civilians as you want in as many towns as you want
Civilians wander the streets or idle lazily inside or near buildings.
You can populate your towns with civilians from different addons to increase the diversity of the population
Population changes depending on if it's day or night
Just one simple, light script is used to manage an unlimited amount of walker civilians
Add any pack of civilians by adding templates
You can now also designate camping areas
Populate towns with specific types of civilians
Add and remove designated towns and camps on the fly
You can pause, resume, reset or completely stop civPopulate
You can now really set an unlimited amount of towns and camps (previously there was a limit of 63)
Copy and paste the civPopulate folder inside the template directory to that of your mission
Add:  exec "civPopulate\start.sqs" to the init file of your mission
Edit the preferences part in the start.sqs script, inside your CivPopulate directory
In the mission editor, copy or merge to your mission the markers named CP_town_0 (the big blue circle), CP_camp_0 and CP_parking_0 and the CP_spawner unit close to it (the markers and the unit inside the red rectangle). You can also copy the vehicle and player markers if you want to debug the traffic in your mission.
Place the CP_spawner in a remote place with about 50m diameter of land (preferably flat)
For civilian pedestrians:
Copy and paste the CP_town_0 marker over any towns or spots you want the civilians to populate, and edit each copied marker's properties following this directions:
Change the color to red for "high" population density, blue for "normal" and black for "low".
The size of the marker will indicate the area where the civilians will be placed in and how far walkers populating that area will go.
In the name field you'll see something like this: CP_town_0_17. The red number indicates the type of civilians to be used to populate that area. By default it's 0, which indicates that all type of civilians specified in the preferences (in start.sqs) will be used. If you set it to 1 then just the first type of civilians will be used. Set it to 2 to use just the second, etc (so if you have _civilianTypes set to ["cp_afghancivs_pashtun","cp_afghancivs_tajik"] and you set the number to 2, then just the tajik civilians will populate that area). Also note that the "_17" part is an incremental number that is added automatically every time you paste a new marker. You don't need to change that number (unless you want to for some reason).
Copy and paste the CP_camp_0 marker over the places where you want to have camping areas.
Copy and paste the CP_parking_0 marker over the roads you want to have traffic in. As there's no way to detect roads in OFP you'll have to place all this by hand for this system to work.
NOTES ON MARKERS:
Make sure you are always pasting a copy of the original marker (CP_town_0, CP_camp_0, CP_parking_0) when adding new ones. If you copy and paste from another marker the numbering will be incorrect and the marker won't be detected.
There's a limit of 300 markers per type of marker, and another 300 per civilian type (so, 300 for towns, 300 for camps and 300 for parkings, and also 300 for towns of civilian type 0, 300 for those of type 1, etc). Markers with a number higher than that won't be detected. This limit is totally arbitrary (although there has to be one to tell the script when to stop checking). You can change this limit in checkmarkers.sqs.
Avoid placing parking markers over bridges, or vehicles placed there will most likely fall into the water. For bridges, just place a couple markers a bit before the start and a bit further the end and vehicles will be able to traverse them without problems.
Traffic: Although there's a minimum placement distance of 300m from the player you'll sometimes see the cars popping up.
Traffic: You'll occasionally hear explosions around you. Don't panic. It's just vehicles exploding and civilians burning to death. New clones will replace them shortly.
Traffic: Five vehicles is usually enough to simulate the traffic in any island. With more the chances of they bumping against each other, particularly on the initial placement, are too high, and you'll actually see less traffic than with less vehicles (as they keep being destroyed and relocated).
Other: Expect huge house parties if there's just a couple of building with preset positions in a town.
Other: Lots of civilians = less FPS. If you set your max population to 700 and you enter a "high" town expect a significant FPS drop. This script package places as many civilians as you want in the spots you want. No more, no less.
General Barron (nearestobj.sqf)
Tophe of Östgöta Ops (randomBuildingPos.sqf)
Igor Drukov (getrelpos.sqf)
Dola Re Dola (by Devdas)
<unidentified song> (by Amir Jan Saboori)
Kopeika <extract> (by et_)
Minor tweaks and release
Added: civTypes\myCivilianTypes.sqf, vehTypes\myVehicleTypes.sqf - templates to add custom vehicles
Changed: previous traffic system rewritten again.
Changed: Further tweaks to traffic system
Added: replace civs and drivers that can't be revived
Changed: new implementation of vehicle traffic
Added: shuffle.sqf - to randomize population, particulary when various definitions are used at once
Changed: Markers now used instead of game logics to designate the areas to be populated
Added: checkmarkers.sqs - adds the markers to the respective global arrays
Added: pause.sqs, shutdown.sqs - to pause/resume/shutdown civPopulate
Added: addremove.sqs - adds and/or removes towns and camps on the fly
Added: cp_radiomusic - music tracks that civs with a radio can use
Removed: addlogic.sqs, cp_afghaneveron.sqf and some unused functions
Added: ability to set different types of civilians per town
Added: distancechecks.sqs - script that manages the distance checks for all the town and camp logics
Added: cp_afghaneveron_pashtun.sqf, cp_afghaneveron_tajik.sqf - new civ definitions, split from cp_afghaneveron
Added: addlogic.sqs - now replaces CPtownCheck.sqs
Added: cp_walkersOnly - which controls if there are only walkers in towns or a mix of walkers and idlers
Removed: CPtownCheck.sqs and some unused functions
Depopulating bug fixed
Added: populateCamp.sqs, dePopulateCamp.sqs - allows setting camping areas
Several corrections and tweaks to the code
Use this, share this, modify this, whatever you want. Just put my name somewhere if you do so.
Don't you guys have that "Ambient Civilians" thing up there? That should do what this does. And most likely way better.
Anyway, you could try to change the .noe or .afghaneveron extensions to .utes or any other island from arma 2 and then move the gamelogics over towns. Maybe it'll work there. Slim chance, though. <- That was silly of me.
civPopulate is updated now to version 1.4. The link in the first post has been updated accordingly.
This version contains several new features, fixes and improvements. This is the changelog:
Fix: Walker civs were able to roam outside their designated area and range
Fix: Vehicles were playing music after resetting
Change: Single global array used to store global vars now
Change: civPopulate now initialized by civPopStarter logic. Init.sqs not needed anymore
Change: Pedestrians more evenly distributed when populating an area
Change: Traffic is a bit more varied. You won't see the same sequence of vehicles all the time
Change: Increased activation range for traffic when the speed of player is low (such as on foot)
Change: Increased activation ranges for traffic and population when player is flying
Change: Vehicle and driver replacement and reviving scripts moved from managevehicles.sqs to their respective EH scripts
New: You can now specify the exact amount of civilians and vehicles to spawn per each civilian and vehicle type
New: Civilian init and killed eh can be extended by the user with custom code (in civPopCustom\)
New: Killed civilians will decrease the overall population of the town they belong to
New: Works in MP (but not traffic)
New: Compatible with CoC Unified Artillery. Its artillery shells are included as activators, so they can populate the area they’re going to strike and cause civilian casualties
New: Areas that have had their population reduced due to assassinations will enter a panic state. While in that state the amount of walkers and population in general will be severely reduced
New: You can set your own activator objects (apart from the default ones)
New: Added definitions for: default civs new, default cops, VTE civs and respective vehicles. Also, Faceplant, Dr Pepper’s More civs, DMA Desert Civilians and Tonal civs.
Other: Several minor corrections and tweaks
As you can see, now you can shell civilians at will, if that's your thing. Among other new features. If you use other methods for artillery other than CoC UA you can also make all this work by creating a game logic when a call for arty is done and place it on the target. Then add it to civPop as an activator this way: civPop set [24, (civPop select 24) + [<game logic>]]. You should remove it after the shelling is done, this way: civPop set [24, (civPop select 24) - [<game logic>]]
While I've updated this today the update was actually created weeks ago, so I'm not sure if I missed something in the changelog. Anyway, if you have any question or bug report feel free to post it here.
I also need to rewrite some stuff from the first post regarding instructions and such. I'll do that later.
Oh, and it now works in MP too. Except for the traffic.