Readme for the JTD Ambient Civilian Traffic module for ArmA2
Ver. 02a - public alpha, unsigned

JTD:
-- DMarkwick
-- ReconPathFinder
-- TRexian
=====================================================
***IMPORTANT INFO***
The JTD_ACTON_config.hpp file now must go into a new folder, <ArmA2 root>\userconfig\JTD\. If you do not have this path/folder, make one.  The archive is set up to make it automatically, if necessary. 

=====================================================

Description:
This module, when placed in a mission, will generate civilians and civilian vehicles which will travel around the area.

Requirements:
- None.  Part of the intent is to make it independent of other mods/addons.

Issues:
This module is generally compatible with the ambient civilian vehicle module.  There have been some intermittent issues, however, with the vehicle module.  If you find a repeatable error, please post it at either the BI or OFPEC forums.

=====================================================
Installation:

The archive contains a folder structure \@JTD\addons - simply extract the archive someplace and place the @JTD folder in your ArmA2 root folder.  There is also a folder structure for \userconfig\JTD - place the userconfig folder in your ArmA2 root folder, also.  There is also a \keys\ folder that contains the JTD bikey - place this file in the \keys\ folder in your ArmA2 root folder.

(This is the same installation as the JTD_FireAndSmoke addon, which you should already have.) ;)

********************

Anyone can use this addon for use in ArmA2, including hosting the files for download. It must remain intact with this readme. Anyone wishing to include this addon in their own package have that permission, and although not a requirement, you might like to drop a line at either OFPEC or BI forums to let us know. :)
The addon may not be altered without permission for public use. In the spirit of community sharing, without which this addon wouldn't exist in the first place, all scripts can be viewed and purloined for further use, with credits, as long as the addon itself remains intact as per the official release.


***Config settings?***

There are several config settings you can use to modify the way the module works.  Generally, you can decide how many many vehicles are spawned, what the chance of spawning traffic is, what vehicles are spawned, and even what civilians are spawned.  Also, and perhaps importantly, you can decide what percentage of civilians have weapons.


***What's the downside?***

There may a performance hit for a mod of this nature. Also, the presence of civilians (some armed) and traffic can cause missions to play differently than expected.


***What should I watch out for?***

If you use JTD_ACTON in the ArmA2 editor, and you preview the mission, then you will get an addon dependancy written into the mission.sqm file. Exactly the same as if you'd used any other addon in your mission. If you wish to have your mission JTD_ACTON independent you should manually remove this entry with a text editor.

Also, there may be intermittent conflicts with the Ambient Civilian Vehicle module.  I haven't gotten that with this release version, but it may still be an issue.


***For mission makers!***
Mission makers can "lock" any of the settings in the hpp.  Place a game logic on the map.  In the init field, use the following variables to over-ride the hpp variables:
JTD_percSpawn = JTD_ACTON_percent;
JTD_maxSpawn = JTD_ACTON_max;
JTD_maxCargo = JTD_ACTON_maxCargo;
JTD_minCargo = JTD_ACTON_minCargo;
JTD_civAK = JTD_ACTON_civAK;
JTD_civArray = JTD_ACTON_civs;
JTD_cars = JTD_ACTON_DEFAULT_vehicles;
JTD_weapons = JTD_ACTON_wepArray

For example, if you wanted to make a mission that had no civilians with AKs, then, in the init field of the game logic you would put:
JTD_civAK = 0

This would replace the local user's hpp value.  You can also use this to substitute your own vehicles or civilians in the arrays, etc.

Additionally, if you use mission-specific values, you can manipulate them during the course of the mission.

*****************************************************
ADDITIONAL FUNCTIONALITY IN VERSION 2

Implementation:
ALICE -
This is the same implementation as in version 1.  Place an ALICE module, and the traffic will spawn any time an ALICE civ spawns.


Config cities/towns - 
By default, civs will spawn in all cities/towns identified in the config for the island.  However, this is time-consuming at the start of a mission if there are many such cities/towns.  Plus, on a map with many cities/towns, it is possible to quickly run out of available groups to spawn civs in.  Something is different from ArmA1, and the trigger formulation I used before now results in civs being spawned immediately.  So, the first ~100 groups of civs will be assigned to the first cities/towns in the config.

Markers - 
By placing markers in areas where you want civs, they will only spawn in those locations.  To accomplish this, you MUST set the JTD_civMarkerArray variable.

JTD_civMarkerArray - array - default = nil;
** This is required to designate which markers will spawn civs.  In the init line of the module, write:
this setVariable ["JTD_civMarkerArray", ["nameofmarker1", "nameofmarker2"]];

In that example, you have named the markers nameofmarker1, nameofmarker2.  You can have as many markers as you need.  Also, you can overlap or "nest" markers in various areas.  Have a big marker over an entire city, then smaller markers in neighborhoods where you want more dense concentrations of civs. 

Also, if you dislike SILVIE for various reasons, there is the option to not spawn any traffic, just civilians.

JTD_traffic - boolean - default = true;
Set to false to disable the spawning of traffic.  Only civs will spawn.

***What's next?***

I am dissatisfied with the "DISMISSED" option for AI.  I would like to have a custom function to generate waypoints in the nature of a "Random Walk."  This has been sketched out in the scripts already, but it looks like it will be more work than I expected.  I also need to spawn empty (although sometimes locked/damaged) vehicles, basically a SILVIE replacement.