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

Version 1.01 discussion thread

Discussion in 'Civ4 - Better AI' started by jdog5000, Jul 1, 2010.

  1. phungus420

    phungus420 Deity

    Joined:
    Mar 1, 2003
    Messages:
    6,296
    Unfortunately jdog has disapeared for the last couple of months, so any further development would really need to be picked up by EF or Fuyu I guess. For what it's worth though, I agree on the barbs, they really should stop using the regular civ SelectionGroup logic and stop running choke strategies on real players, it's not fun when the do, and doesn't improve the game. But keep in mind writing new Stack logic specifically for barbs would be quite a bit of work, as they have always just used the standard AI logic.
     
  2. mwyeoh

    mwyeoh Chieftain

    Joined:
    Jun 5, 2009
    Messages:
    33
    I quite like it the way it is. The barbarians before would just suicide into your cities, but now that they pillage you, you actually need attacking defenders too. (For both single player and multiplayer games- which I play alot of)

    You could always turn barbarians off, or if you have raging barbarians on, turn that off.
     
  3. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    Keep in mind that this is the Better AI mod. Not "Better Realism", or something else. I'm glad Jdog made the Barbarians a real threat, and changing them to act against their own best interests would be contrary to the goal of the mod.
     
  4. r_rolo1

    r_rolo1 King of myself

    Joined:
    May 19, 2006
    Messages:
    13,818
    Location:
    Lisbon, Portugal
    And the best interest of barbs is ... ? Yup, the thing that makes them fulfill their objective faster and without bumps. And their objective is ...? ;)

    Like pointed , the developers didn't considered barbs as anything else besides a glorified and animated verison of unhealthiness from FP, a PITA, but with no pretensions of winning the game ( in fact, they can't win the game , except in next war, but that is another issue ) . To add, they get units diferently, they tech diferently, they have diferent goals ... in resume , they aren't regular AI and should not be treated as such.

    Barbs were never meant to act as a coordinated entity, just for starters. The fact they can't have a palace speaks loudly on the coders intention in that. Making barbs acting coherently besides being a awful gameplay decision ( just check what happens in broken star, where the map maker had the terrible idea of making all the rebels a single barbarian nation ), is against the coders intentions IMHO. Not mentioning the point LT raised on how thinly that reasoning holds in the hypotetical case of a BBAI MP game with all humans.

    True , this is Better AI mod. The problem is that barbs were never meant to be looked as one :D
     
  5. TheMeInTeam

    TheMeInTeam Top Logic

    Joined:
    Jan 26, 2008
    Messages:
    25,325
    I'm afraid using "coder intention" is an extremely shaky argument in civ IV.

    But the rest of Rolo's points hold.
     
  6. r_rolo1

    r_rolo1 King of myself

    Joined:
    May 19, 2006
    Messages:
    13,818
    Location:
    Lisbon, Portugal
    My point with "coder's intention" was based on jdog modding philosophy in here: if possible and advisable, respect the original coders intention. Nothing more ;)
     
  7. Fuyu

    Fuyu Emperor

    Joined:
    Nov 5, 2009
    Messages:
    1,225
    Location:
    Austria
    So the consensus is barbs units shouldn't group as much? That can be arranged I think. They're all just running UNITAI_ATTACK_CITY_LEMMING, right?.. Nah, can't be right, CvUnitAI::AI_attackCityLemmingMove() doesn't even contain any groupmerging .. Does anyone know what unitais the barb land units are running?
     
  8. phungus420

    phungus420 Deity

    Joined:
    Mar 1, 2003
    Messages:
    6,296
    UNITAI_ATTACK_CITY_LEMMING is only used for barb units spawned by random events, such as the Aryan invasion event. Unfortunately most of the barb land units run regular old unitAIs. Just look at them in WB, also the barbarian civ tries to run itself like a regular civ, there is no special logic for it, it's just the game rules hamstring it (not being able to have a palace and having all your cities randomly spawn all over the world make things like teching and coordinating impossible). The issue is though that with BBAI randomly spawned barb units will sometimes merge together into regular attack stacks, and then procede to choke actual players, AI or human.

    Fixing it would probably be as easy as forcing any land unit owned by the barbs to run UNITAI_ATTACK_CITY_LEMMING, probably wouldn't hurt to force all naval units to run UNITAI_PIRATE as well.

    Edit:
    You'd also need to allow the number of barb city defenders (defined by difficulty level) to run UNITAI_CITY_DEFENSE when on a city, so that the barb cities remained defended.
     
  9. Fuyu

    Fuyu Emperor

    Joined:
    Nov 5, 2009
    Messages:
    1,225
    Location:
    Austria
    I don't want to force anything on anyone and I think if a barb city produces a unit, there's nothing wrong with a normal unitai. But the randomly spawned units should probably all be lemmings and pirates. Do you happen to know where that spawning code is?
     
  10. phungus420

    phungus420 Deity

    Joined:
    Mar 1, 2003
    Messages:
    6,296
    Unfortunately I do not, your guess is as good as mine, CvGame, CvUnit, maybe CvTeam....
     
  11. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    CvGame::createBarbarianUnits
     
  12. Fuyu

    Fuyu Emperor

    Joined:
    Nov 5, 2009
    Messages:
    1,225
    Location:
    Austria
    So, it's UNITAI_ATTACK and UNITAI_ATTACK_SEA.. Simply returning false if a barb unit calls AI_group or AI_groupMergeRange would probably do it, no need to change any unitais.
     
  13. Fuyu

    Fuyu Emperor

    Joined:
    Nov 5, 2009
    Messages:
    1,225
    Location:
    Austria
    Actually nvm that, barbs are using their own CvUnitAI::AI_barbAttackMove() and the grouping in there is only from Better AI.
    Code:
    			if (AI_groupMergeRange(UNITAI_ATTACK, 1, true, true, true))
    			{
    				return;
    			}
    
    			if (AI_groupMergeRange(UNITAI_ATTACK_CITY, 3, true, true, true))
    			{
    				return;
    			}
    Leave it for raging barbarians, and reduce to
    Code:
    
    			if (AI_groupMergeRange(UNITAI_ATTACK_CITY, 1, true, true, true))
    			{
    				return;
    			}
    in the other case? (if (GC.getGameINLINE().getNumCivCities() > (GC.getGameINLINE().countCivPlayersAlive() * 3)))
     
  14. tscolin

    tscolin Chieftain

    Joined:
    Sep 28, 2009
    Messages:
    4
    I found a bug when loading various mods, the one i use primarily is next war.



    I hope this is fixable! Thanks in advance!


    [EDIT]I fixed it, nvm[/EDIT]

    in ..\XML\Civilizations\CIV4CivilizationsSchema.xml

    Was:
    Code:
    		<!-- BBAI Victory Strategy -->
    		<element type="iCultureVictoryWeight"/>
    		<element type="iSpaceVictoryWeight"/>
    		<element type="iConquestVictoryWeight"/>
    		<element type="iDominationVictoryWeight"/>
    		<element type="iDiplomacyVictoryWeight"/>
    		<!-- BBAI Victory Strategy -->
    
    New:

    Code:
    		<!-- BBAI Victory Strategy -->
    		<element type="iCultureVictoryWeight" minOccurs="0" maxOccurs="*"/>
    		<element type="iSpaceVictoryWeight" minOccurs="0" maxOccurs="*"/>
    		<element type="iConquestVictoryWeight" minOccurs="0" maxOccurs="*"/>
    		<element type="iDominationVictoryWeight" minOccurs="0" maxOccurs="*"/>
    		<element type="iDiplomacyVictoryWeight" minOccurs="0" maxOccurs="*"/>
    		<!-- BBAI Victory Strategy -->
    
    No errors when loading a new mod now.

    jdog5000 actually fixed a similar issue in 0.81, thats where i got the idea. link: http://forums.civfanatics.com/showthread.php?t=336052
     
  15. Fuyu

    Fuyu Emperor

    Joined:
    Nov 5, 2009
    Messages:
    1,225
    Location:
    Austria
    Yes, it is fixable, and the error message already tells you what's wrong.
    Better BTS AI, as of version 0.90, requires additional info for every leader. Look at the CIV4LeaderHeadInfos.xml that comes with Better BTS AI and you will see.
     
  16. wolkenwand

    wolkenwand Chieftain

    Joined:
    Dec 20, 2010
    Messages:
    48
    Location:
    Java Island
    Hi, i notice in change list that this mod fix ai behaviour to upgrade infantry become SAM infantry. is this attempt successfull?
    In newest Better Bug AI mod i see that SAM Infantry upgrade from infantry is still unavailable, in some thread i read fuyu's post that this change only for temporary until Better AI fixes this behaviour. is this mean that AI still mass upgrade to SAM even with newest better AI?
    Thank you for any help.
     
  17. Lokathor

    Lokathor Chieftain

    Joined:
    Dec 16, 2012
    Messages:
    1
    I got the Civ4 complete pack from Steam recently, and I found this forum and used the "Replace default files" install option to install the better AI. When I did, some files did get replaced, but I'm not sure it's working properly or not. I say this because using Shift+Alt and clicking on a name in the scoreboard doesn't toggle the little yellow "war" tag to show that you plan to go to war against them.

    So, is there some common mistake that I made perhaps?
     

Share This Page