Overview
Complete Setup and Usage Guide for Advanced Guided Missile Script:https://steamcommunity.com/workshop/filedetails/?id=1734970571
How To Setup
1 – Building the Missile.
2 – Checking Missile Build.
3 – Save Missile Configuration.
4 – Mounting Missile to Warship.
5 – Checking Missile Separation Block.
6 – Mounting Multiple Missiles to Warship.
Each missile needs the following blocks:
- Programmable Block loaded with this script.
- One Remote Control.
- One or more Gyroscopes.
- One or more Thrusters. No Side Thrusters required. If used on Planets, also have some Downward Facing Thrusters.
- One or more Power Source. If SAVEMISSILE feature is used, this block can be turned off. Else it must be turned on.
- Exactly one Merge Block for detaching missile from ship. Rotors, Hinges and Connectors can also be used now (after v7.0). See Supported Detach Types Section of the guide.
- A few forward facing Cameras.
- One or more Antennas. IMPORTANT: Required for initial lock-on communication.
- (Optional) Side facing Cameras. Missile drifts and may lose lock due to out of camera 45 degree view range.
- (Optional) One to two forward facing Cameras with name tag PROX for Proximity Tripwire.
- (Optional) F*** ton of Warheads.
You can also use Rotor, Hinge, Connector and Sprue to detach missile. See Supported Detach Types Section for more details.
Enter CHECKMISSILE into the PB and click Run button.
IMPORTANT: Missile MUST NOT Be Mounted to ship for this test. Running this test with missile mounted means the entire ship is checked as one missile.
The Missile Issues list MUST be empty. Otherwise, resolve all issues listed until it is empty.
Example if issues to be fixed:
The Missile Parameters list will display some of missile information such as which thruster is used for foward (to check missile orientation).
Optional Feature (skip if you do not intend to save missile layout): This script supports saving missile configuration to Custom Data. This allows launcher script to detect if missile is built completely before launch, plus also allows better performance friendliness during initialization on launch. Downside is that you must re-perform a save operation if any of your missile blocks are changed.
With missile Completely Detached and standing alone, enter SAVEMISSILE into the Arguments and click Run.
A new configuration section titled AGMSAVE will appear under Custom Data of the PB:
Enter CHECKSAVE into the Arguments and click Run to verify that the missile is correctly saved:
Recompile the script. The [NOTREADY] tag will be automatically added to signal to launcher script that a “check save” should be performed before launching the missile to ensure it is fully built:
Rotor, Hinge, Connector and Sprue are supported. See Supported Detach Types Section for more details.
Run the final check to ensure missile detaches correctly (i.e. detects correct port to detach).
Mount missile to ship, then enter CHECKDETACH into the PB and click Run button.
If wrong port is detected, shift your PB nearer to the missile Merge Block (or your intended detach block) and try again.
There is no restriction. Once one missile is setup properly, copy and paste it to all the missile mounting Hardpoints on your Warship.
You can also Blueprint different missile builds and have the Projector select which missile type to mount (High explosive, Kinetic penetrator, High speed missile etc).
How To Operate
Supported Detach Types
This script supports different types of missile detachment blocks:
1) Merge Blocks.
2) Rotors (and Hinges, which counts as rotors).
3) Connectors.
4) Sprue.
Missile will search for the Nearest Block from the PB, that is matching the above types except Sprue.
Some missiles may have Merge Blocks (for detach) and Connectors (for fueling hydrogen and ores), which the script may pick the Connector instead of the intended Merge Block due to it being closer to the merge block. You can use one of the 3 ways to avoid this by scoping down the search:
1) Use DetachGroupName configuration setting. (See Custom Data Configuration Section).
Example:
2) Use DetachBlockTag configuration setting. (See Custom Data Configuration Section).
Example:
3) Use DetachType configuration setting (See below guide section).
Example:
Below guide section shows all the supported detach types and also the Custom Data configuration to scope down the search (usually not required, but may be used if script gets confused due to multiple possible detach types present nearby).
This is the basic Merge Block detach type.
Custom Data Configuration
Rotor detach type whereby the Rotor Top (its rotating head) is on the missile. Hinges are considered Rotors and therefore also supported and treated the same way.
Custom Data Configuration
Rotor detach type whereby the actual Rotor (its main body) is on the missile. Hinges are considered Rotors and therefore also supported and treated the same way.
Custom Data Configuration
Connector detach type.
Custom Data Configuration
Detach type whereby a holding block must be destroyed (e.g. shot off by gatlings etc) before missile will detach. In this case, script will not attempt to detach any block. Instead, the launcher script MUST handle the destruction of this holding block. Missile will wait for at most 1 second for missile to be detached (by checking if launcher script PB is still reachable). If holding block not destroyed within this waiting time, detach fails and missile script stops.
Custom Data Configuration
Custom Data Configuration
You can customize the behavior of this script via Custom Data of this script’s Programmable Block. The configuration settings are to be added to the AGM section, like the example below:
Note: The configuration is using the INI file format. Above example shows the AGM section and where / how the settings are placed. The variables are non-case sensitive.
Legends:
- “Per Tick” means in one update tick, which is 1รท60 second for normal 1.0 sim speed.
- “Number of ticks” means number of the tick described above (i.e. 60 ticks per sec).
- “Distance” are all in Metres unless specifically mentioned otherwise.
- “Target Size” refers to target’s AABB bounding box’s diagonal size in Metres.
- “Target Radius” refers to half of Target Size, in metres.
- “IGC” means Intergrid Communications (send data to other ships via Antenna).
Unique ID assigned to this missile. Used by launcher script control. <Long> (default: 0)
Group ID assigned to this missile. Used by launcher script control. <Long> (default: 0)
Sender ID allowed to send information to this missile. Used by launcher script control. <Long> (default: 0)
If set to 0, script uses Proportional Navigation. If set to 1, script uses Quartic Prediction (for unlimited speed mod worlds). <Integer> (default: 0)
Proportional Navigation Gain. <Number> (default: 5)
Proportional Navigation Acceleration Gain. <Number> (default: 0.05)
Proportional Navigation multiplier if missile is accelerating past vanilla speed. <Number> (default: 1.25)
Script guesses missile thrust to perform more accurate turning. This value sets the minimum thrust. <Number> (default: 1)
Estimated thrust is scaled with this factor. <Number> (default: 1)
Gyro’s PD Controller Proportional Gain. <Number> (default: 30)
Gyro’s PD Controller Derivative Gain. <Number> (default: 10)
Maximum turning in radians for Pitch and Yaw turning combined. If Pitch and Yaw exceeds, it is scaled back to this maximum value. <Number> (default: 6.3)
Time in seconds for missile to clear launch tube before starting guidance. <Number> (default: 1)
Whether to perform fanning out of missiles to avoid cluttering together too much (easy target for enemy). <True/False> (default: false)
Number of ticks to fan out before starting guidance. <Number> (default: 120)
Whether to perform turret dodging maneuvers. <True/False> (default: false)
Distance from target to start turret dodging maneuvers. <Number> (default: 700)
Distance from target to stop turret dodging maneuvers. <Number> (default: 250)
Whether to compensate for gravity by tilting missile. <True/False> (default: true)
Whether to use Fire and Forget Active Homing via on-board cameras. <True/False> (default: true)
Whether to exclude locking on to friendly targets. <True/False> (default: true)
Whether to exclude locking on to neutral targets. <True/False> (default: false)
Whether to switch to alternative valid target if current target is lost. <True/False> (default: true)
Whether to use offset targeting to hit specific spots on the target. <True/False> (default: false)
Radius from target center to probe for valid offset targeting spot on the target. <Number> (default: 0)
Maximum distance for raycast to trace for initial target aquisition. After full lock-on, this value is not used. <Number> (default: 3000)
If auto-detection of forward reference is incorrect, use this name tag on the forward reference block (e.g. Remote Control, main missile thruster etc). <String> (default: <empty>)
If auto-detection of gravity dampener thruster is incorrect, use this name tag on the dampener thruster. <String> (default: <empty>)
If set to 0, tripwire detonates warheads. If set to 1, tripwire arms warheads. <Integer> (default: 0)
Whether to use Inertial Tripwire, which guess when the impact point will be for triggering warheads. Used for cases when proximity sensors are destroyed. <True/False> (default: true)
Number of seconds after missile lost active lock-on and command guidance, or vital missile components, to disable script. <Number> (default: 60)
Group name of detach blocks to search for missile detachment. This is to force script to only select detach blocks from a specific group of blocks. <String> (default: <empty>)
Name tag of detach blocks to search for missile detachment. This is to force script to only select detach blocks with a this name tag. <String> (default: <empty>)
Scrtipt supports different type of detach blocks (i.e. Merge, Rotor, Hinge, Connector etc). This setting limits the type of block to be searched for missile detachment (i.e. Merge, RotorTop, RotorBase, Connector, Sprue). See “Supported Detach Types Section” of the guide for more details. <String> (default: <empty>)