The 3rd Age

Men's Knives

Men's Knives

Good mod in BFME2?With more Factions? and its coming? It's MEN'S KNIVES!

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

Apollo's Ultimate Intermediate Tutorial

Avatar of Elric

Elric

Category: Code
Level: Intermediate
Created: Sunday January 23, 2011 - 19:36
Updated: Sunday June 16, 2013 - 19:51
Views: 9990
Summary: Almost all you need to know about intermediate coding...

Rating

Staff says

2.0

Members say

3.8

Average

3.6/5.0

7 votes

Page 1 2 3 4 5 6
Adding Spellbook Powers To Heroes

Note- Have your hero.ini ready!


Ok, To start off I want to congratulate you in getting to the half way mark on your Intermediate Coding Adventure! Now to do this you will your system.ini located Here: Mod-> Data-> ini-> Object-> System. Open it up. Now look for your powers behaviors such as Earthquake or flood even sunflare. For this tutorial ill use Sunflare. Ok, once i found sunflares behavior which looks like this:

              
Code

Behavior = OCLSpecialPower ModuleTag_Sunflare
        SpecialPowerTemplate             = SpellBookSunflare
        OCL             = OCL_SpecialPowerSunflare
        CreateLocation             = CREATE_AT_LOCATION
        AvailableAtStart                 = No
        AttributeModifierAffects        = ANY +INFANTRY +CAVALRY +MONSTER -HERO ENEMIES
        ReEnableAntiCategory            = Yes
        AttributeModifierWeatherBased    = Yes            
        WeatherDuration                    = SPELL_SUNFLARE_DURATION
        ChangeWeather                    = SUNNY
        RequirementsFilterMPSkirmish = SPELL_BOOK_REQUIREMENTS_FILTER
        RequirementsFilterStrategic = SPELL_BOOK_REQUIREMENTS_FILTER_STRATEGIC
    End


I copy and paste it in my heroes behaviors section.

Now replace SpellBookSunflare with SpecialAbilitySunflare.

Now you need to take out this piece of code ALWAYS.

Code:

              
Code


RequirementsFilterMPSkirmish = SPELL_BOOK_REQUIREMENTS_FILTER
        RequirementsFilterStrategic = SPELL_BOOK_REQUIREMENTS_FILTER_STRATEGIC


and if you want an upgrade take (AvailableAtStart = No) out and place this above the behavior:
              
Code

Behavior = UnpauseSpecialPowerUpgrade ModuleTag_SunflareEnabler
        SpecialPowerTemplate        = SpecialAbilitySunflare
        TriggeredBy                    = Upgrade_Sunflare
    End


After all the editing it should look like this:

              
Code

Behavior = UnpauseSpecialPowerUpgrade ModuleTag_SunflareEnabler
        SpecialPowerTemplate        = SpecialAbilitySunflare
        TriggeredBy                    = Upgrade_Sunflare
    End

Behavior = OCLSpecialPower ModuleTag_Sunflare
        SpecialPowerTemplate             = SpecialAbilitySunflare
        OCL             = OCL_SpecialPowerSunflare
        CreateLocation             = CREATE_AT_LOCATION
        AttributeModifierAffects        = ANY +INFANTRY +CAVALRY +MONSTER -HERO ENEMIES
        ReEnableAntiCategory            = Yes
        AttributeModifierWeatherBased    = Yes            
        WeatherDuration                    = SPELL_SUNFLARE_DURATION
        ChangeWeather                    = SUNNY
    End


Now you can save and go to upgrade.ini and make the new upgrade.
              
Code

Upgrade Upgrade_Sunflare
Type = Object
End


Then place the upgrade in the experience levels hero (Upgrades =) Spot.

After all of this go to Commandbutton.ini and place this new command button at the top or bottom:
              
Code

CommandButton Command_Sunflare
Command = SPECIAL_POWER
SpecialPower = SpecialAbilitySunflare
Options = NEED_TARGET_POS
TextLabel = CONTROLBAR:Sunflare
ButtonImage = SBGood_Sunflare
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:TooltipSunflare
RadiusCursorType = SunflareRadiusCursor
CursorName = AttackObj
InvalidCursorName = GenericInvalid
InPalantir = Yes
End


Add the command to your heroes commandset then go to specialpower.ini
and in there paste this piece of code and notice the differences between it and the regular sunflare.

Code:
              
Code


;------------------------------------------------------------------------------
SpecialPower SpecialAbilitySunflare
Enum = SPECIAL_SPELL_BOOK_SUNFLARE
RadiusCursorRadius = 300
ReloadTime = SPELL_RECHARGE_TIME_TIER_4 ; in milliseconds
InitiateAtLocationSound = SpellSunflareMS
ViewObjectDuration = 10000
ViewObjectRange = 200
End


Then go to game and test!!!!!

Links / Downloads

 HitsAdded
Clanks Ultimate Beginner Tutorial1669January 23, 2011 - 19:39

Comments

Display order: Newest first

wesleypicard - Monday July 23, 2018 - 2:15

rate it a 10 but i am confused on one thing on page 3 where you explain how to increase horde size. i understand part of it. do i have to change the initial payload as well or leave that alone? and what about the rohirram? do you do the same with them as with the elven warriors?

--------

elric thanks so much for this tutorial i am finally able to increase horde sizes thanks to this.

Radspakr Wolfbane (Team Chamber Member) - Sunday August 14, 2011 - 6:10

In the FX ParticleSystems Shader refers to the type of Shader used these can be Alpha which reads the Alpha channel,Additive which reads Black as transparency and of course you can choose not to have them.

Zues - Saturday August 6, 2011 - 15:07

Pretty Clear could use a little improvmennt

Elric - Saturday August 6, 2011 - 9:53

@newbkiller: what do you mean choice 2. i need a page number to help you?

newbkiller.williams - Saturday August 6, 2011 - 4:26

could you explain choice number 2 aswell please , because i dont know how to put a new models/textures into the game

Poseidon - Tuesday January 25, 2011 - 16:43

I really think that this article follows up clanks in quite a few ways. I can't wait until this whole article is finished! This will be very helpful to me in some map.ini coding and maybe modding once i think i am ready for it...

Elric - Tuesday January 25, 2011 - 16:23

Please Comment and Rate. I would release this whole tutorial in one go but i wanted to release half first and then half later. Just in case I never finished it so at least people will have 1 half of it...

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

 
4:32:51