Galaxy evolution in cosmological simulations with outflows - II. Metallicities and gas fractions | Synapse