| General | Hosted Sites | Civ5 | CivRev | Civ4Col | Civ4 | Civ3 | Civ2 | Civ1 | Misc | Marketplace |
![]() |
|
|
Welcome to Civilization Fanatics' Center. You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#301 |
|
AI programmer
Join Date: Oct 2005
Location: Australia
Posts: 1,455
|
The original code had this near the top:
Code:
if (getAnyWarPlanCount(true) > 0)
{
return DENIAL_TOO_MANY_WARS;
}
Code:
// Hide WHEOOHRN revealing war plans
if( getAtWarCount(true) > 0 )
{
return DENIAL_TOO_MANY_WARS;
}
(I don't know if it is the same in this BUG version. I'm just looking at the betterAI code.) |
|
|
|
|
|
#302 |
|
Emperor
Join Date: Nov 2009
Location: Austria
Posts: 1,147
|
nvm --- yes you are right, AtWarCount looked too similar to WarPlanCount
Last edited by Fuyu; Sep 04, 2010 at 01:36 AM. |
|
|
|
|
|
#303 |
|
Deity
Join Date: Mar 2003
Posts: 6,296
|
But why should the AI tell you it has too much on it's hands even if it's at war? In BBAI the AI can open up multiple war fronts, by tripping this trade denial, it is saying it is too weak to consider another war. Why tell other players this? I can see the logic to tell this to it's friends, but why broadcast this to all players?
__________________
Do not PM me with questions about modding. I will not answer. If you want help with something, start a thread on it, or post in a related existing thread. |
|
|
|
|
|
#304 |
|
Emperor
Join Date: Nov 2009
Location: Austria
Posts: 1,147
|
If an AI is not at war but WHEOOHRN then you know it's planning a war. If it's already in a war, then you don't gain any additional info by WHEOOHRN: the current wars could be tying the AI up, it could be a completely different reason, but in the end you don't learn whether or not the AI has any additional war plans from a WHEOOHRN of a civ that is already in war.
|
|
|
|
|
|
#305 |
|
AI programmer
Join Date: Oct 2005
Location: Australia
Posts: 1,455
|
Based on my limited knowledge, my understanding is that the AI will never be bribed into a war while it is already at war. So although it may make it's own war plans on multiple fronts, it will not be bribed into fighting on a second front under any circumstances — regardless of its strength or the strength of the enemy. That's my impression from the bits of code we've been talking about, but I could be wrong.
|
|
|
|
|
|
#306 |
|
Deity
Join Date: Mar 2003
Posts: 6,296
|
But why should the AI ever tell you it's WHEOOHRN status if it's not your friend? How would the AI ever benefit telling a player this rather then "We just don't like you enough"? The rejection tips it's hand, and that only makes sense to do for it's friends? It just seems like a bad choice for it to make, given it's options. Why tell a player basically "We are too weak to take on, or plan any other wars" when it could just as easily say "Piss off" (or "We just don't like enough"). I see no reason for the AI to tip it's hand like this, except to give an advantage to it's opponents.
__________________
Do not PM me with questions about modding. I will not answer. If you want help with something, start a thread on it, or post in a related existing thread. |
|
|
|
|
|
#307 | |
|
Deity
Join Date: Mar 2003
Posts: 6,296
|
Quote:
This is not true with BBAI: f the AI doesn't calculate that it's current WarPlan is taking up it's resources it can select other war targets (and attack them) or be bribed into other wars.
__________________
Do not PM me with questions about modding. I will not answer. If you want help with something, start a thread on it, or post in a related existing thread. |
|
|
|
|
|
|
#308 |
|
Emperor
Join Date: Nov 2009
Location: Austria
Posts: 1,147
|
If an AI is openly at war there is no use in hiding that fact in diplomacy. I understand you from a role-play point of view but hiding it simply isn't needed.
How could it be brided into other wars if there is a if (getAnyWarPlanCount(true) > 0) at the end which always prevents it? |
|
|
|
|
|
#309 |
|
Deity
Join Date: Mar 2003
Posts: 6,296
|
Ah good point. But why then will it reject a bribe if it is still willing to select new war targets on it's own? Maybe this logic got cut, but I know for a while the AI would attack multiple targets.
__________________
Do not PM me with questions about modding. I will not answer. If you want help with something, start a thread on it, or post in a related existing thread. |
|
|
|
|
|
#310 |
|
Emperor
Join Date: Nov 2009
Location: Austria
Posts: 1,147
|
I'm not saying it can't select other targets on it's own, it just won't get bribed into it.
I guess in RevDCM it can be brided into going to war with an already selected target with ruthless ai on but that's an exception, not the norm. |
|
|
|
|
|
#311 |
|
The White Wizard
|
Not true. CanTradeItem(&item, TRADE_WAR) checks for denials. (Code from memory)
__________________
"A Witty Saying Proves Nothing" -Voltaire Civilization 4 Mods: Rise of Mankind - A New Dawn 1.75 Civilization 5 Mods: Active City Defense, Tech Diffusion Minecraft Mods: Spout & Spoutcraft Lead Developer |
|
|
|
|
|
#312 |
|
Deity
Join Date: Mar 2003
Posts: 6,296
|
Well then I guess the question becomes, should the AI automatically deny a War bribe, even if it would consider war with that target (and even could be planning it) when it is already at war; should this denial be automatic? IMO it should not.
__________________
Do not PM me with questions about modding. I will not answer. If you want help with something, start a thread on it, or post in a related existing thread. |
|
|
|
|
|
#313 | |
|
The White Wizard
|
Quote:
Code:
DenialTypes CvTeamAI::AI_declareWarTrade(TeamTypes eWarTeam, TeamTypes eTeam, bool bConsiderPower) const
{
PROFILE_FUNC();
AttitudeTypes eAttitude;
AttitudeTypes eAttitudeThem;
bool bLandTarget;
int iI;
// FAssertMsg(eTeam != getID(), "shouldn't call this function on ourselves");
//AI Autoplay calls this
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 (GET_TEAM(eWarTeam).isVassal(eTeam) || GET_TEAM(eWarTeam).isDefensivePact(eTeam))
{
return DENIAL_JOKING;
}
/************************************************************************************************/
/* Afforess Start 04/06/10 */
/* */
/* Ruthless AI: Refusing war when we are planning it anyway is silly */
/************************************************************************************************/
if (AI_isChosenWar(eWarTeam) && (GC.getGameINLINE().isOption(GAMEOPTION_ADVANCED_DIPLOMACY) || GC.getGameINLINE().isOption(GAMEOPTION_RUTHLESS_AI)))
{
return NO_DENIAL;
}
/************************************************************************************************/
/* Afforess END */
/************************************************************************************************/
__________________
"A Witty Saying Proves Nothing" -Voltaire Civilization 4 Mods: Rise of Mankind - A New Dawn 1.75 Civilization 5 Mods: Active City Defense, Tech Diffusion Minecraft Mods: Spout & Spoutcraft Lead Developer |
|
|
|
|
|
|
#314 |
|
Emperor
Join Date: Nov 2009
Location: Austria
Posts: 1,147
|
Actually that code is in RevDCM, and that was what I meant before when I said the ruthless AI, unless any other, actually can get bribed into another war .. if it was already planning it anyway.
|
|
|
|
|
|
#315 |
|
Emperor
Join Date: Jun 2007
Posts: 1,453
|
I cannot get Tortoise to work with your svn directory. Whats the exact checkout link to your files?
I'm always getting errors like this: Command: Checkout from http://bullai.svn.sourceforge.net/viewvc/bullai, revision HEAD, Fully recursive, Externals included Error: Repository moved temporarily to '/viewvc/bullai/'; please relocate Finished!: |
|
|
|
|
|
#316 |
|
Emperor
Join Date: Nov 2009
Location: Austria
Posts: 1,147
|
viewvc is for looking at the svn with a web browser. For svn clients you need https://bullai.svn.sourceforge.net/svnroot/bullai
|
|
|
|
|
|
#317 |
|
Emperor
Join Date: Jun 2007
Posts: 1,453
|
Ty. Which C++ tools do you use?
I'm using Visual C++ 2005 Express, Platform SDK 2003 Server SP1, Visual C++ Toolkit 2003 and when I try to open your project file, it says something must get converted!? Any idea? |
|
|
|
|
|
#318 |
|
Emperor
Join Date: Nov 2009
Location: Austria
Posts: 1,147
|
I'm using Visual Studio .NET 2003, so my file is the same format as the original project file from BTS' CvGameCoreDLL. Not sure if you can use that one with 2005 at all, but I guess you'll find out.
|
|
|
|
|
|
#319 |
|
Deity
Join Date: Mar 2007
Location: Mountain View, California
Posts: 9,624
|
I think you're better off creating a new project. Since you're using the Express version, you won't get any of the compilation abilities and settings. All you need is to set up a new makefile project and add the files for easy editing.
__________________
Monkeys killing monkeys killing monkeys over pieces of the ground. Silly monkeys, give them thumbs they make a club and beat their brother down. BUG Mod - BTS Unaltered Gameplay [ Forum | Download | FAQ | Known Issues | Troubleshooting | Modding Tutorial ] |
|
|
|
|
|
#320 |
|
LivE LonG AnD PrOsPeR
Join Date: Dec 2005
Location: israel
Posts: 4,855
|
hey fuyu,
any chance of an update for this one?
__________________
Dawn Of the overlords _ Dune wars _Song Of The Moon 2
_Battle for Barsoom in progress-2013 "cry havoc ! and let slip the dogs of war !" |
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Merging Better AI with BUG 3.5 | Dresden | Civ4 - Better AI | 156 | Jan 27, 2011 11:22 AM |
| Better BUG AI Bug | King Flevance | Civ4 - Creation & Customization | 2 | Jan 17, 2010 02:51 AM |
| Serious bug in euro ai | Imagawa99 | Civ4Col - Bug Reports | 1 | Oct 24, 2008 11:41 PM |
| Is this a bug or is the AI senile? | dante alighieri | Civ4 - General Discussions | 3 | Oct 08, 2007 10:53 AM |
| small AI bug | LordOfTheDrinks | Civ4 - Bug Reports | 1 | Mar 04, 2006 08:41 PM |