Search found 3753 matches

by DaveMcW
Thu Mar 16, 2023 1:05 am
Forum: Modding help
Topic: Event for entity configuration changes
Replies: 2
Views: 1352

Re: Event for entity configuration changes

This is the same issue as constant combinators. viewtopic.php?f=25&t=102702
by DaveMcW
Mon Mar 06, 2023 1:53 am
Forum: Ideas and Requests For Mods
Topic: "Demands"
Replies: 13
Views: 5076

Re: "Demands"

This is already in the game as the "Supply challenge" scenario.
by DaveMcW
Sun Feb 26, 2023 5:04 am
Forum: Modding help
Topic: Getting list of all generated chunks
Replies: 2
Views: 1956

Re: Getting list of all generated chunks

Yes, the iterator can be stored.

The stored iterator contains the current chunks, even if they were generated after it was created. It might not catch some newly created chunks, if they are inserted before the current position.

When the iterator reaches the end of the list it stops iterating, even ...
by DaveMcW
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: 2850

Re: A spider mod. The equipment is immediately inserted into the grid.

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 ...
by DaveMcW
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: 2850

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)
by DaveMcW
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: 2385

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.
by DaveMcW
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: 3163

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}
by DaveMcW
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: 3163

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.
by DaveMcW
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: 4701

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.
by DaveMcW
Mon Jan 23, 2023 3:50 am
Forum: Modding help
Topic: Migration file order
Replies: 9
Views: 2850

Re: Migration file order

It uses ascending order.
by DaveMcW
Mon Jan 16, 2023 3:29 am
Forum: Modding help
Topic: [Scripting Assistance] Help referencing procedurally generated recipe name
Replies: 1
Views: 1097

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 ...
by DaveMcW
Wed Jan 04, 2023 2:25 am
Forum: Modding help
Topic: inverted search limit filter
Replies: 4
Views: 1758

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) )
by DaveMcW
Wed Jan 04, 2023 1:46 am
Forum: Modding help
Topic: inverted search limit filter
Replies: 4
Views: 1758

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².
by DaveMcW
Mon Jan 02, 2023 9:34 pm
Forum: Technical Help
Topic: Is this Multiplayer Map to Big for Factorio?
Replies: 3
Views: 1630

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:

Code: Select all

/c game.speed = 0.7
by DaveMcW
Sun Jan 01, 2023 7:48 am
Forum: Gameplay Help
Topic: Need help in math: perfect inserter distribution
Replies: 3
Views: 1910

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? :)
by DaveMcW
Fri Dec 16, 2022 12:05 pm
Forum: Technical Help
Topic: Home Linux Server Factorio (need guidance)
Replies: 1
Views: 1118

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.
by DaveMcW
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: 2696

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.
by DaveMcW
Wed Nov 23, 2022 1:44 am
Forum: Modding help
Topic: next-upgrade
Replies: 2
Views: 1444

Re: next-upgrade

Code: Select all

data.raw["furnace"]["mulcher-3"].collision_box = table.deepcopy( data.raw["furnace"]["mulcher-2"].collision_box )

Go to advanced search