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

g Two questions re winching

3 years ago

Hi there! Thank you for making this, one of (in my opinion) the must-have mods for any playthrough, vanilla / vanilla-plus / total conversion included!

Two overlapping questions relating to the winching feature.

  1. Is there any debug setting available to the user that would cause the winch-triggers to be visible or more intuitively placed? What about an option to enlarge the trigger? Sometimes I can just click it quickly and it'll work straightaway, one-and-done like. Other instances, I have to click and "hunt" for the trigger location on the flatbed to activate the UI. Generally, my overall feeling (from literally years of using this mod, even the VehicleWagon1 mod) is that it's kinda sorta somewhere near the rolling-stock-articulation overlay -- the faint green junctions indicated where train wagons can be hitched or unhitched. Unfortunately, that's all that it's ever become for me, just a general overall feeling. I've been living with it for this long, but I thought to ask it here because it might or might not factor into my second question.

  2. I noticed for the first time a few hours ago in my current gaming session that I've never even accidentally triggered any sort of error condition (or hilarious glitch) where the vehicle being winched train-to-ground ever landed on an entity or on the player_character. This tells me that you have some pretty robust collision-preventing code in your mod script, which is awesome. Is there any way to learn more about how you accomplish this? I am nowhere near being a mod author, but I would care to learn more about it at least conceptually. (I'm a teacher irl and I think I can use this as an example scenario in one of my class lectures.)

3 years ago

Glad you like it! I didn't create the idea or graphics, but I'm happy that people like my code rewrite.

  1. The winch is actually a selection box tool, which was the only way to make it work in map view. This means you have to click on (or drag a box to encompass) the collision box, instead of the selection box. I think there is a debug setting to show collision boxes. I know it is particularly bad for Spidertrons--typically the collision box is lower on the screen than the sprite (because it is the "ground footprint".

  2. I guess just read the Lua code on Github? There are Factorio API functions for finding empty spots to put things. There actually is error handling though, so if there isn't space to unload the vehicle will be left on the train or dropped as an item.

New response