Results 1 to 10 of 10

Hybrid View

  1. #1

    Creating a tech upgrade

    Hi guys,

    I've run into a little problem when trying to create a tech level upgrade. The tech structure in one of our factons is required to build second tier units, and you can purcahse an upgrade from this tech structure to further access the third tier units.

    The first part was easy enough, but creating the third tier tech upgrade has cause some problems.

    Currently, the code within the structure for the upgrade is as follows:

    Code:
    			<TechUpgrade
    				id="ModuleTag_TechUpgrade_Tech3"
    				Radius="390.0"
    				DistanceType="RECTANGULAR">
    				<TriggeredBy>Upgrade_UCTech3</TriggeredBy>
    				<ObjectFilter
    					Rule="ANY"
    					Relationship="SAME_PLAYER" >
    					<IncludeThing>UBAirfield</IncludeThing>
    					<IncludeThing>UBBarracks</IncludeThing>
    					<IncludeThing>UBNavalYard</IncludeThing>
    					<IncludeThing>UBWarFactory</IncludeThing>
    				</ObjectFilter>
    			</TechUpgrade>
    And also the button code for this upgrade:

    Code:
    	<ButtonSingleStateData
    		id="ButtonStateUpgradeUCTech3">
    		<State
    			Image="UU_Button_RippeGrinder"
    			Title="NAME:UpgradeUCTech3"
    			Description="DESC:UpgradeUCTech3" />
    
    	</ButtonSingleStateData>
    
    	<UnitAbilityButtonTemplate
    		id="MouseButtonUpgradeUCTech3"
    		LogicCommand="Command_PurchaseUCTech3">
    		<Data>
    			<ObjectUpgrade StateData="ButtonStateUpgradeUCTech3"/>
    		</Data>
    	</UnitAbilityButtonTemplate>
    Within an upgrade.xml I have:

    Code:
    	<UpgradeTemplate id="Upgrade_UCTech3"
    		inheritFrom="BasePurchasableUpgrade"
    		DisplayName="UpgradeName:UCTech3"
    		AcquireHint="UpgradePrereq:UCTech3"
    		TypeDescription="UpgradeType:UCTech3"
    		Description="UpgradeDesc:UCTech3"
    		Type="OBJECT"
    		BuildTime="1.0s"
    		BuildCost="150"
    		IconImage="Button_UpgradeMortar"
    		Options="OBJECT_UPGRADE_PROJECTED">
    	</UpgradeTemplate>
    And within the unit itself I have:

    Code:
    		<GameDependency>
    			<NeededUpgrade>Upgrade_UCTech3</NeededUpgrade>
    		</GameDependency>
    I also have the following logic commands:

    Code:
    	<LogicCommand
    		Type="OBJECT_UPGRADE"
    		id="Command_PurchaseUCTech3">
    		<Upgrade>Upgrade_UCTech3</Upgrade>
    		<AISpecialPowerInfo Heuristic="UPGRADE" Manager="BUILDER"/>
    	</LogicCommand>
    Code:
    	<LogicCommandSet
    		id="UBTechLabCommandSet">
    		<Cmd>Command_PurchaseUCTech3</Cmd>
    	</LogicCommandSet>
    The button works and you can purchase the upgrade. An EVA message is displayed when the upgrade has been purchased, is signalled on the minimap, and the button greys out.

    However the unit within the war factory still remains disabled and says the purchase of the upgrade is still required.

    I think it's got something to do with the fact that it's not transferring the upgrade data to the war factory, because I've used the code from the Allied outpost as a basis but it's not showing the 'link' between structures.

    Have I missed something obvious? I would really appreciate your help.

    Please note the purchase times and costs are for testing purposes only.

    Many thanks
    Last edited by Dreamscape; 05-08-2011 at 11:04 AM.
    Phil Hogg
    MOD Leader / Lead Artist



  2. #2
    Master Sergeant R3ven's Avatar
    Join Date
    Feb 2011
    Posts
    114
    You need to put this on the receiving structures(make sure to edit it to comply of course).

    Code:
    <TechUpgradeReceiver xmlns="uri:ea.com:eala:asset"
    	id="ModuleTag_TechUpgradeReceiver_Tech3"
    	Radius="600.0"
    	DistanceType="RECTANGULAR"
    	FXLineBoneName="fx_bone_upgrade_dish">
    	<TriggeredBy>Upgrade_AlliedTech3</TriggeredBy>
    	<ObjectFilter
    		Rule="ANY"
    		Relationship="ALLIES" >
    		<IncludeThing>AlliedConstructionYard</IncludeThing>
    		<IncludeThing>AlliedOutpost</IncludeThing>
    	</ObjectFilter>
    </TechUpgradeReceiver>

  3. #3
    What really annoys me is that I looked at that code briefly but couldn't work out where it would go - so dismissed it!

    One of the reasons I love this community, if you try hard enough and show that you not looking for someone to do all the work for you, people are genuinely happy to help.

    Really appreciate that, works like a charm. I'm going to disable the link effect as it will be a global upgrade so you could end up with several link lines.

    Many thanks again!
    Phil Hogg
    MOD Leader / Lead Artist



  4. #4
    Master Sergeant R3ven's Avatar
    Join Date
    Feb 2011
    Posts
    114
    No problem

  5. #5
    Well despite me "thinking" I knew where the code/texture for the tech link was, I have been unable to remove it. I thought it was FX_TechStream but I was mistaken. Anyone know which texture is used for tech links, and even better where the xml code for these links is?
    Phil Hogg
    MOD Leader / Lead Artist



  6. #6
    Master Sergeant R3ven's Avatar
    Join Date
    Feb 2011
    Posts
    114
    I don't know where the fx comes from, but I know how remove it. For that remove the line FXLineBoneName.

    EDIT: Ninja-speed response ftw.

  7. #7
    Where am I removing that from? I can't see that anywhere in my code.
    Phil Hogg
    MOD Leader / Lead Artist



  8. #8
    Master Sergeant R3ven's Avatar
    Join Date
    Feb 2011
    Posts
    114
    TechUpgradeReceiver

  9. #9
    Hmm, no wonder I couldn't find it.. I've already removed it - but it's still showing.
    Phil Hogg
    MOD Leader / Lead Artist



  10. #10
    Master Sergeant R3ven's Avatar
    Join Date
    Feb 2011
    Posts
    114
    That worked for me before, I don't know :S

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Victory Games is Electronic Arts' dedicated Strategy Gaming studio. Formed in 2010 under the leadership of Jon Van Caneghem, Victory Games has offices in Los Angeles, CA; Austin, TX; and Shanghai, China and is currently focused on the Command & Conquer franchise.