TechnologyPrototypeFilters for researched/not researched

Place to get help with not working mods / modding interface.
Post Reply
ixu
Fast Inserter
Fast Inserter
Posts: 105
Joined: Sun May 29, 2016 6:18 pm
Contact:

TechnologyPrototypeFilters for researched/not researched

Post by ixu »

I want to build a GUI where a technology can be selected. I tried to use the "choose-elem-button". But I cannot find how to filter researched or not researched technologies. The documentation seems to accept only a few options, but I want to have more.
https://lua-api.factorio.com/latest/Con ... ypeFilters
Or do I misunderstand the things here. Or are there other options (except programming it by myself). Utility-mods are also welcome.
Mods: ingteb, ixuClock, ixuAutoSave, NoCheating, hardCrafting (Maintainer) and more
Desperately tried to implement redo :)

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: TechnologyPrototypeFilters for researched/not researched

Post by darkfrei »

ixu wrote:
Mon May 25, 2020 2:58 pm
I want to build a GUI where a technology can be selected. I tried to use the "choose-elem-button". But I cannot find how to filter researched or not researched technologies.
See LuaForce
https://lua-api.factorio.com/latest/LuaForce.html
https://lua-api.factorio.com/latest/Lua ... chnologies #LuaForce.technologies

ixu
Fast Inserter
Fast Inserter
Posts: 105
Joined: Sun May 29, 2016 6:18 pm
Contact:

Re: TechnologyPrototypeFilters for researched/not researched

Post by ixu »

I don't got your point.
Here you see a code sample:

Code: Select all

local button = frame.add {
	type = 'choose-elem-button',
	name = "Technology",
	elem_type = "technology",
	elem_filters = filter,
}
Would you mind changing this so that the selection panel will show only researched technologies?
Mods: ingteb, ixuClock, ixuAutoSave, NoCheating, hardCrafting (Maintainer) and more
Desperately tried to implement redo :)

Rseding91
Factorio Staff
Factorio Staff
Posts: 13250
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: TechnologyPrototypeFilters for researched/not researched

Post by Rseding91 »

It's not possible. That button type does not work with technologies but technology prototypes. It's force-less and just shows 'technology prototypes'.
If you want to get ahold of me I'm almost always on Discord.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: TechnologyPrototypeFilters for researched/not researched

Post by darkfrei »

ixu wrote:
Tue May 26, 2020 11:16 pm
Would you mind changing this so that the selection panel will show only researched technologies?
Researched technologies by some force, but not the whole game.
If you add new force, it has no researched technologies, but the first force keeps the same researched technologies.

https://lua-api.factorio.com/latest/Lua ... eate_force #LuaGameScript.create_force

You can always make new force (up to 64 forces) and switch your force with:

Code: Select all

/c game.player.force = game.create_force("new_force")

Post Reply

Return to “Modding help”