Jump to content


Photo

Hero Powers


  • Please log in to reply
10 replies to this topic

#1 Missile157

Missile157
  • Members
  • 25 posts

Posted 08 February 2013 - 06:53 PM

Hello people,

 

I've recently been trying to add a new hero to the game and it was all going well until I tried to give him special powers. I'm trying to add a Forlong the Fat and I haven't given him any models or skins, he looks identical to Boromir at the moment.

So I want to give him some powers but how do I do this? I know I need to add them on the commandset.ini but what else do I need to do. I see a file called "specialpower" and I think that's where the powers go. But what files do I need to edit to add a new power or modify an existing one.

 

I think an example would help a lot, so what would I have to change to give him the Leadership power, for example. I'm currently using RJs mod so I won't be publishing this mod it's just for learning and I can't seem to find the leadership powers anywhere (except Eomer's).

 

Thanks in advance.



#2 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 08 February 2013 - 09:09 PM

With hero powers there are various different components that work together. The main ones are the SpecialPowerModule and SpecialAbilityUpdate (or variations thereof) inside a Hero's INI file. I suggest you read this elaborate tutorial on special powers first and then post specific questions as they arise.


revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#3 Missile157

Missile157
  • Members
  • 25 posts

Posted 08 February 2013 - 10:46 PM

Thanks for the article it helped a lot. I now think I understand the general steps of how to create/modify a power, but this article talks about a summon power and a convert power.  I think I could adapt it to something different for example blademaster, but where are the properties of blademaster (how strong it is etc.) because in the specialpower.ini it only says this:

SpecialPower SpecialAbilityAragornBladeMaster
	Enum					   = SPECIAL_HERO_MODE
	ReloadTime				   = 120000	;60000
End

 

There is also a power called: FakeLeadership which I assume is the leadership power, but again, where are the specifics of this power (radius of effect/ what is actually buffs). The code is this:

SpecialPower SpecialAbilityFakeLeadership
  Enum                = SPECIAL_FAKE_LEADERSHIP_BUTTON
  ReloadTime          = 1 ; in milliseconds
  ;PalantirMovie = PalantirAlert_RohanReinforcements
End

 

Surely the details of these powers are somewhere else, or maybe not?

Thanks for your help.



#4 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 08 February 2013 - 11:03 PM

For Blademaster you need to look at this code:

 

Behavior = UnpauseSpecialPowerUpgrade ModuleTag_AragornBladeMasterEnabler
	SpecialPowerTemplate = SpecialAbilityAragornBladeMaster
	TriggeredBy = Upgrade_AragornBladeMaster
End

Behavior = SpecialPowerModule ModuleTag_AragornBladeMasterStarter
	SpecialPowerTemplate    = SpecialAbilityAragornBladeMaster
	StartsPaused			= Yes
End

Behavior = HeroModeSpecialAbilityUpdate ModuleTag_AragornBladeMasterUpdate
	SpecialPowerTemplate    = SpecialAbilityAragornBladeMaster
	HeroAttributeModifier	= AragornBladeMaster
	HeroEffectDuration		= 25000 ; this should sync with the auto ability delay re-fire time in commandButtons.ini
	UnpackTime              = 1 ; insant unpack
	TriggerSound			= AragornBladeMaster
End
  • UnpauseSpecialPowerUpgrade unlocks the power based on an upgrade (Upgrade_AragornBladeMaster, which he gets at a certain level).
  • SpecialPowerModule in this case only references the power in specialpower.ini and disables the power at starts (that's why the behaviour above unlocks it).
  • HeroModeSpecialAbilityUpdate contains the actual information. The stat effects come from a component called "Attribute Modifier" in BFME and stored in the file attributemodifier.ini. In this case it's a modifier called "AragornBladeMaster".
ModifierList AragornBladeMaster
	Category = SPELL
	Modifier = ARMOR 50%			; Additive.  Sum of these are subtracted from all entries in Armor.ini
	Modifier = DAMAGE_MULT 150% ; 200%	; Multiplicitive.  Damage multiplied by this, will compound in multiple bonuses
	Duration = 25000 ; 30000		; lasts for 30 seconds
End

Here you can see the boosts he receives (+50% armour, +50% Damage) and their duration.

 

So if you want to give another hero a Blade Master style power you will need to copy and then edit this information together with the SpecialPowerTemplate in specialpowers.ini and the CommandButton and CommandSet. If you want it to unlock properly you'll also have to copy the upgrade and add it to your hero's ExperienceLevels. But you can make it easier for yourself at first if you just set StartsPaused to No.


revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#5 damianbt88

damianbt88

    * *

  • Members
  • 110 posts
  • Location:AshKum
  • Projects:AMSG
  •  Ctrl+C Ctrl+V Master

Posted 08 February 2013 - 11:09 PM

taken from aragorn.ini

put this behavior into your newhero.ini

Spoiler

 

TriggeredBy = Upgrade_AragornLeadership in AttributeModifierAuraUpdate makes this power available when unit reaches level1-10

experiencelevels.ini

ExperienceLevel    yourunitnameLevel9

...

Upgrades                = Upgrade_AragornLeadership

...

end

 

BonusName = GenericHeroLeadership can be found in the attributemodifier.ini

 



ak-ulub laam gûkrûrz-ulub lûp-al


#6 Missile157

Missile157
  • Members
  • 25 posts

Posted 08 February 2013 - 11:40 PM

Thank you very much, both of you. So all the effects of powers are found in the attributemodifier.ini. Also thanks for the detail in your responses I'm sure both of those codes will help me alot. :)

 

So if I want him to gain a power at a certain level I must create an upgrade which he will receive at said level. I assume this is correct as I found  it in RJ's mod, yet it looks like it triggers differently than the above method of triggering blade master:

Behavior = UnpauseSpecialPowerUpgrade ModuleTag_AragornBladeMasterEnabler
		SpecialPowerTemplate		= SpecialAbilityAragornBladeMaster
		TriggeredBy			= Upgrade_ObjectLevel2 Upgrade_UseRing
	End

  	Behavior = SpecialPowerModule ModuleTag_AragornBladeMasterStarter                ; SpecialAbility is a SpecialPower, SpecialPower is anyting special
		SpecialPowerTemplate		= SpecialAbilityAragornBladeMaster
		StartsPaused			= Yes
	End

	Behavior = HeroModeSpecialAbilityUpdate ModuleTag_AragornBladeMasterUpdate   ; So the difference in SpecialAbility is that it takes timing from this Update, instead of simply firing.
		SpecialPowerTemplate		= SpecialAbilityAragornBladeMaster
		HeroAttributeModifier		= AragornBladeMaster
		HeroEffectDuration		= 30000 ; this should sync with the auto ability delay re-fire time in commandButtons.ini
		UnpackTime			= 1 ; insant unpack
		TriggerSound			= AragornBladeMaster

 

I guess Upgrade_ObjectLevel2 is the thing which happens as soon as a hero levels up (just a different method of triggering a power at a certain level). I really don't know what Upgrade_UseRing is, maybe it means all his powers activate if he carries the ring.

 

In upgrade.ini all it says about ObjectLevel2 is:

Upgrade Upgrade_ObjectLevel2
	Type			= OBJECT
End

 

There is also no Upgrade_AragornBlademaster in upgrade.ini. Maybe I'm just a bit confused. Could you please explain how to create the upgrade which triggers at a certain level?



#7 damianbt88

damianbt88

    * *

  • Members
  • 110 posts
  • Location:AshKum
  • Projects:AMSG
  •  Ctrl+C Ctrl+V Master

Posted 09 February 2013 - 12:48 AM

Upgrade_ObjectLevel2 is not given automatically. check the experiencelevels.ini

all other upgrades are just... upgrades with diff names. it is not so important which1 you will use to trigger specialpower



ak-ulub laam gûkrûrz-ulub lûp-al


#8 Missile157

Missile157
  • Members
  • 25 posts

Posted 09 February 2013 - 10:35 AM

OK sorry for the long time between replies It was getting late in GMT time so I went to bed.

Anyway I have checked experiencelevel.ini and Upgrade_ObjectLevel2 is just what every hero recieves when they reach the required EXP to get to level 2. I guess you could change Upgrade_ObjectLevel2 to anything as long as it corresponds with the power you are trying to set up.

Here's the code for anyone who's interested (from Boromir):

ExperienceLevel	BoromirLevel2
	TargetNames			= GondorBoromir	
	RequiredExperience		= RJ_BOROMIR_LVL2_EXP_NEEDED
	ExperienceAward			= RJ_BOROMIR_LVL2_EXP_AWARD
	AttributeModifiers		= HeroLevelUpDamage1
	Rank				= 2
	Upgrades			= Upgrade_ObjectLevel2
	LevelUpFx			= FX:GandalfLevelUp1FX
	;LevelUpOCL			= OCL_GandalfLevelUp1OCL
	SelectionDecal
		Texture			= decal_hero_boromir
		Style			= SHADOW_ALPHA_DECAL
		OpacityMin		= 50%
		OpacityMax		= 100%
		MinRadius		= 400
		MaxRadius		= 600
		MaxSelectedUnits	= 1	
	End
End


#9 Missile157

Missile157
  • Members
  • 25 posts

Posted 09 February 2013 - 04:48 PM

Just a little problem now. I have managed to give my hero blade master and it appears, unlocks at the right level and it can be activated. However the red glow that appears when Aragorn uses Blademaster isn't there and I don't know why. Does anyone know why this would happen, or where the code for the red glow is?

Here's the current code on hero.ini:

;---------------------          Blade Master    ---------------
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_AragornBladeMasterEnabler
		SpecialPowerTemplate = SpecialAbilityAragornBladeMaster
		TriggeredBy = Upgrade_ObjectLevel2
	End

 	Behavior = SpecialPowerModule ModuleTag_AragornBladeMasterStarter                ; SpecialAbility is a SpecialPower, SpecialPower is anyting special
		SpecialPowerTemplate    = SpecialAbilityAragornBladeMaster
		StartsPaused			= Yes
	End

	Behavior = HeroModeSpecialAbilityUpdate ModuleTag_AragornBladeMasterUpdate
	SpecialPowerTemplate    = SpecialAbilityAragornBladeMaster
	HeroAttributeModifier	= AragornBladeMaster
	HeroEffectDuration		= 30000 ; this should sync with the auto ability delay re-fire time in commandButtons.ini
	UnpackTime              = 1 ; insant unpack
	TriggerSound			= AragornBladeMaster
End


#10 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 09 February 2013 - 07:21 PM

Aragorn has this in his draw module in the art parameters:

 

 

        ModelConditionState = WEAPONSET_HERO_MODE
            ParticleSysBone = BAT_RIBS BladeMaster FollowBone:Yes
        End
 

 

 

 

So make something similar to that in your hero's draw module for that modelconditionstate, and it should work :)

You might need to find the name of the "ribs" bone though in order for the FX to be where you want it.


Edited by Ridder Geel, 09 February 2013 - 07:22 PM.

Ridder Geel

#11 Missile157

Missile157
  • Members
  • 25 posts

Posted 09 February 2013 - 07:23 PM

Ok that's great, thanks.

My hero was indeed missing the model condition state, thanks for your help it works now. :)






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users