Vehicles powered from Equipement Grid.

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Vehicles powered from Equipement Grid.

Post by bobingabout »

I think there should be a new power option somewhere to say if the entity with an equipment grid should be powered from the grid.

Perhaps how you currently have the options of burner, and electric (Even though this option doesn't really work for vehicles right now), there could be an extra option "grid" or "equipment-grid", and if used, draws power straight from the equipment grid. (Possibly with a few extra useful options if this is the type of power used, like buffer capacity, and flow limit)

And that's my idea! what do you think?
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Vehicles powered from Equipement Grid.

Post by orzelek »

This is whats really needed to give us nice electrical cars and trains.

I seen people do it currently with some fiddly scripting - actual in game support would be very useful.

Why a car with fusion reactors should be able drive using their power?
mknejp
Fast Inserter
Fast Inserter
Posts: 154
Joined: Wed Apr 27, 2016 8:29 pm
Contact:

Re: Vehicles powered from Equipement Grid.

Post by mknejp »

Well I made this thing here that does just that viewtopic.php?f=93&t=31911
If you just want the plain feature without any items or entities look at electric-vehicles-lib.

A built-in solution would make this more convenient of course, but having a dedicated item in the equipment grid acting as energy supply to the engine potentially allows for more customization.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15059
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Vehicles powered from Equipement Grid.

Post by Rseding91 »

I was thinking about adding support for this while working on the equipment grids in vehicles but I couldn't come up with a good conversion ratio for equipment grid energy to vehicle energy and I didn't want to use some magic constant value.
If you want to get ahold of me I'm almost always on Discord.
mknejp
Fast Inserter
Fast Inserter
Posts: 154
Joined: Wed Apr 27, 2016 8:29 pm
Contact:

Re: Vehicles powered from Equipement Grid.

Post by mknejp »

Rseding91 wrote:I was thinking about adding support for this while working on the equipment grids in vehicles but I couldn't come up with a good conversion ratio for equipment grid energy to vehicle energy and I didn't want to use some magic constant value.
I'm obviously biased towards my solution using an equipment item doing this, so what is your opinion on having a vehicle-supply equipment prototype. It would basically work just like a battery-equipment except for the additional fields vehicle_supply_(limit|efficiency) determining the max rate at which the energy buffer is transferred over to the car's internal buffer at a specified efficiency. This allows for both customizing how the equipment item is supplied with energy (using the energy_source entry) and how much of it can be supplied to the vehicle.

example:

Code: Select all

{
  type = "vehicle-supply",
  name = "my-vehicle-supply",
  sprite = ...,
  shape = ...,
  energy_source =
  {
    type = "electric",
    buffer_capacity = (1/60) .. "MJ",
    input_flow_limit = "1MW",
    output_flow_limit = "0W",
    usage_priority = "primary-input"
  },
  vehicle_supply_limit = "1MW",
  vehicle_supply_efficiency = 0.5,
  categories = {"vehicle-armor"},
}
This can drain and refill the item's energy buffer at 1MW but only 50% actually make it to the vehicle.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Vehicles powered from Equipement Grid.

Post by bobingabout »

Rseding91 wrote:I was thinking about adding support for this while working on the equipment grids in vehicles but I couldn't come up with a good conversion ratio for equipment grid energy to vehicle energy and I didn't want to use some magic constant value.
Doesn't burner power allow for the use of an effectivity tag? this is basically just a power multiplier, the boiler for example sets it to 0.5, so from every 8MJ peice of coal, it effectively uses 4MJ. Perhaps just use the effectivity tag to control that too?

Looking at the values of things though, even if you just leave it as 1:1, a fusion reactor will happily power the vehicle forever, set it to 0.5 though, and you will need to let the batteries charge every now and then... Depending how large the grid is, and what else is in there, leaving it as 1:1 by default wouldn't be such a bad thing, and adding the effectivity tag option gives modders the ability to change it if desired.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
mrudat
Fast Inserter
Fast Inserter
Posts: 248
Joined: Fri Feb 16, 2018 5:21 am
Contact:

Re: Vehicles powered from Equipement Grid.

Post by mrudat »

Given that we can now have burner equipment, should not conversion be 1:1?

We've already paid for efficiency or lack thereof in the consumption of fuel, and each joule in the equipment grid is equivalent to a joule in your electric network, as both can be used to charge construction robots.
Post Reply

Return to “Modding interface requests”