View Full Version : Popping Hostiles from a Hut, This is Ridiculous!


FlyinJohnnyL
Feb 14, 2009, 03:18 PM
Okay, I've popped 1, 2, maybe even 3 warriors from a hut before. My unit dies, no big deal. But who has seen THIS happen before?

Edit-This is from the current Monarch Students game-Mao.

http://i625.photobucket.com/albums/tt335/pbwfed/Civ4ScreenShot0003-1.jpg

btgwynn
Feb 14, 2009, 05:28 PM
Haaaaaaa-Haw

JammerUno
Feb 14, 2009, 06:00 PM
That's great when it happens to an axeman though.

Joecoolyo
Feb 14, 2009, 06:39 PM
I've seen that happen before, I had the same amount! Though it sucked because my warrior defeated all but one of them :mad:

Elkad
Feb 14, 2009, 07:52 PM
I just lost a MP game because of barbs. About turn 4 I let 7 barbs out of a hut. Who killed my warrior, and all marched to my capital. I got 1 more warrior built, not that it mattered..

Fei Kelei
Feb 14, 2009, 09:46 PM
Most I've ever gotten was 5, and since I was just on plains with no defense bonus, my warrior didn't even survive one of them.

FlyinJohnnyL
Feb 14, 2009, 11:32 PM
Wow you got 7?? Is there a cap to how many can spawn from a hut? And what the hell is the purpose? Like I said, I can see, maybe even 4? But 5, 6, 7!!??!? What the hell is the purpose of that? In the 3000 BCs no less! I guess it could be worse, they could be archers or axemen, but I don't think this can happen? I think it's always warriors right?

VoiceOfUnreason
Feb 15, 2009, 12:30 AM
Wow you got 7?? Is there a cap to how many can spawn from a hut? And what the hell is the purpose? Like I said, I can see, maybe even 4? But 5, 6, 7!!??!? What the hell is the purpose of that? In the 3000 BCs no less! I guess it could be worse, they could be archers or axemen, but I don't think this can happen? I think it's always warriors right?

So the logic of the code ( CvPlayer::receiveGoody() ), appears to be that it distributes the barbs in two passes. During the first pass, each tile surrounding the hut gets a percentile roll. If the result is lower than the iBarbarianUnitProbability defined in CIV4GoodyInfos.xml, then you get a barb there. In the second pass, enough barbs are added to ensure that the minimum defined by iMinBarbarians has been achieved.

It looks as though it is always going to be warriors, which might be silly if you are hut popping in the modern era....

The code logic is really weird... there's logic in place to distinguish which AI model the units should use - land or sea based attack. Which suggests that the developers foresaw the possibility that... a hut might spawn a unit that can exist on both land and sea? The barbs can only appear on tiles that are part of the same "area"; I almost think I remember that water and land tiles are not part of the same area. Maybe they were supporting Mods with aquatic huts only?

Anyway, it looks like the maximum number of barbs would be 8. What fun.

Gwynnja
Feb 15, 2009, 04:44 AM
It's a hut on top of montezuma's grave. If you'd popped it with a mechanical infantry, it would have popped 7 knights