Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site forums as they ran on Ultimate Bulletin Board, 1998–2001. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 2005 site & forums

  Apolyton Civilization Site Forums
  CtP2-Creation
  Civs love each other now

Post New Topic  Post A ReplyPost A Reply In A New Window

profile | register | preferences | faq | search next newest topic | next oldest topic bottom of page
Author
Topic:   Civs love each other now Format for Better Printing
colorme
Chieftain

Nov 2000
posted December 23, 2000 23:43   Click Here to See the Profile for colorme   send a private message to colorme
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only

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.


MarkG
Apolyton CS Co-Administrator
Greece
b.02-15-99
posted December 24, 2000 17:47   Click Here to See the Profile for MarkGClick Here to Email MarkG  send a private message to MarkGSend a Message to UIN: 2865183 Visit MarkG's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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)

colorme
Chieftain

Nov 2000
posted December 24, 2000 19:31   Click Here to See the Profile for colorme   send a private message to colorme
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only

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
Chieftain

Nov 2000
posted December 24, 2000 19:33   Click Here to See the Profile for colorme   send a private message to colorme
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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).]

MarkG
Apolyton CS Co-Administrator
Greece
b.02-15-99
posted December 26, 2000 13:43   Click Here to See the Profile for MarkGClick Here to Email MarkG  send a private message to MarkGSend a Message to UIN: 2865183 Visit MarkG's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
i have this wierd feeling that lots of people would prefer it if you package this as a mod
colorme
Chieftain

Nov 2000
posted December 27, 2000 16:49   Click Here to See the Profile for colorme   send a private message to colorme
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only

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 ...

Apolyton Civilization Site Forums
> > > CtP2-Creation Forum

next newest topic | next oldest topictop of page

All times are EDT

Administrative Options: Close Topic | Archive/Move | Delete Topic | Top
Post New Topic  Post A ReplyPost A Reply In A New Window
Hop to:

Contact Us
Apolyton Civilization Site

Powered by: Ultimate Bulletin Board, Version 5.44a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 2000.

Front Page | Civilization III | Dinosaurs | Civilization II | Call to Power | Call to Power II | Alpha Centauri | Alternative Civs | Misc | Links | About ACS | GameStats
GameLeague | Scenario League | Hodadian Award Central | Civilization Scenario Collection | Spanish CivII Site | Clash of Civs | CtP Maps | Art of War