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

Barbarians and goodie huts?!!

Discussion in 'Civ4 - Better AI' started by JosEPh_II, Jul 31, 2010.

  1. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    16,013
    Gender:
    Male
    Location:
    Western IL. cornfields
    I know you guys on the Better AI team have enhanced the Barbarians.

    This screenshot came from a Rise of Mankind 2.92 with A New Dawn 174D Modmod game.

    I've had similar experiences but this one tops the rest. Barbarians are mean critters now.

    It was the 4th Goodie hut found. The 1st 2 gave maps the 3rd a Tech (Weaving) then this one. Definitely Hostile! And then some. Is this your intentions for making barbs tougher? :eek:

    By the way I play on the Noble difficulty level.

    JosEPh :crazyeye:
     
  2. Cybah

    Cybah Emperor

    Joined:
    Jun 22, 2007
    Messages:
    1,480
    It's normal. There can spawn 3 warriors when enter a goody hut with a unit that has not bNoBadGoodies 1.
     
  3. Fuyu

    Fuyu Emperor

    Joined:
    Nov 5, 2009
    Messages:
    1,225
    Location:
    Austria
    What you get from goody huts has not been changed in Better AI afaik.
     
  4. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    16,013
    Gender:
    Male
    Location:
    Western IL. cornfields
    This spawned 5 units from the goodie hut not 3. 1 animal with a 3 strength and 4 warriors.

    If as cybah said 3 is normal then how did 5 show up?

    And Afforess swears he has done nothing with the Barbs, that only you guys have done that.

    And if what you say is true Fuyu then what has happened to goodie huts? Is the game now thinking for itself?

    5 Hostile units from a Goodie hut is eXtreme in any case. Especially at just the Noble level.

    By the way the Warrior defeated the cave bear but died from the 1st warrior attack after.

    JosEPh
     
  5. NotSoGood

    NotSoGood Emperor

    Joined:
    Jan 25, 2009
    Messages:
    1,077
    Location:
    Finland
    Bears cannot be received from goody huts, exept if someone has changed that. It seems that you got the rare case of GOODY_BARBARIANS_STRONG on noble. The propability is 5% (I think it is. There is 20 goodies listed in noble and only one GOODY_BARBARIANS_STRONG.) It spawns atleast two barbarians, but then has the possiblity of 40% to spawn more on eac plot. The code loops the tiles around you and checks if the plot is passable, has it any units and then it runs a randum number to see if it spawns a warrior. If you didn't understand me at all, here's the code from better ai that is untouched and the same as in vanilla:
    Spoiler :
    Code:
    	if (GC.getGoodyInfo(eGoody).getBarbarianUnitClass() != NO_UNITCLASS)
    	{
    		iBarbCount = 0;
    
    		eUnit = (UnitTypes)GC.getCivilizationInfo(GET_PLAYER(BARBARIAN_PLAYER).getCivilizationType()).getCivilizationUnits(GC.getGoodyInfo(eGoody).getBarbarianUnitClass());
    
    		if (eUnit != NO_UNIT)
    		{
    			for (iPass = 0; iPass < 2; iPass++)
    			{
    				if (iBarbCount < GC.getGoodyInfo(eGoody).getMinBarbarians())
    				{
    					for (iI = 0; iI < NUM_DIRECTION_TYPES; iI++)
    					{
    						pLoopPlot = plotDirection(pPlot->getX_INLINE(), pPlot->getY_INLINE(), ((DirectionTypes)iI));
    
    						if (pLoopPlot != NULL)
    						{
    							if (pLoopPlot->getArea() == pPlot->getArea())
    							{
    								if (!(pLoopPlot->isImpassable()))
    								{
    									if (pLoopPlot->getNumUnits() == 0)
    									{
    										if ((iPass > 0) || (GC.getGameINLINE().getSorenRandNum(100, "Goody Barbs") < GC.getGoodyInfo(eGoody).getBarbarianUnitProb()))
    										{
    											GET_PLAYER(BARBARIAN_PLAYER).initUnit(eUnit, pLoopPlot->getX_INLINE(), pLoopPlot->getY_INLINE(), ((pLoopPlot->isWater()) ? UNITAI_ATTACK_SEA : UNITAI_ATTACK));
    											iBarbCount++;
    
    											if ((iPass > 0) && (iBarbCount == GC.getGoodyInfo(eGoody).getMinBarbarians()))
    											{
    												break;
    											}
    										}
    									}
    								}
    							}
    						}
    					}
    				}
    			}
    		}
    	}
     
  6. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    16,013
    Gender:
    Male
    Location:
    Western IL. cornfields
    I'm not a modder and and your code example is lost on me.

    So the Bear just happened to be close by the goodie hut and I hit the jackpot on warriors. Figures that's how my games seem to go. :/

    I do experience 2 and 3 warriors from Goodie huts on Noble quite often.

    And over all the barbs are a major force to be reckoned with from about 5000BC (RoM starts at 6000BC) up to 1000BC. I play on Epic speed. By that time I have a sufficient military to go Barb city hunting and assimilate as many as possible before the rival AI's do.

    JosEPh
     

Share This Page