[2.0.69] Technologies with "scripted" research trigger "icons" field only read when "icon" field is defined.

Bugs which we just recently fixed in our development version and will reach you in the next release.
MeteorSwarm
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Sep 25, 2025 10:49 pm
Contact:

[2.0.69] Technologies with "scripted" research trigger "icons" field only read when "icon" field is defined.

Post by MeteorSwarm »

https://github.com/nicholasgower/planet ... ck.lua#L31

I have implemented 2.0.69's new "scripted" research trigger into Muluna's "Nanofoamed polymers" technology, and I've noticed that unless I set the "icon" field, Factorio will not read the "icons" field.

To reproduce:
1. Modify an existing technology to have a "scripted" research trigger. Give the trigger an "icons" field. It will not appear in game.
2. Give this research trigger an icon field, any icon. This will cause the icons field to appear as expected.
Attachments
factorio-current.log
(138.02 KiB) Downloaded 9 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4214
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.69] Technologies with "scripted" research trigger "icons" field only read when "icon" field is defined.

Post by boskid »

I see the problem, there is an unexpected check for "icon" in the script trigger that guards code for loading icon/icons. Given that `icons` take priority over `icon`, an obvious workaround is to provide both icon and icons knowing that icon will be ignored. For compatibility with other mods that may expect icon to be valid, its reasonable to use a valid icon as a placeholder. Most likely it was added because without it, an `icon`/`icons` would be mandatory (one of them would have to be given) and here it makes sense to allow script triggers without any icons.

For next release i extended this check to load icon if either "icon" or "icons" is present which should fix the issue.
Post Reply

Return to “Resolved for the next release”