Jump to content


Photo

Messed Up Code?


  • Please log in to reply
3 replies to this topic

#1 TheWickedOne

TheWickedOne

    The Unforgivable One

  • Project Team
  • 422 posts
  • Location:U.S.A
  • Projects:View "About Me" Page
  •  Game Coder

Posted 22 October 2008 - 09:30 PM

OK, i recently changed the purchased ability of the Elves for the upgrades to be in different levels. The only problem i have so far is that the Heavy armor still appears as a level 1 upgrade instead of level 3. I have the code right, i tried looking on it on upgrades.ini but nothing. This is my commandbutton.ini code:

CommandButton Command_PurchaseTechnologyElvenHeavyArmor
	Command				= PLAYER_UPGRADE
	Options				= CANCELABLE
	Upgrade				= Upgrade_TechnologyElvenHeavyArmor
	NeededUpgrade		= Upgrade_EregionForgeLevel3
	TextLabel			= CONTROLBAR:PurchaseTechnologyElvenHeavyArmor
	ButtonImage			= BEEregionForge_ElvenArmor
	ButtonBorderType	= UPGRADE
	DescriptLabel		= CONTROLBAR:ToolTipPurchaseTechnologyElvenHeavyArmor
	Radial				= Yes
	InPalantir	   		= No
	LacksPrerequisiteLabel		= TOOLTIP:LackLevel2BlacksmithHeavyArmor
End

CommandButton Command_PurchaseUpgradeElvenHeavyArmor
	Command				= OBJECT_UPGRADE
	Options				= NEED_UPGRADE OK_FOR_MULTI_SELECT CANCELABLE
	Upgrade				= Upgrade_ElvenHeavyArmor 
	NeededUpgrade		= Upgrade_TechnologyElvenHeavyArmor
	TextLabel			= CONTROLBAR:PurchaseUpgradeElvenHeavyArmor
	ButtonImage			= BEEregionForge_ElvenArmor
	ButtonBorderType	= UPGRADE
	DescriptLabel		= CONTROLBAR:ToolTipPurchaseUpgradeElvenHeavyArmor
	InPalantir	   		= Yes
	LacksPrerequisiteLabel		= TOOLTIP:LackElvenHeavyArmor
End


#2 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 22 October 2008 - 09:37 PM

Does the EregionForge Levelup to lvl3? :xcahik_:
The code looks ok... also post the 'upgrade'
Ridder Geel

#3 TheWickedOne

TheWickedOne

    The Unforgivable One

  • Project Team
  • 422 posts
  • Location:U.S.A
  • Projects:View "About Me" Page
  •  Game Coder

Posted 22 October 2008 - 09:42 PM

Yes, the forge levels up to Level 3, i added men armor to it as well on level 3 and it works fine but i could understand why this happened.

upgrade.ini code:

Upgrade Upgrade_TechnologyElvenHeavyArmor
	DisplayName	   = UPGRADE:ElvenHeavyArmor
	Type			  = PLAYER
	BuildCost		= ELVEN_TECH_HEAVY_ARMOR_BUILDCOST
	BuildTime		= ELVEN_TECH_HEAVY_ARMOR_BUILDTIME
	ResearchCompleteEvaEvent	= UpgradeElvenArmorReady
End

Upgrade Upgrade_ElvenHeavyArmor
	DisplayName	   = UPGRADE:ElvenHeavyArmor
	Tooltip		= TOOLTIP:ElvenHeavyArmor
	Type			  = OBJECT
	BuildCost		= ELVEN_PERSONAL_HEAVY_ARMOR_BUILDCOST
	BuildTime		= ELVEN_PERSONAL_HEAVY_ARMOR_BUILDTIME
	ResearchSound	= UpgradeHeavyArmor
	UpgradeFX		= FX_PorterDeliverHeavyArmor
	RequiredObjectFilter = NONE +EregionForge
	StrategicIcon	= AptStrategicUnitUpgradeArmor
End

code for the Forge from upgrades.ini:
Upgrade Upgrade_EregionForgeLevel2
   Type			= OBJECT
	BuildCost		   = ELVEN_FORGE_LEVEL2_UPGRADE_COST
	BuildTime		   = ELVEN_FORGE_LEVEL2_UPGRADE_BUILDTIME
	DisplayName		 = UPGRADE:EregionForgeLevel2
	SkirmishAIHeuristic = AI_UPGRADEHEURISTIC_IMPORTANT
End
 
Upgrade Upgrade_EregionForgeLevel3
	Type		   = OBJECT
	BuildCost	  = ELVEN_FORGE_LEVEL3_UPGRADE_COST
	BuildTime	  = ELVEN_FORGE_LEVEL3_UPGRADE_BUILDTIME
	DisplayName	= UPGRADE:EregionForgeLevel3
	SkirmishAIHeuristic = AI_UPGRADEHEURISTIC_IMPORTANT
End


#4 TheWickedOne

TheWickedOne

    The Unforgivable One

  • Project Team
  • 422 posts
  • Location:U.S.A
  • Projects:View "About Me" Page
  •  Game Coder

Posted 22 October 2008 - 10:38 PM

Never mind, found it.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users