I've had this happen a few times, where going to war caused some nations call me "dishonorable" and some others not being affected by my decision to go to war. I can't find a pattern as sometimes there are nations that were affected despite having shown favor to me or even if we shared the common enemy. Is there a pattern here to keep every other civ friendly when I go to war?
Good question. I've been playing on Prince level and I would like to suggest some principles that may help you to go to war without getting everyone else displeased. As you know, going to war can be very beneficial but also: Hostile/Guarded Civilizations are next to impossible to trade with.
You may be able to go to war without diplomatic penalty by signing a Defensive Pact with a friend, and then paying the leader that you want to go to war with, to Declare War on your friend. However the very act of Declaring Friendship nearly always results in getting just about everyone else displeased, precisely what we are trying to avoid.
You can Declare War freely if you pay everyone else to declare war on him/her first.
Declaring war, on an map filled with islands, at the beginning of the game as soon as make first contact with other Civilizations is OK. Nobody will accuse you of warmongering, like they do later.
However, the big problem is this: you go to war, you demolish them, you don't commit genocide (because that will get you accused of warmongering by everybody). Instead you leave them a little runt of a village on some lonely tundra. You even sign a peace treaty whereby they give you a couple thousand gold and Furs. Everything seems fine. Is everything fine? No! First they will Denounce you. Then they will go around making Declarations of Friendship with as many other Civs as they can. Then the other Civs will start Denouncing you. In the end most other Civs are Hostile/Guarded.
To get around this, I've been trying to sow the seeds of discord, e.g. I declared war on America and Suleiman as soon as I met them at the beginning of the game. It took ages for me to beat Suleiman and in that time America had made Friends with India, Arabia and Siam. So I paid India, Arabia and Siam to Declare war on America. They only stayed at war for a relatively short time, but I it seemed to sour relationships enough, to stop America poisoning everyone against me.
You can also steal Workers from your enemy and march them over to Barbarian camps whereby they will be captured. Then when your enemy begs for peace, and you accept, immediately sack the Barbarian camp, and return the worker. This will create the green "You freed their captured citizens!" pacifier which often is enough to prevent them Denouncing you.
It is also worth noting that your enemy can only Denounce you (and thereby turn everyone against you) once you have made peace with them.
(I also played one game where I sacked a City-State and Siam Denounced me as a warmonger, but then reloaded the auto-save and sacked the City State again + also paid Siam a stack of gold. And then they didn't Denounce me.)
So not only is it possible to declare war on Civs without diplomatic problems you can also commit genocide with impunity, through the Wonderful Use of Genocidal Proxies! e.g. after capturing all but 1 city from your enemy, pay a nearby Civ to declare war on your enemy, (perhaps also gift them 1 or 2 Longswordsmen), then hammer the last city of your enemy yourself with your navy until their green city defence bar is at zero. Then wait...eventually...... the last city will be captured, (and everyone will dislike/denounce your mercenary Civilization for doing the dirty deed).
In general, paying other Civs to Declare War, will sometimes convert Neutral Civs to Friendly status (in fact it seems it may also sometimes make your enemy Friendly after he/she sues for peace)
My 10 point plan for keeping everyone Friendly is as follows:
NB this plan doesn't work all the time - it does help but the game is geared towards war, like walking on egg shells. However since following this plan + paying other civilization to Declare War on my enemies, I have had all 11 other Civilizations on Friendly status (currently I have all Civs Friendly with 2 completely destroyed by proxies and the other 1 Guarded on a little one hex island, but not Denouncing me).
Generally, it rather helps to understand the reasons behind the disposition of each Civilization: If you click the Diplomacy button at the top-right of the screen, it will show a list of any other Civilizations that you have met. By each of these is their current disposition towards you: Neutral, Friendly, Hostile, Guarded and Afraid (btw the last of these is rare, only appearing if you get the white "They fear your might" trigger).
By hovering the mouse over the disposition of each civilization, you should get some reasons for their current disposition, (the following lists are probably incomplete):
Pacifiers/reasons for friendship (green):
Triggers/reasons for hostility (red):
So it seems like there's 5 times as many ways to provoke hostilites with a leader as there are ways to make friends with him or her. Gifts usually don't seem to count for much. However, (as i said before), if you publicly Declare your Friendship, then the Civilization that you are "Friends" with, will demand the odd gift, and if you don't agree then they will probably Denounce you, leading to "Your friends found reason to Denounce you" affecting all Civilizations. To be honest, I am beginning to wonder: In Civ 5, are Declarations of Friendship worth it?
Overall, diplomacy is very opaque in Civilization 5. I have some ideas, but they are speculation. Since there aren't any more certain answers, I'll post them in the hopes that someone can find a reference proving or disproving them. Please consider them theories to be tested.
I recall reading that nations (and/or city-states?) get nervous if you keep going to war with and conquering your neighbors (nations or city-states). Unfortunately, I can't recall where I read that.
Further, I know for sure how things worked in Civilization 4, and they may well have repeated the same mechanics. In Civilization 4, other nations don't like when:
Overall, remember that all the Civilization games are at least loosely based on how the real world works. If another nation thinks you're dishonorable, you can always just ask yourself "What have I done that another nation would consider dishonorable?"
The flip side of this is that if you nurture relationships with city states (not civs), they will declare war on anyone you declare war on. These favorable relationships also help you in other ways: I had free food in all cities, and the city states actually doubled my science and culture capacity. I hit future age when other civs were only entering modern age.
I just won a game by UN vote and when I declared war on Japan, 9 other city states jumped in on my side. Several shared a border with them, so they started attacking cities.
Unfortunately, one city state had a unit grouped up with mine against a city, and after I had brought it's health down, their unit struck the final blow and stole the city out from under me!
One of the other keys things to remember when you are going to war is pact of secrecy. I've read heaps of reports that say they are useless but that is incorrect. If you have a pact of secrecy with, say, Washington, and against Montezunma, and you declare war against Montezuma, then your relationships with Washington will not be harmed. It took me a few games to confirm this, but i am sure im right.
Unfortunately, most of the time you cant ask for a pact of secrecy, you have to be offered it. This is a shame but unavoidable.
And one other thing. IF you make someone else hate you and then declare war on you (just tell them they cant settle cities near you, and demand heaps of stuff off them) then your relations are not damaged as badly as if you declared the war yourself.
Related to WillfulWizard's answer, the other night I was preparing for an attack on Siam by bringing up my troops to his border. The turn before I was about to attack, the diplomacy window popped up and he asked me about the troops massing on his border. Since I was about to attack anyway, I clicked the option that declared war. His response was something about "I appreciate your honesty". So it stands to reason that if I had denied that I was preparing for war, but had then declared war shortly thereafter, other civs would've been less likely to trust me in the future.
In general, if you're trying to preserve your reputation, don't accept any deals with someone you plan to attack, and declare your attack openly.