[SOLVED]Make machine not reqire energy
[SOLVED]Make machine not reqire energy
i want to make a machine for crafting, which doesn't reqire power, but it doesn't let me delete the energy_source and energy_usage
Last edited by Villfuk02 on Tue May 01, 2018 2:02 pm, edited 1 time in total.
Re: make machine not reqire energy
Cool idea, but that means there's no way? (i tried it, and it didn't work, so it was just a suggestion)
But i got another idea how to work around it!
When you place burner inserter or roboport, it has some small amount of energy stored inside. How can i do that?
But i got another idea how to work around it!
When you place burner inserter or roboport, it has some small amount of energy stored inside. How can i do that?
Re: make machine not reqire energy
http://lua-api.factorio.com/latest/LuaE ... ity.energyVillfuk02 wrote:When you place burner inserter or roboport, it has some small amount of energy stored inside. How can i do that?
Re: make machine not reqire energy
How exactly should i use that?
neither of the exmples below work
I guess I'll have to modify the energy amount after placement, but i do not know how
neither of the exmples below work
Code: Select all
energy_source =
{
type = "burner",
usage_priority = "secondary-input",
fuel_inventory_size = 0,
energy = "420kJ",
emissions = -0.02,
},
Code: Select all
energy_source =
{
type = "burner",
usage_priority = "secondary-input",
fuel_inventory_size = 0,
emissions = -0.02,
},
energy = "420kJ",
Re: make machine not reqire energy
I found out i can use
Now i only need to figure out how to apply those commands after placing the entity
Code: Select all
/c game.player.selected.burner.currently_burning="wood"
/c game.player.selected.burner.remaining_burning_fuel=2000000
Re: make machine not reqire energy
control.luaVillfuk02 wrote:I found out i can useNow i only need to figure out how to apply those commands after placing the entityCode: Select all
/c game.player.selected.burner.currently_burning="wood" /c game.player.selected.burner.remaining_burning_fuel=2000000
http://lua-api.factorio.com/latest/even ... ilt_entity
Code: Select all
script.on_event(defines.events.on_built_entity, function(event)
local entity = event.created_entity
if (entity.name == 'my_entity_name') and entity.burner and entity.burner.remaining_burning_fuel then
burner.remaining_burning_fuel=2000000
end
end)
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: make machine not reqire energy
You can not set a remaining value greater than the maximum for that fuel type. You'll have to define a new fuel item with the value you want. If you set the energy usage to 1J it should last quite a while.Villfuk02 wrote:I found out i can useNow i only need to figure out how to apply those commands after placing the entityCode: Select all
/c game.player.selected.burner.currently_burning="wood" /c game.player.selected.burner.remaining_burning_fuel=2000000
Also it would be nice if you could bump the 'null' source request thread with a link to this topic. Makes it more likely that it might some day be implemented.
Re: make machine not reqire energy
One "wood" has exactly 2000000J of energy, so that's fine. For my purposes I have set the power consumption to 500W, so it lasts 4000 seconds, which is exactly 3 items crafted (They take very long).
I know It's off topic but i'd like a way to not be able to place the machine at the same place, until the ground is repaired. My idea is to place entities under this entity which are normally indestructible (like cliffs) and you are able to remove them by special item (like cliff explosives). Is this idea plausible, or not? And would it be possible to set up another collision layer, so only this machine is blocked by the entity?
Btw I implemented the fuel like this:
Thanks!
I know It's off topic but i'd like a way to not be able to place the machine at the same place, until the ground is repaired. My idea is to place entities under this entity which are normally indestructible (like cliffs) and you are able to remove them by special item (like cliff explosives). Is this idea plausible, or not? And would it be possible to set up another collision layer, so only this machine is blocked by the entity?
Btw I implemented the fuel like this:
Code: Select all
script.on_event(defines.events.on_built_entity, function(event)
local entity = event.created_entity
if (entity.name == "basic-farmland") and entity.burner and entity.burner.remaining_burning_fuel then
event.created_entity.burner.currently_burning="wood"
event.created_entity.burner.remaining_burning_fuel=2000000
end
end
)
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: [SOLVED]Make machine not reqire energy
Theoretically there are five collision layers not used by the base game.
https://wiki.factorio.com/Types/CollisionMask
The more mods start to use those randomly the less of a "blocks only this one machine" effect you will have though.
What is the exact thing you're trying to do? From what your explaining about crafting machines that only need to craft 3 items it's not very clear and thus hard to give better advice.
https://wiki.factorio.com/Types/CollisionMask
The more mods start to use those randomly the less of a "blocks only this one machine" effect you will have though.
What is the exact thing you're trying to do? From what your explaining about crafting machines that only need to craft 3 items it's not very clear and thus hard to give better advice.
Re: [SOLVED]Make machine not reqire energy
Don't worry, i first went for a farm, which would deplete the foel over time, because the most basic version has no water input, so the ground dries out. It should not be placeable on concrete/stone path tiles, because it's DIRT and you put none in the crafting recipe. I also wanted for the ground to be unusable after usint the farmland there, because it'S dried out, but i then realised this mechanic would be annoying and confusing, so i just made the crafting time longer and each farm can grow crops 3 times until it has to be crafted again.