The Elven Alliance: Community Edition This mod project attempts to complete and finish The Elven Alliance mod in its entirety. |
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 How To Make The AI Build Pre-Upgraded Units
First, you'll need to open your "upgrade.ini" file, and add a simple generic upgrade like this:
Now for this tutorial, I'll make the Gondor soldiers have their upgrades. I shouldn't need to edit the individual unit's file. And in other cases I wouldn't. But for some silly reason, EA decided to code the Forged Blades WeaponSetUpgrade differently for the Gondor soldiers, than any other unit in the game. First, open up the code for the "GondorFighter". This is the code for the individual soldier. Then search for this bit:
Now remove the "Upgrade_TechnologyGondorForgedBlades". Then remove the line that starts with "RequiresAllTriggers". It should look like this:
Now they're ready for the upgrade code. You won't have to do that part with any other unit, like I said they were coded uniquely different than any other unit. In this next part, you need to open the Gondor soldier's horde code. The object name is "GondorFighterHorde". Then for simplicity's sake, scroll down until you find code like this:
You don't need to change anything there, in fact you shouldn't. But directly below that, copy and paste in this code:
And with that, you're effectively done. With this specific code, the Gondor soldiers will come to life at Rank 5 with Forged Blades and Heavy Armor. Obviously if you wanted them to be rank 10 instead, then you would just change "LevelsToGain" to 9, and "LevelCap" to 10. Also, if you're editing some other unit, like "Yeoman Archers", I shouldn't have to tell you that you'll need to change the faction specific upgrades that are being granted in this code. You would want "Upgrade_RohanFireArrows", and "Upgrade_RohanHeavyArmor" for them, instead. I guess I should explain the purpose for the "Delay" lines. The first one is an 8 second delay. It's good to have that so that each soldier has a chance to get out of the Barracks before they rank up. Otherwise you would have a Banner Carrier appear outside the building before the first guy even gets out. It looks silly, and may cause bugs. Keep in mind, larger hordes may need a longer delay. Now the next two delays are purely for cosmetics. Without those two, the unit would get all of its upgrades at once. Instead, we get Heavy Armor 2 seconds after ranking up. Then we get our Forged Blades 2 seconds after that. It's just nicer to look at. On the next page I'll show how to make these soldiers come out of the Barracks fully upgraded for everyone, and not just the Hard AI. |
|||||||||||||||||||||||||||||||
"One site to rule them all, one site to find them, © All Rights Reserved Eric Edwards ©2013. |