Page 2 of 5

Re: [MOD 0.16] Realistic Electric Trains

Posted: Thu Feb 21, 2019 10:16 am
by Optera
psihius wrote:
Thu Feb 21, 2019 7:17 am
You can also use `on_nth_tick` event instead of doing division in the `if` statement every tick :)
nth tick should only be used to do small updates.
inventory manipulation is a quite performance hungry task and should be spread across multiple ticks to prevent microstutters.

Code: Select all

function OnTick(event)
  local offset = event.tick % UpdateInterval
  for i=#global.Entities - offset, 1, -1 * UpdateInterval do
    local entity = global.Entities[i]
    -- do entity update
  end
end

Re: [MOD 0.16] Realistic Electric Trains

Posted: Thu Feb 21, 2019 3:47 pm
by steinio
Now we only need YuokiTani's super powers to create an electric loco.
I would recommend this: https://goo.gl/images/YwAqf4
It can also be double headed for two directions.

Re: [MOD 0.16] Realistic Electric Trains

Posted: Thu Feb 21, 2019 8:49 pm
by Optera
I prefer the classic Ce-6-8 over the E94. ;)

Re: [MOD 0.16] Realistic Electric Trains

Posted: Thu Feb 21, 2019 9:56 pm
by JAetherwing
Maybe I can put several different models into the mod? I think, these two look really awesome!

Re: [MOD 0.16] Realistic Electric Trains

Posted: Fri Feb 22, 2019 2:24 am
by Therax
Optera wrote:
Thu Feb 21, 2019 8:49 pm
I prefer the classic Ce-6-8 over the E94. ;)
Jackshafts and side rods on an electric locomotive. TIL. :D

Re: [MOD 0.16] Realistic Electric Trains

Posted: Fri Feb 22, 2019 5:39 am
by julius1701
Both of these are commonly called crocodile. The E94 (90 km/h) is the german crocodile while the C-6-8 (75 km/h) is just called crocodile and was used in Switzerland. There is also an American crocodil named Milwaukee Road class EP-2 (113 km/h).
milw_ep_2.jpg
milw_ep_2.jpg (53.99 KiB) Viewed 5410 times
They have different max speeds. You could use them in your mod.

Re: [MOD 0.16] Realistic Electric Trains

Posted: Fri Feb 22, 2019 6:34 am
by Optera
There's also the meter gauge Ge 6/6 nicknamed Rhaetian Crocodile.

These crocodiles will be tough to get right in Factorio.
You need 3 locomotive entities to mimic their articulating frame.
To make those 3 parts result in a single unit with the same characteristics driving either direction it needs to be 1 unit with 2x power and weight facing one way and 2 units with 1x power and weight facing the other.
The 2x part has to be at one end since the air_resistance modifier is only applied to the front of a locomotive.

A design like the BLS 8/8 is a lot easier to get working. It just needs a single locomotive entity placed twice facing opposite directions.
https://de.wikipedia.org/wiki/BLS_Ae_8/8

Re: [MOD 0.16] Realistic Electric Trains

Posted: Fri Feb 22, 2019 4:42 pm
by timer67
Sounds like an opportunity to mesh with the multiple tiers of trains like in bobs :D

Re: [MOD 0.16] Realistic Electric Trains

Posted: Mon Feb 25, 2019 9:01 am
by JAetherwing
Good news: A new version is out!
0.2.1 fixes several bugs, especially with blueprints and introduces the new Mk2 locomotive!
Have fun with it!

Re: [MOD 0.16] Realistic Electric Trains

Posted: Mon Feb 25, 2019 10:48 am
by billbo99
You talked about enabling a vehicle grid in your trains
.. In Bob's mods he has an overdrive engine for increasing speed which goes in his grids.

It might also be an idea to use a "Capacitor Module" as the fuel source, and have research progresses new 'Capacitor Modules' which would unlock increased capacity and output. While the train is connected to the power network, the capacitor can be recharged, when the train goes into a dead power zone the capacitor will drain until it runs out of juice and the train stops.

Re: [MOD 0.16] Realistic Electric Trains

Posted: Sun Mar 03, 2019 12:21 pm
by roze
Will this be updated for .17?

Re: [MOD 0.16] Realistic Electric Trains

Posted: Sun Mar 03, 2019 12:41 pm
by JAetherwing
Of course.
It just takes a while as I currently don't have a lot of time to spare.

Re: [MOD 0.16] Realistic Electric Trains

Posted: Mon Mar 04, 2019 10:31 pm
by SuperSandro2000
I want to join the discussion. I want a V100 cause my dad owns it in 1:120 and I loved it when I was little.
Image

Re: [MOD 0.16] Realistic Electric Trains

Posted: Mon Mar 04, 2019 11:22 pm
by ManaUser
SuperSandro2000 wrote:
Mon Mar 04, 2019 10:31 pm
I want to join the discussion. I want a V100 cause my dad owns it in 1:120 and I loved it when I was little.
That's not electric though...

Re: [MOD 0.16] Realistic Electric Trains

Posted: Tue Mar 05, 2019 12:01 am
by SuperSandro2000
ManaUser wrote:
Mon Mar 04, 2019 11:22 pm
That's not electric though...
Well....
Then BR156
Image

Re: [MOD 0.16] Realistic Electric Trains

Posted: Thu Mar 07, 2019 12:30 pm
by JAetherwing
Hey guys,
between my exams I found some time to update the mod to 0.17.
I did some testing, but most likely not exhaust all possible control flows, so there might be some bugs left. Please, as always, report them on github or the mod portal (Preferably Github though).
Have fun!

Re: [MOD 0.16] Realistic Electric Trains

Posted: Thu Mar 07, 2019 3:11 pm
by julius1701

Well....
Then BR156
Image
Alternativ würde ich die BR 103 vorschlagen.
index.jpg
index.jpg (10.03 KiB) Viewed 5148 times
(ich gehe mal davon aus, dass die meisten hier aus dem deutschsprachigen Raum kommen)
(if you dont speak german ask and i will translate)

Re: [MOD 0.16] Realistic Electric Trains

Posted: Thu Mar 07, 2019 8:26 pm
by JaJe
Hi
I just played with this mod today since you updated it to 0.17. I found out this issue as screenshot below:

Basically there are portion of poles that aren't connected by wire but train is still getting powered (not sure if is intended).
Also if I click on the overhead line pole and I switch on/off nothing happens, I'm not sure exactly what should be done. I tried placing a radar (screenshot, left one radar) and I switched off the pole. It's still functioning.

Lastly, can you make that when clicking the overhead pole to show the power consumption like a normal pole does?

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Thu Mar 07, 2019 8:34 pm
by JAetherwing
I guess you mean the single unpowered section in the curve? It is more or less inevitable that the train is powered there too: In order to detect curved rails, I need to check in a small radius around the locomotive and in a situation like this, it just picks the next powered rail. Not really intended, but not too bad either.

The On/Off switch does nothing at all, it is a remnant of the constant combinator I used to model the signal-less pole base.

As the pole base is either a constant combinator or a signal, it is impossible to show the power GUI if you click on it. However, the actual powerpole entity is still there: I gave it a tiny hitbox right in the center of the rail. If you really need to, you can use that, though I prefer using nearby powerpoles directly.

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Thu Mar 07, 2019 8:46 pm
by JaJe
I meant that all poles from the curve is cut off but still powering the train. I did another simple test....a circle rails with poles...surprise, the train is working without any power input. (Check train speed as proof)