-
Notifications
You must be signed in to change notification settings - Fork 1
5: City Rewards
Here is an example from the example patch.json. As you can see, there are many parameters that you can change, in custom rewards and even vanilla ones.
"cityRewardData": {
"workshop": {
"level": 1,
"addProduction": 1
},
"myverycoolcityreward": {
"idx": -1,
"level": 5,
"persistence": "post",
"order": 1,
"addProduction": 4,
"currencyReward": 10,
"populationReward": 3,
"scoreReward": 420,
"defenceBoost": 20,
"scoutSpawnAmount": 3,
"scoutMoveAmount": 3,
"borderGrowthAmount": 3,
"spawnUnit": "hexapod",
"boostAttackOverSpawn": 10,
"boostDefenceOverSpawn": 10,
"boostMaxHpOverSpawn": 50,
"boostMovementOverSpawn": 1,
"healUnitOverSpawn": true,
"hidden": true
}
}Level specifies the city level at which this reward shows up, minus one. So if level is 1, the reward will show up at the first city upgrade.
This is a required value.
Persistence further specifies where the reward shows up. The possible settings are:
- "none" (default):
- The reward only shows up at the level specified by "level"
- "post":
- The reward starts showing up at "level", and continues to show up afterwards (eg. how super unit and park work)
- "pre":
- The reward starts showing up at the first level up, and stops after "level". (The opposite of "post", basically)
Order specifies the relative order at which the reward appears compared to others. Basically, if order is x, any reward that has a lower order value will be more to the left, while those with higher order will go more to the right. Negative numbers are allowed.
AddProduction is the amount of stars/turn you want to add to the city, excluding the +1 star/turn boost of the level up.
CurrencyReward is the amount of stars you want to give to the player/bot instantly. You can see this in the Resources reward.
PopulationReward is the amount of population you want to add to the city that got this reward. You can see this in the Population Growth reward.
ScoreReward is the amount of score the player/bot gets from this reward.
DefenceBoost is the defence multiplier that units with fortify can use in the city, multiplied by 10. So a defenceBoost of 20 will be a 2x boost.
This specifies the amount of explorers/scouts to spawn from the city. The Explorer reward only uses 1, but any number can be given. Note: They wont spawn simultaniously, but one after the other.
This specifies the amount of moves the explorers/scouts that are spawned from this reward do. Of course, this will do nothing if there are no scouts spawned. Default is 15 (the number used by the Explorer reward)
This specifies how much the city border should expand. Use with caution as this can cause weird stuff to happen if an unoccupied village falls into the borders of the city.
This specifies what type of unit it should spawn. Tribe specific unit overrides apply to this as well. (Basically, if you set this to "mindbender", cymanti will spawn shaman instead)
This specifies if you want to increase the attack (additive) of the unit specified in spawnUnit instead of spawning it. If you don't own any units of that type, the reward will spawn it normally. But if at least one exists the reward will boost its attack stat. Multiply your desired value by 10 as it will be divided by 10 in the calculations.
Same as boostAttackOverSpawn, but for defence. Multiply desired value by 10.
Same as boostAttackOverSpawn, but for maximum hp. Multiply desired value by 10.
Same as boostAttackOverSpawn, but for movement. DO NOT multiply by 10.
This specifies if this reward should heal the specified unit to maximum hp if it already exists. If it doesn't exist, it will be spawned as normal.
Note: This works well with boostMaxHpOverSpawn.
Specifies if the reward should be a pickable option. Setting this to "true" means that this reward will not show up on the reward pick screen under normal circumstances. Defaults to "false".
While this seems useless, you should set this to "true" if you made your reward override another in cityRewardOverrides in tribeData. Failing to do so will result in your reward showing up at the specified level, and also overriding another, potentially resulting in the same reward showing up twice in the reward picking screen.
To register a sprite for a custom reward, you have to have a .png image, and you have to use the name you put in patch.json for it, with 2 extra underscores.
For example, the sprite for "myverycoolcityreward" will be named "myverycoolcityreward__.png". This sprite cannot be edited in sprites.json file. Localization
The localization key for any reward is: wcontroller.reward.[insert your reward's name here]
- More than 3 rewards in a single choice window will result in it looking weird.
- The star counters on the top right corner of the park and workshop rewards are not yet customizable.
- Use AddBorderGrowth with caution as it can act weird when other unoccupied cities fall into the border of the city receiving the reward.
Hi there