The 3rd Age

Realms of the Elf-Lords

Realms of the Elf-Lords

Realms of the Elf-Lords is a mod for The Rise of the Witch-King, by Lord Firkraag.

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

Weapons

Tutorial for Battle for Middle-earth II BFME 2

Avatar of Ridder Geel

Ridder Geel

Category: Code
Level: Intermediate
Created: Saturday February 9, 2008 - 8:20
Updated: Thursday December 15, 2011 - 14:27
Views: 18778
Summary: About Weapons, Weapon 'Leveling' and how to make a 'MorgulBlade' weapon effect.

Rating

Staff says

3.7

Members say

4.5

Average

4.4/5.0

20 votes

Page 1 2 3 4 5 6 7
'MorgulBlade' effect
This Tutorial will show you how to make your own MorgulBlade!
In this tutorial 'myhero' will be Jack (once again) and he is going to use the MorgulBlade that makes a chest of gold appear when he kills a unit!

NOTE
If you are going to do this then I do expect you to know what you are going to do and that you have a fairly good understanding about coding.
This tutorial will not teach you how to understand everything I'm doing here, but if you read other tutorials about the INI's that are listed down there then you should be able to have a basic idea about what im doing.
One last thing, you should know how to add commandsets and buttons and experiencelevels since I wont be telling that.


INI's Needed:
-'Myhero'.ini *the hero you are editing
-Upgrade.ini
-Weapon.ini
-Objectcreationlist.ini

-'Myhero'.ini-

Add this code to your hero's special power area:

              
Code

    ;--------- Kill For a chest of gold -------------------------------------------------------
    Behavior = UnpauseSpecialPowerUpgrade ModuleTag_BlackRiderMorgulBlade
        SpecialPowerTemplate = SpecialAbilityBlackRiderMorgulBlade
        TriggeredBy = Upgrade_JackChest
    End

    Behavior = SpecialPowerModule ModuleTag_BlackRiderMorgulBladeStarter
        SpecialPowerTemplate        = SpecialAbilityBlackRiderMorgulBlade
        UpdateModuleStartsAttack    = Yes
        StartsPaused                = Yes
        InitiateSound                = FellBeastVoiceAttack
    End

    Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_BlackRiderMorgulBladeUpdate
        SpecialPowerTemplate = SpecialAbilityBlackRiderMorgulBlade
        SkipContinue            = Yes

        UnpackTime                = 150 ;250
        PreparationTime            = 1
        PersistentPrepTime        = 250 ;500
        PackTime                = 50 ;100
        
        AwardXPForTriggering    = 0
        StartAbilityRange        = 15.0
        
        SpecialWeapon            = Jackschestofgold ;EvilMenBlackRiderMorgulBlade
        WhichSpecialWeapon        = 1
    End

    Behavior = AutoAbilityBehavior ModuleTag_MorgulBladeAutoAbility
        SpecialAbility    = SpecialAbilityBlackRiderMorgulBlade
        ForbiddenStatus = INSIDE_GARRISON
        AllowSelf        = No
        Query            = 1 MORGULBLADE_OBJECT_FILTER
    End


Im going to explain what I changed from the original 'MorgulBlade' power:

1st
TriggeredBy = Upgrade_JackChest
Its the upgrade needed to do the power...

2nd
SpecialWeapon = Jackschestofgold
The Weapon he uses when doing the power...

Moving On...

-Upgrade.ini-

Add this code at the bottom of upgrade.ini:

              
Code

Upgrade Upgrade_JackChest
Type                = OBJECT
End


This is the upgrade you will need to add to the experiencelevels.INI yourself, and it will be used later!
~if you do not know how to do this then you did not read my note on the top of the page!~

-Weapon.ini-

Add this code at the bottom of the file:

              
Code

Weapon Jackschestofgold
    LeechRangeWeapon = Yes
    AttackRange                = 30.0
    MeleeWeapon                = Yes
    ;FireFX                    = FX_BlackRiderMorgulBladeTempAudio        ;FX_BlackRiderMorgulBlade
    DelayBetweenShots        = EVILMEN_BLACKRIDER_DELAYBETWEENSHOTS
    PreAttackDelay            = EVILMEN_BLACKRIDER_PREATTACKDELAY ; 1467 is the prep time for archer.
    PreAttackType            = PER_SHOT ; Do the delay each time we attack a new target
    FiringDuration            = EVILMEN_BLACKRIDER_FIRINGDURATION ; Duration of the archer firing shot is 500ms.

    DamageNugget ; A basic Nugget that just does damage
        Damage = 2000
        Radius = 0.0
        DelayTime = 0
        DamageType = MAGIC
        DamageSubType = BECOME_UNDEAD ;<- This seems like it has nothing to do with a chest when he dies...
        DamageFXType = MAGIC
        DeathType = NORMAL
    End

    AttributeModifierNugget
        AttributeModifier = BlackRiderMorgulBlade
        DamageFXType = SWORD_SLASH
        SpecialObjectFilter = MORGULBLADE_OBJECT_FILTER
    End
End


You might have seen the Note in the codebox,
Its true the BECOME_UNDEAD might seem like a joke but I'm sure you'll understand:
Become_undead just spawns a wight when the dude dies... so you could change the OCL so it drops a chest or another creature instead when it dies!

I also removed the poison damagenugget from the code, you can just get it back from the original morgulblade weapon if you want...

-Objectcreationlist.ini-

Find this code:

              
Code

;--------------------------------Become Undead----------------------------
ObjectCreationList OCL_BecomeUndead
    CreateObject
        ObjectNames                = BarrowWight_Summoned ; ;
        Count                    = 1
        FadeIn                    = No
    End
End


And change it to:

              
Code

;--------------------------------Become Undead----------------------------
ObjectCreationList OCL_BecomeUndead
    CreateObject
        ObjectNames                = BarrowWight_Summoned ; ;
        Count                    = 1
        FadeIn                    = No
        ForbiddenUpgrades = Upgrade_JackChest
    End

    CreateObject
        ObjectNames                = TreasureChest1 ;; BarrowWight_Summoned ; ;
        Count                    = 1
        FadeIn                    = No
        RequiredUpgrades = Upgrade_JackChest
    End
End


Now Jack should get a chest of gold when he kills someone with his power!

Note
You still have to add the upgrade Upgrade_JackChest to the experiencelevels.ini and add the command Command_BlackRiderMorgulBlade to your hero's commandset

With this code you should be able to make another unit appear after killing a unit with the power I have tested this myself and it worked, so it should work for you!


I hope this tutorial helped you alot.

Please put a comment if the power does not work, I tried it myself and it worked but who knows...

Links / Downloads

 HitsAdded
Available DamageTypes2017February 10, 2008 - 18:15
JackSpearLVL4exspearglow.tga -@Page31708February 9, 2008 - 12:02

Comments

Display order: Newest first | Page: 1, 2

Sauron-the-Deciever - Thursday December 1, 2011 - 3:10

Flank bonus means the bonus for attacking units from behind

modboy451 - Friday November 12, 2010 - 10:34

Excellent Article!
Thanks, Im using different forms of morgul blades now (that give me different thing)
i was wanting to know how to put poison and flame onto my heros weapons too, thanks!

Ridder Geel (Staff) - Saturday July 4, 2009 - 11:56

In weapon.ini....
change this line:
        Damage            = GLORFINDEL_SWORD_DAMAGE
to a different value...
Simple...
Next time ask this in the forums.

elvenlord95 - Thursday July 2, 2009 - 8:19

e...how can i make a hero's weapon(for example glorfindels) making more damage?
"the sky has fallen"

Ridder Geel (Staff) - Thursday April 30, 2009 - 7:23

1. Good idea ;)
2. Reformat, will do that later.
3. I didn't click on it alot. I usually do check the tutorial for replies or comments and such once every day, and i think that maybe because of this tutorials subject some people open the tutorial more than once to check out some things about some nuggets and such. I sometimes even go here to check some of the nuggets ;)

Behavior? do you mean all the things from in the "Engineering" part of the "Unit" or "Structure"? If thats the case then I will consider making that later.

Sulherokhh (Team Chamber Member) - Wednesday April 29, 2009 - 1:33

1. How about you list any changes on page 1?
2. Don't you think a reformat would help reading? (like removal of empty space, etc.)
3. How long did it take you to click on the tutorial so it would appear in the top ten popular section? ;-)

Can you answer those questions? I might give it a 4 instead of 3. :)

Otherwise, this is just what is needed, a very thankful job indeed.
Now a comprehensive listing of 'Behavior'-modules with a listing of all toggles would be nice indeed ... in an additional tutorial.

Masterbadeend - Wednesday April 29, 2009 - 1:05

I think Flanking Bonus is this: When the unit flanks (yellow lightning bolt) an another unit then he gets for example +50% extra damage to that other unit.

Zarmoz - Tuesday March 10, 2009 - 2:44

You are the best of the best. good job!

I have made Aragorn have a Poisonous sword, Gandalf with Flame sword, Legolas with magic bow, Frodo with poisonous dagger and create a heros have flame if they're swordsman or poison if they're archer. ;)

dethwaker3 - Monday October 27, 2008 - 21:36

I am definitely gonna use the get healed by attacking units!!!!

Lurtzy - Tuesday June 10, 2008 - 14:11

Helped me get started a while ago, good tutorial!

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."

 
11:11:22