|
|
|
|
|
Posts: 8,943
Join Date: Aug 2004
|
In this tutorial we will be giving Saruman his own Word of Power spell.
Important programs: - BFME2 SDK http://games.ea.com/official/lordoft...c=bfme2_modsdk - FinalBIG http://www.wagnerma.de/ - Either Photoshop, Gimp or Paint.NET http://www.photoshop.com/ http://www.gimp.org/ http://www.getpaint.net/ Also, make sure you have the latest patch! Getting Started Create a mod folder - e.g. C:\mybfme2mod Create a folder inside that one called art Create a folder inside that one called compiledtextures Create a folder inside that one called he Create another folder inside C:\mybfme2mod called data Copy lotr.str into the folder Create a folder inside data called ini Copy the following ini files into the mod's ini folder: - commandbutton.ini - commandset.ini - experiencelevels.ini - fxlist.ini - fxparticlesystem.ini - specialpower.ini - upgrade.ini - weapon.ini Create a new folder inside ini called object Create a folder inside that one called evilfaction Create a folder inside that one called units Create a folder inside that one called isengard Copy saruman.ini into this folder Create a bfme2 shortcut with your mod extension: "C:\Program Files\Electronic Arts\The Battle for Middle-earth (tm) II\lotrbfme2.exe" -mod "C:\mybfme2mod" Change C:\mybfme2mod to wherever you put your mod folder. Coding the spell First, let's start off with commandbutton.ini to make the button settings for the spell. Put this in wherever you want (I prefer putting new code in at the very end myself): Code:
CommandButton Command_SpecialAbilitySarumanWordOfPower Command = SPECIAL_POWER SpecialPower = SpecialAbilitySarumanWordOfPower TextLabel = CONTROLBAR:SarumanWordofPower ButtonImage = HSSarumanDominate ButtonBorderType = ACTION DescriptLabel = CONTROLBAR:ToolTipSarumanWordofPower AutoAbility = Yes PresetRange = 120.0 InPalantir = Yes End Next, let's look at commandset.ini to change Saruman's palantir interface command set. Look for this: Code:
CommandSet SarumanCommandSet
1 = Command_ToggleStance
2 = Command_SpecialAbilityIsengardWizardBlast
3 = Command_SarumanFireball
4 = Command_SpecialAbilitySpeechCraft ; ;
5 = Command_SpecialAbilityDominateEnemy ; ;
6 = Command_SarumanThunderBolt
12 = Command_CaptureBuilding
13 = Command_AttackMove
14 = Command_Stop
End
Code:
CommandSet SarumanCommandSet
1 = Command_ToggleStance
2 = Command_SpecialAbilityIsengardWizardBlast
3 = Command_SarumanFireball
4 = Command_SpecialAbilitySpeechCraft ; ;
5 = Command_SarumanThunderBolt
6 = Command_SpecialAbilitySarumanWordOfPower
12 = Command_CaptureBuilding
13 = Command_AttackMove
14 = Command_Stop
End
For reference purposes, this is the slot order for the palantir commandset: ![]() All units use Command_ToggleStance for slot 1. Next, let's go into experiencelevels.ini to set what level Saruman learns this spell. Look for this: Code:
ExperienceLevel SarumanLevel1
TargetNames = IsengardSaruman
RequiredExperience = 1
ExperienceAward = SARUMAN_LVL1_EXP_AWARD
Rank = 1
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
End
So, we need to add this: Code:
Upgrades = Upgrade_SarumanWordOfPower Code:
ExperienceLevel SarumanLevel1
TargetNames = IsengardSaruman
RequiredExperience = 1
ExperienceAward = SARUMAN_LVL1_EXP_AWARD
Upgrades = Upgrade_SarumanWordOfPower
Rank = 1
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
End
Code:
ExperienceLevel SarumanLevel10
TargetNames = IsengardSaruman
RequiredExperience = SARUMAN_LVL10_EXP_NEEDED
ExperienceAward = SARUMAN_LVL10_EXP_AWARD
AttributeModifiers = HeroLevelUpDamage9
Rank = 10
LevelUpFx = FX:GandalfLevelUp1FX
Upgrades = Upgrade_SarumanThunderBolt Upgrade_SarumanWordOfPower
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
END
Now let's look at fxlist.ini to tell the game what FX are used for the spell. Add the following code wherever you want: Code:
FXList FX_SarumanPreAttackBlast
ParticleSystem
Name = SarumanBlastInitialWave
Offset = X:0.0 Y:0.0 Z:20.0
End
ParticleSystem
Name = SarumanBlastInitialCenter
Offset = X:0.0 Y:0.0 Z:20.0
End
ParticleSystem
Name = SarumanBlastInitialVortex
Offset = X:0.0 Y:0.0 Z:20.0
End
ParticleSystem
Name = GandalfBlastRipple
Offset = X:0.0 Y:0.0 Z:0.0
End
End
FXList FX_SarumanBlast
ParticleSystem
Name = SarumanBlastFinalLight
Offset = X:0.0 Y:0.0 Z:60 ;Z:8.0
End
ParticleSystem
Name = SarumanBlastFinalShockWave
Offset = X:0.0 Y:0.0 Z:20.0
End
ParticleSystem
Name = GandalfBlastDust
Offset = X:0.0 Y:0.0 Z:15.0
End
Sound
Name = GandalfBlastWeapon
End
End
GandalfBlastRipple is just a white ripple effect, so we don't need to change the colour of that. GandalfBlastDust is the dust cloud that forms. There's no need to change any of the dust effects. GandalfBlastWeapon is the blast sound made when casting the spell. Now let's move on to fxparticlesystem.ini to code in these FX. Add the following wherever you want: Code:
FXParticleSystem SarumanBlastInitialWave
System
Priority = ALWAYS_RENDER
ParticleName = EXRing01.tga
Lifetime = 25 25
SystemLifetime = 45
SortLevel = 1
Size = 400 400
StartSizeRate = 1 1
BurstDelay = 2 2
BurstCount = 1 1
IsGroundAligned = Yes
End
Color = DefaultColor
Color2 = R:107 G:58 B:39 10
Color3 = R:0 G:0 B:0 22
ColorScale = -20 20
End
Update = DefaultUpdate
SizeRate = -10 -10
SizeRateDamping = 1.05 1.05
AngleZ = -180 180
AngularDamping = 1 1
AngularDampingXY = 1 1
End
Physics = DefaultPhysics
VelocityDamping = 0.75 0.8
End
EmissionVelocity = OutwardEmissionVelocity
Speed = -4 -4
OtherSpeed = -4 -4
End
EmissionVolume = LineEmissionVolume
IsHollow = Yes
StartPoint = X:0 Y:0 Z:-8
EndPoint = X:0 Y:0 Z:10
End
Draw = DefaultDraw
End
End
FXParticleSystem SarumanBlastInitialCenter
System
Priority = ALWAYS_RENDER
ParticleName = EXLnzFlar1.tga
Lifetime = 40 40
SystemLifetime = 20
SortLevel = 1
Size = 5 5
BurstDelay = 5 5
BurstCount = 1 1
InitialDelay = 20 20
End
Color = DefaultColor
Color2 = R:255 G:172 B:136 20
Color3 = R:0 G:0 B:0 40
End
Update = DefaultUpdate
SizeRate = 2 2
SizeRateDamping = 1.03 1.03
AngularDamping = 1 1
AngularDampingXY = 1 1
End
Physics = DefaultPhysics
VelocityDamping = 0.75 0.8
End
EmissionVelocity = OutwardEmissionVelocity
End
EmissionVolume = LineEmissionVolume
StartPoint = X:0 Y:0 Z:8
EndPoint = X:0 Y:0 Z:8
End
Draw = DefaultDraw
End
End
FXParticleSystem SarumanBlastInitialVortex
System
Priority = HIGH_OR_ABOVE
ParticleName = EXLnzFlar2.tga
Lifetime = 40 40
SystemLifetime = 20
SortLevel = 1
Size = 5 5
BurstDelay = 1 1
BurstCount = 20 20
IsParticleUpTowardsEmitter = Yes
End
Color = DefaultColor
Color2 = R:255 G:172 B:136 5
End
Update = DefaultUpdate
SizeRateDamping = 1 1
AngularDamping = 1 1
AngularDampingXY = 1 1
End
Physics = DefaultPhysics
VelocityDamping = 1.1 1.1
End
EmissionVelocity = OutwardEmissionVelocity
Speed = -0.4 -0.4
End
EmissionVolume = CylinderEmissionVolume
IsHollow = Yes
Radius = 240
Length = 16
End
Draw = DefaultDraw
End
End
FXParticleSystem SarumanBlastFinalLight
System
Priority = ALWAYS_RENDER
ParticleName = EXexplo01.tga
Lifetime = 10 10
SystemLifetime = 5
SortLevel = 1
Size = 10 10
BurstCount = 2 2
End
Color = DefaultColor
Color1 = R:255 G:168 B:89 0
Color2 = R:0 G:0 B:0 10
End
Update = DefaultUpdate
SizeRate = 80 160
SizeRateDamping = 0.8 0.7
AngleZ = -1 1
AngularDamping = 1 1
AngularDampingXY = 1 1
End
Physics = DefaultPhysics
Gravity = 1
VelocityDamping = 1 1
End
EmissionVelocity = OutwardEmissionVelocity
Speed = 1 1
End
EmissionVolume = PointEmissionVolume
End
Draw = DefaultDraw
End
End
FXParticleSystem SarumanBlastFinalShockWave
System
Priority = ALWAYS_RENDER
ParticleName = EXRing01.tga
Lifetime = 40 40
SystemLifetime = 5
SortLevel = 1
Size = 1 1
BurstCount = 1 1
IsGroundAligned = Yes
End
Color = DefaultColor
Color1 = R:255 G:172 B:136 0
Color2 = R:0 G:0 B:0 40
ColorScale = -40 40
End
Update = DefaultUpdate
SizeRate = 35 35
SizeRateDamping = 1 1
AngleZ = -1 1
AngularDamping = 1 1
AngularDampingXY = 1 1
End
Physics = DefaultPhysics
VelocityDamping = 0.8 0.8
End
EmissionVelocity = OutwardEmissionVelocity
End
EmissionVolume = PointEmissionVolume
IsHollow = Yes
End
Draw = DefaultDraw
End
End
If you want to use a different colour, just change: "Color1 =" to whatever settings you want. Now, let's go into specialpower.ini to set the spell. Add this somewhere: Code:
SpecialPower SpecialAbilitySarumanWordOfPower
Enum = SPECIAL_WORD_OF_POWER
ReloadTime = 300000
End
Enums are hardcoded, so don't change this. Now we need to make the spell an upgrade in upgrade.ini. Add this somewhere: Code:
Upgrade Upgrade_SarumanWordOfPower Type = OBJECT End Code:
Weapon SarumanWordOfPower
IdleAfterFiringDelay = 0
AttackRange = 120
MinimumAttackRange = 0.8
WeaponSpeed = 401 ; dist/sec
MinWeaponSpeed = 241
MaxWeaponSpeed = 601 ; dist/sec Upper limit on scaling, when attacking past nominal "max" range
ScaleWeaponSpeed = Yes ; Used for lob weapons, scales speed proportional to range
RadiusDamageAffects = ENEMIES NOT_SIMILAR
DelayBetweenShots = 5000 ; time between shots, msec
PreAttackDelay = 2600
PreAttackType = PER_ATTACK ; Do the delay each time we attack a new target
PreAttackFX = FX_SarumanPreAttackBlast
FireFX = FX_SarumanBlast
FiringDuration = 1400
DamageNugget ; A basic Nugget that just does damage
Damage = 600
Radius = 300.0
DamageType = MAGIC
DamageFXType = MAGIC
DeathType = EXPLODED
DamageSpeed = 700.0 ; must match the ShockWaveSpeed below
End
MetaImpactNugget ; A Nugget that throws things back with force
; HeroResist = .75
ShockWaveAmount = 80.0
ShockWaveRadius = 550.0
ShockWaveTaperOff = 1.0
ShockWaveZMult = 1.000
ShockWaveSpeed = 700.0
End
End
Damage = 600 is how much damage the blast does Radius = 300.0 is the damage radius ShockWaveAmount = 80.0 is the shockwave force ShockWaveRadius = 550.0 radius of the shockwave Feel free to change those to whatever you want (I made them slightly higher than Gandalf's) PreAttackFX and FireFX refer to the FX we made earlier - As the names suggest, PreAttackFX is for the preattack and FireFX is for the actual blast. You can change the speed at which the shockwave moves if you want with ShockWaveSpeed (just remember you need to make sure DamageSpeed and ShockWaveSpeed are the same!). It would be a good idea to experiement with some of these settings to see for yourself what they do in the game. Finally, in saruman.ini, add these 2 codes. The first code (animation) needs to go near the top with the other animations. The second code (word of power) needs to go near the end with the other power codes. Code:
;;; word of power animation
AnimationState = SPECIAL_WEAPON_FOUR
StateName = Attacking
Animation
AnimationName = IUSaruman_ATKB
AnimationMode = ONCE
End
FXEvent = Frame:5 Name:FX_SarumanPreAttackBlast
End
;------- WORD OF POWER --------
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_WordEnabler
SpecialPowerTemplate = SpecialAbilitySarumanWordOfPower
TriggeredBy = Upgrade_SarumanWordOfPower
End
Behavior = SpecialPowerModule ModuleTag_WordStarter
SpecialPowerTemplate = SpecialAbilitySarumanWordOfPower
UpdateModuleStartsAttack = Yes
StartsPaused = Yes
End
Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_WordWeaponFireUpdate
SpecialPowerTemplate = SpecialAbilitySarumanWordOfPower
WhichSpecialWeapon = 4
SkipContinue = Yes
UnpackTime = 1700
PackTime = 1
FreezeAfterTriggerDuration = 2500 ; Hold AI for this long after we fire.
AwardXPForTriggering = 0
StartAbilityRange = 80.0
SpecialWeapon = SarumanWordOfPower
End
It's important to note that WhichSpecialWeapon needs to refer to the word of power animation - Notice that the animation says AnimationState = SPECIAL_WEAPON_FOUR so WhichSpecialWeapon must be "4". If it said AnimationState = SPECIAL_WEAPON_THREE then WhichSpecialWeapon should be set to "3", and so on. Now we need to add text for the spell. Open up lotr.str and add: Code:
CONTROLBAR:SarumanWordofPower "Saruman's Wo&rd of Power" END Code:
CONTROLBAR:ToolTipSarumanWordofPower "Unleashes Saruman's ultimate power!" END That's it for the coding! (This last section is optional) Making a new button Now let's look at making a new button for it to replace the dominate spell. Please refer to this tutorial for information on how to work on DDS files: http://middleearthcenter.com/forums/...ad.php?t=21872 Please refer to this tutorial for information on how to make a new button and put it into the game: http://middleearthcenter.com/forums/...ad.php?t=18516 Saruman's interface is heroui_047. Replace the dominate spell button with whatever you want. This is what I ended up with: ![]() Follow the 2nd tutorial link for help on building the asset.dat file, if you don't know how to. That's all done! Let's check it out in game. ![]() Questions/problems? Feel free to ask. Last edited by TokyoBlade: May 10th, 2012 at 06:12 AM. |
|
|
|
|
|
|
|
|
|
|
Posts: 21
Join Date: Apr 2012
|
Can you help please? When I copy and paste the code to saruman.ini,it crashes.Can you explain me a little more?
Thanks for help! Edit:I gaves Unknown block 'AnimationState' Error parsing INI block 'AnimationState' in file 'data\ini\object\evilfaction\units\isengard\saruma n.ini'. ----- Automerged post ----- And,how could find this "lotr.str" file too? Last edited by Annihilus: Apr 27th, 2012 at 01:55 AM. Reason: Automerged Doublepost |
|
|
|
|
|
|
|
|
|
|
Posts: 8,943
Join Date: Aug 2004
|
Can you help please? When I copy and paste the code to saruman.ini,it crashes.Can you explain me a little more?
Thanks for help! Edit:I gaves Unknown block 'AnimationState' Error parsing INI block 'AnimationState' in file 'data\ini\object\evilfaction\units\isengard\saruma n.ini'. ----- Automerged post ----- And,how could find this "lotr.str" file too? Looks like you put the code in the wrong place, though that isn't your fault (it's mine). For some reason I said "Finally, in saruman.ini, add these 2 codes somewhere:" when, in fact, you have to put them in a specific place. The first code Code:
;;; word of power animation
AnimationState = SPECIAL_WEAPON_FOUR
StateName = Attacking
Animation
AnimationName = IUSaruman_ATKB
AnimationMode = ONCE
End
FXEvent = Frame:5 Name:FX_SarumanPreAttackBlast
End
Code:
;;; LIGHTING BOLT SPECIAL POWER ;;;
AnimationState = SPECIAL_WEAPON_THREE
Animation = Throwing Fireball
AnimationName = IUSaruman_SPCA
AnimationMode = ONCE
UseWeaponTiming = Yes
End
FrameForPristineBonePositions = 48
End
Code:
;//---------------------------------LIGHTNING BLAST-----------------------------------------
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_IstariLightEnabler
SpecialPowerTemplate = SpecialAbilityLightingBolt
TriggeredBy = Upgrade_SarumanThunderBolt
End
Behavior = SpecialPowerModule ModuleTag_IstariLightPower
SpecialPowerTemplate = SpecialAbilityLightingBolt
UpdateModuleStartsAttack = Yes
StartsPaused = Yes
InitiateSound = SarumanVoiceAttackCharge
End
Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_IstariLightUpdate
SpecialPowerTemplate = SpecialAbilityLightingBolt
SkipContinue = Yes
UnpackTime = 1500
PreparationTime = 1
PersistentPrepTime = 1000
PackTime = 500
AwardXPForTriggering = 0
StartAbilityRange = 290; Note: This has to be smaller than the weapon range or it'll never succeed
ApproachRequiresLOS = Yes
SpecialWeapon = SarumanLightningBlastWeapon
MustFinishAbility = Yes
WhichSpecialWeapon = 3
BusyForDuration = 2500
End
Behavior = AutoAbilityBehavior ModuleTag_LighntingAutoAbility
SpecialAbility = SpecialAbilityLightingBolt
MaxScanRange = #SUBTRACT( SARUMAN_LIGHTNING_RANGE 25 )
Query = 1 ALL ENEMIES -STRUCTURE
End
; ;
Behavior = AttributeModifierAuraUpdate ModuleTag_SarumanLeadershipUpdate
StartsActive = Yes
BonusName = GenericHeroLeadership
RefreshDelay = 2000
Range = 200
ObjectFilter = GENERIC_BUFF_RECIPIENT_OBJECT_FILTER
End
I hope that works! |
|
|
|
|
|
|
|
|
|
|
Posts: 21
Join Date: Apr 2012
|
Sorry for the late reply.Thanks for returning back! I'll give a try to your solution. Thanks =)
|
|
|
|
|
|
|
|
|
|
|
Posts: 21
Join Date: Apr 2012
|
I tried but i failed again to make it work.Would you upload your saruman.ini please?
|
|
|
|
|
|
|
|
|
|
|
Posts: 8,943
Join Date: Aug 2004
|
||
|
|
|
|
|
|
|
|
|
Posts: 21
Join Date: Apr 2012
|
Thanks for the help but the link seems dead.Could you re-upload it? I just want this wop very much =)
|
|
|
|
|
|
|
|
|
|
|
Posts: 8,943
Join Date: Aug 2004
|
lol, there must be a time limit on file hosting for that site. I'll use hotfile instead.
https://hotfile.com/dl/163245179/ca5...ruman.ini.html |
|
|
|
|
|
|
|
|
|
|
Posts: 21
Join Date: Apr 2012
|
OMG! It worked! Thank you! Thank you for a quadrillion times!
|
|
|
|
|
|
|
|
|
|
|
Posts: 8,943
Join Date: Aug 2004
|
Glad to hear it's finally working for you
|
|
|
|
|
|
|
|
|
|
|
Posts: 21
Join Date: Apr 2012
|
It wouldn't work without your help mister,thanks again =)
|
|
|
|
|
|
|
|
|
|
|
Posts: 21
Join Date: Apr 2012
|
Could I do the same for Sauron?
|
|
|
|
|
|
|
|
|
|
|
Posts: 8,943
Join Date: Aug 2004
|
Yeah, you can.
|
|
|
|
|
|
|
|
|
|
|
Posts: 21
Join Date: Apr 2012
|
I have to do the same things or with some little differences?
----- Automerged post ----- This ability was made for Saruman and if I just copy the same codes it might not work I think :S (Just opinion,you are the boss) Last edited by Annihilus: Jul 30th, 2012 at 03:41 PM. Reason: Automerged Doublepost |
|
|
|
|
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What are you listnening to right now | ElvenBlood | The Prancing Pony | 7203 | Dec 2nd, 2012 09:32 PM |
| Sauron Theory | Morgoth Bauglir | Bag End | 58 | Jan 5th, 2006 03:44 PM |
| Featured Article: Isengard Faction | Saurus | Battle for Middle-earth Series | 26 | Mar 9th, 2005 12:47 PM |
| Featured Article: Rohan Guide | Saurus | Strategies & Tactics | 23 | Feb 11th, 2005 10:39 AM |