Ability to specify icon for 'nothing' technology effect?

Post Reply
User avatar
mrudat
Fast Inserter
Fast Inserter
Posts: 222
Joined: Fri Feb 16, 2018 5:21 am
Contact:

Ability to specify icon for 'nothing' technology effect?

Post by mrudat »

It would be nifty if it was possible to supply an icon for the 'nothing' technology effect, be that an `icons` parameter, a reference to some thing that has an icon, or perhaps something completely different.

As an example use-case, specifying that used-up uranium fuel cells become available upon unlocking the nuclear reactor.

User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Ability to specify icon for 'nothing' technology effect?

Post by Reika »

mrudat wrote:
Tue Jul 14, 2020 11:03 am
It would be nifty if it was possible to supply an icon for the 'nothing' technology effect, be that an `icons` parameter, a reference to some thing that has an icon, or perhaps something completely different.

As an example use-case, specifying that used-up uranium fuel cells become available upon unlocking the nuclear reactor.
This would be very nice.
Image

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

Re: Ability to specify icon for 'nothing' technology effect?

Post by Rseding91 »

Sorry, this isn't going to happen. I looked at implementing this when I added the 'nothing' effect but because effects on technologies aren't linked to any specific prototype (they are just a list of things on a technology prototype - and can have multiple identical ones with different icons) there's no way to take the runtime actual effect instant and know what lua definition it came from to draw the icon.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Ability to specify icon for 'nothing' technology effect?

Post by Reika »

Rseding91 wrote:
Sat Jul 18, 2020 2:46 pm
Sorry, this isn't going to happen. I looked at implementing this when I added the 'nothing' effect but because effects on technologies aren't linked to any specific prototype (they are just a list of things on a technology prototype - and can have multiple identical ones with different icons) there's no way to take the runtime actual effect instant and know what lua definition it came from to draw the icon.
What about something on the tech itself, then? Some kind of "effect icon override icon" or something?
Image

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

Re: Ability to specify icon for 'nothing' technology effect?

Post by Rseding91 »

Reika wrote:
Sun Jul 19, 2020 2:13 am
What about something on the tech itself, then? Some kind of "effect icon override icon" or something?
That might be possible. I'll look into it and see what limitations and benefits it could have.
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: Ability to specify icon for 'nothing' technology effect?

Post by eradicator »

Rseding91 wrote:
Sun Jul 19, 2020 4:09 pm
That might be possible. I'll look into it and see what limitations and benefits it could have.
Did that ever lead anywhere? At least for the addon maybe?

Now that the vanilla character boni have these nice (unmoddable?) icons, the red cross of the nothing modifier looks even more jarringly out of place.

effecticons.png
effecticons.png (38.32 KiB) Viewed 1851 times
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.

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Ability to specify icon for 'nothing' technology effect?

Post by Bilka »

eradicator wrote:
Tue Jun 08, 2021 3:26 pm
Rseding91 wrote:
Sun Jul 19, 2020 4:09 pm
That might be possible. I'll look into it and see what limitations and benefits it could have.
Did that ever lead anywhere? At least for the addon maybe?

Now that the vanilla character boni have these nice (unmoddable?) icons, the red cross of the nothing modifier looks even more jarringly out of place.
It should be possible to specify the icons via the modifier, see https://wiki.factorio.com/Types/ModifierPrototype which Types/NothingModifierPrototype inherits from.

As described on Types/ModifierPrototype, if infer_icon is false, the icons come from the utility sprites (so, they are moddable). They are listed at the bottom of https://wiki.factorio.com/Prototype/UtilitySprites.

So, assuming I didn't make a mistake when writing the docs... moving from "Won't implement" to "Implemented" :)
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

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

Re: Ability to specify icon for 'nothing' technology effect?

Post by eradicator »

Bilka wrote:
Tue Jun 08, 2021 3:47 pm
So, assuming I didn't make a mistake when writing the docs... moving from "Won't implement" to "Implemented" :)
Hah! You're too fast. I was just going to report back that it's actually implemented, but you already moved it! Nice to see another "that's never gonna happen" myth-busted :twisted:!

effecticons!.png
effecticons!.png (19.82 KiB) Viewed 1808 times
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.

Post Reply

Return to “Implemented mod requests”