X-ray production by imploding wire-array Z pinches is studied using radiation magnetohydrodynamics simulation. It is found that the density distribution created by ablating wire material influences both x-ray power production, and how the peak power scales with applied current. For a given array there is an optimum ablation rate that maximizes the peak x-ray power, and produces the strongest scaling of peak power with peak current. This work is consistent with trends in wire-array Z pinch x-ray power scaling experiments on the Z accelerator.