Jump to content


Photo

BMFE2 Powers


  • Please log in to reply
7 replies to this topic

#1 LordSWME

LordSWME
  • New Members
  • 4 posts

Posted 09 March 2006 - 02:02 AM

Hey I am trying to add a Create a Hero Special Ability to a normal hero. The game keeps crashing because of a commandset problem. It doesnt recognize the special ability. If anyone knows how to do this it would be appreciated.

Edited by LordSWME, 09 March 2006 - 02:02 AM.


#2 Artifice

Artifice

    title available

  • Members
  • 382 posts
  • Location:Texas

Posted 09 March 2006 - 02:06 AM

Can you post your code? We can't tell you whats wrong unless we see it.

#3 LordSWME

LordSWME
  • New Members
  • 4 posts

Posted 09 March 2006 - 02:16 AM

CommandSet MordorWitchKingCommandSet
1 = Command_ToggleStance
2 = Command_WitchKingToggleMounted
3 = Command_WitchKingDreadVisage
4 = Command_SpecialAbilityScreechWitchKing
5 = Command_HourOfTheWitchKing
6 = Command_SpecialAbilityCreateAHeroWordOfPower
12 = Command_CaptureBuilding
13 = Command_AttackMove
14 = Command_Stop
End

Instead of the blue ring that it normally has i changed it to the meteor blast fx. That way the two Word of Powers are different

#4 Artifice

Artifice

    title available

  • Members
  • 382 posts
  • Location:Texas

Posted 09 March 2006 - 02:25 AM

The only thing I can think of is that the CreateAHero powers aren't able to be used, which seems ridiculous. Try moving it to the normal specialpower file and renaming it.

#5 LordSWME

LordSWME
  • New Members
  • 4 posts

Posted 09 March 2006 - 02:43 AM

I moved it to the normal specialpower and named it SpecialAbilityWitchKingWordOfPower. The game still crashes with a commandset problem. Saying that there is no such thing. Mabye help with just adding a new special power.

#6 steve_randle

steve_randle
  • Members
  • 87 posts
  • Location:Singapore
  • Projects:Learning to Skin And Model

Posted 09 March 2006 - 02:59 AM

cause there isn't such a thing as SpecialAbilityWitchKingWordOfPower, it doesn't exist either create it or use a existing one, in that case you need to use this Command_SpecialAbilityWordOfPower.. in your case, you might need to create the power in specialpower.ini

Edited by steve_randle, 09 March 2006 - 03:01 AM.

°^v^°i'LL BeAt tHe TaR oUt Of yOu°^v^°

#7 Artifice

Artifice

    title available

  • Members
  • 382 posts
  • Location:Texas

Posted 09 March 2006 - 03:19 AM

I thought he had already made a commandbutton. Ok, this is the all the code that edits an ability.

1. The behavior in the hero. In this case:
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_WordEnabler	SpecialPowerTemplate = SpecialAbilityCreateAHeroWordOfPower	TriggeredBy			 = Upgrade_GandalfWordOfPowerEndBehavior = SpecialPowerModule ModuleTag_WordStarter       	SpecialPowerTemplate      = SpecialAbilityCreateAHeroWordOfPower	UpdateModuleStartsAttack  = Yes	StartsPaused		  	  = YesEndBehavior = WeaponFireSpecialAbilityUpdate ModuleTag_WordWeaponFireUpdate   	SpecialPowerTemplate	   = SpecialAbilityCreateAHeroWordOfPower	WhichSpecialWeapon		   = 1	SkipContinue			   = Yes	UnpackTime				   = 1700 	PackTime				   = 1	   	FreezeAfterTriggerDuration = 2500 // Hold AI for this long after we	fire.	AwardXPForTriggering	   = 0	   	StartAbilityRange		   = 180.0	SpecialWeapon			   = CreateAHeroWordOfPower	PlayWeaponPreFireFX		   = YesEnd
So this should go next to all of the other behaviors/

2. Here is the special power which the behavior in #1 refers to:
//-----------------------------------------------------------------------------------------------------------------------------------------
// WORD OF POWER SPECIAL POWER
//-----------------------------------------------------------------------------------------------------------------------------------------
SpecialPower SpecialAbilityCreateAHeroWordOfPower
	Enum									  =	SPECIAL_WORD_OF_POWER
	ReloadTime								  =	360000
	PublicTimer								  =	No
End

3. Here is the upgrade that the Behavior in #1 refers to:
Upgrade Upgrade_GandalfWordOfPower
  Type			  = OBJECT
End

4. Here is the weapon referred to in #1:
//------------------------------------------------------------------------------Weapon CreateAHeroWordOfPower // Big Blue Ring Blast	IdleAfterFiringDelay = 0	AttackRange = GANDALF_WORD_OF_POWER_RANGE	MinimumAttackRange = 0.8	WeaponSpeed = 401         // dist/sec 	MinWeaponSpeed = 241	MaxWeaponSpeed = 601      // dist/sec Upper limit on scaling, when attacking past nominal "max" range	ScaleWeaponSpeed = Yes // Used for lob weapons, scales speed proportional to range	RadiusDamageAffects = ENEMIES NOT_SIMILAR	DelayBetweenShots = 5000               // time between shots, msec	PreAttackDelay        = 2600	PreAttackType         = PER_ATTACK // Do the delay each time we attack a new target	PreAttackFX           = FX_GandalfPreAttackBlast	FireFX                = FX_GandalfBlast	FiringDuration      = 1400	DamageNugget                        // A basic Nugget that just does damage		Damage			= GANDALF_WORD_OF_POWER_DAMAGE		Radius			= 250.0		DamageType		= MAGIC		DamageFXType	= MAGIC		DeathType		= EXPLODED		DamageSpeed		= 700.0 // must match the ShockWaveSpeed below	End	MetaImpactNugget                    // A Nugget that throws things back with force//		HeroResist			= .75		ShockWaveAmount   = 70.0		ShockWaveRadius   = 500.0		ShockWaveTaperOff = 1.0		ShockWaveZMult    = 1.000		ShockWaveSpeed	  = 700.0 	EndEnd

5. The upgrade also should be in the experience level, so that the hero can gain this ability upon gaining rank. This is Gandalf's rank 10 experience level.
ExperienceLevel	GandalfLevel10	TargetNames						=	GANDALF	RequiredExperience				=	GANDALF_LVL10_EXP_NEEDED	ExperienceAward					=	GANDALF_LVL10_EXP_AWARD 	AttributeModifiers				=	HeroLevelUpDamage9	Rank							=	10	Upgrades						=	Upgrade_GandalfWordOfPower	LevelUpFx						=	FX:GandalfLevelUp1FX	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL	SelectionDecal		Texture						=	decal_hero_good		Style						=	SHADOW_ALPHA_DECAL		OpacityMin					=	50%		OpacityMax					=	100%		MinRadius					=	40		MaxRadius					=	200			MaxSelectedUnits			=	40	End	END

6. There also needs to be a commandbutton. This is Gandalf's again for the sake of understanding.
CommandButton Command_SpecialAbilityWordOfPower  Command                 = SPECIAL_POWER   SpecialPower            = SpecialAbilityWordOfPower;  Options                 =   TextLabel               = CONTROLBAR:WordofPower  ButtonImage             = Gandolf_radcircle;HSGandalfWordOfPower  ButtonBorderType        = ACTION   DescriptLabel           = CONTROLBAR:ToolTipWordofPower  AutoAbility			  = Yes  PresetRange			  = 120.0;  UnitSpecificSound       =   InPalantir			  = YesEnd

7. Finally, it is in the hero's commandset.
CommandSet GondorGandalfCommandSet
	1	= Command_ToggleStance
	2	  = Command_SpecialAbilityWizardBlast
	3	  = Command_GondorGandalfLightningSword
	4	  = Command_GandalfShadowfax
	5	  = Command_GondorGandalfIstariLight
	6	  = Command_SpecialAbilityWordOfPower
	12 	= Command_CaptureBuilding
	13 	= Command_AttackMove
	14 	= Command_Stop
End
Notice how the name of the command is the same as the name of the comandbutton.

I'm showing you this so that you can see what you need to do to add an ability to a hero. Some of these steps are already done in your case, I'm just giving you a little nudge in the right dirrection :p

Hope that helps
-Imrahil

#8 LordSWME

LordSWME
  • New Members
  • 4 posts

Posted 09 March 2006 - 03:39 AM

Thanks I'll give that a shot.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users