yairm210 / Unciv

Open-source Android/Desktop remake of Civ V
Mozilla Public License 2.0
8.31k stars 1.56k forks source link

Implementation of Diplomacy #4674

Closed ajustsomebody closed 5 months ago

ajustsomebody commented 3 years ago

I am creating this thread to list out what is implemented in diplomatic relations with other civilizations and what isn't. I really couldnt wait for yairm to reply to my comment therefore i guess he can close this he wants but i have put a lot of time researching these so.

Please point it out if there are problems about any of the below lines, whether it be that such mechanics don't exist in G&K or if it has been implemented or just plain wrong.

(ND) stands for Needs Description, i will be using this often as i write down basic features of a mechanic and not specifics of it. Will come back and fill those blanks in.

Well, there goes my 2 hours.

Important!

Please, if you are going to implement any of the features below please dont take my words as absolute values in the game as i have marked most of them (ND). Please do your own research as well.

Embassies

° When you exchange embassies with the other player, the borders of the capital city of that civilization will be implemented, you will not gain permanent vision like in allied city-states however. ° You gain a small amount (ND) of relations with that civilization. ° In case of a denounction, both embassies of those two civs are closed down until you re-open them with an action (ND). ° That action could be done right after the turn you have denounced the civ. If you are at war with that civilization you need to negotiate peace first before that action becomes available. ° Most of the treaties (ND) are only available if you have mutual embassies, with an exception of Declaration of Friendship. ° (ND) I gotta check if you both need mutual embassies to do most of the diplomatic stuff that you need embassies for. ° edit: embassies should give some good relations between civs

Relations


Relations should be improved once those actions are met.

Please check for values yourself on the internet



I absolutely need values of all on how much those affect relationships, hence what all those (ND)'s stand for.


Trade



Other nations, on their turn, may also demand stuff from you. If you agree to their demand, know that you will have to spend a certain number of turns (50-100) not engaging in the activity in question. At that point, the promise will be considered fulfilled, and you may go back to doing what you were doing previously. If you break the promise before the required period has expired, relations between you will worsen. (ND) (Need description on how much relations will suffer in case of a demand, and how much military force you need to make them comply)

Treaties

ravignir commented 3 years ago

I will take a deeper look at that later: Afraid is often when you have nukes and they don't. Also: you should get most of the values from carlsguides.

When you trade them a Luxury resource: if they're Neutral, they'll give you no more than 5 Gold per turn (GPT); if they're Friendly, they may give you as much as 7 GPT; if they're Guarded, you'll get no more than 4 GPT. An interesting quirk of the Fall 2013 patch is that if you're not Friendly with a nation, you can't exchange one-time Gold quantities, just per-turn payments. (ND) (Dont know what happens if you are in the red levels of relations with them (angry, enemy))

I don't recall these values from my civ5 games. I definitely traded luxuries at neutral for 7 GPT. And at friendly, i think it was 8 or more.

ravignir commented 3 years ago

And for the love of god, change the current implementation of pledge to protect city states.

ajustsomebody commented 3 years ago

I don't recall these values from my civ5 games. I definitely traded luxuries at neutral for 7 GPT. And at friendly, i think it was 8 or more.

it could have been changed, where could i get exact values for that from?

ajustsomebody commented 3 years ago

And for the love of god, change the current implementation of pledge to protect city states.

how exactly is it in civ 5? ill put it in

xlenstra commented 3 years ago

Same as with the City-States issue.

Embassies

* [ ]  For Embassies to be implemented. Embassies require writing to be exchanged, and you should be able to pay opposing party in a trade request a small smount of gold (ND) for them to exchange embassies to you.
  When you exchange embassies with the other player, the borders of the capital city of that civilization will be implemented, you will not gain permanent vision like in allied city-states however.
  You gain a small amount (ND) of relations with that civilization.
  In case of a denounction, both embassies of those two civs are closed down until you re-open them with an action (ND). That action could be done right after the turn you have denounced the civ. If you are at war with that civilization you need to negotiate peace first before that action becomes available.
  Most of the treaties (ND) are only available if you have mutual embassies, with an exception of Declaration of Friendship.
  (ND) I gotta check if you both need mutual embassies to do most of the diplomatic stuff that you need embassies for.

Not implemented at all

Relations

* [ ]  In civ 5 there are 5 diplomatic relation status with civilizations, with those being Neutral, Friendly, Guarded, Hostile and Afraid

Neutral: They are neither friendly, nor hostile. Negotiations will be relatively easy.

Friendly: They are well disposed towards you, and you may hope to take advantage of that in negotiations.

Guarded: They are wary of you and your intentions and, as such, negotiations will be more difficult.

Hostile: They are angry with you, and very willing to declare war on you. Negotiations will be almost impossible.

Afraid: They fear your military superiority or your victory progress. They will often comply with anything you want in negotiations.

Currently implemented are: Unforgivable, Enemy, Competitor, Neutral, Favorable, Friend, so this'll need a lot of work.

* [ ]  Relations should be improved once those actions are met.

Acts of goodwill - These include freeing and returning a captured civilian unit belonging to them, sharing the intrigue of another civilization plotting against them, gifting a resource or Gold when they have nothing to trade for it (variable depending on how much they needed it), and liberating a city that once belonged to them. (ND)

Only 'liberating a city' is implemented.

Declaring Friendship with a civilization they're friends with (ND)

Impelemented

Making a Public Declaration of Friendship (+1)

Implemented

Fighting a common enemy - Sometimes, they will ask for your cooperation in a war they intend to start. If you agree to fight alongside them, relations will improve. They also improve if you declare war against a foe they're currently fighting. (+1)

Asking for joining a war: not implemented, fighting a common enemy: implemented.

Denouncing a common enemy - You can receive this bonus if you denounce a nation they have already denounced, or if they denounce a nation you've already denounced. (ND)

Implemented, but based on the previously noted wrong relationship levels.

Fulfilling promises - There are many situations when you will be asked to promise something to another leader. Some of these include: after you settle a city close to their territory (and they ask you to stop settling close to them), when you have troops amassed near their borders (but say you're only passing through), when you spread your religion to their cities (and they ask you to stop), or if they suspect you of spying on them, they will tell you that you're making them feel uncomfortable and request you to stop. If you desist these actions for a certain amount of turns, a notification will appear stating that you have kept your promise. (ND)

Not implemented.

Building a Landmark on their territory - You can choose to do this with one of your Archaeologists instead of extracting an Artifact for your own use. (BNW only so i guess we will cross this out)

Not relevant yet, as we don't have BNW.

Sharing Religion - If at least half of their cities share your Religion, it has similar effects to the lower spectrum of providing help to them. (ND)

Requires Religion, so I'll leave it out for now but should be implemented later.

Common Ideology - If you share a common late-game Ideology, it has similar effects to Declaring Friendship. (BNW only so i guess we will cross this out)

Not relevant yet, as we don't do BNW.

Having no contested borders (ND)

Not implemented.

Them having an embassy in your capital (ND)

I'll combine this with 'embassy'.

Forgiving them for spying on you when they get caught in the act (ND)

Requires Espionage, not implemented.

Passing the World Congress to their hands (by helping them win the leadership vote) (ND)

Requires BNW, so not relevant.

Helping their proposal to the World Congress pass (by voting for it) (ND)

Requires BNW, so not relevant.

Liberating their capital (or another of their former cities) after they have been completely removed from play (ND)

Implemented, but in all circumstance and not only when they are removed from play.

I absolutely need values of all on how much those affect relationships, hence what all those (ND)'s stand for.

I can look them up in the source code, that should be easier and more accurate.

* [ ]  Relations should degrade once those actions are met.

Implemented for the currently implemented relationship factors.

Acts of ill will - These include denouncing them, demanding tribute from/attacking City-States they have pledged to protect, getting caught stealing their technologies, and flat-out refusing to comply with their demands (such as to stop spying, not to settle a city near their lands, or not to spread religion to their cities). (ND)

Not implemented, except for denunciation.

Coveting land you own - If you settled near land they consider to be theirs (i.e. land they intend to settle in the future), territorial disputes will create tension between you. (ND)

Not implemented.

Stealing their territory with a Great General - Using a Great General to create a Citadel improvement on or adjacent to another nation's borders will transfer ownership of their territory to you. When they covet lands you own strongly enough, they may also steal territory from you in this manner. (+1implemented but they only seem to dteal land after you have stolen their land)

Implemented, and it is correct that they only do this when you've stolen their land first. Don't think that's how it is in the base game.

Settling cities near other nations' territory - They will consider that a provocation, and ask you to stop doing it. (ND)

Done.

Making a Public Declaration of Friendship with a civilization they dislike/have denounced (ND)

Done, though again 'dislike' is based on the previously noted wrong relationship levels.

Being denounced by a civilization they like more than you (ND)

Not yet implemented.

Breaking promises - For example, promising to start a war together, asking for 10 turns to prepare, then saying that you've reconsidered when it comes time to start the war. Or in any other case when you promised something and you didn't wait enough turns. (ND)

Implemented for the currently added promises (only not settling near them)

Completing a Wonder they wanted to build/were building (ND)

Not yet implemented.

Competing for the same City-State's influence (ND)

Not yet implemented, but AI seem to ignore City-States entirely anyways.

Differing Ideology - Following an Ideology different from theirs will result in an effect similar to you denouncing them. (ND)

BNW only I presume, so not relevant yet.

Signing a Peace Treaty with a civilization you agreed to go to war with (ND)

Not yet implemented.

Spreading your religion to their Holy City forcibly (ND)

Requires religion, so I'll leave it out for now, but should be added in later.

Spreading a religion to their city while they are spreading their own religion (ND)

Requires religion, so I'll leave it out for now, but should be added in later.

Denouncing a leader they like more than you (ND)

Not implemented.

Asking them to not settle near your land/spy on you** (+1but espionage isnt added yet so ill add an asterisk)

Based on the source code, the AI never responds to these requests at all, so there are multiple things that should change here. Espionage isn't implemented yet, so I'll ignore this for now.

Demanding a trade (ND)

Requires demanding, which is also not yet implemented.

Digging up Artifacts on their land - This penalty can be turned into an act of goodwill if you turn the site into a Landmark improvement inside their borders. (BNW feature)

BNW only, so not relevant yet.

Taking part in causing failure to their proposal to the World Congress (by voting against it) (ND)

BNW only, so not relevant yet.

Declaring War on a leader you had made a Declaration of Friendship with - This is one of the most serious offenses, and it will stay on your record for the entire game! (ND)

Implemented.

Denouncing a leader you had made a Declaration of Friendship with (ND)

Not yet implemented.

Demanding they cease spying on you after you caught them in the act (ND)

Espionage is not yet implemented, so not relevant yet.

Nuking them - This is the largest non-variable action you can take against another civilization. (ND)

Implemented.

Being at War - This causes the nation to be as aggressive towards you as possible until you make peace. (+1)

Implemented.

Not denouncing another player when they ask you to - This causes them to think that you put the priorities of the nation they requested to be denounced above their own, and they will denounce you for it. (ND)

Not yet implemented.

Warmongering - This term denotes the perceived image of a nation with imperialistic ambitions which is a threat to the existence of all other nations. In short, the more wars you wage and the more cities you capture, the more other nations will see you as a Warmonger, which will negatively affect your relations with everybody. For more details on this important factor, check its article.** (+1again, technically implemented but needs an asterisk)

Implemented.

* [ ]  Warmongering. Now, this is technically implemented but i dont know if warmongering points have bene implemented, its era multiplier also, so i need someone to check whether those are implemented or not https://civilization.fandom.com/wiki/Warmongering_(Civ5) (if this is implemented please do not hardcode era multipliers into the game and just put them on the jsons of the eras.)

This is hardcoded to -5 on war declaration, and -(10 + x) when capturing a city, where x is the percentage of population of that civ living in that city. The negativety is decreased by 0.5 each turn. These probably need some rebalancing.

Trade

* [ ]  Note that you cannot trade away units of Luxury resources which are gifted by City-State Allies! also strategic resources. (ND) (Need description on whether you can trade away resources you got from trading with other civilizations)

This is correct, you should not be able to trade away luxuries and strategics received through trading or from city-states.

* [ ]  Trades must be like in civ 5, you should be able to complete more than 1 trades in a turn and there must be a what do you want for this option, i would link the issue that specifically pointed out this but i dont want to dive into the sea of closed unciv issues.

This last thing is very difficult to implement for one reason: multiplayer. In single player, the AI can respond instantly, but in multiplayer, this is way more difficult, due to the players not having to be online at the same time. There are ways around this problem, but implementing them is far from easy, and at the least I'm unwilling to do so. As for the 'what do you want for this' - agreed: this should be implemented.

* [ ]  Diplomatic relations - the better the diplomatic relations with the other nation, the more favorable conditions they will be willing to accept. So, try always to make deals with nations you're at least Neutral with - that way you'll be albe to get more profit for your goods, as opposed as making deals with Guarded or Hostile nations (if you manage to make ANY deals with them at all).

Only implemented so that enemy/unforgivable civs require 1.5 and 2 times more, respectively, for the same trade, so this seems implemented.

* [ ]  When you trade them a Luxury resource: if they're Neutral, they'll give you no more than 5 Gold per turn (GPT); if they're Friendly, they may give you as much as 7 GPT; if they're Guarded, you'll get no more than 4 GPT. An interesting quirk of the Fall 2013 patch is that if you're not Friendly with a nation, you can't exchange one-time Gold quantities, just per-turn payments. (ND) (Dont know what happens if you are in the red levels of relations with them (angry, enemy))

This first part seems like a result of how trades are evaluated and not something that should be hardcoded. The second part could be implemented, but it won't make things worse, so while it could be implemented I vote to ignore this for now.

* [ ]  You may make many demands of another nation. Whether or not they comply will depend on relations and the AI leader's Boldness (ai personalities also not implemented):
  Demand resources, Gold, or cities
  Demand that they stop settling near your territory
  Demand that they stop spying on you
  Demand that they stop spreading their religion to your cities
  Demand that they stop digging for artifacts in your territory

Not implemented yet, parts are for espionage and BNW, so I won't add these for now.

Other nations, on their turn, may also demand stuff from you. If you agree to their demand, know that you will have to spend a certain number of turns (50-100) not engaging in the activity in question. At that point, the promise will be considered fulfilled, and you may go back to doing what you were doing previously. If you break the promise before the required period has expired, relations between you will worsen. (ND) (Need description on how much relations will suffer in case of a demand, and how much military force you need to make them comply)

Implemented for settling cities, other demands are not implemented yet.

* [ ]  Also not from the wiki BUT the trades that have a turns limit in them dont scale properly in other game speeds, the ai dont accept them, like a luxury would cost 250 gold in standart, and it should cost 375 in epic but this isn't the case, either the turns should be fixed to 30 or one time payments should rise with turns edit: in unciv the turns per luxury scale with the game speed but on the wiki it says that it is static, so i dont know, unciv could make it so that it would scale with the game speed, but in this case the bug that didnt make the one time gold payments scale with game speed should be fixed

Not yet implemented.

Treaties

* [ ]  Missionaries shouldn't lose religious strength when they are in the foreign territory and you have open borders with them.

Requires religion, will be implemented in #4290 in time.

* [ ]  Defensive Pact, i wont even write about this as it would take too long so here's the wiki article for it: https://civilization.fandom.com/wiki/Diplomacy_(Civ5)

Not implemented.

* [ ]  Civilization teams

Not implemented, but not really diplomacy either, so I'll leave this out for now.

Things that still need to be done:

Embassies:

Relationship changes:

Popup requests/promises. If the player breaks/ignores promises, they should be penalized, if they keep them, rewarded:

Trade:

Other:

ajustsomebody commented 3 years ago

@xlenstra thanks for you confirmation on those values, i got a few things to say/ask though.

1: i added already implemented stuff because i dont know if the values are properly implemented, which i highly doubt

2: i think i will remove the bnw ones and make a copy of this diplomacy thread f9r things in bnw

3: isn't there a world congress in G&K? why did you say bnw only?

4: what exactly are circumstances for reviving a civilization? isnt the only one is for them to be dead?

5: i think gold per turn for relationships should be high priority in implementation and one time payment should only be for between specific relationships. also isnt one time payment ones not scaling with game speed a major problem?

6: i think we can implement trading in-turn between human and ai, and for human to human trades we can just use classic way of trade

7: could you please check if warmongering algorithm is just the same in the link i left there? (there was a 2013 patch that changed it but it should bs there too)

xlenstra commented 3 years ago

@xlenstra thanks for you confirmation on those values, i got a few things to say/ask though.

1: i added already implemented stuff because i dont know if the values are properly implemented, which i highly doubt

I'll probably check and overhaul all these values and some point in the future, but I'll add it to the list.

2: i think i will remove the bnw ones and make a copy of this diplomacy thread f9r things in bnw

3: isn't there a world congress in G&K? why did you say bnw only?

Nope, world congress is BNW only. G&K and Vanilla have 'united nations', which only vote for world leader every ~20 turns.

4: what exactly are circumstances for reviving a civilization? isnt the only one is for them to be dead?

I think so?

5: i think gold per turn for relationships should be high priority in implementation and one time payment should only be for between specific relationships. also isnt one time payment ones not scaling with game speed a major problem?

What are you referring to here?

6: i think we can implement trading in-turn between human and ai, and for human to human trades we can just use classic way of trade

Its easier if its the same system for everyone. This might be implemented later, but at the very least I have no interest on working on this for now.

7: could you please check if warmongering algorithm is just the same in the link i left there? (there was a 2013 patch that changed it but it should bs there too)

The algorithm on the wiki and the one in unciv differ by a lot

ajustsomebody commented 3 years ago

@xlenstra thanks for you confirmation on those values, i got a few things to say/ask though.

1: i added already implemented stuff because i dont know if the values are properly implemented, which i highly doubt

I'll probably check and overhaul all these values and some point in the future, but I'll add it to the list.

xlenstra commented 3 years ago

4: what exactly are circumstances for reviving a civilization? isnt the only one is for them to be dead?

I think so?

* well ok, u said that there are others i said that cause of that

If you refer to the liberation of cities, what I meant is that you always get a diplomatic boost from liberating cities, not only if the civilization that originally founded that city is completely dead.

ajustsomebody commented 3 years ago

4: what exactly are circumstances for reviving a civilization? isnt the only one is for them to be dead?

I think so?

* well ok, u said that there are others i said that cause of that

If you refer to the liberation of cities, what I meant is that you always get a diplomatic boost from liberating cities, not only if the civilization that originally founded that city is completely dead.

what do you mean by completely dead? dont you mean revival of civilizations ehile liberating cities?

xlenstra commented 3 years ago

Completely dead as in: all cities have been captured by other civs. Liberating cities can also be done to civs that are not yet dead in unciv.

ajustsomebody commented 3 years ago

Completely dead as in: all cities have been captured by other civs. Liberating cities can also be done to civs that are not yet dead in unciv.

can't you revive dead civilizations?

xlenstra commented 3 years ago

You can, but you can also liberate cities to civilizations that have not yet died

ajustsomebody commented 2 years ago

@ravignir can you provide the values for the elements if possible please?

ajustsomebody commented 2 years ago

btw i highly doubt if the values or algorithms of marked stuff are equal to ones in civ 5

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days.

yairm210 commented 5 months ago

This list is mostly done, missing diplomacy effects should be treated individually

lolafur commented 5 months ago

I don’t know how feasible this is in the game, but I would like to see one interesting diplomatic aspect. It lies in the fact that you can exchange ambassadors and conduct espionage. Players could appoint ambassadors to other civilizations to improve relations or gain intelligence, as well as protect themselves from enemy espionage.