Hmm, this doesn't appear to work after all. Here's my custom criterium:
Code:::Criteria:: if scan.TerraformState and Scan.PlanetClass and scan.TerraformState == 'Terraformable' then return true, 'Terraformable ' .. scan.PlanetClass, scan.PlanetClass end ::End::
When I start Observatory Core, it logs the following error and stops processing custom criteria:
Code:[2024/05/08 17:25:12] Error encountered in Elite Observatory from plugin Explorer while processing custom criteria 'Criteria0' on scan: { "timestamp":"2019-03-24T17:56:02Z", "event":"Scan", "ScanType":"AutoScan", "BodyName":"Hepa 2", "BodyID":8, "Parents":[ {"Star":0} ], "DistanceFromArrivalLS":388.145691, "TidalLock":false, "TerraformState":"", "PlanetClass":"Sudarsky class I gas giant", "Atmosphere":"", "AtmosphereComposition":[ { "Name":"Hydrogen", "Percent":69.190788 }, { "Name":"Helium", "Percent":30.809208 } ], "Volcanism":"", "MassEM":7.705753, "Radius":25729286.000000, "SurfaceGravity":4.639476, "SurfaceTemperature":21.134399, "SurfacePressure":0.000000, "Landable":false, "SemiMajorAxis":116363403264.000000, "Eccentricity":0.000009, "OrbitalInclination":0.146388, "Periapsis":330.440338, "OrbitalPeriod":70189312.000000, "RotationPeriod":102962.531250, "AxialTilt":-0.262425, "Rings":[ { "Name":"Hepa 2 A Ring", "RingClass":"eRingClass_Icy", "MassMT":7.9732e+10, "InnerRad":4.6691e+07, "OuterRad":6.8762e+07 } ], "ReserveLevel":"CommonResources" } NOTE: Custom criteria processing has been disabled to prevent further errors. Exception message: [string "chunk"]:2: attempt to index a nil value (global 'Scan') Stack trace: at NLua.Lua.ThrowExceptionFromError(Int32 oldTop) at NLua.Lua.CallFunction(Object function, Object[] args, Type[] returnTypes) at Observatory.Explorer.CustomCriteriaManager.CheckInterest(Scan scan, Dictionary`2 scanHistory, Dictionary`2 signalHistory, ExplorerSettings settings)
Could be a helium-rich gas giant triggering this, not sure, just guessing by it's >30% helium content in the atmosphere.
Missed that there's a capital S in there

Try:
Code:
::Criteria::
if scan.TerraformState and scan.PlanetClass and scan.TerraformState == 'Terraformable' then
return true, 'Terraformable ' .. scan.PlanetClass, scan.PlanetClass
end
::End::
You'll need to re-enable the Custom Criteria option in Explorer settings.