Issues with <GoodyHut>?

CluckyB

Chieftain
Joined
Oct 1, 2010
Messages
2
To play around with the modding tools, I decided to make Goody Huts superover powered.

When I tried:
Code:
	<GoodyHuts>
		<Update>
			<Set UpgradeUnit="true"/>
		</Update>
	</GoodyHuts>

It worked like a charm. All goodie huts gave upgrades in addition to their normal bonus. Pretty soon everyone was running around with mechanized infantry.

But when I tried:
Code:
	<GoodyHuts>
		<Update>
			<Set UpgradeUnit="true" Tech="true"/>
		</Update>
	</GoodyHuts>

It worked for around 10 goody huts, and then they stopped doing anything at all.

and when I tried

Code:
	<GoodyHuts>
		<Update>
			<Set UpgradeUnit="true" Tech="true" Experience="10" />
		</Update>
	</GoodyHuts>

Goody Huts did nothing at all from the start.

Any idea what the problem is? Database and xml log files didn't seem to have any useful information.
 
I'm no modder, nor am I especially XML literate, but try removing the space after "Experience="10"", before the forward slash. That's the only difference except for the addition of a third benefit.

If the second was syntactically correct but had problems when the game ran it after the first 10, that's probably not an error in your code, goody huts are just probably not built to be able to handle that kind of thing.

However I might be wrong about that.

Also, it might be worth trying:

Code:
        <GoodyHuts>
		<Update>
			<Set UpgradeUnit="true">
                        <Set Tech="true">
                        <Set Experience="10"/>
		</Update>
	</GoodyHuts>

... or some variation of. I'm not sure whether it's appropriate to have a forward slash in each "Set" because once again, I'm not familiar with the system.
 
If you check the techs you'll see that only ancient era techs are permitted as goody hut rewards. Specifically, there are only 11 techs (excluding Agriculture, since you start with that anyway) that you can get. I would assume that if any of the rewards from a given goody hut result can't be given, the game decides that none of the rewards are given.

No idea what the other problem is though. Maybe the game just doesn't like upgrade and xp being applied to the same unit at the same time.
 
Code:
  <GoodyHuts>
		<Update>
			<Set UpgradeUnit="true"/>
                        <Set Tech="true"/>
                        <Set Experience="10"/>
		</Update>
	</GoodyHuts>

I'd suggest trying that. Yes, self-closing tags, must be self-closing.
 
Really? Because

Code:
	<Improvements>
		<Update>
			<Set TilesPerGoody="10" GoodyRange="1" />
			<Where Type="IMPROVEMENT_GOODY_HUT" />
		</Update>
	</Improvements>

Certainly appeared to make more goody huts appear and bring them closer together. I also previously tried the three line thing and it didn't work at all.

Update: Setting all techs to be used by goody huts worked. (Even with the one line)

Code:
		<Row>
			<Type>GOODY_EXPERIENCE</Type>
			<Description>TXT_KEY_GOODY_EXPERIENCE</Description>
			<Sound>AS2D_GOODY_XP</Sound>
			<Experience>9</Experience>
		</Row>

Appears in the goody hut xml file, but none of the difficulty levels allow you to get GOODY_EXPERIENCE. So maybe support was never added for a positive experience row and hence it crashes. I assume there is some way to fix this with lua, but I have no idea where to get started.
 
There is a post by a Firaxian on the 2K forum that answers some of these questions:
FXSSSeckman said:
You needn't create separate statements for the update. You could simply do this:

<Update>
<Where Type="GAMESPEED_MARATHON"/>
<Set>
<TrainPercent>125</TrainPercent>
<ConstructPercent>125</ConstructPercent>
<CreatePercent>125</CreatePercent>
<BuildPercent>125</BuildingPercent>
<ImprovementPercent>125</ImprovementPercent>
</Set>
</Update>

For <Where> conditions or <Set> values, you can use either multiple attributes, or multiple elements.
 
Also have some issues with this file.

Been playing around seeing if I can increase the chance of certain goodies, similar to CivIV by adding multiple identical lines.

However, when I added say 2 culture or 2 tech rows, goody huts would only work some of the time in game. Other times, you enter the goody hut and nothing happens at all. So I abandoned adding duplicate rows (even interspersed would yield same results).

Next I tried removing several goodies altogether (including in HandicapInfo for completeness - you don't actually have to modify that file at all). That worked fine up until around leaving ~4 goodies in the table which would cycle just fine.

Now my current version I trimmed it a lot to just 2 goodies:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Jon Shafer (Firaxis Games) -->
<GameData>
	<!-- Table definition -->
	<Table name="GoodyHuts">
		<Column name="ID" type="integer" primarykey="true" autoincrement="true"/>
		<Column name="Type" type="text" unique="true"/>
		<Column name="Description" type="text"/>
		<Column name="Sound" type="text"/>
		<Column name="Culture" type="integer" default="0"/>
		<Column name="Tech" type="boolean" default="false"/>
	</Table>
	<!-- Table data -->
	<GoodyHuts>
		<Row>
			<ID>0</ID>
			<Type>GOODY_CULTURE</Type>
			<Description>TXT_KEY_GOODY_CULTURE</Description>
			<Sound/>
			<Culture>45</Culture>
		</Row>
		<Row>
			<Type>GOODY_TECH</Type>
			<Description>TXT_KEY_GOODY_TECH</Description>
			<Sound/>
			<Tech>true</Tech>
		</Row>
	</GoodyHuts>
</GameData>

The problem is that after the second goody hut, they refuse to give anything (i.e. nothing happens). Tried entering 2 goody huts on different turns thereafter, just no more goodies even though it is turn 10, Ancient Era. I'm not sure why exactly though. I tried both with and without edited handicapinfo to complement.

Any ideas? :)

And I would appreciate if someone could post a vanilla copy of the Goodyhut file for me here. I forgot to make a backup of that one (Oops!)
 
Steam -> right-click Civ5 -> Properties -> Local Files -> Verify Integrity of Game Cache. Should re-download the correct file for you. Although there's literally never any case in which you should be modifying the original file anyway.
 
Lucky someone posted their copy over at the 2k forum :D

OK so I did some more work. Minimum entries required seems to be 3. And you need to have 3 both in GoodHuts and HandicapInfo.

The way around it to force it into a Tech/Culture/Tech loop is to have the 3rd entry use another goody (in my example reveal_resource) and only use that as the heading. The content can be whatever you want it to be, in my case tech:

Code:
		<Row>
			<ID>0</ID>
			<Type>GOODY_CULTURE</Type>
			<Description>TXT_KEY_GOODY_CULTURE</Description>
			<Sound/>
			<Culture>45</Culture>
		</Row>
		<Row>
			<Type>GOODY_TECH</Type>
			<Description>TXT_KEY_GOODY_TECH</Description>
			<Sound/>
			<Tech>true</Tech>
		</Row>
		<Row>
			<Type>GOODY_REVEAL_RESOURCE</Type>
			<Description>TXT_KEY_GOODY_TECH</Description>
			<Sound/>
			<Tech>true</Tech>
		</Row>

And in HandicapInfo:
Code:
		<Row>
			<HandicapType>HANDICAP_EMPEROR</HandicapType>
			<GoodyType>GOODY_TECH</GoodyType>
		</Row>
		<Row>
			<HandicapType>HANDICAP_EMPEROR</HandicapType>
			<GoodyType>GOODY_CULTURE</GoodyType>
		</Row>
		<Row>
			<HandicapType>HANDICAP_EMPEROR</HandicapType>
			<GoodyType>GOODY_REVEAL_RESOURCE</GoodyType>
		</Row>
 
Has anyone figured out a way to allow the goody huts to give you tech past the ancient era yet?

Further, any idea why it stops giving _anything at all_ once you hit classical era?

The setting in Civ5Eras.xml that _supposedly_ controls this is:

<NoGoodies>false</NoGoodies>

Is this something simple I'm missing or some damned thing they hardcoded like idjits?
 
The setting in Civ5Eras.xml that _supposedly_ controls this is:

<NoGoodies>false</NoGoodies>

Is this something simple I'm missing or some damned thing they hardcoded like idjits?
The setting above from Civ5Eras.xml only prevents (or allows if set true) goody huts if that is the starting era. The only time you have to mess with that file is if you need to adjust things for non ancient starts for the most part.

To tell the game which techs can be granted from goody huts you have to set it per tech...

Here is Civ5TechInfos.xml:
Code:
		<Row>
			<Type>TECH_POTTERY</Type>
			<Cost>35</Cost>
			<Description>TXT_KEY_TECH_POTTERY_TITLE</Description>
			<Civilopedia>TXT_KEY_TECH_POTTERY_DESC</Civilopedia>
			<Help>TXT_KEY_TECH_POTTERY_HELP</Help>
			<Era>ERA_ANCIENT</Era>
			<Trade>true</Trade>
			[B]<GoodyTech>true</GoodyTech>[/B]
			<GridX>1</GridX>
			<GridY>1</GridY>
			<Quote>TXT_KEY_TECH_POTTERY_QUOTE</Quote>
			<PortraitIndex>4</PortraitIndex>
			<IconAtlas>TECH_ATLAS_1</IconAtlas>
			<AudioIntro>AS2D_TECH_POTTERY</AudioIntro>
			<AudioIntroHeader>AS2D_HEADING_TECH_POTTERY</AudioIntroHeader>
		</Row>
So you just need to run an update on the Technoligies table and set GoodyTech to tru for all of them that you want available. You can easily do it by era.
 
Top Bottom