Public FtD Scripts

ZerothAngel's From the Depths Scripts

A collection of From the Depths Lua scripts I've written since I started playing (about the middle of 2016).


I'll only list the interesting scripts (the ones not used for research or testing).

Also see my notes about assumptions and possible gotchas.

How to Use

When configuring one of my scripts, I recommend doing so in an external text editor. (Unless it's a really small change, don't do it within the game. Also the game only displays the first 500 lines or so which may be a problem for my larger scripts.)

On Windows, use something like Notepad++. Don't use the editors that come with Windows (Notepad, WordPad).

On Macs, "Text Edit" might be good enough (be sure to switch it to plain text), but I recommend something more programming-oriented. There's plenty of choices, maybe start with TextWrangler or Sublime Text.

Once you've made your changes in an editor, CTRL-A then CTRL-C (or the Mac equivalent) to get the entire script into your clipboard.

Then open the Lua box (make sure it is on the edit tab), and (very important!) CTRL-A to fully select the existing script.

Then CTRL-V. Hit "apply changes" and you should be good to go.

AI Replacements

These scripts wholly replace the "combat" and "fleetmove" behavior of the stock AI. (Still, using the stock Naval AI Card with these scripts is recommended, even for aircraft, as it provides a sane "patrol" behavior.)

All the combat-oriented scripts (everything but repair-ai and utility-ai) have the ability to dodge missiles that have been detected.

When using with an altitude control script, try using a combo script that includes the desired AI module (see below). It will have better integration (e.g. missile dodging also modifies altitude) and it will be more efficient in terms of CPU usage.

Altitude/Depth Control (Only)

Note: Nowadays, it is probably better to use the in-game breadboard or PIDs to control altitude/pitch/roll.

These scripts only provide altitude or depth control. They are meant to be used alongside a 2-dimensional AI, like the Naval AI card (or many of my AI scripts above). They also work fine with manual yaw & propulsion. All scripts will also allow manual (analog) control of the altitude/depth using a drive maintainer.

Again, if you're going to use these with my AI scripts, using a combo script (below) provides better integration and is more efficient.

Missile Scripts


These use the new configuration scheme detailed in this doc.


Turret Scripts

I've only recently started dabbling in Lua-aimed cannon turrets. Frankly, I don't see any solid advantages yet (aside from making the LWC/receiver/failsafe combo unnecessary). And you lose quite a bit, like failsafes and the ability to have AI-assisted manual targeting.

But it was an interesting exercise, and it does seem to be quite a bit more accurate.

Combo Scripts

I tend to build small and because of that, I avoid having more than a few Lua boxes. So I assemble and use combo scripts that are made up of many of my own scripts. This saves on Lua boxes and is also more efficient — stuff like targeting and weapon control only needs to happen once per run.

Note that most combo scripts include my generalmissile-based multiprofile missile script. While more flexible, it's quite a bit harder to configure. Be sure to disable it (by setting Missile_UpdateRate to nil) if you'd like to use a different missile script (in another Lua box).



More or less functional, but still works-in-progress.