Search found 7 matches
- Thu Dec 12, 2024 11:12 pm
- Forum: Modding help
- Topic: Storage and copy/paste
- Replies: 2
- Views: 272
Re: Storage and copy/paste
Appreciate the feedback!
- Thu Dec 12, 2024 4:11 am
- Forum: Modding help
- Topic: Storage and copy/paste
- Replies: 2
- Views: 272
Storage and copy/paste
Right now I have some custom entities that use filters. The filters don't exist as part of any normal prototype's behavior. They're set by a custom GUI and indicated by manually drawing a sprite. The state of each filter is tracked in storage.my_cool_entity_filters[my_entity.unit_number] . And there ...
- Sat Nov 30, 2024 8:26 pm
- Forum: Modding help
- Topic: Locking a container
- Replies: 1
- Views: 243
Locking a container
I'm trying to make a container that can be locked and unlocked. A locked container would not let inserters interact with it (or anything really).
My 'canister' is copied from the car prototype. This gives it other qualities I need, such as mobility, disabled collision and being drawn under other ...
My 'canister' is copied from the car prototype. This gives it other qualities I need, such as mobility, disabled collision and being drawn under other ...
- Thu Nov 28, 2024 7:46 pm
- Forum: Modding help
- Topic: [boskid] How to get the ID of a custom-event?
- Replies: 6
- Views: 539
Re: How to get the ID of a custom-event?
Can you post the relevant code?
I assume you're looking at these pages:
https://lua-api.factorio.com/latest/events.html#CustomInputEvent - particularly "selected_prototype"
https://lua-api.factorio.com/latest/prototypes/CustomInputPrototype.html - which mentions "include_selected_prototype" should ...
I assume you're looking at these pages:
https://lua-api.factorio.com/latest/events.html#CustomInputEvent - particularly "selected_prototype"
https://lua-api.factorio.com/latest/prototypes/CustomInputPrototype.html - which mentions "include_selected_prototype" should ...
- Wed Nov 27, 2024 1:34 am
- Forum: Modding help
- Topic: Mining requires fluid depending on drill
- Replies: 5
- Views: 629
Re: Mining requires fluid depending on drill
Or maybe an assembler prototype that uses a custom recipe of 1 steam => nothing. Would need some way to catch when the recipe was done, and then find a random tile in range and spit out the appropriate ore. Or have a recipe for each ore.
- Wed Nov 27, 2024 1:26 am
- Forum: Modding help
- Topic: Random (but consistent) generation of values in the data-stage
- Replies: 12
- Views: 706
Re: Random (but consistent) generation of values in the data-stage
I'm not sure but this may be what you're looking for:
https://lua-api.factorio.com/latest/cla ... _generator
https://lua-api.factorio.com/latest/cla ... rator.html
https://lua-api.factorio.com/latest/cla ... _generator
https://lua-api.factorio.com/latest/cla ... rator.html
- Sun Nov 24, 2024 4:14 am
- Forum: Modding help
- Topic: Setting a default fluid amount
- Replies: 0
- Views: 137
Setting a default fluid amount
I am trying to fill my new 'tube' entity with some 'air' in it by default. 50 units of air. Tubes have the Storage Tank prototype.
I have this snippet in control.lua:
script.on_event(defines.events.on_built_entity, function(event)
local entity = event.entity
if entity.name == "tube" or entity ...
I have this snippet in control.lua:
script.on_event(defines.events.on_built_entity, function(event)
local entity = event.entity
if entity.name == "tube" or entity ...