This is a step by step guide to create your own Fraction using XML modifications. It's really not that hard and once you know how to manage it, you can probably create a new fraction in roughly 10 minutes (however, the 1st time is likely to take you a few minutes more).
First, you can use Notepad to open the XML files or you can use an XML Editor (Link to free MS XML Editor: http://www.microsoft.com/downloads/details.aspx?familyid=72d6aa49-787d-4118-ba5f-4f30fe913628&displaylang=en ). I usually end up using a combination of the two. I find somethings a bit easier to do via Notepad, but if I'm attempting to make line by line changes or if I'm attempting to get my head around the purpose and outline of the XML file, then I use the editor.
There are two locations that you need to be aware. First, YOUR modifications should go into your Documents/My Games/Elemental location. Game files will be found in \Program files (x86)\Stardock Games\Elemental\data\English. If you are using XP then it will be: \Program files\Stardock Games\Elemental\data\English.
There are some files that I ended up changing in the game directory ONLY because I was unsure of how to localize the change.
DISCLAIMER: Changing game XML files could sigficantly change the way the game plays OR make the game completely unplayable. Modify game files at your OWN RISK!
Okay, the first file we will need to open can be found in the Game files directory: \Program files (x86)\Stardock Games\Elemental\data\English. You will want to open the CoreRaceConfig.xml file using NOTEPAD (only because it seems to be easier). What you want to do is copy one of the Pre-Configured races to start your modification. For the purposes of this guide, I will copy the Altar race selection:
You can now close the XML and now create a new text file using NotePad and paste your copied code into it. Make sure you add the </RaceConfigs> if you didn't copy the code from the text above.
Save the file as <yourRaceName>.xml in the \Documents\My Games\Elemental\Race directory using whatever Fraction name you want to use as <yourRaceName>. In my case I choose Rivans.xml.
Okay. Now you have the basics of a new Fraction. Now is when I switch over to using the XML Editor because many of the edits I will make are line edits. If you are using the XML editor above, click on the plus sign in the left column next to RaceConfig. Here are some of the line changes you might like to make, my changes are in BOLD and you can change these to what ever you want. I am going to continue my Rivan example:
InternalName: KingdomOfRiva
DisplayName: Kingdom of Riva
Capital: Riva
LeaderName: King Belarion
PopulaceName: Rivans
Description: Riva is the premient culture of the kingdoms of the West. Welcoming all races and creeds, Riva values accomplishment rather than pedigree. Its people are fiercely independent and have little tolerance to being told what to do.
EntityID: 12 [Use a unique number, 1-6 are taken]
PreferredLogoType: KingdomCrest12 [We will make this later]
Save your changes. Obviously you can make other changes, like UnitSkinColor, UnitHairColor or SelAbilityBonusOption. Look at some of the other pre-configured Fractions in the \Program files (x86)\Stardock Games\Elemental\data\EnglishCoreRaceConfig.xml file to get an idea of some of the options.
At this point, if you start a new game when you get to the Fraction selection you will see your Fraction (Rivans) but it will not have any crest yet. So to add a new crest we need to do a couple more things. First go to \Program files (x86)\Stardock Games\Elemental\data\English directory and open the CoreLogos.xml file in NOTEPAD. We are going to modify this file, only because I'm not sure how to impliment a local logo source. Once you have this file open in NOTEPAD add the following text under the LogoType listed as "KingdomCrest6"
This will add a pointer to the icon crest we are going to use for your custom fraction. Save the file.
Now we need to go to this location: \Program Files (x86)\Stardock Games\Elemental\Gfx\Logos
Here are where the different graphic assets are stored that are used in the game. For this example we are going to make a copy of Crest_44.png and rename it Kingdom_Crest_12.png. So find Crest_44.png, right click on it and copy it, then paste it in the directory. Now rename the copy, Kingdom_Crest_12.png. You should reconize that this is the code we added to the CoreLogo.xml and is the same as the PreferredLogoType in the Rivans.xml file we created.
Now when you start a new game you should see Rivans as a new Fraction along with the new crest that we created. Of course, it is basically just a copy of the Altarian fraction at this point, however, by selectively modifing other elements in the Rivans.xml file, you can basically add abilities or change out aspects of this fraction to make it truely your own.
Note: for the EntityID I just used 12, you can probably use 7 and above, I just wanted to use something that probably wouldn't get used by the main game when it first comes out.
Good luck!
Don't you have to use the internal name of the assets?
For example, I have: <PreferredLogoType>GenericCrest24</PreferredLogoType>
So if you wanted to use Crest 12, you'd put in
<PreferredLogoType>GenericCrest12</PreferredLogoType>
or for Crest_44, you'd use
<PreferredLogoType>GenericCrest44</PreferredLogoType>
That way you don't HAVE to make a new file (unless you wanted to of course).
Or am I misunderstanding what you're saying?
Oh, and it seems that changing EntityID isn't necessary, except to put it where you want in the order (so 12 would put Rivas at then end of the line). I didn't change mine, and it put my faction first in the Choose Your Faction screen, pushing Altar to #2, but it didn't displace/overwrtie Altar.
Nice guide, btw, but it's faction, not fRaction
Have you tried adding additional crest images? It looks like you could just add a new image, using the same sequential naming scheme.
Basically.
What I did was made a copy of Crest_24 (my faction's crest) and copied it and called it Crest_53.png and did some color re-balancing on it to make it look different.
I made a copy of CoreLogos.xml and put it in My Games/Elemental/Units and named it NewLogos.xml
I deleted all the other crest definitions and put in:
Then in my faction's definition, I put in GenericCrest53 as my Preferred Logo Type.
Result?
I don't even think the file name would matter (as long as it's .png most likely) - just as long as it's in Gfx/Logos and you declare the internal name (so you can refer to it in your code) and tell the xml what your file is called so it knows the name of the logo you want it to fetch.
That would be consistent with what I discovered with making new medallions. I just use random sized .pngs and it works fine. I have not tested if there is a restriction on image file types, So I don't know if you can use jpgs etc.
The logos appear to work that way but you can check the CoreLogos.XML to confirm it. I did and what your saying is correct.
I also appear to have had the same EntityID as the Kingdom of Altar too, no effect other then ordering. However, in order to ensure everything is bug free, I changed it once I made the discovery.
Lastly, I HIGHLY recommend Notepad ++ for XML editing. It's easy, clean, understandable, and has tons of helpful programming features to make editing/writing XML headache free.
Lastly, I HIGHLY recommend not editing any core files and backing up your stuff before updating. Updates can sometimes "remove" modded files (including sovereigns) and core files will inevitably be editing during development. You can do almost anything with a new XML file placed in the "My Games/Elemental" directory.
Do the faction backgrounds (and medallions backgrounds, for that matter) need to be defined somewhere? Or can we just put in the filename no problem?
If this code is any indication:
It looks like you only need the file name (not sure about the path - can you name your own or does it need to live in Gfx/Backdrops)
For medallions, it looks like you can name out the path. My sovereign has the whole path the to file named to her medallion.
And Notepad++ owns.
couldn't find anything in the Core files about EnvironmentTerrainType it was either Environment or TerrainType
the default was either 1 or 2 which is ever for Empire wanted an Arctic environment.
made my faction about 4 or 5 days ago not found anyway of knowing what i would need.
also all the faction abilitys are in AbilityBonuses.xml under Elemental/data/English
edit. issue with the way the xml
<EnvironmentTerrainType>4</EnvironmentTerrainType> --> Arctic Environment
For new Logos follow model in CoreLogos.xml and give it an internal name of your choice (any), making sure you use it in the <PreferredLogoType></PreferredLogoType> of your faction. The name of the file in the folder doesn't matter (your choice), just make sure it's the same you put in your custom Logo.xml file in <MainLogo></MainLogo>
Great Guide, Nitey47. Well done indeed. Karma for you
I made a new xml called "NewLogos.xml" and put it in Docs/My Games/Elemental/Units
Then put this code in it:
That declared the image in the xml so I could use it in my custom faction definition:
Umm...why are the colors funky in that first code block....?
Not sure if this will help anyone, but mucking around in VS 2010 got me this pretty little XSD....enjoy.
Not sure why I didn't notice before, but it looks like the OP's spell checker turned every instance of the word "Faction" into "Fraction". hehe kinda funny.
Still helpful post though
Icepick - How did you generate the XSD? Just using the coreRaces.xml and having VS 2010 generate it? I am working on a faction editor, so this could definitely be useful for me.
Especially when "Faction" is a word, so why did it change it LOL
Whoa, hold up - yes, how did you do this?
I posted how I made the XSD here. I had lots of pics to explain and I didn't want to hijack this thread so I made a new one. Enjoy.
EnvironmentTerrainTypes:
1- Fallen
2- Grass
3- Desert
4- Arctic
... I think that's it, it's all I've tested.
<SovereignUnitType> you can make your sovereign and then past his XML data into the faction so he or she is included with it.
<GenericUnitType_Male> seems to define the characters in the Faction selection screen. But, I've noticed they are stripped up their armor, clothing, and physical features (other then weapons and race). Odd because I was trying to make it so my Royal Infantry showed up with them. btw, you CAN add these units to the NewKingdom.XML file the Kingdom is included in. I love being able to package all these things together.
Anyone try putting in <AccompanyUnitType_One> yet? I might try that tomorrow.
What defines your unit selection? For example, Observers vs. Scouts... that sort of thing. What determines unit names?
I usually add one or two <A_VALUE> modifiers at the end to give them additional bonuses or penalties. For example, <A_Diplomacy>10</A_Diplomacy> grants my faction a small bonus to diplomacy. Unfortunately, I'm just not sure if its working atm. Need more testing.
When using <UnitScale> I usually get some weird results. Any tips?
You mean like when it says "We can recruit a new unit type, called an Observer" ?
I only found one instance of Observer in the xml.
<FlavorText> <Topic>Soldier_Level10</Topic> <Text>Peasant</Text> </FlavorText> <FlavorText> <Topic>Soldier_Level1</Topic> <Text>Observer</Text> </FlavorText> <FlavorText> <Topic>Soldier_Level2</Topic> <Text>Forward Observer</Text> </FlavorText>
In game, it seems related to your weapon tech level (and probably armor tech too), but as far as the names - this is the only place I found them. I couldn't find any xml mention of Soldier_Level2 or the like in the xml (other than this file). Maybe it will be exposed once we have access to the AI routines.
The file is in \English\Data\Core World\conversations_ai.xml
There's more names in there as well.
Okey someone please help, I did everything I was supposed I placed the logo in the logo file and it's in PNG format. I also edited the core logos XML file, but no matter what I do the logo's not appearing in the game pleas help, what I am doing wrong?
<LogoType InternalName="KingdomCrest12"> <DisplayName>Kingdom Crest 12</DisplayName> <Description></Description> <MainLogo>Kingdom_Crest_12.png</MainLogo> </LogoType>
Indeed. Don't edit core files. Though I did notice doing skins that some artwork Has to go into the Install Directories. I tried maintaining the file structure and copying it into the "My Documents/Games/Elemental" and that didn't work. Placing the custom art in there without the file structure also didn't work. It has to go into the proper folders in the core directories. As such, always keep a copy of it somewhere else just in case a directory gets deleted during an update. So far I've found that if your new content has a unique name it doesn't get deleted during a update or patch as long as the whole directory isn't deleted.
As for the editing, I still swear by UltraEdit.UltraEdit would walk up to Notepad++, punch it in the face and watch it hit the dirt. Kick it while it's down. Stomp on it. Spit on it. Piss on it. Then dump gas on it and flick a match setting it on fire. Then it would walk away and flick it the bird over it's shoulder while it leaves...
J/K, I've actually never tried Notepad++ because with UltraEdit I haven't needed anything else.
There are many great features available to you once you register, including:
Sign in or Create Account