Can AI ask for peace?

I agree with lymond. I never played Warlords but in vanilla, I know the AI used to ask for peace. I was surprised that it never happened in BTS, when I first started playing BTS, until someone who looked at the code said that it had been removed.

Where did the removed piece of code come from?
 
They didn't just come begging for peace, if they were winning they would offer peace but at a price. Basically you'd get the same options you get when you initiate contact with them, but they would sometimes initiate the contact. I miss it really and don't know why it was taken out as they can still contact you for everything else, and it just seems a bit stupid that a leader will sit idly by while his entire civilization gets beaten into the ground for decades on end and never think to at least try picking up the phone.
 
Where did the removed piece of code come from?

Sorry, but I don't recall that. Not having looked into the code myself, other than a handful of minor xml things, I did not make a note of it beyond the fact that it had changed.
 
Unfortunately removed, better to see what they will offer without having to check yourself. It doesn't have to be a white peace or the AI conceding stuff, once Isabella demanded Astronomy, I declined, she DoW'd me and then offered peace for Astronomy. I used my Galleons to good effect though
 
Where did the removed piece of code come from?
In BTS the code would have been in the GameCoreDLL folder, in the file CvPlayerAI.cpp under the function AI_DoDiplo with the rest of the dipmacy intitiating behaviours.
I don't know what the lines that were removed were however, as I don't know how to get into the vanilla DLL :shake:

It seems to be the only thing thats been removed as the related XML tags still exist.
 
For those who want to easily implement back the AI begging for peace, check in the spoilers. It's rather long, but easily explained (in steps).

Spoiler :
 
For those who want to easily implement back the AI begging for peace, check in the spoilers. It's rather long, but easily explained (in steps).

Spoiler :

Yes, very funny. Or you could just look in the Vanilla code and copy it into the BTS DLL.
 
OK, nothing to see in those spoilers.

Spoiler :


Spoiler :

LINK.

Code:
	if (GET_PLAYER((PlayerTypes)iI).isHuman())
{
if (!(abContacted[GET_PLAYER((PlayerTypes)iI).getTeam()]))
{
AI_changeContactTimer(((PlayerTypes)iI), CONTACT_PEACE_TREATY, GC.getLeaderHeadInfo(getPersonalityType()).getContactDelay(CONTACT_PEACE_TREATY));
pDiplo = new CvDiploParameters(getID());
FAssertMsg(pDiplo != NULL, "pDiplo must be valid");
pDiplo->setDiploComment((DiploCommentTypes)GC.getInfoTypeForString("AI_DIPLOCOMMENT_OFFER_PEACE"));
pDiplo->setAIContact(true);
pDiplo->setOurOfferList(theirList);
pDiplo->setTheirOfferList(ourList);
gDLL->beginDiplomacy(pDiplo, (PlayerTypes)iI);
abContacted[GET_PLAYER((PlayerTypes)iI).getTeam()] = true;
}

 
Top Bottom