The costs are all explained in Chapter 7 in the 2005 rules. Any creation, be it a minifig, spaceship, or just gun emplacement can be made using those rules.
A minifig has an armor of 1d6 (or 4, just to make things easier, as four is about average for 1d6). If you want to make a minifig have more armor, you wither give him actual Minifig Armor, or raise his armor through the creation process.
Skill is shown in that chapter as well. A minifig has 1d6 Skill, which is where one of the CP in a minifig's total cost comes from. If you want to give him a higher skill, just use the chart in Chapter 7 to see how much more CP you would have to add for the Skill level you want.
To make a gun emplacement automated, first make the gun itself, which would be just the weapons section, then give it a skill value. Add the CP for whatever skill level it is and you're set.