The 3rd Age

Westernesse

Westernesse

Numenor awaits, with new armies, units, factions and heroes; witness the darkest Age of Middle-earth

Button for The 3rd AgeButton for The Dwarf HoldsButton for The Elven AllianceButton for Helm's Deep Last HopeButton for GothmogtheOrcButton for BFME+Button for The Four AgesButton for HDR HeadquartersButton for Middle Earth CenterButton for Project Perfect Mod

Become an affiliate!

   

Quick Lists

Top Rated Popular New Updated Last Comments Users

Register and log in to move these advertisements down

Basic FX editing

Tutorial for Battle for Middle-earth BFME, Battle for Middle-earth II BFME 2

Avatar of GothmogtheOrc

GothmogtheOrc

Category: Code
Level: Intermediate
Created: Friday March 30, 2007 - 13:16
Updated: Saturday June 27, 2009 - 18:39
Views: 9805
Summary: What do many of the FX codes do?

Rating

Staff says

3.6

Members say

3.5

Average

3.6/5.0

9 votes

**NOTE: Since the writing of this tutorial a tool has been released that you can use to make FX's... it is downloadable in the "Downloads" section of this site. It was made by Gil-Galad and is called: FX Particle System Editor.

This tutorial will still be usefull to you if you want to understand the basics of FX coding.

-----

In FXparticleSystem.ini you will find this for each fx:

              
Code
FXParticleSystem Anduril
System
Priority = AREA_EFFECT
ParticleName = EXSplatHaze.tga
Lifetime = 20 20
SortLevel = 1
Size = 0 15
BurstCount = 2 3
InitialDelay = 15 15
IsParticleUpTowardsEmitter = Yes
End
Color = DefaultColor
Color2 = R:0 G:106 B:185 5
Color3 = R:0 G:0 B:0 20
End
Update = DefaultUpdate
SizeRate = -0.25 -0.25
SizeRateDamping = 1 1
AngleZ = -7 7
AngularDamping = 1 1
End
Physics = DefaultPhysics
VelocityDamping = 1 1
End
EmissionVelocity = OrthoEmissionVelocity
End
EmissionVolume = LineEmissionVolume
EndPoint = X:0 Y:0 Z:15
End
Draw = DefaultDraw
End
End



To change the color you will need to edit this part:

              
Code
Color = DefaultColor
Color2 = R:0 G:106 B:185 5
Color3 = R:0 G:0 B:0 20
End


The game reads this as a simple RGB color. Just change the RGB to whatever your new color is... if your not sure what the RGB is for your specific color, then open up Paint or any other image editing program. It should have a custom color selector, which will let you change the color and it should tell you what the RGB is for that color. (the default windows paint does this, which is what I use)

So if I want to take that existing Blue Anduril effect and make it Orange, I would change it to look like this:

              
Code
Color = DefaultColor
Color2 = R:255 G:75 B:0 5 ;;;R:0 G:106 B:185 5
Color3 = R:0 G:0 B:0 20
End


Notice that I kept the original colors, but I commented it out by putting ";;;" infront of it, thus telling the game not to read the following text.



Copying and Creating a new FX:

Now lets say that I wanted to keep the blue Anduril for Aragorn but make an Orange Anduril for the WitchKing.

To do this I will have to copy every refrence to Anduril and create a new FX called WKAnduril. I will have to create new refrences in the *Blank Unit's ini* (in this case the WitchKing), possibly AtributeModifier.ini and ParticleSystem.ini, definately FXList.ini and FXparticlesystem.ini.

Now that I have my new copy of Anduril, I need to change the color and any other powers.

Once thats done I have to tell the game WHEN to play this FX...

-so if I'm trying to get it to play when I activate a special power (by clicking on a button) then I would go to *yourunit.ini* and add this line to the Special power that I want it to go along with: "TriggerFX =FX_WKAnduril". Then the special power should look something like this:

              
Code
;;; WORD OF POWER (BLUE RING BLAST) SPELL ;;;
;;;WitchKing THIS IS MY HOUR;;;
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_WordEnabler
SpecialPowerTemplate = SpecialAbilityWitchKingWordOfPower
TriggeredBy = Upgrade_WitchKingWordOfPower
End
Behavior = SpecialPowerModule ModuleTag_WordStarter
SpecialPowerTemplate = SpecialAbilityWitchKingWordOfPower
UpdateModuleStartsAttack = Yes
TriggerFX =FX_WKAnduril
StartsPaused = Yes
End
Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_WordWeaponFireUpdate
SpecialPowerTemplate = SpecialAbilityWitchKingWordOfPower
WhichSpecialWeapon = 1
SkipContinue = Yes

UnpackTime = 1705
PackTime = 1
FreezeAfterTriggerDuration = 2500 ; Hold AI for this long after we fire.

AwardXPForTriggering = 0
StartAbilityRange = 80.0

SpecialWeapon = WitchKingWordOfPower

End


-Now, lets say that I want the FX to play just like a Leadership glow...constant once activated. If thats the case I would need to go to AtributeModifier.ini and find my Leadership Modifier and add this:

              
Code
FX = FX_WKAnduril


Then it should look something like this:

              
Code
ModifierList SpellBookWKAnduril
Category = LEADERSHIP
;Modifier = DAMAGE_MULT 300% ; Weapon damage doubled
;Modifier = ARMOR 50% ; Weapon damage doubled
;Modifier = SPEED 125%
Duration = 3000 ; Duration is forever when set to 0
FX = FX_WKAnduril
End


Now while we are in AtributeModifier.ini we can do some really cool things: we can change the leadership our hero gives, we can change how long it lasts (must be the same as the special power in *yourunit.ini*), and we can change what FX it gives. You can look at the different modifiers to see the possibilities...


-Now, lets say that we want this power to activate BEFORE another special power...this is simple but took me a while to figure out. In *yourunit.ini* under the special power Behavior there is this:

              
Code
UpdateModuleStartsAttack = Yes
TriggerFX =FX_WKAnduril


You need to change this to "No":

              
Code
UpdateModuleStartsAttack = No
TriggerFX =FX_WKAnduril


That will tell the game to play the WKAnduril then start the other special power.


-Now what are you going to do if your FX shows up in the wrong spot on your unit? Simple, you move the FX.

There are two ways to do this, you can change the bone it attaches to:

(under FXList.ini)

              
Code
FXList FX_WKAnduril
ParticleSystem
Name = WKAnduril
AttachToObject = Yes
AttachToBone = B_SWORDBONE
End
End


Or if that doesn't work you can change the position of the FX with this code:

(FXParticleSystem.ini)

              
Code
EmissionVolume = LineEmissionVolume
StartPoint = X:6 Y:3 Z:17
EndPoint = X:6 Y:3 Z:28
End


This changes the Start and End points for the FX...and as you can tell it uses X,Y,Z axis positions. You'll just have to play around with the settings untill it looks right.

-Now What if you either don't want your power to last forever, or you do want it to last forever? Well in either case you'll have to edit the Lifetimes...

(FXParticleSystem.ini)

              
Code
System
Priority = AREA_EFFECT
ParticleName = EXSplatHaze.tga
Lifetime = 20 20
SystemLifetime = 60
SortLevel = 1
Size = 0 15
BurstCount = 2 3
InitialDelay = 15 15
IsParticleUpTowardsEmitter = Yes
End


To change how fast or slow the glow pulses you will have to edit "Lifetime = ??". To edit how long the FX lasts before it dissapears you need to edit the "SystemLifetime = ??"...

NOTE: If you want your FX to play before your special power...it will, but it will also play again when the special power activates. So you'll have to mess around with it untill it works the way you want.


-Now, if you are creating a new weapon then you will need to change the weapon.ini to reflect your new weapon. There are several FX related catagories:

              
Code
PreAttackFX = FX_WKPreAttackBlast
FireFX = FX_WKBlast


The full Weapon file looks like this:

              
Code
;-----------------------------
Weapon WitchKingWordOfPower ; Big Blue Ring Blast
IdleAfterFiringDelay = 0
AttackRange = GANDALF_WORD_OF_POWER_RANGE
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_WKPreAttackBlast
FireFX = FX_WKBlast
FiringDuration = 1400
DamageNugget ; A basic Nugget that just does damage
Damage = WITCHKING_WORD_OF_POWER_DAMAGE
DamageScalar = 200000% NONE +IsengardLurtz +IsengardSaruman +MordorKhamul +RohanTheoden +RohanEomer +RohanEowyn +RohanGimli +RohanLegolas +GondorAragornMP +GondorGandalf +GondorBoromir +GondorFaramir
Radius = 250.0
DamageType = MAGIC
DamageFXType = MAGIC
DeathType = EXPLODED
DamageSpeed = 700.0 ; must match the ShockWaveSpeed below
DamageScalar = 200000% NONE +IsengardLurtz +IsengardSaruman +MordorKhamul +RohanTheoden +RohanEomer +RohanEowyn +RohanGimli +RohanLegolas +GondorAragornMP +GondorGandalf +GondorBoromir +GondorFaramir +RohanPippin
End
; MetaImpactNugget ; A Nugget that throws things back with force
; HeroResist = .75
; ShockWaveAmount = 70.0
; ShockWaveRadius = 500.0
; ShockWaveTaperOff = 1.0
; ShockWaveZMult = 1.000
; ShockWaveSpeed = 700.0
; End
End


This file gives you some really cool options for damage...as you can see from mine, you can tell the game to give minimal damage to units (Damage = WITCHKING_WORD_OF_POWER_DAMAGE is equal to "1" damage [game reads that Witchking_word_of_power_damage from GameData.ini]). This allows you to give every unit one damage, then under "DamageScalar" you can tell the game to multiply "1" by "blank percent" so that it really gives 20000 damage to select units. It's pretty cool.


I hope this gave you a better understanding of the FX systems that BFME uses...

At the very least you can now change the color of an FX...

Comments

Display order: Newest first

Perci - Tuesday January 25, 2011 - 11:21

If your editing projectiles, its best to choose a default arrow like GoodFactionArrow and add a trail onto it.

Zarmoz - Monday December 22, 2008 - 5:10

i tried to change the color on the flaming arrows, but it didn't work, can you tell me what to do?

Annatar - Thursday September 20, 2007 - 5:08

thanks..

Go to top

 

"One site to rule them all, one site to find them,
one site to host them all, and on the network bind them."

 
17:24:43