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.
Good stuff. Will be very helpful to modding.
EDIT:
Note to modders:
You DO NOT need to overwrite the original .XML file. You can copy it, make your modifications, and place it into your "My Games/Elemental/Units" directory where it will be read by the game.
Nice, I've also been trying to figure out the various xml files that are available to us. I tried focusing in sovereign/champion abilities as I'd really like to try and create new abilities.
I've been trying to trace back certain things like where <StrVal> comes from. To my understanding there are several of these <StrVal> that we currently cannot change or modify. I was interested in creating new abilities but I don't think we can atm, unless I'm missing something (which is very probably since I've never used XML before).
So I decided to make a list of all the <StrVal> that I've found so far in case someone wanted to use the definitions that make up the core abilities currently in game. I did this because for example, A_FirstStrike appears under the skills but I can't find what makes up A_FirstStrike definition. Hope that made sense anyway heres the code for first strike taken from CoreSpecialAbilities:
The code for First Strike is:
<AbilityBonusOption InternalName = "FirstStrike"> <DisplayName>First Strike</DisplayName> <Description>Gets first strike in combat. Enemy's defense halved in first round.</Description> <GameModifier> <ModType>Unit</ModType> <Attribute>AbilityBonus</Attribute> <StrVal>A_FirstStrike</StrVal> <Multiplier>0.50</Multiplier>
From I'm assuming that we can change the defense to get 25% instead of 50% by changing the .50 to .25.
I was interested in seeing what <StrVal>A_FirstStrike</StrVal> is made up though.
I also did a list of the attributes found in the xmls like the above example <Attribute>AbilityBonus</Attribute>. Damn it I had to get up to do some stuff and forgot wth I wanted to type sigh. Anyways here are the files if anyone wants to look through them.
http://dl.dropbox.com/u/8088480/List%20of%20StrVal%20in%20EWOM.xml
http://dl.dropbox.com/u/8088480/List%20of%20Attributes%20in%20EWOM.xml
These files won't do anything by themselves btw, there are just a list of the commands? I've found that are related in one way or another to abilities. I plan on changing the files to include examples of how they are used in the core xml.
Added CoreTreaties.xml (Some very interesting stuff in it), Coremounts.xml and ElementalDefs.xml. Also broke the forum while copy-pasting, so the op text now looks weird.
Ah, CoreTreaties looks interesting. Is it possible to make new treaties? For example, a permanent "rights of passage" treaty would be incredible. Of course, looks like we could make non-aggression permanent but idk how the AI would enjoy that.
Thanks for the initial roadmap Dioxus, that saves me some time. Gonna poke around that CoreTreaties file as well.
Has anyone figured out how to extract the tech tree from the XML files? I poked around with English/TechTree_Amarian.xml, and am puzzled.
From my limited familiarity with XML I'd have expected some form of nested tags to display the tree, such as
<tech>Civics
<tech>Specialization_Amarian
<tech>Administration_Amarian</tech>
<tech>Entertainment_Amarian</tech>
</tech>
or perhaps
<tech internalName="Specalization_Amarian"> ....
However, the formal tag structure appears to be flat, and it looks like indentation is supposed to be significant for deducing which techs lead to whatever other techs -- but as far as I could tell that's not consistent (with regard to how many spaces or tabs to indent).
Translation from these internal names to native language is apparently in languagename/Techs_Amarian via "DisplayName" tags. Actually I'm a little surprised the Techs_Amarian is a mix of universal information like rarity and AI research priority, versus natural language stuff like display name and Hiergamenon text. Is the German AI going to have different priorities for its research than the English one?
anyone know what <SpawnRating>number here</SpawnRating> specifically means?
dragons have a 12, is this chance of spawn or "toughness" ?
Not sure, I assumed it was for NPC level tech required for him to appear (Through the adventure/domination techs)
NPCTalentValue, I can confirm, that upgrades the cost to recruit a champion
testing it, wait a moment
confirmed, NPCSpawnRating is techlevel required for spawning him.
well i pored through some of the other monster files.
the generic spiders have a spawnrating of 2, so i assume that the higher it gets the later/less likely it is to spawn.
that said, i guess i wont go over 12 since that is the highest number i've seen.
Hello,
has anybody made any progress in figuring out how to add new stats and play with the game mechanics?
There are many great features available to you once you register, including:
Sign in or Create Account