The 3rd Age

Power Of The Ring 3 : Campaigns Of Middle Earth

Power Of The Ring 3 :  Campaigns Of Middle Earth

Contains BFME1 Campaigns : Based on Power Of The Ring

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

Adding Summon Allies

Avatar of Hostile

Hostile

Category: Code
Level: Beginner
Created: Monday March 26, 2007 - 4:59
Updated: Saturday June 27, 2009 - 18:54
Views: 10436
Summary: Creating a new summon allies spell

Rating

Staff says

3.5

Members say

3.6

Average

3.5/5.0

13 votes

Page 1 2 3 4 5 6
Next, we want to create the command buttons to purchase this spell and use it. Open up \data\ini\commandbutton.ini. This file contains all the buttons to activate everything in the game.

Add these two new buttons at the end:

              
Code
CommandButton Command_PurchaseSpellSauronAlly
Command = PURCHASE_SCIENCE
ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is
ButtonImage = HPSauron ; DJR 6/29/4 using same image as spellbook for now
Science = SCIENCE_SauronAlly
TextLabel = CONTROLBAR:SummonBalrog
DescriptLabel = CONTROLBAR:TooltipSummonBalrog
End


              
Code
CommandButton Command_SpellBookSauronAlly
Command = SPELL_BOOK
SpecialPower = SpellBookSauronAlly
Options = NEED_TARGET_POS ; Huh, you can't have this flag and a radius cursor: CONTEXTMODE_COMMAND
TextLabel = CONTROLBAR:SummonBalrog
ButtonImage = HPSauron
ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:TooltipSummonBalrog
RadiusCursorType = SUMMON_BALROG
CursorName = AttackObj
InvalidCursorName = GenericInvalid
End


The first button tells the computer this button will purchase something. It tells it to also use the mapped image HPSauron as the button image. This image in particular is already in the game so we can use it. The third line of the button tells the computer what science to purchase. A SCIENCE is just another way of describing something you will gain by using your earned command points. Namely like the spells on your tech tree.

TextLabel and DescriptLabel are the entries in the CSF/STR file that will describe what you see, text wise, ingame when you click a button or hover over something. I have not added custom CSF entries for this tutorial so it will appear like the Balrog for now. You can change this on your own.

The second button will activate the spell ingame. The command = SPELL_BOOK tells the computer this is a spell from within the factions spellbook. RadiusCursorType = SUMMON_BALROG tells the computer that when you place the summoned units, they will use the Balrog radius cursor. Use any you like or make up your own. Just reference it here.

Next we'll add these buttons to our commandsets to allow us to use the spells ingame. Edit the existing code to these commandsets located in \data\inicommandset.ini You can use control"F" to find by searching for "IsengardSpellBookCommandSet"

              
Code
CommandSet IsengardSpellBookCommandSet
1 = Command_SpellBookWarChant
2 = Command_SpellBookPalantirVision
3 = Command_SpellBookIndustry
4 = Command_SpellBookTaint_Isengard
5 = Command_SpellBookDevastation
6 = Command_SpellBookSauronAlly
7 = Command_SpellBookFueltheFires
8 = Command_SpellBookBalrogAlly
End


              
Code
CommandSet IsengardSpellStoreCommandSet
1 = Command_PurchaseSpellWarChant
2 = Command_PurchaseSpellPalantirVision
3 = Command_PurchaseSpellIndustry
4 = Command_PurchaseSpellTaintIsengard
5 = Command_PurchaseSpellDevastation
6 = Command_PurchaseSpellSauronAlly
7 = Command_PurchaseSpellFueltheFires
8 = Command_PurchaseSpellBalrogAlly
End


The first commandset is to use the spell. The second commandset is to purchase your spell (tech tree) I've replaced Freezing Rain spell with our new summon allies spell.

Links / Downloads

 HitsAdded
New Objects2268March 26, 2007 - 5:02

Comments

Display order: Newest first

Dwarven_Axe - Monday June 21, 2010 - 19:48

Great tutorial - thanks Hostile! I followed it to make a tier 2 Summon Eagles power to replace the Summon Tom Bombadil power since I coded him in as a buildable hero.

{AE}Manveru - Thursday September 3, 2009 - 6:20

I gave this a 3 because you forgot to update the dependencies for powers for which the new one is a prerequisite, thus making any powers below it not puirchasable. Contact me if you update it and I will rerate the tutorial.

Meneldil - Tuesday December 23, 2008 - 8:58

Thank for this nice tutorial. I learned a lot from it. One question regarding the instructions. It's not fully clear to me where to place the 5 object files. The directions say to place them in the "data/ini/object folder." I figured you meant the "data/ini/object/system/system.ini" location. Is that correct? (That's what I did, but it may not be ideal). Also, I was not able to obtain the Balrog skill from the skill tree even though I had the needed 20 points (this when going down the "left" branch via the new Sauron Summon skill). I had to go down another branch using original skills in order to obtain the Summon Balrog skill. Did I do something wrong or is this a limitation?

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

 
21:15:35