  We study topological phase transitions in discrete gauge theories in two
spatial dimensions induced by the formation of a Bose condensate. We analyse a
general class of euclidean lattice actions for these theories which contain one
coupling constant for each conjugacy class of the gauge group. To probe the
phase structure we use a complete set of open and closed anyonic string
operators. The open strings allow one to determine the particle content of the
condensate, whereas the closed strings enable us to determine the matrix
elements of the modular $S$-matrix, also in the broken phase. From the measured
broken $S$-matrix we may read off the sectors that split or get identified in
the broken phase, as well as the sectors that are confined. In this sense the
modular $S$-matrix can be employed as a matrix valued non-local order parameter
from which the low-energy effective theories that occur in different regions of
parameter space can be fully determined.
  To verify our predictions we studied a non-abelian anyon model based on the
quaternion group $H=\bar{D_2}$ of order eight by Monte Carlo simulation. We
probe part of the phase diagram for the pure gauge theory and find a variety of
phases with magnetic condensates leading to various forms of (partial)
confinement in complete agreement with the algebraic breaking analysis. Also
the order of various transitions is established.
