Search found 289 matches
- Mon Aug 30, 2021 10:37 am
- Forum: Duplicates
- Topic: [1.1.38] selection-tool items do not stack in input slot
- Replies: 6
- Views: 2151
[1.1.38] selection-tool items do not stack in input slot
I have the following item in my mod: local scanneritem = { type = "selection-tool", name = name, icon = graphics.."icons/"..name..".png", icon_size = 64, stack_size = 1, subgroup = "logistics-observation", order = "f["..name.."]", open_soun...
- Sat Aug 21, 2021 7:39 pm
- Forum: Modding help
- Topic: Using the global random number generator inside on_chunk_generated
- Replies: 7
- Views: 2291
Re: Using the global random number generator inside on_chunk_generated
Using `math.random()` is just fine.
- Fri Aug 13, 2021 3:32 pm
- Forum: Documentation Improvement Requests
- Topic: Documentation Improvement Requests
- Replies: 316
- Views: 83808
Re: Small documentation improvement requests
Belt speed wording is a little awkward, but notably it implies that any number will work. This is not the case. Belts internally have 256 positions, and items on a belt must move an integer number of positions per tick, the speed value must be a multiple of 1/256. Well, it can be other things, but ...
- Wed Aug 11, 2021 9:27 pm
- Forum: Modding help
- Topic: How can I edit every instance of a prototype type?
- Replies: 5
- Views: 1274
Re: How can I edit every instance of a prototype type?
Recipes are a hydra. You have to set enabled = false but also check if they have a "normal" and if so set normal.enabled = false, and again for "expensive".
- Fri Aug 06, 2021 8:22 am
- Forum: Modding help
- Topic: Undocumented locale file features
- Replies: 1
- Views: 704
Undocumented locale file features
I found this in base.cfg:
This __CONTROL_STYLE_BEGIN/END__ tag is totally undocumented on the Wiki. Are there any other such undocumented features or is this the only one?
Code: Select all
__CONTROL_STYLE_BEGIN__/unlock-tips__CONTROL_STYLE_END__
- Wed Aug 04, 2021 1:58 pm
- Forum: Modding help
- Topic: Finer control of inserter pickup from belts
- Replies: 7
- Views: 1664
Re: Finer control of inserter pickup from belts
After some experimenting, I confirmed that placing the inserters exactly alongside the belt would correctly pull from the near lane, but any kind of diagonal grab would pull from the left lane in the direction of travel.
I've managed to wrangle this successfully! Thank you for the pointers.
I've managed to wrangle this successfully! Thank you for the pointers.
- Wed Aug 04, 2021 8:57 am
- Forum: Modding help
- Topic: Copy-paste entity settings for EEI
- Replies: 9
- Views: 2249
Re: Copy-paste entity settings for EEI
Since the setting is a toggle and the building in question cannot be rotated once placed, I went and implemented this as "hit the Rotate key to toggle the mode without having to open the GUI" instead. It's a convenience feature anyway and the control is now in the entity-description text s...
- Tue Aug 03, 2021 9:46 pm
- Forum: Modding help
- Topic: Copy-paste entity settings for EEI
- Replies: 9
- Views: 2249
Re: Copy-paste entity settings for EEI
Oh whoops, I misread. I made an electric-energy-interface prototype with 20MW consumption, placed it in game and tried to copy settings from it with shift-right click. There was no sound and no green highlight box around it. However I'm realising now... The UI type is none since it's a fixed consume...
- Tue Aug 03, 2021 6:25 pm
- Forum: Modding help
- Topic: Copy-paste entity settings for EEI
- Replies: 9
- Views: 2249
Re: Copy-paste entity settings for EEI
The EEI has settings associated with it, and I want to be able to copy-paste them with shift-left/right clicking. But, as you mention, EEI doesn't support copy-paste. I wanted to know if there's a way to force it. I know entities can be forced to accept pastes, but allowing copy is another matter...
- Tue Aug 03, 2021 4:43 pm
- Forum: Modding help
- Topic: Copy-paste entity settings for EEI
- Replies: 9
- Views: 2249
Copy-paste entity settings for EEI
I have some custom entities that use the electric-energy-interface as the "base". I'd like to be able to support copy-pasting of entity settings between them, but attempting to copy settings from an EEI doesn't seem to do anything. Is there any way to enable copy-paste on entities that don...
- Mon Aug 02, 2021 1:12 pm
- Forum: Modding help
- Topic: Finer control of inserter pickup from belts
- Replies: 7
- Views: 1664
Re: Finer control of inserter pickup from belts
After looking into it, it seems both Miniloaders and Editor Extensions use the same offset of +/-0.25 as I am. This isn't an issue for EE because they just load into a deleting infinity chest so never have a lane back up. I imagine with Miniloaders if a machine just needs a few items then it'll pull...
- Sun Aug 01, 2021 9:41 pm
- Forum: Modding help
- Topic: Finer control of inserter pickup from belts
- Replies: 7
- Views: 1664
Re: Finer control of inserter pickup from belts
Both inserter are on the next tile to the right, but as far as I'm aware it shouldn't matter since it should just be the vectors that count. But I'll have a look at Miniloaders, good call.
- Sun Aug 01, 2021 7:25 pm
- Forum: Modding help
- Topic: Finer control of inserter pickup from belts
- Replies: 7
- Views: 1664
Re: Finer control of inserter pickup from belts
Well, to be more specific, here's some ascii art of a belt: _________ / \ | x | | \ \ | | > >| | / / | | x | \_________/ So the belt is facing right, there are two inserters in the same tile to the right of it with the goal of each one picking from a preferred lane, indicated with x in the graphic a...
- Sun Aug 01, 2021 12:20 pm
- Forum: Modding help
- Topic: Finer control of inserter pickup from belts
- Replies: 7
- Views: 1664
Finer control of inserter pickup from belts
Is it at all possible fine-tune where inserters pick up from belts? In particular I have modded inserters with custom vectors picking up from the end of a belt, and currently they pick up preferentially from the left lane, even when the custom vector positions the pickup location over the right lane...
- Sun Aug 01, 2021 12:15 pm
- Forum: Modding help
- Topic: How to know if locomotive is trying to accelerate in manual control?
- Replies: 2
- Views: 775
Re: How to know if locomotive is trying to accelerate in manual control?
Does player.riding_state.acceleration not give you this information?
- Sat Jul 31, 2021 10:08 pm
- Forum: Modding help
- Topic: Spawn Item Command?
- Replies: 4
- Views: 84196
Re: Spawn Item Command?
Code: Select all
/editor
- Fri Jul 30, 2021 2:19 pm
- Forum: Modding interface requests
- Topic: LuaItemStack#split_stack
- Replies: 0
- Views: 537
LuaItemStack#split_stack
If I want to transfer some portion of an item stack then I have to manipulate the stack's count. If that item stack could have durability, then this needs additional handling. I created this function in Lua: ---@param source LuaItemStack ---@param destination LuaItemStack ---@param count uint functi...
- Wed Jul 28, 2021 8:44 pm
- Forum: Implemented mod requests
- Topic: Linked chest wire interface
- Replies: 11
- Views: 4200
Re: Linked chest wire interface
Although, setting linked chest ID by circuit signal would be interesting...
- Tue Jul 27, 2021 1:57 pm
- Forum: Modding help
- Topic: Collision logic for ghosts
- Replies: 0
- Views: 547
Collision logic for ghosts
I have a floor-type entity, that other entities can be built on top of. Or you can build floor underneath existing buildings, but that's not important. This all works fine for actual entities, but when dealing with ghosts it gets a bit odd. Basically if I copy-paste the build then the ghosts are all...
- Mon Jul 26, 2021 5:23 pm
- Forum: Modding interface requests
- Topic: Hide 0W electric-energy-interface from power graph
- Replies: 3
- Views: 918
Re: Hide 0W electric-energy-interface from power graph
I'm not convinced that's a bad thing. When an item stops being produced for long enough to fall off the production graph, that item disappears.