I'm re-making my caves mod, and I'm trying to make a proper heat exchanger using the heat pipe system.
Previously, I had a storage tank which just incremented or decremented the heat of whatever fluidbox it was in front of, but that didn't account for heat capacities. Now, I'm trying to add a heat ...
Search found 34 matches
- Fri May 11, 2018 12:52 am
- Forum: Modding help
- Topic: Custom entities with heat buffer
- Replies: 1
- Views: 880
- Wed May 11, 2016 1:50 pm
- Forum: Modding help
- Topic: Turrets with a liquid ammo?
- Replies: 6
- Views: 2198
Re: Turrets with a liquid ammo?
Can a turret (or any entity, really) have a fluidbox? If so, I can just make a dummy ammo that the player can't pick up through a control script.
- Sun May 08, 2016 1:49 am
- Forum: Modding help
- Topic: Turrets with a liquid ammo?
- Replies: 6
- Views: 2198
Turrets with a liquid ammo?
I want to make a turret that runs on a liquid for ammo, instead of an item, but there isn't anything like that I might have been able to change to Any tips or tricks that I could use to make this work? Thanks
Code: Select all
ammo_item={basicitemstack}
Code: Select all
{type="fluid",name=...}
- Sun May 08, 2016 1:46 am
- Forum: Modding help
- Topic: Custom Animations?
- Replies: 3
- Views: 1490
Re: Custom Animations?
well that sucks, I might make my own api seeing as there isn't any good solutions, and then post it here. Thanks
- Wed May 04, 2016 7:11 pm
- Forum: Modding help
- Topic: Custom Animations?
- Replies: 3
- Views: 1490
Re: Custom Animations?
Anyone know if these are going to be implemented soon, or will I have to make my own API for it?
- Sat Apr 30, 2016 1:04 am
- Forum: Modding help
- Topic: Custom Animations?
- Replies: 3
- Views: 1490
Custom Animations?
I've gotten back into modding recently, and I want to know if my entity can have custom animations (kind of like animation states). These animations need to be accessable by code, as in they can be activated/deactivated by calling a function or event. Any help is appreciated, thanks.
- Thu Jan 14, 2016 10:20 pm
- Forum: Modding help
- Topic: 'Given force is not valid'
- Replies: 8
- Views: 11491
Re: 'Given force is not valid'
Huh, it works with it now. Maybe I miss-typed something before?
- Thu Jan 14, 2016 10:14 pm
- Forum: Modding help
- Topic: Use Electric Energy as Burner? Is it even possible?
- Replies: 2
- Views: 4466
Re: Use Electric Energy as Burner? Is it even possible?
First, never use an infinite while loop when modding factorio, it tends to make the game freeze completely. Use the 'on_tick' event instead ( on_tick )
Second, there are a few different ways to do this, the most efficient (I think) is to look for an accumulator around the car using this method ...
Second, there are a few different ways to do this, the most efficient (I think) is to look for an accumulator around the car using this method ...
- Thu Jan 14, 2016 9:36 pm
- Forum: Modding help
- Topic: 'Given force is not valid'
- Replies: 8
- Views: 11491
Re: 'Given force is not valid'
It's supposed to be a lava pump, that only works with my tiles. But it pumps lava out of water tiles too, so I wanted to make it explode without harming the player if you put it in water. Same with the normal pumps + lava tiles.
{
type = "offshore-pump",
name = "lava-pump",
icon = "__base ...
{
type = "offshore-pump",
name = "lava-pump",
icon = "__base ...
- Thu Jan 14, 2016 8:31 pm
- Forum: Modding help
- Topic: 'Given force is not valid'
- Replies: 8
- Views: 11491
Re: 'Given force is not valid'
.die() doesn't work properly, but I ended up just spawning a medium-explosion entity. It contains the sound and everything.
- Thu Jan 14, 2016 1:55 am
- Forum: Modding help
- Topic: 'Given force is not valid'
- Replies: 8
- Views: 11491
Re: 'Given force is not valid'
...
After testing it, it does the same thing as .die(), how can I make it explode?
After testing it, it does the same thing as .die(), how can I make it explode?
- Thu Jan 14, 2016 1:34 am
- Forum: Modding help
- Topic: 'Given force is not valid'
- Replies: 8
- Views: 11491
'Given force is not valid'
I'm trying to make one of my entities explode when something happens (currently, placing), but I can't figure out how to make it explode. I tried grenades, but those kill the player as well. entity.die() doesn't work because it doesn't produce the explosion. And entity.damage doesn't work because ...
- Tue Jan 12, 2016 8:21 pm
- Forum: Modding help
- Topic: How do I make a throwable light source?
- Replies: 2
- Views: 6427
Re: How do I make a throwable light source?
Thanks, it works now.
- Mon Jan 11, 2016 6:20 pm
- Forum: Modding help
- Topic: How do I make a throwable light source?
- Replies: 2
- Views: 6427
How do I make a throwable light source?
I'm trying to make a glow stick for my mod, but I can't make it 'do nothing'. I tried an empty quote mark, but the game just crashes.
{
type = "projectile",
name = "glowstick",
flags = {"not-on-map"},
acceleration = 0.005,
action =
{
{
type = "direct",
action_delivery =
{
type ...
{
type = "projectile",
name = "glowstick",
flags = {"not-on-map"},
acceleration = 0.005,
action =
{
{
type = "direct",
action_delivery =
{
type ...
- Sat Jan 09, 2016 11:29 pm
- Forum: Modding help
- Topic: Draw buildings under cars and players
- Replies: 14
- Views: 26248
Re: Draw buildings under cars and players
Another, fairly hacky solution is creating a decorative entity with the image, and make the combinator have a clear sprite. Then spawn the decoration and destroy it depending on when your pressure plate is placed/broken (in the control.lua).
- Sat Jan 09, 2016 5:32 pm
- Forum: Modding help
- Topic: Draw buildings under cars and players
- Replies: 14
- Views: 26248
Re: Draw buildings under cars and players
I know for decoratives, you can do 'render_layer = "decorative" ', although I'm not sure if it would work with a constant combinator. Here's the link for the different types of render layers, https://forums.factorio.com/wiki/inde ... enderLayer
- Wed Jan 06, 2016 8:20 pm
- Forum: Modding help
- Topic: What is surface.find_entities centered around?
- Replies: 6
- Views: 15191
Re: What is surface.find_entities centered around?
I got it to work, if anyone needs help:
script.on_event(defines.events.on_tick, function(event)
local X = game.player.position.x
local Y = game.player.position.y
local entrance = game.surfaces["nauvis"].find_entities_filtered{area = {{X,Y},{X,Y}}, name= "Cave-Entrance"}
if (global.caves ...
script.on_event(defines.events.on_tick, function(event)
local X = game.player.position.x
local Y = game.player.position.y
local entrance = game.surfaces["nauvis"].find_entities_filtered{area = {{X,Y},{X,Y}}, name= "Cave-Entrance"}
if (global.caves ...
- Wed Jan 06, 2016 8:11 pm
- Forum: Modding help
- Topic: entity.destroy not working.
- Replies: 9
- Views: 22610
Re: entity.destroy not working.
Ok I didn't know there was a different, I thought it was just a convenience variable
- Wed Jan 06, 2016 6:29 pm
- Forum: Modding help
- Topic: entity.destroy not working.
- Replies: 9
- Views: 22610
Re: entity.destroy not working.
I have a temp file for code I might need in the future, but never use. Also you do --[[ and --]] (start/end, respectively) to comment out large sections of code ( here ).
Also, instead of using the destroyed boolean you could use v.valid
script.on_event(defines.events.on_chunk_generated, function ...
Also, instead of using the destroyed boolean you could use v.valid
script.on_event(defines.events.on_chunk_generated, function ...
- Wed Jan 06, 2016 6:24 pm
- Forum: Modding help
- Topic: Is creating new surfaces implemented?
- Replies: 14
- Views: 26995
Re: Is creating new surfaces implemented?
@jorgenRe, what I plan to do is check when my entrance is auto-genned, if there's a chasm/lava where the player would spawn and if there is, move the entrance to somewhere that it won't affect the player. This would all happen in on_chunk_generated, so the player would never see it happen. You can ...