Jump to content
DerelictStudios Forums
Count von Phoib

Starting Units In Ra3

Recommended Posts

First of all, a huge thanks to Lauren, who gave the necessary Position code here.

 

Adding starting units in RA3 is easier then in previous games, and you are no longer confined to 10 units max.

 

First of all, open up SageXML\System\PlayerTemplates.xml

 

Find the code for the faction you want to give starting units.

			id="Allies"
	Side="Allies"
	Type="PLAYABLE"
	StartingBuilding="AlliedConstructionYard"
	ScriptedHuntTactic="ScriptedHuntTactic"
	DisplayNameToken="INI:FactionAllies"
	FactionIconImageName="GameSetup_flag_Allied"
	UnattachedMpBeaconTemplate="MultiplayerBeacon"
	AttachedMpBeaconTemplate="MultiplayerBeaconAttached"
	MaxMpBeacons="=$PLAYER_MAX_MP_BEACONS" 
	LoadScreenMusic="TEMP_RAM_Music360_LoadScreen"
	SkirmishMPVictoryMusic=""
	SkirmishMPDefeatMusic=""
	FactionDataPathMusicEvent="SetPlayerAllied"
	MatchVictoryPathMusicEvent="S_EndMissionWin"
	MatchDefeatPathMusicEvent="S_EndMissionLose"
	SpellBookSP="PlayerSpellBook"
	SpellBookMP="PlayerSpellBook"
	NumberOfResourceAccounts="1"
	ParachuteOCL="OCL_AlliedParachute"
	DefaultTech="PlayerTech_Allied"
	PlayerTechUpgradeBinding="PlayerTechUpgradeBinding_Allied"
	TechRankPointsPerSecond="1"
	InitialTechPoints="1"
	PowerOutageTurnsOffRadar="false">
	BaseRedAlert
	
	
	Upgrade_AlliesFaction
	
	
				BeaconType="Assault"
		UnattachedTemplate="AIAssaultBeacon"
		AttachedTemplate="AIAssaultBeaconAttached"/>
				BeaconType="HoldObject"
		AttachedTemplate="AIHoldBeaconAttached"/>
				BeaconType="HoldPosition"
		UnattachedTemplate="AIHoldBeacon"/>
	PlayerTechRank_Rank1
	PlayerTechRank_Rank2
	PlayerTechRank_Rank3
	PlayerTechRank_Rank4
	PlayerTechRank_Rank5
	PlayerTechRank_Rank6
	PlayerTechRank_Rank7
	PlayerTechRank_Rank8
	PlayerTechRank_Rank9
	PlayerTechRank_Rank10
				RequiredTech="PlayerTech_ProductionBonus_Allies"
		HarvesterBonus="25%"
		HarvesterBonusAllies="5%"
	/>

(An example of faction code) and locate the following two lines

        <InitialUpgrade>Upgrade_AlliesFaction</InitialUpgrade>
        <StartingMoney Account="=$ACCOUNT_ORE"        Amount="10000"/>

In between, add the following code:

        <StartingUnitInfo>  
             <Object>StartingObject</Object>  
             <Position  
              x="11.0"  
              y="11.0"  
              z="0.0" /> 
        </StartingUnitInfo>

Where StartingObject is the object you want to start with.

 

Two notes:

  1. The position fields are ignored. The game will place the units around the Conyard in a predetermined matter.
  2. This has been stress tested up to 40 units. Higher is certainly possible, but do mind, you will start with a screen full of units.

 

Share this post


Link to post
Share on other sites

Example of code where the Allies start with 1 Athena Cannon:

    <PlayerTemplate
        id="Allies"
        Side="Allies"
        Type="PLAYABLE"
        StartingBuilding="AlliedConstructionYard"
        ScriptedHuntTactic="ScriptedHuntTactic"
        DisplayNameToken="INI:FactionAllies"
        FactionIconImageName="GameSetup_flag_Allied"
        UnattachedMpBeaconTemplate="MultiplayerBeacon"
        AttachedMpBeaconTemplate="MultiplayerBeaconAttached"
        MaxMpBeacons="=$PLAYER_MAX_MP_BEACONS"
        LoadScreenMusic="TEMP_RAM_Music360_LoadScreen"
        SkirmishMPVictoryMusic=""
        SkirmishMPDefeatMusic=""
        FactionDataPathMusicEvent="SetPlayerAllied"
        MatchVictoryPathMusicEvent="S_EndMissionWin"
        MatchDefeatPathMusicEvent="S_EndMissionLose"
        SpellBookSP="PlayerSpellBook"
        SpellBookMP="PlayerSpellBook"
        NumberOfResourceAccounts="1"
        ParachuteOCL="OCL_AlliedParachute"
        DefaultTech="PlayerTech_Allied"
        PlayerTechUpgradeBinding="PlayerTechUpgradeBinding_Allied"
        TechRankPointsPerSecond="1"
        InitialTechPoints="1"
        PowerOutageTurnsOffRadar="false">
        <RedAlertTemplate>BaseRedAlert</RedAlertTemplate>
        <PreferredColor R="50" G="75" B="200"/>
        <PreferredCampaignRadarColor R="50" G="75" B="200"/>
        <InitialUpgrade>Upgrade_AlliesFaction</InitialUpgrade>
        <StartingUnitInfo>  
                 <Object>AlliedAntiStructureVehicle</Object>  
                 <Position  
                  x="10.0"  
                  y="10.0"  
                  z="0.0" />  
         </StartingUnitInfo> 
        <StartingMoney Account="=$ACCOUNT_ORE" Amount="10000"/>
        <MoneyCap Account="=$ACCOUNT_ORE" Amount="999999"/>
        <AIBeaconSettings
        BeaconType="Assault"
        UnattachedTemplate="AIAssaultBeacon"
        AttachedTemplate="AIAssaultBeaconAttached"/>
        <AIBeaconSettings
        BeaconType="HoldObject"
        AttachedTemplate="AIHoldBeaconAttached"/>
        <AIBeaconSettings
        BeaconType="HoldPosition"
        UnattachedTemplate="AIHoldBeacon"/>
        <TechRank>PlayerTechRank_Rank1</TechRank>
        <TechRank>PlayerTechRank_Rank2</TechRank>
        <TechRank>PlayerTechRank_Rank3</TechRank>
        <TechRank>PlayerTechRank_Rank4</TechRank>
        <TechRank>PlayerTechRank_Rank5</TechRank>
        <TechRank>PlayerTechRank_Rank6</TechRank>
        <TechRank>PlayerTechRank_Rank7</TechRank>
        <TechRank>PlayerTechRank_Rank8</TechRank>
        <TechRank>PlayerTechRank_Rank9</TechRank>
        <TechRank>PlayerTechRank_Rank10</TechRank>
        <TechProductionBonuses
        RequiredTech="PlayerTech_ProductionBonus_Allies"
        HarvesterBonus="25%"
        HarvesterBonusAllies="5%"
        />
    </PlayerTemplate>

Share this post


Link to post
Share on other sites

×