Page 1 of 1

[2.0.28] Spoiled item result doesn't trigger reseach progression

Posted: Wed Jan 08, 2025 3:07 am
by ldinc
1. What did I do?

I've added to technology craft item trigger with item "steel-plate". With some mod-set (will be linked with file) "steel-plate" can be obtained only via spolage process from "hot-steel-plate" item.

Steps:
1) Load save (save/report_save.zip). Mods version must be locked (required for reproduction provided with file (mods/...).
2) Check technology "steam-power". It has item-craft research trigger "steel-plate" x 50.
3) On the surface created simple setup to produce with infinite chests and pipe "hot-steel-plate".
4) Wait some time to craft some "hot-steel-plate" and it's spoilage result.

2. What happened?

The technology "steam-power" doesn't triggered and doesn't change progress by spoiled "steel-plate".

3. What did I expect to happen instead?

The technology "steam-power" triggered and progress has to increment by spoiled "steel-plate".

4. Does it happen always, once, or sometimes?

Always.

The linked folder with save and mod set for reproducing behavior: https://drive.google.com/drive/folders/ ... drive_link

Re: [2.0.28] Spoiled item result doesn't trigger reseach progression

Posted: Wed Jan 08, 2025 3:10 am
by ldinc
Adding spoilage as trigger for research progression mb can lead to perfomance issues ... If it's not a bug, but a feature it will be great to have a notice in docs =)

Re: [2.0.28] Spoiled item result doesn't trigger reseach progression

Posted: Wed Jan 08, 2025 9:54 am
by boskid
You are bending a definition of what a "craft-item" means. Items produced by spoiling are not crafted, they are spoiled. I will consider this a Not a bug.

To be slightly more technical about this, "craft-item" research trigger uses item production statistics to see how many items were produced. Spoiling does not put items in consumed (for the original item) and it does not put it in produced (for the new item). For this to be even more tricky, if an item spoiling would be supposed to register inside of item production statistics, the item itself would have to know to which force it belongs to so it registers as produced under the correct force's item production statistics. Items themselves do not belong to any force so the only chance would be to learn the force from the owner entity, but this is also not guaranteed to give any meaningful results: an item on ground is an item held by an ItemEntity which does not have force assigned, it can be collected by players of any force and as such if an item on ground spoils, it has literally no clues about which force it belongs to.

Not a bug.

Re: [2.0.28] Spoiled item result doesn't trigger reseach progression

Posted: Wed Jan 08, 2025 1:15 pm
by ldinc
Many thanks for detailed explanation!