Tagboat Towship


Adds towship-tagboat (clone of cargo-ships indep-boat) and turns Wooden Platform into a floating barge that can be attached/detached with J/K. Waterway setup and automation possible

Content
6 hours ago
2.0
118
Transportation Logistics Trains

Changelog

Version: 0.2.38
Date: 2026-03-15
  Bugfixes:
    - Fixed excavator-barge helper drills being recreated repeatedly when tracked helper references went stale; the runtime now re-adopts nearby valid helpers before creating new ones.
    - Synced excavator-barge drill and under-drill together in one pass to avoid losing the freshly created under helper during the same tick.
    - Refilled the mounted excavator internal energy buffer during runtime sync so the hidden helper drill does not remain stuck without usable power.
Version: 0.2.38
Date: 2026-03-15
  Bugfixes:
    - Fixed crash in on_player_mined_entity when excavator debug build called cleanup_excavator_debug before its local definition.
    - Kept debug logging enabled for excavator barges.
Version: 0.2.38
Date: 2026-03-15
  Changes:
    - Added excavator-barge debug logging to factorio-current.log with de-duplicated runtime snapshots for missing helpers, blocked output transfer, inactive drills, and abnormal drill status.
    - Added the /tagboat-excavator-debug command to dump the currently selected excavator barge state into the log on demand.
Version: 0.2.38
Date: 2026-03-15
  Changes:
    - Replaced the decorative under-barge excavator render with a second real mounted Canal Excavator drill under the barge hull.
    - Both mounted excavator drills now stay synced to the barge and both push their mined output into the barge cargo hold.
Version: 0.2.37
Date: 2026-03-15
  Changes:
    - Added a second decorative Canal Excavator render under the excavator barge hull, so the mounted excavator is now also visible beneath the barge without changing mining logic.
Version: 0.2.36
Date: 2026-03-15
  Fixes:
    - Restored the excavator-barge side mount mapping so the horizontal barge sprite places the excavator on the outer/right working side again.
Version: 0.2.35
Date: 2026-03-15
  Fixes:
    - Reversed the explicit excavator-barge per-facing mount offsets so the mounted excavator sits on the intended outer side of the barge again.
Version: 0.2.34
Date: 2026-03-15
  Fixes:
    - Switched the excavator-barge mount position to explicit per-facing offsets so it matches the earlier approved placement instead of relying on inferred forward vectors.
    - Shrunk the mounted excavator collision box again so the barge hull should not interfere with excavator work.
Version: 0.2.33
Date: 2026-03-15
  Fixes:
    - Corrected excavator-barge mount geometry to use the barge sprite-facing direction again when deciding what counts as “forward”.
Version: 0.2.32
Date: 2026-03-15
  Fixes:
    - Aligned the mounted excavator drill direction with the barge heading again, so the excavator work area points forward toward excavatable canal resources instead of backward.
Version: 0.2.31
Date: 2026-03-15
  Fixes:
    - Moved the actual mounted excavator helper forward on the barge again, using the earlier forward offset distances directly for east/west and north/south facings.
Version: 0.2.30
Date: 2026-03-15
  Fixes:
    - Reworked the excavator barge back to an electric Canal Excavator helper, matching the original excavator energy type and resource mining behavior more closely.
    - Added hidden attached electric support entities on the barge: a free electric-energy-interface and an invisible power pole that move with the mounted excavator.
    - Replaced the separate rendered excavator visual with the actual mounted drill entity again so the original mining-range visualization can be shown when the barge-mounted excavator is selected.
Version: 0.2.29
Date: 2026-03-15
  Fixes:
    - Restored the hidden excavator drill work area to Canal Excavator's original geometry while keeping collisions disabled, so the barge-mounted excavator can actually mine prepared canal resources again.
    - Switched excavator-barge refueling to direct burner-inventory insertion and wake-up updates after sync, improving fuel pickup from the barge hold.
Version: 0.2.28
Date: 2026-03-15
  Fixes:
    - Reversed the excavator-barge forward offset direction so both the visible excavator and its hidden drill mount move toward the intended bow side instead of the stern side.
Version: 0.2.27
Date: 2026-03-15
  Fixes:
    - Moved the excavator-barge sprite by editing the directional animation layer shifts directly: 220 px forward for east/west and 160 px forward for north/south.
    - Switched excavator-barge fueling to direct burner insertion via the mounted drill entity, filtered by the drill burner fuel categories.
Version: 0.2.26
Date: 2026-03-15
  Fixes:
    - Hardened excavator-barge fueling so the mounted drill now pulls any valid burner fuel from the barge cargo hold using explicit item-name transfers.
Version: 0.2.25
Date: 2026-03-15
  Fixes:
    - Tuned the deck-mounted excavator sprite offset to 220 px forward for west/east facings and 160 px forward for north/south facings.
    - The hidden excavator drill now explicitly inherits Canal Excavator resource categories so it keeps mining excavatable canal resources on the barge.
    - Excavated output still transfers from the hidden drill output inventory into the barge cargo hold each tick.
Version: 0.2.24
Date: 2026-03-15
  Fixes:
    - Moved the mounted excavator 7 tiles toward the bow while keeping its mining footprint shifted 4 tiles back toward the stern.
    - Excavator-barge visuals now rebuild when the barge position changes, preventing stale rendered remnants after pushing or snapping.
    - Hidden excavator helpers now rebuild if teleport sync fails and periodic orphan cleanup removes leftover helper entities from earlier bad states.
Version: 0.2.23
Date: 2026-03-15
  Fixes:
    - Moved the visible excavator above the barge by rendering it as a deck-mounted animation instead of a separate world entity hidden behind the hull.
    - Rotated the excavator barge mount by 180 degrees and tied the visible excavator strictly to the barge so pushing or moving it no longer duplicates the machine.
    - Excavator barges now pull fuel from the barge cargo hold instead of requiring direct fueling of the mounted drill.
    - Configuration changes now rebuild excavator-barge helpers and remove orphaned duplicated drill helpers from existing saves.
Version: 0.2.22
Date: 2026-03-15
  Changes:
    - Added a hard dependency on Canal Excavator and a new canal excavator barge item that combines the floating barge with a mounted digger.
    - Added manual and waterway variants of the excavator barge so the tugboat can push, tow, and couple it just like the standard barge.
    - Added runtime pairing for the mounted excavator so the drill stays on the barge and moves mined spoil into the barge cargo hold.
Version: 0.2.21
Date: 2026-03-07
  Changes:
    - Changelog format cleanup release.
    - Repackaged the mod as version 0.2.21 without gameplay changes.
Version: 0.2.2
Date: 2026-02-26
  Fixes:
    - Fixed temporary disembark deck-ring cleanup so landfill tiles are restored by the periodic cleanup pass.
    - Hardened independent to waterway placement conversion so the original entity is restored if waterway entity creation fails.
    - Improved water tile detection for temporary deck generation with Factorio 2.0 collision-mask layouts that use layers tables.
    - Corrected the quick-embark hint text to show Shift+K.
  Optimizations:
    - Optimized the main towing loop by moving helper functions out of on_tick and avoiding closure recreation every tick.
Version: 0.2.1
Date: 2026-02-25
  Changes:
    - Waterway J attach can now couple an additional towship-tagboat-waterway tugboat to the end of the train to increase pulling power.
    - Waterway attach now selects the nearest valid target, either a barge or a tugboat, and preserves existing chain exclusions.
    - Waterway link validation and cleanup now support towship-tagboat-waterway as a follower in the chain, including tow-line cleanup on removal.
Version: 0.2.0
Date: 2026-02-25
  Changes:
    - Reworked the waterway architecture for tugboat and barge handling.
    - towship-tagboat-waterway is now a single locomotive-style waterway tug without a cargo-ships body and engine pair.
    - wooden-platform-barge-waterway remains a wagon and can be chained as a real train carriage.
    - Independent to waterway conversion for tugboat and barge is now handled by this mod instead of cargo-ships add_boat conversion.
    - cargo-ships integration now registers only waterway rolling-stock bodies through add_ship, allowing placement on waterways without engine-pair restrictions.
    - Waterway J and K towing keeps the visual tow line but now relies on true train coupling only.
    - Waterway pipette (Q) now selects the correct items, towship-tagboat and wooden-platform-barge, instead of cargo-ships boat.
    - UI naming changed from Tagboat to Tugboat for display, localization, and messages while keeping internal IDs for save compatibility.
  Fixes:
    - Fixed waterway J attach to use the correct one-argument connect_rolling_stock() API call.
    - Added a fallback recreate-and-connect flow for waterway barges when direct snap and connect fails.
    - Fixed the waterway J fallback crash caused by assuming LuaEntityPrototype has a max_health field.
    - Fixed a cargo-ships compatibility crash by creating scripted waterway entities with raise_built set to false.
    - Waterway attach now prefers stern-side placement and preserves barge facing instead of flipping it to the opposite side of the tug.
    - Tuned waterway barge collision and selection geometry plus coupling distances for easier placement and less overlap.
  Graphics:
    - Reduced the waterway tugboat visual scale to better match cargo-ships boat scale.
    - Removed the waterway tugboat shadow layer to avoid misalignment with the custom tug sprite.
Version: 0.1.7
Date: 2026-02-24
  Changes:
    - Added hidden waterway variants for tugboat and barge entities used for automatic placement conversion.
    - Placing a tugboat or barge on a waterway now auto-converts it to the waterway entity; outside waterways it stays independent.
    - Existing car-based tugboat and barge entities plus manual towing and rope-chain logic remain unchanged.
    - Barge car now uses a void energy source so it no longer shows a fuel requirement UI and remains Factorio 2.0 compatible.
  Graphics:
    - Nudged the tugboat shadow slightly upward for better alignment.
Version: 0.1.6
Date: 2026-02-24
  Fixes:
    - Fixed custom-input conflicts so J attaches, K detaches, L performs safe disembark, and Shift+K triggers quick embark.
    - Fixed safe disembark to use a fallback temporary deck ring when no land tile is nearby.
    - Removed duplicate on_player_driving_changed_state event registration that could override the earlier handler.
    - Cleaned an obsolete appended towing patch block to reduce script-load noise and maintenance risk.
  Changes:
    - Barge no longer inherits a fuel or energy source from indep-boat and is now a tow-only entity.
  Graphics:
    - Tugboat now reuses the cargo-ships boat shadow layer for better visual grounding on water.
Version: 0.1.5
Date: 2026-02-24
  Features:
    - Tugboat can now push a barge.
Version: 0.1.4
Date: 2026-02-24
  Features:
    - Increased barge inventory size to 300.
Version: 0.1.3
Date: 2026-02-24
  Features:
    - Added the possibility of towing several barges.
Version: 0.1.0
Date: 2026-02-10
  Fixes:
    - Hardened Factorio 2.0 prototype loading by stripping or converting legacy lines_per_file fields and forcing clean towship-tagboat animation handling in data-final-fixes.
Version: 0.1.0
Date: 2026-02-10
  Fixes:
    - Converted legacy lines_per_file fields to line_length in final-fixes to prevent Factorio 2.0 prototype load errors for towship-tagboat and wooden-platform-barge.
Version: 0.1.0
Date: 2026-02-10
  Fixes:
    - Fixed the Factorio 2.0 prototype load error so towship-tagboat no longer inherits legacy sprite fields such as lines_per_file.
  Graphics:
    - Tugboat now uses its own 256-frame rotated animation from tagboat_barge_graphics in graphics/tugboat/0001..0256.png.
Version: 0.1.0
Date: 2026-02-10
  Fixes:
    - Fixed the Factorio 2.0 prototype load error by stripping legacy lines_per_file fields from tugboat animation layers.
    - Fixed Enter hop-in and hop-off so driving_changed_state no longer interferes with tugboat and only blocks barge behavior when needed.
    - Fixed tugboat hop-off so deck tiles are placed around the boat and never under it.
    - Fixed the custom-input consuming type for Factorio 2.0 so it is game-only.
  Changes:
    - Added a quick hop-in key on K to enter the nearest free tugboat.
    - Barge sprites are loaded from the external dependency mod tagboat_barge_graphics.
    - Disembark now creates a temporary deck when no land is nearby.
    - Added custom input tagboat-disembark on L to enable safe disembark.
    - Added forced disembark on L to teleport the player to the nearest valid land position.
    - Barge now uses a 256-direction sprite set for smooth rotation.
    - Floating barge now uses prerendered sprite animation.
Version: 0.1.0
Date: 2026-02-10
  Graphics:
    - Updated barge graphics filenames to 0001..0256.png.
Version: 0.1.0
Date: 2026-01-31
  Fixes:
    - Fixed Lua syntax by adding the missing comma after the rope color table in the rendering common table.
Version: 0.1.0
Date: 2026-01-31
  Fixes:
    - Fixed the Lua syntax error in the rope color definition caused by a missing table closure.
Version: 0.1.0
Date: 2026-01-31
  Changes:
    - Changed towing rope color to brown for better visual realism.
Version: 0.1.0
Date: 2026-01-31
  Changes:
    - Moved the rope stern attachment and first joint closer to the tug so the bend starts immediately.
    - Barge steering now gradually rotates to follow tow direction under tension instead of behaving like rigid coupling.
Version: 0.1.0
Date: 2026-01-31
  Changes:
    - Adjusted tow correction so strong sideways rope pull moves the barge primarily along its own axis and reduces yaw caused by the bow-applied tow vector.
Version: 0.1.0
Date: 2026-01-31
  Fixes:
    - Fixed a crash caused by assuming LuaEntity has angular_velocity; turning-in-place is now estimated from orientation delta.
Version: 0.1.0
Date: 2026-01-31
  Changes:
    - Replaced rigid towing with flexible rope towing.
    - Rope can bend at the stern joint up to roughly 145 degrees so turning in place no longer makes the barge orbit or spin.
Version: 0.1.0
Date: 2026-01-31
  Fixes:
    - Fixed the Lua syntax error caused by return placement in safe tow routing.
Version: 0.1.0
Date: 2026-01-31
  Changes:
    - Removed stiff towing physics that forced barge rotation during tugboat in-place turns.
    - Rope can bend up to roughly 145 degrees at the stern joint so turning in place does not spin the barge.
Version: 0.1.0
Date: 2026-01-31
  Changes:
    - Towing line now uses springy two-joint dynamics so the hinge near the tug reacts first and the hinge near the barge lags behind, avoiding a rigid hitch look.
Version: 0.1.0
Date: 2026-01-31
  Fixes:
    - Fixed the control.lua syntax error caused by a stray (ori) line inside orientation_to_vec().
Version: 0.1.0
Date: 2026-01-31
  Fixes:
    - Fixed a crash where geometry helpers were nested due to a broken clamp() definition and vec_angle is now properly defined.
Version: 0.1.0
Date: 2026-01-31
  Changes:
    - Tow line now reacts to tugboat turning so the stern hinge moves first and the barge bow hinge follows with delay, avoiding a rigid towing effect.
    - Added angle calculations for tow-line to tugboat and tow-line to barge relationships, with values stored in towing state.
Version: 0.1.0
Date: 2026-01-31
  Fixes:
    - Fixed the on_tick crash by adding the missing clamp() function used by tow-line animation.
Version: 0.1.0
Date: 2026-01-31
  Changes:
    - Tow line now has two main hinges, one near the tugboat and one near the barge, plus slight animated slack so towing no longer looks rigid.
Version: 0.1.0
Date: 2026-01-31
  Changes:
    - Towed barge is now positioned 15 tiles behind the tugboat to reduce collisions.
  Fixes:
    - Removed the electric-wire connection between the barge and tugboat so only the white rendering tow line remains.
Version: 0.1.0
Date: 2026-01-31
  Fixes:
    - Fixed the Factorio 2.0 loading crash by updating tow-wire-anchor collision_mask to the required layers-table format.
Version: 0.1.0
Date: 2026-01-31
  Changes:
    - Removed wooden-platform tile connection and moving deck painting between tugboat and barge.
    - Added a real copper-wire tow line using hidden wire-anchor entities from the tug stern to the barge bow.
    - Towing distance is now exactly 5 tiles behind the tug.
    - Barge orientation now uses the computed angle between tug and barge so it looks like it is pulled by a line.
Version: 0.1.0
Date: 2026-01-31
  Fixes:
    - Fixed tugboat movement so it no longer paints tiles under the tug.
    - Fixed towing attach reliability by increasing the attach radius.
  Changes:
    - Tug now paints a small stern platform behind itself so the player can exit onto it.
    - Barge no longer requires fuel because the burner was removed and it remains towable with J and K.
Version: 0.1.0
Date: 2026-01-31
  Fixes:
    - Fixed Factorio 2.0 storage usage by using the storage table instead of global.
  Changes:
    - Reworked wooden-platform into a floating barge entity that paints wooden-platform tiles under itself.
    - Towship-tugboat can tow and untow barges with J to attach and K to detach.
    - Added a small moving wooden deck under towship-tagboat to allow exiting on water.