TPW CIVS - Ambient civilians, traffic, boats, and animals for Arma 3

Author: tpw
Requires: Community Base Addons for Arma 3
Compatibility: SP, MP client

Description
-----------
One of the irksome dichotomies of Arma 3 is that by default there is absolutely no sign of civilian life on maps that clearly are meant to represent places that people actually live. TPW CIVS attampts to address this issue by automatically spawning civilian ambience around the player on any map, with no modules, triggers or other input required.

TPW CIVS actually consists of five independent scripts: one will spawn civs into houses around the player; one will spawn civilian traffic onto roads around the player; one will spawn boats onto the ocean near the player; one will spawn aircraft and one will spawn flocks of goats/sheep/chickens and dogs around the player. Civs, boats and cars will then move to random waypoints, giving the illusion of a (low) population. Animals will move around displaying their default behaviours. There are no other behaviours, they are just there for decoration! All scripts will monitor things to keep a constant number of civs, animals, boats and cars around the player if there are enough appropriate positions for them.

Features
--------
	- Gradually spawn civilians into habitable houses within a specified radius of the player.
	- Gradually spawn civilian traffic onto roads within a specified distance of the player.
	- Gradually spawn animals at appropriate random positions within a specified distance around the player.
	- Gradually spawn civilian boats onto the ocean within a specified distance around the player.
	- Occasionally spawn ambient flybys of helicopters and jets (up to a maximum specified).
	- Civilian/animal/car/boat density can be specified (civilian density will halve at night).
	- Civilians/cars/boats will move to random house/road/water waypoints respectively, animals will move around with default behaviours.
	- If a civilian/car/animal is killed another will spawn. 
	- Civilians/cars/animals/boats are removed if more than a specified distance from the player.
	- Civilians will run for cover if it's raining or if there is nearby gunfire (requires TPW SOAP).
	- The mission will fail if the number of total or squad inflicted civilian casualties exceed player defined thresholds.	
	- Civilian cars may be commandeered. Stand in front of an oncoming car and once it stops in front of you a menu item will appear to commandeer it.
	- Civilian cars are spawned with random fuel levels.
	- Civilian cars will be removed if they stray too far from the road.
	- Commercial traffic (vans/trucks) on road during daytime only.
	- Civilians can interact with each other. Civilians within a defined radius will move towards each other, stop and gesticulate to simulate conversation. They won't do this if it's raining or bullets are flying.
	- Ambient dog barking noises will occasionally be heard. Ambient cat noises will be heard around towns at night. Goats will bleat if nearby.
	- Animals will disperse when approached by vehicles.
	- In MP mode, nearby players will "share" civs/cars/animals rather than spawning their own individual set.
	- In MP mode, default settings will override individual configurations, so that all players will cause the same level of civ/car/animal generation.
	- Each of the ambient civilian, traffic, boat and animal systems can be individually enabled/disabled. 
	- Ohally's CAF Aggressors Middle Eastern and African civilians, RDS A2 Eastern European civilians and cars, and Leight's Opfor Pack Middle Eastern civilians will be used appropriately if present.
	- Maxjoiner's women will be used as female civilians on Greek and European maps, if the mod is present.
	- You may specify multiple strings which will function as a blacklist, in tpw_civ_blacklist. Any civs whose classnames match these strings will be excluded from all ambient activities (civs, crowd, boats, cars).
	
Known issues
------------
	- Despite recent improvements by BI, AI civs remain notoriously poor drivers, and this mod does nothing to improve on that! However car collisions have been tweaked to cause as little damage as possible to players, AI, and to a less extent the environment. This code is not 100% foolproof however, so I still advise getting out of the way of an AI car!
	- TPW CIVS is guaranteed to work as advertised in SP, and maybe MP client (although this has not been fully tested). It will not run on a dedicated server.
	- Stuck or damaged vehicles may occasionally vanish before a player's eyes, even though they have been scripted not to.
	- While I've gone to considerable efforts to reduce the microstuttering and CPU spiking associated with selecting appropriate spawning positions and waypoints, there is an inevitable overhead to spawning AI in A3. You don't get anything for nothing in this game so expect to lose a few FPS when using TPW CIVS, particularly if you crank up the numbers.


To do
-----
	- Ambient furniture
	
Thanks
------
Bad Benson: MP help and suggestions.
Bashka: class based house detection and waypoint tips.	
Woodpeckersam: randomised civ clothing tips
Spliffz: A2 OA house classnames