How does the game translate the damage in the entity files to the damage numbers you see in game? I'm also a bit confused on how rate of fire is calculated.
The damage in the files is the damage the weapon does per shot per bank. The damage shown in-game is the rounded damage per second of all banks combined.
As an example with random numbers: Say a ship has lasers on the LEFT, RIGHT, and FRONT banks, and does 10 damage per shot, firing every 2 seconds. Those values in the file will read 10, and the damage on the infocard in game will read 15 for the Laser weapon (10+10+10)/2 = 15. The game does round after the division to the nearest whole.
The rate of fire is the "preBuffCooldown" value in the entity.