Ok, here's a tutorial, when I say, so we already know, this is common modder knowledge
-First decide what you want to edit, in this case we want to make the Summoned elven warriors have all the upgrades, be able to level up, and be able to stay forever. (I underlined Summoned because knowing this is very important.
-Next, we need to figure out what we need to edit, so we go into data/ini/object/system.ini, as we already know where the spell information is stored, so we search for Elf, nothing, and Elves, bingo, we see this code
Behavior = OCLSpecialPower ModuleTag_SummonElves SpecialPowerTemplate = SpellBookElvenAllies OCL = OCL_SpawnElvenWarriorsEgg TriggerFX = FX_ElvenAlliesSummon CreateLocation = CREATE_AT_LOCATION UpgradeName = Upgrade_ElvenAllies AvailableAtStart = No End
-Now, we already know that OCL stands for Object Creation List, the objects it creates, so we go into objectcreationlist.ini and search for OCL_SpawnElvenWarriorsEgg, as that is the name that we see in the code.
; --------------------------------------------------------------------------------------- ; Create A bunch of Elves out of thin air. ObjectCreationList OCL_SpawnElvenWarriorsEgg CreateObject ObjectNames = ElvenAlliesSummonEgg IgnoreCommandPointLimit = Yes Disposition = LIKE_EXISTING End End
-But it says that it summons an "Egg", so we look directly below that and we see...
; --------------------------------------------------------------------------------------- ; Create A bunch of Elves out of thin air. ObjectCreationList OCL_SpawnElvenWarriors CreateObject ObjectNames = RohanElvenWarriorHorde_Summoned Count = 3 FadeIn = Yes FadeTime = 8000 IgnoreCommandPointLimit = Yes Disposition = SPAWN_AROUND DispositionAngle = 120;SpawnAround uses this as the arc between guys DispositionIntensity = 200; and this for distance from center End End
-Ah, here we are, RohanElvenWarriorHorde_Summoned. And we also see the words Rohan and Horde, so as we know it must be in RohanHordes.ini. So we go there and we search for that and we find the ChildObject information
-As we know it tells us about the objects in the horde under "InitialPayload = " So we find that and we see "RohanElvenWarrior_Summoned"
-So we go to ElvenInfantry.ini as they are Elven Infantry, and we search for that and we find
ChildObject RohanElvenWarrior_Summoned RohanElvenWarrior IsTrainable = No CommandPoints = 0 EquivalentTo = RohanElvenWarrior Behavior = LifetimeUpdate ModuleTag_LifetimeUpdate ; This one does the work, but the one in the horde displays the timer MinLifetime = 180000 MaxLifetime = 180000 DeathType = FADED End End
-We can now remove the LifetimeUpdate Behavior, removing the possibility of going away after a period of time.
-Since we also want Only the Summoned to start off with upgrades, and not the ones we purchase from the archery range, we have to define new upgrades. So we add
Behavior = WeaponSetUpgrade ModuleTag_14 TriggeredBy = Upgrade_ElvenFireArrows End ; Fire arrow upgrade Behavior = WeaponSetUpgrade ModuleTag_WeaponSetUpgradeTag TriggeredBy = Upgrade_ElvenFireArrows CustomAnimAndDuration = AnimState:USER_4 AnimTime:0 TriggerTime:0;set flag forever End ; Switch arrows being displayed. Behavior = SubObjectsUpgrade ModuleTag_FireArrowSwapUpgrade TriggeredBy = Upgrade_ElvenFireArrows ShowSubObjects = FireArowTip End Behavior = WeaponSetUpgrade WeaponSetUpgradeModuleTag TriggeredBy = Upgrade_ElvenForgedBlades CustomAnimAndDuration = AnimState:USER_5 AnimTime:0 TriggerTime:0;set flag forever End Behavior = SubObjectsUpgrade Armor_Upgrade TriggeredBy = Upgrade_ElvenHeavyArmor UpgradeTexture = RUElvnWorrior.tga 0 RUElvnWorriorHA.tga UpgradeTexture = RUElvnWorrior_L.tga 0 RUElvnWorriorHA.tga RecolorHouse = Yes End Behavior = ArmorUpgrade ArmorUpgradeModuleTag TriggeredBy = Upgrade_ElvenHeavyArmor End Behavior = SubObjectsUpgrade ForgedBlades_Upgrade TriggeredBy = Upgrade_ElvenForgedBlades ShowSubObjects = Forged_Blade End
after the "EquivalentTo = RohanElvenWarrior", and before the last "End"
-This creates new TriggeredBy areas so that the BFME system doesn't get confused between that and the old TriggeredBy of the regular Elven Warriors
-Since we created new upgrades we need to define the upgrades in upgrade.ini
Upgrade Upgrade_ElvenFireArrows Type = OBJECT End Upgrade Upgrade_ElvenForgedBlades Type = OBJECT End Upgrade Upgrade_ElvenHeavyArmor Type = OBJECT End
-Now we save so that incase of an abnormal PC failure, or a power surge, we still have our progress.
-Now we open up experiencelevels.ini, for as we know this defines upgrades and leveling up. We search for RohanElvenWarrior_Summoned because we know they can go to level 1, but no further. We find it, but when we scroll down to GoodEliteLevel2, they aren't there so we add
RohanElvenWarrior_Summoned RohanElvenWarriorHorde_Summoned
to all the "Target = " lines after Level 1.
-Since we want them to have their upgrades automatically, and we already defined them seperately than the regular RohanElvenWarrior hordes we can add a line under GoodEliteLevel1 that reads
Upgrades = Upgrade_ElvenForgedBlades Upgrade_ElvenFireArrows Upgrade_ElvenHeavyArmor
-This tell BFME to give all the targets this upgrade at level one, but since only our units has that upgrade defined in them, only they can use it.
-AND WE'RE Done!! Now save it and play your new mod YOU made
And here's your finished result, or if you don't feel like doing the work, and just want the mod, instructions are inside the .zip file
ElvenWarrior Mod
Edited by TKelly, 10 October 2005 - 01:16 AM.