Jump to content


Photo

New poison arrow bonus


  • Please log in to reply
3 replies to this topic

#1 theczar

theczar
  • Members
  • 20 posts

Posted 28 April 2007 - 09:47 PM

hey im trying to add a new power to the corrupted man class, a poisoned arrow bonus.

but instead of the normal magic fx, its poison, and at level 3 he can actually fire a green poison projectile based on the goblin poison arrow like the sliverthorn arrow for CAH level4 arrow bonus, . i think it would be really cool

i copied the CAH arrow bonus and based i on that, but when he recieves the upgrade i cant target enemies, and
the CAH can no longer fire arrows or use his bow

here are the codes if anybody is willing to help, or try it out


WEAPON-----------------------------

//------------------------------------------------------------------------------
Weapon CreateAHeroBasicRangedWeapon
	AttackRange			= 350				
	LeechRangeWeapon	= Yes
	WeaponSpeed			= 321		 // dist/sec 
	MinWeaponSpeed		= 241
	MaxWeaponSpeed		= 481	  // dist/sec Upper limit on scaling, when attacking past nominal "max" range
	FireFX				= FX_RohanArcherBowWeapon
	ScaleWeaponSpeed	= Yes // Used for lob weapons, scales speed proportional to range
	HitPercentage		= 100	 //When this weapon is used it will hit exactly 75% of the time.
	ScatterRadius		= 0.0	 //When this weapon misses it can randomly miss by as much as this distance.
	UseInnateAttributes	= Yes
   
	DelayBetweenShots	= FARAMIR_BOW_DELAYBETWEENSHOTS		// time between shots, msec
	PreAttackDelay		= FARAMIR_BOW_PREATTACKDELAY			 // 1467 is the prep time for archer.
	PreAttackType		= PER_POSITION
	FiringDuration		= FARAMIR_BOW_FIRINGDURATION   // Duration of the archer firing shot is 500ms.
 
	ClipSize			= 1
	AutoReloadsClip		= Yes
	AutoReloadWhenIdle	= 1	
	ClipReloadTime		= Min:1000 Max:1500
	ContinuousFireOne	= 0
	ContinuousFireCoast	= FARAMIR_BOW_RELOADTIME_MAX
   	
	AntiAirborneVehicle	= Yes
	AntiAirborneMonster	= Yes  
	
	CanFireWhileMoving		= Yes
   
	ProjectileNugget					// Default arrow
	   ProjectileTemplateName	= GoodFactionArrow
	   WarheadTemplateName		= CreateAHeroBasicRangedWarhead
	   ForbiddenUpgradeNames	= Upgrade_CreateAHeroArrowBonus_Level4 Upgrade_PoisonedArrows_Level1 Upgrade_PoisonedArrows_Level2 Upgrade_PoisonedArrows_Level3
	End
   
	ProjectileNugget					// Default arrow
	   ProjectileTemplateName	= MirkwoodArcherSilverthornProjectile
	   WarheadTemplateName		= CreateAHeroBasicRangedWarhead
	   RequiredUpgradeNames		= Upgrade_CreateAHeroArrowBonus_Level4
	End

	ProjectileNugget			// Default arrow
	   ProjectileTemplateName	= PoisonedArrowsProjectile
	   WarheadTemplateName		= CreateAHeroBasicRangedWarhead
	   RequiredUpgradeNames		= Upgrade_PoisonedArrows_Level1 Upgrade_PoisonedArrows_Level2 Upgrade_PoisonedArrows_Level3
	End
End

//----------------------------
Weapon CreateAHeroBasicRangedWarhead
	ProjectileCollidesWith = ALLIES ENEMIES NEUTRAL STRUCTURES WALLS // Remember, the projectile is a rock, who has no allies
	RadiusDamageAffects = ENEMIES NEUTRALS ALLIES NOT_SIMILAR
	HitStoredTarget = Yes	// Always hits initial target.
	UseInnateAttributes	= Yes

	//	No bonus
	DamageNugget						// A basic Nugget that just does damage
		Damage		= 80
		Radius		= 0.0	// HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
		DelayTime	 = 0
		DamageType	= HERO_RANGED
		DamageFXType  = GOOD_ARROW_PIERCE
		DeathType	 = NORMAL
		ForbiddenUpgradeNames	= Upgrade_CreateAHeroToggleWeapon_Level2 Upgrade_CreateAHeroArrowBonus_Level1 Upgrade_CreateAHeroArrowBonus_Level2 Upgrade_CreateAHeroArrowBonus_Level3 Upgrade_CreateAHeroArrowBonus_Level4 Upgrade_PoisonedArrows_Level1 Upgrade_PoisonedArrows_Level2 Upgrade_PoisonedArrows_Level3
	End

	//	Corrupted Man Level 2 Toggle Weapon Bonus
	DamageNugget
		Damage					= 120
		Radius					= 0.0
		DelayTime				= 0
		DamageType				= HERO_RANGED
		DamageFXType			= GOOD_ARROW_PIERCE
		DeathType				= NORMAL
		RequiredUpgradeNames	= Upgrade_CreateAHeroToggleWeapon_Level2
		ForbiddenUpgradeNames	= Upgrade_CreateAHeroArrowBonus_Level1 Upgrade_CreateAHeroArrowBonus_Level2 Upgrade_CreateAHeroArrowBonus_Level3 Upgrade_CreateAHeroArrowBonus_Level4 Upgrade_PoisonedArrows_Level1 Upgrade_PoisonedArrows_Level2 Upgrade_PoisonedArrows_Level3
	End

	//	Level 1 Poisoned Arrows
	DamageNugget						// A basic Nugget that just does damage
		Damage		= 80
		Radius		= 0.0	// HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
		DelayTime	 = 0
		DamageType	= HERO_RANGED
		DamageFXType  = GOOD_ARROW_PIERCE
		DeathType	 = NORMAL
		RequiredUpgradeNames	= Upgrade_PoisonedArrows_Level1
		ForbiddenUpgradeNames	= Upgrade_PoisonedArrows_Level2 Upgrade_PoisonedArrows_Level3
	End
	DamageNugget						// A basic Nugget that just does damage
		Damage		= CREATE_A_HERO_ARROW_BONUS_DAMAGE_L1
		Radius		= CREATE_A_HERO_ARROW_BONUS_RADIUS_L1	// HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
		DamageScalar  = 10% NONE +STRUCTURE 
		DelayTime	 = 0
		DamageType	= SLASH
		DamageFXType  = GOOD_ARROW_PIERCE
		DeathType	 = NORMAL
		RequiredUpgradeNames	= Upgrade_PoisonedArrows_Level1
		ForbiddenUpgradeNames	= Upgrade_PoisonedArrows_Level2 Upgrade_PoisonedArrows_Level3
	End
	DOTNugget						// A basic Nugget that just does damage
		SpecialObjectFilter = ALL -STRUCTURE
		AcceptDamageAdd		= No
		Damage		= CREATE_A_HERO_ARROW_BONUS_DAMAGE_L1
		Radius		= CREATE_A_HERO_ARROW_BONUS_RADIUS_L1	// HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody. 
		DelayTime	 = 0
		DamageType	= POISON
		DamageFXType  = POISON
		DeathType	 = NORMAL
		DamageInterval		= 500	
		DamageDuration		= 15000	
		SpecialObjectFilter	= AFFECTED_BY_POISON_OBJECTFILTER
		RequiredUpgradeNames	= Upgrade_PoisonedArrows_Level1
		ForbiddenUpgradeNames	= Upgrade_PoisonedArrows_Level2 Upgrade_PoisonedArrows_Level3
	End

	//	Level 2 Poisoned Arrows
	DamageNugget						// A basic Nugget that just does damage
		Damage		= 80
		Radius		= 0.0	// HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
		DelayTime	 = 0
		DamageType	= HERO_RANGED
		DamageFXType  = POISON
		DeathType	 = NORMAL
		RequiredUpgradeNames	= Upgrade_PoisonedArrows_Level2
		ForbiddenUpgradeNames	= Upgrade_PoisonedArrows_Level3
	End
	DamageNugget						// A basic Nugget that just does damage
		Damage		= CREATE_A_HERO_ARROW_BONUS_DAMAGE_L1
		Radius		= CREATE_A_HERO_ARROW_BONUS_RADIUS_L1	// HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
		DamageScalar  = 10% NONE +STRUCTURE 
		DelayTime	 = 0
		DamageType	= SLASH
		DamageFXType  = POISON
		DeathType	 = NORMAL
		RequiredUpgradeNames	= Upgrade_PoisonedArrows_Level2
		ForbiddenUpgradeNames	= Upgrade_PoisonedArrows_Level3
	End
	DamageNugget						// A basic Nugget that just does damage
		Damage		= CREATE_A_HERO_ARROW_BONUS_DAMAGE_L2
		Radius		= CREATE_A_HERO_ARROW_BONUS_RADIUS_L2	// HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
		DamageScalar  = 10% NONE +STRUCTURE 
		DelayTime	 = 0
		DamageType	= MAGIC
		DamageFXType  = POISON
		DeathType	 = NORMAL
		RequiredUpgradeNames	= Upgrade_PoisonedArrows_Level2
		ForbiddenUpgradeNames	= Upgrade_PoisonedArrows_Level3
	End
	DOTNugget						// A basic Nugget that just does damage
		SpecialObjectFilter = ALL -STRUCTURE
		AcceptDamageAdd		= No
		Damage		= CREATE_A_HERO_ARROW_BONUS_DAMAGE_L3
		Radius		= CREATE_A_HERO_ARROW_BONUS_RADIUS_L3	// HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
		DelayTime	 = 0
		DamageType	= POISON
		DamageFXType  = POISON
		DeathType	 = NORMAL
		DamageInterval		= 500	
		DamageDuration		= 20000	
		SpecialObjectFilter	= AFFECTED_BY_POISON_OBJECTFILTER
		RequiredUpgradeNames	= Upgrade_PoisonedArrows_Level2
		ForbiddenUpgradeNames	= Upgrade_PoisonedArrows_Level3
	End

	//	Level 3 Poisoned Arrows
	DamageNugget						// A basic Nugget that just does damage
		Damage		= CREATE_A_HERO_ARROW_BONUS_DAMAGE_L4
		Radius		= CREATE_A_HERO_ARROW_BONUS_RADIUS_L4	// HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
		DamageScalar  = 10% NONE +STRUCTURE 
		DelayTime	 = 0
		DamageType	= HERO_RANGED
		DamageFXType  = POISON
		DeathType	 = NORMAL
		RequiredUpgradeNames	= Upgrade_PoisonedArrows_Level3
	End
	DOTNugget						// A basic Nugget that just does damage
		SpecialObjectFilter = ALL -STRUCTURE
		AcceptDamageAdd		= No
		Damage		= CREATE_A_HERO_ARROW_BONUS_DAMAGE_L4
		Radius		= CREATE_A_HERO_ARROW_BONUS_RADIUS_L4	// HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody. 
		DelayTime	 = 0
		DamageType	= POISON
		DamageFXType  = POISON
		DeathType	 = NORMAL
		DamageInterval		= 500	
		DamageDuration		= 25000	
		SpecialObjectFilter	= AFFECTED_BY_POISON_OBJECTFILTER
		RequiredUpgradeNames	= Upgrade_PoisonedArrows_Level3
	End

SPECIAL POWER-----------------------------

//-----------------------------------------------------------------------------------------------------------------------------------------
// POISONED ARROWS SPECIAL POWER
//------------------------------------------------------------------------------
SpecialPower SpecialAbilityPoisonedArrows_Level1
	Enum									  =	SPECIAL_GENERAL_TARGETLESS
	ReloadTime								  =	60000
	PublicTimer								  = No
End

//------------------------------------------------------------------------------
SpecialPower SpecialAbilityPoisonedArrows_Level2
	Enum									  =	SPECIAL_GENERAL_TARGETLESS
	ReloadTime								  =	60000
	PublicTimer								  = No
End

//------------------------------------------------------------------------------
SpecialPower SpecialAbilityPoisonedArrows_Level3
	Enum									  =	SPECIAL_GENERAL_TARGETLESS
	ReloadTime								  =	60000
	PublicTimer								  = No
End

CREATEAHEROOBJECTS-----------------------------

;------------------------------------------------------------------------------
; The Poison Arrow Projectile
;------------------------------------------------------------------------------

Object PoisonedArrowsProjectile
; *** ART Parameters ***
  Draw = W3DScriptedModelDraw ModuleTag_Draw
	DefaultModelConditionState	 
	  Model = EXPoison_AROW
	  ParticleSysBone = MESH01 PoisonArrowTrail Followbone:YES
	End
  End

  Draw = W3DStreakDraw ModuleTag_Draw2
	Length		= 25
	Width		= 2
	NumSegments	= 2		; number of segements in the streak, increase for smoother line
	Color		= R:70 G:160 B:30
	Additive	= No			; Yes by default
	Texture		= EXArrowStreak01.tga
	WeatherTexture = SNOWY EXArrowStreak_Snow.tga
  End

; *** AUDIO Parameters ***

; ***DESIGN parameters ***
  EditorSorting	 = SYSTEM

  ArmorSet
	Armor = NoArmor
  End

  VisionRange = 0.0

; *** ENGINEERING Parameters ***
  KindOf = PROJECTILE NO_COLLIDE
  Body = ActiveBody ModuleTag_02
	MaxHealth	   = 100.0
  End

  Behavior = DestroyDie ModuleTag_03
  ;nothing
  End
	
  Behavior = BezierProjectileBehavior ModuleTag_04

	FirstHeight = 9; Height of Bezier control points above highest intervening terrain
	SecondHeight = 9
	FirstPercentIndent = 20%; Percentage of shot distance control points are placed
	SecondPercentIndent = 90%
	FlightPathAdjustDistPerSecond = 50; Can allow a max speed this can attempt to follow a target. Units are their velocity we can tag. (45 is default human speed)
	GroundHitFX = FX_GondorArrowDeath;FX_PoisonArrowDeath
	CurveFlattenMinDist = 100.0
  End

;  Behavior = CreateObjectDie ModuleTag_06
;	DeathTypes = ALL
;	DeathFX = FX_BarbedArrowDeath
;  End

;  Behavior = FXListDie ModuleTag_07
;	DeathTypes = ALL -CRUSHED -SPLATTED
;	DeathFX = FX_BarbedArrowDeath
;  End

  Geometry = Sphere
  GeometryIsSmall = Yes
  GeometryMajorRadius = 0.8
End

CREATEAHEROPOWERS-----------------------------

//--------------------------------------------------------------------------	
//	POISONED ARROWS SPECIAL POWER Level 1
//--------------------------------------------------------------------------	
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_PoisonedArrowsEnabler_Level1
	SpecialPowerTemplate = SpecialAbilityPoisonedArrows_Level1
	TriggeredBy = Upgrade_PoisonedArrows_Level1
End
Behavior = SpecialPowerModule ModuleTag_PoisonedArrowsStarter_Level1
	SpecialPowerTemplate	  = SpecialAbilityPoisonedArrows_Level1
	UpdateModuleStartsAttack  = Yes
	StartsPaused = Yes
End

//--------------------------------------------------------------------------	
//	POISONED ARROWS SPECIAL POWER Level 2
//--------------------------------------------------------------------------	
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_PoisonedArrowsEnabler_Level2
	SpecialPowerTemplate = SpecialAbilityPoisonedArrows_Level2
	TriggeredBy = Upgrade_PoisonedArrows_Level2
End
Behavior = SpecialPowerModule ModuleTag_PoisonedArrowsStarter_Level2
	SpecialPowerTemplate	  = SpecialAbilityPoisonedArrows_Level2
	UpdateModuleStartsAttack  = Yes
	StartsPaused = Yes
End

//--------------------------------------------------------------------------	
//	POISONED ARROWS SPECIAL POWER Level 3
//--------------------------------------------------------------------------	
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_PoisonedArrowsEnabler_Level3
	SpecialPowerTemplate = SpecialAbilityPoisonedArrows_Level3
	TriggeredBy = Upgrade_PoisonedArrows_Level3
End
Behavior = SpecialPowerModule ModuleTag_PoisonedArrowsStarter_Level3
	SpecialPowerTemplate	  = SpecialAbilityPoisonedArrows_Level3
	UpdateModuleStartsAttack  = Yes
	StartsPaused = Yes
End

COMMANDBUTTON-----------------------------

//------------------- Create A Hero ----------------------------
//--------------------------------------------------------------
CommandButton Command_PoisonedArrows_Level1
	Command					= SPECIAL_POWER
	SpecialPower			= SpecialAbilityPoisonedArrows_Level1
	Options					= NONPRESSABLE
	TextLabel				= CONTROLBAR:PoisonedArrows_Level1
	DescriptLabel			= CONTROLBAR:ToolTipPoisonedArrows_Level1
	ButtonImage				= HSThranduilThornofVengeance
	ButtonBorderType		= ACTION
	InPalantir				= Yes

	CreateAHeroUIAllowableUpgrades			  =	Upgrade_CreateAHero_ClassCorruptedMan
	CreateAHeroUIMinimumLevel				  = 1
	CreateAHeroUIPrerequisiteButtonName = None
	CreateAHeroUICostIfSelected				  = CAH_ARROWBONUS_LEVEL2_COST
End

//------------------- Create A Hero ----------------------------
//--------------------------------------------------------------
CommandButton Command_PoisonedArrows_Level2
	Command					= SPECIAL_POWER
	SpecialPower			= SpecialAbilityPoisonedArrows_Level2
	Options					= NONPRESSABLE
	TextLabel				= CONTROLBAR:PoisonedArrows_Level2
	DescriptLabel			= CONTROLBAR:ToolTipPoisonedArrows_Level2
	ButtonImage				= HSThranduilThornofVengeance
	ButtonBorderType		= ACTION
	InPalantir				= Yes

	CreateAHeroUIAllowableUpgrades			  =	Upgrade_CreateAHero_ClassCorruptedMan
	CreateAHeroUIMinimumLevel				  = 3
	CreateAHeroUIPrerequisiteButtonName = Command_PoisonedArrows_Level1
	CreateAHeroUICostIfSelected				  = CAH_ARROWBONUS_LEVEL3_COST
End

//------------------- Create A Hero ----------------------------
//--------------------------------------------------------------
CommandButton Command_PoisonedArrows_Level3
	Command					= SPECIAL_POWER
	SpecialPower			= SpecialAbilityPoisonedArrows_Level3
	Options					= NONPRESSABLE
	TextLabel				= CONTROLBAR:PoisonedArrows_Level3
	DescriptLabel			= CONTROLBAR:ToolTipPoisonedArrows_Level3
	ButtonImage				= HSThranduilThornofVengeance
	ButtonBorderType		= ACTION
	InPalantir				= Yes

	CreateAHeroUIAllowableUpgrades			  =	Upgrade_CreateAHero_ClassCorruptedMan
	CreateAHeroUIMinimumLevel				  = 7
	CreateAHeroUIPrerequisiteButtonName = Command_PoisonedArrows_Level2
	CreateAHeroUICostIfSelected				  = CAH_ARROWBONUS_LEVEL4_COST
End

CREATEAHEROUPGRADES-----------------------------

Upgrade Upgrade_PoisonedArrows_Level1
	Type = OBJECT
End

Upgrade Upgrade_PoisonedArrows_Level2
	Type = OBJECT
End

Upgrade Upgrade_PoisonedArrows_Level3
	Type = OBJECT
End

Edited by theczar, 28 April 2007 - 09:52 PM.


#2 Killermud

Killermud
  • Members
  • 37 posts
  • Location:England
  • Projects:Crysis
  •  Advanced Worldbuilder, Intermidate INI, Intermidate Texture.

Posted 29 April 2007 - 10:23 AM

Hmmmm, the attack range is very low for a ranged weapon. Maybe increase it to somewhere around 700-1000 that is an OK range.

#3 Lauri

Lauri

    Old man Lauri

  • Hosted
  • 10,438 posts
  • Location:Norway
  • Projects:The 4th Age
  •  The very worst T3A Team Chamber Member

Posted 29 April 2007 - 11:30 AM

That is an OP range.

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#4 Guest_Guest_theczar_*_*

Guest_Guest_theczar_*_*
  • Guests

Posted 29 April 2007 - 04:25 PM

lol its all good, i got it working nicely, i also did it with fire arrows, and black arrows




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users