Search found 257 matches

by Osmo
Sat Mar 28, 2026 11:22 am
Forum: Modding help
Topic: How to achieve volume slider
Replies: 5
Views: 436

Re: How to achieve volume slider


You can, you can hook on_gui_opened so it instead does whatever you want under any conditions you want, the end of that thread is where we arrived at the way we liked, adapting that looks easy.

This doesn't work for mod settings, settings menu is not a gui you can interact with in control stage ...
by Osmo
Fri Mar 27, 2026 12:03 pm
Forum: Modding help
Topic: How to achieve volume slider
Replies: 5
Views: 436

Re: How to achieve volume slider

You cannot.
by Osmo
Thu Mar 19, 2026 9:10 pm
Forum: Not a bug
Topic: [2.0.76] ElectricEnergyInterface entity status is always ok
Replies: 5
Views: 421

Re: [2.0.76] ElectricEnergyInterface entity status is always ok

You can also assign a custom status to the entity, when it is selected/opened by a player
by Osmo
Thu Mar 19, 2026 5:37 am
Forum: Minor issues
Topic: [2.0.76] line gui element stretchability doesn't persist across save-load cycle
Replies: 2
Views: 224

Re: [2.0.76] line gui element stretchability doesn't persist across save-load cycle

That makes sense. For my usecase it matters to be able to read default value, but i'll hack my way around that
by Osmo
Tue Mar 17, 2026 6:47 pm
Forum: Ideas and Requests For Mods
Topic: A way to temporarily freeze planet ticking?
Replies: 4
Views: 431

Re: A way to temporarily freeze planet ticking?

Doesn't seem like that's possible. You could find all entities on the surface and disable them with https://lua-api.factorio.com/latest/classes/LuaEntity.html#disabled_by_script which would handle most of the cases. Pollution would still dissipate naturally, but you can save the values, clear ...
by Osmo
Tue Mar 17, 2026 1:16 pm
Forum: Ideas and Suggestions
Topic: Craft [X] trigger technology should say Produce [X] instead
Replies: 0
Views: 140

Craft [X] trigger technology should say Produce [X] instead

"Craft" here is incorrect terminology since it counts not just crafting, but also mining and offshore pump. This is fine in vanilla (though plates are smelted, not crafted, so it'd be more correct as well), but can be worse with mods, if another means of production is intended. "Produce" works for ...
by Osmo
Tue Mar 17, 2026 12:35 pm
Forum: Minor issues
Topic: [2.0.76] line gui element stretchability doesn't persist across save-load cycle
Replies: 2
Views: 224

[2.0.76] line gui element stretchability doesn't persist across save-load cycle

Creating a new line gui element for some reason sets horizontally_stretchable on its style to true. This is probably relevant, though technically not a bug, but i don't see a good reason why this isn't just a property on the default style instead of what seems like an in-engine exception, given it ...
by Osmo
Mon Mar 16, 2026 6:30 am
Forum: Implemented mod requests
Topic: Have CustomInput respect the hidden property
Replies: 5
Views: 674

Re: Have CustomInput respect the hidden property

Playing py mods and noticing that it has a bunch of custom inputs that seem like are supposed to be hidden. Not sure what these are used for, and maybe some of them have an appropriate linked_game_control, but doesn't seem like that's the case for all of them. изображение.png
I also have a mod ...
by Osmo
Sun Mar 15, 2026 6:42 am
Forum: Documentation Improvement Requests
Topic: EventData "tick" field should be uint64 type
Replies: 4
Views: 415

Re: EventData "tick" field should be uint64 type


lua5.2 numbers are iee754 doubles, which can represent exact integers up to 53 bits.


The docs should still say it is uint64 regardless because that's what it is. And in fact, there's even a type MapTick which is a uint64, and it is documented on uint64 page that lua cannot represent it. Its ...
by Osmo
Sun Mar 15, 2026 2:58 am
Forum: Modding help
Topic: Problem with create_entity
Replies: 1
Views: 198

Re: Problem with create_entity

Didn't look much into your code, but if you just need an entity to not be minable, use this https://lua-api.factorio.com/latest/cla ... nable_flag
There is a lot of data entities have and copying all of it is just not viable
by Osmo
Sun Mar 15, 2026 2:42 am
Forum: Modding interface requests
Topic: [2.0.76] Allow any entity to fire on_gui_opened events
Replies: 2
Views: 272

Re: [2.0.76] Allow any entity to fire on_gui_opened events

+1, for some entities it is possible to use another prototype (with the side effects that they have), but for others its just a no. Generators, units, etc.
by Osmo
Fri Mar 13, 2026 6:39 pm
Forum: Modding help
Topic: Attach GUI to SimpleEntityWithOwner?
Replies: 2
Views: 251

Re: Attach GUI to SimpleEntityWithOwner?

That is correct, you don't get on_gui_opened event for entities that don't have a gui. You could detect it with a custom input event, but it will function incorrectly (triggers on click rather than on release (or the other way around)).
The simplest rotatable entities i could think of are: storage ...
by Osmo
Thu Mar 12, 2026 5:13 pm
Forum: Modding help
Topic: Putting vegetal decoration on Nauvis with cheats
Replies: 2
Views: 237

Re: Putting vegetal decoration on Nauvis with cheats

You can change map settings with the editor (/editor in chat). There's also a mod for that if you want to keep achievements. Then use https://mods.factorio.com/mod/regenerate-terrain
by Osmo
Thu Mar 12, 2026 5:10 pm
Forum: Modding help
Topic: How to change the background color in the GUI for logistics requests?
Replies: 4
Views: 222

Re: How to change the background color in the GUI for logistics requests?


Items that are not in the inventory are marked in a different color.
background color in the GUI.jpg
For me the contrast is not enough.
Is there any way to change the background color or change the brightness?


It part of the GUI style. You can see the name of the style by activating the gui ...
by Osmo
Sat Mar 07, 2026 1:13 am
Forum: Modding help
Topic: [unsolvable] How do I close the GUI by distance?
Replies: 7
Views: 841

Re: How do I close the GUI by distance?

You are adding 1 to dX and dY for some reason, which makes distance calculation wrong.
by Osmo
Fri Mar 06, 2026 2:47 am
Forum: Modding help
Topic: [unsolvable] How do I close the GUI by distance?
Replies: 7
Views: 841

Re: How do I close the GUI by distance?

I don't see what the issue is
by Osmo
Thu Mar 05, 2026 4:00 pm
Forum: Modding interface requests
Topic: Read if controls have keys bound to them in locale or in general
Replies: 1
Views: 164

Read if controls have keys bound to them in locale or in general

Some UI elements in base game have tooltips like this: изображение.png
If i unbind the control from the settings, it is displayed like this: изображение.png

I have a similar UI, but as far as i know, there is no way to read the state of keybinds, so the only option is to always show them via rich ...
by Osmo
Wed Mar 04, 2026 10:35 pm
Forum: Modding help
Topic: [unsolvable] How do I close the GUI by distance?
Replies: 7
Views: 841

Re: How do I close the GUI by distance?

I think reach_distance would be more appropriate (but its not documented what the differences are). If player.reach_distance doesn't return a value affected by bonuses, you can multiply it yourself by https://lua-api.factorio.com/latest/cla ... ance_bonus.
by Osmo
Tue Mar 03, 2026 8:49 pm
Forum: Mod portal Discussion
Topic: Short mod descriptions incorrectly show `...`
Replies: 2
Views: 576

Re: Short mod descriptions incorrectly show `...`

vinzenz wrote: Tue Mar 03, 2026 9:53 am IIRC this is a css bug with firefox. Which browser are you using?
Firefox... web stuff is cursed
by Osmo
Fri Feb 27, 2026 6:00 pm
Forum: Documentation Improvement Requests
Topic: selection_priority does not always default to 50
Replies: 2
Views: 295

Re: selection_priority does not always default to 50

entity-util.lua also says
editor_only = 20, -- entities not selectable by normal player (e.g. corpses, projectiles), but by editor in entity mode
It would be good if the treshold at which the entity becomes unselectable was documwnted as well

Go to advanced search