Hiding custom prototypes from alt-/detail-view.

Post Reply
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Hiding custom prototypes from alt-/detail-view.

Post by eradicator »

What?
The ability to make any abitrary prototype not show any info like current recipe, contained items/modules, etc, when the player hits the "ALT" key.
Whaat?
(My) mods often use invisible entities like chests, assemblers, inserters etc to implement custom unique functionality. The problem is that even tho the entity itself is not visible or selectable, its detailed view will still show up and confuse the player. In some cases this can be circumvented by placing the invisible entities in a non-player force, but often times it is required that the invisble entity is on the same force as the player (e.g. built-in logistic chests content, beacon modules, inserter and fluid box indicator arrows). So it would be nice to have the ability to mark a prototype to never show that info. This might be as simple as adding an entry to the flags = {"not-on-details-view"}. (Hopefully this would only affect render performance slightly and UPS negligibly...)
TL;DR
Add a {"not-on-details-view"} flag to hide prototypes from alt-view. Pretty please. :mrgreen:
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Shia
Burner Inserter
Burner Inserter
Posts: 18
Joined: Mon Oct 23, 2017 10:11 pm
Contact:

Re: Hiding custom prototypes from alt-/detail-view.

Post by Shia »

I strictly support this.

Also this is some kind of answer to my question viewtopic.php?f=25&t=53997 :(

Angamara
Inserter
Inserter
Posts: 39
Joined: Mon Oct 30, 2017 3:52 pm
Contact:

Re: Hiding custom prototypes from alt-/detail-view.

Post by Angamara »

A new invisible entity totally customizable for mods that has no details and that allows the same thing as the current entities would not it be more judicious?

The quality of the mod creators is that they use the system to do things for not originally planned.

In the majority of IT projects, adding patches to bypass the system has often had a negative effect on the long run. I think but after you do what you want, starting to create systems that have their own use and use for what it's supposed to do is a much better idea.

For the example :
{{not-on-details-view}} could be used on visible elements and could confuse the player as well.

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

Re: Hiding custom prototypes from alt-/detail-view.

Post by Rseding91 »

Angamara wrote:A new invisible entity totally customizable for mods that has no details and that allows the same thing as the current entities would not it be more judicious?
Such an entity is not possible within the system that is Factorios game engine.

Any entity that has any logic must explicitly be coded to support it on the C++ side. You can't piece-meal an entity together with logic from different entities because it simply doesn't work that way.
If you want to get ahold of me I'm almost always on Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Hiding custom prototypes from alt-/detail-view.

Post by eradicator »

@Rseding91:
Well, so how realistic is my flag proposal? If you're already answering ;P.
On a scale from "I'm gonna do this during lunchbreak" to "performance would drop through the floor and fall into the seweres".
Last edited by eradicator on Tue Nov 21, 2017 11:08 pm, edited 1 time in total.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

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

Re: Hiding custom prototypes from alt-/detail-view.

Post by Rseding91 »

eradicator wrote:@Rseding91:
Well, so how realistic is my flag proposal? If you're already answering ;P.
I'm planning on doing it. I'm just busy at the moment.
If you want to get ahold of me I'm almost always on Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Hiding custom prototypes from alt-/detail-view.

Post by eradicator »

Oh great. That's all i wanted to hear :D
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Hiding custom prototypes from alt-/detail-view.

Post by eradicator »

This is now marked as "implemented" so what is the flag called? :D
(Also having a list of all possible flags, even without description, on the API doc would be immensely helpful...)

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

Re: Hiding custom prototypes from alt-/detail-view.

Post by Rseding91 »

eradicator wrote:This is now marked as "implemented" so what is the flag called? :D
(Also having a list of all possible flags, even without description, on the API doc would be immensely helpful...)
http://lua-api.factorio.com/latest/LuaE ... e.has_flag
If you want to get ahold of me I'm almost always on Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Hiding custom prototypes from alt-/detail-view.

Post by eradicator »

Hrng. PEBKAC. I thougth i looked through all the has_flag() pages, but apparently i missed the prototype one. Thanks.

Post Reply

Return to “Implemented mod requests”