I've been making a short summary of what the various xml-files can do for my own use, and i'll throw it up here as well in the hope that it can help others as well. I'll keep on updating it as i go through more files but for now these are the ones i've got. Do note that these are all guesses since i havent had time to try any of these out yet.
· AIPlayers.xml:
o Seems to contain nothing more than a list of AI names, at a guess the game picks from this list at random to give the AI players names. Can’t find any links between <id> / <level> and other files.
· CoreAIDefs.xml
o Seems to contain rules for AI behavior and priorities.
o Can be used to make different AI templates/patterns (<AIPersonality>).
o Can divide game into different phases to force the AI to prioritize different things in the early game and the endgame. Can probably use more than the three default <AIGamePhases> and decide when the AI transfers from one phase to another using the <AIGamePhaseTurnEnd>
o Unable to find any links between <AIPriority> and other files.
o <AIConstructionPriority> can be used to make the AI prioritize different buildings at different city-levels. The <AIPriority InternalName=" "> value can be linked to the <AITag> value in different Improvement xml-files (<AIPriority InternalName="Garden” can for instance be found in KingdomUnlimitedImprovements.xml). My guess is that to make an AI build a custom building you’ll have to first give the building/improvement an <AITag> and then add that AI-tag to one of the <AIConstructionPriorities>
o <AIunitDesignRule> can be used to scale the AI’s production of different units by modifying the values for how much the AI feels a unit of different levels should cost (if you want the AI to field more heavy units early in the game for instance I guess you’d have to increase the cost-limits for what the AI considers ‘cheap’ units). Can’t find a link between <AIUnitDesignRule AIUnitCategory=" "> and any other .xml files so its unknown if one can add more unit-definitions.
o <AIRelationsWeight InternalName=" "> can be used to determine how the AI should act in diplomatic relations depending on various triggers. No idea what <Weight> and <DifferenceMaxValue> affects and by how much, but a fair guess would be that <weight> counts towards some sort of Total Relationship Meter, where positive is good relations and negative is week relations (sort of like the Civ4 relations).
o <AITacticalBattles>, logically enough, determines how the AI will behave in tactical battles. Looking quickly over the part it seems like the AI has different objectives (Enemy ranged units, enemy champions, tactically valuable terrain etc) and you can change how the AI prioritizes these based among other things on what kind of units the AI has, how far away from the objective the unit is, what other units are near it etc. Unable to find a link between <AITacticalTarget TargetName=" "> and any other files so its unknown whether its possible to add new objectives.
Units:
· There are too many different Unit xml files to list, so I wont list the files that only contains Units and nothing else
· UnitTypeNames.xml
o Contains pre-made unit-names and quotes for units that meet certain pre-defined criteria’s . Unable to find a link between the <FlavorText InternalName=" "> and any other files so its unknown whether its possible to add more pre-defined criteria’s. <Rule> can be used to limit a set of quotes or unitnames to a given race, needs experimenting to discover if its possible to add new rules.
· CoreUnitProps.xml / SpecialMonsterProps.xml / SpecialUnitProps.xml
o Contains information about the unit pedestrians that can be added to tiles in the tile-editor. Assuming that you can create new pedestrians through this for use in the editor.
· CoreUnitStats.xml
o Contains the various unit statistics like attack, wisdom, intelligence, manaregen etc. Can probably be used to add new unit statistics, but I’m unable to find any links between the stat-name and any other files (beyond CoreAccessories, where some items seems to affect stats once equipped) so its unknown how you’d make a new stat affect anything ingame.
· CoreUnitQualityTypes.xml
o Contains the different unit quality types, what they affect, the prerequisites for using them, costs and training time.
Spells and Spellbooks:
· CoreSpellBooks.xml / MonsterSpellBooks.xml
o Contains a list of the various spellbooks, what spells they contain (<SpellDef>), what it costs to add the spellbook during sovereign creation (<Cost>), whether or not its possible to add it during sovereign creation (<IsAvailableForSovereignCustomization>), and the spellbook ingame icon(<icon>).
o Looks like there might be a connection between <DisplayName> and the name of the xml-file containing the spells for the spellbook. (For instance the Ruin spellbook has two xmlfiles containing its spells, CoreSpells_RUIN_Strategic and CoreSpells_RUIN_Tactical). Needs testing to see how one can load new spells / spellbooks.
· Using CoreSpells_Air_Strategical as an example.
o Contains detailed information about the Air Spellbooks Strategic spells. Contains amongst other things:
§ Graphical information for the spell-icon(<IconFG>, <IconBG> and <IconColor>)
§ Range and manacost of the spell
§ What type of spell it is, what it can be used on, spelllevel
§ What kind of graphical effects should be fired with the spell (At least I’m assuming that this is what <SpellDefEffect> does)
§ What will happen when the spell is fired (<GameModifier>)
Equipment and Items
· CoreMounts.xml
o Contains the various mounts in the game.
§ Prerequisites before the mount can be used(<Prereq>)
§ Production costs and requirements (<ProductionRequirement>)
§ Animations (<AnimationPack>), Textures(<TextureSkin>), Models (<ModelFile>), Skeleton(<SkeletonFile>) and something I have no idea what is; <Attachment>. Maybe it specifies how the Unit-model and Mount-model are joined together.
§ What effect the mount has on the mounted unit. Interestingly enough it looks like the mount can affect multiple statistics (<GameModifier>)
o It looks like the game treats mounts like some sort of equipment.
Diplomacy
· CoreTreaties.xml
o This file seems to be using some very interesting means of getting and setting ingame-information. Must research what else is possible to do with ![CDATA] and where it is possible to use them.
o Defines the different treaties that can be reached through diplomacy in the game.
o Looking at the way that effects from treaty-bonuses are calculated in the xml-file I assume that the player will always be considered [Player_1] locally, even in a multiplayer-game, no matter what slot he occupies in the game.
§ <Duration>: Number of turns the treaty will last, -1 seems to mean indefinitely.
§ <Units>: My guess is that this is the “Units” part in the [TreatyValueWithUnits] value.
§ <BasePerceivedValue>: Unknown, possibly determines how this treaty will affect diplomatic relations in a good or bad manner. The numbers it has at the moment (10000) seems very high compared to the numbers found in the CoreAIDef.xml file, maybe the events in CoreAIDef are run once each turn which would make the numbers seem more reasonable.
§ <MinimumRelations>/<RequiredRelations>/<SetRelations>: Gets or sets relations.
§ <Calculate>:My guess is that this is used in the [TreatyValueWithUnits] value. It is probably passed on to the other party in the negotiation as [TreatyValue2WithUnits]. Would be interesting to see if its possible to use more than one expression, and more details on how the game would combine two or more.
§ <PreReq>: Pre-requisites for a given treaty. Could yield some interesting results, for instance locking a strong-arming and gunboat-diplomacy-like treaty-type to the Fallen.
Core Game Settings
· ElementalDefs.xml
o Contains most of the basic gamesettings. Its really quite too long to go into detail so I’ll just take the highlights.
§ Players starting money.
§ How much unit costs to maintain, and how soon they’ll desert if the wages can’t be paid.
§ How fast the population grows, base taxes, how much food the population needs.
§ Resource bonuses, road-network bonuses, caravan-bonuses and respawn-rate.
§ Family-counseling stuff like max number of children, marriage-chance, birth-chance, minimum time between childbirths, minimum time between marriages.
Equipment and Items
· CoreMounts.xml
o Contains the various mounts in the game.
§ Prerequisites before the mount can be used(<Prereq>)
§ Production costs and requirements (<ProductionRequirement>)
§ Animations (<AnimationPack>), Textures(<TextureSkin>), Models (<ModelFile>), Skeleton(<SkeletonFile>) and something I have no idea what is; <Attachment>. Maybe it specifies how the Unit-model and Mount-model are joined together.
§ What effect the mount has on the mounted unit. Interestingly enough it looks like the mount can affect multiple statistics (<GameModifier>)
o It looks like the game treats mounts like some sort of equipment.
Diplomacy
· CoreTreaties.xml
o This file seems to be using some very interesting means of getting and setting ingame-information. Must research what else is possible to do with ![CDATA] and where it is possible to use them.
o Defines the different treaties that can be reached through diplomacy in the game.
o Looking at the way that effects from treaty-bonuses are calculated in the xml-file I assume that the player will always be considered [Player_1] locally, even in a multiplayer-game, no matter what slot he occupies in the game.
§ <Duration>: Number of turns the treaty will last, -1 seems to mean indefinitely.
§ <Units>: My guess is that this is the “Units” part in the [TreatyValueWithUnits] value.
§ <BasePerceivedValue>: Unknown, possibly determines how this treaty will affect diplomatic relations in a good or bad manner. The numbers it has at the moment (10000) seems very high compared to the numbers found in the CoreAIDef.xml file, maybe the events in CoreAIDef are run once each turn which would make the numbers seem more reasonable.
§ <MinimumRelations>/<RequiredRelations>/<SetRelations>: Gets or sets relations.
§ <Calculate>:My guess is that this is used in the [TreatyValueWithUnits] value. It is probably passed on to the other party in the negotiation as [TreatyValue2WithUnits]. Would be interesting to see if its possible to use more than one expression, and more details on how the game would combine two or more.
§ <PreReq>: Pre-requisites for a given treaty. Could yield some interesting results, for instance locking a strong-arming and gunboat-diplomacy-like treaty-type to the Fallen.
Core Game Settings
· ElementalDefs.xml
o Contains most of the basic gamesettings. Its really quite too long to go into detail so I’ll just take the highlights.
§ Players starting money.
§ How much unit costs to maintain, and how soon they’ll desert if the wages can’t be paid.
§ How fast the population grows, base taxes, how much food the population needs.
§ Resource bonuses, road-network bonuses, caravan-bonuses and respawn-rate.
§ Family-counseling stuff like max number of children, marriage-chance, birth-chance, minimum time between childbirths, minimum time between marriages.