Just by lurking and searching I found most of the info I needed..
The rest was trial and error.
I wanted to give something back.. maybe it will be of use for somebody.
This is my first guide (and my first mod (c;).
If you find any mistakes, have questions, want to clarify something I expressed wrong … Or can help me with my Questions.
I’ll welcome any input and will try to incorporate it into the guide as it stands.
Here it goes:
I did the mod for ROTWK, but it should work in the original as well.
(I’ll try to point out the things that won’t be needed in the Original)
The Values (Damage, Range etc. still need to be balanced)
What I wanted to accomplish:
- The CaH Wizzards should get access to a new lvl 10 Spell that resembles the Fireball launched from the Gorgoroth Spire (Mordor Fortressupgrade)
- The Spell should be nerfable without having to edit the Spire’s Fireball
- the mod should get it’s own shortcut
- finalbig036b
- notepad
- lotr.str
- commandbutton.ini
- weapon.ini
- createaherospecialpowers.ini
- createaheroupgrades.inc
- object\createahero\createaheroaipowers.inc
- object\createahero\createaheroobjects.inc
- object\createahero\createaheropowers.inc
- Extract BfME2dir\ini.big using finalbig
- Extract the lotr.str file from BfME2dir\lang\English.big
(the name may vary depending on the language version you use I guess) - put all the Files in the following directory structure:
"BfME2dir\Mods\Modname\data\ini\"
(lotr.str must be in the data dir , the ini.big stuff (campaigns dir- windowtransitions.ini) in the ini dir)
- Duplicate the BfME2 Shortcut, give it a nice name and change the target to
DRIVE:\BfME2dir\lotrbfme2ep1.exe -mod "DRIVE:\BfME2dir \Mods\Modname"
(In the Original BfME2 it’s lotrbfme2.exe not lotrbfme2ep1.exe)
That was the easy part. Now let’s get cracking
Creating the new "Weapon"
We will need to define the new Meteor Weapon (took me a while to figure that one out) I simply copy pasted the MordorGorgorothSpireWeapon Entries in the weapon.ini and changed the Weapon Name to CreateaHeroMeteor
This "Weapon" consists of
- the Projectile (MeteorProjectile) : the flying, burning Rock
and - the Warhead (MeteorWarhead) : the Exploding Part, when it hit’s the ground
AttackRange = MORDOR_GORGOROTHSPIRE_ROCK_RANGE
But I couldn’t get my own Variables (I entered in the createaherogamedata.inc) to work (any hints?) so I simply entered numbers, like
AttackRange = 1000
complete changes in the weapon.ini
;//-----------------------------------ooWeapon CreateaHeroMeteor;// BALANCE Meteor AttackRange = 1000 MinimumAttackRange = 100.0 WeaponSpeed = 301 ;// dist/sec MinWeaponSpeed = 301 DelayBetweenShots = 6000;// time between shots, msec FXTrigger = CATAPULT_ROCK PreAttackDelay = 800 PreAttackType = PER_SHOT;// Do the delay each time we attack a new target FiringDuration = 1500;// Catapult firing animation takes 1.5 secs. RequireFollowThru = Yes ShareTimers = No;Yes ;// share timer with catapult heads to you can't fire both in quick succession NoVictimNeeded = Yes ;// Need no target LeechRangeWeapon = Yes ScatterRadiusVsInfantry = 40.0 DisableScatterForTargetsOnWall = Yes HitPercentage = 100;// always hits. ProjectileNugget ;// A Nugget that creates an Object and sends it to the target with a Warhead ProjectileTemplateName = MeteorProjectile WarheadTemplateName = MeteorWarhead WeaponLaunchBoneSlotOverride = SECONDARY End End;//-----------------------------------Weapon MeteorWarhead ProjectileCollidesWith = MONSTERS STRUCTURES; Structures is the default, btw. RadiusDamageAffects = ENEMIES NOT_SIMILAR FireLogicNugget LogicType = INCREASE_FUEL Radius = 50 Damage = 400 MinMaxBurnRate = 12 MaxResistance = 5 End FireLogicNugget;//@@@ fire logic testing LogicType = INCREASE_BURN_RATE Radius = 50 Damage = 5 End DamageNugget ; A basic Nugget that just does damage to trigger explosive mine Damage = 1 Radius = 150 DamageType = FLAME DamageFXType = FLAME DeathType = BURNED DamageScalar = 50000% NONE +MINE; Make sure we one shot kill mines, without risking wasting some poor hero with a torch End DamageNugget ; A basic Nugget that just does damage Damage = 750; Hella damage. structures are on a different order of magnitude for hitpoints, and we want to be sure to outscore the fire damage so we can knock bits off. Radius = 150;20.0 DelayTime = 0 DamageType = SIEGE DamageFXType = BIG_ROCK DeathType = EXPLODED; DamageScalar = 0% ANY +STRUCTURE ; No damage to allied structures. End DamageNugget ; A basic Nugget that just does damage Damage = 1000 Radius = 150;20.0 DelayTime = 0 DamageType = FLAME DamageFXType = BIG_ROCK DeathType = BURNED AcceptDamageAdd = No; DamageScalar = 0% ANY +STRUCTURE ; No damage to allied structures. End MetaImpactNugget ;// A Nugget that throws things back with force; HeroResist = .75 ShockWaveAmount = 50.0 ShockWaveRadius = 150.0 ShockWaveTaperOff = 0.2 ShockWaveZMult = 1.20 EndEnd
Now let’s add that new Projectile the the CaH Objects
I copied the MordorGorgorothSpireProjectile Entries from the object\evilfactions\evilfactionsubobjects.ini
and only named the new Object like the Projectile used in the new weapon.ini
(MeteorProjectile)
Complete changes in the objects\createahero\createaheroobjects.inc
//------------------------------------------------------------------------------//------------------------------------------------------------------------------Object MeteorProjectile; *** ART Parameters *** Draw = W3DScriptedModelDraw ModuleTag_Draw DefaultModelConditionState Model = EXLavaRock04 ParticleSysBone = NONE MordorSpireFire FollowBone:Yes ParticleSysBone = NONE MordorSpireLava FollowBone:Yes ParticleSysBone = NONE MordorSpireLava02 FollowBone:Yes End IdleAnimationState Animation = EXLavaRock04 AnimationName = EXLavaRock04.EXLavaRock04 AnimationMode = LOOP End End End ;// *** AUDIO Parameters *** SoundAmbient = GorgorothSpireFireballAmbient1 ClientBehavior = AnimationSoundClientBehavior ModuleTag_AnimAudioBehavior MaxUpdateRangeCap = 800 AnimationSound = Sound:GorgorothSpireFireballFlyBy1 Animation:EXLavaRock04.EXLavaRock04 Frames: 20 End;// ***DESIGN parameters *** EditorSorting = SYSTEM ArmorSet Armor = NoArmor End VisionRange = 0.0;// *** ENGINEERING Parameters *** KindOf = PROJECTILE ShockwaveResistance = SHOCKWAVE_RESISTANCE_IMMUNE Body = ActiveBody ModuleTag_03 MaxHealth = 100.0 End Behavior = DestroyDie ModuleTag_04;nothing End Behavior = BezierProjectileBehavior ModuleTag_05 DetonateCallsKill = Yes FirstHeight = 53;// Height of Bezier control points above highest intervening terrain SecondHeight = 53 FirstPercentIndent = 20%;// Percentage of shot distance control points are placed SecondPercentIndent = 80% FlightPathAdjustDistPerSecond = 0;// Can allow a max speed this can attempt to follow a target. Units are their velocity we can tag. PreLandingStateTime = 1000 PreLandingEmotion = DOOM PreLandingEmotionRadius = 20.0 InvisibleFrames = 100 FadeInTime = 100 End Behavior = PhysicsBehavior ModuleTag_06 End Behavior = FXListDie ModuleTag_08 DeathTypes = ALL DeathFX = FX_GorgorothSpireFireballDeath End Geometry = Sphere GeometryIsSmall = Yes GeometryMajorRadius = 3.0End
Integrating the new "Weapon"
So now we have created a new weapon called CreateaHeroMeteor
I say: let’s use it!
Tell the program that there is a new upgrade for the CaHs called CreateaHeroMeteor (I don’t think it needs to be the same as the weapon’s name.. I’m just lazy and it worked) by making a new entry in the createaheroupgrades.inc
complete changes in the createaheroupgrades.inc
Upgrade Upgrade_CreateAHeroMeteor Type = OBJECT END
It’s a Special Power, so tell the Programm something about it, like the recharge time
complete changes in the createaherospecialpowers.ini
//------------------------------------------------------------------------------ SpecialPower SpecialAbilityCreateAHeroMeteor Enum = SPECIAL_SPELL_BOOK_BOMBARD RadiusCursorRadius = 200 ReloadTime = 25000;// in milliseconds InitiateSound = GorgorothSpireFireballBuildUpMS End
And now define the spell a little bit more
complete changes in the createaheropowers.inc
//--------------------------------------------------------------------------// Meteor//--------------------------------------------------------------------------Behavior = UnpauseSpecialPowerUpgrade ModuleTag_CreateAHeroMeteor SpecialPowerTemplate = SpecialAbilityCreateAHeroMeteor TriggeredBy = Upgrade_CreateAHeroMeteorEndBehavior = SpecialPowerModule ModuleTag_CreateAHeroMeteorStarter SpecialPowerTemplate = SpecialAbilityCreateAHeroMeteor UpdateModuleStartsAttack = Yes StartsPaused = YesEndBehavior = WeaponFireSpecialAbilityUpdate ModuleTag_CreateAHeroMeteorUpdate SpecialPowerTemplate = SpecialAbilityCreateAHeroMeteor WhichSpecialWeapon = 5 SkipContinue = Yes UnpackTime = 100 PreparationTime = 2500 PersistentPrepTime = 1500 PackTime = 1100 TriggerSound = GorgorothSpireFireballLaunchMS FreezeAfterTriggerDuration = 2500 AwardXPForTriggering = 0 StartAbilityRange = 1000 MustFinishAbility = Yes SpecialWeapon = CreateaHeroMeteorEnd
Behavior= Unpause.. means The Power get’s useable, is no longer grayed out
The Spell will become available after I “purchase” (get the prerequisites lvl 10, fireball lvl 3) the upgrade (defined in createaheroupgrades.inc)
I think the SpecialPowerModule Behavior tells the Program “if he clicks on it, start the attackroutine” (Just my guess though)
WeaponFireSpecialAbilityUpdate Ah! So now we clicked on it!
WhichSpecialWeapon= Not sure what this one does
Unpacktime, PreparationTime, PersistentPrepTime= (It takes a bit to fire)
PackTime= It takes a bit to “reload” (get ready for recharging )
FreezeAfterTriggerDuration= we can’t do anything for 2.5 seconds after we fired the weapon. In fact the 2.5 seconds only start after the weapon hit’s the ground.
StartAbilityRange= How close must we be to the target to be able to launch our spell.
SpecialWeapon= Yes we will use our selfmade CreateaHeroMeteor
It's all about control
Now we have a new Weapon, and our CaH Wizards could use it.. but what good is power without control?
So we need a Command Button to actually learn and activate the skill
This will be done in the commandbutton.ini
(Don’t worry about the CONTROLBAR:… entries. We’ll come to those soon)
complete changes in the commandbutton.ini
//------------------- Create A Hero ----------------------------//--------------------------------------------------------------CommandButton Command_CreateAHero_Meteor Command = SPECIAL_POWER SpecialPower = SpecialAbilityCreateAHeroMeteor TextLabel = CONTROLBAR:SpecialAbilityCAHMeteor ButtonImage = SBEvil_RainofFire Options = NEED_TARGET_POS ButtonBorderType = ACTION DescriptLabel = CONTROLBAR:TooltipSpecialAbilityCAH_Meteor RadiusCursorType = RainOfFireRadiusCursor CursorName = AttackObj InvalidCursorName = GenericInvalid InPalantir = Yes AutoAbility = Yes CreateAHeroUIAllowableUpgrades = Upgrade_CreateAHero_ClassIstariWizard CreateAHeroUIMinimumLevel = 10 CreateAHeroUIPrerequisiteButtonName = None CreateAHeroUICostIfSelected = 2000End
With this entry we’ll create a command button using the same image as the Rain of Fire Spell. We also use the same Cursor (the white circle to define the area to attack)
InPalantir=Yes means, that the Power will be selectable in the small circles around our heroes image (like all spells and the stances button)
AutoAbility=Yes.. If we so want our Hero will cast this spell automatically
In the next few lines we’ll tell the program that only Wizards will be able to learn this spell and that they need to be lvl 10 to use the Meteor. This spell will cost us 2000 because it’s quite powerful.
I believe that you can leave the CreateAHeroUICostIfSelected one out, if you use the Original Game and not the Expansion pack.
If we would quit now, we could already learn the spell and use it ingame.
But all textwindows would give us error messages. So we will have to create a few descriptive texts in the string file (lotr.str)
Here is what I added:
CAH:Command_CreateAHero_Meteor_Name"Meteor"ENDCONTROLBAR:ToolTipSpecialAbilityCAH_Meteor"Launches a giant Meteor that scorches the Battlefield"ENDCONTROLBAR:ToolTipSpecialAbilityCAH_Meteor_Palantir"Launches a giant Meteor that scorches the Battlefield \n Left click icon then left click on target area"ENDCONTROLBAR:SpecialAbilityCAHMeteor"M&eteor"END
Finished.
Problems I stumbled upon:
I tried to make my own variables in the gamedata.ini and the createaherogamedata.inc files so I could easily access all variables I wanted to balance out from one place.
But I always got error messages while trying to launch the game.
What I wanted was
Gamedata.ini :
#define CAH_METEOR_COST 2000
(to be used in the commandbutton.ini)
And in the createaherogamedata.inc
// Meteor #define CREATE_A_HERO_METEOR_ROCK_RANGE 1000 #define CREATE_A_HERO_METEOR_ROCK_DAMAGE 750 #define CREATE_A_HERO_METEOR_FIRE_DAMAGE 750 #define CREATE_A_HERO_METEOR_PREATTACKDELAY 800 #define CREATE_A_HERO_METEOR_DELAYBETWEENSHOTS 6000 #define CREATE_A_HERO_METEOR_FIRINGDURATION 1500
(to be used in the weapon.ini)
Any Ideas?
Also I'd like to know where I can define which string he uses as a tooltip for the Plantir, and which during character creation.
And another thing: Can I choose Fireball lvl 3 als a prerequisite and keep the Meteor from overwriting my fireball spell?
I hope my explanations are understandable and not toooo wrong (c;
If you have anything to add, feel free to do so.
Hope to have been of service,
Imladhrim
__________________________________
Edit:
I added the sound references so it plays the buildup and launch sounds
Edited by Imladhrim, 05 January 2007 - 04:53 PM.