Villages/Goody huts/Whatever

Zhankfor

Chieftain
Joined
Dec 21, 2006
Messages
8
Can anyone explain to me the mechanics of how the game decides what a village/goody hut is going to give? I know it's different for scouts and other units, and it changes based on difficulty level. I'm just curious if someone has gone into the code and figured out what the probabilities are.
 
the "going into the code" part of it is so easy that even i can do it! the possibilities are listed in the Civ4HandicapInfo.xml file in your Assets/XML/GameInfo directory. you can open it with any text editor, i used notepad for this.

for each difficulty, there's a section like this. this one is pasted from Noble:

Spoiler :

<Goodies>
<GoodyType>GOODY_HIGH_GOLD</GoodyType>
<GoodyType>GOODY_HIGH_GOLD</GoodyType>
<GoodyType>GOODY_HIGH_GOLD</GoodyType>
<GoodyType>GOODY_LOW_GOLD</GoodyType>
<GoodyType>GOODY_LOW_GOLD</GoodyType>
<GoodyType>GOODY_LOW_GOLD</GoodyType>
<GoodyType>GOODY_LOW_GOLD</GoodyType>
<GoodyType>GOODY_MAP</GoodyType>
<GoodyType>GOODY_MAP</GoodyType>
<GoodyType>GOODY_WARRIOR</GoodyType>
<GoodyType>GOODY_WARRIOR</GoodyType>
<GoodyType>GOODY_SCOUT</GoodyType>
<GoodyType>GOODY_EXPERIENCE</GoodyType>
<GoodyType>GOODY_EXPERIENCE</GoodyType>
<GoodyType>GOODY_HEALING</GoodyType>
<GoodyType>GOODY_TECH</GoodyType>
<GoodyType>GOODY_TECH</GoodyType>
<GoodyType>GOODY_BARBARIANS_WEAK</GoodyType>
<GoodyType>GOODY_BARBARIANS_WEAK</GoodyType>
<GoodyType>GOODY_BARBARIANS_STRONG</GoodyType>
</Goodies>

there are 20 possibilities for each level (if i counted right), but the number of times each are listed, and what's listed, varies. for example, on settler there are two chances for workers and two chances for settlers. so that's why the chances/odds of what you can get vary by level

odds change for scouts/explorers because they cannot get barbarians no matter what. so they get a 2/17 chance at a tech here on noble rather than 2/20. i think but only from experience that huts opened by culture pops follow that "you can't get barbarians" rule too.

the techs you can get from huts are defined in the XML/Technologies/Civ4TechInfos.xml file. each tech has a line "<bGoodyTech>1</bGoodyTech>" or "<bGoodyTech>0</bGoodyTech>". the highest/latest/however you want to phrase it techs you can pop are Music and Astronomy. fun fact: Communism is listed in that file as "TECH_UTOPIA" rather than "tech_communism", go figure.

trust me, you can look it up and figure it out. i'm so bad at actual code that i don't bother. i literally do not know whether 0 is true or false unless i look it up! ps hubby says 0 is false, in case you're the same way *giggle*.

ps see! i can't even get the code box to work to make the post shorter! OH but i can use a spoiler box, ok. i just wanted to look all official for once.
 
Kmad forgot to say that when the goody hut is popped because of expanding cultural borders, you can't get exp or healing ( duh!), so the "better" way to pop a hut ( with "better" I mean bigger &#37; of getting the so desired free tech ) is with a expanding border. Besides that, her explanation is a five stars one ( as usual ;) )
 
Long ago, some kind person posted a list of the hut yield probabilities for all difficulty levels. There's a 10&#37; chance of getting a tech, at all levels: you can't get Settlers or Workers above Warlord level (10% for each at Settler or Chieftain, 5% at Warlord): at Settler there's no chance of barbarians, whereas at Deity there's a 30% chance of many: and at the two top levels there's no chance of getting a lot of gold (I play at Monarch, and my record is 109 gold from a hut). These % don't include the effects of Scouts or the "no barbs" setting.
 
Kmad forgot to say that when the goody hut is popped because of expanding cultural borders, you can't get exp or healing ( duh!), so the "better" way to pop a hut ( with "better" I mean bigger &#37; of getting the so desired free tech ) is with a expanding border.

you're right, i didn't even think about that! and *blush* thank you for the part of your reply that i'm too flattered i can't even quote *giggle*.

two questions related to huts opened by city borders:

i have read (and believe) that it's impossible to get a free tech from a hut by popping it with any unit before you have any cities. you're just not allowed to learn technology before your empire has been born. i've never gotten a free tech by a hut that was opened when i settled my very first city. i get the feeling that case counts as "this hut was popped before your first city was founded", even tho the borders created by the capital are what opened the hut. i guess it's opened before you have any commerce, so your empire doesn't have any brains yet or something. does anybody know for sure? it wouldn't change how i do it, i just want to know.

and does anybody know whether my feeling that border pops can't get barbarians is true? i can't confirm that with rules or code, i just know i've never seen it happen. and i hope i never do, since sometimes i pop those huts with no garrison in my capital :eek:.

in today's "things you may have never wondered" news: you've probably seen huts that haven't been popped later in the game, that are guarded by barb warriors who take their job very seriously, and will not move off the hut to attack you. they are assigned there to guard that hut and that is what they will do, no matter what. i found out recently, reading a report about a game played on a terra map, that if the hut underneath such a warrior is popped by a city being placed nearby so that culture borders expand, that warrior goes poof bye-bye. that leans me even more towards thinking that culture pops can't give you barbs, if they make even already-existing guardian barbs go away (that was a vanilla game, and there was no great wall). but i've learned i can't alway apply my sense of logic to this game.

Long ago, some kind person posted a list of the hut yield probabilities for all difficulty levels. There's a 10% chance of getting a tech, at all level: you can't get Settlers or Workers above Warlord level (10% for each at Settler or Chieftain, 5% at Warlord)

yeah i wasn't that kind. partly because i was too lazy to work it out. and partly because it's easy to miss things like ... techs are 10% at all levels noble and up only. it's 4/20 for settler, 3/20 for chieftain and warlord, and then 2/20 for noble and up. it sure seems rarer at deity though! i'm sure that's because you have to focus on making things other than exploring units early on, you have to bring exploring troops home earlier to fogbust because barbs show up sooner, there are so many more chances to get barbs from the huts themselves so your guys might die before they find another hut, and the AI gets so many more units than you do that they find more huts. so your chances to pop the huts are lower in the first place. i know the first time it happened to me i checked the settings screen (three times :lol:) to verify i was indeed playing deity because i was so shocked, but mathematically the odds for each individual hut are the same as they are on noble.

getting settlers and workers for free is so incredibly awesome! playing settler or chieftain with no barbarians, if you get settlers and/or workers, they can scout around safely for you for a while, and then make new cities or improve the land ... and you didn't have to stop your city from growing to make them. :love:
 
The warriors on huts things is really annoying. Last Terra game I played I built an explorer (for about the 2nd time in history) just to pop huts in the New World but the warriors guarding them never moved making this pointless since you can't attack with an explorer.

Explorers have to be the most useless units IMO. Maybe as a medic they would be OK since they have nice movement but that's all.
 
@ Bushface

The kind guy was Mewtarthio

The only advantage you get from Scouts is immunity to barbarians from the huts. If you have barbs disabled, the only advantage scouts have is their 2 MP.

Beyond that:

Settler

Lots of gold : 20&#37;
Some : 10%
Map : 5%
Settler : 10%
Warrior : 10%
Scout : 5%
Worker : 10%
Experience : 5%
Health : 5%
Technology : 20%

Chieftain

Lots of Gold : 20%
Some Gold : 10%
Map : 5%
Settler : 10%
Warrior : 10%
Scout : 5%
Worker : 10%
Experience : 5%
Health : 5%
Technology : 15%
Some barbarians: 5%

Warlord

Lots of Gold : 15%
Some Gold : 15%
Map : 10%
Settler : 5%
Warrior : 10%
Scout : 5%
Worker : 5%
Experience : 5%
Health : 5%
Technology : 15%
Some barbarians: 5%
Many barbarians: 5%

Noble

Lots of Gold : 15%
Some Gold : 20%
Map : 10%
Warrior : 10%
Scout : 5%
Experience : 10%
Health : 5%
Technology : 10%
Some barbarians: 10%
Many barbarians: 5%

Prince

Lots of Gold : 10%
Some Gold : 20%
Map : 10%
Warrior : 10%
Scout : 5%
Experience : 10%
Health : 5%
Technology : 10%
Some barbarians: 15%
Many barbarians: 5%

Monarch

Lots of Gold : 5%
Some Gold : 20%
Map : 10%
Warrior : 10%
Scout : 5%
Experience : 10%
Health : 5%
Technology : 10%
Some barbarians: 15%
Many barbarians: 10%

Emperor

Lots of Gold : 5%
Some Gold : 25%
Map : 10%
Warrior : 5%
Scout : 5%
Experience : 5%
Health : 5%
Technology : 10%
Some barbarians: 15%
Many barbarians: 15%

Immortal

Some Gold : 25%
Map : 10%
Warrior : 5%
Scout : 5%
Experience : 5%
Health : 5%
Technology : 10%
Some barbarians: 15%
Many barbarians: 20%

Deity

Some Gold : 25%
Map : 5%
Warrior : 5%
Scout : 5%
Experience : 5%
Health : 5%
Technology : 10%
Some barbarians: 10%
Many barbarians: 30%

@ KMad

AFAIK city pops don't get barbs ( I'm in the same boat as you , no code , just a feeling) and I strongly believe that you can't get a tech before you settle you first city ( AFAIK again )

To add to your "today's "things you may have never wondered" news":
This is because the only benefit scouts get is that they cannot get barbarians from a goody hut. Of course this means the probability of all the good results goes up.

The code calls the routine CvPlayer::canReceiveGoody on line 4238. This routine checks the validity of the goody on offer in several ways including checking some unit info. In particular, if the goody on offer is bad as defined in CIV4GoodyInfo.xml and the unit has the flag bNoBadGoodies as defined in CIV4UnitInfos.xml (by default either a scout or an explorer) then it returns false and a new goody gets chosen.


Code:
if (GC.getGoodyInfo(eGoody).isBad())
{
if ((pUnit == NULL) || pUnit->isNoBadGoodies())
{
return false;
}
}
Interestingly if a scout/explorer rolls barbarians 10 times in a row it gives up and you get nothing.
Info from mjs0

P.S Kmad, your contributions to the forums are always welcome.... I would never have the patience to see if the barbs have Emancipaton weariness, for a quick example. And by the way, +2000 posts.... congrats !
 
blue parts are my responses. i'm in a lazy mood atm.

@ KMad
and I strongly believe that you can't get a tech before you settle you first city ( AFAIK again )
that one i truly do believe. what i wonder, and also believe but haven't really seen enough to know, is whether settling a city and popping a hut during that process counts as "before you settle your first city". i think that it does, because it happens before you have set up and arranged your city. you're not earning commerce when you settler sits down, only when you open the screen, and your slider doesn't technically exist in a sense. the hut pops before you get a chance to do that.

P.S Kmad, your contributions to the forums are always welcome well thank you :) .... I would never have the patience to see if the barbs have Emancipaton weariness, for a quick example. oh that was really really fun! and i had allergies and was on serious drugs so a challenging game was completely out of the question, as was doing anything productive like, cleaning the house or running errands. so why not do research by cheating *giggle* And by the way, +2000 posts.... congrats! i think you mean &#37;deity save us all!
 
The warriors on huts things is really annoying. Last Terra game I played I built an explorer (for about the 2nd time in history) just to pop huts in the New World but the warriors guarding them never moved making this pointless since you can't attack with an explorer.

Explorers have to be the most useless units IMO. Maybe as a medic they would be OK since they have nice movement but that's all.

Yes, they are nearly useless for that reason. I guess they make cheap fog busters, I tried them for a while as dedicated medics, since they are mobile and about the last to defend. the trouble is that since they can't attack, they can't gain experience and promotions without Great Generals.

I think Chariots are superior, because they're one of the last to defend because they don't fortify or get terrain bonuses, but they can still pick off damaged units to gain exp and thus more medic promotions. KMadCandy taught me that.
 
FWIW, the chance of getting a tech with a scout isn't quite 2/17 on Noble (though it's close) - the game makes I think up to 10 rolls on the list, ignoring ones which are disallowed, before giving up - it is possible to get nothing from huts with scouts and border pops (more so with them in fact) if you're unlucky.
 
If you want to make sure AI's get nothing from huts, go into that Handicap.xml file and under Noble, change every goody hut possibility to 'Healing'. Just don't play Noble yourself. You can also make any Difficulty level harder or easier on yourself by switching any of the possibilities for the level you play on.
 
i have read (and believe) that it's impossible to get a free tech from a hut by popping it with any unit before you have any cities.

I am almost positive that you can get techs before founding your capitol, at least in Vanilla. I remember using A Turkish Guy's strategy of using your original settler to pop huts (obviously on a low level, where the results make it worthwhile) and I am almost certain that I popped techs, although I could be mistaken.
 
I am almost positive that you can get techs before founding your capitol, at least in Vanilla.
Hmmm... I did a field test just now. I opened up World Builder and dropped in over 100 goody huts and popped each one with a scout. I got lots of money, maps and scouts, but no technology (and no experience or warriors, too). But this was in Warlords, so the vanilla game may allow it.
 
I think Chariots are superior, because they're one of the last to defend because they don't fortify or get terrain bonuses, but they can still pick off damaged units to gain exp and thus more medic promotions. KMadCandy taught me that.
You should try a Medic catapult for a change...

Siege weapons are more expensive... but.... can allways bombard, while a chariot medic vs a damaged LB or badly damaged Gren still has a serious chance of dying...
 
Two things:
One: Kmad! YOu RULE! Bigtime!
Second: DO barbs have emanci-:mad: - and tell the story of how you found out!

She already told it in the "Funny screenshots" thread, about a month or two.
 
I am almost positive that you can get techs before founding your capitol, at least in Vanilla. I remember using A Turkish Guy's strategy of using your original settler to pop huts (obviously on a low level, where the results make it worthwhile) and I am almost certain that I popped techs, although I could be mistaken.

i borrowed his strategy for a chieftain level HoF gauntlet earlier this year, but i don't remember exactly where to look up his description of it. what i did was settle relatively soon using my initial settler. but i did explore extensively with other settlers/workers that i popped from huts, and those often gave me techs. i'd sometimes get stuff as great as BW/metalcasting from huts!!! i'd restart games where i didn't get at least 2 settlers, i was going for an ASAP diplomatic victory and i needed 2 free settlers to "compete" in this friendly competition *giggle*. because i had my capital already, i was able to pop the techs. and i think that's what he did too. you use the freebies you pop to explore (since you have no barbs). i had way too much fun! and it was really really really weird, i had to change my usual strategies in so many ways because i couldn't trade techs with the AI like i usually do. they kind of don't have the same tech pace on warlord level that i was used to, since i was playing a higher level myself by then.

barbarian research: it just so happens that i recapped my findings this week in this thread. so i even can find it quickly to spare you going thru that looooong screenshots thread if you want to see it!
 
Yes, they are nearly useless for that reason. I guess they make cheap fog busters, I tried them for a while as dedicated medics, since they are mobile and about the last to defend. the trouble is that since they can't attack, they can't gain experience and promotions without Great Generals.

I think Chariots are superior, because they're one of the last to defend because they don't fortify or get terrain bonuses, but they can still pick off damaged units to gain exp and thus more medic promotions. KMadCandy taught me that.

Scouts and Explorers make great medics. Simply build a Barracks, and when you are using Theology and Vassalage, you newly created Scout/Explorer(whihc are really cheap to build btw) can easily get Combat I and then Medic I, and if you are later in the game and have West Point I think it is, thne they can get Medic II as well.

But the real reason they rock as medics is because they are cheap/quick to build compared to other units.
 
scouts are useful in the very beginning of the game, and explorers arent useful at all - if you want a medic unit, make one that can attack aswell - chariots or spearmen/pikemen - actually spears do good because of their low combat value and their high bonus against mounted - if they are attacked by mounted units, they are nearly sure to win (unless ofc you are behind in tech - cavalry > pikeman)
 
Top Bottom