I believe this is usable, and you can decide how much of something is created when it spoils.
https://lua-api.factorio.com/latest/types/SpoilToTriggerResult.html
Right, but if you follow the chain calls, (SpoilToTriggerResult -> DirectTriggerItem -> InstantTriggerDelivery -> TriggerEffect), you arrive here. I can only do:
- CreateFireTriggerEffectItem
- CreateSmokeTriggerEffectItem
- CreateTrivialSmokeEffectItem
- CreateAsteroidChunkEffectItem
- CreateParticleTriggerEffectItem
- CreateStickerTriggerEffectItem
- CreateDecorativesTriggerEffectItem
I can't create items on the ground. A trigger effect for them doesn't exist. I COULD create items via runtime scripts (specifically via LuaSurface.spill_item_stack), but doing so on the kind of large scale you're envisioning is going to absolutely murder performance. Remember - you're asking for this stuff to cover the map, which means an unconscionable amount of items. I'm incredibly leery of using runtime scripts for anything this massive, let alone on_nth_tick events. Oi...
Might be able to do something with spawning decoratives, though. Probably not for the Grey Goo idea, but for the improved Gleba fuel. Maybe summon plants which explode when harvested, or else spawn more of themselves when harvested, etc. That COULD be a way to propagate bacteria via native code, although it wouldn't be passive.
To be perfectly honest, I think Grey Goo ought to be its own dedicated mod. It has fairly broad implications that I wouldn't want to go quite all the way with for a mod focused on vehicle fuels. I'm fine with Necrotising Bacteria being a growing nuisance that needs to be deliberately destroyed, but probably on a smaller scale than what you're envisioning.