Vehicle Wagon 2


Take with you a fully charged and battle-ready vehicle and take it on a rail trip. --------------------------------------------------------------------------------- Возьмите с собой полностью заряженный и готовый к бою транспорт и отправьте его в путешествие по железной дороге.

Content
a month ago
0.17 - 2.0
21.7K
Transportation Trains Combat

i [Implemented] Spidertron

4 years ago

Any possibility of supporting loading the new Spidertron onto vehicle wagons? Would be super useful to be able to haul it super long distances.

4 years ago

Thanks for the nudge! I'm working on it. Looks like it'll shave to wait for the next update since some things are missing from the API.

4 years ago

Awesome! Love the mod by the way. It seems like something that could be so buggy but I'm always impressed that it works perfectly.

4 years ago

Thanks! It did indeed take a lot of work to make it reliable. Glad you like it!

4 years ago

Support for Spidertron is included now! Some things in the API are missing so it cannot save custom names or which gun is selected yet. It will also rearrange the ammo because I haven't dealt with duplicate weapon types before.

4 years ago

Appreciate the update! I tried it out on my map with Krastorio 2 installed and it crashed when unloading Spidertron. Could be related to the fact that Krastorio adds a DT-fuel cell energy requirement for the Spidertron to operate.

The mod Vehicle Wagon 2 (3.0.7) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event VehicleWagon2::on_tick (ID 0)
LuaInventory API call when LuaInventory was invalid.
stack traceback:
    __Robot256Lib__/script/save_restore.lua:275: in function 'restoreBurner'
    __VehicleWagon2__/script/unloadVehicleWagon.lua:143: in function 'unloadVehicleWagon'
    __VehicleWagon2__/control.lua:142: in function <__VehicleWagon2__/control.lua:89>
stack traceback:
    [C]: in function '__index'
    __Robot256Lib__/script/save_restore.lua:275: in function 'restoreBurner'
    __VehicleWagon2__/script/unloadVehicleWagon.lua:143: in function 'unloadVehicleWagon'
    __VehicleWagon2__/control.lua:142: in function <__VehicleWagon2__/control.lua:89>

Even if it does function, I don't think I want to use it if it'll wipe out my custom names or colors every time I use it.

4 years ago

Just a suggestion that might make this more robust, but might be hard to implement: what if instead of destroying the entity when you load it onto the wagon and recreating it when you unload it, instead you just made the entity invisible and had it like pinned to the wagon? That way you wouldn't have to deal with trying to properly reconstruct it.

4 years ago
(updated 4 years ago)

The colors are saved already, and I'll add support for the name as soon as they incorporate it in the API.

You can't just disable the collision masks on the entity without destroying it, AFAIK.
People have thought about teleporting vehicles to a hidden surface to store them ever since this mod was created. It would make a ton of code obsolete, I just haven't looked into it. :)

4 years ago

Haha I like that idea, banish them to the shadow realm while they're on the wagon.

4 years ago

Turns out that error is related to having fuel in the Spidertron. Looks like another bug in the API (with a planned fix) that makes saving it impossible. Best I can do right now is not crash when it deletes all your fuel...

New response