Policy Function Order

Hi,
I am aware that policy and transition functions are stores in oo_.dr.ghx and oo.dr.ghu. However, the coefficients order (I mean, which number corresponds to which state) is confusing and is presented in a different manner than what appears in dynare’s output when running the mod file.
I can see that the coefficients are the same, but when I have two columns/lines with zeros on it, I don’t know which variable that column/line is referring to. Is it always kept fix? How can I discover the ordering of states that Dynare uses? This is important for me since I may want to run loops and etc with dynare simulations in it, extracting policy functions and etc…
Thanks.

The ordering of decision rules is explained in the manual.