The 3rd Age

Fin's LOTR Expansion

Fin's LOTR Expansion

A mod that adds Rohan to the game, and strives to bring back some BFME I fun!

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

Apollo's Ultimate Intermediate Tutorial

Avatar of Elric

Elric

Category: Code
Level: Intermediate
Created: Sunday January 23, 2011 - 19:36
Updated: Sunday June 16, 2013 - 19:51
Views: 7346
Summary: Almost all you need to know about intermediate coding...

Rating

Staff says

2.0

Members say

3.8

Average

3.6/5.0

7 votes

Page 1 2 3 4 5 6
Weapon.ini Editing

Weapon.ini supplies all of the different weapons and the damage that they do in game. Some weapons are spells such as Word Of Power or they can be spellbook powers such as sunflare. The main weapons in game are hero weapons and infantry weapons. I will edit Faramirs Bow and Sword for this tutorial.

First Find Faramirs Sword which looks like this:

              
Code

Weapon FaramirSword
LeechRangeWeapon = Yes
AttackRange = STANDARD_MELEE_ATTACK_RANGE
MeleeWeapon = Yes
FireFX = FX_GondorSwordHit
DelayBetweenShots = FARAMIR_DELAYBETWEENSHOTS             ; time between shots, msec
PreAttackDelay = FARAMIR_PREATTACKDELAY     ; 400 is sword swing delay time before contact with target.
PreAttackType = PER_SHOT ; Do the delay each time we attack a new target
FiringDuration = FARAMIR_FIRINGDURATION     ; Duration of the sword swing

DamageNugget ; A basic Nugget that just does damage
Damage = FARAMIR_DAMAGE
Radius = 0.0
DelayTime = 0
DamageType = HERO
DamageFXType = SWORD_SLASH
DeathType = NORMAL
End
End


Lets say you want his sword elctrecute enemies when he hits them.
Then you would change DamageFXType to ELECTRIC and Change DeathType to EXPLODED.

Also Lets say you want him to kill 2-3 enemies at once. well change Radius to 2.0.
More damage? Sure change FARAMIR_DAMAGE to 250 or more.
Want an FX to shoot out each time you hit change FireFX to anything you want even Word Of Power. If you change the FX the actual weapon for it wont work but the Particl System will.

Moving On To Faramirs Bow.

Faramirs Bow Looks like this:

              
Code

Weapon FaramirBow
AttackRange            = FARAMIR_BOW_RANGE

RangeBonusMinHeight    = 10
    RangeBonus        = 1
    RangeBonusPerFoot    = 1 ; ;#MULTIPLY( FARAMIR_BOW_RANGE .01 )
                
LeechRangeWeapon = Yes
WeaponSpeed            = 321 ; dist/sec
MinWeaponSpeed        = 241
MaxWeaponSpeed        = 481 ; dist/sec Upper limit on scaling, when attacking past nominal "max" range
FireFX                = FX_RohanArcherBowWeapon
ScaleWeaponSpeed    = Yes ; Used for lob weapons, scales speed proportional to range
HitPercentage        = 100 ;When this weapon is used it will hit exactly 75% of the time.
ScatterRadius        = 0.0 ;When this weapon misses it can randomly miss by as much as this distance.

DelayBetweenShots    = FARAMIR_BOW_DELAYBETWEENSHOTS ; time between shots, msec
PreAttackDelay        = FARAMIR_BOW_PREATTACKDELAY ; 1467 is the prep time for archer.
PreAttackType        = PER_POSITION
FiringDuration        = FARAMIR_BOW_FIRINGDURATION ; Duration of the archer firing shot is 500ms.

ClipSize            = 1
AutoReloadsClip        = Yes
AutoReloadWhenIdle    = 1    
ClipReloadTime        = Min:FARAMIR_BOW_RELOADTIME_MIN Max:FARAMIR_BOW_RELOADTIME_MAX
ContinuousFireOne    = 0
ContinuousFireCoast    = FARAMIR_BOW_RELOADTIME_MAX
    
AntiAirborneVehicle    = Yes
AntiAirborneMonster    = Yes

CanFireWhileMoving        = Yes

ProjectileNugget ; Default arrow
ProjectileTemplateName = GoodFactionArrow
WarheadTemplateName = FaramirBowWarhead
End
End


Notice there is no damage Nugget but there is:

              
Code

ProjectileNugget ; Default arrow
ProjectileTemplateName = GoodFactionArrow
WarheadTemplateName = FaramirBowWarhead
End


So here is the warhead which is found in Weapon.ini also:

              
Code

Weapon FaramirBowWarhead
ProjectileCollidesWith = ALLIES ENEMIES NEUTRAL STRUCTURES WALLS ; Remember, the projectile is a rock, who has no allies
RadiusDamageAffects = ENEMIES NEUTRALS ALLIES NOT_SIMILAR
HitStoredTarget = Yes    ; Always hits initial target.
DamageNugget ; A basic Nugget that just does damage
Damage = FARAMIR_BOW_DAMAGE
Radius = 0.0    ; HitStoredTarget means we hurt the person we launched at. And nobody else. So a miss hurts nobody.
DelayTime = 0
DamageType = HERO_RANGED
;DamageScalar = 25000% NONE +MordorMumakil
DamageFXType = GOOD_ARROW_PIERCE
DeathType = NORMAL
End
End


Now you can edit the same thing as the sword in the Warhead section, but if you want your hero to shoot its bow faster you have to use FaramirBow piece of code.

To make the bow shoot fast change:
              
Code

ClipSize            = 1
AutoReloadsClip        = Yes
AutoReloadWhenIdle    = 1    
ClipReloadTime        = Min:FARAMIR_BOW_RELOADTIME_MIN Max:FARAMIR_BOW_RELOADTIME_MAX
ContinuousFireOne    = 0
ContinuousFireCoast    = FARAMIR_BOW_RELOADTIME_MAX


To

              
Code

ClipSize            = 1
AutoReloadsClip        = Yes
AutoReloadWhenIdle    = 1    
ClipReloadTime        = Min:5 Max:5
ContinuousFireOne    = 0
ContinuousFireCoast    = 5


Now it will shoot faster.

This is just to get the general Idea of Weapon.ini
Now you Know how to edit the damage rate of fire.

Links / Downloads

 HitsAdded
Clanks Ultimate Beginner Tutorial1295January 23, 2011 - 19:39

Credits

ElricMaker
clank234Gave me the idea from Clanks Ultimate Beginners Tutorial
The3rdAgeFor the help from all community members who helped me learn

Comments

Display order: Newest first

wesleypicard - Monday July 23, 2018 - 2:15

rate it a 10 but i am confused on one thing on page 3 where you explain how to increase horde size. i understand part of it. do i have to change the initial payload as well or leave that alone? and what about the rohirram? do you do the same with them as with the elven warriors?

--------

elric thanks so much for this tutorial i am finally able to increase horde sizes thanks to this.

Radspakr Wolfbane (Team Chamber Member) - Sunday August 14, 2011 - 6:10

In the FX ParticleSystems Shader refers to the type of Shader used these can be Alpha which reads the Alpha channel,Additive which reads Black as transparency and of course you can choose not to have them.

Zues - Saturday August 6, 2011 - 15:07

Pretty Clear could use a little improvmennt

Elric - Saturday August 6, 2011 - 9:53

@newbkiller: what do you mean choice 2. i need a page number to help you?

newbkiller.williams - Saturday August 6, 2011 - 4:26

could you explain choice number 2 aswell please , because i dont know how to put a new models/textures into the game

Poseidon - Tuesday January 25, 2011 - 16:43

I really think that this article follows up clanks in quite a few ways. I can't wait until this whole article is finished! This will be very helpful to me in some map.ini coding and maybe modding once i think i am ready for it...

Elric - Tuesday January 25, 2011 - 16:23

Please Comment and Rate. I would release this whole tutorial in one go but i wanted to release half first and then half later. Just in case I never finished it so at least people will have 1 half of it...

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

 
10:18:29