Welcome Guest ( Log In / Register ) |
Quick Lists Top RatedTutorials Living World Map G… Ultimate beginner'… Arrow scaling bug… Raising Heroes max… Proper Fire Arrow… Creating an asset.… Simple Structure B… Making a simple Ma… Quick and easy sno… Making patrols nea… Mods The Dwarf Holds The Peloponnesian… RJ - RotWK The Elven Alliance… Helm's Deep Last H… The Elven Alliance Special Extended E… Kings of the West… RC Mod The Wars of Arda Downloads BFME1 1.06 Widescr… Enhanced W3D Impor… Fudge's Map Pack LotR/BfME HD Logos Osgiliath Shellmap Crystals Of Ancien… 2v1 Wold The forests of Dru… Converted BFME2 an… ROTWK animations f… |
|||||||||||||||||||||||||||||||||||
Register and log in to move these advertisements down extended map.ini coding
5==================================================================================================
You've came this far! :D On this page I will show you how I've created one of the powers of my hero Lightning in my map Keep Defence. I will pick the Heartseeker ability, wich is a very powerful melee strike, similar to backstab. You first need to code the ability in the unit; Add this INSIDE of your unit/hero: OBJECT CODE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;-------------------------------------------------------------
As you can see, the first module tells the game wich upgrade "unlocks" the ability. The special power, as you will see below, is bound to this module after and will be used for commandbuttons. This module is sometimes optional if you do not want your ability to have a requirment.(ex: certain level) The second module tells the game if the module is already active (StartsPaused = No) or not (StartsPaused = Yes). If it starts paused, you need the module above to trigger it's unlock. The third module is the ability itself, one of the most important lines along SpecialPowerTemplate are SpecialWeapon(this one tells the game wich weapon to fire when using ability) and WichSpecialPower(tells wich animation/model condition to use in w3d Draw module) On SpecialWeapon = Lightning'sSwordHit, replace "Lightning'sSwordHit" with your own weapon if you want. SPECIAL POWER;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; --------------------------------------------------------------- Now, lets define the special power: WARNING!!! THE SPECIAL POWER MUST BE DEFINED ABOVE THE OBJECT IN MAP.INI OR ELSE IT CAUSES BUGS OR CRASHES!!! Do NOT define it INSIDE the object, but above all other things related to that object (including commandbuttons!!!)
Basically, you can create your own specialpower by replacing "SpecialAbilitySwordStab" with your spell name, just make sure if you have multiple special powers on your object, they DO NOT USE THE SAME ENUM Also sometimes some enums will not work, so if you click on your power and nothing happens, this might be one cause. If happens, try changing the enum to something else (search on specialpower.ini) Now, let's find the commandbutton for this: COMMAND BUTTON;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ------------------------------------------------- The commandbutton MUST BE DEFINED ABOVE OBJECT AND COMMANDSET BUT BELOW SPECIALPOWER
Well, you might say, why do we use a farm commandbutton?? We should rather use a button with a sword pic! I have picked this commandbutton because it's not used in my map (no porters), and I have replaced the farm pic with a sword pick, check last page for more info. So, for now, ignore the MappedImage code. Command = SPECIAL_POWER ;--- this one defines wich kind of commandbutton is this one. If you change to SPELL_BOOK but its in an unit's commandset, it won't work SpecialPower = SpecialAbilitySwordStab ;--- this tells the game wich power activates this button Options = NEED_TARGET_ENEMY_OBJECT ;--- so it's not a click and voila power, you need a target. Find more options looking through commandbutton.ini Object = NONE ;----this one must not always be here, but since this commandbutton was constructing a building before, we need to tell the game its no building anymore, or else we see the power costing 300$ TextLabel = CONTROLBAR:SwordHit DescriptLabel = CONTROLBAR:ToolTipSwordHit ;--- these ones are related to map.str and set the text you see when you put mouse over commandbutton on palantir InvalidCursorName = GenericInvalid ;--- what cursor to use when you're not with mouse over an enemy unit CursorName = EvilAbilityObj ;--- what cursor to use when you're with mouse over an enemy unit;; the other cursor used for this is Bombard, wich is the blue one ButtonBorderType = ACTION ;--- make sure it's action on a special power InPalantir = Yes ; --- if this is set to No, then you won't see your power on palantir Radial = No ; if this is Yes, you will see your power on map too, not just on palantir, just like the Construct_GondorFighterHorde commandbutton, wich shows on map aswell from barracks. If "InPalantir" and "Radial" are both set to No, then your commandbutton won't appear anywhere DisableOnModelCondition = WEAPONSET_TOGGLE_1 HIDDEN HERO ;--- the following conditons restrict this button to be available - I don't want to use this power when another power is working to prevent double damage with this weapon COMMANDSET;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ----------------------------------------------- MUST BE DEFINED ABOVE OBJECT BUT BELOW COMMANDBUTTON AND SPECIAL POWERS!
Pretty simple to create, you can have more than 6 commandbuttons in a commandset but they won't show in palantir (check last page for more info). Number 4 is our commandbutton, the others are my other spells. WEAPON;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ----------------------------------------------- Remember this code: "SpecialWeapon = Lightning'sSwordHit" from 3rd module in the object above? It's time to define the weapon.
As you can see, it deals 6000 damage (wich is huge!), half MAGIC, half HERO, wich means it harms pretty much anything. It will also knock back enemies and kill siege machines/builders in one hit (because of the knockback effect) Not much to say about this, you need to check weapon.ini to learn how to make your own weapons. EXPERIENCE LEVEL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -----------------------------------------------
Since my unit was originally a gothmog (but he doesn't looks like one, I have edited his W3D module), we need to use the object's experience level. The only thing that you should add is "Upgrades = Upgrade_LurtzLeadership", others can cause nasty game.dat errors if changed. In this map I have also changed "LevelUpFx = FX:LightningLevelUpFX". I have defined this FX above the object so now when he levels up he gets a different FX, but I won't talk about fx'ses here. So basically when your hero reaches level 5 (in this case), it gets the "Upgrade_LurtzLeadership", wich triggers the unlock of the special power. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Now, I will transfer this ability to another hero, so you can quickly copy-paste it on your map.ini and experiment with it, aswell as to have an overview about it. We will transfer it to a blackrider (and will replace morgul blade): Also I have changed the names of weapon and specialpower ;-----------------------------------------------------------------
There is no experiencelevel here, since Upgrade_BlackRiderDreadVisage is already added in original BlackRider experience level 2. For now, create an empty map, add a nazgul on it and add this code above in the map.ini. Level up your nazgul to 2 and then try the new spell on units! :) |
|||||||||||||||||||||||||||||||||||
"One site to rule them all, one site to find them, © All Rights Reserved Eric Edwards ©2013. |