Make pilot&har name saving work in scoreboard, and add some common defines.