Project - City-States Trait / Behaviour System Rework

I like this idea a lot, but it needs to be executed well.
It needs to have very tangible (tangible, not necessarily OP) benefits for allies. Maybe whenever your allied pirates pillage, you get some of the yields? The large borders of the cultural CS also need some tangible bonus.
I think it's a good idea though.
I thought the idea with hostile CS is that they are harder to befriend (generally their quests hurt your diplomacy in some other way), but they have very exclusive bonuses, or ones that can be used more offensively against opponents. Not that they themselves would be offensive against you. That feels like they're becoming too active.

Our ability to do some modifications to Unit AI for the CStates is what will make or break this part. If we are able to do it, then I think :
  • Neutral and Hostile CStates should be a little more agressive with their units than they are now (except for the Neutral Militaristic one, which should be a lot more aggressive to fit with their them)
  • Hostile CStates, designed to be "a little too active for their own good", should have some unique things about them : free Worker early for the Free City ; Naval Units roaming around for the Pirate Haven, Missionary usage for the One Truth etc
In addition, I agree with @InkAxis that there should be a tangible benefit for each alliance with an Hostile City-State (instead of simple nullifying the annoyance).

In case the Unit AI part isn't possible, then we can find a compromise, something that make so that even if the CStates Units stay the same, you still feel a difference.

Also, as a sidenote, what do you think about making trespassing through Hostile CS territory only allowed for its Ally (and not its Friends). That balance things (Friendly City-States allow all trespassing) and make the Greek UA (no malus from trespassing) more relevant.

Spoiler Ideas of Hostile CS ally benefit :

  • Maritime : The Ally gains Gold and Production in their Capital each time the CState kill a Unit or plunder a TRoute (from InkAxis), scaling with era.
  • Merchantile : Access to the bonus resources of the City (bonus Luxury Resource and Strategic Resource)
  • Militaristic : Bonus Supply.
  • Religious : Easier conversion of the City for the Ally
  • Cultural : Allied Units gain +15 % CS when in the CState territory
 
Merchantile : Access to the bonus resources of the City (bonus Luxury Resource and Strategic Resource)
This one seems a lot less hostile, but I can't really think of any good bonus. The only thing I could think of is maybe that it makes getting a monopoly harder because it has that luxury that could be your monopoly. But CS lux don't count towards monopolies anyway (unless we overwrite the Statecraft policy thing).
Religious : Easier conversion of the City for the Ally
As I understand, the Hostile religious ones will also use (weaker) missionaries right?

Also, as a sidenote, what do you think about making trespassing through Hostile CS territory only allowed for its Ally (and not its Friends). That balance things (Friendly City-States allow all trespassing) and make the Greek UA (no malus from trespassing) more relevant.
So friendly allow all trespassing, Neutral allow it with negative influence (until friends), and hostile don't even let you enter (as if you don't have an open borders agreement) until you are allied? Trespassing is already kind of an annoying mechanic but it's hard to say how this will feel. Especially as you can't tell what CS type a CS is so it might just feel random. Maybe it should just not allow until you reach friend level influence?
Maybe that can be an ability for the cultural CS, with it's large borders, and the name "Recluse Court", well they are recluse because they literally don't let your units in...
 
This one seems a lot less hostile, but I can't really think of any good bonus. The only thing I could think of is maybe that it makes getting a monopoly harder because it has that luxury that could be your monopoly. But CS lux don't count towards monopolies anyway (unless we overwrite the Statecraft policy thing).

I'm still thinking about it. Currently, Hostile Merchantile CStates are just very cautious cities that are very well-developped.

As I understand, the Hostile religious ones will also use (weaker) missionaries right?

No, only the Neutral ones. The Hostile ones have a very strong resistance to conversion, but emits a stronger pressure around them for the main religion in it. With this idea in mind, making the CState "lower the shield" with its ally makes sense.

So friendly allow all trespassing, Neutral allow it with negative influence (until friends), and hostile don't even let you enter (as if you don't have an open borders agreement) until you are allied? Trespassing is already kind of an annoying mechanic but it's hard to say how this will feel. Especially as you can't tell what CS type a CS is so it might just feel random. Maybe it should just not allow until you reach friend level influence?

No, no CState will forbid entry into their territory, but the idea was that the Influence malus from trespassing would still be present for a Hostile CState's friends (which, knowing that the penalty for trespassing is already increased for Hostile CStates, means that the price in Influence can be steep).

Maybe that can be an ability for the cultural CS, with it's large borders, and the name "Recluse Court", well they are recluse because they literally don't let your units in...

That is a good idea. Would it be possible though ?
 
No, only the Neutral ones. The Hostile ones have a very strong resistance to conversion, but emits a stronger pressure around them for the main religion in it. With this idea in mind, making the CState "lower the shield" with its ally makes sense.
Actually using missionaries seems like a much more hostile kind of thing to me, than passive pressure.

That is a good idea. Would it be possible though ?
I thought this is what you wanted for all hostile CS?
There is the GameEvent CanMoveInto(PlayerID iUnitOwner, UnitID iUnit, int iPlotX, int iPlotY, bool bAttack, bool bDeclareWar)
It says it is intensive, but it should work.
I could also dig around in the DLL.
 
Actually using missionaries seems like a much more hostile kind of thing to me, than passive pressure.

Yeah, that right. I can maybe move that part from Neutral Religious to Hostile Religious, and find something new for Neutral Religious to compensate.

I thought this is what you wanted for all hostile CS?
There is the GameEvent CanMoveInto(PlayerID iUnitOwner, UnitID iUnit, int iPlotX, int iPlotY, bool bAttack, bool bDeclareWar)
It says it is intensive, but it should work.
I could also dig around in the DLL.

No, as I said, the goal is to make so that, as long as you're not Ally with a Hostile CS (so Angry / Neutral / Friend), you get the trespassing penalty.

So Friendly CS allow all trespassing, Neutral CS allow trespassing for Friends and Ally (influence penalty for others), Hostile CS allow trespassing for Ally (big influence penalty for others).

As for the Recluse Court, that would be : Doesn't allow passage for any Civ in its territory except for its Ally (so it would not even be about trespassing at this point, you either ally them or declare war on them to access their territory, just like for a real civ).
 
Last edited:
Irrational is no more in use in VP. When I wrote CSL and later TO I noticed code is unused.

Can you tell me if UCS is up to date with VP 7-1-3?
 
Irrational is no more in use in VP. When I wrote CSL and later TO I noticed code is unused.

It's true that I don't saw them in VP, but I just imagined that it was because I didn't pay attention. Thx for the info. :)

Can you tell me if UCS is up to date with VP 7-1-3?

I have no idea unfortunately. Come on the discord to talk to Enginseer directly if you want (or I can ask him if you prefer).
 
General Trait : Center of Faith - Has a Holy Site in its territory. Emits increased pressure for the dominant Religion within it. Has a Border Growth Malus.
  • Religious / Friendly = Open Mind - Lowered resistance to conversion. Bonus :c5faith: Faith for its Friends.
  • Religious / Neutral = Mendicant Orders - Spawn at a regular rate weak missionaries from the faith of its Ally and reduces its :c5faith: Faith costs a bit (-10 %).
  • Religious / Hostile = One Truth - Drastically increased resistance to conversion, but religious pressure increased even more.
If everything works as intended I will add this part in next UCS update. For now there are coded (not released):
  • +33% :c5faith: Religious Pressure for all of them;
  • -10 :c5culture: Broder Growth Points for all of them (I wanted to make modifiers, like -10%, but VP neglects negative values);
  • :c5greatperson: Holy Site for all of them on spot without Resource, Feature nor Improvement nor City; If it does not find anything in ring 3 of the city, then it won't build it at all (such situation can be met on small Islands);
For the rest I plan:
  • +2 :c5faith: to Friends and -25% :c5faith: Conversion Resistance;
  • -10% :c5faith: cost of Missionaries (in City-State only); 5% Chance for spawning a :c5faith: Missionary;
  • +25% :c5faith: Conversion Resistance; +25% :c5faith: Religious Pressure;
 
Update:
  • +33% :c5faith: Religious Pressure for all of them;
  • +2 :c5gold: and +2 :c5culture: to Natural Wonders.
  • -10 :c5culture: Broder Growth Points for all of them (I wanted to make modifiers, like -10%, but VP neglects negative values);
  • :c5greatperson: Holy Site for all of them on spot without Resource, Feature nor Improvement nor City; If it does not find anything in ring 3 of the city, then it won't build it at all (such situation can be met on small Islands);
  • Friendly: -25% :c5faith: Conversion Resistance. 5% Chance for spawning a Missionary in Friends territory; +2 :c5happy: Happiness;
  • Neutral: +10% :c5faith: Conversion Resistance; +5 :c5production: for every World Religion that has at least one Follower in this City-State. +1 :c5food: to Rivers and +2 :c5food: to Lakes;
  • Hostile: +25% :c5faith: Conversion Resistance; +25% :c5faith: Religious Pressure. 10 :c5culture: Culture on Unit's Death.
 
Last edited:
@Hinin If you have any other idea for a Neutral passive ability then please share it.

Shouldn't those abilities be more passive than active relating on Major Players' influence? I tried to make Religious bonuses more CS oriented (except Missionaries which are rare bonus to all Friends). I also would like to avoid any Ally bonuses here. This is UCS ability we have for. I just read Maritime ideas and all of them rely on interaction (Friends or Allies).
 
Last edited:
General Trait = Fortress: Has a Fort and a Strategic Resource (=1) nearby. Can train its unique unit. -10% :c5gold: Unit Maintenance. -33% :c5food: Growth.
  • Militaristic/Friendly = Mercenary Hub: Gifts Units to its Friends at an increased rate (additional 5% chance). All Military Units gain 30 XP when trained in this City-State.
  • Militaristic/Neutral = Sellsword Army: +25% :c5war: Unit Supply Cap. +20% XP gained from Combat for units Trained in this City-State. All Military Units gain 10 XP when trained in this City-State.
  • Militaristic/Hostile = Hermit Dragon: +50% :c5war: Unit Supply Cap. +33% :c5production: Production towards all Military Units.
 
Last edited:
General Trait = Builders: Starts with a Manufactory and one Bonus Resource nearby. +15% :c5food: Growth. 10 :c5culture: Border Growth Points when :c5citizen: Citizen is born. +20% :c5gold: Gold Maintenance for Units.
  • Maritime/Friendly = Harvesters: +50% :c5production: Production to Workers and Fishing Boats. Rarely gifts a Worker or a Fishing Boat (50% chance for any of them) to its Friends (5%). +1 :c5food: Food to Bonus Resources.
  • Maritime/Neutral = Secured Warehouse: +10 :c5food: Food per 4 :c5citizen: Citizens in this City-State. +10 :c5strength: Defense and +50 City HP.
  • Maritime/Hostile = Selfish Gatherers: +20% :c5production: Production to all Naval Units. 50 :c5food: Food and 20 :c5culture: Border Growth Points from :c5production: Unit Production.
 
Last edited:
@Hinin If you have any other idea for a Neutral passive ability then please share it.

Shouldn't those abilities be more passive than active relating on Major Players' influence? I tried to make Religious bonuses more CS oriented (except Missionaries which are rare bonus to all Friends). I also would like to avoid any Ally bonuses here. This is UCS ability we have for. I just read Maritime ideas and all of them rely on interaction (Friends or Allies).

Well, one thing I have had in mind for quite some time was to give one Religious CState in the world a unique religion when all other religions are created, a religion that it would actively spread around it, and has unique beliefs made to help the CState grow in power. This would be a Neutral interaction (it would influences all players whatever the state of their relationship with the CS), but would only be for one CState.

The idea was to represent how some important Religious CState act as centers of a religion (Vatican, Jerusalem, Lhassa).
I decided to revise your ideas a bit:

General Trait = Fortress: Has a Fort and a Strategic Resource (small deposite: 1-2) nearby. +10% :c5culture: Border Growth Points. Can train its unique unit. -15% :c5food: Growth.
  • Militaristic/Friendly = Mercenary Hub: Gifts Units to its Friends at an increased rate (additional 5% chance). All Military Units gain 30 XP when trained in this City-State.
  • Militaristic/Neutral = Sellsword Army: +10% :c5war: Unit Supply Cap. +20% XP gained from Combat for units Trained in this City-State.
  • Militaristic/Hostile = Hermit Dragon: +20% :c5war: Unit Supply Cap. +25% :c5production: Production towards all Military Units.
Why?
  • Fort insted of Citadel is a must. comparing to Religious CSs, power of given bonuses were (and I think they still are) much greater. Fort is still a Military Improvement.
  • Strategic Resource must be low value to not overpower the CS.
  • Here we can add % border growth and it fits thematically.
  • Decreased :c5food: Growth is a malus similar to decreased Border Growth in Military CSs. Something must compensate all those bonuses.
  • Friendly CSs still give more Units and they also have increased XP on their own Military Units.
  • Instead of global Supply Cap, only Neutral and Hostile will have increased Supply, and instead of scaling one, there will be percentage factor. Bigger for Hostile.
  • Neutral CSs will gain more XP from combat (@gwennog, can you think of a Promotion Icon here?). They can get really powerful units this way.
  • Hostile CSs will produce more units, which seems logical.
Another revision, this time for Maritime City-States:

General Trait = Ship Builder: Starts with a Manufactory and one Bonus Resource nearby. +15% :c5food: Growth. +10% :c5gold: Gold Maintenance for Units.
  • Maritime/Friendly = Harvesters: +50% :c5production: Production to Workers and Fishing Boats. Rarely gifts a Worker or a Fishing Boat (50% chance for any of them) to its Friends (5%).
  • Maritime/Neutral = Secured Warehouse: +10 :c5food: Food per 4 :c5citizen: Citizens in this City-State. +10 :c5strength: Defense and +50 City HP.
  • Maritime/Hostile = Pirate Haven: +20% :c5production: Production to all Naval Units. 50 :c5food: Food and 20 :c5culture: Border Growth Points from :c5production: Unit Production.
All of this seems good, and I like the idea of empowering the CState more. Thanks. :thumbsup:
 
Well, one thing I have had in mind for quite some time was to give one Religious CState in the world a unique religion when all other religions are created, a religion that it would actively spread around it, and has unique beliefs made to help the CState grow in power. This would be a Neutral interaction (it would influences all players whatever the state of their relationship with the CS), but would only be for one CState.
Sound like grounds for other religious players to conquer it.

It should have a strong founder bonus that benefits from followers, should also provide stronger bonuses to followers than normal so that nearby civilizations are motivated to get it compared to the other available religions. Maybe the follower beliefs ties back to the holy city so that the followers are more motivated to keep the CS around.
 
Ok, I almost finished my rework for 3 types of CS: Maritime, Religious and Militaristic. I would like to sum up what I did and I would be grateful for any balance suggestions (I tried to add a significant malus for each of them, too).

RELIGIOUS:
  • :c5greatperson: Holy Site for all of them on spot without Resource, Feature nor Improvement nor City; If it does not find anything in ring 3 of the city, then it won't build it at all (such situation can be met on small Islands);
  • +33% :c5faith: Religious Pressure;
  • +2 :c5gold: and +2 :c5culture: to Natural Wonders.
  • -10 :c5culture: Broder Growth Points for all of them (I wanted to make modifiers, like -10%, but VP neglects negative values);
  • Friendly: -25% :c5faith: Conversion Resistance. 5% Chance for spawning a Missionary in Friends territory; +2 :c5happy: Happiness;
  • Neutral: +10% :c5faith: Conversion Resistance; +5 :c5production: for every World Religion that has at least one Follower in this City-State. +1 :c5food: to Rivers and +2 :c5food: to Lakes;
  • Hostile: +25% :c5faith: Conversion Resistance; +25% :c5faith: Religious Pressure. 10 :c5culture: Culture on Unit's Death.
Friendly are just happy monks with open minds that will help you with your faith, but you can't rely on them, because they help everyone around.
Neutral are just Monks closed in their Monastery which grows and produces.
Hostile are difficult to convert and can be pain in the butt. They also grow their city by sacrificing their units.


MARITIME:
  • Manufactory and one Bonus Resource nearby;
  • +15% :c5food: Growth;
  • 10 :c5culture: Border Growth Points when :c5citizen: Citizen is born;
  • +20% :c5gold: Gold Maintenance for Units;
  • Friendly: +50% :c5production: Production to Workers and Fishing Boats. Rarely gifts a Worker or a Fishing Boat (50% chance for any of them) to its Friends (5%). +1 :c5food: Food to Bonus Resources.
  • Neutral: +10 :c5food: Food per 4 :c5citizen: Citizens in this City-State. +10 :c5strength: Defense and +50 City HP.
  • Hostile: +20% :c5production: Production to all Naval Units. 50 :c5food: Food and 20 :c5culture: Border Growth Points from :c5production: Unit Production.
Friendly can produce many improvements because of plenty of Workers and Fishing Boats. They give them also to all Friends from time to time.
Neutral are just growing CSs with additional defenses. They don't want to share anything, but they are also not warmongering.
Hostile can produce Naval Units more quickly (unless they are not coastal). If they produce any unit they grow their borders and citizens.


MILITARISTIC:
  • Fort and a Strategic Resource (=1) nearby;
  • Can train its unique unit;
  • -10% :c5gold: Unit Maintenance;
  • You can upgrade your units inside their territory if Allied;
  • -33% :c5food: Growth;
  • Friendly: Gifts Units to its Friends at an increased rate (additional 5% chance). All Military Units gain 30 XP when trained in this City-State.
  • Neutral: +25% :c5war: Unit Supply Cap. +20% XP gained from Combat for units Trained in this City-State. All Military Units gain 10 XP when trained in this City-State.
  • Hostile: +50% :c5war: Unit Supply Cap. +33% :c5production: Production towards all Military Units.
Friendly give you UUs more frequently and have really powerful units from start.
Neutral have less powerful units, but can get more XP during fight. Also they have increased Supply Cap.
Hostile are true Warmongers. Huge supply and quick training. Truly massive army.


I tried to make them all as equal as possible although I know Militaristic CSs can be much more important for players than Religious (still). If you have any ideas (it would be good if they use sql or simple lua if possible) then I will surely take them into account.

Friendly CSs always give you some unit if you are Friends with them (rarely).

Some screenshots of new UI and interesting stuff related to that topic:
Spoiler Screenshots :

upload_2022-5-6_18-49-26.png

upload_2022-5-6_18-49-35.png

upload_2022-5-6_18-49-43.png

upload_2022-5-6_18-49-50.png

upload_2022-5-6_18-50-23.png

 
Last edited:
Could it be possible to force placement for Maritime cities so that they aren't placed in a zone without access to the sea ?
I tried to make them all as equal as possible although I know Militaristic CSs can be much more important for players than Religious (still). If you have any ideas (it would be good if they use sql or simple lua if possible) then I will surely take them into account.
I like what you did. True ingame testing needs to be done in order to tweak values, but I think the fundation is solid. :thumbsup:

Here are some ideas for the Cultural and Merchantile :

Cultural :
  • Has one Academy and two free :greatwork: GWArt / Artifact slots filled at the start (so free Culture and Science) => means faster border growth from the start
  • +20% :c5culture: Culture in the City
  • Gains :c5production: Production and :c5food: Food whenever its borders grow
  • +20% :c5production: Production to Unit costs
Friendly - Gains one more :greatwork: GWWriting slot filled at the start. +2 :c5culture: Culture and :c5science: Science per :greatwork: GWork in the City. Offers half the bonus to its friends.
Neutral - Also gains :c5science: Science whenever its borders grow. -75% :c5gold: Upgrade cost for Units.
Hostile - Units gain Homeland Guardian (+25% :c5strength: CS in owned territory) and grant a lot of :( Border Growth points to the City when killing Units

Merchantile :
  • Has one Town (nearby) and a unique Luxury Resource
  • Road construction quest more frequent (so that it can be connected to the rest of the world)
  • +20% :c5gold: Gold in the City
  • Converts 20% of its :c5gold: Gold output into :c5production: Production and :c5food: Food (through a Dummy Building)
  • +50% more susceptible to Spy actions (so malus towards spy resistance)
Friendly - :trade: Trade Routes to the City provide +5 :c5gold: Gold to the City and +2 :c5gold: Gold to the controler of the :trade: Trade Route. +1 :trade: Trade Route to its friends.
Neutral - +20 :c5gold: Gold per Spy in the City. Gain 1 :c5war: Supply and a free Military Unit whenever subjected to a Spy action.
Hostile - +20% :c5gold: Gold when at War. Can recruit Mercenary Units. Units gain +2 Visibility Range.
 
Could it be possible to force placement for Maritime cities so that they aren't placed in a zone without access to the sea ?
Unfortunately this is done by AssignStartingPlots.lua from VP (modified also by MW). We should talk about that on Discord VP I suppose or suggest on github.
+50% more susceptible to Spy actions (so malus towards spy resistance)
What actions can be done vs CSs?
Can recruit Mercenary Units.
This is hard or even impossible. I made Militaristic "Can train UUs" by substitution of regular unit they produced with UU they can give to Major. I couldn't simply add them to the production list.



@Hinin Also, if you already know which table adds particular bonuses, you could post them here. It would save me lots of time I spend on searching instead of programming.
 
Last edited:
Thought City-States didn't pay maintenance?
 
Thought City-States didn't pay maintenance?
If this is true, then I will change the abilities. I tried to use only things viable for CSs, but I could miss some. Do you have any other things catched?
 
Few tweaks:

RELIGIOUS:
  • :c5greatperson: Holy Site for all of them on spot without Resource, Feature nor Improvement nor City; If it does not find anything in ring 3 of the city, then it won't build it at all (such situation can be met on small Islands);
  • +33% :c5faith: Religious Pressure;
  • +2 :c5gold:, +2 :c5culture: and +2 :c5faith: from Mountains and Atolls.
  • +2 :c5gold:, +2 :c5culture: and +2 :c5faith: to Natural Wonders.
  • -10 :c5culture: Broder Growth Points for all of them (I wanted to make modifiers, like -10%, but VP neglects negative values);
  • Friendly: -25% :c5faith: Conversion Resistance. 5% Chance for spawning a Missionary in Friends territory; +2 :c5culture: Culture from incoming :trade: Trade Routes;
  • Neutral: +10% :c5faith: Conversion Resistance; +5 :c5production: for every World Religion that has at least one Follower in this City-State. +1 :c5food: to Rivers and +2 :c5food: to Lakes;
  • Hostile: +25% :c5faith: Conversion Resistance; +25% :c5faith: Religious Pressure. 10 :c5culture: Culture on Unit's Death.
MARITIME:
  • Manufactory and one Bonus Resource nearby;
  • +15% :c5food: Growth;
  • 10 :c5culture: Border Growth Points when :c5citizen: Citizen is born;
  • +20% :c5citystate: Enemy Spy Effectiveness;
  • Friendly: +50% :c5production: Production to Workers and Fishing Boats. Rarely gifts a Worker or a Fishing Boat (50% chance for any of them) to its Friends (5%). +1 :c5food: Food to Bonus Resources.
  • Neutral: +10 :c5food: Food per 4 :c5citizen: Citizens in this City-State. +10 :c5strength: Defense and +50 City HP.
  • Hostile: +20% :c5production: Production to all Naval Units. 50 :c5food: Food and 20 :c5culture: Border Growth Points from :c5production: Unit Production. +1 :c5production: Production per 2 :c5citizen: Citizens.
MILITARISTIC:
  • Fort and a Strategic Resource (=1) nearby;
  • Can train its unique unit;
  • +10% :c5production: Production towards all Military Units;
  • You can upgrade your units inside their territory if Allied;
  • -33% :c5food: Growth;
  • Friendly: Gifts Units to its Friends at an increased rate (additional 5% chance). All Military Units gain 30 XP when trained in this City-State.
  • Neutral: +25% :c5war: Unit Supply Cap. +20% XP gained from Combat for units Trained in this City-State. All Military Units gain 10 XP when trained in this City-State.
  • Hostile: +50% :c5war: Unit Supply Cap. +33% :c5production: Production towards all Military Units.
 
Last edited:
Top Bottom