Author: tpw
Author Website:

Requirements: Community Base Addons

Version: 1.04
Signed: Yes

Short description: This addon improves AI response and realism in closer engagements.

Date: 2012-09-01 09:13


Comments: (0)
Rating:



 

TPW AI LOS (TPWLOS)

by
TPW


Description:
This addon improves AI response and realism in closer engagements. It is based on SaOk's excellent line-of-sight code which implements the new lineintersects, terrainintersect, eyepos and eyedirection commands introduced in OA beta patch 94103 (and simply won't work on earlier versions). TPWLOS works well with and nicely complements TPWCAS.

TPWLOS scans for enemies near each opfor or blufor or independent unit, determines if they have line of sight to the enemy (no buildings or terrain in the way), runs a few more visibility checks based on light level, movement, camouflage etc, and if the enemy is determined as visible then the unit will face towards and shoot at the enemy. Reaction time should be well under a second, which greatly enhances squad response and aggression in CQB situations.


Installation / Usage:
TPWLOS comes as a script version and an addon version.
CBA (community base addons) is required for both versions.
Beta patch 94103 or greater required

Script version:
Save tpw_ai_los.sqf into your mission directory (or wherever you'd like really)
Call it with: null = [] execvm "tpw_ai_los.sqf", in your init.sqf or in the init of any object on the map.

Addon version:
As we always recommend use modfolders to seperate the custom content from the official game content to prevent problems. For different ways to set up your modfolders and use them please visit our FAQ.

When you are using the Steam version you can find a Steam mod installation and activation FAQ here.

If you want to be able to configure it then copy the configuration file to: your_arma_directory\userconfig\tpw_ai_los\tpw_ai_los.hpp

Configuration:
TPWLOS is highly configurable. The script version has a number of well commented variables to change aspects of the system. The addon version allows the same variables to be changed in the tpwc_ai_sup.hpp config file.

* Startup hint. 0 = no hint, 1 = hint. Default 1.
* Debugging. Units with LOS to a visible enemy will have a blue ball over their heads. 0 = no debugging, 1 = debugging. Default 0.
* Maximum distance (m). LOS stuff only works for units closer than this. Default 100.
* Minimum distance (m). Enemies are considered "visible" no matter what, if less than this distance. Default 25.
* Delay before LOS functions start (sec). Default 1.


Included .pbo files:
tpw_ai_los_103.pbo


Caveats:
* This is more a preliminary proof of concept addon, using beta commands, rather than a fully polished final product.
* You MUST be using beta 94103 or greater, earlier betas simply lack the commands this system needs.
* Future betas may render this version unworkable.
* CBA is required.
* TPWLOS certainly sharpens up AI in CQB situations, but it does not make them killbots. A completely still enemy 75m away at night might not be "seen" by the AI even if the unit has line of sight to it.
* As far as the author can tell, TPWLOS causes minimal drops to framerate even on low spec machines, with 50 or so AI taking pot shots at each other. Your mileage may vary depending on computer specs and number of AI. I take no responsibility if your computer explodes.
* TPWLOS is in its infancy and probably won't work the way everyone wants it to. I welcome any feedback and suggestions.


Credits & Thanks:
* SaOk for the demonstrating use of the new BIS commands lineintersects, terrainintersect, eyepos and eyedirection.
* Maturin, Kremator, Zonekiller, Orcinus and CameronMcDonald for valuable feedback, input and suggestions.
* Falcon_565 for demonstrating the power of cba_fnc_addPerFrameHandler.
* Ollem for debug cleanup code
* BIS for an amazing piece of software which even allows scope for mods like this.


Changelog:
v1.04
- additional bugfixes
- enemy stance now affects their visibility (Ollem)

v1.03
- bugfix release (sun angle detection not working - thanks Ollem)

v1.02
- code cleanup and optimisation

v1.01
- bugfix release (configuration not working)

v1.00 20120628
- initital release


Forum topic:
- BI forums



- Community Base Addons




Enable javascript to be able to download from Armaholic please!