Welcome Guest ( Log In / Register ) |
Quick Lists Top RatedTutorials Living World Map G… Ultimate beginner'… Arrow scaling bug… Raising Heroes max… Creating an asset.… Proper Fire Arrow… 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 2.02e Fuel the FiresTutorial for BFME 2
First we have to prevent the Lumber Mill from running its science check. To do this, go to civilianbuildings.ini and search for "science". You'll end up at the LumberMill object's SupplyCenterDockUpdate. This behavior is what allows the Orc Laborers to deposit the trees they chop at the Lumber Mill. We only want to remove the two lines "BonusScience" and "BonusScienceMultiplier", while leaving "AllowPassthrough" and "NumberApproachPositions". ("ValueMultiplier" is already removed.)
That prevents the Lumber Mill from running its science check. Now that we've done that, we need to edit the Fuel the Fires power to grant the player upgrade that will trigger our fortress aura. In system.ini, comment the original Fuel the Fires code:
Then add in our new PlayerUpgradeSpecialPower. This power will grant the PLAYER-type upgrade Upgrade_GrantFueltheFires to the player who uses the SpecialPower:
Where an OBJECT-type upgrade is given to a specific object, a PLAYER-type upgrade is given to a player. This means it's specific to no object (if we gave an OBJECT upgrade to the Fortress, it would die with the Fortress), and unless we decide to remove it from the player somehow, it will stay throughout the entire game. Now, we have to actually create Upgrade_GrantFueltheFires in upgrade.ini. Note that you don't need the RequiredObjectFilter line. That line would turn off the upgrade whenever the Fortress isn't present, but it's not necessary because the Fortress has to be present to put off the aura we are going to give it.
Now that the upgrade that triggers the aura is defined, we can add our AttributeModifierAuraUpdate behavior to IsengardFortressCitadel in isengardfortress.ini:
This aura grants the attributemodifier SpellBookFueltheFires (which will be a production bonus) to all SUPPLY_GATHERING_CENTERs on the map. If the Fortress is destroyed, it can't give off the aura, and the Lumber Mills lose their production bonus. If a player then rebuilds the Fortress, it will notice that he still has Upgrade_GrantFueltheFires and begin passing out the SpellBookFueltheFires bonus to all Lumber Mills again. The downside - or upside, depending on what you want to do with your mod - of this implementation is that the SpellBookFueltheFires bonus will, in theory, affect all your allies' Lumber Mills in a team game. The last thing we have to do is make the attributemodifier itself, in attributemodifier.ini:
Note that the Duration of the attributemodifier is longer than the RefreshDelay on the AttributeModifierAuraUpdate. For whatever reason, the attributemodifier will only be in effect some, but not all, of the time if the RefreshDelay matches the Duration. Making the Duration longer than the RefreshDelay causes no problems, as two attributemodifiers with the same name can never stack. Also, note the value of the production bonus: I lowered it to 175% for this early build of 2.02e, but if you want to keep it at the original value you'll want to use 200%. The LumberMill uses the ModelCondition UPGRADE_ECONOMY_BONUS to know when to display the orange cloud of FueltheFiresEmbers, so be sure not to forget that. That's all there is to making Fuel the Fires respect the destruction of a Fortress! Important Update: This won't work on certain Fortress/WotR maps unless the AttributeModifierAuraUpdate is added into the Fortress objects used on those maps. Chenoweth has left a list of objects to add the aura to from his code for passive Dwarven Riches, which works similarly to this in that it also uses a Fortress aura:
Update: The aura should also be added to WOR_IsengardCastleBaseKeep. CommentsDisplay order: Newest first Sulherokhh (Team Chamber Member) - Thursday May 21, 2009 - 8:19 Great, but like in your other tutorial, replace the TAB characters with a single SPACE character to increase the visual accessibility of the tutorial. Same goes for use of the ';'. Make it's use uniformly the same for every instance. Prolong - Sunday May 10, 2009 - 19:29 I was about five minutes away from finishing this guide, then accidentally navigated away from the page. On some other forums clicking the "back" button is enough to restore what you were writing; here it just brought me to a very unhappy looking "Empty Page", and I lost the entire second page of the guide. Guess I'll have to finish this later. |
|||||||||||||||||||||||||||||||||||
"One site to rule them all, one site to find them, © All Rights Reserved Eric Edwards ©2013. |