Search found 48 matches
- Sat Nov 30, 2024 1:19 am
- Forum: Documentation Improvement Requests
- Topic: [2.0.23] Crash with sprite-button elem_tooltip and virtual signals
- Replies: 2
- Views: 164
Re: [2.0.23] Crash with sprite-button elem_tooltip and virtual signals
Hi, Thanks for the quick reply! The "LuaGuiElement::elem_tooltip" field is define as an "ElemID", which is defined as having three elements: "type", "name" and optional "quality". There is no 'signal_type' on that definition. I *know* that adding tha...
- Sat Nov 30, 2024 1:12 am
- Forum: Resolved for the next release
- Topic: [boskid][2.0.23] Entity prototypes are missing "layers" information, leading to collision_mask_util.masks_collide crash
- Replies: 1
- Views: 150
[boskid][2.0.23] Entity prototypes are missing "layers" information, leading to collision_mask_util.masks_collide crash
I have a prototype definition for an entity that contains a collision mask. The collision mask has an empty "layers" definition: Screenshot 2024-11-29 at 17.00.07.png Note that the prototype does define layers as empty (it can not be omitted; more about that in a second). Now when I create...
- Fri Nov 29, 2024 7:09 am
- Forum: Modding help
- Topic: [2.0.x] How to set the zoom for a map (remote view)?
- Replies: 1
- Views: 122
- Fri Nov 29, 2024 7:09 am
- Forum: Modding discussion
- Topic: [2.0.x] How to set the zoom for a remote view map?
- Replies: 1
- Views: 170
Re: [2.0.x] How to set the zoom for a remote view map?
[answering my own question]
use "player.zoom". Using
in 0.1 steps from 0 up works really well to match the zoom levels in the GUI.
use "player.zoom". Using
Code: Select all
3 * math.exp(-1.05 * zoom_level)
- Fri Nov 29, 2024 7:02 am
- Forum: Modding interface requests
- Topic: Access to the global electric network on a space platform
- Replies: 0
- Views: 52
Access to the global electric network on a space platform
I have a mod that connects to electric networks (usually by connecting a copper wire to a pole). On a space platform, there is the global electric network so I want the entity to connect to that automatically if it is built on a space platform. I can determine whether there *is* a global electric ne...
- Fri Nov 29, 2024 1:23 am
- Forum: Documentation Improvement Requests
- Topic: [2.0.23] Crash with sprite-button elem_tooltip and virtual signals
- Replies: 2
- Views: 164
[2.0.23] Crash with sprite-button elem_tooltip and virtual signals
Consider this code: local button = { type = "sprite-button", sprite = 'virtual-signal'/" .. signal_name, number = signal.count, tooltip = prototypes.virtual_signal[signal_name].localised_name, button.elem_tooltip = { type = 'signal', name = signal_name, }, } crashes with }} Screenshot...
- Tue Nov 26, 2024 2:41 am
- Forum: Bug Reports
- Topic: [2.0.21] Recycler - assigning direction attribute does nothing
- Replies: 0
- Views: 85
[2.0.21] Recycler - assigning direction attribute does nothing
Basically, what the label says. With most other entities, including oblong ones that technically can not be rotated, assigning the LuaEntity::direction attribute will rotate them around (it does so for all oblong combinators). Not so for the recycler. Assigning the direction attribute does nothing, ...
- Sun Nov 24, 2024 6:39 am
- Forum: Modding interface requests
- Topic: Display quality overlay on a sprite and sprite-button
- Replies: 1
- Views: 141
Re: Display quality overlay on a sprite and sprite-button
[ replying to my own post first] At this point, I can get the hovers over the icons to work (by using the elem_tooltip attribute): button.elem_tooltip = { type = 'item-with-quality', name = signal_name, quality = signal.signal.quality, } However, the icons still do not show the quality information: ...
- Sun Nov 24, 2024 1:05 am
- Forum: Modding interface requests
- Topic: Display quality overlay on a sprite and sprite-button
- Replies: 1
- Views: 141
Display quality overlay on a sprite and sprite-button
For a sprite button, I can have it overlay a number (for count), by adding a "number = 100" to the LuaGuiElement. However, with Space Age, there are icons like this (this is the signal display from a combinator): Screenshot 2024-11-23 at 16.59.28.png How do I get the quality overlay for a ...
- Sat Nov 23, 2024 7:16 pm
- Forum: Modding discussion
- Topic: on_gui_confirmed for textfields - works or does not?
- Replies: 2
- Views: 198
Re: on_gui_confirmed for textfields - works or does not?
Hi,
Thanks for the quick answer! What I am looking at is a textfield and I can't seem to receive the event when return is pressed. That is my confusion. There is no text-box anywhere.
Thanks for the quick answer! What I am looking at is a textfield and I can't seem to receive the event when return is pressed. That is my confusion. There is no text-box anywhere.
- Sat Nov 23, 2024 8:04 am
- Forum: Modding discussion
- Topic: on_gui_confirmed for textfields - works or does not?
- Replies: 2
- Views: 198
on_gui_confirmed for textfields - works or does not?
I have seen https://forums.factorio.com/viewtopic.php?t=73372 , which states "on_gui_confirmed can't work with text boxes because enter is already reserved for adding newlines to the text box." However, there is https://lua-api.factorio.com/latest/events.html#on_gui_confirmed , which liter...
- Fri Nov 22, 2024 5:28 pm
- Forum: Technical Help
- Topic: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)
- Replies: 123
- Views: 11007
Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)
Let me chime in as well.
THANK YOU, @posila for all your hard work!
2.0.21 is a very noticeable improvement, at this point the game feels as fluent as 1.1.
THANK YOU, @posila for all your hard work!
2.0.21 is a very noticeable improvement, at this point the game feels as fluent as 1.1.
- Fri Nov 22, 2024 5:59 am
- Forum: Minor issues
- Topic: [Rseding91] [2.0.7] Cannot create LogisticFilter with non-zero value
- Replies: 3
- Views: 349
Re: [Rseding91] [2.0.7] Cannot create LogisticFilter with non-zero value
While this ended up in "minor issues", it is a pain in the neck to remember to add quality = 'normal' to any signal assigned to a constant combinator in a mod. Lots of older mods break because they never bothered with quality before. Any change to make LuaLogisticSection::set_slot use &quo...
- Thu Nov 21, 2024 9:18 pm
- Forum: Implemented mod requests
- Topic: Have a can_place_entity on LuaEntity itself
- Replies: 6
- Views: 950
Re: Have a can_place_entity on LuaEntity itself
I've added build_check_type to LuaControl::teleport for the next release. It will allow you to simply call teleport(...) and it will fail the teleport if the build check type fails at the destination. It automatically ignores itself for collision checks so moving half a tile to a direction won't fa...
- Thu Nov 21, 2024 5:31 pm
- Forum: Technical Help
- Topic: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)
- Replies: 123
- Views: 11007
Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)
Hmm, I see, interesting. Thank you for the data. Do you guys expericence any negative effects when Vsync is off - specifically, do you see screen tearing? @hgschmie: what macOS version do you have? Hi, Sonoma (14.7). I don't see screen tearing but sometimes scrolling seems jerky but FPS/UPS stays s...
- Thu Nov 21, 2024 7:20 am
- Forum: Technical Help
- Topic: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)
- Replies: 123
- Views: 11007
Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)
All my problems on a MacBook Pro with M2Max go away when I turn off "Wait for Vsync". Render in native resolution, everything turned to max. FPS/UPS at 60/60, no problem. I turn "wait for vsync" back on, drops immediately to 30-40 FPS.
- Wed Nov 20, 2024 6:38 pm
- Forum: Implemented mod requests
- Topic: Have a can_place_entity on LuaEntity itself
- Replies: 6
- Views: 950
Re: Have a can_place_entity on LuaEntity itself
I've added build_check_type to LuaControl::teleport for the next release. It will allow you to simply call teleport(...) and it will fail the teleport if the build check type fails at the destination. It automatically ignores itself for collision checks so moving half a tile to a direction won't fa...
- Tue Nov 19, 2024 7:16 pm
- Forum: Implemented mod requests
- Topic: Have a can_place_entity on LuaEntity itself
- Replies: 6
- Views: 950
Re: Have a can_place_entity on LuaEntity itself
I think the exact details of the API will be left to the game developers. Adding an "entity=" attribute that would override/preset name, direction, position etc. would work as well. The docs for teleport state that "Only players, cars, and spidertrons can be teleported cross-surface.&...
- Mon Nov 18, 2024 7:45 pm
- Forum: Implemented mod requests
- Topic: Have a can_place_entity on LuaEntity itself
- Replies: 6
- Views: 950
Have a can_place_entity on LuaEntity itself
One of the really popular mods is Picker Dollies (and its spirtual successor Even Pickier Dollies for 2.0) which allows a player to move entities around instead of destroying and recreating. The mod works by teleporting an entity into a "safe space", then checking a target location whether...
- Mon Nov 18, 2024 6:35 pm
- Forum: Documentation Improvement Requests
- Topic: LuaSurface#can_place_entity : name is an EntityID
- Replies: 0
- Views: 77
LuaSurface#can_place_entity : name is an EntityID
In https://lua-api.factorio.com/latest/classes/LuaPlayer.html#can_place_entity, the `name` parameter is an EntityID For https://lua-api.factorio.com/latest/classes/LuaSurface.html#can_place_entity, `name` is documented as string. But it actually is an EntityID, one can pass an entity in there (ignor...