The money will come through the state's Housing Trust Fund and Home Investment Partnerships Program to build and improve close to 250 affordable homes in Dillon, Bozeman, Billings and Laurel.