In each planet entity file you find a big chunk of the file that looks like this, which determines the amount of slots at each upgrade level.
path:CivilianModules
stageCount 3
stage
price
credits 0.000000
metal 0.000000
crystal 0.000000
upgradeTime 0.000000
maxModuleSlotCount:Civilian 8.000000
maxModuleConstructorCount 0
stage
price
credits 450.000000
metal 150.000000
crystal 75.000000
upgradeTime 45.000000
maxModuleSlotCount:Civilian 14.000000
maxModuleConstructorCount 1
If you want to just change the cost of just one structure, that you can do in the module files.
planetUpgradeSlotType "Civilian"
planetUpgradeSlotCount 4.000000