The 3rd Age

Galadhrim Warriors - Mini Mod

Galadhrim Warriors - Mini Mod

A Mini Mod adding the Galadhrim Warriors to the Elven Faction in ROTWK.

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

Weapons

Tutorial for Battle for Middle-earth II BFME 2

Avatar of Ridder Geel

Ridder Geel

Category: Code
Level: Intermediate
Created: Saturday February 9, 2008 - 8:20
Updated: Thursday December 15, 2011 - 14:27
Views: 18774
Summary: About Weapons, Weapon 'Leveling' and how to make a 'MorgulBlade' weapon effect.

Rating

Staff says

3.7

Members say

4.5

Average

4.4/5.0

20 votes

Page 1 2 3 4 5 6 7
Leveling Spear Changing colors

This Part of my tutorial will show you how to make your spear Change colors as your hero levels up!
This tutorial will refer to parts of the tutorial from the previous page.

NOTE
You should have done the things on the previous page if you want to be able to do this correctly.

INI's Needed:
-Weapon.ini
-Goodfactionsubobjects.ini *or Evilfactionsubobjects.ini, depends on which side your hero is!
-FXparticlesystem.ini

Texture Needed:
- exspearglow.tga

-Weapon.ini-

Here is the part of the weapon JackSpear that we will be working on:

              
Code

    ProjectileNugget            ; A Nugget that creates an Object and sends it to the target with a Warhead
        ProjectileTemplateName    = RohanEomerSpearProjectile
        WarheadTemplateName    = JackSpearWarheadLVL1
        ForbiddenUpgradeNames    = Upgrade_JackSpearLVL2 Upgrade_JackSpearLVL3 Upgrade_JackSpearLVL4
    End
    ProjectileNugget ; LVL 2
        ProjectileTemplateName    = RohanEomerSpearProjectile
        WarheadTemplateName    = JackSpearWarheadLVL2
        RequiredUpgradeNames    = Upgrade_JackSpearLVL2
        ForbiddenUpgradeNames    = Upgrade_JackSpearLVL3 Upgrade_JackSpearLVL4
    End
    ProjectileNugget ; LVL 3
        ProjectileTemplateName    = RohanEomerSpearProjectile
        WarheadTemplateName    = JackSpearWarheadLVL3
        RequiredUpgradeNames    = Upgrade_JackSpearLVL3
        ForbiddenUpgradeNames    = Upgrade_JackSpearLVL4
    End
    ProjectileNugget ; LVL 4
        ProjectileTemplateName    = RohanEomerSpearProjectile
        WarheadTemplateName    = JackSpearWarheadLVL4
        RequiredUpgradeNames    = Upgrade_JackSpearLVL4
    End


Notice that the ProjectileTemplateName is RohanEomerSpearProjectile, this is the object Jack throws!
Lets have Jack throw a special color spear as soon as he reaches LVL 4:

              
Code


    ProjectileNugget            ; A Nugget that creates an Object and sends it to the target with a Warhead
        ProjectileTemplateName    = RohanEomerSpearProjectile
        WarheadTemplateName    = JackSpearWarheadLVL1
        ForbiddenUpgradeNames    = Upgrade_JackSpearLVL2 Upgrade_JackSpearLVL3 Upgrade_JackSpearLVL4
    End
    ProjectileNugget ; LVL 2
        ProjectileTemplateName    = RohanEomerSpearProjectile
        WarheadTemplateName    = JackSpearWarheadLVL2
        RequiredUpgradeNames    = Upgrade_JackSpearLVL2
        ForbiddenUpgradeNames    = Upgrade_JackSpearLVL3 Upgrade_JackSpearLVL4
    End
    ProjectileNugget ; LVL 3
        ProjectileTemplateName    = RohanEomerSpearProjectile
        WarheadTemplateName    = JackSpearWarheadLVL3
        RequiredUpgradeNames    = Upgrade_JackSpearLVL3
        ForbiddenUpgradeNames    = Upgrade_JackSpearLVL4
    End
    ProjectileNugget ; LVL 4
        ProjectileTemplateName    = JackSpearLVL4Projectile ;<-Special Spear Color for lvl 4
        WarheadTemplateName    = JackSpearWarheadLVL4
        RequiredUpgradeNames    = Upgrade_JackSpearLVL4
    End


Notice I changed the ProjectileTemplateName to JackSpearLVL4Projectile.
Now we will move on to changing the looks of that spear...

-Goodfactionsubobjects.ini-

Now we will add this code to the bottom of this ini:

              
Code

Object JackSpearLVL4Projectile

    Draw = W3DScriptedModelDraw ModuleTag_01 ;ModuleTag_Draw
        DefaultModelConditionState
            Model = RUEomer_SPER
            ParticleSysBone NONE JackSpearLVL4ContrailThin        ;<-ParticleSystem used
            ParticleSysBone NONE JackSpearLVL4FlameTrail        ;<-ParticleSystem used
            Texture = exspearglow.tga    JackSpearLVL4exspearglow.tga    ;<- The TGA File that you are using
        End
    End

    ; *** AUDIO Parameters ***

    ; ***DESIGN parameters ***
    EditorSorting = SYSTEM
    ArmorSet
        Armor = NoArmor
    End
    VisionRange = 0.0

    ; *** ENGINEERING Parameters ***
    KindOf = PROJECTILE
    Body = ActiveBody ModuleTag_02
        MaxHealth             = 10.0
    End

    Behavior = DestroyDie ModuleTag_03
        ;nothing
    End
        
    Behavior = BezierProjectileBehavior ModuleTag_04
        ; To tweak a Bezier path
        FirstHeight = 9    ; Height of Bezier control points above highest intervening terrain
        SecondHeight = 9
        FirstPercentIndent = 20% ; Percentage of shot distance control points are placed
        SecondPercentIndent = 90%
        FlightPathAdjustDistPerSecond = 50
            ; Can allow a max speed this can attempt to follow a target. Units are their velocity we can tag. (45 is default human speed)
        DetonateCallsKill = Yes
        CurveFlattenMinDist = 100.0
    End

    Behavior = CreateObjectDie ModuleTag_06
        DeathTypes = ALL
    End

    Behavior = FXListDie ModuleTag_07
        DeathTypes = ALL -CRUSHED -SPLATTED
        DeathFX = FX_SmiteHit
    End

    Geometry = Sphere
    GeometryIsSmall = Yes
    GeometryMajorRadius = 0.8
End


Now a little bit of grafical stuff, In Textures1.BIG find the file exspearglow.tga and extract it.
Rename the file to JackSpearLVL4exspearglow.tga.
Open Paint Shop Pro or Photoshop, or any other good image editing software...

Choose a color to make your spear,
For this tutorial I'll make the spear red.
Colorize it with the options:
Hue: 0    Saturation: 153
Now save it...

Notice I have put 3 notes up there in the codebox:
The first 2 are Particlesystems, which will come later on.
The 3rd is the name of the TGA file you have just changed!


-FXparticlesystem.ini-

This is the code you need to add at the bottom of the file:
              
Code

;Look at these 2 systems to see changes made!
;FXParticleSystem SpearContrailThin
;FXParticleSystem SpearFlameTrail

;---------Jack Spear FX---------
FXParticleSystem JackSpearLVL4FlameTrail
System
Priority = ALWAYS_RENDER
ParticleName = EXspearhead.tga
Lifetime = 50 50
SortLevel = 1
Size = 40 40
BurstCount = 2 2
IsGroundAligned = Yes
IsParticleUpTowardsEmitter = Yes
End
Color = DefaultColor
Color1 = R:90 G:20 B:20 0
Color2 = R:0 G:0 B:0 50
End
Alpha = DefaultAlpha
End
Update = DefaultUpdate
SizeRateDamping = 0.8 0.9
AngleZ = -2 2
AngularDamping = 1 1
AngularDampingXY = 1 1
End
Physics = DefaultPhysics
VelocityDamping = 1 1
End
EmissionVelocity = OrthoEmissionVelocity
End
EmissionVolume = PointEmissionVolume
End
Draw = DefaultDraw
End
End

FXParticleSystem JackSpearLVL4ContrailThin
System
Priority = MEDIUM_OR_ABOVE
Type = STREAK
ParticleName = EXContrail.tga
Lifetime = 7 7
SortLevel = 1
Size = 1 2
BurstCount = 1 1
InitialDelay = 1 1
End
Color = DefaultColor
Color1 = R:90 G:20 B:20 0
Color2 = R:0 G:0 B:0 7
Color4 = R:32 G:32 B:32 0
End
Alpha = DefaultAlpha
End
Update = DefaultUpdate
SizeRate = -0.3 -0.3
SizeRateDamping = 0.85 0.9
AngularDamping = 1 1
AngularDampingXY = 1 1
End
Physics = DefaultPhysics
VelocityDamping = 0.93 0.94
End
EmissionVelocity = OrthoEmissionVelocity
End
EmissionVolume = LineEmissionVolume
StartPoint = X:7 Y:0 Z:0
EndPoint = X:8 Y:0 Z:0
End
Draw = StreakDraw
End
End


What I have changed in these 2 systems is the 'DefaultColor's:
Color1 = R:90 G:20 B:20 0
This is the same kind of color we gave our JackSpearLVL4exspearglow.tga.
Now the spear Jack throws at LVL 4 is a reddish color.

Once again a tip: If you want to look at the differences between the spear's coding you should look at the RohanEomerSpearProjectile in the Goodfactionsubobjects.ini

Play around with the color values to make cool looking spear, and good luck.

I hope this tutorial has helped you understand the weapons and thrown projectiles in BFME better!

Links / Downloads

 HitsAdded
Available DamageTypes2015February 10, 2008 - 18:15
JackSpearLVL4exspearglow.tga -@Page31706February 9, 2008 - 12:02

Comments

Display order: Newest first | Page: 1, 2

Sauron-the-Deciever - Thursday December 1, 2011 - 3:10

Flank bonus means the bonus for attacking units from behind

modboy451 - Friday November 12, 2010 - 10:34

Excellent Article!
Thanks, Im using different forms of morgul blades now (that give me different thing)
i was wanting to know how to put poison and flame onto my heros weapons too, thanks!

Ridder Geel (Staff) - Saturday July 4, 2009 - 11:56

In weapon.ini....
change this line:
        Damage            = GLORFINDEL_SWORD_DAMAGE
to a different value...
Simple...
Next time ask this in the forums.

elvenlord95 - Thursday July 2, 2009 - 8:19

e...how can i make a hero's weapon(for example glorfindels) making more damage?
"the sky has fallen"

Ridder Geel (Staff) - Thursday April 30, 2009 - 7:23

1. Good idea ;)
2. Reformat, will do that later.
3. I didn't click on it alot. I usually do check the tutorial for replies or comments and such once every day, and i think that maybe because of this tutorials subject some people open the tutorial more than once to check out some things about some nuggets and such. I sometimes even go here to check some of the nuggets ;)

Behavior? do you mean all the things from in the "Engineering" part of the "Unit" or "Structure"? If thats the case then I will consider making that later.

Sulherokhh (Team Chamber Member) - Wednesday April 29, 2009 - 1:33

1. How about you list any changes on page 1?
2. Don't you think a reformat would help reading? (like removal of empty space, etc.)
3. How long did it take you to click on the tutorial so it would appear in the top ten popular section? ;-)

Can you answer those questions? I might give it a 4 instead of 3. :)

Otherwise, this is just what is needed, a very thankful job indeed.
Now a comprehensive listing of 'Behavior'-modules with a listing of all toggles would be nice indeed ... in an additional tutorial.

Masterbadeend - Wednesday April 29, 2009 - 1:05

I think Flanking Bonus is this: When the unit flanks (yellow lightning bolt) an another unit then he gets for example +50% extra damage to that other unit.

Zarmoz - Tuesday March 10, 2009 - 2:44

You are the best of the best. good job!

I have made Aragorn have a Poisonous sword, Gandalf with Flame sword, Legolas with magic bow, Frodo with poisonous dagger and create a heros have flame if they're swordsman or poison if they're archer. ;)

dethwaker3 - Monday October 27, 2008 - 21:36

I am definitely gonna use the get healed by attacking units!!!!

Lurtzy - Tuesday June 10, 2008 - 14:11

Helped me get started a while ago, good tutorial!

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."

 
1:24:25