Jump to content


Photo

Adding A New Power


  • Please log in to reply
3 replies to this topic

#1 olog hai of the east

olog hai of the east
  • Members
  • 82 posts
  • Location:New Zealand
  •  Coder, Mapper

Posted 24 February 2007 - 03:30 AM

Hi. I Am having slight trouble adding a custom made power I will post up the codes now. Although this is my power and would not like it copied.

Behavior = UnpauseSpecialPowerUpgrade ModuleTag_EnableHorn
		SpecialPowerTemplate		= SpecialAbilityHornOfBuckland
		TriggeredBy					= Upgrade_MerryHornOfBuckland
	End
	Behavior = SpecialPowerModule ModuleTag_HornStarter						
		SpecialPowerTemplate		= SpecialAbilityHornOfBuckland
		UpdateModuleStartsAttack	= Yes
		AntiCategory				= LEADERSHIP
		AttributeModifier			= BoromirGondorHornAntiCategory	; Used for the anti category duration only.
		AttributeModifierRange		= 100.0
		StartsPaused				= Yes							; obtained on level 2
	End
	Behavior = ModelConditionSpecialAbilityUpdate ModuleTag_HornUpdate   
		SpecialPowerTemplate	= SpecialAbilityHornOfBuckland
;		StartAbilityRange	   = 2.0


		UnpackTime			  = 1700								; Drawing the horn
		PreparationTime		 = 1									; nothing
		PersistentPrepTime	  = 1600								; Blowing
		PackTime				= 1666								; Putting horn away

;	PackSound			   = 
;	UnpackSound			 = 
;	TriggerSound			= 
;	PrepSoundLoop		   = 
		AwardXPForTriggering	= 0
	End

Thats in the object INI.

; -- Horn anims
		AnimationState		= UNPACKING SPECIAL_POWER_1
			Animation		   
				AnimationName	 = GUBoromir_SKL.GUBoromir_HRNA
				AnimationMode	 = ONCE
			End
		End
		AnimationState		= PREPARING SPECIAL_POWER_1
			Animation		   
				AnimationName	 = GUBoromir_SKL.GUBoromir_HRNB
				AnimationMode	 = ONCE
			End
			EnteringStateFX = FX_BoromirHorn
		End
		AnimationState		= PACKING SPECIAL_POWER_1
			Animation		   
				AnimationName	 = GUBoromir_SKL.GUBoromir_HRNC
				AnimationMode	 = ONCE
			End
		End
		AnimationState		= SPECIAL_POWER_1
			Animation		   
				AnimationName	 = GUBoromir_SKL.GUBoromir_HRNB
				AnimationMode	 = LOOP
			End
		End

Thats in animations

CommandButton Command_MerryHornOfBucklandButton
  Command				 = SPECIAL_POWER
  SpecialPower			= SpecialAbilityFakeLeadership
  Options				  = NONPRESSABLE
  TextLabel			   = CONTROLBAR:LastStand
  ButtonImage			 = UCCommon_AggresiveStance
  RadiusCursorType		= TrainingRadiusCursor
  Upgrade		= Upgrade_MerryHornOfBuckland
  ButtonBorderType		= ACTION
  DescriptLabel		   = CONTROLBAR:ToolTipLastStand
  InPalantir		  = Yes
  UnitSpecificSound	   = TheodenVoiceSpeech
End

Thats in commandbutton INI

SpecialPower SpecialAbilityMerryHornOfBuckland
  Enum			  = SPECIAL_GENERAL_TARGETLESS
  ReloadTime		= 120000; in milliseconds
End

Thats in SPecial Power Ini

Upgrade Upgrade_MerryHornOfBuckland
  Type			  = OBJECT
End

Thats In Upgrade

Command_SpecialAbilityMerryHornOfBuckland

Now im having a game dat. about commandset and The above string
It's only funny until someone gets hurt, Then its Hilarios!

#2 Lauri

Lauri

    Old man Lauri

  • Hosted
  • 10,436 posts
  • Location:Norway
  • Projects:The 4th Age
  •  The very worst T3A Team Chamber Member

Posted 24 February 2007 - 04:32 AM

well.... for starters....

in commandbutton.ini you have Command_MerryHornOfBucklandButton
and you probably have Command_SpecialAbilityMerryHornOfBuckland in Merry's commandset... (or other that uses boromirs anims)
so, in the commandset, make Command_SpecialAbilityMerryHornOfBuckland to Command_MerryHornOfBucklandButton or the other way around :p

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#3 olog hai of the east

olog hai of the east
  • Members
  • 82 posts
  • Location:New Zealand
  •  Coder, Mapper

Posted 24 February 2007 - 07:49 AM

I have been toying with it all day but to no avail. The button doesnt even come up any more
It's only funny until someone gets hurt, Then its Hilarios!

#4 jimiojoe

jimiojoe

    War Mungerer

  • Project Team
  • 491 posts
  • Projects:X-Mod, The Harry Potter Modification
  •  Advice

Posted 24 February 2007 - 10:35 AM

from your code....

firstly you need to change the "SpecialAbilityFakeLeadership" int eh commandbutton to "SpecialAbilityHornOfBuckland" - they must be the same.

secondly, for the upgrade to make it work, you only need to have the triggeredBy, which you have, and in experiencelevels.ini - at the level you want insert the line 'Upgrades = Upgrade_MerryHornOfBuckland' - that will give Merry the upgrade as soon as he gets to that level, and for that reason you dont need the upgrade in the commandbutton.ini.

if your saying your getting game.dat errors about the commandset post that code for us to see too.

Hope that helps
Jimiojoe
A light from the shadow shall spring.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users