Section 52. In the case of land entered upon under section fifty-one for an encampment or other substantial occupancy, the owner thereof shall receive damages in the nature of compensation for the use of the land and for any injury to the same resulting from such occupancy; and in the case of land so entered upon or passed over in the course of maneuvers, field exercises, or any similar transient purposes, the owner shall receive damages for any injury to the same resulting from such entry, but shall not be entitled to compensation for the use of the land. The amount of damages to be paid by the commonwealth under this section shall be as agreed upon by the owner of the land with an officer or board of officers appointed by the commander-in-chief to adjust the claim; provided, that if the parties are unable to agree, the damages shall be assessed under chapter seventy-nine.