Add cityAirUnitCapacity ModConstant (#13883)

* Add ModConstant to modify city air unit capacity

* Update docs: cityAirUnitCapacity ModConstant
This commit is contained in:
Loof 2025-09-10 16:09:44 +02:00 committed by GitHub
parent dddddf2a91
commit ff5480bf2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 4 deletions

View File

@ -272,11 +272,8 @@ class City : IsPartOfGameInfoSerialization, INamed {
@Readonly fun getStrength() = cityConstructions.getBuiltBuildings().sumOf { it.cityStrength }.toFloat()
// This should probably be configurable
@Transient
private val maxAirUnits = 6
/** Gets max air units that can remain in the city untransported */
@Readonly fun getMaxAirUnits() = maxAirUnits
@Readonly fun getMaxAirUnits() = civ.gameInfo.ruleset.modOptions.constants.cityAirUnitCapacity
override fun toString() = name // for debug

View File

@ -52,6 +52,9 @@ class ModConstants {
var cityWorkRange = 3
var cityExpandRange = 5
// Number of air units that can be stationed in a city
var cityAirUnitCapacity = 6
// Modifies how much the gold value of a one-sided trade is applied to the gifts diplomatic modifier.
// Eg: One side offers a city, resource or gold for nothing in return.
var goldGiftMultiplier = 1f

View File

@ -211,6 +211,7 @@ and city distance in another. In case of conflicts, there is no guarantee which
| baseCityBombardRange | Int | 2 | [^S] |
| cityWorkRange | Int | 3 | [^T] |
| cityExpandRange | Int | 5 | [^U] |
| cityAirUnitCapacity | Int | 6 | [^W] |
| unitSupplyPerPopulation | Float | 0.5 | [^C] |
| minimalCityDistance | Int | 3 | [^D] |
| minimalCityDistanceOnDifferentContinents | Int | 2 | [^D] |
@ -279,6 +280,7 @@ Legend:
- [^T]: The multiplier of the gold value of a one-sided trade to be stored as gifts.
- [^U]: The multiplier of the gold value of a regular trade to be stored as gifts. Set to 0 to disable gold gifting in two-sided trades.
- [^U]: Modifies how quickly the GaveUsGifts dimplomacy modifier runs out. A higher value makes it run out quicker. Normally the gifts reduced by ~2.5% per turn depending on the diplomatic relations with the default value.
- [^W]: Number of air units that can be stationed in a city, not including carried/transported air units.
#### UnitUpgradeCost