case TRADE_MAPS:
if (getTeam() != GET_PLAYER(eWhoTo).getTeam())
{
if (GET_TEAM(getTeam()).isMapTrading() || GET_TEAM(GET_PLAYER(eWhoTo).getTeam()).isMapTrading())
{
return true;
}
}
break;
case TRADE_MAPS:
if (getTeam() != GET_PLAYER(eWhoTo).getTeam())
{
if (GET_TEAM(getTeam()).isMapTrading() || GET_TEAM(GET_PLAYER(eWhoTo).getTeam()).isMapTrading())
{
[COLOR="Red"]if (GET_TEAM(getTeam()).canSignOpenBorders(GET_PLAYER(eWhoTo).getTeam()))[/COLOR]
[COLOR="red"]{[/COLOR]
return true;
[COLOR="red"]}[/COLOR]
}
}
break;
Something I've always wanted in the game is better Diplomacy
Anyway, one thing that would be nice is a non-permanent alliance.
I'll set up a scenario to better explain. I am Lincoln. I am allied with Victoria.
If I declare war with anyone, Victoria is automatically prompted to either join the war or break the alliance. If she breaks the alliance, we lose a few relation points, and possibly it auto-cancels other deals (thoughts on this?). The same thing would happen to me if Victoria declares war, of course. The leader of an alliance (whoever either declared the war, or was declared on) negotiates peace for the whole alliance.
Also, if say Victoria is allied with Peter, and I am not allied with Peter. Victoria joins a war I declared, Peter probably should either not be prompted, or should be prompted but will have no penalties for not joining. (thoughts on this also? I think Alliance Chains would get annoying; one war might trigger the whole world. But, also, this is kind of realistic. )
Also, when declaring war, another nice feature is the 'Are you sure?' prompt should list their allies (and indirect allies from chains if chains are there.)
That's actually a LOT more complex than you think it is. Several modders, including myself discussed it a few months back on the Better AI forums, but the agreement was that the cost-to-benefit ratio was too low to add it as a feature.
if (AI_getContactTimer(((PlayerTypes)iI), CONTACT_PEACE_PRESSURE) == 0)
{
if (GC.getGameINLINE().getSorenRandNum(GC.getLeaderHeadInfo(getPersonalityType()).getContactRand(CONTACT_PEACE_PRESSURE), "AI Diplo End War") == 0)
<!-- Afforess Advanced Diplomacy-->
<ContactRand>
<ContactType>CONTACT_PEACE_PRESSURE</ContactType>
<iContactRand>100</iContactRand>
</ContactRand>
<ContactRand>
<ContactType>CONTACT_EMBASSY</ContactType>
<iContactRand>25</iContactRand>
</ContactRand>
<ContactRand>
<ContactType>CONTACT_TRADE_STOP_TRADING</ContactType>
<iContactRand>20</iContactRand>
</ContactRand>
<ContactRand>
<ContactType>CONTACT_TRADE_JOIN_WAR</ContactType>
<iContactRand>10</iContactRand>
</ContactRand>
<ContactRand>
<ContactType>CONTACT_TRADE_MILITARY_UNITS</ContactType>
<iContactRand>15</iContactRand>
</ContactRand>
<ContactRand>
<ContactType>CONTACT_TRADE_WORKERS</ContactType>
<iContactRand>25</iContactRand>
</ContactRand>
<ContactRand>
<ContactType>CONTACT_TRADE_CONTACTS</ContactType>
<iContactRand>25</iContactRand>
</ContactRand>
<!-- Afforess Advanced Diplomacy-->
<!-- Afforess Advanced Diplomacy-->
<ContactRand>
<ContactType>CONTACT_PEACE_PRESSURE</ContactType>
<iContactRand>100</iContactRand>
</ContactRand>
<ContactRand>
<ContactType>CONTACT_EMBASSY</ContactType>
<iContactRand>25</iContactRand>
</ContactRand>
<ContactRand>
<ContactType>CONTACT_TRADE_STOP_TRADING</ContactType>
<iContactRand>20</iContactRand>
</ContactRand>
<ContactRand>
<ContactType>CONTACT_TRADE_JOIN_WAR</ContactType>
<iContactRand>10</iContactRand>
</ContactRand>
<ContactRand>
<ContactType>CONTACT_TRADE_MILITARY_UNITS</ContactType>
<iContactRand>15</iContactRand>
</ContactRand>
<ContactRand>
<ContactType>CONTACT_TRADE_WORKERS</ContactType>
<iContactRand>25</iContactRand>
</ContactRand>
<ContactRand>
<ContactType>CONTACT_TRADE_CONTACTS</ContactType>
<iContactRand>25</iContactRand>
</ContactRand>
<!-- Afforess Advanced Diplomacy-->
<!-- Afforess Advanced Diplomacy-->
<ContactDelay>
<ContactType>CONTACT_PEACE_PRESSURE</ContactType>
<iContactDelay>100</iContactDelay>
</ContactDelay>
<ContactDelay>
<ContactType>CONTACT_EMBASSY</ContactType>
<iContactDelay>25</iContactDelay>
</ContactDelay>
<ContactDelay>
<ContactType>CONTACT_TRADE_STOP_TRADING</ContactType>
<iContactDelay>20</iContactDelay>
</ContactDelay>
<ContactDelay>
<ContactType>CONTACT_TRADE_JOIN_WAR</ContactType>
<iContactDelay>20</iContactDelay>
</ContactDelay>
<ContactDelay>
<ContactType>CONTACT_TRADE_MILITARY_UNITS</ContactType>
<iContactDelay>20</iContactDelay>
</ContactDelay>
<ContactDelay>
<ContactType>CONTACT_TRADE_WORKERS</ContactType>
<iContactDelay>20</iContactDelay>
</ContactDelay>
<ContactDelay>
<ContactType>CONTACT_TRADE_CONTACTS</ContactType>
<iContactDelay>15</iContactDelay>
</ContactDelay>
<!-- Afforess Advanced Diplomacy-->
bConsiderPeace = ((GET_TEAM(getTeam()).AI_getAtWarCounter(GET_PLAYER((PlayerTypes)iI).getTeam()) > 10) || (GET_TEAM(getTeam()).getAtWarCount(false, true) > 1) ||
bConsiderPeace = ((GET_TEAM(getTeam()).AI_getAtWarCounter(GET_PLAYER((PlayerTypes)iI).getTeam()) > 10) || (GET_TEAM(getTeam()).getAtWarCount(true) > 1) ||
//If using RevDCM, use AI_beginDiplomacy, otherwise, use gDLL->beginDiplomacy()
gDLL->beginDiplomacy(pDiplo, (PlayerTypes)iI);
//AI_beginDiplomacy(pDiplo, (PlayerTypes)iI);