Diffuse soft X-ray line emission is commonly used to trace the thermal and chemical properties of the hot interstellar medium , as well as its content , in nearby galaxies . Although resonant line scattering complicates the interpretation of the emission , it also offers an opportunity to measure the kinematics of the medium . We have implemented a direct Monte Carlo simulation scheme that enables us to account for resonant scattering effect in the medium , in principle , with arbitrary spatial , thermal , chemical , and kinematic distributions . Here we apply this scheme via dimensionless calculation to an isothermal , chemically uniform , and spherically symmetric medium with a radial density distribution characterized by a \beta -model . This application simultaneously account for both optical depth-dependent spatial distortion and intensity change of the resonant line emission due to the scattering , consistent with previous calculations . We further apply the modeling scheme to the O VII and O VIII emission line complex observed in the XMM-Newton RGS spectrum of the M31 bulge . This modeling , though with various limitations due to its simplicity , shows that the resonant scattering could indeed account for much of the spatial distortion of the emission , as well as the relative strengths of the lines , especially the large forbidden to resonant line ratio of the O VII He \alpha triplet . We estimate the isotropic turbulence Mach number of the medium in M31 as \sim 0.17 for the first time and the line-emitting gas temperature as \sim 2.3 \times 10 ^ { 6 } K. We conclude that the resonant scattering may in general play an important role in shaping the soft X-ray spectra of diffuse hot gas in normal galaxies .