Jump to content


Photo

BFME 2 Guide: Converting Create A Hero powers to normal powers


  • Please log in to reply
2 replies to this topic

#1 Solinx

Solinx

    .

  • Undead
  • 3,101 posts
  • Location:The Netherlands
  • Projects:Real Life
  • Division:Revora
  • Job:Retired Leader / Manager

Posted 22 September 2006 - 05:15 PM

Link to opposite guide: BFME 2 Guide: Converting normal power to Create A Hero power

-----------------------------------------------------------------

Written by Solinx for The 3rd Age community
====================================

Allright you want to be able to use a Create a Hero power as a normal hero power.

I'll use Arwen as an example:

Arwen only has special powers at level 2 and level 10, I think she deserves a little more.
Not much, it has to stay the cheap hero, so I'll only include Summon Familiar Lvl 3 at level 5. This power is from the Archer CAH class.

Allmost all aspects of CAH's are stored in special files, same goes for powers.

You'll need to copy code from:

createaheropowers.inc
createaherospecialpowers.ini

And place it in:

specialpower.ini
upgrade.ini
arwen.ini

In addition you'll need to add some lines to:

Experiencelevels.ini
Commandbutton.ini
commandset.ini

Start by looking for the power in Createaheropowers.inc ( ini\object\createahero )

This is the code that needs to be copied:
//--------------------------------------------------------------------------	
//	SUMMON FAMILIAR SPECIAL POWER Level 3
//--------------------------------------------------------------------------
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_CreateAHeroSummonFamiliarEnabler_Level3
	SpecialPowerTemplate = SpecialAbilityCreateAHeroSummonFamiliar_Level3
	TriggeredBy = Upgrade_CreateAHeroSummonFamiliar_Level3
End

Behavior = OCLSpecialPower ModuleTag_CreateAHeroSummonFamiliarPower_Level3
	SpecialPowerTemplate	= SpecialAbilityCreateAHeroSummonFamiliar_Level3
	OCL						= OCL_CreateAHeroSummonFamiliar_Level3
	CreateLocation			= CREATE_AT_LOCATION
	StartsPaused			= Yes
	SetModelCondition		= ModelConditionState:USER_1
	SetModelConditionTime	= 8.1
End
Open up Arwen.ini ( ini\object\goodfaction\units\elven )

Search for "Flood" ( without the "" )

Below Flood are the three behaviors of the level 10 power.
You will need to past the code from Createaheropowers.inc after that and change some names:
//--------------------------------------------------------------------------	
//	SUMMON FAMILIAR SPECIAL POWER Level 3
//--------------------------------------------------------------------------
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_NormalSummonFamiliarEnabler_Level3
	SpecialPowerTemplate = SpecialAbilityNormalSummonFamiliar_Level3
	TriggeredBy = Upgrade_NormalSummonFamiliar_Level3
End

Behavior = OCLSpecialPower ModuleTag_NormalSummonFamiliarPower_Level3
	SpecialPowerTemplate	= SpecialAbilityNormalSummonFamiliar_Level3
	OCL						= OCL_CreateAHeroSummonFamiliar_Level3
	CreateLocation			= CREATE_AT_LOCATION
	StartsPaused			= Yes
	SetModelCondition		= ModelConditionState:USER_1
	SetModelConditionTime	= 8.1
End
As you see, everywhere, with the exception of the OCL, I changed CreatAHero into Normal.
We are done with Arwen.ini

We made a new upgrade ( TriggeredBy = upgrade), so we will need to define it in Upgrade.ini

Open it and add this:
Upgrade Upgrade_NormalSummonFamiliar_Level3
	Type = OBJECT
End
Close Upgrade.ini and open Createaherospecialpowers.ini

Look for this and copy it:
//------------------------------------------------------------------------------
SpecialPower SpecialAbilityCreateAHeroSummonFamiliar_Level3
	Enum					= SPECIAL_SPELL_BOOK_CREBAIN
	ReloadTime				= CREATE_A_HERO_SUMMON_FAMILIAR_RECHARGE_L3 //  in milliseconds
	PublicTimer				= No
	RadiusCursorRadius			= CREATE_A_HERO_SUMMON_FAMILIAR_CURSOR_RADIUS	 //	Also used in CreateAHeroFamiliar_Level1
	Flags					= WATER_OK
	InitiateAtLocationSound			= CaH_SummonFamiliar
End
Now open Specialpower.ini and past it somewhere.

The only thing you'll need to change is this:

SpecialPower SpecialAbilityCreateAHeroSummonFamiliar_Level3

into:

SpecialPower SpecialAbilityNormalSummonFamiliar_Level3

Close both files, if you haven't already.

Only a few steps to go.
Open experiencelevels.ini and find this:
ExperienceLevel	ArwenLevel5
	TargetNames				=	ElvenArwen
	RequiredExperience		=	ARWEN_LVL5_EXP_NEEDED
	ExperienceAward			=	ARWEN_LVL5_EXP_AWARD 	
	LevelUpFx				=	FX:GandalfLevelUp1FX
;LevelUpOCL				=	OCL_GandalfLevelUp1OCL
	Rank					=	5
	AttributeModifiers		=	HeroLevelUpDamage4
	SelectionDecal
		Texture				=	decal_hero_good
		Style				=	SHADOW_ALPHA_DECAL
		OpacityMin			=	50%	
		OpacityMax			=	100%
		MinRadius			=	40
		MaxRadius			=	200
		MaxSelectedUnits	=	40
	End	
End	
Add this between AttributeModifiers and SelectionDecal:

Upgrades = Upgrade_NormalSummonFamiliar_Level3


Now the only things needed are the commandbutton and commandset
We start with commandbutton.ini

Search this:
//------------------- Create A Hero ----------------------------
//--------------------------------------------------------------
CommandButton Command_CreateAHero_SummonFamiliar_Level3
	Command		   = SPECIAL_POWER
	SpecialPower	   = SpecialAbilityCreateAHeroSummonFamiliar_Level3
	TextLabel	   = CONTROLBAR:CAH_SummonFamiliar_Level3
	ButtonImage	   = CAHSummonFamiliar
	Options		   = NEED_TARGET_POS CONTEXTMODE_COMMAND
	RadiusCursorType   = FamiliarRadiusCursor
	CursorName	   = Bombard
	InvalidCursorName  = GenericInvalid	 
	ButtonBorderType   = ACTION	
	DescriptLabel	   = CONTROLBAR:TooltipCAH_SummonFamiliar_Level3
	InPalantir	   = Yes
//	UnitSpecificSound  = AragornVoiceSummonOathbreakers
//	AutoAbility	   = Yes //
//	TriggerWhenReady   = Yes //

	CreateAHeroUIAllowableUpgrades				=	Upgrade_CreateAHero_ClassArcher
	CreateAHeroUIMinimumLevel					=	7
	CreateAHeroUIPrerequisiteButtonName	= Command_CreateAHero_SummonFamiliar_Level2
End
This is the commandbutton for the CAH. We will copy it and use our own values, changing it into this:
//------------------- Create A Hero ----------------------------
//--------------------------------------------------------------
CommandButton Command_Normal_SummonFamiliar_Level3
	Command		   = SPECIAL_POWER
	SpecialPower	   = SpecialAbilityNormalSummonFamiliar_Level3
	TextLabel	   = CONTROLBAR:CAH_SummonFamiliar_Level3
	ButtonImage	   = CAHSummonFamiliar
	Options		   = NEED_TARGET_POS CONTEXTMODE_COMMAND
	RadiusCursorType   = FamiliarRadiusCursor
	CursorName	   = Bombard
	InvalidCursorName  = GenericInvalid	 
	ButtonBorderType   = ACTION	
	DescriptLabel	   = CONTROLBAR:TooltipCAH_SummonFamiliar_Level3
	InPalantir		   = Yes
//	UnitSpecificSound  = AragornVoiceSummonOathbreakers
//	AutoAbility		   = Yes //
//	TriggerWhenReady   = Yes //

End
I changed the name of the behavior by replacing CreateAHero with Normal and did the same replacement at SpecialPower.
The last three lines are only used in the CAH power menu and thus not needed for a normal hero.

The last step is to have the button in the command list, which is done in Commandset.ini

Find this:
CommandSet ElvenArwenCommandSet
	1	= Command_ToggleStance
	2	= Command_MountHorseArwen
	3	= Command_ArwenElvenGrace	
	4	= Command_ArwenFlood
	12	= Command_CaptureBuilding
	13	= Command_AttackMove
	14	= Command_Stop
End
We are going to add the new power between ElvenGrace and Flood, so it will look like this:
CommandSet ElvenArwenCommandSet
	1	= Command_ToggleStance
	2	= Command_MountHorseArwen
	3	= Command_ArwenElvenGrace	
	4	= Command_Normal_SummonFamiliar_Level3
	5	= Command_ArwenFlood
	12	= Command_CaptureBuilding
	13	= Command_AttackMove
	14	= Command_Stop
End
After this, you are ready to test your new ability.

Hope it helped you. :lol:

If you encountered any problems, please post here or post in the main BFME 2 / RotWK discussion forum and send me a pm (private message).

Update:
Do note that this guide is only about a basic ability. There are many abilities that function just a bit differently than this one. Most important exceptions being healing abilities and stealth abilities (including the disguise ability, as Cahik noted here.)


Solinx

Edited by Solinx, 21 January 2007 - 12:07 AM.

Posted Image

"An expert is a man who has made all the mistakes which can be made in a very narrow field." - Niels Bohr


#2 theczar

theczar
  • Members
  • 20 posts

Posted 18 March 2007 - 02:05 AM

just to keepthese tutorials next to each other

#3 Guest_Josiah_*

Guest_Josiah_*
  • Guests

Posted 21 January 2012 - 10:57 AM

Thanks for the guides I was trying to figure out how to do this on my own bit didn't get to far.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users