Add LuaControl::open_factoriopedia_gui(prototype?)

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
sfyb
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Jan 17, 2023 12:04 pm
Contact:

Add LuaControl::open_factoriopedia_gui(prototype?)

Post by sfyb »

The mod I've been working on Factorio Codex gives players access to something similar to Satisfactory's quick search. Before the 2.0 update, I displayed information about items/fluids in my own GUI, but since Factoriopedia was added, I want to open that instead. However, Factoriopedia seems to be a black spot in the Factorio modding API.

Therefore I request a function similar to

Code: Select all

LuaControl::open_technology_gui(technology?)
in order to open Factoriopedia and display a specific Prototype. It would be great if anything that Factoriopedia can display could also be used in the API call to open it.

To implement this with minimal changes to the API (as far as I can tell) I would suggest following signature:

Code: Select all

LuaControl::open_factoriopedia_gui(prototype?)
where prototype can uniquely identify any prototype displayable in Factoriopedia (something like LuaPrototypeBase::name).
zerwiport
Inserter
Inserter
Posts: 34
Joined: Sat Mar 09, 2024 11:03 pm
Contact:

Re: Add LuaControl::open_factoriopedia_gui(prototype?)

Post by zerwiport »

+1
User avatar
PennyJim
Fast Inserter
Fast Inserter
Posts: 104
Joined: Wed Jan 18, 2023 3:49 am
Contact:

Re: Add LuaControl::open_factoriopedia_gui(prototype?)

Post by PennyJim »

+1 Could be combined with a CustomInput bound to the open factoriopedia keybind to do some complex factoriopedia behavior.

I don't have any particular needs, but I do have ideas.
Like if you're reusing a common entity in a compound entity you can choose to open the entity that represents *that* compound entity instead of the useless page for the common entity.

I fear the repeated use of "entity" makes that less then intelligible, but the initial statement stands on its own I think.
Post Reply

Return to “Modding interface requests”