Ship Age


Ever wanted your platforms to actually be stations and for ships to dock on them? Well this is the mod for you then.

Content
3 days ago
2.1
74
Transportation Logistics Logistic network Circuit network

Changelog

Version: 0.9.74
Date: 2026-09-26
  BugFixes:
    - Fixed a ship-cloning duplication bug: vehicles on a ship's flooring (especially the spaceship-control-hub-car) were being both cloned by clone_brush AND teleported during each dock/undock cycle, creating a duplicate every cycle that compounded over time. Vehicle/wagon types (car, spider-vehicle, locomotive, cargo-wagon, fluid-wagon, artillery-wagon) are now excluded unconditionally from the clone-brush source list in both the staged and instant clone paths — they are moved (teleported) as the same entity, never duplicated. Added a diagnose_duplicate_vehicles() cleanup on init/load that finds any duplicate hub-cars that have already accumulated in an existing save and DESTROYS the extras (keeping the occupied one, or the one closest to the hub), so affected saves are repaired automatically on the next mod update.
    - Fixed a performance hotspot in handle_mined_entity (fired per entity during platform.destroy(1) teardown on every dock/undock cycle): it no longer loops over every ship in storage.spaceships for each mined entity — it looks up the one ship on the entity's surface directly, and uses a single find_tiles_filtered query instead of a per-tile get_tile() double loop. Mod-controlled teardowns (platform.destroy(1) and clone cleanup) now set a suppress flag so the flooring check is skipped entirely for the ship's own structure being removed.
    - Added a duplicate-ship guard in handle_built_entity: if a hub is already tracked by an existing valid ship, it reassigns .hub instead of creating a duplicate ship record (with a warning log). Added a one-time diagnose_duplicate_ships() diagnostic on init/load that logs if two ship entries share a hub unit_number or position.
    - Disabled all log-file output in normal play: every log() call in the active mod (schedule, auto-build, clone) is now gated behind a local DEBUG flag that defaults to false, so nothing writes to the log unless actively debugging. Also throttled the per-ship dock-slot polling in check_waiting_ships_for_dock_availability to every 60 ticks to avoid repeatedly scanning the full floor while a ship waits for a free dock.
    - Fixed docking ports being falsely reported as "occupied" after the ship that docked there was removed (hub mined or ship converted to a station): the port's occupancy flag is now cleared whenever a ship is removed, and update_all_ship_docking_status reconciles any stale occupied flags on load so empty ports are no longer blocked.
    - Fixed the "Spaceship Actions" GUI showing Drop-to-Planet buttons even when the ship was docked at a station: the button visibility is now decided from the ship's actual surface platform (name ends with "-ship") at GUI creation time, instead of the cached ship.own_surface flag which could be stale.
    - Fixed duplicate "Spaceship Actions" GUIs stacking when the control hub was opened repeatedly: create_spaceship_gui now destroys ALL existing actions GUIs for the player (not just the one for the current ship id) before creating a new one, and on_gui_closed destroys any remaining actions GUIs. This guarantees the actions GUI is recreated fresh every time the ship GUI opens and fully removed when it closes, regardless of how the hub was opened (directly or via the hub-car).
    - Fixed a crash ("Unknown space-location name: none") when taking off via the automatic schedule, especially when spam-clicking the Goto button: clone_ship_to_space_platform now derives the orbit planet from the ship's current surface (the station it is docked at) instead of trusting ship.planet_orbiting, which could be stale ("none" while in transit or after a scan on a non-platform surface). It also guards against an invalid planet with a clear error message instead of throwing.
    - Fixed a hard lockup right before source cleanup during ship cloning: apply_ship_wire_snapshot was calling surface.find_entity (a spatial lookup) once per wired entity, all in a single tick during the clone finalize phase. It now builds a position-keyed lookup from one find_entities_filtered over the destination area, turning hundreds/thousands of spatial lookups into O(1) hash lookups (with a spatial fallback only on exact-position misses).
  Features:
    - Added localized names and descriptions for all startup settings (shown in the mod settings screen).
    - Spaceship Flooring and Space Station Platform can now be quick-replaced with each other (like brick <-> concrete), by enabling allows_being_covered on both tiles. The existing tile_condition gating keeps regular concrete/brick from covering them, so the mod's tile.name checks stay intact.
    - Added startup settings to tune the speed of every tick-driven system, each defaulting to the current behavior:
      - "spaceship-scan-speed" (default 30): tiles/entities scanned per tick
      - "spaceship-clone-speed" (default 10): entities/tiles cloned per tick
      - "spaceship-clone-cleanup-speed" (default 120): tiles cleaned up per tick after a clone (entity cleanup is half this)
      - "spaceship-auto-build-speed" (default 2): buildability checks run per tick
      - "spaceship-build-animation-speed" (default 2): ticks per scaffolding animation frame (lower = faster)
Version: 0.9.73
Date: 2026-09-26
  BugFixes:
    - Fixed a crash when opening the ship GUI with an item count wait condition that had an item set: the choose-elem-button's elem_value is a plain string for item-type buttons, not a SignalID table, so it is now assigned directly instead of as a table
    - Fixed item count wait conditions losing their selected item when the GUI updated or was reopened: the item chooser returns a plain string for item-type buttons, which is now normalized into a proper SignalID ({type = "item", name = ...}) when saved
    - Fixed a ship with a single-station schedule taking back off to orbit after docking; it now stays docked and waits at the station until more stops are added
    - Fixed a ship continuing toward a station that was deleted from its schedule while it was traveling; it now retargets to the next station and the platform schedule is re-synced to reflect the deletion
    - Fixed the automatic/paused toggle switch not reflecting the ship's actual mode after toggling (e.g. when auto is disabled because the current dock anchor is "none"); the switch is now re-synced to the real ship.automatic value
Version: 0.9.72
Date: 2026-09-26
  Features:
    - Implemented dynamic scan runtime profiles: scanning now runs at different speeds based on player attendance (attentive mode when player is on the ship or viewing via schedule GUI, priority-waiting mode for ships waiting for docks, and background mode for all other ships)
    - Added comprehensive docking port management system with visual alerts: missing docking port warning, waiting-for-open-dock alert, and waiting-for-blocked-dock-area alert with configurable icons and refresh intervals
    - Introduced automated scheduling system allowing ships to autonomously dock at space platforms and depart on scheduled routes based on wait conditions (time-based, item count, or circuit conditions)
    - Added player attendance detection for scanning prioritization: players attending via schedule GUI, cockpit, hub car vehicle, standing on ship flooring, or within 20 tiles of the ship bounds receive priority scan processing
    - Added bridge graphics for inventory extenders and spaceship control hub (sprites from bridge-sprites-data.lua and entity build animations integrated from space-platform-entity-build-animation-lib)
    - Implemented circuit wire connection system for docking ports: enumerates combinator_input_red/green and combinator_output_red/green connectors to bridge matching wires between ship and station ports
    - Added clone job queue and cleanup queue processing for staged cloning operations with chunk-based area generation waiting
    - Added a no-bot auto-build system that constructs ship ghosts without construction robots: ghosts placed on ship surfaces are picked up on game load (deferred to the first tick), built via revive(), and deconstruction is handled via mine(), with build animations and per-tick build task processing
    - Removed the space logistic chests and the logistic-node roboport prototypes (spaceship-logistic-node, spaceship-passive-provider-chest, spaceship-active-provider-chest, spaceship-storage-chest, spaceship-requester-chest) from data.lua
    - Asteroid collectors are now included in the ship scan even though their bounding box hangs half off the flooring, so they come along with the ship
  Changes:
    - Docking now only targets station platforms (name ends with "-station"); ship platforms in orbit are never used as a manual dock destination
    - Docking port circuit connections now only connect the ship's port to its specific docked station port (not every adjacent port)
    - Docking port adjacency now requires both ports to be on the same surface
    - Drop-to-planet and dock operations now use the player who clicked the button (falling back to the ship owner), so two players can act independently
    - The extended ship GUI is now keyed by ship id instead of ship name
  Bugfixes:
    - Fixed auto-build failures after scan cancellation by restoring ship.surface reference from scan state before clearing storage.scan_state
    - Fixed temporary hub inventory size drops during scans by deferring capacity recalculation until scan finalizes
    - Fixed cloning with extended hub inventories by ensuring destination hub grows to at least source hub size before item transfer
    - Fixed waiting state alerts not being properly cleared on successful docking or when ships leave the platform
    - Fixed duplicate scan requests for the same ship by checking existing scan_state and reusing it when appropriate
    - Fixed drop-to-planet operation failing when two players attempted to dock simultaneously: each player is now handled independently with proper per-player queueing via storage.base_landing_in_progress keyed by player index
    - Fixed circuit connections on docking port anchors sometimes not connecting: circuit wire connectors are now properly enumerated using get_wire_connectors(false) and bridged one red + one green wire per pair using try_connect_connectors fallbacks
    - Added temporary space-platform-hub reuse logic for rapid successive drops: if a previous drop's hub still exists on the ship's surface, it is reused instead of failing to create a second one
    - Fixed clone wire snapshot application using pcall fallbacks for connect_to calls with three progressively simpler attempts (with origin, without origin)
    - Fixed the player being ejected from the cockpit mid-drop: the drop flow now allows leaving the cockpit while a scripted landing is in progress
    - Fixed a stale out-of-bounds schedule.current being copied into the platform schedule, which Factorio rejected with "Index out of bounds"; schedule.current is now clamped to the remaining records
    - Fixed the ship scan snapshot going stale when tiles are changed by script (e.g. auto-build reviving a tile ghost mid-flight): script_raised_set_tiles now invalidates the ship's scan
Version: 0.9.71
Date: 2026-09-24
  Changes:
    - The "Add station" menu now only lists planets that have been researched/unlocked for the player's force
    - Removed the X button from the "Add station" menu (the menu closes by clicking "Add station" again)
    - Newly added stations now start with no wait condition instead of a default circuit condition
    - Item count wait conditions now only allow selecting real items (not virtual signals like signal-A), keeping them distinct from circuit conditions
  Bugfixes:
    - Fixed a non-recoverable error when cutting (Ctrl+X) a new ship hub: a stale ship entry with an invalid hub reference crashed when reading its unit number; the hub validity is now checked before access
    - Fixed the "ship missing docking port" warning not identifying which ship it referred to; the ship name is now included in the message
    - Fixed the hub inventory size temporarily dropping during a scan: the storage capacity is no longer recalculated while the ship's floor snapshot is unavailable mid-scan, so the size stays until the scan finalizes and applies the correct value
    - Fixed items being lost when cloning a ship with an extended hub inventory: the cloned hub started at the base size, so items beyond the base slots failed to transfer; the destination hub is now grown to at least the source hub's size before transferring
    - Fixed the automatic/paused toggle not updating when clicking "goto planet": the switch now reflects the ship's automatic state after goto
    - Fixed adding a planet that already exists in the schedule showing the first occurrence's conditions: the newly added (last) station index is now used
    - Fixed a non-recoverable error opening the ship GUI when an old save had a virtual signal stored in an item count condition: the item chooser now only pre-selects real items and leaves the chooser empty otherwise
Version: 0.9.7
Date: 2026-09-24
  Changes:
    - Changed the spaceship control hub from a logistic-container to a plain container (chest) so it no longer interacts with the logistics network; removed the logistic_mode and max_logistic_slots properties
Version: 0.9.6
Date: 2026-09-24
  Bugfixes:
    - Fixed hub inventory extenders (spaceship-storage-link) not increasing the hub inventory on a ship built from scratch: a newly-built ship was never scanned at build time, so ship.floor was empty and the extenders couldn't be found; the ship is now scanned when its hub is built, and building a storage-link on an unscanned ship triggers a scan so the new flooring and extenders are picked up
Version: 0.9.5
Date: 2026-09-22
  Changes:
    - Reworked tile deconstruction to use a BFS cascade (mirroring the build side): only marked tiles touching space are processed, and removing a tile cascades to its marked neighbors, so deconstruction propagates from the platform's space border inward instead of cycling through every marked tile
  Bugfixes:
    - Fixed tile deconstruction not working at all: marking tiles for deconstruction on a space platform fires the event with a deconstructible-tile-proxy entity (not a LuaTile), which was being routed to the entity deconstruction path instead of the tile queue; the tile-detection check now recognizes the proxy type
    - Fixed the tile deconstruction BFS cascade stalling after removing the outer layers: the frontier queue's tail pointer was overwritten with a stale local copy, discarding the newly-cascaded interior tiles; the tail is now tracked as a single source of truth
    - Fixed the auto-build dropping every ghost after a scan was cancelled mid-scan: cancel_scan_for_ship now restores ship.surface from the scan state, so the ship remains findable by the auto-build
Version: 0.9.4
Date: 2026-09-20
  Features:
    - Asteroid collectors are now included in the ship scan and come along with the ship when it clones, even though their arms extend off the ship's edge
  Changes:
    - Docking and dropping a player to a planet now operate on the player who clicks the button, instead of the ship's original owner
  Bugfixes:
    - Fixed the no-bot auto-build system not invalidating the ship scan when it built or deconstructed entities (revive/mine now route through the same handlers as normal build/mine)
    - Fixed a stale scan snapshot when the player built or mined entities on the ship's flooring during an active scan; the scan is now cancelled and restarted so the snapshot stays current
    - Fixed interior tiles (and entities on them) of a large blueprint never being built even when materials were in the hub: the tile-buildability BFS flood-fill was never advanced each tick, so interior tile ghosts stayed stuck as "pocket still computing"; it is now advanced before build tasks each tick
    - Fixed entities in a blueprint not all being built because repair tasks (from damaged entities with no repair packs in the hub) flooded the build queue and starved the actual construction; repair tasks are now skipped when the hub has no repair packs and entities at full health are no longer registered for repair
    - Fixed ghosts placed after a batch of deconstruct/repair tasks never being built: the incoming build queue's head pointer could advance past the end of the array, so newly pushed ghosts were appended behind it and never processed; the queue now compacts whenever the head pointer gets past the end of the data
Version: 0.9.3
Date: 2026-09-19
  Features:
    - Added a scaffolding build animation for ship construction and deconstruction (integrated from the space-platform-entity-build-animation-lib)
    - Added an auto-build system: ghosts placed on a ship's surface are built from the control hub's inventory with the scaffolding animation, damaged entities are repaired using repair packs from the hub, and entities marked for deconstruction are mined back into the hub
  Changes:
    - Reduced spaceship-construction research cost from 1000 to 500 science packs
    - Offset the spaceship control hub circuit wire hookup to the bottom-right to match the space platform hub
    - Added a mod thumbnail
    - Removed the Space Roboport and the four space logistic chests (passive provider, active provider, storage, requester)
  Bugfixes:
    - Fixed a load error on the spaceship control hub by wrapping the space-platform-hub's circuit connector in a tuple (the logistic-container type requires a list of connector definitions)
    - Fixed a non-recoverable error when a player in map view was sent to space by rocket (character surface mismatch on set_controller)
    - Fixed a second player being ejected from the cockpit when another player tried to leave mid-flight
    - Fixed entities (e.g. a roboport) straddling the ship's edge being cloned even though they were not fully on spaceship flooring
Version: 0.9.0
Date: 2026-09-13
  Changes:
    - Renamed mod to "Shipage" (was "Spaceship Mod")
Version: 0.8.2
Date: 2026-09-13
  Changes:
    - Disabled control hub hover info by default; added a "spaceship-show-hover-info" startup setting to toggle it for troubleshooting
Version: 0.8.1
Date: 2026-09-13
  Changes:
    - Updated factorio_version to 2.1 (Factorio 2.1.17)
    - Moved all spaceship items/recipes into a dedicated "spaceship" subgroup in the Space item group
  Bugfixes:
    - Fixed invalid "steel" ingredient name (should be "steel-plate") in flooring and control hub recipes, which crashed mods that iterate recycling recipes (e.g. Stacked Recycling Results)
Version: 0.8.0
Date: 2026-04-29
  Changes:
    - Integrated ship GUI directly into SpaceShipMod (external ship-gui dependency removed)
    - Updated project versioning to reflect current development progress toward 1.0
Version: 0.2.0
Date: 2025-09-06
  Bugfixes:
    - Fixed ship placement on out of bounds tiles for huge ships
    - Fixed chunk generation for large ship cloning to prevent map edge cutoffs
    - Corrected Factorio API usage for map charting after ship operations
Version: 0.1.9
Date: 2025-06-21
  Changes:
    - Code organization and cleanup
Version: 0.1.8
Date: 2025-06-19
  Features:
    - Added spaceship armor requirement for space travel and drop operations
    - Implemented spaceship scanning state management for building/mining detection
  Changes:
    - Adjusted car position for better player control
    - Redesigned dropping logic for improved reliability
  Bugfixes:
    - Fixed camera issues during ship operations
    - Removed unnecessary button handling code
Version: 0.1.7
Date: 2025-06-18
  Features:
    - Added station control logic with ship naming conventions
    - Implemented planet orbiting detection based on platform state changes
  Changes:
    - Ships now use "-ship" prefix for better identification
    - Improved rendering positions for visual consistency
  Bugfixes:
    - Removed .vscode/settings.json from version control
Version: 0.1.6
Date: 2025-06-17
  Bugfixes:
    - General stability improvements and bug fixes
Version: 0.1.5
Date: 2025-06-15
  Features:
    - Added manual drive to planet functionality
    - Implemented drop pod system for new planet destinations
Version: 0.1.4
Date: 2025-05-18
  Features:
    - Enhanced GUI system integration
Version: 0.1.3
Date: 2025-05-17
  Features:
    - Added comprehensive GUI integration with ship-gui mod
    - Implemented station movement controls (up/down)
    - Added condition movement controls for scheduling
  Changes:
    - Major code cleanup and optimization
    - Removed redundant GUI scripts (now handled by ship-gui mod)
  Bugfixes:
    - Fixed various GUI-related issues
Version: 0.1.2
Date: 2025-05-12
  Features:
    - Added multiple ship handling logic per docking port
    - Enhanced GUI system with tag-based updates
Version: 0.1.1
Date: 2025-05-10
  Features:
    - Implemented circuit network logic controls
    - Added automated ship behavior system
Version: 0.1.0
Date: 2024-11-15
  Features:
    - Initial spaceship mod framework implementation
    - Basic ship structure with floors, walls, and entity management
    - Simple ship takeoff and docking mechanics
    - Core data prototypes for spaceship components
    - Basic event handling for entity build/mining operations
  Changes:
    - Replaced all power-armor-mk2 references globally with spaceship-armor
    - Added custom spaceship flooring tile based on space platform foundation
    - Created spaceship control hub container entity with inventory management
Version: 0.0.9
Date: 2024-11-01
  Features:
    - Added automatic ship behavior system with schedule checking
    - Implemented circuit condition evaluation for ship automation
    - Created docking port registration and management
    - Added ship-to-ship and ship-to-platform connection logic
  Bugfixes:
    - Fixed ship scanning to properly detect connected flooring tiles
    - Resolved entity storage and reference management issues
Version: 0.0.8
Date: 2024-10-20
  Features:
    - Added drop cost system requiring rocket fuel, processing units, and low density structures
    - Implemented cargo blacklisting to prevent dropping cost items as cargo
    - Created pending drop processing system with delayed execution
    - Added explosion effects for drop pod launches
  Changes:
    - Split drop logic into separate player and item drop functions
    - Improved drop pod entity creation with fallback options
Version: 0.0.7
Date: 2024-10-05
  Features:
    - Added comprehensive GUI system integration with ship-gui mod
    - Implemented station scheduling with wait conditions
    - Created circuit network signal reading and progress tracking
    - Added docking port GUI for configuration and management
  Bugfixes:
    - Fixed GUI event handling and button click processing
    - Resolved schedule management and station manipulation issues
Version: 0.0.6
Date: 2024-09-25
  Features:
    - Implemented ship cloning between surfaces with entity preservation
    - Added reference tile system for consistent ship positioning
    - Created ship surface management and platform integration
    - Added entity exclusion system for selective cloning
  Changes:
    - Improved ship scanning with incremental tile processing
    - Enhanced entity management with proper cleanup procedures
Version: 0.0.5
Date: 2024-09-10
  Features:
    - Added space platform state change handling
    - Implemented automatic docking when ships reach stations
    - Created ship schedule execution and progression system
    - Added platform creation and management for ship travel
  Bugfixes:
    - Fixed platform state tracking and ship assignment
    - Resolved automatic behavior conflicts during scanning
Version: 0.0.4
Date: 2024-08-28
  Features:
    - Created ship rendering system for docking preview
    - Added highlight management with expiration timers
    - Implemented dock confirmation GUI with preview functionality
    - Added player controller management for ghost mode during docking
  Changes:
    - Enhanced ship floor tile optimization with combined rectangle rendering
    - Improved tick-based processing for large ship operations
Version: 0.0.3
Date: 2024-08-15
  Features:
    - Added station management system with Stations.lua module
    - Implemented unique station naming per planet per force
    - Created platform state monitoring and station assignment
    - Added docking port limit configuration and ship tracking
  Bugfixes:
    - Fixed duplicate station creation on same planets
    - Resolved station naming conflicts and indexing issues
Version: 0.0.2
Date: 2024-08-01
  Features:
    - Implemented core ship scanning functionality with flood-fill algorithm
    - Added entity detection and storage on spaceship flooring
    - Created ship data structure with proper initialization
    - Added docking port detection during ship scanning
  Changes:
    - Enhanced ship constructor with complete parameter initialization
    - Improved scanning performance with configurable tiles per tick
Version: 0.0.1
Date: 2024-07-20
  Features:
    - Initial mod structure with basic spaceship class
    - Core data prototypes for spaceship entities and items
    - Basic event registration and handler framework
    - Space Age dependency integration
  Changes:
    - Created mod information and dependency configuration
    - Added initial notes and development structure
Version: 0.0.0
Date: 2024-07-15
  Features:
    - Initial repository creation
    - Basic mod folder structure
    - Placeholder files and configuration