Here's an example you can use.
Note that you do not have to edit raceconfig.xml to add custom races. You can save them like this one in the Data\CustomRaces folder of your current mod folder, as an XML file (not raceconfigxml extension).
Initially your custom race may not be available for the human player to load in at the custom race creation screen, until they are customised on the opponent screen. The game has to generate a raceconfigxml file (basically a working copy of the race definition in the XML file) for you to do that.
All custom races should take RaceID 12.
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<Races>
<DataChecksum NoParse="1">
<Ignore>FileID,DisplayName,Description,Homeworld,Homestar,RaceLeader,ShortEmpireName,Portrait,DefaultTradePortrait,DefaultTradeMovie,FriendlyTradeMovie,UnfriendlyTradeMovie,UnitedPlanetsMovie,Logo,SmallLogo,RaceColor,ShadowColor,UndefendedStarColor,DefendedStarColor,SectorColor,BaseColor,TrimColor,EngineColor,InterfaceColor,ShipStyle,ModuleStyle</Ignore>
</DataChecksum>
<Race Name="Zylon Empire">
<ConfigVersion>27</ConfigVersion>
<RaceID>12</RaceID>
<CivType>4</CivType>
<DisplayName>Zylon Empire</DisplayName>
<Alignment>25</Alignment>
<ShortEmpireName>Zylon</ShortEmpireName>
<RaceLeader>JX-1014</RaceLeader>
<Homeworld>Procyon</Homeworld>
<Homestar>Custom Star</Homestar>
<GeneratedDescription>0</GeneratedDescription>
<Description>The evil Zylons rose to power by annihilating their organic creators with nuclear weapons. Typically they attack with seemingly-endless waves of ships.</Description>
<AIPersonality>8</AIPersonality>
<DialogueTag>Zylon</DialogueTag>
<Portrait>Gfx\Race\RaceImageT6.png</Portrait>
<DefaultTradePortrait>Gfx\Race\RaceImageT6_Trade.png</DefaultTradePortrait>
<DefaultTradeMovie>RaceImageT6_neutral.bik</DefaultTradeMovie>
<FriendlyTradeMovie>RaceImageT6_happy.bik</FriendlyTradeMovie>
<UnfriendlyTradeMovie>RaceImageT6_angry.bik</UnfriendlyTradeMovie>
<UnitedPlanetsMovie>RaceImageT6_Small.bik</UnitedPlanetsMovie>
<RobotMovie>NewsRobot_Alien</RobotMovie>
<RobotImage>gfx\Message_Alien</RobotImage>
<RaceMusic>Race05</RaceMusic>
<Logo>D:\GalCiv2\Gfx\Race\RaceLogo53.png</Logo>
<PoliticalParty>2</PoliticalParty>
<RaceColor>255,206,0,255</RaceColor>
<ShadowColor>41,0,0,255</ShadowColor>
<UndefendedStarColor>255,255,0,255</UndefendedStarColor>
<DefendedStarColor>255,255,0,255</DefendedStarColor>
<SectorColor>255,206,0,255</SectorColor>
<BaseColor>185,163,100,255</BaseColor>
<TrimColor>57,0,0,255</TrimColor>
<EngineColor>255,121,0,255</EngineColor>
<InterfaceColor>255,255,0,255</InterfaceColor>
<ShipStyle>Zylon Style</ShipStyle>
<ModuleStyle>0</ModuleStyle>
<TechTree>Zylon_TechTree</TechTree>
<Tech>HyperDrive</Tech>
<Tech>StellarCartography</Tech>
<Tech>Plague Cure</Tech>
<Tech>Disease Cure</Tech>
<Tech>FusionReactors</Tech>
<Tech>Cybernetic History</Tech>
<AIAbilities>100</AIAbilities>
<Aggression>75</Aggression>
<FinancialResources>100</FinancialResources>
<CPUUsage>100</CPUUsage>
<AbilitiesDescription>
+ Strong manufacturing
+ Ground combat
- Weak diplomacy</AbilitiesDescription>
<SuperAbility>3</SuperAbility>
<ResearchAdvantage>Industry</ResearchAdvantage>
<ECONOMICS>10</ECONOMICS>
<Ability0>0</Ability0>
<WEAPONS>0</WEAPONS>
<Ability1>0</Ability1>
<DEFENSE>0</DEFENSE>
<Ability2>0</Ability2>
<SPEED>0</SPEED>
<Ability3>10</Ability3>
<MORALE>0</MORALE>
<Ability4>20</Ability4>
<POPULATIONGROWTH>0</POPULATIONGROWTH>
<Ability5>0</Ability5>
<SOCIALPRODUCTION>0</SOCIALPRODUCTION>
<Ability6>0</Ability6>
<MILITARYPRODUCTION>40</MILITARYPRODUCTION>
<Ability7>0</Ability7>
<RESEARCH>0</RESEARCH>
<Ability8>10</Ability8>
<INFLUENCE>0</INFLUENCE>
<Ability9>0</Ability9>
<TRADE>0</TRADE>
<Ability10>0</Ability10>
<DIPLOMACY>-10</DIPLOMACY>
<Ability11>0</Ability11>
<HITPOINTS>10</HITPOINTS>
<Ability12>0</Ability12>
<REPAIR>0</REPAIR>
<Ability13>0</Ability13>
<SENSORS>0</SENSORS>
<Ability14>0</Ability14>
<ESPIONAGE>0</ESPIONAGE>
<Ability15>0</Ability15>
<SOLDIERING>30</SOLDIERING>
<Ability16>0</Ability16>
<INTERESTRATES>0</INTERESTRATES>
<Ability17>0</Ability17>
<PLANETQUALITY>0</PLANETQUALITY>
<Ability18>0</Ability18>
<TRADEROUTES>0</TRADEROUTES>
<Ability19>0</Ability19>
<CRIME>0</CRIME>
<Ability20>0</Ability20>
<CABINET>0</CABINET>
<Ability21>0</Ability21>
<RANGE>40</RANGE>
<Ability22>0</Ability22>
<LUCK>0</LUCK>
<Ability23>0</Ability23>
<COURAGE>0</COURAGE>
<Ability24>0</Ability24>
<CREATIVITY>0</CREATIVITY>
<Ability25>0</Ability25>
<GOVERNMENT>0</GOVERNMENT>
<Ability26>0</Ability26>
<LOYALTY>60</LOYALTY>
<Ability27>0</Ability27>
<LOGISTICS>6</LOGISTICS>
<Ability28>0</Ability28>
<MINIATURIZATION>10</MINIATURIZATION>
<Ability29>0</Ability29>
<HOMEPLANETQUALITY>0</HOMEPLANETQUALITY>
<Ability30>0</Ability30>
<COLONIZEHEAVYGRAVITY>0</COLONIZEHEAVYGRAVITY>
<Ability31>0</Ability31>
<COLONIZEWATERWORLD>0</COLONIZEWATERWORLD>
<Ability32>0</Ability32>
<COLONIZETOXIC>0</COLONIZETOXIC>
<Ability33>0</Ability33>
<COLONIZEBARREN>0</COLONIZEBARREN>
<Ability34>0</Ability34>
<COLONIZERADIOACTIVE>0</COLONIZERADIOACTIVE>
<Ability35>0</Ability35>
<WARPROFITEERING>0</WARPROFITEERING>
<Ability36>0</Ability36>
<PERSISTENTTRADEROUTES>0</PERSISTENTTRADEROUTES>
<Ability37>0</Ability37>
</Race>
</Races>
Racial tech trees: Data\TechTrees
Ship components: Data\ShipComponents or Data\
Improvements: Data\
Assuming that everything is situated where the game can read it, the tech tree is the first thing to look at. It needs to have its own internal name (this is defined very close to the top of the file, it should be easy to spot) and technologies cannot have a circular dependency ( A -> C -> B -> A) or the game will crash.