Search found 123 matches

by sdgmlj
Mon Apr 04, 2022 11:57 am
Forum: Modding help
Topic: LuaRecipePrototype.hidden_from_player_crafting
Replies: 7
Views: 333

Re: LuaRecipePrototype.hidden_from_player_crafting

The very next line is "hide_from_player_crafting". This is the name in the data stage, when it is writable. In the control stage it becomes "hidden_from_player_crafting", when it is read-only. https://wiki.factorio.com/Prototype/Recipe#hide_from_player_crafting My God, I finally...
by sdgmlj
Mon Apr 04, 2022 11:38 am
Forum: Modding help
Topic: LuaRecipePrototype.hidden_from_player_crafting
Replies: 7
Views: 333

Re: LuaRecipePrototype.hidden_from_player_crafting

robot256 wrote:
Mon Apr 04, 2022 11:28 am
You must set the recipe to be hidden when the prototype is defined in the Data stage. It cannot be changed at runtime.

https://wiki.factorio.com/Prototype/Recipe
If I set hidden = true, it will not be displayed in the machine. I just want to hide it from the player, and the machine can choose
by sdgmlj
Mon Apr 04, 2022 11:18 am
Forum: Modding help
Topic: LuaRecipePrototype.hidden_from_player_crafting
Replies: 7
Views: 333

Re: LuaRecipePrototype.hidden_from_player_crafting

How can I hide it?
by sdgmlj
Mon Apr 04, 2022 10:28 am
Forum: Modding help
Topic: I want "electric furnace" to manually select the recipe
Replies: 3
Views: 202

Re: I want "electric furnace" to manually select the recipe

I want "electric furnace" to manually select the formula like an assembly machine. Where should I modify it? thank you Just create the assembling machine with furnace's recipe category "smelting". https://wiki.factorio.com/Prototype/RecipeCategory https://wiki.factorio.com/Data....
by sdgmlj
Mon Apr 04, 2022 10:01 am
Forum: Modding help
Topic: I want "electric furnace" to manually select the recipe
Replies: 3
Views: 202

I want "electric furnace" to manually select the recipe

I want "electric furnace" to manually select the formula like an assembly machine. Where should I modify it?
thank you
by sdgmlj
Sun Apr 03, 2022 2:41 am
Forum: Modding help
Topic: Can you realize the dynamic conversion of formula
Replies: 4
Views: 400

Re: Can you realize the dynamic conversion of formula

No, not with a recipe. But you can do it with a unique furnace for each output. data:extend{ { type = "recipe-category", name = "transformation-iron-ore", }, { type = "recipe-category", name = "transformation-copper-ore", }, { type = "recipe", name ...
by sdgmlj
Sun Apr 03, 2022 12:34 am
Forum: Modding help
Topic: Can you realize the dynamic conversion of formula
Replies: 4
Views: 400

Can you realize the dynamic conversion of formula

I want to realize the mutual conversion between minerals without adding intermediate items. My idea is as follows: After I manually select the output items, the input raw materials are variable, and I may not be able to express them clearly. Use the following script to give an example: data:extend( ...
by sdgmlj
Wed Mar 30, 2022 11:15 am
Forum: Modding help
Topic: Which file is the GUI setting of the "linked chest" in?
Replies: 3
Views: 292

Re: Which file is the GUI setting of the "linked chest" in?

Mods generally can't modify core vanilla GUIs outside of the entity API properties that govern the GUI. Mods can add sidebars to a particular entity GUI, or instantly close the entity GUI and open a separate mod GUI in its place. thank you In fact, I just want to find the original script, see how i...
by sdgmlj
Tue Mar 29, 2022 1:01 pm
Forum: Modding help
Topic: Which file is the GUI setting of the "linked chest" in?
Replies: 3
Views: 292

Which file is the GUI setting of the "linked chest" in?

I want to modify the GUI of "linked chest", but I haven't found the file. Where is it?
by sdgmlj
Mon Mar 21, 2022 1:22 pm
Forum: Outdated/Not implemented
Topic: Can the limit of maximum 64 connection distance of poles be lifted
Replies: 30
Views: 1848

Re: It is suggested to change the maximum connection distance limit of electric poles to 128

Now it's 2022. Most people's computer configuration is very high. We can't measure the game by the standards of a few years ago. It's time to relax the restrictions appropriately :D :D :D
by sdgmlj
Mon Mar 21, 2022 1:09 pm
Forum: Outdated/Not implemented
Topic: Can the limit of maximum 64 connection distance of poles be lifted
Replies: 30
Views: 1848

It is suggested to change the maximum connection distance limit of electric poles to 128

Normally, "maximum_wire_distance" should be twice as much as "supply_area_distance" (maximum_wire_distance = supply_area_distance * 2), because if both values are set to 64, half of the areas will overlap.

Sorry to bring up the old story again, because I just don't like poles
by sdgmlj
Sun Mar 20, 2022 10:46 am
Forum: Modding help
Topic: After the administrator changes a setting, how to make it effective for everyone immediately?
Replies: 5
Views: 690

Re: After the administrator changes a setting, how to make it effective for everyone immediately?

No one to help? This is very important to me. I have solved the first problem. I want to test whether the current game is a "stand-alone game" or a "multiplayer game". Who can tell me? Thank you https://lua-api.factorio.com/next/LuaGameScript.html#LuaGameScript.is_multiplayer sh...
by sdgmlj
Sun Mar 20, 2022 10:46 am
Forum: Modding help
Topic: After the administrator changes a setting, how to make it effective for everyone immediately?
Replies: 5
Views: 690

Re: After the administrator changes a setting, how to make it effective for everyone immediately?

script.on_event(defines.events.on_runtime_mod_setting_changed, function(event) if event.setting ~= "running_speed_modifier" then return end for _, player in pairs(game.players) do player.character_running_speed_modifier = settings.global["running_speed_modifier"].value end end) ...
by sdgmlj
Sun Mar 20, 2022 8:08 am
Forum: Modding help
Topic: After the administrator changes a setting, how to make it effective for everyone immediately?
Replies: 5
Views: 690

Re: After the administrator changes a setting, how to make it effective for everyone immediately?

No one to help? This is very important to me. I have solved the first problem. I want to test whether the current game is a "stand-alone game" or a "multiplayer game". Who can tell me? Thank you
by sdgmlj
Sun Mar 20, 2022 1:03 am
Forum: Modding help
Topic: After the administrator changes a setting, how to make it effective for everyone immediately?
Replies: 5
Views: 690

After the administrator changes a setting, how to make it effective for everyone immediately?

My script is written like this: script.on_event(defines.events.on_runtime_mod_setting_changed, function(event) local player = game.players[event.player_index] layer.character_running_speed_modifier = settings.global["running_speed_modifier"].value end) But I found that after the modificati...
by sdgmlj
Sat Mar 19, 2022 6:18 am
Forum: Modding help
Topic: How can I get the zoom ratio of the current screen?
Replies: 3
Views: 443

Re: How can I get the zoom ratio of the current screen?

I want to add a screen zoom function, but it seems that "player. Zoom" only supports writing, but does not support reading. Is there a way to obtain the current zoom ratio? Because only in this way can smooth scaling be achieved I've tried to record with variables, but if the player adjus...
by sdgmlj
Fri Mar 18, 2022 12:14 pm
Forum: Modding help
Topic: How can I get the zoom ratio of the current screen?
Replies: 3
Views: 443

How can I get the zoom ratio of the current screen?

I want to add a screen zoom function, but it seems that "player. Zoom" only supports writing, but does not support reading. Is there a way to obtain the current zoom ratio? Because only in this way can smooth scaling be achieved I've tried to record with variables, but if the player adjust...
by sdgmlj
Thu Mar 17, 2022 5:24 pm
Forum: Modding help
Topic: Help, game error - no character
Replies: 23
Views: 1259

Re: Help, game error - no character

function character_init(event) local player = game.players[event.player_index] if player.character then player.character_running_speed_modifier = running_speed_modifier ......... end end Seems like you can keep it as simple as this: remote.add_interface("your_interface_name", { on_charact...
by sdgmlj
Thu Mar 17, 2022 3:16 pm
Forum: Modding help
Topic: Help, game error - no character
Replies: 23
Views: 1259

Re: Help, game error - no character

function character_init(event)
local player = game.players[event.player_index]

if player.character then
player.character_running_speed_modifier = running_speed_modifier
.........
end
end
by sdgmlj
Thu Mar 17, 2022 3:13 pm
Forum: Modding help
Topic: Help, game error - no character
Replies: 23
Views: 1259

Re: Help, game error - no character

When using "jetpack" of "Se", the bonus of some character attributes will disappear. What is the way to reload my configuration when using "jetpack" and what script should be added? Your bonuses will disappear because the character will disappear. Jetpack can't magical...

Go to advanced search