Page 3 of 5

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Thu Mar 07, 2019 8:52 pm
by JAetherwing
Oh, I see. Yes, that's intended too: The poles have a relatively large buffer which is filled automatically when building them to avoid draining the power grid. Try driving a little longer, eventually it'll run out of power.
I know it's somewhat unrealistic, but I think it's better than having a brownout in a starter base due to building an electric rail system which is technically not in use yet.

Maybe I'll try to "enable" the pole only when it is connected to a power source, but I think it is not as big of an issue to put that much work into.

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Thu Mar 07, 2019 8:56 pm
by JaJe
In this case there's no reason to ever connect overhead line poles to any power input to prevent wasting energy on trains...If I have 10 locomotives then 1.2MW trains x 10 = 12MW energy free trains.

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Thu Mar 07, 2019 9:10 pm
by JAetherwing
Sorry to crush your dreams, but the trains are not actually energy free. As I said, the poles have an energy buffer, currently set to almost 20MJ. This is required for the planned higher-tier locomotives that have a much higher energy output. Yes, you can drive an Advanced Electric Locomotive for free for about 16 seconds for each pole. But after that, it won't work anymore until you connect the power grid.

Depending on how crazy the energy demands of the top level locomotives will actually be, I'll probably reduce the buffer size though.

Still, this is in my opinion a way better approach than draining a base's energy supply (Think early game steam power) with energy that is only buffered indefinetly. 20MJ is quite a big amount.

I'd love to do this without ridiculous buffers like that, but I doubt it is at all possible with the Factorio API. I'll take a look though if I can disable poles that aren't connected to the grid.

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Thu Mar 07, 2019 9:32 pm
by JaJe
I understand, I tried to run on circle for a few minutes till the train started having power issues. I was thinking at least why not nerf a bit the buffer? allow trains functioning for 5-10 seconds at maximum and then you're forced to connect to the grid

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Mon Mar 11, 2019 1:46 am
by MasterBuilder
Forgive me if I'm wrong. I only just found this and don't have the time to convert the megabase I'm currently designing.
Exited to try this out though. Finally electric trains done right.

Have you considered giving them a tiny buffer to start and increasing it with research when the player unlocks the higher tiers? (Assuming there's research for higher tiers.)
That might solve the problem of the cheaty buffer. (Also assuming you can change the buffer size with research.)

Personally, I'd rather it not come with an initial charge. Having enough power to change it initially is part of the challenge that is Factorio. (Mods can create options now, so making the initial charge state an option is also another way to go.)

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Mon Mar 11, 2019 6:09 am
by JAetherwing
Changing the buffer size with research is unfortunately impossible, because it is fixed in the entity prototypes when the game starts.

Honestly, if it was possible I'd get rid of the buffer too, but I can't due to how the electric system works.

And I'm pretty sure I won't remove the initial charge for the simple reason that all the charge you put in initially essentially goes to waste, as you either never remove the pole or simply not drain it before removing. Having 2.4MJ (yes, its less thab before) go to waste for every single pole you place is in my opinion well beyond reasonable.

Also, the only "bad" thing you can do with it is charge up a train maybe four to eight times until it stops working and you need to connect power anyway.

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Mon Mar 11, 2019 3:23 pm
by leoch
But why do you need to put a buffer in the power pole? The Induction Charging mod is able to charge player/vehicle equipment grids directly from ordinary power poles. Combined with the Electric Vehicles mod (the .16 one at least; haven't tried the latest) this allowed pretty good electric trains in 0.16 already. I think you could do the same here, only using your new power poles for near-continuous coverage making the batteries unnecessary?

You could potentially even add a pantograph to the train equipment grid for the power transfer.

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Mon Mar 11, 2019 3:55 pm
by JAetherwing
leoch wrote:
Mon Mar 11, 2019 3:23 pm
The Induction Charging mod is able to charge player/vehicle equipment grids directly from ordinary power poles
If I understood the code of that mod correctly then no, it uses a hidden buffer as well: There is a "shadow" entity always teleported to the player's position that buffers energy to insert into the player's power armor grid.

Looking at that mod's code gave me an idea though.. It might not work at all, but if it does, it could "remove" the buffer or only use it if it's actually needed. I'm not sure, I need to think about that after I my last exam on wednesday.

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Sat Mar 23, 2019 10:13 am
by JAetherwing
Hey guys,
I've released another update!
I managed to get rid of the energy buffer in the poles, they'll now consume a tiny amount of power before they become activated and power locomotives.
Furthermore, this update adds the modular locomotive, an end-game variant that can be upgraded with modules to become way faster, or more efficient, whatever you need.

I'm looking forward to feedback and suggestions, especially regarding the balancing of the modules. Maybe the exact values need some tweaks to be viable.
Have fun!

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Wed Apr 10, 2019 9:15 pm
by Marcel40625
Hey there,

is it just me, or is there no difference between the trains in terms of max speed and max health?
All 3 trains have 1000hp and drive around 170km/h with 3 loco and 8 waggons.

or have i done something wrong?

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Thu Apr 11, 2019 4:06 am
by robot256
Some wagons have much lower speed limits, and a train will never go faster than the slowest wagon in the train. Can you try it with just the locos? I definitely see a speed difference even with stock wagons attached.

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Thu Apr 11, 2019 6:32 pm
by Marcel40625
even only the loco´s drive 174km/h ... https://img.fly-host.eu/jOD47

i must meantion, i changed the config a bit so the 3rd loco has more power but i dont think this has something todo with the max speed or?

Code: Select all

--config.lua

local ticks_per_update = settings.startup["ret-ticks-per-update"].value


function store(power)
	return power / 60 * (ticks_per_update + 5)
end

config = {
	pole_max_wire_distance = 16,

	pole_supply_area = 8,

	-- Refills the buffer until the next update
	pole_flow_limit = 4800000,
	-- Pole enable buffer (1kJ)
	pole_enable_buffer = 1000,
	-- Pole maximum deficit (9.6MJ)
	pole_max_deficit = 9600000,


	-- When a locomotive exceeds the soft cap, it might lose power temporarily 
	-- when multiple similar locomotives are powered by a single pole, e.g. when
	-- they pull the same train. (4.8MW)
	power_soft_cap = 4800000,
	-- When a locomotive exceeds the hard cap, it cannot be powered by the grid
	-- at all. (9.6MW)
	power_hard_cap = 9600000,



	-- Locomotive Mk 1 (600kW, like vanilla)
	locomotive_power = 600000,
	locomotive_storage = store(600000),
	-- Locomotive Mk 2 (1.2MW, two times vanilla)
	advanced_locomotive_power = 1200000,
	advanced_locomotive_storage = store(1200000),
	-- Modular Locomotive (1.8MW, three times vanilla)
	modular_locomotive_base_power = 2800000,
	modular_locomotive_storage = store(2800000)
}

function toW(value)
	return string.format("%dW", value)
end

function toJ(value)
	return string.format("%dJ", value)
end

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Thu Apr 11, 2019 7:43 pm
by robot256
What version of the game are you running, and do you have any other mods installed? With just Vanilla + Realistic Electric Trains, the top speeds I have are 259, 311, and 373 km/h for the three tiers of locomotives (with no locomotive modules installed). If something is changing the air resistance or friction numbers, that could make the actual max speed lower.

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Thu Apr 11, 2019 8:05 pm
by Marcel40625
running latest v.0.17, latest version of your mod (with changed config)

other Mods:
Image

edit: train tech is for infinite breaking force research
edit2: and im using normal waggons atm, not the stainless steel
EDIT3: okay nvm ... it was the train tunnels mod ... sorry for bothering you :)

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Fri Apr 19, 2019 10:51 am
by mrudat
How about having overhead train signals?

You could have a power pole entity that has a single graphic for all rotations (and a single wire location), and have different graphics for the signal so that the indicator sits over the top of the rails?

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Tue Apr 23, 2019 10:45 am
by JAetherwing
I'd love to do that, but unfortunately, signals are hardcoded to be on a render layer below trains. Thus, unless everyone wants terrible graphical glitches, this won't work.

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Tue May 21, 2019 5:19 pm
by rcp27
I’ve been looking for a realistic electric trains mod, specifically one that does overhead wires rather than batteries, and definitely will give this a go. Something I’d be interested in seeing that might be an interesting extension plan would be a cargo wagon with an equipment grid that can be powered from the electrified line. I can come up with lots of ideas for gameplay possibilities with this sort of thing, like laser defense wagons or personal roboport style construction wagons.

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Tue May 21, 2019 5:21 pm
by JAetherwing
Congratulations, you just guessed the topmost item of my todo list for this mod.
Unfortunately, I really don't have a lot of time at the moment, but I'll try to come back to this as soon as possible.

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Sun May 26, 2019 6:51 pm
by avek
If you have time, could you please add support for Transport Group mod by Schallfalke?

All it does is a new separate tab for all vehicles and vehicle-related items (like rails). The change should be trivial, like using this at the start of items.lua:

Code: Select all

-- Add electric train subgroup
local train_group = "logistics"
if mods["SchallTransportGroup"] then
	train_group = "transport"
end

data:extend{{
	type = "item-subgroup",
	name = "electric-trains",
	group = train_group,
	order = "e-a"
}}

data:extend{{
	type = "item-subgroup",
	name = "electric-train-modules",
	group = train_group,
	order = "e-b"
}} 

Re: [MOD 0.16, 0.17] Realistic Electric Trains

Posted: Tue Jun 04, 2019 10:22 am
by Paul17041993
BTW; there's still the PR pending that fixes the trains being broken in the current version;
https://github.com/Scarabytes/FactorioR ... ns/pull/15