1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Is there anyone who played before BTS released?

Discussion in 'Civ4 - General Discussions' started by spqkfk, Nov 14, 2019.

  1. spqkfk

    spqkfk Chieftain

    Joined:
    Jun 20, 2019
    Messages:
    3
    I heard that before BTS( in Vanilla, Warlord ), AI used to ask for peace to player.
    But I've never seen that in BTS.
    Is this True?
     
  2. lymond

    lymond Rise Up! (Phoenix Style!) Hall of Fame Staff

    Joined:
    Mar 11, 2008
    Messages:
    20,651
    Yep, AIs would offer peace deals. Can't remember if it was just Vanilla or present in Warlords too.
     
  3. spqkfk

    spqkfk Chieftain

    Joined:
    Jun 20, 2019
    Messages:
    3
    Really?
    Wow.. I have no idea why they put it off.
    It would be more fun if they kept it, I think.

    Well, now I am thinking if there are any mods which enable that feature again.
    Do you have any clues?
     
  4. Lexicus

    Lexicus Deity

    Joined:
    Aug 28, 2007
    Messages:
    22,818
    Location:
    Sovereign State of the Have-Nots
    I'm like 95% sure I've had the AI offer me peace in BTS too...but maybe I'm wrong...
     
  5. Colon

    Colon King

    Joined:
    Sep 25, 2001
    Messages:
    644
    Huh? Doesn't the AI ask for peace in BTS? Am I that oblivious I never realised during the course of many years?
     
  6. Major Tom

    Major Tom Immortal

    Joined:
    Jun 1, 2005
    Messages:
    559
    Location:
    Oslo
    Either they refuse to talk or they will talk, but human needs to take initiative. They will take initiative to surrender and become vassal when doomed, tho. I think.

    Edit: Recently finished (and won) two conquest games and at no point they took initiative to talk peace. Vassals was off there.
     
  7. lymond

    lymond Rise Up! (Phoenix Style!) Hall of Fame Staff

    Joined:
    Mar 11, 2008
    Messages:
    20,651
    Nope..they don't do not do that..that is still a peace deal by the way

    You may be confusing that with them offering to peace vassal
     
    Last edited: Nov 16, 2019
  8. Lennier

    Lennier Emperor

    Joined:
    Mar 10, 2013
    Messages:
    1,220
    Gender:
    Male
    Location:
    Orange County, NY
    They will sometimes offer to be your peace vassal.
     
  9. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    512
    Location:
    Germany
    I'm almost positive that it's a bug, i.e. not an intentional change.
    Civ4BeyondSword.exe double-checks all AI-initiated offers at the start of the human turn, and that's where the peace offers get killed. I guess that's why none of the unofficial patches fixed this; source code for the GameCore DLL is available, but not for the EXE. It is possible to fix it through a workaround in the DLL, and I did that earlier this year in my mod Advanced Civ. To my knowledge, @keldath's Doto is the only other mod that has adopted my bugfix. I'm attaching a screenshot of a peace offer (a capitulation offer; it's the only screenshot I have at hand). I don't think that the AI suing for peace adds much to the game really; just a bit of flavor.
     

    Attached Files:

  10. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,520
    Location:
    israel
    Amen to that man!
     
  11. swipernoswiping

    swipernoswiping Chieftain

    Joined:
    Oct 17, 2015
    Messages:
    2
    Really? Literally, I had no idea that was ,actually, a bug.
    I thought that it is related to the dopeace part in some way. So I searched it but couldn't find anything from it.
    Now I see what was wrong.

    Btw, I'm defenitely gonna try your mod. It looks really promising.
    Thank you so much!! :thumbsup:
     
  12. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    512
    Location:
    Germany
    The DLL side is fine, i.e. beginDiplomacy gets called. I'm guessing that the additional check is part of the trade table code in the EXE. And, apparently, the EXE requires the two teams to be at peace when it should actually require them to be at war. So the workaround is to have CvTeam::isAtWar lie to the EXE at just the right moment. Cool that I'm not the only person who cares about this obscure error.
     
    Imp. Knoedel and gavenkoa like this.
  13. Civlopod

    Civlopod Chieftain

    Joined:
    Dec 5, 2019
    Messages:
    4
    Gender:
    Male
    I bought Vanilla Civ 4 and was not really impressed. Mainly because religion was used as espionage, and founding a religion meant you could see what was going on in every city with the religion present. It made religion a huge liability if it wasn't your own. They didn't alter it until BTS, which fixed things nicely.
     
  14. Bestban

    Bestban Chieftain

    Joined:
    Oct 13, 2019
    Messages:
    18
    Gender:
    Male
    Nice finding and good job! Thanks, f1rpo :thumbsup:. I'll port your commit as my very first modding exercise over an yet-to-exist personal mod :lol:, based on said BBAI.
     
    Last edited: Dec 7, 2019
  15. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    512
    Location:
    Germany
    That commit is wordier than I remembered it. :mischief: It should work correctly, but I've made a couple of improvements since then:
    Spoiler technical details :

    - Added a .def file to avoid the messy changes to isAtWar calls in CvGameCoreUtils.cpp and CvPlayer.cpp (Git commit). That requires the /DEF:CvGameCoreDLL.def option when linking.
    - Added a line to CvPlayerAI::AI_offerCapitulation to get the AI to offer reparations along with a capitulation.
    It might be best to run a full-text search for "advc.134a" on the latest CvGameCoreDLL folder and to mostly disregard the Git commits.
    Anyway, good luck.
     

Share This Page