I've been thinking over citystate quests for a long while. It seems a good way to do it might be a series of tiers. This would basically 1) ensure they do things that match the personality they supposedly have, and 2) request things logical for the timeperiod of the game and friendship status.
Citystates would pick a quest from the
first tier they match criteria for. If everything's already done they make no requests (don't match any criteria, or all options completed for their tier). In addition, status is re-evaluated periodically to see if the civ should go up a tier (but not down a tier).
The personality types:
- Hostile or Militaristic - Warlike.
- Peaceful
- Irrational
- Neutral - Isolationist.
-- Warlike --
- Unfriendly and undiscovered civs or natural wonders
Check next tier.
- Barbarian camps nearby
Request assistance against a camp.
- City-states nearby
Request a CS killed.
- Friendly
Road.
-- Peaceful --
- Unfriendly and undiscovered civs or natural wonders
Exploration quest (find X).
- Barbarian camps nearby
Request assistance against a camp.
- City-states nearby
Check next tier.
- Friendly
Development quest (road, wonder, great person, resource).
-- Irrational --
Random hostile or peaceful personality when analyzing tier level.
-- Isolationist --
Only can be bribed.
In the standard game it works like this:
- Unfriendly
Random chance between barbarian or kill-neighbor quests.
- Friendly
Random chance of all quests, with some more likely based on personality.
While the vanilla method is simple to code, the problems are 1) kill-quests pile up and 2) it seems odd for CSs to give quests for things diametrically opposed to their personality.
The perfect example of this are "Peaceful" citystates that request bloodthirsty massacres of their neighbors. Even though this has a low chance to occur in any given dice roll, since the kill quest and barbarian quest are the only options before friendly, and the kill quest is the only one that can theoretically never expire, and tend to accumulate. Just making kill-quests have a limited duration is a decent band-aid solution but will still result in "peaceful" and "mind your own business" citystates requesting strange things. The kill quests also come with a serious downside: for each citystate killed your influence with its neighbors drops faster, even if the neighbor requested the kill. Completing it should give a "me love you
long time" influence boost to counteract this.
We don't have access to the code yet that handles this and the current system is very inflexible (and incomplete, with only a few modifiers available), but citystate quests are still something that's been bothering me for a very long time. Citystate quests and capture bonuses will probably be the first thing I work on whenever we get c++ access.