The first thing to understand about Elemental is that almost everything is put into the DATA directory of Elemental (in program files\stardock\elemental.
By contrast, things you mod should go into the documents\my games\elemental\units directory in general (eventually we’ll just put a general mods directory).
Inside the Data folder is the English directory. As its name implies, we switch this directory based on localization (so there will eventually be a German, French, Spanish, Italian, Polish, Russian, etc. directory).
If you change HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Stardock\Drengin.net\Elemental to have language be say German, I THINK you can actually create a sub-directory called German, copy everything from English into it and start making a German version but I haven’t tried this yet.
Basic Rules to Follow
Here are some basic rules to follow:
- The files are irrelevant. Don’t try add on to an existing file. Create a new file. My suggestion is to create files named like UserName_TypeOfFile (example: Frogboy_KlingonRace.xml)
- The directories matter. The game scans certain directories at certain times during loading. It goes by the XML keys inside the files and loads them as necessary. Units get loaded up at the launch of the game (something we need to fix because it causes the game to kind of hang).
- The XML keys are the (no pun intended) the key. For instance, there’s a file called CoreBoots.xml. The game could care less about that. What it does care is that at the top of the file it says <GameItemTypes>. That means the game will read these in as game items.
- Be aware that these XML files have to be read in by the game. If you find loading slow, it’s because it’s parsing megs of XML files as is. It’s a constant battle we’ve faced – wanting to give you fancy stuff without slowing down the loading of the game.
The Basic Objects
Near the top of any XML file you can find out what type of objects are going to be in that file. Elemental has only a handful to deal with:
- GameItemTypes (things a unit may have on it)
- UnitTypes (Types of units – a dragon, a bandit, an ogre, Procipinee)
- MapTypes (Types of maps, currently tiny, small, medium, large, tactical). You can add your own of any size.
- Spells (Spell Definitions – Fireball, Haste, etc.)
- TerrainTypes (want more terrains? You can add plenty of additional terrains, this is also where you specify what tactical battle maps should come up. In beta 4, we only have 1 per terrain. yawn)
- Campaigns (want to make your own RPG? This object type defines them)
- ImprovementType(for adding city improvements)
- Quests (defining quests)
- TileDesigns (these are created by the tile editor) Nearly all our XML files in the game are these.
- EffectBlueprints (these are credit with the effects editor)
- GoodieHutTypes (these are the notable locations)
- QuestLocations (these are where quests originate)
- MultiplayerMaps (these are maps that will be used as seeds for single and multiplayer)
- AbilityBonuses (this is where special abilities are added for units, in beta 4 we don’t really use this but in the release version we will)
- RaceConfigs (this is where you define entirely new factions)
- TechTrees (this is where we specify specific technology trees. In beta 4 we only have two, eventually each faction will get its own)
- AIPersonalities (this is where we define AI personalities for use by the game, in beta 4 we only have 1. And until i’m happy with the AI, there will only be 1 made by me).
Over the coming weeks, we’ll go over this one by one. If someone wants to put this into a wiki and elsewhere, that would be great.