  Working over various graded Lie algebras and in arbitrary dimension, we
express scattering diagrams and theta functions in terms of counts of tropical
curves/disks, weighted by multiplicities given in terms of iterated Lie
brackets. Over the tropical vertex group, our tropical curve counts are known
to give certain descendant log Gromov-Witten invariants. Working over the
quantum torus algebra yields theta functions for quantum cluster varieties, and
our tropical description sets up for geometric interpretations of these. As an
immediate application, we prove the quantum Frobenius conjecture of Fock and
Goncharov. We also prove a refined version of the Carl-Pumperla-Siebert result
on consistency of theta functions, and we prove the non-degeneracy of the
trace-pairing for the Gross-Hacking-Keel Frobenius structure conjecture.
