Release Notes
AP Version
4.7.2
- Fix a bug where Smart missile turrets might not engage targets after changing sector.
4.7.1
- Launch countermissiles from missile turrets and the ship itself like mosquito defence. This feature can be disabled in the menu.
- Made missile turrets hold fire when in capturing mode
- Stopped missile turrets firing boarding pods
- Set a floor on main guns laser switching iteration time equal to the current laser refire delay, to help remedy higher than normal rate of fire caused by the laser switching when guns are being fired.
- Added support for Advanced Fight Scripts by publishing laser turret target
- As both vanilla and XRM halve the missile refire delay between missile turret volleys, do the same with Smart missile turrets for balance.
- Add a missile turret setting for using swarm class missiles on huge ships. Off by default.
- If it would take more than 250 missiles of the ships best available type to destroy a target then hold fire on the missile turret.
4.7.0
- Pulled due to packaging issues.
4.6.3
- Fix precision error in DPS calculations resulting in occasional sub-par selection of one heavy laser relative to another.
- Remove a check preventing beam lasers being selected vs fighters unless no other laser type is available to the turret.
- Add text files for DE, PL, CS, IT, ES, FR, RU with English strings.
4.6.2
- Fix 'all ships in sector' broadcast not finding docked ships.
4.6.1
- Fix the command name not displaying correctly when starting a Smart command on a ship that is OOS.
4.6.0
- Added a throttling setting to control whether Smart will reduce number of mounted lasers when laser energy is low. By default throttling will only be applied to turrets not main guns.
- Avoid rapidly firing lasers when the mode cycling hotkey is spammed.
- Add a gate rep loss avoidance setting, default on. When on, gates in the active sector are set to neutral race ownership.
- When avoiding stations, display command as COMMAND_DEFEND_STATION so the player can tell why its not shooting.
- Pick lasers more intelligently vs TS, TP, TM class targets.
- Fire amidships at huge ships when the target is estimated to be unlikely to outrun the bullet, intended to reduce miss rates from shooting at the very nose of a long ship.
4.5
- Fix a bug in capturing mode vs big ships which could make the turret go nuts and destroy the target when it should instead be holding fire.
4.4
- Add a new bailing algorithm per request: Bail or Die. This will drop hull below 10% allowing for 7% overkill margin below that. If the target hasn't bailed in a few seconds after exceeding 10% then target will be killed.
- Renamed bailing algorithm 'fastest' to 'Strip Hull'.
4.3
- Rebalanced M6 and fighter laser selection to fit both vanilla and XRM
- Fixed a bug present since 1.8 where M6 and fighter laser selection always used hull DPS ordered laser lists regardless of shield level.
- Detect if the game is Albion Prelude. If it's not then send the player a warning message and abort Smart initialization.
4.2
- Added configurable turret command profiles to allow turret command behaviours to be reconfigured
- Added an option to disable laser switching in the turret command profiles
- Added a custom turret command which acts by default as offense mode with laser switching disabled.
- Added a capturing turret command which by default will suppress shield on boardable ships, while attempting to make non boardable ships bail. Can be set to only promote bailing, to support use with NPC bailing mods.
- Included 3 bailing algorithms. The default algorithm attempts to make ships bail with maximum (87%) hull.
- Included a !init file so games are automatically *modified*, without having to enable the script editor to make Smart available.
- Increase laser speed requirement in the anti-fighter and M6 laser selection algorithm.
4.1
- Add laser turret station friendly fire avoidance, enabled by default. This isn't infallible but friendly fire possibility is greatly reduced.
- When laser energy drops below 20% boost desirability of ammo based lasers. This low power mode remains active until laser energy exceeds 40%.
4.0
- Albion Prelude compatibility. Version 4.0 and beyond are NOT compatible with Terran Conflict. Fixes may potentially be backported into separate 2.x releases for TC. The version range from 2.x - 3.9 is reserved for X3TC compatible releases.
- Laser training and the DPS cache have been removed as this data is now available via APIs.
- Antimissile has been revised for AP. Rapid fire lasers continue to be used for drones and light missiles (swarm or S class ware) whereas best hull dps lasers are now shot at the rest.
- Ships running Smart OOS will switch lasers between best hull and shield DPS depending on attack target shield condition
- Rapid fire antimissile requirements have been relaxed somewhat and balanced around vanilla AP laser stats.
- 'Expand' effect lasers (PSG) are now detected and made most preferred for anti fighter/corvette and antimissile
- The broadcast command takes into account whether the ship is in a fleet and offers a fleet broadcast option
- The missile turret wing support option now also apples to fleet members.
- Antifighter/corvette laser selection has been adjusted to select stronger/slower lasers when target speed is slower than its maximum.
- Beam lasers are now properly detected through laser flags and demoted to the bottom of antifighter laser lists.
- The collateral damage (AOE) laser list is now generated based off laser flags. The excluded laser list (tractor beam, mobile drilling) remains hardcoded.
- Fixed a bug where missile interception was not scanning missiles incoming to player stations
- Added a link to the Smart settings menu from the turret configuration menu. This link will not appear until AP is updated with the newest versions of the missile def mk3 scripts that include 3rd party menu support.
TC Version
2.6
- Fix the command name not displaying correctly when starting a Smart command on a ship that is OOS.
2.5
- Added a throttling setting to control whether Smart will reduce number of mounted lasers when laser energy is low. By default throttling will only be applied to turrets not main guns.
- Avoid rapidly firing lasers when the mode cycling hotkey is spammed.
- Included an init script to automatically make games modified. Vanilla unmodified games would otherwise require script editor activation to load Smart.
2.4
- Created a more snugly fitting model for bullet speed prediction vs fighters, optimized for the XTC mod.
- Pick lasers more intelligently vs TS, TP, TM class targets.
- Fixed flakiness in main guns laser selection.
2.3
- Fix a bug where the TC version of Smart was picking Hull ordered lasers to attack shields and vice versa versus non-huge ships.
Known Issues
The collect wares command will instantly beam wares on board from long range when a turret on that ship is running Smart. See
this post for a workaround.
Installation
Install
- The 9050-*.xml file must go in the AP addon\t folder while the *smart*.xml files need to go in the addon\scripts folder.
- The Smart setup script will run after loading the game. The menus and ship commands then become available.
Upgrade
- Replace the files with the newer versions and load the game. Smart will upgrade itself automatically.
Uninstall
- Select the Uninstall option from the in-game menu. This will terminate tasks, unregister hotkeys and clear variables.
- Save the game
- Remove the Smart scripts from addon\scripts
- Reload the game. The Smart menus and commands should no longer appear after reloading.
Features
Missile Turrets
The Smart turret command works on both missile and laser turrets.
Missile turrets may fire:
- In self defence, attack target or command attack target.
- In a configurable engagement radius around the ship
- At the player's target
- At attackers and targets of wingmates and fleetmates
- At attackers and targets of formation ships
- At protected/followed ship/follower attackers and targets
- All player ships and stations in sector's attackers and targets
An appropriate missile is selected for the job. For fighter targets swarm missiles are always used if available. A barrage of potency sufficient to kill the target is fired, with a configurable degree of overkill and barrage cap.
Missile turret behaviour is configurable from the configuration menu. All targetting except the self defence/self attack target can be disabled. Not all options are enabled by default.
Beware: A missile boat will happily shoot flails or even mosquitoes at capital ships if it runs out of torpedoes.
Capturing (AP version)
Smart includes a Capture turret command which by default will suppress shields on boardable ships, while attempting to make non boardable ships bail.
Bullets shot by all Smart Capture mode turrets are tracked and this damage is factored in when determining when to shoot guns. This allows Smart a more precise level of control when stripping shield and hull from the target.
Beware however that bullets shot from other sources such as main guns and other turret commands cannot be tracked, and this may result in overkill damage being applied.
In the turret command profile, capturing can be set to bailing only, where the turret will try and make all ships bail. This is to support use with NPC bailing mods.
4 bailing algorithms are included.
Maximize Hull
- Hull is lowered to a level where bailing can occur (below 87.5%)
- Shield is stripped at 15 second intervals to a level which can trigger a bail check (0% AND <1000)
- This mode is aimed at ships bailing with maximum hull
Chip Hull
- Hull is lowered initially below 87.5%, with a 5 second subsequent pause to allow ejection.
- Hull is subsequently lowered by 1% every 3 seconds.
- After reaching 2.5% hull the shields will be suppressed every 15 seconds to trigger bailing checks.
- This mode is aimed at NPC bailing mods where the bailing hull level can vary.
Strip Hull
- Hull is lowered below 87.5% with a subequent 5 second pause.
- Hull is then lowered to 25% thresholds of the max hull (75, 50, 25), with 5 second pauses between.
- Hull is finally lowered to 2.5% and shield is suppressed every 15 seconds to trigger bailing checks
- This mode is aimed at ships having a better chance to bail, where once reduced to a 2.5% threshold bailing chance is thought to be increased.
Bail or Die
- Hull is lowered below 10% with a large (7%) margin of error.
- If it hasn't bailed within 5 seconds below 10% hull, the target is marked for destruction.
The default mode is Maximize Hull, which may be changed in the global settings menu.
Note that bailing is random and heavily influenced by a morale value assigned when the ship spawns. Bailing checks may not occur for periods of many minutes. Smart helps to automate the capturing process, but it confers no special bonuses of its own to the bail chance.
Anti Missile
The anti missile feature simulates shooting individual turret guns at separate missile and drone targets allowing flail and torpedo barrages to be efficiently cleaned up.
Turrets are turned in a best-effort fashion in anti-missile, but ultimately the guns cannot be turned independently as the game isn't designed for it.
Antimissile is performed each round before firing on the main target, providing a level of defence against missiles slipping through while the turret is engaged with the primary target.
The antimissile mode can be disabled via the configuraiton menu. When disabled, missile and drone targets are evaluated normally as primary targets.
Rapid refire lasers are selected in antimissile for swarm and S ware class missiles, ensuring a rapid swarm takedown. Hull DPS ordered lasers are selected for other heavier missiles, which are tough to kill in AP.
Missile Interception
Smart turrets will shoot at missiles incoming to any ship of the same race. For the player this also includes missiles incoming to targets protected by player ships.
Retargetting
Targets are reevaluated periodically based on calculated threat/desirability. Ship values are based on laser strength, missile boats on strongest missile payload, and missiles based on payload.
A nearby target has its desirability raised over far away targets, and targets with shield damage are more preferred.
Laser Switching
The selected lasers for shooting at a target are recalculated periodically and switched if a more desirable set of lasers is found.
Shield and hull dps ordered lists are selected from for shooting captital ships, whereas a special method is used to select anti fighter/corvette lasers. This method attempts to pick the best DPS laser with sufficient speed to hit the target, where desired bullet speed and is modified by factors such as target class (fighter/M6), speed and distance away. An M6 idling at point blank range would attract slow heavy lasers, whereas an M6 flying at speed at long range would attract less powerful but faster bullets.
The various ordered laser lists on Smart enabled ships are recached when Smart is enabled on a ship, and include only those compatible lasers present in the cargobay. The data is recached when Smart is enabled on a turret or mainguns, at game reload (game data may have been modified while offline), and when the value of lasers in the cargobay changes from a previously calculated value (e.g. buy or eject a laser triggers recache).
Notes:
1. Smart is optimized for a laser rich environment, i.e where a sufficient amount of lasers of a given type is available on the ship to service all turrets that use the laser. Smart may not function well under laser starvation conditions.
2. It is normal that Smart may appear to switch only 1 laser into the turret during combat. This is to free up lasers for use by other turrets. The Idle Lasers setting will fill the turret at all times to improve looks, but this setting is not recommended unless a complete set of lasers of each type is available to satisfy all turrets.
3. If neutral/friendly targets are near (within range of longest range AOE weapon in that turret modified by ship size), then AOE weapons won't be selected.
Laser switching can be disabled in turret command profiles (AP only)
Main Guns
Smart includes an Additional Ship Command that automatically switches lasers in the main guns. This is particularly useful to swap in area effect weapons when no friendlies are around.
Note that the main guns remain under manual fire control of the player.
NPCs
Smart can be enabled on NPC ships through the included AL plugin (disabled by default). This can also be configured with more granularity through the Smart configuration menu.
The AL plugin will periodically scan and enable Smart on ship turrets in the active sector matching the configuration requirements (enemies, friendlies, both, big ships, huge ships, all ships, missile boats).
Broadcast
The Smart menu is accessible through Wing and Ship Combat menus, and through Station menus. The menu includes a context sensitive broadcast feature, which can broadcast Smart turret / mainguns relative to the object the menu was opened from. It can broadcast to all ships in sector, all owned ships, ships in wing and fleet.
Turret Command Profiles (AP only)
The behaviour of each of Smart's turret commands can be customized.
This feature is primarily useful to allow a mixture of laser switching and non laser switching commands.
A Custom turret command is supplied as an extra slot, which by default acts as a non laser switching offense mode.