Problem

I thought that's what I was doing. Unless I need to break them out by handicap. The GoodyHuts file doesn't have anything useful. In fact, the only files in the whole structure which has "goody_culture" (for example) are the goodyhuts file and the handicapinfos file.

The CIV5GoodyHuts.xml file has this entry (using goody_culture as an example):

Code:
		<Row>
			<Type>GOODY_CULTURE</Type>
			<Description>TXT_KEY_GOODY_CULTURE</Description>
			<Sound/>
			<Culture>30</Culture>
		</Row>

The CIV5HandicapInfos.xml file has this:

Code:
	<HandicapInfo_Goodies>
...
		<Row>
			<HandicapType>HANDICAP_SETTLER</HandicapType>
			<GoodyType>GOODY_CULTURE</GoodyType>
		</Row>
...
	</HandicapInfo_Goodies>

NOTE: For clarity, I've removed the extra entries (ellipses indicates removed lines). This is the one for the settler handicap and for the culture goody hut value. Depending on which goody hut value you're looking at, there are other entries under the various handicap levels.

Remember that this is a test mod to see if the concept works. I'm only removing all of the other goody hut values to find out if I can force it to technology values. If this works, then I can use it to test my REAL mod (coming later), which will allow techs in the classical (and possibly later) eras.

See my previous code (two posts back from this one): Perhaps I need to overtly state that I want the entries removed from the prince handicap (the one I'm playing with)? If so, would I need to have a separate entry for each of the six handicaps I'm trying to remove? If so, what's the syntax? My guess is one of these two

Code:
	<HandicapInfo_Goodies>
		<Delete GoodyType="GOODY_MAP" HandicapType="HANDICAP_Prince"/>
	</HandicapInfo_Goodies>

Code:
	<HandicapInfo_Goodies>
		<Delete>
 			<Where GoodyType="GOODY_MAP" />
			<where HandicapType="HANDICAP_PRINCE"/>
		</Delete>
	</HandicapInfo_Goodies>
 
To test the possiblity of "not enough choices", I turned culture back on in the file, leaving only the five other lines still being deleted.

If the problem is not enough possibilities, then one of two things should happen:

I'll get the right values (50% culture and 50% tech). This will happen if 2 is the magic number of entries required.

Or, I'll get "nothing" (if the require number is higher than 2).

If I get some culture and some empty entries, then this is not the issue. And, in fact, this is what happens (I got 1 culture and 2 "nothing" values in my first 3 tries). So, the "magic number" hypothesis is falsified. :(
 
Your delete statements are fine. I tried my own test with your mod active and looked at the database after the game started; every difficulty other than Settler had only GOODY_TECH entries listed, just as expected. (Settler also had GOODY_SETTLER and GOODY_WORKER available.)

Anyhow I plopped 20 goody huts and 2 scouts. The first one popped a tech and the other 19 did nothing. The scouts also happened upon 3 or 4 game-placed goody huts and those gave nothing as well. So my guess is that HandicapInfo_Goodies is only part of the story and that the DLL is doing something behind the scenes such as limiting how often certain results can occur, hardcoding probabilities, enforcing a minimum number of possibilities and filling the rest of the list with "nothing" results when there are too few, etc.

The end result is that, for whatever reason, you can't simply force all goody huts to give techs by limiting the XML choices to just GOODY_TECH. Instead you're going to have to do something through Lua, or perhaps alter the GoodyHuts table so that there is more than 1 type of goody result that will grant a tech.
 
OK, thanks.

My ultimate goal (for which this exercise was only a test) is to allow classical and medieval techs to be granted by goody huts. I tried just going right to that (allowing classical techs), and found something similar: All goody hut options were granted except tech, but every once in a while, I would get a "nothing". This indicates that when a "tech" result is proper, some other aspect of the game (LUA or DLL?) prevents it from working.

I'll see if I can figure out what via the LUA stuff. Otherwise, I guess I just have to give up. Seems strange, though: I can get a unit upgraded all the way to modern armor (if lucky enough), even as early as the medieval age, but I can't get the tech that would allow such a thing. Oh, well.
 
Back
Top Bottom