Post Defines - What gives?

Evalis

Prince
Joined
Mar 2, 2009
Messages
496
So no matter how I try to alter this code and I have made several attempts so far, from changing lines to 'type' to 'defines' to 'row', I cannot seem to alter the post defines in the game.

Notibly the code I am trying to adjust is the stupid AI happiness cheat.

Spoiler :
Code:
<GameData>
	<PostDefines>
		<Update>
			<Where Name="AI_HANDICAP"/>
			<Set Key="HANDICAP_PRINCE"/>		
		</Update>
		<Update>
			<Where Name="STANDARD_HANDICAP"/>
			<Set Key="HANDICAP_PRINCE"/>
		</Update>
		<Update>
			<Where Name="STANDARD_HANDICAP_QUICK"/>
			<Set Key="HANDICAP_PRINCE"/>
		</Update>
	</PostDefines>
</GameData>

Is there something wrong with the code or is the post define some weird animal that xml modding will not change?
 
Its not a post Defines for a start, its a in HanicapInfos :)

Code:
<GameData>
	<HandicapInfos>
		<Update>
			<Where IconAtlas="DIFFICULTY_ATLAS" />
			<Set AIUnhappinessPercent="100" />
			<!--Removes AI Unhappiness Buff-->
		</Update>
	</HandicapInfos>
</GameData>

The one in PostDefines is related to the AI difficulty, as Default they are Settler Difficulty, or you can change it like I have:-

Code:
<GameData>
	<PostDefines>
		<Update>
			<Set Key="HANDICAP_PRINCE"/>
			<Where Name="AI_HANDICAP"/>
		</Update>
	</PostDefines>
</GameData>
 
Its not a post Defines for a start, its a in HanicapInfos

No, I'm betting he was right the first time. You're reading it as "how can I reduce the Happiness bonus the AIs get?", whereas I'm guessing it's more of "how can I reduce all those ridiculous bonuses the AIs get, like the Happiness boosts?" And remember that the AI effectively gets THREE Happiness boosts (12 base instead of 9, +1 per luxury, and x0.6 city/population unhappiness), so the change you suggested will only do part of the job.

Quite a few mods have done exactly what he's trying to do, and change the AI's default handicap to Prince instead of Chieftain. My own mods (currently nonfunctional) do this.

To the OP: PostDefines can be changed just like any other variable, and yes, you did it right. That means that one of two things went wrong:
1> You didn't actually activate the mod correctly. Maybe you were missing the OnModActivate command, or maybe you got confused by the new UI and didn't activate the mod correctly in the browser.
2> You didn't adjust all of the necessary defines. The game spreads this out over a bunch of variables depending on whether you're using a quick setup, scenario, etc.; I'm not sure if you got them all.

Now, having said all of this, a warning. Changing the AI to Prince will prevent it from having the massive excess of Happiness. It'll also make the AI pathetically easy to beat, since without its other bonuses (cost discounts, maintenance discounts, etc.) the AI's inherent inefficiency will cripple it.
Most of the balance mods that have adjusted the AI difficulty have also included other changes designed to improve the AI's ability to stay competitive with a human player. There are a wide variety of ways in which this can be done, but if you're not doing anything along these lines then just changing the AI setting will not result in an entertaining game experience.
 
Oy oy. I forgot the onmodactivate command. Actually there was a second issue with where the file was located in the project, but still.. Thanks it works now!

And yes I meant all the AI bonuses, not just the happiness bonus. I'm well aware of their current incompetance, and intend to address some of it at a later time. The AI adjustments are in preparation of a scenario where players start with several free cities, buildings, units and improvements (and settlers cannot be built). Giving the AI those extra bonuses would ramp difficulty much higher than intended.
 
Top Bottom