Space Engineers

Space Engineers

248 ratings
AI Enemies - Waves of NPCs
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Script, Other
File Size
Posted
Updated
110.795 KB
May 3, 2015 @ 8:53am
Sep 3, 2016 @ 12:34pm
45 Change Notes ( view )

Subscribe to download
AI Enemies - Waves of NPCs

Description
Note: At this time this mod is DEAD. I might get back to it sometime in the future, but for now it doesn't work. Sorry.

This mod will allow you to spawn aggressive (and/or friendly) AI ships. These ships will attempt to seek and destroy the closest players. I made this mod to combat-test some of my ships, to work out all the flaws before taking them into a PvP situation. It turned out OK, so I thought I would share with the community. This mod should work on just about any map, in both creative and survival modes. Please consider reading this whole description or at least the Limitations section.

This mod is fairly stable, however I still recommend you DO NOT use it on your actual world. The very nature of this mod is destructive, and you do not want the AI to damage unique (and unsaved) creations. Copy your ships into a new world, and use the mod there to ensure you do not lose your precious worlds and ships.

This mod will not work well with planets. AI ships generally avoid entering the atmosphere. Additionally even if they do enter the atmosphere they are unlikely to navigate very well. Finally it is worth noting that AI ships will often be unable to spawn within the atmosphere and in rare cases are destroyed immediately upon succeeding.

Features:
  • Have a wide range of Predef AI ships attempt to seek and destroy players.
  • Have the AI control the ships you built. (Check out the relevant discussion for a tutorial)
  • Have the mod spawn the hostile AI ships automatically, every several minutes, for an enhanced survival experience.
  • Have the AI on your side! This mod allows you to spawn friendly AI ships which follow you around and attack your enemies.

How to use:
  1. Load the mod as usual. When the game starts you should see a notification telling you the mod was loaded.
  2. (Optional) Press enter and type in "ai help". This will print help information. All commands are fully documented. Check out the relevant discussion.
  3. (Optional) Use "ai setpilot [basic, adv, ally]" to set the behavior of the spawned ships. The pilot types are fully documented in the "Command List" discussion.
  4. Press enter and type in "ai sl 5". This command will spawn 5 random ships (both small and large). 's' and 'l' are flags. If only 's' is used, only small ships will be spawned. Similarly 'l' will spawn only large ships. The '5' can of course be any number, signifying the amount of ships to spawn. Be warned, if you spawn too many, the game may become unstable.
  5. You will be notified of the success (or failure) of the operation via notification.
  6. Repeat step 4 as much and as often as you like

Dedicated Servers:

The new way: If you're an administrator on your server; you can use the commands as you would in a locally-hosted server. Additionally you can give others permission to use commands via:
/ai authPlayer <playername> /ai deAuthPlayer <playername>
So if I wanted to give myself permission to use commands I would use "/ai authplayer darkkshadow0" (obviously I would need access to do that in the first place, making this example slightly unrealistic) .
A lot of the data is separated between players. So if you use "/ai setspawn" it will not effect the spawn locations of ships spawned by other players. The same applies to "/ai randomspawn".
Keep in mind that this feature is still experimental, so you may encounter some problems. If you do find a bug; let me know. Other than that it should all work fine.
Note: By default only the host or administrators are able to execute commands. Keep in mind that giving someone access to these commands can be dangerous because if they chose to; they could, for example, spawn a million ships and crash your server.

The other way: Config File Tutorial


FAQ:
  • All AI spawn at GPS coordinates (1000,1000,1000) or in proximity to that area. Keep in mind that if you're far away from (1000,1000,1000), the AI will likely take a while to get to you. You can change the default spawn using "ai setspawn x y z"
  • The AI will attempt to follow you. The distance at which they follow depends on ship size. (Small ships will close to 200 meters. Big ships will close to around 500 meters.)
  • Small AI ships will attempt to shoot you with their non-turret guns. Their aim is not ideal so if you're looking for a difficult fight, spawn a few of them, or go up against large ships with turrets.
  • There is no upper limit to the amount of AI ships you can spawn, but if you spawn in too many expect lag or a crash. If you want to spawn many ships, use the command "ai safety off". The safety is on by default to ensure you do not crash your game by spawning too many ships accidentally.
  • The default ships are taken from Prefabs. Not all of them have antennas. If you don't see the spawned ships immediately give them a few seconds to get to you, or go looking for them at (1000, 1000, 1000)
  • In order to have the AI control your custom-created ships; check out the relevant discussion.
  • All AI ships have unlimited ammo and fuel.

Limitations / Disclaimer:
  • I do not claim that this mod is 100% stable. Crashes are rare, but they do happen. Do NOT use this mod in a world which you cannot afford to lose.

Feature Requests & Bug Reporting:
Please post these in their respective discussions.

Known Bugs:
  • Sometimes a ship spawns and is "taken over" by the AI, but does not move.
  • The ships with turrets will fire on each other. This happens because I had to improvise NPC creation. The ships all belong to a faction which does not technically exist. As far as I am able to see there is no way to properly create an NPC in the current API. If anyone knows of a way to create an NPC identity, let me know.
  • Some people report that their turrets do not automatically attack AI ships. If you're experiencing this bug please ensure that you have "owned" your ship (and its turrets). If that fails, try turning on the "Target moving object" option of your turrets.
  • Ships with insufficient backward thrust will often fail to stop in time; and thus smash into you, your base, your ships, etc.

Credit:
Some (small) sections of the code were taken from "KSH Space Engineers Mission 01" scenario. Credit given where credit is due.
Popular Discussions View All (6)
65
Apr 11, 2017 @ 1:34pm
PINNED: Bug Reports
DarkkShadow0
47
Apr 11, 2016 @ 1:57pm
PINNED: Feature Requests
DarkkShadow0
23
Feb 4, 2016 @ 11:41am
PINNED: Full Command List
DarkkShadow0
417 Comments
BOXBEEER11 Nov 10, 2023 @ 2:34am 
говно не работавет
Tye Dye Guy Sep 30, 2022 @ 3:33am 
Hats off the the best mod for creating sandbox scenarios and battles easily with custom ships in game, it will truly be missed, nothing has ever been like it.
76561198123711201 Jan 9, 2021 @ 5:16pm 
any simelar mod?
Avno(AH-vvv-no Nov 3, 2019 @ 5:17am 
i got the things down so i will be able to summon ships!!!!
Prox Aug 12, 2019 @ 10:49am 
https://steamcommunity.com/sharedfiles/filedetails/?id=1773965697

Here's a temporary or permanent remplacement
pissface why? May 15, 2019 @ 10:39pm 
Instead of asking for it to be fixed, try fixing it yourself!
Red Eclipse Feb 4, 2019 @ 5:06am 
Could you please update this? SE just isn't the same without it.
Brother Bigot Aug 28, 2018 @ 8:23pm 
Dark shadow is the mega dead
CaptPatrick01 Aug 28, 2018 @ 5:59pm 
I yearn for the day this mod works again... Perfect testbed for testing your newly built ship's weapons without having to wait for an Argentavis to spawn...




Or having the guilt of raiding a random passing freighter.
Wame Aug 7, 2018 @ 3:48pm 
Update it please