TPW FURNITURE - Ambient furniture on  Altis / Stratis / Tanoa

Author: tpw
Requires: CBA A3

Description
-----------
Bohemia Interactive do an incredible job creating enormous immersive enviroments with astonishing visual and sonic scope and detail. However, many people are perplexed that official Arma3 maps contain nothing but completely empty houses devoid of interior furniture or decorations of any kind. Although performance considerations are often cited as the reason behind this, the result is a significant hit to the immersion of playing on A3 maps.

TPW FURNITURE is my attempt to remedy this situation in a performance and gameplay friendly way. Every few seconds TPW FURNITURE scans for houses around the player (default 50m), assigns a house specific furnishing template (furniture, positional and rotational offsets from the house) to each house, and spawns furniture from the template. 

	- Furniture is spawned with simulation disabled
	- Furniture is removed from houses distant from the player       
	- Furniture is not spawned into houses already containing player or AI units
	- Furniture is generally spawned in a way so as not to interfere too badly with AI pathing

By default Arma 3 provides a pretty paltry selection of beaten up furniture, with a complete absence of beds, cupboards, couches and rugs and decorative items which would help to make houses look lived in. Nevertheless being able to look in the window of a house and see a few tables and chairs and sundry items gives a significant boost to immersion, in keeping with these areas being war torn and poverty stricken. Ambient furniture has been a very long standing goal of mine, I consider it the final missing piece of my Arma 3 civilian ambience series and I'm happy to be able to finally present it to the A3 community. 

Usage
-----
By default TPW FURNITURE scans for houses within 50m of the footbound player every 5 seconds,if the player has moved 25m (house scanning stops if the player is stationary). If you run from house to house you may see furniture popping in. Increasing tpw_furniture_radius and/or decreasing tpw_furniture_scantime will alleviate this at the cost of increased CPU usage. TPW FURNITURE can be enabled/disabled at any time with tpw_furniture_active = true/false.

Issues
------
TPW FURNITURE is my first attempt to address a significant shortcoming of Arma3, and likely contains bugs and issues. Although I have made every attempt to optimise it, like any script based addon in A3 features always come at some performance cost. If you find any issues related to AI and/or performance and/or object placement, please let me know. To find out the name of the affected building hit escape and enter the following command in the debug console:
 
	hint str (typeof (nearestbuilding player))

At present TPW FURNITURE only works for default Arma3 house assets (Tanoa/Altis/Stratis), so will only furnish houses on default maps and any maps using these assets. Creating detailed / plausible / AI friendly housing templates is non trivial and takes time. If you would like to help with this, I can provide you my scripts for in-game item placement which generate the template code required. Currently there is a single template for each house, though this could be easily changed so that houses select randomly between multiple templates, if people are willing to help out with providing their own additional furnishing templates :)

I've provided templates for nearly every civilian building type which would plausibly have furniture, but there are a couple for which the system refuses to work (cannot recover classnames for them). I haven't provided templates for any miltary installations and don't intend to for this mod (but may concoct another mod to do so in the future).

I have not filled each house with clutter and smaller furniture items, mainly for performance reasons (now I sound like a BI dev!). Again, if you would like more detailed furnishing, please have a go at it yourself and send me the results.  