Yes, the grid is always created empty.
It is hard to catch items when they are created because there is no event for it. You could watch the player's inventory though.
function set_spider_inventory(grid)
grid.put{name="battery-mk2-equipment", position={1,1}}
end
script.on_event(defines.events ...
Search found 3749 matches
- Thu Feb 09, 2023 5:56 am
- Forum: Modding help
- Topic: A spider mod. The equipment is immediately inserted into the grid.
- Replies: 7
- Views: 2301
- Thu Feb 09, 2023 5:31 am
- Forum: Modding help
- Topic: A spider mod. The equipment is immediately inserted into the grid.
- Replies: 7
- Views: 2301
Re: A spider mod. The equipment is immediately inserted into the grid.
Code: Select all
script.on_event(defines.events.on_built_entity, function(event)
if event.created_entity.name == "spidertron" then
event.created_entity.grid.put{name="battery-mk2-equipment", position={1,1}}
end
end)
- Wed Feb 01, 2023 12:18 am
- Forum: Modding help
- Topic: Can I create a combinator with multiple input/output connection points?
- Replies: 4
- Views: 1934
Re: Can I create a combinator with multiple input/output connection points?
No, the 4 WireConnectionPoint's correspond to 4 directions. You only get 1 red and 1 green input connection, and 1 red and 1 green output connection.
You have to use multiple entities if you want more connections.
You have to use multiple entities if you want more connections.
- Tue Jan 31, 2023 1:37 pm
- Forum: Gameplay Help
- Topic: Has anyone done or got tips for a "no steam" play?
- Replies: 7
- Views: 2436
Re: Has anyone done or got tips for a "no steam" play?
You can use a cheat to do it:
Code: Select all
/command game.player.insert{name="solar-panel", count=1}
- Tue Jan 31, 2023 1:34 pm
- Forum: Gameplay Help
- Topic: Has anyone done or got tips for a "no steam" play?
- Replies: 7
- Views: 2436
Re: Has anyone done or got tips for a "no steam" play?
If you want to avoid all boilers, give yourself a single solar panel at the start to run your labs.
- Sun Jan 29, 2023 10:04 pm
- Forum: This Forum
- Topic: [Fixed] "Copy blueprint" button in topic review section reloads the page
- Replies: 4
- Views: 3586
Re: "Copy blueprint" button in topic review section reloads the page
In HTML, <button> has type="submit" by default. This means an unmodified button will refresh the page.
To work around this, give the button type="button".
The button in the reply is unmodified because the blueprint script failed. Figuring out why it failed is trickier.
To work around this, give the button type="button".
The button in the reply is unmodified because the blueprint script failed. Figuring out why it failed is trickier.
- Mon Jan 23, 2023 3:50 am
- Forum: Modding help
- Topic: Migration file order
- Replies: 9
- Views: 2176
Re: Migration file order
It uses ascending order.
- Mon Jan 16, 2023 3:29 am
- Forum: Modding help
- Topic: [Scripting Assistance] Help referencing procedurally generated recipe name
- Replies: 1
- Views: 889
Re: [Scripting Assistance] Help referencing procedurally generated recipe name
/c
name = "biter-larva-2"
pattern = "^(%w+)%-larva%-(%d+)$"
species, i = name:match(pattern);
game.print(species);
game.print(i);
Pattern explanation:
^ start of string
$ end of string
%w+ one or more alphanumeric characters
%d+ one or more digits
%- dash is a special character, so you need to ...
name = "biter-larva-2"
pattern = "^(%w+)%-larva%-(%d+)$"
species, i = name:match(pattern);
game.print(species);
game.print(i);
Pattern explanation:
^ start of string
$ end of string
%w+ one or more alphanumeric characters
%d+ one or more digits
%- dash is a special character, so you need to ...
- Wed Jan 04, 2023 2:25 am
- Forum: Modding help
- Topic: inverted search limit filter
- Replies: 4
- Views: 1433
Re: inverted search limit filter
Code: Select all
/c
player = game.player
entity = game.player.selected
game.print( "Distance between " .. entity.name .. " and " .. player.name .. " is: " .. math.sqrt((entity.position.x - player.position.x)^2 + (entity.position.y - player.position.y)^2) )
- Wed Jan 04, 2023 1:46 am
- Forum: Modding help
- Topic: inverted search limit filter
- Replies: 4
- Views: 1433
Re: inverted search limit filter
The radius and limit filters cannot be inverted.
I would search the entire surface, then calculate the radius yourself using triangles: a² + b² = c².
I would search the entire surface, then calculate the radius yourself using triangles: a² + b² = c².
- Mon Jan 02, 2023 9:34 pm
- Forum: Technical Help
- Topic: Is this Multiplayer Map to Big for Factorio?
- Replies: 3
- Views: 1300
Re: Is this Multiplayer Map to Big for Factorio?
Your host server is too good. Slow clients can never catch up to the server.
You can force the host to slow down with the command:
You can force the host to slow down with the command:
Code: Select all
/c game.speed = 0.7
- Sun Jan 01, 2023 7:48 am
- Forum: Gameplay Help
- Topic: Need help in math: perfect inserter distribution
- Replies: 3
- Views: 1478
Re: Need help in math: perfect inserter distribution
You need to build 9 rocket silos to support 9 satellites per minute.
Why not build an extra satellite assembling machine?
Why not build an extra satellite assembling machine?

- Fri Dec 16, 2022 12:05 pm
- Forum: Technical Help
- Topic: Home Linux Server Factorio (need guidance)
- Replies: 1
- Views: 876
Re: Home Linux Server Factorio (need guidance)
1. Follow one of the tutorials you found.
2. Get stuck.
3. Post here explaining which tutorial you used, which step you are stuck on, and what the error message is.
2. Get stuck.
3. Post here explaining which tutorial you used, which step you are stuck on, and what the error message is.
- Tue Dec 13, 2022 3:37 pm
- Forum: Technical Help
- Topic: [STEAM] Cloud saves too big
- Replies: 2
- Views: 1201
- Sun Nov 27, 2022 9:38 pm
- Forum: Gameplay Help
- Topic: How to transfer lab. to lab.a science package (with full efficiency)?
- Replies: 4
- Views: 2146
Re: How to transfer lab. to lab.a science package (with full efficiency)?
Does it work if you use 7 belts? Adding 3 more on the other side.
- Wed Nov 23, 2022 1:44 am
- Forum: Modding help
- Topic: next-upgrade
- Replies: 2
- Views: 1185
Re: next-upgrade
Code: Select all
data.raw["furnace"]["mulcher-3"].collision_box = table.deepcopy( data.raw["furnace"]["mulcher-2"].collision_box )
- Fri Nov 11, 2022 1:26 am
- Forum: Modding help
- Topic: Unremovable armour
- Replies: 1
- Views: 1025
Re: Unremovable armour
Armor has a unique item_number you can use to identify it. You still need to search all the possible places for it to hide.
- Thu Nov 10, 2022 9:23 pm
- Forum: Combinator Creations
- Topic: Movie Player
- Replies: 86
- Views: 511143
Re: Movie Player
Yes, all my transport belts were circuit controlled, of course.
- Thu Nov 10, 2022 7:02 pm
- Forum: Modding discussion
- Topic: Adding a power switch
- Replies: 2
- Views: 1400
Re: Adding a power switch
A pump works just like a power switch for water. You can connect it to a tank with red wire to read the water level.
- Wed Nov 02, 2022 4:05 am
- Forum: Technical Help
- Topic: Editor Mode not working
- Replies: 2
- Views: 1115
Re: Editor Mode not working
In Windows Explorer, type %APPDATA% in the address bar and delete the Factorio folder.