Search found 40 matches

by Xeon257
Sun Nov 09, 2025 2:12 pm
Forum: Modding help
Topic: How to create a new combinator?
Replies: 3
Views: 269

How to create a new combinator?

I want to create a combinator that represents sine and cosine functions.

Is there a better way to build a machine that performs this kind of circuit processing, other than using the tick event?

And to implement this, do I have to keep track of every combinator entity and run a loop on each tick?
by Xeon257
Sun Oct 26, 2025 3:43 pm
Forum: Modding help
Topic: I don’t understand why it’s causing such severe lag.
Replies: 2
Views: 350

Re: I don’t understand why it’s causing such severe lag.

That’s correct. However, in the early stages of development, when I attempted to land on the lava, the landing was successful, and the player was placed in a state where they couldn’t move on the lava.

Could it be that the forced landing being successful was actually a Error?
by Xeon257
Sun Oct 26, 2025 3:28 pm
Forum: Modding help
Topic: I don’t understand why it’s causing such severe lag.
Replies: 2
Views: 350

I don’t understand why it’s causing such severe lag.

There’s an issue during the process where the player departs from the spaceship and descends to the planet’s surface. When the player departs and the cargo pod begins to descend, the framerate drops sharply and the game stops progressing.

10-27-2025, 00-20-24.png


local function create_building ...
by Xeon257
Sun Oct 26, 2025 11:57 am
Forum: Modding help
Topic: Why isn’t this event handler working?
Replies: 3
Views: 346

Re: Why isn’t this event handler working?

I’ve been studying the syntax, and it seems that Lua doesn’t have a separate function forward declaration syntax, or it was added only much later. For now, I’ve confirmed that it works when written as shown below.


local on_elevator;

script.on_event(defines.events.on_lua_shortcut, function(event ...
by Xeon257
Sat Oct 25, 2025 1:58 pm
Forum: Modding help
Topic: Why isn’t this event handler working?
Replies: 3
Views: 346

Why isn’t this event handler working?

(Before I start my questions, I’d like to mention that I’ve used C, C++, and some basic JavaScript, but I’m new to Lua through this modding project.)

For example, when I register an event handler as shown below, it seems that the handler is not being called.


local test_handler;

script.on_event ...
by Xeon257
Sat Oct 25, 2025 11:38 am
Forum: Ideas and Suggestions
Topic: Select current recipe when changing assembler recipe
Replies: 17
Views: 2445

Please make it so that the previous selection remains when choosing a recipe.

For example, when selecting a recipe in buildings like assemblers or chemical plants, there are times when I want to produce the same item but simply increase the quality setting.

Currently, when reselecting a recipe, all previous selection states are cleared. If the previous selection state could ...
by Xeon257
Fri Oct 24, 2025 10:35 am
Forum: Modding help
Topic: I want to right-align the label
Replies: 5
Views: 366

Re: I want to right-align the label

I’m also wondering if there’s a way to prevent the player from performing other actions while a GUI window is open. Currently, even when the window is displayed, the player can still move their character or open their inventory. Is it possible to make it behave like a modal dialog?
by Xeon257
Thu Oct 23, 2025 12:02 pm
Forum: Modding help
Topic: I want to right-align the label
Replies: 5
Views: 366

Re: I want to right-align the label

Ah, I solved it. It seems that the direction axis of the flow element needs to be set differently. When I set it to vertical, the horizontally_stretchable property works. Thank you for your answer.
by Xeon257
Thu Oct 23, 2025 11:54 am
Forum: Modding help
Topic: I want to right-align the label
Replies: 5
Views: 366

Re: I want to right-align the label

It still doesn’t seem to work. Could the order in which styles are applied have an effect?
by Xeon257
Thu Oct 23, 2025 10:08 am
Forum: Modding help
Topic: I want to right-align the label
Replies: 5
Views: 366

I want to right-align the label

Hello. I am designing a dialog box like the one below.

10-23-2025, 19-03-53.png

The goal is to right-align the yellow text in this window.

First, I created the text portion of the window using a table, as shown below.


dialog.create = function(name, sprite, player)
if player.gui.screen["ui ...
by Xeon257
Wed Oct 22, 2025 1:18 pm
Forum: Modding help
Topic: I want to attach an identifier that can uniquely identify a specific entity.
Replies: 1
Views: 153

I want to attach an identifier that can uniquely identify a specific entity.

Hello. I’d like to summon a regular Spidertron at a specific location,

and trigger a certain event only when this particular Spidertron is clicked.

Is there any way to distinguish it from other Spidertrons?
by Xeon257
Sun Oct 19, 2025 8:47 am
Forum: Modding help
Topic: Is there no separate event for entity clicks?
Replies: 2
Views: 243

Is there no separate event for entity clicks?

I’m trying to make an NPC dialogue window appear when a certain entity is clicked. However, it seems there’s no specific event for entity clicks. Is there any good way to achieve this?
by Xeon257
Sat Oct 18, 2025 12:44 pm
Forum: Modding help
Topic: How can I move the position of a player who is not connected?
Replies: 1
Views: 146

How can I move the position of a player who is not connected?

It seems that players who are not connected don’t have a character, so I’m not sure how to control their position and surface for when they later connect.
by Xeon257
Mon Oct 13, 2025 6:49 pm
Forum: Resolved Requests
Topic: Please clarify what can be stored in dictionary objects
Replies: 8
Views: 584

Re: Please clarify what can be stored in dictionary objects

I understand now — I was asking for something that obviously wouldn’t be included in the documentation. That was my mistake! Thank you very much for taking the time to explain it in detail.
by Xeon257
Mon Oct 13, 2025 6:07 pm
Forum: Resolved Requests
Topic: Please clarify what can be stored in dictionary objects
Replies: 8
Views: 584

Re: Please clarify what can be stored in dictionary objects

Ah… to summarize,

1. The API documentation is mostly auto-generated. Because of this, the system can’t fully track which keys a specific dictionary can contain or how they’re used.

2. The API itself is written to be neutral — even for vanilla — so it’s more accurate to look at the vanilla source ...
by Xeon257
Mon Oct 13, 2025 10:46 am
Forum: Modding help
Topic: [2.0.69] map_gen_settings width height not work
Replies: 4
Views: 339

Re: [2.0.69] map_gen_settings width height not work

Ah, it seems that the user-defined map settings are being overwritten by the Lua object, which makes it look like they aren’t working. Thank you for the clarification!
by Xeon257
Mon Oct 13, 2025 10:37 am
Forum: Resolved Requests
Topic: Please clarify what can be stored in dictionary objects
Replies: 8
Views: 584

Re: Please clarify what can be stored in dictionary objects

For example, the dictionary I mentioned above actually contains the following values when checked in-game.

10-13-2025, 19-34-41.png

I'm not sure where specific valid entries such as day-night-cycle, magnetic-field, solar-power, pressure, and gravity are documented in the API. Also, when looking ...
by Xeon257
Sun Oct 12, 2025 11:22 am
Forum: Modding help
Topic: [2.0.69] map_gen_settings width height not work
Replies: 4
Views: 339

Re: [2.0.69] map_gen_settings width height not work

Ah, thank you very much for your answer. Could you explain why the above variables can only be set at runtime? If this is intentional, I would also be curious to know the reasoning behind it.
by Xeon257
Sun Oct 12, 2025 9:53 am
Forum: Modding help
Topic: [2.0.69] map_gen_settings width height not work
Replies: 4
Views: 339

[2.0.69] map_gen_settings width height not work

I am not able to write in English myself, so I am using ChatGPT for help. Please excuse any awkward phrasing.

I’m trying to limit the size of a planetary surface that I’m developing.

To do this, I set the width and height values in the planet’s map_gen_settings.
However, when I check in-game, it ...
by Xeon257
Sun Oct 12, 2025 9:07 am
Forum: Resolved Requests
Topic: Please clarify what can be stored in dictionary objects
Replies: 8
Views: 584

Please clarify what can be stored in dictionary objects

For example, in the case of LuaSurfacePrototype’s surface_properties, I couldn’t find anywhere what values are allowed. I only figured out what can be applied after looking through vanilla data and other mods.

Similarly, there seem to be many other dictionary objects where the valid inputs are not ...

Go to advanced search