Ok, I checked, Pioneer costs really are bugged. Moreover, I don't like how it is quite hardcoded. I'll fix, and expose the logic to database for modders.
I'm posting it here instead of Github, because I want the community's feedback on the logic to calculate settler costs.
Currently, the cost is calculated as such:
First, a base value is obtained based on the game's start era. The number itself is calculated from free buildings (based on each building's cost) and population (based on the amount of food required to get to this number) granted due to advanced start era. For a typical ancient era start, there are no free buildings, and the default start population is 1. So, this number is typically very small.
Then, there is a city scaler. Currently, this uses the same global define as the empire needs per city modifier, which is 7% increase per city. It uses the same exact define, meaning you can't change one without changing the other.
After getting this cost, Pioneers and Colonists then have their cost scaled with era, but not Settlers. For Pioneers, the formula is cost * (era + 2), while for Colonists, the formula is cost * (era + 1). The value for era is 0 at Ancient, 1 at Classical, etc. As you can see, this is the source of the bug where Pioneers are more expensive than Colonists. At the same time, because Pioneers have an era scaler, while Settlers don't, there is a sudden jump in cost.
I'll list out a few aspects I want to discuss, and what I think should be done.
1. The formula is overly complicated.
To me, I think the cost should just be (base cost) * (100 + city number multiplier * number of cities) or (base cost) + (increase per city * number of cities).
2. What should the cost increase from number of cities be?
Should it be 7%? Or instead of a percent, we have a set number per city? Whatever the case, I intend to make this changeable in the Units table.
3. Era scaling.
In my mind, either all Settlers, Pioneers, and Colonists should get era scaling, or none of them do. This will prevent a sudden jump in cost, and since settling early is much better than settling late, I am not sure if era scaling the cost is necessary at all.
4. Advanced start eras.
If the starting era is later than Ancient, should all settler units be more expensive? Advanced start gives free buildings and population to settling, so I guess the logic here is that the increased cost is to cover these. However, the whole idea of the free buildings and population is to get the game going quicker, to account for a sizeable chunk of turns missing from the start of the game. In my opinion, this cost increase for advanced start eras should be removed.