Search found 3737 matches

by DaveMcW
Sat Mar 22, 2025 1:41 pm
Forum: Modding help
Topic: Specifying the biter's attack target
Replies: 4
Views: 279

Re: Specifying the biter's attack target

You need to set that in data.lua.

Code: Select all

data.raw['entity']['nuclear-reactor'].allow_run_time_change_of_is_military_target = true
by DaveMcW
Thu Mar 20, 2025 4:06 pm
Forum: Modding help
Topic: Specifying the biter's attack target
Replies: 4
Views: 279

Re: Specifying the biter's attack target

Code: Select all

/c entity = game.player.selected
entity.is_military_target = true
https://lua-api.factorio.com/latest/cla ... ary_target
by DaveMcW
Tue Mar 04, 2025 2:37 am
Forum: Ideas and Requests For Mods
Topic: [Request] Disable decals from loading
Replies: 1
Views: 167

Re: [Request] Disable decals from loading

Ctrl + Alt + Click on Settings.

Click The rest.

Click both sprite-altas checkboxes.

This makes startup slightly slower the first time, then much faster every other time.
by DaveMcW
Fri Feb 28, 2025 7:24 pm
Forum: Modding interface requests
Topic: Stateless visualisations for PlantPrototype
Replies: 0
Views: 124

Stateless visualisations for PlantPrototype

I am trying to make a plant type of "Flaming ashland tree". This requires the fire stateless_visualisation_variations to change position as the tree grows.

Please scale the stateless visualisations based on a plant's tick_grown.
by DaveMcW
Tue Jan 28, 2025 2:06 am
Forum: Modding help
Topic: "Noob" prototype "type checking" question
Replies: 13
Views: 767

Re: "Noob" prototype "type checking" question

The Factorio engine does not support object-oriented programming.

You can't extend an entity. And you can't use "instance-of" with user-defined entities (because user-defined classes are impossible).

Lua does allow you to use object-oriented patterns, but it only works in your own mod and can't ...
by DaveMcW
Tue Jan 21, 2025 2:59 am
Forum: Modding discussion
Topic: Some "will it mod" questions
Replies: 2
Views: 392

Re: Some "will it mod" questions

1. No engine support, but you can write a mod to help you automate it.
2. No engine support.
3. Mods can connect wires across surfaces.
4. Mods can connect wires across surfaces.
5. No engine support, but you can write a mod to help you automate it.
6. No engine support.
7. Mods can connect wires ...
by DaveMcW
Wed Jan 01, 2025 6:49 pm
Forum: General discussion
Topic: Accumulator / Solar panel ratio
Replies: 171
Views: 686804

Re: Accumulator / Solar panel ratio

Yes, the 25200 tick day was added in Factorio 2.0.
by DaveMcW
Sun Dec 29, 2024 10:35 am
Forum: Modding help
Topic: Making a composite entity act like a normal entity
Replies: 7
Views: 705

Re: Making a composite entity act like a normal entity

The event for cut and copy is on_player_cursor_stack_changed.
by DaveMcW
Thu Dec 26, 2024 2:25 am
Forum: Mechanical Throughput Magic (circuit-free)
Topic: Legendary electronic circuits 28/s
Replies: 3
Views: 1406

Legendary electronic circuits 28/s

This design upgrades normal quality circuits into legendary circuits.

Input is 28 green circuits and 2.8 red circuits per second.
Output is 28 legendary green circuits and 2.8 legendary red circuits per second.

It is optimized for Processing Unit Productivity 13. At lower tech levels it has ...
by DaveMcW
Thu Dec 26, 2024 1:10 am
Forum: Questions, reviews and ratings
Topic: maximum zoom out (0.3?) Is more possible?
Replies: 6
Views: 941

Re: maximum zoom out (0.3?) Is more possible?

One trick is to resize the game window into a square. Zoom is limited by your longest screen dimension.
by DaveMcW
Wed Dec 25, 2024 9:36 pm
Forum: Modding help
Topic: Making a composite entity act like a normal entity
Replies: 7
Views: 705

Re: Making a composite entity act like a normal entity

You need a third entity whose only purpose is to appear in blueprints.
by DaveMcW
Sun Dec 22, 2024 8:29 pm
Forum: Modding help
Topic: Can't fix problem with sprite sheet loading
Replies: 1
Views: 230

Re: Can't fix problem with sprite sheet loading

alberto_omegA wrote: Sat Dec 21, 2024 10:14 pm Car have 36 direction and sprite sheet is 36 images with 6*6 sprites
Try setting line_length = 6.
by DaveMcW
Thu Dec 12, 2024 12:48 am
Forum: Modding help
Topic: Adding an input slot to a factory
Replies: 1
Views: 229

Re: Adding an input slot to a factory

You need to change the type to something with item slots. I recommend "car", since the inventory can be filtered to blueprints only.
by DaveMcW
Tue Dec 10, 2024 11:38 am
Forum: Modding help
Topic: completely replacing entity graphics
Replies: 2
Views: 263

Re: completely replacing entity graphics

Set filename = "__core__/graphics/empty.png"
by DaveMcW
Wed Dec 04, 2024 2:40 am
Forum: Wiki Talk
Topic: Recycler Formula / Description
Replies: 3
Views: 1040

Re: Recycler Formula / Description

The wiki formula does match what you are saying, though the math symbols make it hard to understand.

The topless brackets mean "round down to the nearest integer".

Adding a random number between 0-1 to extra_fraction and then rounding down, is the same as rolling a random number against extra ...
by DaveMcW
Wed Dec 04, 2024 2:24 am
Forum: Wiki Talk
Topic: Quality Module 3 without Space Age
Replies: 1
Views: 450

Re: Quality Module 3 without Space Age

I added the deactivated-Space-Age recipe to the info box.
by DaveMcW
Wed Dec 04, 2024 1:58 am
Forum: Modding discussion
Topic: CamelCase
Replies: 2
Views: 418

Re: CamelCase

I suspect it's because the C++ code is written in CamelCase (see the internal class names here), and they want an easy way to keep the lua functions distinct.
by DaveMcW
Tue Dec 03, 2024 12:33 am
Forum: Modding help
Topic: [Solved]DeepCopy of unsorted items missing from normal gameplay
Replies: 4
Views: 375

Re: DeepCopy of unsorted items missing from normal gameplay

This worked for me.

local entity = table.deepcopy(data.raw['lane-splitter']['lane-splitter'])
entity.name = "my-splitter"
entity.hidden = false
data:extend{entity}

local item = table.deepcopy(data.raw['item']['lane-splitter'])
item.name = "my-splitter"
item.subgroup = "belt"
item.place_result ...

Go to advanced search