The 3rd Age

The Rhovanion Alliance

The Rhovanion Alliance

A most anticipated mod that adds 4 new factions as well as editing the old ones

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

Radiance Cont'd

No Avatar

ASimpleModder

Category: Code
Level: Beginner
Created: Thursday February 9, 2012 - 7:26
Updated: Thursday August 30, 2012 - 17:07
Views: 3423
Summary: Some more thoughts on radiance power

Rating

Staff says

3.5

Members say

4.0

Average

3.7/5.0

3 votes

Page 1 2 3 4 5 6 7
Next we will specify the weapon in data\ini\weapon.ini:

              
Code

Weapon CreateAHeroRadiancePowerWeapon
    UseInnateAttributes        = No
    RadiusDamageAffects        = ENEMIES NEUTRALS
    DelayBetweenShots        = 0
    FiringDuration            = 500
    DamageNugget
        Damage                = 3
        DamageScalar        = 200% ALL -ARCHER -STRUCTURE -HERO
        DamageScalar        = 50% ANY +HERO
        DamageScalar        = 0% ANY +STRUCTURE
        AcceptDamageAdd        = No
        Radius            = 200
        DelayTime        = 0
        DamageType        = MAGIC
        DeathType        = NORMAL
        RequiredUpgradeNames    = Upgrade_CreateAHeroRadiancePower
    End
End


This weapon will be fired every 500ms for 3dmg which is equal to 6dps MAGIC damage. This might not sound like much at first but consider that 6dps MAGIC will kill (without armor upgrade)
- a goblin archer in about 13s
- a gondor archer in about 16s
- an dwarven axe thrower in about 40s (the tough little buggers ;)
Some DamageScalar fields balance the power against structures (which will not be effected by the power), enemy heroes (with only half the damage) and against anything other than heroes, archers and structures (with twice the damage since melee units generally have more health than archers).
There are a few fields I found necessary to add or the power will make the enemy literally (to qoute Gimli) "fall like wheat":
- UseInnateAttributes = No tells the game not to modify the damage with the CAH power attribute.
- AcceptDamageAdd = No will prevent the game from increasing the damage with every level up of the hero.
The crucial piece of code though is
              
Code

RequiredUpgradeNames    = Upgrade_CreateAHeroRadiancePower

This will tell the game not to use this nugget if the one firing this weapon does not have the specified upgrade(s). So basically until the hero reaches the required level the power will fire a weapon without damage.

Comments

Display order: Newest first

JUS_SAURON - Thursday March 22, 2012 - 22:29

Nice bit of coding ... a new special power system

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

 
8:23:42