Dear fellow Modders!
There are many players out there who asked for more playable fractions for Starwars EAW/FOC.
It first appeared to be a very difficult task to achieve, however I am going to show you now how to add
14 playable factions or more to the game!
This tutorial requires you to have at least very basic knowledge how the .xml engine works, and please try to make
NO synthax mistakes. You can have a quick look through my coding tutorials (
clip 10 and above) and do some practise before you tackle the fractions task:
www.youtube.com/playlist?list=PLild8kZ8-...aGqLWuJdGFSSXlrv3B_9
First thing you will need is my Faction
template.xml file, please download it:
www.mediafire.com/download/apj9u582d1eu7..._Guidialog_files.zip
Its actually a stock
Expansion_Factions.xml from Forces of Corruption at the beginning, the only change I did to the Underworld faction is deactivating the annoying announcer.
Its made so you simply can replace the old Expansion_Factions.xml of your mod with it. If you are going to add factions to classic EAW simply insert <File>
Expansion_Factions.xml</File> into
FactionFiles.xml in order to innitiate it.
Usually this also works for files with any name to innitiate them in
FactionFiles.xml, as long they have no playable faction. But, in my tests I experienced that the game crashes with my new Factions, unless they are inside of
Expansion_Factions.xml. Might have something to do with the Underworld faction that was inserted afterwards, maybe other scripts run in the background that enable it for this file only, no idea.
You might want to read what the Xml tags in the faction file do:
www.petrolution.net/item-199
However, its the lower part of this xml we are going to focus now: Open the .xml you've just downloaded and search (
Strg + F) for
Primary_Fraction in the commented entry.
<!-- ================================================================================= -->
<!-- Primary_Fraction (Use this one as template for all other fractions below as <Variant_Of_Existing_Type> ) -->
<!-- ================================================================================= -->
<Faction Name="Insert_Name_1">
<!-- Text ID has to be unique or your fraction wont be displayed ingame !! -->
<Text_ID>TEXT_FACTION_NAME</Text_ID>
<!-- The amount of maximal units on space maps per fraction -->
<Space_Tactical_Unit_Cap>40</Space_Tactical_Unit_Cap>
<Icon_Name>i_icon_pirate.tga</Icon_Name>
<Star_Base_Icon_Name> spacestation_icon.tga </Star_Base_Icon_Name>
<Color> 255, 255, 255, 255 </Color>
<!-- === Essential Tags are at the top === -->
<No_Colorization_Color> 231, 221, 67, 255 </No_Colorization_Color>
<Display_Font_Color> 255, 128, 0, 255 </Display_Font_Color>
<Big_Fleet_Color> 255, 128, 0, 150 </Big_Fleet_Color>
<Bribed_Color>155, 153, 119, 255</Bribed_Color>
<!-- === BasicRebel, BasicEmpire or AI_Player_Underworld === -->
<Basic_AI>BasicEmpire</Basic_AI>
<Is_Debug_Switchable_To> Yes </Is_Debug_Switchable_To>
<Create_Player_In_Multiplayer_Games> No </Create_Player_In_Multiplayer_Games>
<Is_Playable>true</Is_Playable>
<Can_Control_Planets>true</Can_Control_Planets>
<Is_Neutral> No </Is_Neutral>
<Allies></Allies>
<Enemies>Empire, Rebel, Pirates, Hostile, Sarlacc, Hutts</Enemies>
<!-- Insert Ground Leader, and its Hero Company in the 2 tags below -->
<Faction_Leader></Faction_Leader>
<Faction_Leader_Company></Faction_Leader_Company>
<Multiplayer_Campaign_Heroes></Multiplayer_Campaign_Heroes>
<!-- These Units will spawn with the station in skirmish, you urgently need valid space units here or you wont control anything! -->
<Space_Skirmish_AI_Default_Forces>
Tauri_X_301_Squadron, Tauri_X_301_Squadron
</Space_Skirmish_AI_Default_Forces>
<!-- These Units will spawn with the HQ in skirmish, you urgently need valid ground units here! -->
<Land_Skirmish_AI_Default_Forces>
</Land_Skirmish_AI_Default_Forces>
<Land_Skirmish_Unit_Cap_By_Player_Count>
0,10, 1,10, 8,5,
</Land_Skirmish_Unit_Cap_By_Player_Count>
<Finale_Movie></Finale_Movie>
<Finale_Movie_2></Finale_Movie_2>
<Victory_Text>TEXT_UNDERWORLD_VICTORY</Victory_Text>
<Defeat_Text>TEXT_UNDERWORLD_DEFEAT</Defeat_Text>
<Space_Retreat_Countdown_Seconds> 4.99 </Space_Retreat_Countdown_Seconds>
<Land_Retreat_Countdown_Seconds> 4.99 </Land_Retreat_Countdown_Seconds>
<Alternate_Icon_Name> pirate_icon.tga </Alternate_Icon_Name>
<Ground_Base_Icon_Name> groundbase_icon.tga </Ground_Base_Icon_Name>
<Ground_Transport_Icon_Name> trooper_icon.tga </Ground_Transport_Icon_Name>
<Fleet_Icon_Name> i_icon_fleet.tga </Fleet_Icon_Name>
<Ship_Icon_Name> g_fleet.tga </Ship_Icon_Name>
<Squadron_Icon_Name> g_squad.tga </Squadron_Icon_Name>
<Multiplayer_Map_Preview_Icon>I_MULTIPLAY_UNDERWORLD.TGA</Multiplayer_Map_Preview_Icon>
<Hyperspace_Speed_Factor>0.07</Hyperspace_Speed_Factor>
<Credits_Accumulation_Factor> 1.0 </Credits_Accumulation_Factor>
<Planet_Icon_Scale> 10.0 </Planet_Icon_Scale>
<Planet_Icon_Offset> 10.0, 10.0, -1.1 </Planet_Icon_Offset>
<Primary_Enemy/>
<Force_Alignment>Light</Force_Alignment>
<Minimum_Visible_Base_Level>1</Minimum_Visible_Base_Level>
<Can_Win_By_Destroying_Super_Weapon>Yes</Can_Win_By_Destroying_Super_Weapon>
<Faction_Super_Weapon />
<Skirmish_Land_Bomber>Skipray_Bombing_Run</Skirmish_Land_Bomber>
<Maintenance_Cost>0.25</Maintenance_Cost>
<Scatters_From_Crushers> true </Scatters_From_Crushers>
<!-- Gameplay effects of planetary corruption on this faction. -->
<!-- Benefits_From_Corruption is the corruption function, currently set to "no" -->
<Benefits_From_Corruption> No </Benefits_From_Corruption>
<Corruption_Galactic_Production_Time_Multipliers> 1.0, 1.0 </Corruption_Galactic_Production_Time_Multipliers>
<Corruption_Galactic_Production_Price_Multipliers> 1.0, 1.0 </Corruption_Galactic_Production_Price_Multipliers>
<Corruption_Tactical_Production_Time_Multipliers> 1.0, 1.0 </Corruption_Tactical_Production_Time_Multipliers>
<Corruption_Tactical_Production_Price_Multipliers> 1.0, 1.0 </Corruption_Tactical_Production_Price_Multipliers>
<Corruption_Tactical_Build_Pad_Time_Multipliers> 1.0, 1.0 </Corruption_Tactical_Build_Pad_Time_Multipliers>
<Corruption_Tactical_Build_Pad_Price_Multipliers> 1.0, 1.0 </Corruption_Tactical_Build_Pad_Price_Multipliers>
<Automatic_Planetary_Corruption_Upgrade_Type></Automatic_Planetary_Corruption_Upgrade_Type>
<Displayed_Tech_Level_Adjustment>0</Displayed_Tech_Level_Adjustment>
<Infantry_Icon_Name>i_button_pirate_soldier.tga</Infantry_Icon_Name>
<Vehicle_Icon_Name>i_r_vehicle.tga</Vehicle_Icon_Name>
<Carrier_Icon_Name>i_r_carrier.tga</Carrier_Icon_Name>
<Frigate_Icon_Name>i_r_frigate.tga</Frigate_Icon_Name>
<Corvette_Icon_Name>i_r_corvette.tga</Corvette_Icon_Name>
<Fighter_Icon_Name>i_button_virago.tga</Fighter_Icon_Name>
<Tech_Tree_Dialog_Name>IDD_TECH_TREE_BLACKMARKET</Tech_Tree_Dialog_Name>
<Helper_Icon_Name>i_underworld_help_droid.tga</Helper_Icon_Name>
<Space_Retreat_Pursue_Max_Speed_Mod_Factor> 2.0 </Space_Retreat_Pursue_Max_Speed_Mod_Factor>
<Space_Retreat_Units_Damaged_Mod_Factor> 2.0 </Space_Retreat_Units_Damaged_Mod_Factor>
<Space_Retreat_Flight_Move_Increment> 500.0 </Space_Retreat_Flight_Move_Increment>
<Space_Retreat_Unit_Increment_Wait_Frames> 1 </Space_Retreat_Unit_Increment_Wait_Frames>
<Space_Retreat_Off_Map_Dest_Pos> 12000.0, 12000.0, 0.0 </Space_Retreat_Off_Map_Dest_Pos> <!-- WARNING: For some reason, non-0.0 Z can cause problems? -->
<Space_Retreat_Countdown_Color_RGBA> 255, 255, 255, 255 </Space_Retreat_Countdown_Color_RGBA>
<Space_Retreat_Countdown_Text_ID> TEXT_RETREAT_SPACE_UNDERWORLD_COUNTDOWN </Space_Retreat_Countdown_Text_ID>
<Space_Retreat_Begin_SFXEvent> UHD_REMOVED_Retreat_Started_Space </Space_Retreat_Begin_SFXEvent>
<Space_Retreat_Enemy_Begin_SFXEvent> Unit_Enemy_Retreat_Underworld_Soldier </Space_Retreat_Enemy_Begin_SFXEvent>
<Space_Retreat_Cancel_SFXEvent> UHD_REMOVED_Retreat_Cancelled </Space_Retreat_Cancel_SFXEvent>
<Space_Retreat_Not_Allowed_SFXEvent> UHD_REMOVED_Retreat_Not_Allowed </Space_Retreat_Not_Allowed_SFXEvent>
<Space_Retreat_Not_Allowed_Reason_1_SFXEvent> UHD_REMOVED_Retreat_Interdictor </Space_Retreat_Not_Allowed_Reason_1_SFXEvent> <!-- Reason 1: Gravity Well -->
<Space_Forced_Retreat_Due_To_Superweapon> Unit_Victory_DS_Retreat_Underworld_Soldier </Space_Forced_Retreat_Due_To_Superweapon>
<Space_Surrender_SFXEvent> UHD_REMOVED_Retreat_Started_Space </Space_Surrender_SFXEvent>
<Land_Retreat_Pursue_Max_Speed_Mod_Factor> 2.0 </Land_Retreat_Pursue_Max_Speed_Mod_Factor>
<Land_Retreat_Units_Damaged_Mod_Factor> 2.0 </Land_Retreat_Units_Damaged_Mod_Factor>
<Land_Retreat_Countdown_Color_RGBA> 255, 255, 255, 255 </Land_Retreat_Countdown_Color_RGBA>
<Land_Retreat_Countdown_Text_ID> TEXT_RETREAT_LAND_UNDERWORLD_COUNTDOWN </Land_Retreat_Countdown_Text_ID>
<Land_Retreat_Begin_SFXEvent> UHD_REMOVED_Retreat_Started_land </Land_Retreat_Begin_SFXEvent>
<Land_Retreat_Enemy_Begin_SFXEvent> Unit_Enemy_Retreat_Underworld_Soldier </Land_Retreat_Enemy_Begin_SFXEvent>
<Land_Retreat_Cancel_SFXEvent> UHD_REMOVED_Retreat_Cancelled </Land_Retreat_Cancel_SFXEvent>
<Land_Retreat_Not_Allowed_SFXEvent> UHD_REMOVED_Retreat_Not_Allowed </Land_Retreat_Not_Allowed_SFXEvent>
<Land_Surrender_SFXEvent> UHD_REMOVED_Retreat_Started_land </Land_Surrender_SFXEvent>
<Reinforcements_Selection_SFXEvent> UHD_REMOVED_Choose_Reinforcements </Reinforcements_Selection_SFXEvent>
<Reinforcements_Pick_Landing_Zone_SFXEvent />
<Reinforcements_Enroute_SFXEvent> UHD_REMOVED_Reinforcements_En_Route </Reinforcements_Enroute_SFXEvent>
<Reinforcements_Cancelled_SFXEvent> UHD_REMOVED_Reinforcements_Cancelled </Reinforcements_Cancelled_SFXEvent>
<Reinforcements_Requesting_SFXEvent> UHD_REMOVED_Request_Assistance </Reinforcements_Requesting_SFXEvent>
<Reinforcements_Ready_SFXEvent> UHD_REMOVED_Reinforcements_Available </Reinforcements_Ready_SFXEvent>
<Reinforcements_Shadow_Blob_Material_Name> Reinforcement_Overlay_Underworld </Reinforcements_Shadow_Blob_Material_Name>
<Bombing_Run_Shadow_Blob_Material_Name> Bombing_Run_Rebel </Bombing_Run_Shadow_Blob_Material_Name>
<Bombing_Run_Blob_Size> 100.0 </Bombing_Run_Blob_Size>
<!-- BOMBARDMENT DATA -->
<Bombardment_Shadow_Blob_Material_Name> Bombardment_Underworld </Bombardment_Shadow_Blob_Material_Name>
<Bombardment_Blob_Size> 200.0 </Bombardment_Blob_Size>
<Bombardment_Required_Orbital_Ships> Krayt_Class_Destroyer, The_Peacebringer </Bombardment_Required_Orbital_Ships>
<Bombardment_Projectile> Proj_Krayt_Bombardment_Ion Proj_Krayt_Bombardment_Damage </Bombardment_Projectile>
<Bombardment_Particle> Bombard_Particle_Effect </Bombardment_Particle>
<Bombardment_Number_Of_Salvos> 2 </Bombardment_Number_Of_Salvos>
<Bombardment_Shots_Per_Salvo> 1 </Bombardment_Shots_Per_Salvo>
<Bombardment_Shot_Delay> 0.2 </Bombardment_Shot_Delay>
<Bombardment_Salvo_Delay> 3 </Bombardment_Salvo_Delay>
<Bombardment_Initial_Delay> 4.0 </Bombardment_Initial_Delay>
<Bombardment_Lighting_Color_List>0.0,0.0,0.0,1.0,0.2,0.2</Bombardment_Lighting_Color_List>
<Bombardment_Lighting_Intensity_List>0.2 0.4</Bombardment_Lighting_Intensity_List>
<Bombardment_Lighting_Seconds_List>2 2</Bombardment_Lighting_Seconds_List>
<Land_Mode_Selection_Blob_Material_Name>Selection_Rebel_Land</Land_Mode_Selection_Blob_Material_Name>
<Space_Mode_Selection_Blob_Material_Name>Selection_Rebel_Space</Space_Mode_Selection_Blob_Material_Name>
<Land_Mode_Garrison_Selection_Blob_Material_Name>Selection_Garrison_Land</Land_Mode_Garrison_Selection_Blob_Material_Name>
<Space_Mode_Garrison_Selection_Blob_Material_Name>Selection_Garrison_Land</Space_Mode_Garrison_Selection_Blob_Material_Name>
<Selection_Blob_RGBA>0,255,0,255</Selection_Blob_RGBA>
<Space_Skirmish_Unit_Buy_Credits> 100000 </Space_Skirmish_Unit_Buy_Credits>
<Land_Skirmish_Unit_Buy_Credits> 50000 </Land_Skirmish_Unit_Buy_Credits>
<Space_Win_Image>i_us_win.tga</Space_Win_Image>
<Space_Lose_Image>i_us_lose.tga</Space_Lose_Image>
<Land_Win_Image>i_ul_win.tga</Land_Win_Image>
<Land_Lose_Image>i_ul_lose.tga</Land_Lose_Image>
<!-- Overlay ring used by Obiwan when targeting with his "force distact" ping ability, this is the ring around the cursor location to show victims in range of click -->
<Land_Area_Effect_Range_Overlay_Material_Name> Rebel_Land_Area_Effect_Range_Overlay </Land_Area_Effect_Range_Overlay_Material_Name> <!-- In ShadowBlobMaterials.xml -->
<Land_Area_Effect_Range_Overlay_RGBA> 128, 255, 128, 128 </Land_Area_Effect_Range_Overlay_RGBA>
<Land_Area_Effect_Range_Overlay_Scale_Factor> 1.20 </Land_Area_Effect_Range_Overlay_Scale_Factor> <!-- Compensate for ring ednge not being full bounds of texture size -->
<!-- Overlay ring used by Obiwan when targeting with his "force distact" ping ability, this is the ring around Obiwan to show click target terrain range -->
<Land_Ability_Targeting_Range_Overlay_Material_Name> Rebel_Land_Ability_Targeting_Range_Overlay </Land_Ability_Targeting_Range_Overlay_Material_Name> <!-- In ShadowBlobMaterials.xml -->
<Land_Ability_Targeting_Range_Overlay_RGBA> 255, 255, 64, 128 </Land_Ability_Targeting_Range_Overlay_RGBA>
<Land_Ability_Targeting_Range_Overlay_Scale_Factor> 1.20 </Land_Ability_Targeting_Range_Overlay_Scale_Factor> <!-- Compensate for ring ednge not being full bounds of texture size -->
<!-- ============================================== -->
<!-- DAMN DROID ADVISOR TEXT (all disabled) -->
<!-- ============================================== -->
<Galactic_Advisor_Hints>
TEXT_MAL_SWAP_DESCRIPTION,
-PLAIN
</Galactic_Advisor_Hints>
<Space_Advisor_Hints>
TEXT_MAL_SWAP_DESCRIPTION,
-PLAIN
</Space_Advisor_Hints>
<Land_Advisor_Hints>
TEXT_MAL_SWAP_DESCRIPTION,
-PLAIN
</Land_Advisor_Hints>
<!-- SFXEvents -->
<SFXEvent_GUI_Start_Campaign> GUI_Select_Underworld_SFX </SFXEvent_GUI_Start_Campaign>
<SFXEvent_Max_Credits_Limit_Reached> UHD_REMOVED_Credit_Capacity </SFXEvent_Max_Credits_Limit_Reached>
<SFXEvent_Land_Invasion_Commencing> UHD_REMOVED_Invasion_Commencing </SFXEvent_Land_Invasion_Commencing>
<SFXEvent_Tactical_Corruption_Mission_Commencing> Urai_Invasion_Commencing </SFXEvent_Tactical_Corruption_Mission_Commencing>
<SFXEvent_Build_Impossible_Location_Blockaded> UHD_REMOVED_System_Blockaded </SFXEvent_Build_Impossible_Location_Blockaded> <!-- In this case, enemy ships in orbit so can't build space station -->
<SFXEvent_New_Construction_Options_Available> UHD_REMOVED_New_Construction </SFXEvent_New_Construction_Options_Available> <!-- Can be Tactical or Galactic -->
<SFXEvent_Mission_Added> UHD_REMOVED_Mission_Updated </SFXEvent_Mission_Added> <!-- A new mission has been added to the holocron - the incoming transmission radar movie (and audio) is also playing -->
<SFXEvent_Base_Shield_Absorb_Damage> SFX_Shield_Absorb_Detonation </SFXEvent_Base_Shield_Absorb_Damage> <!-- Tactical: When the base shield absorbs damage, most likely by a projectile -->
<SFXEvent_Tactical_Unit_Cap_Reached> UHD_REMOVED_Unit_Cap_Reached </SFXEvent_Tactical_Unit_Cap_Reached> <!-- Tactical: We you can drag in anymore tactical units from the reinforcement palette -->
<SFXEvent_Arrive_From_Hyperspace> Unit_Ship_Hyperspace_Enter </SFXEvent_Arrive_From_Hyperspace>
<SFXEvent_Exit_Into_Hyperspace> Unit_Ship_Hyperspace_Exit </SFXEvent_Exit_Into_Hyperspace>
<SFXEvent_Space_Base_Under_Attack_Announcement> UHD_REMOVED_Space_Station_Under_Attack </SFXEvent_Space_Base_Under_Attack_Announcement>
<SFXEvent_Land_Base_Under_Attack_Announcement> UHD_REMOVED_Base_Under_Attack </SFXEvent_Land_Base_Under_Attack_Announcement>
<SFXEvent_Enemy_Fleet_Approaching_Planet>UHD_REMOVED_Enemy_Fleet_Approaching </SFXEvent_Enemy_Fleet_Approaching_Planet>
<SFXEvent_Strategic_Pop_Cap_Reached> UHD_REMOVED_Unit_Cap_Reached </SFXEvent_Strategic_Pop_Cap_Reached>
<SFXEvent_Tactical_Pop_Cap_Reached> UHD_REMOVED_Unit_Cap_Reached </SFXEvent_Tactical_Pop_Cap_Reached>
<SFXEvent_Planet_Corrupted> GUI_Corruption </SFXEvent_Planet_Corrupted>
<SFXEvent_Corruption_Removed> UHD_REMOVED_Corruption_Removed </SFXEvent_Corruption_Removed>
<SFXEvent_Bunker_Garrisoned> Structure_Garrison_SFX </SFXEvent_Bunker_Garrisoned>
<SFXEvent_Bunker_Vacated> Structure_UnGarrison_SFX </SFXEvent_Bunker_Vacated>
<SFXEvent_Sabotage_Success> Unit_Sabotage_Death_SFX </SFXEvent_Sabotage_Success>
<SFXEvent_Hack_Success> Planet_Death_SFX </SFXEvent_Hack_Success>
<!-- MusicEvents -->
<Strategic_Map_Music_Event> Galactic_Map_Underworld_Music_Event </Strategic_Map_Music_Event>
<Music_Event_Battle_Load_Screen> Tactical_Battle_Loading_Loop_Event </Music_Event_Battle_Load_Screen>
<!-- ====================================================================== -->
<!-- TACTICAL BATTLE PENDING AUDIO EVENTS -->
<!-- ====================================================================== -->
<SFX_Event_Tactical_Land_Battle_Pending> UHD_REMOVED_Battle_Pending </SFX_Event_Tactical_Land_Battle_Pending>
<SFX_Event_Tactical_Space_Battle_Pending> UHD_REMOVED_Battle_Pending </SFX_Event_Tactical_Space_Battle_Pending>
<Music_Event_Tactical_Land_Battle_Pending> Tactical_Battle_Loading_Loop_Event </Music_Event_Tactical_Land_Battle_Pending>
<Music_Event_Tactical_Space_Battle_Pending> Tactical_Battle_Loading_Loop_Event </Music_Event_Tactical_Space_Battle_Pending>
<!-- ============================================== -->
<!-- MAPS MUSIC EVENTS - AMBIENT (NON-BATTLE) -->
<!-- ============================================== -->
<Music_Event_List_Ambient> Space, Space_Map_Rebel_Ambient_Music_Event </Music_Event_List_Ambient>
<Music_Event_List_Ambient> Temperate, Temperate_Land_Rebel_Ambient_Music_Event </Music_Event_List_Ambient>
<Music_Event_List_Ambient> Arctic, Ice_Land_Rebel_Ambient_Music_Event </Music_Event_List_Ambient>
<Music_Event_List_Ambient> Desert, Desert_Land_Rebel_Ambient_Music_Event </Music_Event_List_Ambient>
<Music_Event_List_Ambient> Forest, Temperate_Land_Rebel_Ambient_Music_Event </Music_Event_List_Ambient>
<Music_Event_List_Ambient> Swamp, Swamp_Land_Rebel_Ambient_Music_Event </Music_Event_List_Ambient>
<Music_Event_List_Ambient> Volcanic, Volcanic_Land_Rebel_Ambient_Music_Event </Music_Event_List_Ambient>
<Music_Event_List_Ambient> Urban, Urban_Land_Rebel_Ambient_Music_Event </Music_Event_List_Ambient>
<Tactical_Intro_Command_Bar_Movie_Name></Tactical_Intro_Command_Bar_Movie_Name>
<Garrison_Reinforcement_Delay_Seconds>20.0</Garrison_Reinforcement_Delay_Seconds>
<Multiplayer_Beacon_Type>R_Multiplayer_Beacon</Multiplayer_Beacon_Type>
<Default_Transmission_Message>TEXT_ENCYCLOPEDIA_HOLOCRON_UPDATED</Default_Transmission_Message>
<Alternate_Icon_Prefix> u_ </Alternate_Icon_Prefix>
</Faction>
<!-- ================================================================================= -->
<!-- ******************************** 2nd Fraction *********************************** -->
<!-- ================================================================================= -->
<Faction Name="Insert_Name_2">
<!-- IMPORTANT: You have to change this parameter according to the name of the primary fraction above !!! -->
<Variant_Of_Existing_Type>Insert_Name_1</Variant_Of_Existing_Type>
<!-- CAUTION: Needs a unique name tag in the .dat file, or it wont be displayed ingame -->
<Text_ID>TEXT_FACTION_NAME_2</Text_ID>
<Space_Tactical_Unit_Cap>50</Space_Tactical_Unit_Cap>
<Icon_Name>i_icon_pirate.tga</Icon_Name>
<Star_Base_Icon_Name> spacestation_icon.tga </Star_Base_Icon_Name>
<Color> 165, 115, 15, 255 </Color>
<No_Colorization_Color> 231, 221, 67, 255 </No_Colorization_Color>
<Display_Font_Color> 255, 128, 0, 255 </Display_Font_Color>
<Big_Fleet_Color> 255, 128, 0, 150 </Big_Fleet_Color>
<Bribed_Color>155, 153, 119, 255</Bribed_Color>
<!-- === BasicRebel, BasicEmpire or AI_Player_Underworld === -->
<Basic_AI>BasicRebel</Basic_AI>
<Is_Debug_Switchable_To> Yes </Is_Debug_Switchable_To>
<Create_Player_In_Multiplayer_Games>Yes</Create_Player_In_Multiplayer_Games>
<Is_Playable>true</Is_Playable>
<Can_Control_Planets>true</Can_Control_Planets>
<Is_Neutral> No </Is_Neutral>
<Allies></Allies>
<Enemies>Empire, Rebel, Hostile, Sarlacc, Underworld, Hutts, Pirates</Enemies>
<!-- Insert Ground Leader, and its Hero Company in the 2 tags below -->
<Faction_Leader></Faction_Leader>
<Faction_Leader_Company></Faction_Leader_Company>
<Multiplayer_Campaign_Heroes></Multiplayer_Campaign_Heroes>
<!-- These Units will spawn with the station in skirmish, you urgently need valid space units here or you wont control anything! -->
<Space_Skirmish_AI_Default_Forces>
</Space_Skirmish_AI_Default_Forces>
<!-- These Units will spawn with the HQ in skirmish, you urgently need valid ground units here! -->
<Land_Skirmish_AI_Default_Forces>
</Land_Skirmish_AI_Default_Forces>
<Land_Skirmish_Unit_Cap_By_Player_Count>
0,10, 1,10, 8,5,
</Land_Skirmish_Unit_Cap_By_Player_Count>
<Finale_Movie></Finale_Movie>
<Finale_Movie_2></Finale_Movie_2>
<Victory_Text>TEXT_UNDERWORLD_VICTORY</Victory_Text>
<Defeat_Text>TEXT_UNDERWORLD_DEFEAT</Defeat_Text>
<Space_Retreat_Countdown_Seconds> 4.99 </Space_Retreat_Countdown_Seconds>
<Land_Retreat_Countdown_Seconds> 4.99 </Land_Retreat_Countdown_Seconds>
</Faction>
<!-- ================================================================================= -->
<!-- ******************************** 3rd Fraction *********************************** -->
<!-- ================================================================================= -->
<Faction Name="Insert_Name_3">
<!-- IMPORTANT: You have to change this parameter according to the name of the primary fraction above !!! -->
<Variant_Of_Existing_Type>Insert_Name_1</Variant_Of_Existing_Type>
<!-- CAUTION: Needs a unique name tag in the .dat file, or it wont be displayed ingame -->
<Text_ID>TEXT_FACTION_NAME_3</Text_ID>
<Space_Tactical_Unit_Cap>50</Space_Tactical_Unit_Cap>
<Icon_Name>i_icon_pirate.tga</Icon_Name>
<Star_Base_Icon_Name> spacestation_icon.tga </Star_Base_Icon_Name>
<Color>0, 255, 255, 255 </Color>
<No_Colorization_Color> 0, 255, 255, 255 </No_Colorization_Color>
<Display_Font_Color> 0, 255, 255, 255 </Display_Font_Color>
<Big_Fleet_Color> 0, 255, 255, 255 </Big_Fleet_Color>
<Bribed_Color>155, 153, 119, 255</Bribed_Color>
<!-- === BasicRebel, BasicEmpire or AI_Player_Underworld === -->
<Basic_AI>BasicEmpire</Basic_AI>
<Is_Debug_Switchable_To> Yes </Is_Debug_Switchable_To>
<Create_Player_In_Multiplayer_Games>Yes</Create_Player_In_Multiplayer_Games>
<Is_Playable>true</Is_Playable>
<Can_Control_Planets>true</Can_Control_Planets>
<Is_Neutral> No </Is_Neutral>
<Allies></Allies>
<Enemies>Empire, Rebel, Hostile, Sarlacc, Underworld, Hutts, Pirates</Enemies>
<!-- Insert Ground Leader, and its Hero Company in the 2 tags below -->
<Faction_Leader></Faction_Leader>
<Faction_Leader_Company></Faction_Leader_Company>
<Multiplayer_Campaign_Heroes></Multiplayer_Campaign_Heroes>
<!-- These Units will spawn with the station in skirmish, you urgently need valid space units here or you wont control anything! -->
<Space_Skirmish_AI_Default_Forces>
</Space_Skirmish_AI_Default_Forces>
<!-- These Units will spawn with the HQ in skirmish, you urgently need valid ground units here! -->
<Land_Skirmish_AI_Default_Forces>
</Land_Skirmish_AI_Default_Forces>
<Land_Skirmish_Unit_Cap_By_Player_Count>
0,10, 1,10, 8,5,
</Land_Skirmish_Unit_Cap_By_Player_Count>
<Finale_Movie></Finale_Movie>
<Finale_Movie_2></Finale_Movie_2>
<Victory_Text>TEXT_UNDERWORLD_VICTORY</Victory_Text>
<Defeat_Text>TEXT_UNDERWORLD_DEFEAT</Defeat_Text>
<Space_Retreat_Countdown_Seconds> 4.99 </Space_Retreat_Countdown_Seconds>
<Land_Retreat_Countdown_Seconds> 4.99 </Land_Retreat_Countdown_Seconds>
</Faction>
This is the Fraction I created. Its actually a simple copy of the stock Underword fraction, but I removed all unnecessary sound effect tags to save 70% of space in the file. Further I ordered all tags of interest to the top of this fraction.
This eases the editing for you and you see the important things at first sight.
Its pretty self explanatory.
First thing you need to do is please open your
.\Star Wars Empire at War Forces of Corruption\Mods\Modname\Data\Text\MasterTextFile_???.dat using petroglyphs .dat editor tool:
www.petrolution.net/item-172
Or the String editor, which is more advanced and complicated.
Then please insert as many strings as fractions you are going to create.
I'll insert 3 for the beginning:
TEXT_FACTION_UNKNOWN =
Unknown
TEXT_FACTION_FACTION_1 =
Faction 1
TEXT_FACTION_FACTION_2 =
Faction 2
We are going to need these Strings later.
CAUTION:
String names must be CAPITAL, for
content this doesent matter.
Then save this and lets edit our
Expansion_Factions.xml.
- Now please insert the name of your fraction and overwrite "Insert_Name_1" in the
<Faction Name=""> Tag.
- Please scroll now down to the
***** 2nd Fraction ****** and paste the name you just typed into the
<Variant_Of_Existing_Type>Insert_Name_1</Variant_Of_Existing_Type> tag
- Then scroll down to Faction 3 and paste it also in its
<Variant_Of_Existing_Type> tag.
You need to have the name of this primary Fraction
in each other additional fraction you create (simply copy fraction 2 as many times you like), because the
primary fraction is the only full fraction with all detail tags that arnt really important..
The other Fractions below are all
<Variant_Of_Existing_Type>, which means the code of the primary one is simply applied to them and their tag content overwrites the code of the primary one (sonds complicated ? never mind just copy that and all'll be fine).
- Then please scroll all the way back up to the
primary fraction.
- Paste the first of the text strings we just inserted into our .dat file into the
<Text_ID>.(in my case its <Text_ID>
TEXT_FACTION_UNKNOWN</Text_ID>)
Note: This is the point where most of unsuccessfull modders did it wrong in their tests, this string needs to be valid and UNIQUE in order to be shown in the dropdown menu of the game!
- Optional: Open any photo editing application (like photoshop, gimp) or similar program to pick a color for your fraction, so you get the
RGB values, then insert then replace the first 3 values of the
<Color> tag.
Now you can edit the other values for your fraction:
- Make sure that the name of the current fraction isnt listed in
<Enemies> to be its own enemy ^^ and keep for each fraction the enemy list up to date.
If you forget to add a fraction to the Enemies tag its units will be ignored in the GCs, and they wont be visible at all except if you use a system spy unit to detect them.
Or, if you add Fraction_A as enemie to Fraction_B but forget to add the opponent Fraction_B as Enemy to Fraction_A, this will result in Fraction_B firing at Fraction_A but the Fraction_A units will refuse to defend themselfes because they ignore Fraction_B.
- Insert a Unit into
<Faction_Leader>
- Insert a
Hero Company Unit (thats NO normal unit!) into
<Faction_Leader_Company>
- IMPORTANT insert the name of any valid fighter unit of your fraction into
<Space_Skirmish_AI_Default_Forces>, or you wont have any starting fighters in skirmish!
Note: You will additionally need a Starbase or 5 starbases for each fraction in Starbases.xml otherwise there wont be a Starbase spawning in Skirmish mode.
- Same for
<Land_Skirmish_AI_Default_Forces>
----> Primary Fraction is finished now!
- Now please scroll back down to
fraction 2
- Give it any own
<Faction Name=""> (replace "
Insert_Name_2")
- Make sure
<Variant_Of_Existing_Type> points to a
valid primary fraction!
- Insert a valid text string into
<Text_ID> (
TEXT_FACTION_FACTION_1 in my case)
The rest from here you certainly can do by yourself, just repeat the steps for the
primary unit. I kept the code
sleek so there isnt much that draws your attraction away from the essential code. So adding a new fraction works quite fast now ^^