The 3rd Age

JUS_SAURON - The Power Of The Ring

JUS_SAURON - The Power Of  The Ring

New Powers , Heroes and Units for all Factions

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

Negative Leadership

Tutorial for Battle for Middle-earth BFME, Battle for Middle-earth II BFME 2, Battle for Middle-earth II: Rise of the Witch-king ROTWK

Avatar of Radspakr Wolfbane

Radspakr Wolfbane

Category: Code
Level: Intermediate
Created: Sunday July 1, 2007 - 23:14
Updated: Sunday July 1, 2007 - 23:16
Views: 8207
Summary: How to add negative leadership that affects enemies

Rating

Staff says

3.0

Members say

3.3

Average

3.1/5.0

7 votes

Negative Leadership

In this tutorial i'll be teaching you to make a negative leadership that can affect enemies.
This can be used to weaken enemies by removing fear resistance,knockback resistance lowering attack and armor,stopping health recovery and even slowing the opponent.
The files you'll need are
Attributemodifier.ini
object.ini(the unit/hero your editing)
Commandbutton.ini,commandset.ini,experiencelevels.ini,specialpower and the other files needed to add abilities to the game.

Before you start make sure you know how to add abilities to units.

first up you'll need the leadsership code

              
Code
Behavior = AttributeModifierAuraUpdate ModuleTag_Leadership
StartsActive = Yes ;If no, requires upgrade to turn on.
BonusName = WitchKingPassiveLeadership
TriggeredBy = Upgrade_WitchKingLeadership
RefreshDelay = 2000
Range = 600
AllowPowerWhenAttacking = Yes
ObjectFilter = ANY +INFANTRY +CAVALRY +MONSTER -STRUCTURE -BASE_FOUNDATION -HERO
End

Behavior = UnpauseSpecialPowerUpgrade ModuleTag_TheodenLeadership
SpecialPowerTemplate = SpecialAbilityFakeLeadership
TriggeredBy = Upgrade_WitchKingLeadership
End


This is the code from the Witch King's leadership.
There is no need to make a new special power at the moment.
In the AttributeModifierAuraUpdate add the following code

              
Code
TargetEnemy = Yes


this will now target enemies instead of allies.
Now to make the new attribute modifier i'll change the Bonus name to KhamulNegativeLeadership
so your code will look like this

              
Code
Behavior = AttributeModifierAuraUpdate ModuleTag_Leadership
StartsActive = Yes ;If no, requires upgrade to turn on.
BonusName = KhamulNegativeLeadership
TriggeredBy = Upgrade_WitchKingLeadership
RefreshDelay = 2000
Range = 600
AllowPowerWhenAttacking = Yes
        TargetEnemy = Yes
ObjectFilter = ANY +INFANTRY +CAVALRY +MONSTER -STRUCTURE -BASE_FOUNDATION -HERO
End

Behavior = UnpauseSpecialPowerUpgrade ModuleTag_TheodenLeadership
SpecialPowerTemplate = SpecialAbilityFakeLeadership
TriggeredBy = Upgrade_WitchKingLeadership
End


now we go to AttributeModifier.ini and create a new attribute modifier.

              
Code

ModifierList KhamulNegativeLeadership
Category = LEADERSHIP
Modifier = ARMOR -50% ; Additive. Sum of these are subtracted from all entries in Armor.ini
    Modifier = RESIST_FEAR -100%
Duration = 2500 ; Matches RefreshRate of giving module
FX = FX_GenericLeadershipLvl1
FX2 = FX_GenericLeadershipLvl2
FX3 = FX_GenericLeadershipLvl3
MultiLevelFX = Yes
End


This will reduce the armor and remove fear resistance for the enemy.
Now add the ability to CommandButton.ini,CommandSet.ini and experiencelevels.ini I won't show you how to do that here.
This should now work in game.
A few notes there is alternative method instead of adding the TargetEnemy code you can change the ObjectFilter by adding ENEMIES to the ObjectFilter.
              
Code
ObjectFilter = NONE ENEMIES +INFANTRY +CAVALRY


For the Attribute Modifier try out the following.
RESIST_FEAR - this removes fear resistance I haven't tested the full use of this yet i'm not sure if it works with Level 2 units(this is additive for a negative effect it has to be a negative percentage for instance -50%)
ARMOR - units take more damage (this is additive for a negative effect it has to be a negative percentage for instance -50%)
DAMAGE_MULT - units can do less damage (This is Multiplicitive so for a negative effect it would be under 100% ie. 50% would halve the Attack)
SPEED - slows down units and can even stop them in their tracks (this is additive for a negative effect it has to be a negative percentage for instance -50%)
RANGE (this is additive for a negative effect it has to be a negative percentage for instance -50%)
VISION (this is additive for a negative effect it has to be a negative percentage for instance -50%)
RESIST_KNOCKBACK (this is additive for a negative effect it has to be a negative percentage for instance -50%)

On a final note try adding the following code to remove other leaderships

              
Code
AntiCategory                = LEADERSHIP


I hope this helps coders get some more tools to play with to make better and more deverse mods with greater strategic playing if you have any questions please ask on the forums.
I'm also working on another similar tutorial on how to make a negative version of Glorious Charge.

Comments

Display order: Newest first

st3f4n0s666 - Thursday August 26, 2010 - 7:51

what about the ability of karsh (the ghost hero of angmar)can you pls make an article for how to use his chili soul ability for our custom heros?:)

ILUTAVAR - Saturday February 2, 2008 - 15:22

is posible to to make the drad vissage act as leadership?

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

 
18:18:11