[MOD 0.15+] Automatic train deployment

Topics and discussion about specific mods
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: [MOD 0.15] Automatic train deployment

Post by aaargha »

It sounds like you may be missing the "A > 0" perhaps? Alternatively the schedule might be broken, but if it runs when you switch it to manual that should not be the case.

It might be beneficial to make an option for how these things should work by default, starting in manual/setting the speed is almost never useful, making the option to ignore those signals and make auto the default might be nice. There are a few ways this could behave so I'll have to take a look at the different options.
Jesus8000
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Fri Apr 15, 2016 7:13 pm
Contact:

Re: [MOD 0.15] Automatic train deployment

Post by Jesus8000 »

dont work for me,
also ur map doesnt work,
i use LTN
sorry, my english is not the yellow from the egg.... 4give me
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: [MOD 0.15] Automatic train deployment

Post by aaargha »

LTN sounds like a mod that would be likely to conflict with this one, you may want to try it without LTN and see if that works.

If it's still not working you're going to have to give a bit more details on what you're doing, what you think should happen and what is happening. Currently I don't really have much to go on to try and help you.
Jesus8000
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Fri Apr 15, 2016 7:13 pm
Contact:

Re: [MOD 0.15] Automatic train deployment

Post by Jesus8000 »

ok it worked:P
i copied the blueprint from the mod in my game
and after 10 trys, it finally worked^^
but its really hard to find out how^^
sorry, my english is not the yellow from the egg.... 4give me
mrvn
Smart Inserter
Smart Inserter
Posts: 5881
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.15] Automatic train deployment

Post by mrvn »

I'm using this mod with LTN with great success. No conflicts.

I have an input stop with a trains parked and schedule to go to "Depot" on a small separate track. Then a track with a trigger locomotive (no fuel, schedule set to go to the copy stop), a signal, the copy stop (with enough space there for the train), an LTN stop named "Depot" and signaled as such followed by a signal connected to the copy stop. From there the track enters my rail network. On the other end I have a track splitting off the rail network ending with a deletion stop. The stop is also named "Depot".

So whenever the copy stop is empty a new train is created and drives 2m to the Depot stop. Then LTN schedules the train to go "Depot" -> "Pickup" -> "Delivery" -> "Depot". Since the LTN Depot can not be reached the train always ends up at the delete stop and is removed.

I actually have 2 such setups. One for trains with a normal wagon and one for fluid wagons. Only one delete stop so. Not enough traffic to require more yet.

------

It would have a feature request though. Creating new trains out of thin air feels like cheating. Would it be possible to connect a chest to the train stop and fill it with some trains, wagons and fuel and use those to create new trains? Reversely the delete stop would have a chest connected too and put trains into that.

There could be a mod setting to enable/disable the chest so magic train creation could still be used for testing purposes.
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: [MOD 0.15] Automatic train deployment

Post by aaargha »

mrvn wrote:I'm using this mod with LTN with great success. No conflicts.

I have an input stop with a trains parked and schedule to go to "Depot" on a small separate track. Then a track with a trigger locomotive (no fuel, schedule set to go to the copy stop), a signal, the copy stop (with enough space there for the train), an LTN stop named "Depot" and signaled as such followed by a signal connected to the copy stop. From there the track enters my rail network. On the other end I have a track splitting off the rail network ending with a deletion stop. The stop is also named "Depot".

So whenever the copy stop is empty a new train is created and drives 2m to the Depot stop. Then LTN schedules the train to go "Depot" -> "Pickup" -> "Delivery" -> "Depot". Since the LTN Depot can not be reached the train always ends up at the delete stop and is removed.

I actually have 2 such setups. One for trains with a normal wagon and one for fluid wagons. Only one delete stop so. Not enough traffic to require more yet.
Great to hear that there shouldn't be any conflicts with LTN! Your setup also sounds really neat, though I'll admit to not having used LTN enough to understand how much traffic you save :)
mrvn wrote:It would have a feature request though. Creating new trains out of thin air feels like cheating. Would it be possible to connect a chest to the train stop and fill it with some trains, wagons and fuel and use those to create new trains? Reversely the delete stop would have a chest connected too and put trains into that.

There could be a mod setting to enable/disable the chest so magic train creation could still be used for testing purposes.
That should be doable, I think. It will likely require a bit more circuitry from the player to make it work reliably: only enable output stops when the block is free and there is enough material to build a new train; only let trains reach deletion stops of there is enough room for all the parts.

I'll add it to the TODO list but, as it is a bit outside my intended scope of this mod and there are some other features I'd like to implement first, it may take a while to get around to it. If you don't feel like waiting for my lazy bum to get around to it there are options: This mod is published under the Unlicense so using parts/all of it for another mod is totally fine. Alternatively, it should be possible to submit pull requests here.
Stumpyofpain
Burner Inserter
Burner Inserter
Posts: 16
Joined: Tue Jun 06, 2017 4:31 pm
Contact:

Re: [MOD 0.15] Automatic train deployment

Post by Stumpyofpain »

hi

i tried your mod and it works fine for basic locs.
i can even use bobs mk3 locomotives.
as soon as i try to use bobs mk3 cargowaggons, the game freezes and nothing happens.
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: [MOD 0.15] Automatic train deployment

Post by aaargha »

Hmm, I can't seem reproduce that, even when also using equipment grids.

If you could please either describe in a bit more detail what you're doing or upload a reproduction save with as few mods as possible and I'll hopefully be able to fix it. From what I can tell so far it is not the mk3 cargo wagons themselves that cause the issue.
Stumpyofpain
Burner Inserter
Burner Inserter
Posts: 16
Joined: Tue Jun 06, 2017 4:31 pm
Contact:

Re: [MOD 0.15] Automatic train deployment

Post by Stumpyofpain »

Hi

it seems that i fould the problem.
i did modify the inventory_size of the cargo wagon mk3 a bit, which caused the game to freeze.
Changed it back now and your mod works.
Sry for that own created bugreport.
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: [MOD 0.15] Automatic train deployment

Post by aaargha »

No worries, It seems a bit strange to me that it would freeze for something like that. Unless something broke in bobs, the size of the inventory should (in the best of worlds) not affect the behaviour of my mod.

If you still have a changed version of the bob mod lying around I'd be grateful if you'd consider sharing it, just attach it you a post, just so I can try to figure out what went wrong.
Stumpyofpain
Burner Inserter
Burner Inserter
Posts: 16
Joined: Tue Jun 06, 2017 4:31 pm
Contact:

Re: [MOD 0.15] Automatic train deployment

Post by Stumpyofpain »

hi

yes i still use that modified mod.
the "crashing" change was made in line 971 where i changed the inventory_size from 80 to 800.
boblogistics_0.16.1.zip\boblogistics_0.16.1\prototypes\entity\
Attachments
boblogistics_0.16.1.zip
(3.09 MiB) Downloaded 118 times
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: [MOD 0.15] Automatic train deployment

Post by aaargha »

Thank you for sharing, turns out that it was a bug in Factorio. The game hangs if you try to copy/clear the filters of an inventory that is larger than 255-ish.

I've notified the devs so hopefully this should be fixed in an upcoming version.
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: [MOD 0.15] Automatic train deployment

Post by aaargha »

It's not in the changelog but the hang should be fixed for 0.16.15.
User avatar
hansjoachim
Filter Inserter
Filter Inserter
Posts: 252
Joined: Wed Apr 26, 2017 7:03 pm
Contact:

Re: [MOD 0.15+] Automatic train deployment

Post by hansjoachim »

Great aaargha!
I wasn't sure if you would update it
Awesome!
pallrider
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Jun 03, 2019 2:22 am
Contact:

Re: [MOD 0.15+] Automatic train deployment

Post by pallrider »

I'm having trouble getting the trains to continuously spawn in v17 (I haven't tried v16)

The trains will spawn once, but then takes me setting it to manual/automatic constantly to get trains to spawn. Is there another option?
pallrider
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Jun 03, 2019 2:22 am
Contact:

Re: [MOD 0.15+] Automatic train deployment

Post by pallrider »

Actually, I figured it out: I need to turn off the "green" constant combinator
mrvn
Smart Inserter
Smart Inserter
Posts: 5881
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.15+] Automatic train deployment

Post by mrvn »

pallrider wrote: Mon Jun 03, 2019 4:49 am Actually, I figured it out: I need to turn off the "green" constant combinator
The sample setups use the rail signal to trigger, which turns red when the train spawns and green when it left.
XYZT
Inserter
Inserter
Posts: 31
Joined: Fri Jun 07, 2019 3:40 pm
Contact:

Re: [MOD 0.15+] Automatic train deployment

Post by XYZT »

I seem to be getting an error when trying to use this mod on an existing map.

Image
selplacei
Burner Inserter
Burner Inserter
Posts: 17
Joined: Wed Aug 05, 2020 9:52 am
Contact:

Re: [MOD 0.15+] Automatic train deployment

Post by selplacei »

Any chance of updating this to 1.1+?
Post Reply

Return to “Mods”