Jump to content


Photo

Horde of Legoli

hero horde legolas

  • Please log in to reply
8 replies to this topic

#1 Jasper11227

Jasper11227
  • Members
  • 9 posts

Posted 11 November 2018 - 12:46 AM

Hihi,

 

So I've been trying to make a horde of legoli (as in... the plural of legolas xD) with all the abilities working on a horde level. But when I trigger knife fighter, the horde can't attack anymore afterwards. Also, if I use hawkstrike after knife fighter the horde can attack again. If anyone wants to take a look at my code (which I attached) and tell me what Im doing wrong that would be awesome!

 

Some relevant info:

- I've based the legolashorde.ini on the noldor warriors horde.

- I put LegolasHawkStrike as a QUINARY weapon in legolas.ini and made a horde weapon trigger the QUINARY weapon (is that the right way to do it?)

- I haven't added arrow wind yet.

 

Thanks!

Attached Files



#2 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 17 November 2018 - 10:42 AM

Well your horde is missing a quinary weapon in their weaponset, this could possibly be the cause of why it isn't working :p

WeaponSet
Conditions = None 
Weapon  = PRIMARY     MirkwoodArcherMissileHordeRangefinder
Weapon  = SECONDARY NormalMeleeHordeRangefinder
Weapon  = TERTIARY MirkwoodArcherMissileHordeRangefinderBombard
AutoChooseSources = TERTIARY FROM_PLAYER FROM_SCRIPT
AutoChooseSources = SECONDARY NONE
End

 

not sure if this would work, but it's a start:

WeaponSet
Conditions = None 
Weapon  = PRIMARY     MirkwoodArcherMissileHordeRangefinder
Weapon  = SECONDARY NormalMeleeHordeRangefinder
Weapon  = TERTIARY MirkwoodArcherMissileHordeRangefinderBombard
Weapon  = QUINARY NormalMeleeHordeRangefinder
AutoChooseSources = QUINARY FROM_PLAYER FROM_SCRIPT
AutoChooseSources = TERTIARY FROM_PLAYER FROM_SCRIPT
AutoChooseSources = SECONDARY NONE
End

Ridder Geel

#3 Jasper11227

Jasper11227
  • Members
  • 9 posts

Posted 19 November 2018 - 09:25 PM

Thanks for your response! :D Sadly it doesn't work :( If I add the code you suggest, after knife fighter the horde walks up to the target and still doesn't attack. I also tried

Weapon  = QUINARY MirkwoodArcherMissileHordeRangefinder

but that seemed to have no effect whatsoever.


Edited by Jasper11227, 19 November 2018 - 09:25 PM.


#4 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 19 November 2018 - 11:02 PM

So you kept the quinary in the legolas object as well i assume? Since both the horde and the unit need to know what to do.
The horde weapon does the targeting distance wise, which sounds like it works with what i said.
Now we need to check out the weapon that the unit object has.
So does it have the other weapon and changes so that it uses quinary? :p
Oh wait, i may be making incorrect assumptions, which slot do you use for the knife fighter and which for the hawk strike?
The melee finder is for the knife fighter, obviously, and the missile one for the hawk strike.

Edited by Ridder Geel, 19 November 2018 - 11:04 PM.

Ridder Geel

#5 Jasper11227

Jasper11227
  • Members
  • 9 posts

Posted 21 November 2018 - 12:20 PM

Yeah, I left the legolas object as it was. I use the secondary slot for knife fighter and the quinary slot for hawkstrike. Aha, thats why you talked about the quinary weapon :D. The secondary unit weapon is this the standard LegolasSword weapon. If I understand it correctly, this weapon should be triggered by (this code is present in the horde code as well as the unit code)

	Behavior = WeaponModeSpecialPowerUpdate ModuleTag_KnifeFighterPowerUpdate
		SpecialPowerTemplate		= SpecialAbilityKnifeFighter
		Duration				= 20000 ;;,;; 30000
		AttributeModifier			= LegolasKnifeFighterBonus
		LockWeaponSlot			= SECONDARY
		StartsPaused			= Yes
		InitiateSound           = LegolasKnifeModeMS ;,; Added in v5.1
	End

I mean, the problem is not that knife fighter is not triggered, but that the primary weapon doesnt work anymore afterwards :D


Edited by Jasper11227, 21 November 2018 - 12:37 PM.


#6 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 21 November 2018 - 05:47 PM

Have you tried changing the knife fighter "AutoChooseSources = SECONDARY NONE" to "AutoChooseSources = SECONDARY FROM_PLAYER FROM_SCRIPT" to see if that helps?
Ridder Geel

#7 Jasper11227

Jasper11227
  • Members
  • 9 posts

Posted 21 November 2018 - 10:55 PM

I hadn't, but I have now. No luck, I am afraid  :whatoa: adding those changes results in the horde still walking up to the target and not firing (after knife fighter is over). So, it seems the horde weapon is not switched back to a missile one with these changes. My original code does switch back the horde weapon I think (since the horde doesnt walk up to a target after knife fighter), but the unit weapon is maybe not switched back (since the horde is not actually firing)? Can you think of an existing unit with a similar sort of ability?


Edited by Jasper11227, 21 November 2018 - 10:57 PM.


#8 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 22 November 2018 - 09:56 AM

I just saw this tutorial on the3rdage.net:

https://www.the3rdag...tem-529?addview

Did you look at all the information there? it seems you have the same/similar code.

Something other than the actual ability things must be messing up the behavior of the ability.

Are you sure they don't attack, and that it's not simply some animation glitch?

What does the commandbutton, commandsets and specialpower look like?

 

Let's recap the situation to make sure the behavior is what i think it is:

All works fine, the hawk strike works fine?

The Knife fighter works fine

After knife fighter the horde no longer approaches the enemy, but also not shooting at them

 

To test your theory on the weapon, id advise running into the enemy when this occurs, and see if they are able to hit them with the melee weapon.


Ridder Geel

#9 Jasper11227

Jasper11227
  • Members
  • 9 posts

Posted 22 November 2018 - 06:51 PM

Oww, I hadn't seen that tutorial. I'll take a look :D Yeah, Im sure they dont attack. The unit commandset is

CommandSet RohanLegolasCommandSet
	1	= Command_ToggleStance
	2  	= Command_LegolasHawkStrike
	3  	= Command_SpecialAbilityTrainArchersLegolas ;;,;; Command_LegolasKnifeFightingMode
	4  	= Command_LegolasKnifeFightingMode ;;,;; Command_SpecialAbilityTrainArchersLegolas ;;,;; Command_SpecialAbilityTrainArchers
	5  	= Command_SpecialAbilityArrowStorm
	7  	= Command_LegolasHawkStrike_AI ;;,;; Sûlherokhh AI bugfix - prevents ability from being used when it shouldn't be
	8  	= Command_SpecialAbilityArrowStorm_AI ;;,;; Sûlherokhh AI bugfix - prevents ability from being used when it shouldn't be
	12 	= Command_CaptureBuilding
	13 	= Command_AttackMove
	14 	= Command_Stop
	16  	= Command_SetStanceBattle
	17  	= Command_SetStanceAggressive
	18  	= Command_SetStanceHoldGround
End 

and the horde commandset is

CommandSet LegolasHordeCommandSet
	1 	= Command_ToggleStance
	2	= Command_LegolasHawkStrike
	3	= Command_LegolasKnifeFightingMode
	4	= Command_SpecialAbilityTrainArchersLegolas
	12	= Command_CaptureBuilding	
	13 	= Command_AttackMove
	14 	= Command_Stop
	16  	= Command_SetStanceBattle
	17  	= Command_SetStanceAggressive
	18  	= Command_SetStanceHoldGround
End 

Also, the relevant commandbuttons are

CommandButton Command_LegolasHawkStrike
  Command                 	= SPECIAL_POWER 
  SpecialPower            	= SpecialAbilityHawkStrike
  Options                 	= NEED_TARGET_ENEMY_OBJECT OK_FOR_MULTI_SELECT
  TextLabel               	= CONTROLBAR:HawkStrike
  ButtonImage             	= HSLegolasHawkStrike
  CursorName              	= Bombard
  InvalidCursorName       	= GenericInvalid
  ButtonBorderType        	= ACTION 
  DescriptLabel           	= CONTROLBAR:ToolTipHawkStrike
  InPalantir			= Yes
  AutoAbility			= Yes
 ; UnitSpecificSound       	= LegolasVoiceModeHawkStrike
  DisableOnModelCondition 	= WEAPONLOCK_SECONDARY					; disable if currently using swords
End 

and

CommandButton Command_LegolasKnifeFightingMode
	Command				= SPECIAL_POWER 
	SpecialPower			= SpecialAbilityKnifeFighter
	TextLabel			= CONTROLBAR:KnifeFighter
	ButtonImage			= HSLegolasKnifeFighter
	InvalidCursorName		= GenericInvalid
	ButtonBorderType		= ACTION 
	DescriptLabel			= CONTROLBAR:ToolTipKnifeFighter
	InPalantir			= Yes
	AutoAbility			= Yes
	PresetRange			= 50.0	
	UnitSpecificSound		= LegolasKnifeModeMS
End 

Finally, the special powers are

SpecialPower SpecialAbilityHawkStrike
	Enum		= SPECIAL_AT_VISIBLE_OBJECT
	ReloadTime		= 10000 ;;,;; 30000
	;InitiateSound	= LegolasHawkStrikeArrowShoot		;this plays when he fires, not when he targets
End 

and

SpecialPower SpecialAbilityKnifeFighter
	Enum				= SPECIAL_KNIFE_FIGHTER
	ReloadTime			= 90000 ;;,;; 60000
	InitiateSound		= LegolasKnifeModeMS ;,; LegolasKnifeFighter			;this didn't work
	;InitiateAtLocationSound	= LegolasKnifeFighter		;this didn't work either
End 

Hawk strike and knife fighter indeed work fine (I did tweak some timing parameters to make sure the animation is in sync with the projectile being fired) and after knife fighter the horde walks to the enemy (and stops at a distance appropriate for a ranged attack) but doesnt fire. I did the test (i.e. I walked the horde into the enemy and tried to attack) but they still dont attack (sometimes one of the units start firing with its bow), so I guess I was wrong :( But I'll take a look at that tutorial and let you know whether it got me anywhere :D thnx again!


Edited by Jasper11227, 22 November 2018 - 06:53 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users