Jump to content


Photo

Galadriel Hero Power


  • Please log in to reply
17 replies to this topic

#1 Malhakai

Malhakai
  • Members
  • 34 posts

Posted 17 January 2015 - 12:45 AM

Hi all, 

 

Curious about creating a new power for Galadriel, and wanted to get some help :-)

 

I have Galadriel as a buildable regular hero, in her white campaign form.

 

I was hoping to create a passive power, (perhaps similar to how Aragorn's sword power works), when she encounters an enemy hero she temporarily changes to her storm queen look, and has increased damage (but not the red glow Aragorn gets). Is this possible?

 

Thank-you :-)

 

 



#2 Suchar

Suchar

    Suchy

  • Members
  • 100 posts
  • Location:Poland
  • Projects:PRO MOD
  •  Lonely coder

Posted 17 January 2015 - 08:23 AM

In galadriel code something like that:

	; ===== Galadriel Power --------------------------------------------------------------------------------
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_GaladrielPowerEnabler
		SpecialPowerTemplate		= SpecialAbilityGlorfindelBladeOfPurity
		TriggeredBy					= Upgrade_GlorfindelBladeOfPurity
	End
  	Behavior = SpecialPowerModule ModuleTag_GaladrielPowerStarter
		SpecialPowerTemplate		= SpecialAbilityGlorfindelBladeOfPurity
		StartsPaused				= Yes
		SetModelCondition			= ModelConditionState:USER_1
		SetModelConditionTime		= 2.0
	End
	Behavior = SpecialAbilityUpdate ModuleTag_GaladrielPowerUpdate
		SpecialPowerTemplate		= SpecialAbilityGlorfindelBladeOfPurity
		TriggerAttributeModifier	= GlorfindelBladeOfPurity
		AttributeModifierDuration	= 30000
	End
	Behavior = AutoAbilityBehavior ModuleTag_GaladrielPowerAutoAbility
		SpecialAbility				= SpecialAbilityGlorfindelBladeOfPurity
		MaxScanRange				= 200
		Query						= 1 ALL ENEMIES
	End

Add to her experience level Upgrade_GlorfindelBladeOfPurity, and to her commandset Command_SpecialAbilityGlorfindelBladeOfPurity.

It is quick written idea, I can't promise that everythink will work ;)



#3 Malhakai

Malhakai
  • Members
  • 34 posts

Posted 19 January 2015 - 11:33 PM

Ah great thank-you. Is it possible to alter 'query' from '1 ALL ENEMIES' to actual heroes? Do I need to keep it as '1 SAURON SARUMAN' etc?

 

The setmodelconditiontime is 2 seconds, is it possible to change that to however long it takes her to kill the enemy hero? and can it be changed to a passive skill, instead of a clickable skill?

 

Lastly how do I incorporate her glow aura on the storm queen model, but not on the normal model - can this be done?

 

Thanks heaps for your help :-D


Edited by Malhakai, 19 January 2015 - 11:34 PM.


#4 Suchar

Suchar

    Suchy

  • Members
  • 100 posts
  • Location:Poland
  • Projects:PRO MOD
  •  Lonely coder

Posted 24 January 2015 - 08:12 PM

Ah great thank-you. Is it possible to alter 'query' from '1 ALL ENEMIES' to actual heroes? Do I need to keep it as '1 SAURON SARUMAN' etc?

 

The setmodelconditiontime is 2 seconds, is it possible to change that to however long it takes her to kill the enemy hero? and can it be changed to a passive skill, instead of a clickable skill?

 

Lastly how do I incorporate her glow aura on the storm queen model, but not on the normal model - can this be done?

 

Thanks heaps for your help :-D

 

Querry is for the auto ability...

setmodelconditiontime sets how long galadriel will looks like storm queen

Passive skill... You want to make her storm queen allways? It won't be a power, you should give her storm queen modelcontitionstate allways (orginal game) and give her more damage in her weapon set...

Aura: Replace orginal code part to this part, it should work.
		DefaultModelConditionState
			Model               = EUGaldrlGd_SKN
;			ParticleSysBone = B_PELVIS GaladAura FollowBone:YES
;			ParticleSysBone = B_PELVIS GaladAura02 FollowBone:YES
		End
		
		ModelConditionState = USER_1				; ring hero version.
			Model               = EUGaldrl_SKN
			ParticleSysBone = B_PELVIS GaladAura FollowBone:YES
			ParticleSysBone = B_PELVIS GaladAura02 FollowBone:YES
		End


#5 Malhakai

Malhakai
  • Members
  • 34 posts

Posted 25 January 2015 - 02:58 AM

I don't want her to always look like the storm queen, just when she engages with an enemy hero. (I know how to permanently change her appearance or damage).

 

She currently does not automatically use the ability, it is not a passive skill, it has to be activated.

 

Ideally I'd like to keep the white queen look that I currently have, but when she engages with a enemy hero she automatically turns into the storm queen with increased damage, and stays that way until she stops fighting the hero or the hero is killed, then turns back to regular white queen. Is this possible? 



#6 Suchar

Suchar

    Suchy

  • Members
  • 100 posts
  • Location:Poland
  • Projects:PRO MOD
  •  Lonely coder

Posted 25 January 2015 - 09:52 AM

Yes, but it will require much codding including lua settings.



#7 Suchar

Suchar

    Suchy

  • Members
  • 100 posts
  • Location:Poland
  • Projects:PRO MOD
  •  Lonely coder

Posted 25 January 2015 - 01:43 PM

You shold add something like that to galadriel:

	Behavior = DoCommandUpgrade Module_DoCommandStormQueen    
		TriggeredBy = Upgrade_ToggleStormQueen 
		GetUpgradeCommandButtonName = Command_StormQueen
	End

In lua setting make Upgrade_ToggleStormQueen active on condition SPECIAL_ENEMY_NEAR, add to galadriel code:

	Behavior = SpecialEnemySenseUpdate ModuleTag_GaladrielSeesHeroes
		SpecialEnemyFilter = ANY +HERO ENEMIES
		ScanRange = 30
		ScanInterval = 2000
	End

The magic is in the lua settings, if you want I will post this code, but in next week, when I will have more time



#8 Malhakai

Malhakai
  • Members
  • 34 posts

Posted 27 January 2015 - 07:01 AM

Ah I see, if you have the time that would be greatly appreciated thank-you  :thumbsuphappy:



#9 Suchar

Suchar

    Suchy

  • Members
  • 100 posts
  • Location:Poland
  • Projects:PRO MOD
  •  Lonely coder

Posted 02 February 2015 - 10:02 AM

Ok. "scriptevents.xml":

Find "galadrielfunctions", and change this code to:

    <EventList Name="GaladrielFunctions" Inherit="BaseScriptFunctions">
		<EventHandler EventName="BeScary" ScriptFunctionName="RadiateTerrorEx" DebugSingleStep="false"/>
		<EventHandler EventName="OnEnemyNear" ScriptFunctionName="ToggleStormQueen" DebugSingleStep="false"/>
    </EventList>

Next, in the same file, at the begginng (where we can find modelconditionevent) add new part of code:

		<ModelConditionEvent Name="OnEnemyNear">
			<Conditions>+SPECIAL_ENEMY_NEAR</Conditions>
		</ModelConditionEvent>

Ok. "scripts.lua":

Add new functions:

function ToggleStormQueen(self)
    ObjectGrantUpgrade( self, "Upgrade_ToggleStormQueen" )
end

Ok, thats it, lua settings.

Now you should add new object upgrade in upgrades.ini - Upgrade_ToggleStormQueen,

Add this parts of code to galadriel:

	Behavior = DoCommandUpgrade Module_DoCommandStormQueen    
		TriggeredBy = Upgrade_ToggleStormQueen 
		GetUpgradeCommandButtonName = Command_StormQueen
	End

&

	Behavior = SpecialEnemySenseUpdate ModuleTag_GaladrielSeesHeroes
		SpecialEnemyFilter = ANY +HERO ENEMIES
		ScanRange = 30
		ScanInterval = 2000
	End

And if you want, you can hide "Command_StormQueen" in galadriel commandset, you can put it on 7 position.

 

This code allows galadriel to became storm queen in a time we set in power behavior (AttributeModifierDuration = 30000), when he saw enemy hero in range 30.

You should make one more thing, make new special power template to this power (instead of "SpecialAbilityGlorfindelBladeOfPurity"), and give it reload time 1.

 

Tell me, if it works ;)



#10 Malhakai

Malhakai
  • Members
  • 34 posts

Posted 03 February 2015 - 03:42 AM

Thank-you greatly for all of your assistance - unfortunately it isn't working for me though :-(

 

I've followed your directions, and rechecked them but she isn't activating it. 

 

Is there something overlooked? I've never altered anything in the Data1 file before so not sure where to look to adjust.



#11 Suchar

Suchar

    Suchy

  • Members
  • 100 posts
  • Location:Poland
  • Projects:PRO MOD
  •  Lonely coder

Posted 03 February 2015 - 07:38 AM

Post here your galadriel code, her commandset & commandbuttons, and her experiencelevel

#12 Malhakai

Malhakai
  • Members
  • 34 posts

Posted 03 February 2015 - 08:59 AM

I haven't done anything to her commandbuttons, but she had SpecialAbilityGlorfindelBladeOfPurity before I hid it as you suggested in slot 7. Here is her commandset/experiencelevel/code
 
 
CommandSet GaladrielCommandSet
1 = Command_ToggleStance
// 2 = Command_NaturesWrath
2   = Command_ElrondFakeLeadership
3 = Command_SpecialAbilityPhialOfGaladriel
;4 = Command_SpecialPowerSpawnTornado
7 = Command_SpecialAbilityGlorfindelBladeOfPurity
13 = Command_AttackMove
14 = Command_Stop
16   = Command_SetStanceBattle
17   = Command_SetStanceAggressive
18   = Command_SetStanceHoldGround
End
 
;----------- Galadriel ------------------
ExperienceLevel ElvenGaladriel
TargetNames = ElvenGaladriel
RequiredExperience = GALADRIEL_LVL10_EXP_NEEDED
ExperienceAward = GALADRIEL_LVL10_EXP_AWARD
Rank = 10
Upgrades = Upgrade_ObjectLevel10
Upgrades = Upgrade_ElrondLeadership Upgrade_SpecialAbilityPhialOfGaladriel Upgrade_GlorfindelBladeOfPurity
 
;------------------------------------------------------------------------------
;
; Galadriel.ini
;
;------------------------------------------------------------------------------
 
; Galadriel
Object ElvenGaladriel
; *** ART Parameters ***
 
SelectPortrait = HPGaladriel
ButtonImage = HIGaladriel
 
Draw = W3DScriptedModelDraw ModuleTag_DRAW
 
   StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD
 
 OkToChangeModelColor = Yes
 
 
DefaultModelConditionState
Model               = EUGaldrlGd_SKN
 
End
 
ModelConditionState = USER_1 ; hero version.
Model               = EUGaldrl_SKN
ParticleSysBone = B_PELVIS GaladAura FollowBone:YES ;Kai, this is trying out
ParticleSysBone = B_PELVIS GaladAura02 FollowBone:YES ;Kai, this is trying out
End
 
; --- Idle Anims
 
IdleAnimationState
Animation = IDLB
AnimationName = EUGaldrl_SKL.EUGaldrl_IDLB
AnimationMode = ONCE
AnimationPriority   = 20
End
Animation = IDLC
AnimationName = EUGaldrl_SKL.EUGaldrl_IDLC
AnimationMode = ONCE
AnimationPriority   = 1
End
Animation = IDLD
AnimationName = EUGaldrl_SKL.EUGaldrl_IDLD
AnimationMode = ONCE
AnimationPriority   = 1
End
StateName = Idle
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "Selected" then CurDrawableSetTransitionAnimState("TRANS_Selected_To_Idle") end
EndScript
 
End
 
AnimationState        = STUNNED_FLAILING 
Flags               = RANDOMSTART
Animation           = EUGaldrl_FLYA
AnimationName     = EUGaldrl_SKL.EUGaldrl_FLYA
AnimationMode     = LOOP
End
End
 
; --- Dying anims
AnimationState        = DYING SPLATTED
Animation           = EUGaldrl_LNDA
AnimationName     = RUEwnHrHrs_SKL.RUEwnHrHrs_LNDA
AnimationMode     = ONCE
End
End
AnimationState        = DYING AFLAME
Animation = DieAflame
AnimationName       = EUGaldrl_SKL.EUGaldrl_FLYA
AnimationMode       = LOOP
End
End
AnimationState        = DYING
Animation           = EUGaldrl_DTHA
AnimationName     = EUGaldrl_SKL.EUGaldrl_DTHA
AnimationMode     = ONCE
End
;ParticleSysBone = NONE GaladrielDying
ParticleSysBone = NONE UltraInitial01
ParticleSysBone = NONE UltraInitial02
ParticleSysBone = NONE UltraInitial03
End
 
 
; --- Stunned anims
AnimationState        = STUNNED_STANDING_UP
Animation           = EUGaldrl_GTPA
AnimationName     = EUGaldrl_SKL.EUGaldrl_GTPA
AnimationMode     = ONCE
AnimationSpeedFactorRange = 1.3 1.3
End
End
AnimationState        = STUNNED 
Animation           = EUGaldrl_LNDA
AnimationName     = EUGaldrl_SKL.EUGaldrl_LNDA
AnimationMode     = ONCE
End
End
 
; --- Moving anims
; --- Moving Anims
AnimationState        = MOVING WANDER WEAPONSTATE_CLOSE_RANGE
StateName           = WithSword
Animation           = EUGaldrl_WLKA
AnimationName     = EUGaldrl_SKL.EUGaldrl_RUNB
AnimationMode     = LOOP
End
End
AnimationState        = MOVING WANDER
Animation           = EUGaldrl_WLKA
AnimationName     = EUGaldrl_SKL.EUGaldrl_RUNB
AnimationMode     = LOOP
End
End
 
AnimationState        = MOVING FIRING_OR_PREATTACK_A
ShareAnimation = Yes
Animation           = RunAndFire
AnimationName       = EUGaldrl_SKL.EUGaldrl_ATKA
AnimationMode       = LOOP
End
Flags               = RANDOMSTART  
End
 
AnimationState = USER_2 ; TerribleFury
Animation
AnimationName = EUGaldrl_SKL.EUGaldrl_SPCB
AnimationMode = ONCE
End
FXEvent = Frame:5 Name:FX_GaladrielTerribleFuryFearBlast
End
 
AnimationState        = MOVING
Flags               = RANDOMSTART
Animation           = EUGaldrl_RUNB
AnimationName     = EUGaldrl_SKL.EUGaldrl_RUNA
AnimationMode     = LOOP
End
End
 
; --- Attacking Anims
AnimationState        = FIRING_OR_PREATTACK_A WEAPONSTATE_CLOSE_RANGE
StateName = WithSword
Animation = ATKA
AnimationName = EUGaldrl_SKL.EUGaldrl_ATKA
AnimationMode = ONCE
UseWeaponTiming = Yes
End
Animation = ATKB
AnimationName = EUGaldrl_SKL.EUGaldrl_ATKB
AnimationMode = ONCE
UseWeaponTiming = Yes
End
;Animation = ATKB
;AnimationName = EUGaldrl_SKL.EUGaldrl_ATKC
;AnimationMode = ONCE
;UseWeaponTiming = Yes
;End
End
 
AnimationState        = FIRING_OR_PREATTACK_A
Animation = ATKA
AnimationName = EUGaldrl_SKL.EUGaldrl_ATKA
AnimationMode = ONCE
UseWeaponTiming = Yes
End
Animation = ATKB
AnimationName = EUGaldrl_SKL.EUGaldrl_ATKB
AnimationMode = ONCE
UseWeaponTiming = Yes
End
;Animation = ATKB
;AnimationName = EUGaldrl_SKL.EUGaldrl_ATKC
;AnimationMode = ONCE
;UseWeaponTiming = Yes
;End
End
 
AnimationState        = ATTACKING
Animation           = ALERT_1
AnimationName     = EUGaldrl_SKL.EUGaldrl_IDLA
AnimationMode     = LOOP; ONCE
End
End
 
AnimationState        = RAISING_FLAG
Animation
AnimationName     = EUGaldrl_SKL.EUGaldrl_CHRA
AnimationMode     = LOOP
End
End
 
AnimationState = SELECTED
StateName = Selected
SimilarRestart =   Yes
Animation = ATNB
AnimationName = EUGaldrl_SKL.EUGaldrl_ATNB
AnimationMode = LOOP
End
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "Idle" then CurDrawableSetTransitionAnimState("TRANS_Idle_to_Selected") end
EndScript
End
 
AnimationState = LEVELED
Animation = Hit_Level_1_a
AnimationName = EUGaldrl_SKL.EUGaldrl_LVLA
AnimationMode = ONCE
End
End
 
; --- Click and Hit Reactions
AnimationState = HIT_REACTION HIT_LEVEL_1
Animation = Hit_Level_1_a
AnimationName = EUGaldrl_SKL.EUGaldrl_HITA
AnimationMode = ONCE
End
End
 
 
 
;;====== CELEBRATING
 
AnimationState = EMOTION_CELEBRATING
StateName = STATE_Emotion_Sword
Animation = Sword
AnimationName = EUGaldrl_SKL.EUGaldrl_CHRA
AnimationMode = ONCE
End
Flags = MAINTAIN_FRAME_ACROSS_STATES RESTART_ANIM_WHEN_COMPLETE
End
 
 
;;====== TAUNTING
 
AnimationState = EMOTION_TAUNTING
StateName = STATE_Emotion_Sword
Animation = Sword
AnimationName = EUGaldrl_SKL.EUGaldrl_CHRA
AnimationMode = ONCE
End
Flags = RESTART_ANIM_WHEN_COMPLETE ;MAINTAIN_FRAME_ACROSS_STATES
End
 
 
; --- Selected Anims and Transitions
TransitionState = TRANS_Idle_to_Selected
Animation = ATND
AnimationName = EUGaldrl_SKL.EUGaldrl_ATNA
AnimationMode = ONCE
End
End
 
TransitionState = TRANS_Selected_To_Idle
Animation = ATNE
AnimationName = EUGaldrl_SKL.EUGaldrl_ATNC
AnimationMode = ONCE
End
End
 
 
 
 
 
End
 
; ***DESIGN parameters ***
Side = Elves
EditorSorting = UNIT
ThreatLevel = GALADRIEL_THREAT_LEVEL
ThingClass = CHARACTER_UNIT
 
TransportSlotCount = TRANSPORTSLOTCOUNT_HERO
WeaponSet
Conditions = None 
Weapon = PRIMARY    GaladrielSword ; a magical sword
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
End
ArmorSet
Conditions      = None
Armor           = GaladrielArmor
DamageFX        = NormalDamageFX
End
VisionRange = VISION_HERO_STANDARD
ShroudClearingRange = SHROUD_CLEAR_HERO
BountyValue = ELVEN_GALADRIEL_BOUNTY_VALUE
RecruitText = CONTROLBAR:GaladrielRecruit
ReviveText = CONTROLBAR:GaladrielRevive
Hotkey = CONTROLBAR:GaladrielHotkey
DisplayName = OBJECT:ElvenGaladriel
; CrushableLevel = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
CrusherLevel = 0
CommandSet = GaladrielCommandSet
CommandPoints = 0
 
 
; *** AUDIO Parameters ***;
 
;VoiceAmbushed = YeomanArcherVoiceAmbushed
VoiceAttack = GaladrielVoiceAttack
VoiceAttackAir = GaladrielVoiceAttack
VoiceAttackCharge = GaladrielVoiceAttack
VoiceAttackMachine = GaladrielVoiceAttack
VoiceAttackStructure = GaladrielVoiceAttackBuilding
VoiceCreated = GaladrielVoiceSalute
VoiceFullyCreated = GaladrielVoiceSalute
VoiceFear = GaladrielVoiceHelpMe
VoiceGuard = GaladrielVoiceMove
VoiceMove = GaladrielVoiceMove
VoiceMoveToCamp = GaladrielVoiceMove
VoicePriority = 98
VoiceSelect = GaladrielVoiceSelect
VoiceSelectBattle   = GaladrielVoiceSelectBattle
 
SoundImpact = ImpactHorse
 
UnitSpecificSounds
VoiceEnterUnitElvenTransportShip = GaladrielVoiceMove
VoiceGarrison = GaladrielVoiceMove
VoiceInitiateCaptureBuilding = GaladrielVoiceCaptureBuilding ; From SpecialPower SpecialAbilityCaptureBuilding
End
 
ClientBehavior = AnimationSoundClientBehavior ModuleTag_AnimAudioBehavior
MaxUpdateRangeCap = 800
AnimationSound = Sound:BodyFallGenericNoArmor Animation:EUGALDRL_SKL.EUGALDRL_LNDA Frames:6
AnimationSound = Sound:BodyFallGenericNoArmor Animation:EUGALDRL_SKL.EUGALDRL_DTHA Frames:15 ;fall to knees first
End
 
    #include "..\..\..\includes\StandardUnitEvaEvents.inc"
EvaEventDieOwner = GaladrielDie ;Eva event to trigger on unit's death. NOTICE THAT this is only for permanent deaths
 
    ; Warn the player when the enemy gets Galadriel. Override the normal sighting event from StandardUnitEvaEvents.inc
EvaEnemyObjectSightedEvent = EnemyGaladrielSeen
 
ClientUpdate = EvaAnnounceClientCreate ModuleTag_CreateAnnounce
AnnouncementEventEnemy = EnemyGaladrielSeen
AnnouncementEventAlly = None
AnnouncementEventOwner = None
 
OnlyIfVisible = Yes ; Don't announce if hidden in the shroud
CountAsFirstSightedAnnoucement = Yes ; Don't re-annouce if going into shroud & back
UseObjectsPosition = No ; Play from central Fortress, not at Galadriel's position
CreateFakeRadarEvent = Yes ; Allow player to jump to Galadriel after hearing annoucement
End
 
; *** ENGINEERING Parameters ***
 
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS INFANTRY PATH_THROUGH_EACH_OTHER SCORE HERO HEAVY_MELEE_HITTER
BuildCost = GALADRIEL_BUILDCOST
BuildTime = GALADRIEL_BUILDTIME
ShockwaveResistance = SHOCKWAVE_RESISTANCE_ALWAYS
 
Body = RespawnBody ModuleTag_RespawnBody
CheerRadius = EMOTION_CHEER_RADIUS
MaxHealth = GALADRIEL_HEALTH; balance
PermanentlyKilledByFilter = NONE
    DodgePercent  = HERO_DODGE_PERCENT
End
Behavior = RespawnUpdate ModuleTag_RespawnUpdate
DeathAnim = DYING
DeathFX = FX_HeroDieToRespawn
DeathAnimationTime = 4000
InitialSpawnFX = FX_HeroInitialSpawn
RespawnAnim = LEVELED
RespawnFX = FX_HeroRespawn
RespawnAnimationTime = 2000
AutoRespawnAtObjectFilter = NONE +CASTLE_KEEP
ButtonImage = HIGaladriel
 
;RespawnEntries determine the ruleset for how a character can be revived. Some units may automatically respawn, others
;may require a specific revive action performed on him. You can specify different values for each level... or use Level:Any
RespawnRules = AutoSpawn:No Cost:4500 Time:160000 Health:100%;DEFAULT VALUES
 
End
 
    Behavior = AnnounceBirthAndDeathBehavior ModuleTag_AnnounceBirthAndDeathBehavior
    End
 
#include "..\..\..\includes\DefaultInvisibilityUpdate.inc"
 
Behavior = StancesBehavior ModuleTag_StancesBehavior
        StanceTemplate = Hero
    End
 
Behavior = AIUpdateInterface ModuleTag_03
AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS
MoodAttackCheckRate        = 500
   AILuaEventsList            = GaladrielFunctions
End
 
Behavior = DoCommandUpgrade Module_DoCommandStormQueen    
TriggeredBy = Upgrade_ToggleStormQueen 
GetUpgradeCommandButtonName = Command_StormQueen
End
 
Behavior = SpecialEnemySenseUpdate ModuleTag_GaladrielSeesHeroes
SpecialEnemyFilter = ANY +HERO ENEMIES
ScanRange = 30
ScanInterval = 2000
End
 
 
LocomotorSet
Locomotor = HeroHumanLocomotor
Condition = SET_NORMAL 
Speed     = NORMAL_ELVEN_FAST_MEMBER_SPEED
End
 
; ===== Galadriel Power --------------------------------------------------------------------------------
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_GaladrielPowerEnabler
SpecialPowerTemplate = SpecialAbilityGlorfindelBladeOfPurity
TriggeredBy = Upgrade_GlorfindelBladeOfPurity
End
  Behavior = SpecialPowerModule ModuleTag_GaladrielPowerStarter
SpecialPowerTemplate = SpecialAbilityGlorfindelBladeOfPurity
StartsPaused = Yes
SetModelCondition = ModelConditionState:USER_1
SetModelConditionTime = 20.0
End
Behavior = SpecialAbilityUpdate ModuleTag_GaladrielPowerUpdate
SpecialPowerTemplate = SpecialAbilityGlorfindelBladeOfPurity
TriggerAttributeModifier = GlorfindelBladeOfPurity
AttributeModifierDuration = 30000
End
Behavior = AutoAbilityBehavior ModuleTag_GaladrielPowerAutoAbility
SpecialAbility = SpecialAbilityGlorfindelBladeOfPurity
MaxScanRange = 200
Query = 1 ALL ENEMIES
End
 
 
 
 
 ; Leadership ---------------------------------------------------------------------------------------------------------------------
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_TheodenLeadership
SpecialPowerTemplate = SpecialAbilityFakeLeadership
TriggeredBy = Upgrade_ElrondLeadership
End
 
Behavior = SpecialPowerModule ModuleTag_TheodenLeadershipUpdate   
SpecialPowerTemplate      = SpecialAbilityFakeLeadership
UpdateModuleStartsAttack  = No
StartsPaused = No
End
Behavior = AttributeModifierAuraUpdate ModuleTag_Leadership
StartsActive = No
BonusName = GenericHeroLeadership
TriggeredBy = Upgrade_ElrondLeadership
RefreshDelay = 2000
Range = 200
AntiCategory = BUFF
ObjectFilter = GENERIC_BUFF_RECIPIENT_OBJECT_FILTER
End
 
Behavior = SpecialPowerModule ModuleTag_PhialStarter                      
SpecialPowerTemplate = SpecialAbilityPhialOfGaladriel
UpdateModuleStartsAttack = Yes
TriggerFX = FX_PhialOfGaladriel ;this works but there's too much of a delay
InitiateSound = PhialOn ;this doesn't work
End
 
Behavior = ModelConditionSpecialAbilityUpdate ModuleTag_PhialUpdate   
SpecialPowerTemplate    = SpecialAbilityPhialOfGaladriel
UnpackingVariation = 1
 
UnpackTime              = 2000 ; Drawing the horn
PreparationTime         = 1   ; nothing
PersistentPrepTime      = 600 ; Blowing
PackTime                = 2666 ; Putting horn away
 
GenerateTerror = Yes
GenerateUncontrollableFear = Yes
EmotionPulseRadius = 75
 
AwardXPForTriggering    = 0
DisableWhenWearingTheRing = Yes
End
 
 
 
;--------------------------------------------------------------------------------------------
;//-------------------------Dain's Stubborn Pride--------------------------------------
;--------------------------------------------------------------------------------------------
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_StubbornPrideUnpause
SpecialPowerTemplate = SpecialAbilityDainStubbornPride
TriggeredBy = Upgrade_DainStubbornPride
End
 
Behavior = SpecialPowerModule ModuleTag_StubbornPrideSpecialPower
SpecialPowerTemplate = SpecialAbilityDainStubbornPride
UpdateModuleStartsAttack = No
StartsPaused = Yes
End
 
Behavior = AttributeModifierAuraUpdate ModuleTag_StubbornPrideUpdate
StartsActive = No
BonusName = DainStubbornPride
TriggeredBy = Upgrade_DainStubbornPride
RefreshDelay = 2000
Range = 200
ObjectFilter = ANY +INFANTRY +CAVALRY -STRUCTURE -BASE_FOUNDATION -HERO -DOZER ALLIES
End
 
Behavior = PhysicsBehavior ModuleTag_04
GravityMult = 1.0
End
 
Behavior = SlowDeathBehavior ModuleTag_05
DeathTypes = ALL 
SinkDelay = 5000
SinkRate = 10.0     ; in Dist/Sec - fast!
DestructionDelay = 1800
        Sound = INITIAL GaladrielVoiceDie
        Weapon = FINAL RingHeroDeathShockwave
End
 
Behavior = SquishCollide ModuleTag_06
;nothing
End
 
; Tie into LargeGroupAudio system
Behavior = LargeGroupAudioUpdate ModuleTag_LGAU
Key = Hero
End
 
Behavior = HitReactionBehavior HitReactionBehaviorModuleTag
HitReactionLifeTimer1 = 7 ; level 1 (light  damage)  hit reaction animations in frames (5 per sec)
HitReactionLifeTimer2 = 15 ; level 2 (medium damage)  hit reaction animations in frames (5 per sec)
HitReactionLifeTimer3 = 10 ; level 3 (heavy  damage)  hit reaction animations in frames (5 per sec)
 
HitReactionThreshold1 = 0.0   ; level 1 (light  damage) threshold trigger
HitReactionThreshold2 = 25.0  ; level 2 (medium damage) threshold trigger
HitReactionThreshold3 = 50.0  ; level 3 (heavy  damage) threshold trigger
End
 
Behavior = OCLSpecialPower ModuleTag_OCLSpawnTornado
SpecialPowerTemplate = SpecialPowerSpawnTornado
OCL = SUPERWEAPON_SpawnTornado
CreateLocation = CREATE_AT_LOCATION
AvailableAtStart = Yes
End
 
;///////////////////
; AISpecialPowers
;///////////////////
 
Behavior = AISpecialPowerUpdate GondorFighterHordeStanceBattle
CommandButtonName = Command_SetStanceBattle
SpecialPowerAIType = AI_SPECIAL_POWER_STANCEBATTLE
End
 
Behavior = AISpecialPowerUpdate GondorFighterHordeStanceAggressive
CommandButtonName = Command_SetStanceAggressive
SpecialPowerAIType = AI_SPECIAL_POWER_STANCEAGGRESSIVE
End
 
Behavior = AISpecialPowerUpdate GondorFighterHordeHoldGround
CommandButtonName = Command_SetStanceHoldGround
SpecialPowerAIType = AI_SPECIAL_POWER_STANCEHOLDGROUND
End
 
 
Behavior = AISpecialPowerUpdate SpawnTornadoAI
CommandButtonName = Command_SpecialPowerSpawnTornado
SpecialPowerAIType = AI_SPECIAL_POWER_TARGETAOE_SUMMON
SpecialPowerRadius = 30.0
End
 
Behavior = AISpecialPowerUpdate TerribleFuryAI
CommandButtonName = Command_SpecialAbilityTerribleFury
SpecialPowerAIType = AI_SPECIAL_POWER_BASIC_SELF_BUFF
End
 
Geometry = CYLINDER
GeometryMajorRadius = 8.0
GeometryHeight = 19.2
GeometryIsSmall = Yes
 
Shadow = SHADOW_DECAL
ShadowSizeX = 12
ShadowSizeY = 12
ShadowTexture = ShadowI
End
 
ChildObject ElvenGaladriel_RingHero ElvenGaladriel
 
; Player no longer has the ring hero upgrade when the hero is created.
Behavior = RemoveUpgradeUpgrade ModuleTag_RemoveRing
TriggeredBy = Upgrade_MenFaction Upgrade_ElfFaction Upgrade_DwarfFaction
UpgradeToRemove = Upgrade_RingHero Upgrade_FortressRingHero
RemoveFromAllPlayerObjects = Yes
SuppressEvaEventForRemoval = Yes ; this is to avoid the Eva event about 'Gollum stole our ring'
                                ; when we are actually losing the upgrade because we built the ring heroine
End
 
; Spawn a dropped ring object.
Behavior = CreateObjectDie ModuleTag_DropTheRing
CreationList = OCL_TheOneRing
End
 
Behavior = ExperienceLevelCreate ModuleTag_LevelBonus
LevelToGrant = 10
MPOnly = No
End
 
;------- TERRIBLE FURY -------------------------------------------------------------------------------------
Behavior = SpecialPowerModule ModuleTag_GaladrielTerribleFury
SpecialPowerTemplate = SpecialAbilityScreech
UpdateModuleStartsAttack = Yes
;InitiateSound = GaladrielTerribleFurySFX ;this didn't work
SetModelCondition = ModelConditionState:USER_2
SetModelConditionTime = 3.2
DisableDuringAnimDuration = Yes
End
Behavior = SpecialAbilityUpdate ModuleTag_GaladrielTerribleFuryUpdate  
SpecialPowerTemplate = SpecialAbilityScreech
UnpackTime = 1
AwardXPForTriggering = 0
TriggerSound = GaladrielVoiceTerribleFury
EffectRange = 200
UnpackTime = 100
PreparationTime = 1
PackTime = 3000
End
 
 
Behavior = ModelConditionUpgrade ModulTag_RingHeroMC
TriggeredBy = Upgrade_ObjectLevel1
AddConditionFlags = USER_1
End
 
Behavior = AutoHealBehavior ModuleTag_AutoHeal
StartsActive = Yes
HealingAmount = HERO_HEAL_AMOUNT
HealingDelay = 1000
StartHealingDelay = HERO_HEAL_DELAY
HealOnlyIfNotInCombat = Yes
End
 
 
  ; Leadership ---------------------------------------------------------------------------------------------------------------------
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_TheodenLeadership
SpecialPowerTemplate = SpecialAbilityFakeLeadership
TriggeredBy = Upgrade_ElrondLeadership
End
 
Behavior = SpecialPowerModule ModuleTag_TheodenLeadershipUpdate   
SpecialPowerTemplate      = SpecialAbilityFakeLeadership
UpdateModuleStartsAttack  = No
StartsPaused = No
End
Behavior = AttributeModifierAuraUpdate ModuleTag_Leadership
StartsActive = No
BonusName = GenericHeroLeadership
TriggeredBy = Upgrade_ElrondLeadership
RefreshDelay = 2000
Range = 200
AntiCategory = BUFF
ObjectFilter = GENERIC_BUFF_RECIPIENT_OBJECT_FILTER
End
 
 
 
 
Behavior = DoCommandUpgrade Module_DoCommandStormQueen    
TriggeredBy = Upgrade_ToggleStormQueen 
GetUpgradeCommandButtonName = Command_StormQueen
End
 
Behavior = SpecialEnemySenseUpdate ModuleTag_GaladrielSeesHeroes
SpecialEnemyFilter = ANY +HERO ENEMIES
ScanRange = 30
ScanInterval = 2000
End
 
End
 
 
LevelUpFx = FX:GandalfLevelUp1FX
SelectionDecal
Texture = decal_hero_good
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
End
 


#13 Suchar

Suchar

    Suchy

  • Members
  • 100 posts
  • Location:Poland
  • Projects:PRO MOD
  •  Lonely coder

Posted 03 February 2015 - 12:20 PM

Add new command button, "Command_StormQueen" instead of "Command_SpecialAbilityGlorfindelBladeOfPurity".

Replace them in Galadriel commandset. A new command should looks like:

CommandButton Command_StormQueen
	Command			= SPECIAL_POWER
	SpecialPower		= SpecialAbilityGlorfindelBladeOfPurity
	TextLabel		= CONTROLBAR:GlorfindelBladeOfPurity
	DescriptLabel		= CONTROLBAR:ToolTipGlorfindelBladeOfPurity
	ButtonImage		= HIGaladriel
	ButtonBorderType	= ACTION
	InPalantir		= Yes
	AutoAbility		= Yes
	AutoDelay		= 30.0 ; this should sync with the Glorfindel's hero mode effect time
	UnitSpecificSound	= GlorfindelBladeOfPurityMS
End

It should works now ;)



#14 Malhakai

Malhakai
  • Members
  • 34 posts

Posted 03 February 2015 - 10:15 PM

I must be doing something incorrectly, as it isn't activating. Tested it several times, one time when she was hurt I told her to retreat and she used her ability (as I had it on slot 7) but all other times she won't use it. I moved it to slot 6 so I could observe the skill - it does have a cool down, however when it is available she won't use it at all now. 

 

I can manually activate the skill, but we were ideally making her activate it herself. Sorry to be an inconvenience - still have a lot to learn :-)



#15 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 03 February 2015 - 11:10 PM

the best way would be to give her the look first .

check frodo's codes for the way sting glows when near enemies .

its all the codes using specialsense enemy update modules

 

adjust the model condition modules to show the glowing galadriel 

once this works flawlessly work on the weapon

 

if this is an ability she starts with its easy 

just add a damage module to increase the damage to ALL ENEMY HERO

 

DamageScalar  =  400% NONE +HERO

 

She now can transform and dish out increased damage to heroes

 

if you want this activated at say level 3 its also doable but requires more coding

just get the visual part working for now .

I suggest using a new object e,g. GaladrielHero1 copying all the necc codes and exp levels 

as its easier to troubleshoot code issues

 

PS This is quite a nice code idea 



#16 Suchar

Suchar

    Suchy

  • Members
  • 100 posts
  • Location:Poland
  • Projects:PRO MOD
  •  Lonely coder

Posted 04 February 2015 - 10:55 AM

the best way would be to give her the look first .

check frodo's codes for the way sting glows when near enemies .

its all the codes using specialsense enemy update modules

 

adjust the model condition modules to show the glowing galadriel 

once this works flawlessly work on the weapon

 

if this is an ability she starts with its easy 

just add a damage module to increase the damage to ALL ENEMY HERO

 

DamageScalar  =  400% NONE +HERO

 

She now can transform and dish out increased damage to heroes

 

if you want this activated at say level 3 its also doable but requires more coding

just get the visual part working for now .

I suggest using a new object e,g. GaladrielHero1 copying all the necc codes and exp levels 

as its easier to troubleshoot code issues

 

PS This is quite a nice code idea 

 

This is what I scripted to him ;)

 

Try to increase the range of galadriel shearching heroes:

	Behavior = SpecialEnemySenseUpdate ModuleTag_GaladrielSeesHeroes
		SpecialEnemyFilter = ANY +HERO ENEMIES
		ScanRange = 200
		ScanInterval = 2000
	End

Or something like this ;)

She will use her ability only when she will see enemy hero in range "ScanRange = "



#17 Malhakai

Malhakai
  • Members
  • 34 posts

Posted 07 February 2015 - 11:58 PM

Okay I've increased the range, which is working - but again only the once for some reason. She saw Saruman from 200 distance, used her ability which worked great! But then would never use it again, against any enemy hero. I still have it on the visible 6 skills, so I can see it has no cooldown, and I can personally click it to activate, just she won't activate it again after using it once.

 

Ideas?



#18 Malhakai

Malhakai
  • Members
  • 34 posts

Posted 08 February 2015 - 06:32 AM

Another idea I had - while changing some things around in Gandalf's.ini I came across the below, which seemed to illuminate Gandalf when I tested it...

 

 

; Draw = W3DLightDraw ModuleTag_DrawLight 
; Ambient = R:25 G:25 B:25
; Diffuse = R:128 G:128 B:175
; Radius = 75
; Intensity = 75
; AttachToBoneInAnotherModule = STAFF
; End
 
 
Would it be possible to add this to Galadriel when she turns StormQueen? Wasn't 100% sure where to place this so it only affected her in StormQueen form, not regular form.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users