Jump to content


Photo

2 same abilities: one as auto, second as button


  • Please log in to reply
7 replies to this topic

#1 Anor

Anor
  • Members
  • 8 posts

Posted 30 January 2021 - 03:39 PM

Hello there,

 

I have a question to you: I've been trying to add to Gandalf two  the same abilities (more precisely: Shield Bubble) but:

  1. One as autoability (code below), which should be not in Palantir 
    	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_ShieldBubbleEnabler ;;,;;
    		SpecialPowerTemplate = SpecialPowerShieldBubble
    		TriggeredBy = Upgrade_ObjectLevel1 ;,; Upgrade_ObjectLevel3 ;Upgrade_GandalfWhite
    	End
    
    	;Behavior = AutoAbilityBehavior ModuleTag_ShieldBubbleAutoAbilityBehavior
    	;End
    	
    	Behavior = SpecialPowerModule ModuleTag_ShieldBubbleStarter ;;,;;                  
    		SpecialPowerTemplate      = SpecialPowerShieldBubble
    		UpdateModuleStartsAttack  = No
    		StartsPaused          = No ;,; Yes
    		AttributeModifier    = GandalfShieldBubbleBonus
    		AttributeModifierAffectsSelf = Yes
    		SetModelCondition    = ModelConditionState:USER_3
    		SetModelConditionTime   = 20 ;5 ;,; 4 ;,; 2.5; in seconds
    		InitiateSound = GenericSpell ;,;
    	End
    	
    	Behavior = SpecialAbilityUpdate ModuleTag_ShieldBubbleUpdate ;,;                    
            SpecialPowerTemplate      = SpecialPowerShieldBubble
        End
  2. Second as click-button (code below), which is displayed in Palantir.
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_NaryasBearerEnabler
		SpecialPowerTemplate 			= SpecialPowerNaryasBearer ;SpecialPowerShieldBubble
		TriggeredBy 					= Upgrade_NaryasBearer
	End

	Behavior = SpecialPowerModule ModuleTag_NaryasBearerStarter					  
		SpecialPowerTemplate	  		= SpecialPowerNaryasBearer ;SpecialPowerShieldBubble
		StartsPaused		  			= Yes
		UpdateModuleStartsAttack  		= Yes
		AttributeModifier		  		= GandalfShieldBubbleBonus
		AttributeModifierAffectsSelf 	= Yes
		SetModelCondition		  		= ModelConditionState:USER_4
		SetModelConditionTime	  		= 10; in seconds
	End

	Behavior = SpecialAbilityUpdate ModuleTag_NaryasBearerUpdate					  
		SpecialPowerTemplate	  		= SpecialPowerNaryasBearer ;SpecialPowerShieldBubble
		;UnpackTime			 			= 1	
		;PreparationTime		 			= 1
	End

As you can see I have changed names, but unfortunately it hasn't worked. Game treats it as one code and my Shield bubble in Palantir is an autoability.

 

Codes in SpecialPowers.ini look the same, I have just changed the name of it for second code to: SpecialPowerNaryasBearer EDIT: and commandbutton.ini I have also changed only name to: Command_NaryasBearer for second code (autoability = no).

 

My point is to get one autoability, which will be weaker and shorter, second one as click-button ability, which will be stronger, longer and have much higher cooldown time, I will also add some leadership bonuses to this ability, which will be passive.

 

Is there any way to split it and get two separate abilities or game will always treats it as one?


Edited by Anor, 30 January 2021 - 05:47 PM.


#2 King Arveleg

King Arveleg
  • Members
  • 69 posts
  • Location:Fornost
  • Projects:Arnor & Gondor & Rohan ,Kingdom of Arnor

Posted 30 January 2021 - 06:55 PM

Hello,

Post the code from specialpower.ini and commandbutton.ini.

Edited by King Arveleg, 30 January 2021 - 06:55 PM.


#3 Anor

Anor
  • Members
  • 8 posts

Posted 30 January 2021 - 09:28 PM

Specialpower.ini

SpecialPower SpecialPowerShieldBubble ;for autoability
  Enum              = SPECIAL_SHIELD_BUBBLE
  ReloadTime        = 60000 ;;,;; 30000
  InitiateSound     = GenericSpell ;,; 
End

SpecialPower SpecialPowerNaryasBearer ;for click-button ability
  Enum              = SPECIAL_SHIELD_BUBBLE
  ReloadTime        = 60000 ;;,;; 30000
  InitiateSound     = GenericSpell ;,; 
End

I haven't changed ReloadTime yet, because I am testing this if can make it works.

 

commandbutton.ini

CommandButton Command_ShieldBubble ;for autoability
  Command                    = SPECIAL_POWER 
  SpecialPower                = SpecialPowerShieldBubble
  TextLabel                    = CONTROLBAR:SpecialAbilityShieldBubble
  ButtonImage                = Gandolf_sphere
  ButtonBorderType            = ACTION 
  DescriptLabel                = CONTROLBAR:ToolTipSpecialAbilityShieldbubble
  InPalantir                = Yes
  AutoAbility                = Yes
End

CommandButton Command_NaryasBearer ;for click-button ability
	Command                    		= SPECIAL_POWER 
	SpecialPower                	= SpecialPowerNaryasBearer
	TextLabel                    	= CONTROLBAR:SpecialAbilityShieldBubble
	ButtonImage                		= Gandolf_sphere
	ButtonBorderType            	= ACTION 
	DescriptLabel                	= CONTROLBAR:ToolTipSpecialAbilityShieldbubble
	InPalantir                		= Yes
	AutoAbility                		= No
End


#4 King Arveleg

King Arveleg
  • Members
  • 69 posts
  • Location:Fornost
  • Projects:Arnor & Gondor & Rohan ,Kingdom of Arnor

Posted 05 February 2021 - 09:32 AM

Did you define "Upgrade_NaryasBearer" in upgrade.ini?
Did you add "Command_NaryasBearer" to gandalfcommandset in commandset.ini?

Edited by King Arveleg, 05 February 2021 - 09:36 AM.


#5 Anor

Anor
  • Members
  • 8 posts

Posted 07 February 2021 - 09:45 PM

Did you define "Upgrade_NaryasBearer" in upgrade.ini?
Did you add "Command_NaryasBearer" to gandalfcommandset in commandset.ini?

 

Hi King Arveleg,

Yes, I defined it:

 

Upgrade.ini

Upgrade Upgrade_NaryasBearer
	Type			= OBJECT
End

And I added it to experiencelevels.ini 

ExperienceLevel	GandalfLevel3
	TargetNames						=	GANDALF
	RequiredExperience				=	GANDALF_LVL3_EXP_NEEDED
	ExperienceAward					=	GANDALF_LVL3_EXP_AWARD 
	 AttributeModifiers				=	HeroLevelUpDamage2
	Rank							=	3
	Upgrades						= Upgrade_ObjectLevel3 Upgrade_NaryasBearer
	LevelUpFx						=	FX:GoodLevelUpFX
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%
		OpacityMax					=	100%
		MinRadius					=	40
		MaxRadius					=	200	
		MaxSelectedUnits			=	40
	End	

commandset.ini

CommandSet GondorGandalfCommandSet
	1	= Command_NaryasBearer ;Command_ToggleStance
	2  	= Command_SpecialAbilityWizardBlast
	3  	= Command_GondorGandalfLightningSword
	4  	= Command_GandalfShadowfax
	5  	= Command_GondorGandalfIstariLight
	6  	= Command_SpecialAbilityWordOfPower
	7	= Command_ShieldBubble
	12 	= Command_CaptureBuilding
	13 	= Command_AttackMove
	14 	= Command_Stop
	16  = Command_SetStanceBattle
	17  = Command_SetStanceAggressive
	18  = Command_SetStanceHoldGround
End


#6 King Arveleg

King Arveleg
  • Members
  • 69 posts
  • Location:Fornost
  • Projects:Arnor & Gondor & Rohan ,Kingdom of Arnor

Posted 08 February 2021 - 03:02 PM

I'm not absolutely sure, but try this:

CommandButton Command_ShieldBubble ;for autoability
Command = SPECIAL_POWER
SpecialPower = SpecialPowerShieldBubble
TextLabel = CONTROLBAR:SpecialAbilityShieldBubble
ButtonImage = Gandolf_sphere
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:ToolTipSpecialAbilityShieldbubble
InPalantir = No
AutoAbility = Yes
Radial = No
End

CommandButton Command_NaryasBearer ;for click-button ability
Command = SPECIAL_POWER
SpecialPower = SpecialPowerNaryasBearer
TextLabel = CONTROLBAR:SpecialAbilityShieldBubble
ButtonImage = Gandolf_sphere
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:ToolTipSpecialAbilityShieldbubble
InPalantir = Yes
AutoAbility = No
Radial = Yes
End

#7 Anor

Anor
  • Members
  • 8 posts

Posted 08 February 2021 - 07:44 PM

I'm not absolutely sure, but try this:

CommandButton Command_ShieldBubble ;for autoability
Command = SPECIAL_POWER
SpecialPower = SpecialPowerShieldBubble
TextLabel = CONTROLBAR:SpecialAbilityShieldBubble
ButtonImage = Gandolf_sphere
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:ToolTipSpecialAbilityShieldbubble
InPalantir = No
AutoAbility = Yes
Radial = No
End

CommandButton Command_NaryasBearer ;for click-button ability
Command = SPECIAL_POWER
SpecialPower = SpecialPowerNaryasBearer
TextLabel = CONTROLBAR:SpecialAbilityShieldBubble
ButtonImage = Gandolf_sphere
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:ToolTipSpecialAbilityShieldbubble
InPalantir = Yes
AutoAbility = No
Radial = Yes
End

 

Unfortunately it didn't work, but something interesting happened.

xD I don't even know what to say :D It looks like some kind of button appeared on Gandalf :D



#8 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 09 April 2021 - 12:49 PM

Which one works ?

maybe try a different approach with  the one that does not work 

a different Enum may be a start ,

or trying to give Gandalf an ability similar to Aragorn blade master , but with no weapon change , only an attribute change , hooked up with a model addition for the bubble , for the manual click button one 

 

the button appeared on Gandalf , as the InRadial = yes , gives any object  the button on them , used for a structure 


Edited by JUS_SAURON, 09 April 2021 - 12:49 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users