[MOD 0.16] Vehicle Wagon 1.2.5

Topics and discussion about specific mods
Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

[MOD 0.16] Vehicle Wagon 1.2.5

Post by Supercheese »

Vehicle Wagon
Vehicle Wagons.jpg
Vehicle Wagons.jpg (725.97 KiB) Viewed 19760 times
Here's a video of the mod in action: https://www.youtube.com/watch?v=zvvqUfUhfds

Info / Long Description:
  • Name: Vehicle Wagon
  • Latest Release: v1.2.5, June 18, 2018
  • Factorio Version: 0.16.51
  • License: MIT License
  • Author: Supercheese, with graphics by the awesome YuokiTani. Additional contributions from: Mooncat, The_Destroyer, Phasma Felis, & Brant Wedel.
  • Github: https://github.com/Suprcheese/Vehicle-Wagon
This mod allows you to load your fully-laden car or tank onto a flatbed train wagon and take it with you on your rail journeys!
Just use the Winch to haul your vehicle onto the wagon, and use the same Winch to haul it back off when you're ready to drive off.
No more tedious re-inserting ammo, fuel, etc. into your combat vehicle after a long trip by rail to some remote outpost!

The awesome flatbed wagon graphics are courtesy of YuokiTani!
The wagon tarp graphics for supporting unidentified vehicles provided by Brant Wedel.

This mod should play well with other tank or car mods, and has been successfully tested with the following mods from the mod portal:
  • Bob's Warfare
  • Advanced Tanks by Neomore
  • Tanks! by LCruel
  • SuperTank by binbinhrf
  • Trucks by KatzSmile
  • VW Transporter by steinio
Modded vehicle models will revert to a standard, grey-colored version while riding on the wagon, but after unloading it should be back to normal.

Vehicles that this mod cannot automatically identify, including aircraft, will be loaded on the wagon covered in a tarp.

You also cannot winch vehicles that have a passenger; all players must exit vehicles before loading/unloading.


Known Issues/Quirks:

For the time being, DO NOT STORE BLUEPRINTS IN VEHICLES, since blueprints lose their stored data when transported on a Vehicle Wagon.

If a mod adds a "car"-type entity that is not meant to be an actual vehicle, such as the Nixie Tubes mod (used to; it has changed by now), it may still be able to be loaded on a Vehicle Wagon under a tarp.
Specific exceptions have been added for Nixie Tubes (and other mods) to disallow this, but other mods may exist that this mod lacks exceptions for.

In Factorio v0.15, it seems that the following issues are greatly ameliorated, but do still exercise caution:

When a Vehicle Wagon is at the end of a train, everything seems to work just fine.
If a Vehicle Wagon is in the middle of a train, however, then when loading/unloading vehicles, the wagon tends to become disconnected from the train.
There is currently no way to connect wagons via script, but fixing it by hand is simple: just hop into the wagon or locomotive and press the "Connect train" hotkey (G by default).
I recommend getting into the habit of always pressing G after winching vehicles around.

Furthermore, if you have your Vehicle Wagon at the end of your train, and another train is very close behind, the wagon can sometimes get confused and reattach itself to the wrong train.
Should this happen, both trains will be in Manual mode and won't run away on you, so you'll have plenty of time to manually fix the issue.

Version history
Attachments
Vehicle Wagon_1.2.5.zip
(7.99 MiB) Downloaded 235 times
Vehicle Wagon_1.2.4.zip
(7.99 MiB) Downloaded 196 times
Vehicle Wagon_1.2.3.zip
(7.97 MiB) Downloaded 207 times
Vehicle Wagon_1.2.0.zip
(7.69 MiB) Downloaded 211 times
Vehicle Wagon_1.1.3.zip
(7.69 MiB) Downloaded 226 times
Vehicle Wagon_1.1.2.zip
(7.69 MiB) Downloaded 235 times
Vehicle Wagon_1.1.1.zip
(6 MiB) Downloaded 218 times
Last edited by Supercheese on Sun Jun 17, 2018 9:48 pm, edited 25 times in total.
TheTom
Fast Inserter
Fast Inserter
Posts: 186
Joined: Tue Feb 09, 2016 8:33 am
Contact:

Re: [MOD 0.13] Vehicle Wagon 1.0.0

Post by TheTom »

> Of course, you aren't allowed to load your aircraft onto wagons, as there'd be no point!

Why not? Transporting a small aircraft is doable IRL and it means I can have a train to go away AND have easy access to a scout plane - which DOES Make sense when for example building a remote base.
Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [MOD 0.13] Vehicle Wagon 1.0.0

Post by Supercheese »

TheTom wrote:> Of course, you aren't allowed to load your aircraft onto wagons, as there'd be no point!

Why not? Transporting a small aircraft is doable IRL and it means I can have a train to go away AND have easy access to a scout plane - which DOES Make sense when for example building a remote base.
Well, the aircraft from the aircraft mod have no collision_box, and I rely on checks for collision to determine the presence of a vehicle, so it doesn't work with the aircraft. :?
Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [MOD 0.13] Vehicle Wagon 1.0.0

Post by Supercheese »

Updated to 1.0.1:
  • Improved the flying text that appears if you pick up a loaded vehicle wagon.
  • It is no longer possible to ride in empty vehicle wagons.
  • Added support for the Trucks mod by KatzSmile.
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.13] Vehicle Wagon 1.0.1

Post by Mooncat »

Small but interesting mod! And I love this new variant of cargo wagon. Thanks for the mod. :D
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: [MOD 0.13] Vehicle Wagon 1.0.1

Post by steinio »

Yes graphically this mod is an eyecatcher.

I guess on that can be placed everything like chests or turrets.
Image

Transport Belt Repair Man

View unread Posts
Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [MOD 0.14] Vehicle Wagon 1.0.2

Post by Supercheese »

Updated for Factorio 0.14. Vehicle equipment grids are now preserved during transit!
User avatar
Thomasnotused
Filter Inserter
Filter Inserter
Posts: 262
Joined: Thu Jan 29, 2015 9:58 pm
Contact:

Re: [MOD 0.14] Vehicle Wagon 1.0.2

Post by Thomasnotused »

Very cool! Although it is unfortunate to hear about the incompatibilies with the aircraft mod. It runs off of collision boxes you say? I'll have to look into stuff.

EDIT: Collision box thingy fixed, but unfortunately the graphics are incompatible! It's sad, but nothing we can do, at least not at the moment.
I have no idea what I'm doing.
Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [MOD 0.14] Vehicle Wagon 1.0.3

Post by Supercheese »

Version 1.0.3 uploaded, making vehicles now remember their inventory filter settings after being transported on a Vehicle Wagon, and additionally a German translation courtesy of ST-DDT on GitHub.
Cobra1117
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Oct 07, 2016 12:39 am
Contact:

Re: [MOD 0.14] Vehicle Wagon 1.0.3

Post by Cobra1117 »

I was still getting a "nil filters" error with the latest (1.0.3) version of the mod. Changing this code:

Code: Select all

function setFilters(entity, filters)
    for i = 2, 3 do
to this:

Code: Select all

function setFilters(entity, filters)
    if filters == nil then
        filters = {}
    end
    for i = 2, 3 do
fixed the problem
Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [MOD 0.14] Vehicle Wagon 1.0.4

Post by Supercheese »

I was testing a bunch, trying to replicate that issue, and I finally did, after trying to quickly unload multiple loaded vehicle wagons. Version 1.0.4 has the fix, which is similar to what you suggest.
Cobra1117
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Oct 07, 2016 12:39 am
Contact:

Re: [MOD 0.14] Vehicle Wagon 1.0.4

Post by Cobra1117 »

Cool! Thanks!
Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [MOD 0.14] Vehicle Wagon 1.0.5

Post by Supercheese »

Version 1.0.5 out to resolve another issue: Now mining (i.e. picking up) a loaded Vehicle Wagon now drops the vehicle as if it was winched off of the wagon.

In previous versions, the vehicle and its contents were inserted directly into the player's inventory, but this could result in lost items if the player had insufficient inventory space available.
Ulithium_Dragon
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Oct 13, 2016 1:21 am
Contact:

Re: [MOD 0.14] Vehicle Wagon 1.0.5

Post by Ulithium_Dragon »

Overall this works great, but as sort of mentioned in the description I am having some issues with one particular train configuration: Single-track trains.

The issue is that for trains with locomotives on each end that are intended to run back and forth along a single non-looping track, loading the vehicle waggon causes the train to separate into two different trains.

So say I have a locomotive on one end, then a cargo car, then the vehicle wagon, then a rear-facing locomotive. When I load a vehicle into the waggon, the rear locomotive detaches with the vehicle wagon, becoming a separate train.
Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [MOD 0.14] Vehicle Wagon 1.0.5

Post by Supercheese »

Ulithium_Dragon wrote:Overall this works great, but as sort of mentioned in the description I am having some issues with one particular train configuration: Single-track trains.

The issue is that for trains with locomotives on each end that are intended to run back and forth along a single non-looping track, loading the vehicle waggon causes the train to separate into two different trains.

So say I have a locomotive on one end, then a cargo car, then the vehicle wagon, then a rear-facing locomotive. When I load a vehicle into the waggon, the rear locomotive detaches with the vehicle wagon, becoming a separate train.
Yeah, it's a known issue. Until we get some way to connect/disconnect wagons via script, there's nothing I can do to fix it.
epiccraft_tv
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat May 14, 2016 10:35 am
Contact:

Re: [MOD 0.14] Vehicle Wagon 1.0.5

Post by epiccraft_tv »

I'm not sure why, but my game kicks me out of the world when I try to winch a car or vehicle....
Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [MOD 0.14] Vehicle Wagon 1.0.5

Post by Supercheese »

epiccraft_tv wrote:I'm not sure why, but my game kicks me out of the world when I try to winch a car or vehicle...
As the crash dialogue indicates, that is a bug with Powered Entities.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [MOD 0.14] Vehicle Wagon 1.0.5

Post by aubergine18 »

This may be of use when creating/destroying vehicles from other mods: https://github.com/aubergine10/lifecycle-events
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Cyrlynx
Burner Inserter
Burner Inserter
Posts: 13
Joined: Fri Oct 02, 2015 9:39 pm
Contact:

Re: [MOD 0.14] Vehicle Wagon 1.0.5

Post by Cyrlynx »

Hi,
Thanks for your great mod idea!

I have several bugs to report though:
  • As Aubergine's said, I face bugs when placing item into vehicle after unloading from your wagon:
    Error while running event on_player_placed_equipment (ID 38)
    LuaEntity API call when LuaEntity was invalid.
    stack traceback:
    __electric-vehicles-lib__/src/main.lua:345: in function <__electric-vehicles-lib__/src/main.lua:343>
    It seems to come from other mod but in fact it's from yours as seen in the Aubergine's GitHub thread or in this one :
    viewtopic.php?f=34&t=34952&start=60&hilit=vehicle+wagon
  • Also, another problem is that the energy state of the unloaded vehicle drops to zero (shield, battery...) :
    By looking at your code, I noticed that you use your own methods to place the vehicle on the wagon and unload it.
    Now, when I pickup a vehicle into my inventory and place it again, it's equipement remains charged AND it doesnt' trigger the bug with my other mods.
  • I cannot access the grid of your wagon?
  • About the deconnection of the wagon if in the middle of a train :
    the vanilla wagon got updated mesh to show open door when they stop and they don't disconnect,
    yours happened because you changed entity type to reflect cargo type
So I'm wondering, can you use the vanilla pickup to store the vehicle as an item onto the wagon,
by giving it one slot inventory and adjust mesh by checking cargo to solve all this?
Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [MOD 0.14] Vehicle Wagon 1.0.6

Post by Supercheese »

Version 1.0.6 uploaded, which has compatibility fixes that should -- together with the Electric Vehicles 0.3.5 update -- make transporting electric cars on vehicle wagons work much more smoothly.
Post Reply

Return to “Mods”