1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

We would have nothing to gain.

Discussion in 'Civ4 - Strategy & Tips' started by Outlandish, May 16, 2020.

  1. Outlandish

    Outlandish Chieftain

    Joined:
    May 14, 2009
    Messages:
    86
    In my current game Zara will not be bribed vs Elizabeth. He will be bribed against Huayna and Ragnar. He shares a religion with none of them, is on his own island, and is not trading with her because I got an embargo in a trade deal. He is at cautious with all 3 of them.

    The reason given is "We would have nothing to gain". They all would seem to have the same value in terms of being a target, and Elizabeth is by far the closest to him and he declared war against her earlier in the game. I'm assuming that the only possible reason then is military strength, and she is the point leader at the moment, but I am curious if I am missing something as I've definitely seen "We are afraid of their military might" before.

    Zara built the AP for Judaism. Elizabeth founded Judaism but is running Hinduism which she also founded. She is annoyed with Zara, it seems unlikely he'd ever get her votes in the AP and she's founded 3 religions which would seem to make her the likeliest threat for a culture win so if he wants to win by culture or religion it also seems she should be a target.
     
  2. Tobiyogi

    Tobiyogi King

    Joined:
    Nov 23, 2018
    Messages:
    879
    Gender:
    Male
    Location:
    Berlin, GE
    From my observation, nothing to gain comes either from "too far away" or "too strong". It is less of an ashaming statement than to admit "afraid of them". I would only suppose, if the ratio difference becomes too big, they might say "afraid of their strength" and if the ratio is closer, it's only "nothing to gain". The difference in military techs might also come into play.
     
  3. Kid R

    Kid R Emperor

    Joined:
    Jan 26, 2009
    Messages:
    1,487
    Just from a quick look at the code it seems "nothing to gain" is said in a couple of situations. One is when there's only 2 civs remaining and you offer a defensive pact. The more usual one would be in war bribes where it does a military power comparison. Call the proposed target "target" and the civ we are proposing war to "friend"...

    T. Calculate target's military power, including any defensive pact partners they have
    ...If target is a land target of friend (i.e. has 8 or more adjacent land tiles), halve the target's power
    F. Calculate friend's military power
    ....If we ourselves are already at war with target, add our power to friend's power

    It's a simple comparison of whether F > T. If not, friend will reply either "We are afraid of their military might" (land targets) or "We would have nothing to gain" (otherwise). Which seems kind of wooly diplomatic talk because really they just don't fancy it :D

    If the power test is passed, it moves on to attitude tests. The whole sequence is first WHEOOHRN, 2nd the power test, 3rd is friend's attitude to us (i.e. they must like us enough), 4th is friend's attitude to target (i.e. they must dislike them enough).

    Spoiler Code... :
    Code:
    DenialTypes CvTeamAI::AI_declareWarTrade(TeamTypes eWarTeam, TeamTypes eTeam)
    {
    	PROFILE_FUNC();
    
    	AttitudeTypes eAttitude;
    	AttitudeTypes eAttitudeThem;
    	bool bLandTarget;
    	int iI;
    
    	FAssertMsg(eTeam != getID(), "shouldn't call this function on ourselves");
    	FAssertMsg(eWarTeam != getID(), "shouldn't call this function on ourselves");
    	FAssertMsg(GET_TEAM(eWarTeam).isAlive(), "GET_TEAM(eWarTeam).isAlive is expected to be true");
    	FAssertMsg(!isAtWar(eWarTeam), "should be at peace with eWarTeam");
    
    	if (isHuman())
    	{
    		return NO_DENIAL;
    	}
    
    	if (getAnyWarPlanCount(true) > 0)
    	{
    		return DENIAL_TOO_MANY_WARS;
    	}
    
    	bLandTarget = AI_isLandTarget(eWarTeam);
    
    	if ((GET_TEAM(eWarTeam).getDefensivePower() / ((bLandTarget) ? 2 : 1)) >
    		  (getPower() + ((atWar(eWarTeam, eTeam)) ? GET_TEAM(eTeam).getPower() : 0)))
    	{
    		if (bLandTarget)
    		{
    			return DENIAL_POWER_THEM;
    		}
    		else
    		{
    			return DENIAL_NO_GAIN;
    		}
    	}
    
    	eAttitude = AI_getAttitude(eTeam);
    
    	for (iI = 0; iI < MAX_PLAYERS; iI++)
    	{
    		if (GET_PLAYER((PlayerTypes)iI).isAlive())
    		{
    			if (GET_PLAYER((PlayerTypes)iI).getTeam() == getID())
    			{
    				if (eAttitude <= GC.getLeaderHeadInfo(GET_PLAYER((PlayerTypes)iI).getPersonalityType()).getDeclareWarRefuseAttitudeThreshold())
    				{
    					return DENIAL_ATTITUDE;
    				}
    			}
    		}
    	}
    
    	eAttitudeThem = AI_getAttitude(eWarTeam);
    
    	for (iI = 0; iI < MAX_PLAYERS; iI++)
    	{
    		if (GET_PLAYER((PlayerTypes)iI).isAlive())
    		{
    			if (GET_PLAYER((PlayerTypes)iI).getTeam() == getID())
    			{
    				if (eAttitudeThem > GC.getLeaderHeadInfo(GET_PLAYER((PlayerTypes)iI).getPersonalityType()).getDeclareWarThemRefuseAttitudeThreshold())
    				{
    					return DENIAL_ATTITUDE_THEM;
    				}
    			}
    		}
    	}
    
    	return NO_DENIAL;
    }
    
     
    Last edited: May 17, 2020
    krikav and Kaitzilla like this.
  4. Outlandish

    Outlandish Chieftain

    Joined:
    May 14, 2009
    Messages:
    86
    Fantastic, thanks for diving into the code.
     
  5. Major Tom

    Major Tom Immortal

    Joined:
    Jun 1, 2005
    Messages:
    634
    Location:
    Oslo
    Thanks for good explanation. Will just add that the attitude check thresholds in 3 and 4 can be found in the Strategy article section “Know your enemy” by @Kaitzilla
     
  6. Kid R

    Kid R Emperor

    Joined:
    Jan 26, 2009
    Messages:
    1,487
    Yeah, Know Your Enemy and all the collected links are an endless source of good information :goodjob:

    I guess here it's a much simpler and coarser test than the regular war-planning thought process the AI goes through every turn, which Dan F explored in a lot of detail. This is just a few high level things before the AI thinks it's even worth sitting down and talking about what the war bribe might actually cost you.

    For persuading an unwilling AI, maybe it'd sometimes be useful to know whether we could try and get the power ratio up to equal (distant targets), or just half (nearby targets), which the response phrasing shows. In the OP Zara on his own island would be saying "nothing to gain" because his power is less than Elizabeth's, as suspected. Could maybe gift him a handful of strong units or something?
     

Share This Page