Space Engineers

Space Engineers

453 ratings
[OBSOLETE] Planetary Cargo Ships
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Script, Other
File Size
Posted
Updated
124.031 KB
Jul 11, 2017 @ 12:51pm
Sep 24, 2018 @ 10:57am
27 Change Notes ( view )

Subscribe to download
[OBSOLETE] Planetary Cargo Ships

Description
This mod is now considered obsolete and will no longer receive updates. It's functionality is now provided by the Modular Encounters Spawner


Introduction

This mod adds a system that allows for ships to spawn in planetary atmosphere as hostile cargo ships. The mod will work on any medium to large sized planet, including modded planets.

***THIS MOD DOES NOT ADD NEW CARGO SHIPS. IT ONLY ALLOWS THEM TO SPAWN FOR OTHER MODS***


Player / Regular User Setup
  • Add this mod to your game world, along with another eligible mod (eg: Air Traffic).
  • Ensure 'Cargo Ships' are enabled in your world options.

Spawning and Despawning Rules:
  • A maximum of 6 Planetary Cargo ships can exist at once.
  • Ships will only spawn on planets that have an atmosphere.
  • Larger planets allow the cargo ships to remain longer. Ships will likely not spawn on planets smaller than 30000m in diameter.
  • Ships will not appear on planets that have no active players.
  • If the maximum cargo ship limit is reached, they will stop spawning until the existing ships can despawn.
  • Ships spawn as part of the Space Pirates faction.
  • Ships should spawn no closer than 2000m and no further than 25000m from any active player.
  • After spawning, the ships will travel in a linear path to a despawn target stored in the remote control block.
  • Cargo Ship path length scales with the planet size.
  • Once a ship reaches the despawn waypoint, it will be removed from the game if there are no players within 800m.
  • If a player destroys the active remote control block, or is able to hack and take ownership of any blocks on the cargo ship - it will no longer despawn. This also removes the ship from the Active Cargo Ships list, allowing a new ship to appear later.
  • If the ship is loaded with a script that resets the waypoints on the remote control block (eg: Pirate Drone Scripts), this will also remove the ship from the Active Cargo Ships list and it will not despawn. However, the ship is now marked as Dormant and can be re-added as an Active Cargo Ship by giving it a waypoint called "DespawnTarget". If player takes ownership of any blocks while a ship is considered Dormant, it will then be ineligible to return to the Active Cargo Ship list.
  • Any ship that descends lower than 150m from the planet surface will not despawn and will be removed from the Active Cargo Ships list (eg: player damages ship and it crashes, but remote control survives).
  • Cargo Ships now have a hard time limit of 2000 seconds (approx 33 minutes). If auto-pilot gets stuck and it cannot reach the despawn coords, it will despawn after the timer passes 2000 seconds. The timer is cancelled if the ship is no longer in the Active Cargo Ships list.

Other Cargo Ship Behavior
  • While a ship is considered an active Cargo Ship, the mod will automatically replenish ice all oxygen generators every 10 seconds.
  • Energy (Power / Gas) consumed by thrusters is heavily reduced while a ship is an active cargo ship.
  • These behaviors are removed if a player takes control of any block on the ship.


Modder Setup

These instructions are based on the assumption that you already have some experience creating Cargo Ship or Encounter mods.

If you want to learn how to setup a basic cargo ship mod, check out this video tutorial by Splitsie.

SpawnGroups.sbc Settings:
  • For each SpawnGroup that you want to appear in atmosphere, add (Atmo) anywhere in the SubtypeId field
  • To prevent a SpawnGroup from appearing in space, add the <IsPirate>true</IsPirate> line to the SpawnGroup.
  • Prefabs should be spaced with approx 100m or more in distance from each other.
  • The ship speed you specify for a prefab will be used by the remote control on the ship when spawned.
  • There are options available to control which planet to spawn on and to use custom npc factions. See discussion threads for more details.

GlobalEvents.sbc Settings:
  • If left unchanged, Planetary Cargo Ships will spawn with the same timings that the vanilla cargo ships use
  • To change the timings, create a new Global Event with the SubtypeId SpawnAtmoCargoShip and specify the timings (in ms) you want to use
  • If SpawnCargoShip event values are changed, but SpawnAtmoCargoShip event is not found, the planetary cargo ships will use the modified timings from SpawnCargoShip

Ship Setup / Tips:
  • Ships used as Planetary Cargo Ships require a Remote Control block (so it can move), and a Cockpit or Control Seat (spawning system uses this to properly orientate the ship with Planet Gravity).
  • Remote Control Flight Mode must be set to One Way
  • Make sure reactors have fuel and turrets have ammo. Also, close doors and designate a cockpit/control seat at "Main Cockpit"
  • When filling ship inventories, use 1x cargo rules where possible (to ensure cargo doesn't get truncated in worlds with low cargo multipliers).
  • If ship uses hydrogen, make sure that it has enough stored hydrogen or ice in Oxygen Generators to sustain flight for a fairly long period of time.
  • The ships will spawn at higher altitudes (this scales with planet size). Make sure that your ship can keep themselves in the air at high altitudes.
  • This mod is able to use ContainerTypes if you've created a ContainerTypes.sbc file for your mod. Add the ContainerType tags to your prefabs the same way you would for a regular cargo ship mod.


Known / Possible Bugs
  • If you restart your game and an active cargo ship is in play, there's a chance it will not despawn when it reaches the despawn target coords. The bug seems to be rare and I cannot reproduce it often, but I will fix it once I can identify what causes it.


Modular Encounters Collection Discord Server

If you're interested in getting involved with the mods in this collection, and future projects, check out our Discord Server:

[discord.gg]
Popular Discussions View All (14)
13
Sep 30, 2017 @ 12:09pm
Crash on DS
PhoenixTheSage
7
Jan 11, 2018 @ 10:22am
Getting a crash recently (today)
Anubis
5
Aug 30, 2018 @ 3:24am
Huge RAM usage on ship despawn on 1.187.2
Psyborg
290 Comments
Icy Skye May 7, 2023 @ 1:00am 
Gotcha, alrighty, thanks for the confirmation!
Meridius_IX / Lucas  [author] May 6, 2023 @ 9:26pm 
Pretty much. This mod never added new ships, it was an early framework for spawning ship on planets
Icy Skye May 6, 2023 @ 3:36am 
Apparently a fork of this mod (or a very similar one, or literally this mod) that I was subscribed to just vanished- ID `2615151213` friendlyname `CargoShipsPlanetary`- it's not the Air Traffic (Imber) mod, nor this one, and the actual workshop item is gone so I can't even check the page to see what it was.
It was RivalAI-compatible, and had the B-60 Bulk Freighter, B-980 Hauler, Cursor, and TT-420 Freighter (via reading the folder contents).

I assume if I have this mod (or better yet MES w/ Imber), I'm not missing out on anything, right?
Darian Stephens Jun 18, 2020 @ 2:39pm 
@ 🐲★►Denis◄★🐲
Someone didn't look at the first, bolded, colored line in the description which explains the situation and provides a convenient link.
🐲★►Denis◄★🐲 Jun 18, 2020 @ 12:16am 
If this mod is considered outdated, which Mod replaces it?
Meridius_IX / Lucas  [author] Oct 18, 2018 @ 10:39am 
It sounds like you're likely using my new spawner in addition to this one. This spawner requires that world option enabled, but the new one does not. Also, if the new spawner is detected, this mod will disable itself on world load.
eZink Oct 18, 2018 @ 10:35am 
Hi, Quick question for anyone that can help me:

when i enable cargo ship in "advance option" with the mod "Planetary Cargo Ships" turn on, i get a error message, but i can still play.

here it says to activate @cargo ship@ to make the mod work ?

im quite confuse if i really need to activate @cargo ship@ since it give me a error message does the mod really need it to work correctly ?
[TBL]Maflomei Oct 9, 2018 @ 1:51pm 
just spawn one and hit strg+B on it to get the BP or is that not what you want ?
{Мирный_Атом} Oct 9, 2018 @ 5:18am 
@meridius I really liked Planetary Dropship, how can I get a drawing of this ship? It is convenient to colonize the planets on it!
Meridius_IX / Lucas  [author] Oct 4, 2018 @ 3:23am 
That'll happen eventually. For now I just want to keep an eye on the new spawner and work out any quirks it may have before doing that.