Jump to content


Photo

Special Ability Ignore triggered by


Best Answer Echo, 22 July 2020 - 03:54 PM

It has been a while, but this works for me. It's available on level 6. The issue here is that he does not grant any experience when he dies..

    Body = DelayedDeathBody ModuleTag_DelayedDeathBody
        MaxHealth                = LOT3A_BOROMIR_HEALTH ;BALANCE CaveTroll Health
        MaxHealthDamaged            = LOT3A_BOROMIR_HEALTH
        MaxHealthReallyDamaged            = LOT3A_BOROMIR_RAMPAGE_TRIGGER_HEALTH
        DoHealthCheck                = Yes            ; Don't want to get the delayed death behaviour when we die normally.
        DelayedDeathTime            = 15000 ; Amount of time spent still fighting after being killed
        DelayedDeathPrerequisiteUpgrade        = Upgrade_Level6    ; Need this upgrade to be able to delay my death.
        InvulnerableFX                = FX_BoromirLastStand
        ;CanRespawn                = No            ; Unit can't get revived.
    End
    Behavior = LifetimeUpdate ModuleTag_LifeTime            ; Used after 'death' to continue for a certain time before really dying.
        WaitForWakeUp = Yes
    End

About this one, I am not sure, but it might be worth trying:

    Behavior = AIUpdateInterface ModuleTag_03
        AutoAcquireEnemiesWhenIdle    = Yes ATTACK_BUILDINGS
        MoodAttackCheckRate            = 500
        AILuaEventsList                = BoromirFunctions
        RampageTime                = 14800 ;20000 ; Set the amount of time to delay death here
    End
Go to the full post


  • Please log in to reply
7 replies to this topic

#1 amit5530

amit5530
  • Members
  • 114 posts
  • Location:Israel

Posted 18 July 2020 - 02:41 PM

Hello everyone, once again i am in need of help.

 

for some reason my ability acting strange, it is ignoring its demand to activate only when the upgrade is hit

 

I am trying to make Boromir enter the last stand state only once he reached level 3.

 

all is working well beside he enter the state from level 1.

 

here's some code:

boromir.ini:

		AnimationState				= WEAPONSET_RAMPAGE
			StateName 		= LastStand
			Animation           = ATTACK_A
				AnimationName     = GUBoromir_SKL.GUBoromir_SPCB
				AnimationMode     = ONCE
			End

			Animation           = ATTACK_B
				AnimationName    = GUBoromir_SKL.GUBoromir_SPCC
				AnimationMode     = ONCE
			End
		End

this is the animations.

 

here's the WeaponSet code for the RAMPAGE State:

	WeaponSet
		Conditions		= RAMPAGE
		Weapon			= PRIMARY    BoromirSword
	End

I have tested it before with different weapon(one that fly the enemies upon hitting them so i know its working)

 

the DelayDeathBody:

	Body = DelayedDeathBody ModuleTag_DelayedDeathBody ;DelayedDeath is a variation of RespawnBody
		CheerRadius 				= EMOTION_CHEER_RADIUS
		MaxHealth				= 400		; BALANCE                    
		MaxHealthDamaged			= 150
		MaxHealthReallyDamaged			= 100
		DoHealthCheck				= Yes			; Dont want to get the delayed death behaviour when we die normally
		DelayedDeathTime			= 10000	                ; Amount of time spent still fighting after being killed
		DelayedDeathPrerequisiteUpgrade	= Upgrade_BoromirLastStand	; Need this upgrade to be able to delay my death
		InvulnerableFX				= FX_BoromirLastStand
		PermanentlyKilledByFilter		= NONE		;Who kills me permanently?
  		DodgePercent      			= HERO_DODGE_PERCENT	
		ImmortalUntilDeathTime        = No  		
	End 

if i put DoHealthCheck = No as it is in the troll's ini, boromir never die.

 

the line:

        DelayedDeathPrerequisiteUpgrade    = Upgrade_BoromirLastStand

 

this is where the delayed death should be active only upon hitting that upgrade, but it ignores it.

 

The Respawn behavior, i removed from the code snippet the Respawn rules so the code would be shorter for you guys:

	Behavior = RespawnUpdate ModuleTag_RespawnUpdate
;		DeathAnim				= STUNNED				;Model condition to play when killed-to-respawn
		DeathAnim				= DYING  				;Model condition to play when killed-to-respawn
		DeathFX				= FX_BoromirDieToRespawn	;FXList to play when killed-to-respawn
		DeathAnimationTime		= 4966 ;1133			;How long DeathAnim will take.
		InitialSpawnFX			= FX_BoromirInitialSpawn
		RespawnAnim				= LEVELED				;Animation to play when respawning.
		RespawnFX				= FX_BoromirRespawn		;FXList to play when respawning.
		RespawnAnimationTime		= 2000				;Time it takes for respawn to play.
		AutoRespawnAtObjectFilter	= NONE +CASTLE_KEEP		;Respawn at this location -- and at it's exit production point if possible.
		ButtonImage				= HIBorimir		
	End

here's the ability behavior in boromir's ini:

;;;===================================================================================
;;;=============================Boromir Last Stand ===================================
;;;===================================================================================
    Behavior = UnpauseSpecialPowerUpgrade ModuleTag_BoromirLastStand
        SpecialPowerTemplate = SpecialAbilityFakeLeadership2
        TriggeredBy = Upgrade_BoromirLastStand
    End


    Behavior = SpecialPowerModule ModuleTag_BoromirLastStandUpdate   
        SpecialPowerTemplate      = SpecialAbilityFakeLeadership2
        UpdateModuleStartsAttack  = No
        StartsPaused = Yes
    End 
	

I have created a Button to see if something triggers Upgrade_BoromirLastStand

 

commandbutton.ini:

CommandButton Command_SpecialAbilityBoromirLastStand
  Command					= SPECIAL_POWER
  SpecialPower				= SpecialAbilityFakeLeadership2
  Options					= NONPRESSABLE
  TextLabel               = CONTROLBAR:LastStand
  ButtonImage             = HSBorimirLastStand
  RadiusCursorType			= TRAINING
  ButtonBorderType			= ACTION
  DescriptLabel           = CONTROLBAR:ToolTipLastStand
  InPalantir				= Yes
End

the icon's turn visible at level 3, as it should.

 

the experiencelevel.ini:

;----------- BOROMIR ------------------	
ExperienceLevel	BoromirLevel3
	TargetNames						=	GondorBoromir	
	RequiredExperience					=	BOROMIR_LVL3_EXP_NEEDED
	ExperienceAward						=	BOROMIR_LVL3_EXP_AWARD	
	AttributeModifiers					=	HeroLevelUpDamage2
	Rank							=	3
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Upgrades						=	Upgrade_BoromirBladeMaster Upgrade_BoromirLastStand	
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40
		MaxRadius					=	200
		MaxSelectedUnits				=	1	
	End
END

if anyone has any suggestions on why he is activating the Delayed death before receiving the upgrade I would love for some help

 

Thanks in advance guys, and have a nice day


Edited by amit5530, 18 July 2020 - 02:51 PM.


#2 Echo

Echo

    T3A:Online

  • T3A Staff
  • 1,069 posts
  • Location:Germany
  • Projects:Lot3A
  •  ~~
  • Division:BFME
  • Job:T3A Moderator
  • Donated

Posted 22 July 2020 - 03:54 PM   Best Answer

It has been a while, but this works for me. It's available on level 6. The issue here is that he does not grant any experience when he dies..

    Body = DelayedDeathBody ModuleTag_DelayedDeathBody
        MaxHealth                = LOT3A_BOROMIR_HEALTH ;BALANCE CaveTroll Health
        MaxHealthDamaged            = LOT3A_BOROMIR_HEALTH
        MaxHealthReallyDamaged            = LOT3A_BOROMIR_RAMPAGE_TRIGGER_HEALTH
        DoHealthCheck                = Yes            ; Don't want to get the delayed death behaviour when we die normally.
        DelayedDeathTime            = 15000 ; Amount of time spent still fighting after being killed
        DelayedDeathPrerequisiteUpgrade        = Upgrade_Level6    ; Need this upgrade to be able to delay my death.
        InvulnerableFX                = FX_BoromirLastStand
        ;CanRespawn                = No            ; Unit can't get revived.
    End
    Behavior = LifetimeUpdate ModuleTag_LifeTime            ; Used after 'death' to continue for a certain time before really dying.
        WaitForWakeUp = Yes
    End

About this one, I am not sure, but it might be worth trying:

    Behavior = AIUpdateInterface ModuleTag_03
        AutoAcquireEnemiesWhenIdle    = Yes ATTACK_BUILDINGS
        MoodAttackCheckRate            = 500
        AILuaEventsList                = BoromirFunctions
        RampageTime                = 14800 ;20000 ; Set the amount of time to delay death here
    End

Edited by Echo, 22 July 2020 - 03:55 PM.

26285.png


#3 amit5530

amit5530
  • Members
  • 114 posts
  • Location:Israel

Posted 23 July 2020 - 06:32 PM

Well i just tried your piece of code, and the results are semi working

 

if i put the upgrade at level 2, and boromir is dying at level 1, he never really die, after having his last stand animation he is just running around without being able to control him(and can't be killed anymore)

 

if he dies after he reached level 2, he is playing the last stand animation and die as he should.

 

any ideas on how to fix it?



#4 Echo

Echo

    T3A:Online

  • T3A Staff
  • 1,069 posts
  • Location:Germany
  • Projects:Lot3A
  •  ~~
  • Division:BFME
  • Job:T3A Moderator
  • Donated

Posted 23 July 2020 - 10:52 PM

What entries do you have in BoromirFunctions in scriptevents.xml? There should be none except for the Horn (RadiateFear). If there is something else, what is it? This is mine:

    <EventList Name="BoromirFunctions" Inherit="BaseScriptFunctions">
        <!-- This contains events specific to Boromir -->
        <EventHandler EventName="UsingSpecialOne"        ScriptFunctionName="RadiateUncontrollableFear"    DebugSingleStep="false"/>
    </EventList>

If yours looks the same, then that should not be the issue.. In that case, could you send me your Boromir.ini file so I can take a look?


26285.png


#5 amit5530

amit5530
  • Members
  • 114 posts
  • Location:Israel

Posted 24 July 2020 - 11:26 AM

I have added the Rampage Event , ill try taking it out! thank you Echo for all of your help!



#6 Echo

Echo

    T3A:Online

  • T3A Staff
  • 1,069 posts
  • Location:Germany
  • Projects:Lot3A
  •  ~~
  • Division:BFME
  • Job:T3A Moderator
  • Donated

Posted 25 July 2020 - 12:56 AM

That might be why it's not working, because lua doesn't check upgrade conditions. It just checks if the model condition (in this case REALLYDAMAGED) is on, and if yes, it will put the unit into rampage (on all levels). After removing that line, it should work. But as I said, Boromir will not grant any experience when he dies in DelayedDeath mode.. possibly the reason why EA left it out. A similar bug occurs with Gimli's FreeLifeBody (which is also a behavior that EA removed in the beta of BFME).


26285.png


#7 Miraak5

Miraak5

    title available

  • Members
  • 389 posts
  • Location:France
  • Projects:ROTWK Patch 2.02, Wars of the North, BFME1 1.08 Complete Edition
  •  BIG coding, Map scripting and AI coding

Posted 19 August 2020 - 12:10 PM

The last stand ability seems to have been designed without the regular troll rampage mechanic, personally i use a ReallyDamagedAttributeModifier to give boromir the rampage animations and also make him move slower (can also make him be immobile)

 

btw u can fix boromir not granting XP

	Behavior = LifetimeUpdate ModuleTag_LifeTime			; Used after 'death' to continue for a certain time before really dying.
		WaitForWakeUp = Yes
                ScoreKill = Yes
	End

u need to add that "ScoreKill = Yes" line in the lifetimeupdate, dunno if it also work for gimli dwarven grudge


He was the first...


#8 Echo

Echo

    T3A:Online

  • T3A Staff
  • 1,069 posts
  • Location:Germany
  • Projects:Lot3A
  •  ~~
  • Division:BFME
  • Job:T3A Moderator
  • Donated

Posted 20 August 2020 - 10:53 PM

The last stand ability seems to have been designed without the regular troll rampage mechanic, personally i use a ReallyDamagedAttributeModifier to give boromir the rampage animations and also make him move slower (can also make him be immobile)

 

btw u can fix boromir not granting XP

	Behavior = LifetimeUpdate ModuleTag_LifeTime			; Used after 'death' to continue for a certain time before really dying.
		WaitForWakeUp = Yes
                ScoreKill = Yes
	End

u need to add that "ScoreKill = Yes" line in the lifetimeupdate, dunno if it also work for gimli dwarven grudge

I did not know about this line before. If that really works then that'd be big. Will try, thanks :)


26285.png





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users