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?
Vehicles powered from Equipement Grid.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Vehicles powered from Equipement Grid.
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?
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?
Re: Vehicles powered from Equipement Grid.
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.
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.
Re: Vehicles powered from Equipement Grid.
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.
Re: Vehicles powered from Equipement Grid.
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.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.
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"},
}
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Vehicles powered from Equipement Grid.
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?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.
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.
Re: Vehicles powered from Equipement Grid.
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.
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.