Thread Tools
Old December 24, 2000, 00:43   #1
colorme
Warlord
 
Local Time: 09:46
Local Date: October 31, 2010
Join Date: Nov 2000
Posts: 122
Civs love each other now

Playing around the diplomacy.txt, I was able to get the AI civs love each other (a big change from them being constantly at war!)

The trick is (I believe)
a. Change the number in top of diplomacy.txt to # 3
instead of # 2 . I believe 2 is a mistype.
b. Change the various incursion/invasion numbers (these are per-turn regard numbers) in
DEFAULT diplomacy to 0. Thus, AIs won't hate each other for minor actions.
c. Add more meat to the MAKE_FRIEND diplomacy type. Right now it is pathetically meaningless. In particular, increase the priorities of the good proposals such as GIVE_GOLD, etc.

All the above changes are in diplomacy.txt. Make sure that you don't change the order of the various ProposalElements, else the game may crash in a few turns. Also, don't use the function
ChangeGlobalRegard(player, delta, explanationID).
I crashed the game a few turns after this was used.

Heck, some of these civs that loved me even began offering me gold! Also, at least one civ was at war with another, so there is some fight going on.

BTW, I also added an extra bit of diplomacy SLIC, to the effect that
"If the minimum distance between AI1 cities and AI2 cities is greater than 20 (or whatever you want), ConsiderDiplomaticState(...,MAKE_FRIEND,...)".
This may also have created the above lovebug. I was unable to verify if this piece of code is the one responsible for all that love, because I don't know how to access the player's current diplomatic states.

Clearly, other conditions can be similarly created, depending on the opponent's strengths.


colorme is offline  
Old December 24, 2000, 18:47   #2
MarkG
Guest
 
Posts: n/a
from what you're saying, the ai also loves "easier" you as well, right?

the better(?) would be to love other ai's and hate you(i think)
 
Old December 24, 2000, 20:31   #3
colorme
Warlord
 
Local Time: 09:46
Local Date: October 31, 2010
Join Date: Nov 2000
Posts: 122

Well you're right. I was just trying to be fair

Programming the AIs to hate the human is fairly easy - just add the check that ~IsHuman(player[1]) or some such in the code that spreads the love.

colorme is offline  
Old December 24, 2000, 20:33   #4
colorme
Warlord
 
Local Time: 09:46
Local Date: October 31, 2010
Join Date: Nov 2000
Posts: 122
Currently the diplomacy2.slc that I've made is as below. Consider it a gratuitous Christmas gift

diplomacy2.slc (include this in script.slc):


int_t messarmysize;


HandleEvent(NextDiplomaticState) 'Distance_NextDiplomaticState_F' pre {

int_t mnctyapart;
int_t clsecity;
int_t dist_measure;

mnctyapart = 300;
clsecity = 100;

int_t i;
int_t j;
int_t play0;
int_t play1;
int_t db_index;
int_t ss_priority;


city_t capcity0;
city_t capcity1;
int_t flagthreat;

flagthreat = 0;

// capcity0 = player[0].capital; // Broken !!
// if (CityIsValid(capcity0)) {
// }
// else {
// capcity0 = player[0].largestcity; //Broken!!
// }

for (i=0; i for (j=0; j GetCityByIndex(player[0], i , capcity0);
GetCityByIndex(player[1], j , capcity1);

dist_measure = SquaredDistance(capcity0.location, capcity1.location);

if (dist_measure < mnctyapart){
if (dist_measure < clsecity) {
// hey, this guy is too close!
flagthreat = 2;
}
elseif (flagthreat == 0) {
// close, but not that close
flagthreat = 1;
}
}

}
}

if (flagthreat == 0) {
// Be nice to the guy! He's too far
ss_priority = 5000;
db_index = DiplomacyDB(DIPLOMACY_MAKE_FRIEND);
ConsiderDiplomaticState(player[0], player[1], ss_priority,db_index);

}
elseif (flagthreat == 2) {
// this guy is real close. he'll be a pain!
if (player[0].militaryunits > 2*player[1].militaryunits) {
//Go get him!! he's very weak!
ss_priority = 5000;
db_index = DiplomacyDB(DIPLOMACY_PROVOKE_WAR);
ConsiderDiplomaticState(player[0], player[1], ss_priority,db_index);
}
elseif (player[1].militaryunits > 2*player[0].militaryunits) {
//Don't provoke!! he's very strong!
ss_priority = 10000;
db_index = DiplomacyDB(DIPLOMACY_DEFAULT);
ConsiderDiplomaticState(player[0], player[1], ss_priority,db_index);
}
}

}

[This message has been edited by colorme (edited December 24, 2000).]
colorme is offline  
Old December 26, 2000, 14:43   #5
MarkG
Guest
 
Posts: n/a
i have this wierd feeling that lots of people would prefer it if you package this as a mod
 
Old December 27, 2000, 17:49   #6
colorme
Warlord
 
Local Time: 09:46
Local Date: October 31, 2010
Join Date: Nov 2000
Posts: 122

I'm too lazy to do that. Also, it is not clear yet if the above helps ...

I also changed diplomacy.txt (that's the file that defines the different diplomatic states). The most important change I made there is setting the

invasion,incursion regards in DIPLOMATIC_DEFAULT equal to 0 per turn.

Right now, the way it is set, the AIs soon start hating each other because a couple of solitary enemy units are wandering about their empire.

In the most recent game I played, I have the AI warring with at most one or two other AIs; a big change from my earlier games where everyone hated everyone else!

Unfortunately, I haven't been able to get any one AI to completely crush its weaker neighbor yet ...
colorme is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:46.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team