SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Source-checkedQuality of life & UI

Expanded Ai Tasks Code Library and Loader (AI API For Modders Only, Not a Mod)

by Grifthegnome · for Vintage Story

This is a mod that makes the custom Ai Tasks used by Outlaw Mod available to the community.

4.5KDownloads
1.16.4Latest game version
Vintage Story ModDBSource

About Expanded Ai Tasks Code Library and Loader (AI API For Modders Only, Not a Mod)

From Vintage Story ModDB

This is a mod that makes the custom Ai Tasks used by Outlaw Mod available to the community.

If you find a bug, have a suggestion, have questions, or want to talk, feel free to join my Discord Server! 

IMPORTANT NOTE: Please note that this mod is for modders to develop custom Ai, not to improve AI in the game generally. If you are not a modder, I would not download this as it doesn't do anything on its own. This mod is not a dependency for Outlaw Mod, as it is included natively in Outlaw Mod. Running mismatched versions of Outlaw Mod and ExpandedAiTasks Loader will make one or both mods fail to load.

This is a mod that makes the custom Ai Tasks used by Outlaw Mod available to the community.

This mod pack contains both the ExpandedAiTasks.dll and the ExpandedAiTasksLoader Mod.

If you are intrested in using this .dll for your mod, please read the include readme for implementation and compatibility details.

ExpandedAiTasks.dll

This contains all the currently available aiTasks written for Outlaw Mod. I use this in Outlaw Mod to make archer enemies that can lead their targets and engage the player at ranges greater than any current Ai in the vanilla game. As I add and test new aiTasks in Outlaw Mod, I will release them here so that anyone can use them.

At the moment, this libary contains the following behavior functionality:

Shoot Projectile 

  • Create AI that can shoot any any projectile in the game at a target, with support for leading targets, arcing shots properly over distance, accuracy fall off from range, time to zero new target, damage falloff over range, friendly fire prevention, Last Known Position Targeting, and much, much more.

Pursue, Engage, and Withdraw

  • Create Ai that can pursue and engage targets. They will chase opponents at one speed, but then slow down to actually fight them. When they don't have a path to target, they will withdraw to a safe distance and wait for the opportunity to attack.
  • You will find their responsiveness to hostiles is way more responsive than the base game and they can also switch targets rapidly mid-combat when they take damage.
  • You can also have your AI make decisions as a pack and only attack targets they think they can overpower as a group. This allows you to make Ai that are only agressive when they have a numerical advantage.
  • You can make the Ai persue their target's last known position so they advance on where the player was last seen, not where the player is currently.

Stay Near Herd/Squad

  • You can make the your Ai travel the world in groups or evenn attempt to maintain group cohesion during combat.
  • This system appoints a squad leader that acts as the anchor for a group of Ai.
  • Members of the group will always return to the squad leader if they wander too far. Even if they get seperated by hundreds of blocks.
  • When the squad leader is killed a new one is appointed from the surviving group members.
  • When two underpowered squads with compatible members meet, they will merge into one squad to become a more effective fighting force.

Morale System

  • You can make Ai that considers both group and individual morale when deciding when to run from a fight. This gives you a powerful interface for player vs Ai and Ai vs Ai encounters.
  • The Ai will know whether their group is winning or losing the current fight.
  • They consider things like group health, friendly and enemy losses, whether they are outnumbered or have a numerical advantage, and whether there are items or objects that frighten them present on the battlefield.
  • This allows you to easily implement features such as making animals afriad of torches.
  • You can make hero character who inspires their squad members in battle, making them less likely to run.
  • You could make a vampire enemy who is afraid of garlic and crosses. 
  • You could also make an Ai that is more confident in battle when the player is holding a carrot in their hands, for some reason. The power is yours!

Guard Target

  • Create Ai that guard another creature. 
  • This guard task handles attacks from other AI and players as well as players getting too close to the guard target.
  • Because this task delegates its resolution to the Pursue, Engage, and Withdraw, Enhanced Melee, and Shoot Projectile tasks, you have a lot of power over how your Ai responds to a threat on its guard target.

Eat Dead Creatures

  • You can make Ai that is attracted to dead creatures in the environment and then eats or harvests them down to a skeleton.
  • You can make it so that the longer the creature has been dead, the farther the Ai can smell it from.
  • You can even make horrible monsters that will eat their own dead squad members.

Enhanced Melee

  • Enhanced Melee is currenly similar to the base-melee attack ai task, but it does have some useful features.
  • It prevents creatures from attacking their squad members if they happen to take friendly-fire damage.

React To Projectiles

  • Allows Ai to tell when they are getting shot at by projectiles (even if the projectile misses) and respond accordingly. It uses a special tracking algorithm that only monitors projectiles that are actively in-flight, which makes it less expensive than one might expect.

Full Stealth & Awareness System (Factored into all AiTasks in this package)

    Read the full description on Vintage Story ModDB →

    Highlights

    From source data

    Game versions

    Built for Vintage Story 1.16.4.

    Footprint

    Rated a light load on a server.

    Expanded Ai Tasks Code Library and Loader (AI API For Modders Only, Not a Mod) on Nxeon

    From our catalogue
    One-click install
    Supported on Nxeon Vintage Story servers. We download it from Vintage Story ModDB, place it, and restart the server.
    Server side
    Required on the server
    Server load
    light
    Smallest plan we suggest
    Vintage Story — 1 GB (1 GB RAM). This follows our own load rating above, not a benchmark.

    Run Expanded Ai Tasks Code Library and Loader (AI API For Modders Only, Not a Mod) on a Vintage Story server

    Pick a server or deploy a new one above; it is installed in one click.

    What kind of mod it is

    From the catalog
    Listed on Vintage Story ModDB as “Utility”

    Quality of life & UI

    Small conveniences, tweaks and interface improvements players notice straight away.

    Runs on your server

    From source side support

    Vintage Story ModDB lists Expanded Ai Tasks Code Library and Loader (AI API For Modders Only, Not a Mod) as required on the server. Check its Vintage Story ModDB page to see whether players need it too.

    Compatibility

    Game
    Vintage Story
    Runs on
    Serverrequired on the server
    Game versions
    1.16.4

    Verified at the source

    • ✓Vintage Story ModDBOfficial listing, checked 2026-09-24Open ↗
    • ✓AuthorGrifthegnome, as published on Vintage Story ModDB
    • ✓LicenseNot published by the sourceFree

    Expanded Ai Tasks Code Library and Loader (AI API For Modders Only, Not a Mod), answered

    Generated from the mod’s own source data.

    Do my players need to install Expanded Ai Tasks Code Library and Loader (AI API For Modders Only, Not a Mod)?

    Vintage Story ModDB lists Expanded Ai Tasks Code Library and Loader (AI API For Modders Only, Not a Mod) as required on the server. Check its Vintage Story ModDB page to see whether players need it too.

    Is it free?

    Yes. Expanded Ai Tasks Code Library and Loader (AI API For Modders Only, Not a Mod) is free to download from Vintage Story ModDB.

    How do I add it to my Nxeon server?

    Use “Add to a server” on this page, or open NxLabs from your dashboard. We install it, restart your server and switch it on.

    NxLabs

    Run Expanded Ai Tasks Code Library and Loader (AI API For Modders Only, Not a Mod) on a Vintage Story server.

    Deploy in about a minute from $4.00 a month, then add Expanded Ai Tasks Code Library and Loader (AI API For Modders Only, Not a Mod) in one click.