The 3rd Age

RJ - RotWK

RJ - RotWK

A mod that combines the best of BFME1 and BFME2 - living world campaign, factions, AI, bases, etc.

Button for The 3rd AgeButton for The Dwarf HoldsButton for The Elven AllianceButton for Helm's Deep Last HopeButton for GothmogtheOrcButton for BFME+Button for The Four AgesButton for HDR HeadquartersButton for Middle Earth CenterButton for Project Perfect Mod

Become an affiliate!

   

Quick Lists

Top Rated Popular New Updated Last Comments Users

Register and log in to move these advertisements down

The Special Power Guide

Avatar of Ridder Blauw

Ridder Blauw

Category: Code
Level: Intermediate
Created: Wednesday March 25, 2009 - 9:41
Updated: Friday May 28, 2010 - 15:36
Views: 11886
Summary: Here you will read and learn tips and tricks about special powers.

Rating

Staff says

3.7

Members say

4.0

Average

3.9/5.0

9 votes

Page 1 2 3 4 5 6 7 8 9
Combined Powers - Beginner

This tutorial will show you how to combine powers, I will show you the way that only works with Projectile spells. These are Wounding Arrow, Axe Throw, etc.

You will be needing:
'YourHero'.ini -The hero you will be editing
Weapon.ini

First up is the 'YourHero'.ini,

'YourHero'.ini

For this tutorial I will be using Ridder Blauw as usual, if the hero already has Leap or Wounding, etc., you may skip this part. Scroll down to the power section and paste this:
              
Code
;--------------------------------------------------------------------------
; Faramir Wounding Arrow - AKA: FaramirWoundArrow
;--------------------------------------------------------------------------
    
    Behavior = UnpauseSpecialPowerUpgrade ModuleTag_UnpauseWoundArrow
        SpecialPowerTemplate        = SpecialAbilityWoundArrow ;Referenced in the specialpower.ini
        TriggeredBy                    = Upgrade_ObjectLevel2 ;Which upgrade 'unlocks' the power?
    End ;Needed at the end of every code block!
    Behavior = SpecialPowerModule ModuleTag_WoundArrow
        SpecialPowerTemplate        = SpecialAbilityWoundArrow ;Referenced in the specialpower.ini
        UpdateModuleStartsAttack    = Yes ;Does the update module start the power?
    InitiateSound                = FaramirRangerVoiceWoundingArrow ;What sound comes when you use this power?
    StartsPaused                = Yes ;Do you have to wait with using it?
    End
    Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_WoundArrowUpdate
        SpecialPowerTemplate        = SpecialAbilityWoundArrow ;Referenced in the specialpower.ini
        SkipContinue                = Yes
        UnpackTime                    = 2000 ;Reload time
        PreparationTime                = 1
        PersistentPrepTime            = 1000
        PackTime                    = 1
        AwardXPForTriggering        = 0 ;The exp you gain for starting the power
        StartAbilityRange            = #SUBTRACT( FARAMIR_WOUNDING_ARROW_RANGE 25 )
        ApproachRequiresLOS            = Yes ;Does it require line of sight to fire it
        SpecialWeapon                = FaramirWoundArrow ;The weapon that is used, referenced in the weapon.ini
        WhichSpecialWeapon            = 1 ;Keep it this way
    End
    Behavior = AutoAbilityBehavior ModuleTag_WoundArrowAutoAbility
        SpecialAbility                = SpecialAbilityWoundArrow ;Referenced in the specialpower.ini
        MaxScanRange                = #SUBTRACT( FARAMIR_WOUNDING_ARROW_RANGE 25 )
        Query                        = 1 ALL ENEMIES -STRUCTURE
    End
    
    ; Generic
    Behavior = AutoAbilityBehavior ModuleTag_AutoAbilityBehavior ;This makes it be an auto -ability
    End

I have written descriptions of most of the coding, now look at this part:
              
Code
SpecialWeapon                = FaramirWoundArrow

Change it to the name we will reference it in the weapon ini, as an example:
              
Code
SpecialWeapon                = [YourHero]WoundArrow

Replace '[YourHero]' with the name of your hero, please.
Now we move on to the weapon ini,

Weapon.ini

Scroll all the way down to the bottom of the file, paste this piece of code there:
              
Code
Weapon FaramirWoundArrow
    AttackRange                = FARAMIR_WOUNDING_ARROW_RANGE
    LeechRangeWeapon            = Yes
    WeaponSpeed                = 321                 ; dist/sec
    MinWeaponSpeed            = 241
    MaxWeaponSpeed            = 481            ; dist/sec Upper limit on scaling, when attacking past nominal "max" range
    FireFX                = FX_FaramirWoundingArrow
    ScaleWeaponSpeed            = Yes ; Used for lob weapons, scales speed proportional to range
    HitPercentage            = 100         ;When this weapon is used it will hit exactly 75% of the time.
    ScatterRadius            = 0.0         ;When this weapon misses it can randomly miss by as much as this distance.
    DelayBetweenShots            = 15000                                    ; time between shots, msec
    PreAttackDelay            = 1                                        ; we want isntant
    PreAttackType            = PER_POSITION
    FiringDuration            = 1                                        ; Duration of the archer firing shot is 500ms.
    ClipSize                = 1
    AutoReloadsClip            = Yes
    AutoReloadWhenIdle        = 1    
    ClipReloadTime            = Min:FARAMIR_BOW_RELOADTIME_MIN Max:FARAMIR_BOW_RELOADTIME_MAX
    AntiAirborneVehicle        = Yes
    AntiAirborneMonster        = Yes
    PreferredTargetBone        = B_LLLID ; Likes to shoot things in their left eye.
    ProjectileNugget                                        ; A Nugget that creates an Object and sends it to the target with a Warhead
        ProjectileTemplateName    = FaramirSpecialArrow
        WarheadTemplateName    = FaramirWoundArrowWarhead
    End
End

Now look at this code:
              
Code
Weapon FaramirWoundArrow

Change it to this:
              
Code
Weapon [YourHero]WoundArrow

Remember to replace the '[YourHero]' with the name of your hero or what you had referenced it with in the 'YourHero'.ini.
Now look at the 'Projectile Nugget' code block:
              
Code
    ProjectileNugget                                        ; A Nugget that creates an Object and sends it to the target with a Warhead
        ProjectileTemplateName    = FaramirSpecialArrow
        WarheadTemplateName    = FaramirWoundArrowWarhead
    End

Copy and paste this part of coding.
Now edit it to this:
              
Code
    ProjectileNugget                                        ; A Nugget that creates an Object and sends it to the target with a Warhead
        ProjectileTemplateName    = FaramirSpecialArrow ;This is the same.        WarheadTemplateName    = GandalfWordOfPower ;WWe have changed this.
    End

The full weapon should now look like this:
              
Code
Weapon FaramirWoundArrow
    AttackRange                = FARAMIR_WOUNDING_ARROW_RANGE
    LeechRangeWeapon            = Yes
    WeaponSpeed                = 321                 ; dist/sec
    MinWeaponSpeed            = 241
    MaxWeaponSpeed            = 481            ; dist/sec Upper limit on scaling, when attacking past nominal "max" range
    FireFX                = FX_FaramirWoundingArrow
    ScaleWeaponSpeed            = Yes ; Used for lob weapons, scales speed proportional to range
    HitPercentage            = 100         ;When this weapon is used it will hit exactly 75% of the time.
    ScatterRadius            = 0.0         ;When this weapon misses it can randomly miss by as much as this distance.
    DelayBetweenShots            = 15000                                    ; time between shots, msec
    PreAttackDelay            = 1                                        ; we want isntant
    PreAttackType            = PER_POSITION
    FiringDuration            = 1                                        ; Duration of the archer firing shot is 500ms.
    ClipSize                = 1
    AutoReloadsClip            = Yes
    AutoReloadWhenIdle        = 1    
    ClipReloadTime            = Min:FARAMIR_BOW_RELOADTIME_MIN Max:FARAMIR_BOW_RELOADTIME_MAX
    AntiAirborneVehicle        = Yes
    AntiAirborneMonster        = Yes
    PreferredTargetBone        = B_LLLID ; Likes to shoot things in their left eye.
    ProjectileNugget                                        ; A Nugget that creates an Object and sends it to the target with a Warhead
        ProjectileTemplateName    = FaramirSpecialArrow
        WarheadTemplateName    = FaramirWoundArrowWarhead
    End
    ProjectileNugget                                        ; A Nugget that creates an Object and sends it to the target with a Warhead
        ProjectileTemplateName    = FaramirSpecialArrow ;This is the same.
        WarheadTemplateName    = GandalfWordOfPower ;We have changed this.
    End
End

Et Voilà, save this and put the 'Command_SpecialAbilityWoundArrow' in your hero's commandset and test if it doesn't work please tell me.

Note: This works the same for Axe Throw

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

To learn more about weapons check out Ridder Geel's Tutorial, you can click on the link at the Links/Downloads.

Links / Downloads

 HitsAdded
Throwing Knife, Premade (Credit Required)1293August 19, 2009 - 2:17
Weapons Tutorial, by Ridder Geel1544May 6, 2009 - 2:11

Comments

Display order: Newest first | Page: 1, 2

clank234 - Tuesday November 16, 2010 - 12:41

I gave a 5
1) A lot off effort just to help others which i love to see a lot.
2) Can i hav some help with Summon Balrog, when i try to play it crashes and the upgrade.ini isnt right

Ridder Blauw - Monday August 23, 2010 - 6:05

That means the thing that is filled in at Attackrange in the weapon is wrong.

Or the macro there doesnt exsist or the characters filled in are wrong.

SkillModLord - Friday August 20, 2010 - 0:02

Weapon.ini

That part where you combine woundarrow with Word of Power goes wrong.

When I put the piece of code you written there in my weapon.ini and correct it as you said, I try to start up the game and it says that attacktange in the file weapon.ini isnt good. I try to put other command first under the wounding arrow but then the the same bug appears with the new command first :S

Shininku - Sunday September 13, 2009 - 18:53

This was pretty awesome guide and it helped me to fix up my powers. But I think I need help. I've set up my hero so that he can summon a BlackRider (Ringwraith w/e) at level 10. When my character gets to level 10, Blackrider icon lights up like it's usable. But when I click it, nothing happens. I don't get the little summoning area thing. What'd I do wrong?

Ridder Blauw - Friday September 11, 2009 - 10:02

Yes.

drogoth232 - Wednesday September 9, 2009 - 14:07

In the coding part. Will sam have the throwing anims?

Ridder Blauw - Wednesday August 19, 2009 - 8:34

That's modeling and coding. ;)

--------

Added a Two Part tutorial to continue the Editing Projectile Spells tutorial, New Projectile Spells! ;):);)

Spartan184 - Wednesday June 24, 2009 - 18:09

I tryed adding Summon Balrog to Saruman and it crashed its for bfme1.
Nevermind Fixed it. Thanks a lot UR THE BEST!!!
For the Gimli thing for instead of haveing a axe he has a Spear can we change the weopen like say sarumans staff or something?

Ridder Blauw - Sunday May 10, 2009 - 22:26

The code calls them dozers in the code block DOZER_CONSTRUCT don't they?

--------

Didn't get at first why you brought it up, so would you forgive me.
And thanks.

Prolong - Sunday May 10, 2009 - 19:57

DOZERs are Builder/Porters

Go to top

 

"One site to rule them all, one site to find them,
one site to host them all, and on the network bind them."

 
12:11:47