Jump to content


Photo

Adding WizardTowerLightning to Saruman


  • Please log in to reply
14 replies to this topic

#1 Witch King

Witch King
  • Members
  • 38 posts

Posted 06 April 2012 - 02:16 PM

I have added the WizardTowerLightning to Saruman to work at level 10.

Here is what happens,
Problem 1--- Until he reaches lvl10 there is no image button on the palantir(I have removed the toggle stance so it fits). When he reaches lvl10, suddenly the image button appears. How can I make it to appear from the start in the palantir?

Problem 2---(being lvl10) When I click on saruman, appears the button image of the thunderbolt on him(in fact it covers him), the one that appears at the fortress when you research the wizard tower upgrade. So he looks like a moving button image.

Problem 3---(being lvl10) When I click on the power to cast it, even though the ''circle'' that triggers the lightning appears, it is red(can't be casted, like its radius forbids it)

Here are the codes

***saruman.ini


//--------------------------------------------------------------------------
//	  Thunderstorm
//--------------------------------------------------------------------------
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_SarumanThunderstorm
		SpecialPowerTemplate = SpecialAbilitySarumanThunderstorm
		TriggeredBy = Upgrade_SarumanThunderstorm
End

Behavior = SpecialPowerModule ModuleTag_SarumanThunderstormStarter
		SpecialPowerTemplate			= SpecialAbilitySarumanThunderstorm
		UpdateModuleStartsAttack		= Yes
		StartsPaused					= Yes
		InitiateSound						   = WizardTowerLightningStrikeRumbleMS
End

Behavior = ArrowStormUpdate ModuleTag_ShootLightningBolts
				SpecialPowerTemplate	= SpecialAbilitySarumanThunderstorm
				StartAbilityRange	   = ISENGARD_WIZARDSTOWER_LIGHTNING_RANGE
				UnpackingVariation			  = 1
				CanShootEmptyGround			 = Yes
				
				UnpackTime			  = 2500  ;// Pull out arrow
				PreparationTime		 = 1			 ;// Quick shot
				PersistentPrepTime	  = 500   ;// looping the quick shot
				PackTime				= 1500  ;// back to idle
				FreezeAfterTriggerDuration	  = 2500

				ApproachRequiresLOS	 = No	;// required so that it doesn't shoot through walls
				AwardXPForTriggering	= 0
				

				;//Specific to ArrowStorm
				WeaponTemplate  = SarumanThunderstorm
				TargetRadius	= ISENGARD_WIZARDSTOWER_LIGHTNING_FIRE_RADIUS
				ShotsPerTarget  = 1
				ShotsPerBurst   = 1
				MaxShots		= ISENGARD_WIZARDSTOWER_LIGHTNING_NUMSHOTS  ;// will double up if run out of targets
End



***commandbutton.ini

CommandButton Command_SarumanThunderstorm
  Command				 = SPECIAL_POWER
  SpecialPower			= SpecialAbilitySarumanThunderstorm
  Options				 = HIDE_WHILE_DISABLED NEED_TARGET_POS
  TextLabel			   = CONTROLBAR:WizardsTowerLightningStrike
  ButtonImage			 = HSSarumanThunderbolt
  RadiusCursorType		= ThunderBoltRadiusCursor
  ButtonBorderType		= ACTION
  DescriptLabel		   = CONTROLBAR:ToolTipWizardsTowerLightningStrike
  CursorName			  = AttackObj
  InvalidCursorName	   =	GenericInvalid
  AutoAbility			  = Yes
  InPalantir			  = Yes
  Radial				  = Yes
End


***commndset.ini

CommandSet SarumanCommandSet
	1	= Command_SpecialAbilityIsengardWizardBlast
	2	= Command_SarumanFireball
	3	= Command_SpecialAbilitySpeechCraft ; ;
	4	= Command_SpecialAbilityDominateEnemy ; ;
	5	= Command_SarumanThunderBolt
	6	= Command_SarumanThunderstorm	
	12	= Command_CaptureBuilding
	13	= Command_AttackMove
	14	= Command_Stop
End

***upgrade.ini

Upgrade Upgrade_SarumanThunderstorm
  Type			  = OBJECT
End

***specialpower.ini
;------------------------------------------------------------------------------
SpecialPower SpecialAbilitySarumanThunderstorm
	    Enum							  = SPECIAL_ARROW_STORM
	    ReloadTime					  = 100000; in milliseconds
	    RadiusCursorRadius	  = 120.0
	    InitiateSound						   = WizardTowerLightningStrikeRumbleMS
End


I hope I didn't forgot any code. I know I made a bit of a mess, please don't be harsh on me :wink_new:

Edited by Witch King, 06 April 2012 - 02:21 PM.

===ΝΙΨΟΝΑΝΟΜΗΜΑΤΑΜΗΜΟΝΑΝΟΨΙΝ===

#2 Lauri

Lauri

    Old man Lauri

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

Posted 06 April 2012 - 03:57 PM

1) Remove the HIDE_WHILE_DISABLED from the Options in the commandbutton ;)
2) Radial = No
3) No sure, sorry. Did you make the SarumanThunderstorm weapon? I'm fairly sure you would've gotten an error if you hadn't, but I simply don't see anything wrong at first quick glance :p

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#3 Witch King

Witch King
  • Members
  • 38 posts

Posted 07 April 2012 - 01:08 AM

ok, things got better, I changed what you said.
But now when I click on the power nothing happens..

I don't get crushes or anything, luckily
Do I have to make a SarumanThunderstorm weapon?? in the weapon.ini? Damn, that seems harder than I thought.. Any help on how could I make the weapon.ini code?? Is there already a weapon code(wizard tower or something) that I could copy and do little modifications instead of creating one on my own??

thanks again for answers. You help me a LOT
===ΝΙΨΟΝΑΝΟΜΗΜΑΤΑΜΗΜΟΝΑΝΟΨΙΝ===

#4 Lauri

Lauri

    Old man Lauri

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

Posted 07 April 2012 - 10:53 AM

Well, did you change the SarumanThunderstorm in the power code? Was it WizardTowerLightningWeapon before? I don't know if you made it up, but I can't find it by default.

At any rate, WeaponTemplates have to have a Weapons name in weapons.ini

WizardTowerLightningWeapon is the one the power use by default, so you can just use that while you're still testing it. Or you can copy that and make changes. If you do, remember the warhead. WizardTowerWarHead. They're linked.

Here's how.. This is in the Main weapon, near the bottom:
ProjectileTemplateName   = WizardTowerProjectile
  WarheadTemplateName    = WizardTowerWarHead
The WarheadTemplate acts like a bow and arrow. The bow is a weapon, but it doesn't do any damage. It shoots arrows, which do damage. Same goes for the thunderstorm. The staff is the weapon, but it casts lightning that does the damage.
So if you decide to make your own weapon, make both:
SarumanThunderstorm
SarumanThunderstormWarHead
And make sure that the WarheadTemplateName = SarumanThunderstormWarHead

Remember, you'll want to make a custom weapon for it eventually. IIRC, the WizardTower does quite the damage, and has a big range, so maybe it's overpowered for Saruman?

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#5 Witch King

Witch King
  • Members
  • 38 posts

Posted 07 April 2012 - 11:31 AM

Well, did you change the SarumanThunderstorm in the power code? Was it WizardTowerLightningWeapon before? I don't know if you made it up, but I can't find it by default.


No I made it up just to show which power I wanted to use, sorry for that

At any rate, WeaponTemplates have to have a Weapons name in weapons.ini

WizardTowerLightningWeapon is the one the power use by default, so you can just use that while you're still testing it. Or you can copy that and make changes. If you do, remember the warhead. WizardTowerWarHead. They're linked.


??What?? copy what for what??

Here's how.. This is in the Main weapon, near the bottom:

ProjectileTemplateName   = WizardTowerProjectile
  WarheadTemplateName	= WizardTowerWarHead
The WarheadTemplate acts like a bow and arrow. The bow is a weapon, but it doesn't do any damage. It shoots arrows, which do damage. Same goes for the thunderstorm. The staff is the weapon, but it casts lightning that does the damage.
So if you decide to make your own weapon, make both:
SarumanThunderstorm
SarumanThunderstormWarHead
And make sure that the WarheadTemplateName = SarumanThunderstormWarHead


From the few I understood, I have to make a new weapon.ini
But is there an existing code can I use to copy and then modify? Because making a complete new one would be impossible for me


Remember, you'll want to make a custom weapon for it eventually. IIRC, the WizardTower does quite the damage, and has a big range, so maybe it's overpowered for Saruman?

I always thought that gandalf was much more overpowered unit that saruman. He has word of power which is overpowered, so instead of altering gandalf's power to balance the game, I decided to change saruman into something more powerfull. But it's not as effective as someone might think, since the wizard tower lighting power is really slow at casting and gives the enemy the chance to withdraw. In the opposite, gandalf's word of power provides instant and mass kill.
I forgot to tell you I am going to delete the lighting bolt power for saruman
===ΝΙΨΟΝΑΝΟΜΗΜΑΤΑΜΗΜΟΝΑΝΟΨΙΝ===

#6 Lauri

Lauri

    Old man Lauri

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

Posted 07 April 2012 - 12:08 PM

The best thing for you to do is simply change this:
WeaponTemplate  = SarumanThunderstorm

back to this:
WeaponTemplate  = [b]WizardTowerLightningWeapon[/b]

In your saruman.ini


weapon.ini contains ALL weapons in the game. When you changed the WeaponTemplate above, you referred the power to a weapon that did not exist, hence it doesn't do anything. Think of it this way; You have a bow, and you want it to shoot Piler. Now, there isn't anything called Piler, hence your bow will shoot... nothing.

If you open it, you can search for WizardTowerLightningWeapon and find it, and it's warhead. Then copy those two and rename them. Then make sure that the WarheadTemplateName in your new custom weapon is changed to your new custom weapon warhead. It shouldn't be too hard when you see it :)

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#7 Witch King

Witch King
  • Members
  • 38 posts

Posted 07 April 2012 - 12:35 PM

much clearer now. I'll try it and tell what happens :)


EDIT:
I did this but still when I click the image button, nothing happens


;---------------------------------------------------------------------------------------
Weapon SarumanThunderstormWeapon  ;// BALANCE WizardTowerLightning 
AttackRange    = ISENGARD_WIZARDSTOWER_LIGHTNING_RANGE
WeaponSpeed    = 900  ;// dist/sec
HitPercentage   = 100  ;// When this weapon is used it will hit exactly 100% of the time.
DelayBetweenShots  = 500  ;// time between shots, msec
PreAttackDelay	   = 3000
PreAttackType	    = PER_ATTACK ;// Do the delay each time we attack a new target
AcceptableAimDelta  = 0
FireFX	  = FX_WizardTowerClouds
FiringDuration	   = 1
AntiAirborneVehicle  = Yes
AntiAirborneMonster  = Yes
    ProjectileNugget	
  ProjectileTemplateName   = WizardTowerProjectile
  WarheadTemplateName    = SarumanThunderstormWarHead
  WeaponLaunchBoneSlotOverride = SECONDARY
; UseAlwaysAttackOffset   = Yes	 //Causes project to always target an offset from the attacker
; AlwaysAttackHereOffset   = X:0 Y:0 Z:400   //Used with UseAlwaysAttackOffset, this specifies the offset from the attacker to strike
End
End
;---------------------------------------------------------------------------------------
Weapon SarumanThunderstormWarHead
ProjectileCollidesWith = MONSTERS STRUCTURES // Structures is the default, btw.
RadiusDamageAffects  = ENEMIES ALLIES NOT_SIMILAR
// A Nugget that throws things back with force
MetaImpactNugget				    ;// A Nugget that throws things back with force
;  HeroResist   = .75
  ShockWaveAmount  = 150.0
  ShockWaveRadius  = ISENGARD_WIZARDSTOWER_LIGHTNING_SHOT_DMG_RADIUS
  ShockWaveTaperOff = 0.2
  ShockWaveZMult  = 1.50 
  KillObjectFilter = INSTANT_DEATH_ON_METAIMPACT_OBJFILTER
End
//Start a fire
FireLogicNugget
  LogicType = INCREASE_BURN_RATE
  Radius  = ISENGARD_WIZARDSTOWER_LIGHTNING_FIRE_RADIUS
  Damage  = ISENGARD_WIZARDSTOWER_LIGHTNING_FIRE_START_RAD
End
// A basic Nugget that just does damage
DamageNugget					   
  Damage		  = ISENGARD_WIZARDSTOWER_LIGHTNING_DAMAGE_FLAME
  Radius    = ISENGARD_WIZARDSTOWER_LIGHTNING_SHOT_DMG_RADIUS    //Radius of damage  
  DamageType	  = FLAME
  DamageFXType    = BOLT
  DeathType	   = NORMAL //BURNED
End
// A basic Nugget that just does damage
DamageNugget					   
  Damage		  = ISENGARD_WIZARDSTOWER_LIGHTNING_DAMAGE
  Radius    = ISENGARD_WIZARDSTOWER_LIGHTNING_SHOT_DMG_RADIUS    //Radius of damage  
  DamageType	  = MAGIC
  DamageFXType    = BOLT
  DeathType	   = NORMAL //BURNED
End
End

Edited by Witch King, 07 April 2012 - 01:48 PM.

===ΝΙΨΟΝΑΝΟΜΗΜΑΤΑΜΗΜΟΝΑΝΟΨΙΝ===

#8 Elric

Elric

    Designer

  • Hosted
  • 2,857 posts
  • Projects:Middle-Earth Expanded
  •  Coder
  • Donated

Posted 09 April 2012 - 03:23 AM

Here is the minor thunderbolt he uses:


CommandButton Command_SarumanThunderBolt
  Command                 = SPECIAL_POWER 
  SpecialPower            = SpecialAbilityLightingBolt
  Options                 = NEED_TARGET_POS
  TextLabel               = CONTROLBAR:ThunderBolt
  ButtonImage             = HSSarumanThunderbolt
  RadiusCursorType        = ThunderBoltRadiusCursor
  InvalidCursorName       = GenericInvalid
  ButtonBorderType        = ACTION 
  DescriptLabel           = CONTROLBAR:ToolTipThunderBolt
  AutoAbility   = Yes
  InPalantir   = Yes
End

I believe there is NO radial so just completely take it out. or comment it out.

Also, make sure the upgrade is correct in his experience levels because i know i have sometimes missed a letter or forgotten to save something so you may want to double check that. I haven't coded the lightning attack in quite some times but i believe it had to do with the command button..... The easiest way to do it would be to replicate his original ability and change the weapons around... with different projectiles.. I hope this helps. Might not at all, but who knows.

#9 Witch King

Witch King
  • Members
  • 38 posts

Posted 09 April 2012 - 02:55 PM

I have checked them, but can't find something wrong.

The problem is that when I click on the button nothing happens.
Everything else like the level upgrade, works ok
===ΝΙΨΟΝΑΝΟΜΗΜΑΤΑΜΗΜΟΝΑΝΟΨΙΝ===

#10 Elric

Elric

    Designer

  • Hosted
  • 2,857 posts
  • Projects:Middle-Earth Expanded
  •  Coder
  • Donated

Posted 09 April 2012 - 03:23 PM

You took out the radial all together right? Because i had a problem where the radius cursor wouldn't appear also.. I took out the radial thing and it then worked. You should compare all the codes to the corresponding regular Saruman power. The weapons templates and everything. The only things that should be changed are certain parts of the weapon. Nothing else really... (i dont have the codes in front of me so dont hold it against me)

#11 Witch King

Witch King
  • Members
  • 38 posts

Posted 10 April 2012 - 10:20 AM

it didn't work... Do you see anyhting wrong with my codes? I suspect that my weapon.ini code is messed up


If this won't work, I am thinking on replacing saruman's thunder bolt, just change some names etc..


Thanks for the help though
===ΝΙΨΟΝΑΝΟΜΗΜΑΤΑΜΗΜΟΝΑΝΟΨΙΝ===

#12 Lauri

Lauri

    Old man Lauri

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

Posted 10 April 2012 - 10:55 AM

I compared your Commandbutton to Legolas' Arrow Storm commandbutton.

I suggest you try to change Options and CursorName into these:

  Options				 = NEED_TARGET_POS CONTEXTMODE_COMMAND

  CursorName			  = Bombard

Those were the differences I found.

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#13 Witch King

Witch King
  • Members
  • 38 posts

Posted 10 April 2012 - 11:09 PM

finally it worked!!! At last!! Many many many thanks!!!! :thumbsupsmiley:

I wouldn't have done this without your help!!! :thumbsuphappy:
===ΝΙΨΟΝΑΝΟΜΗΜΑΤΑΜΗΜΟΝΑΝΟΨΙΝ===

#14 Lauri

Lauri

    Old man Lauri

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

Posted 11 April 2012 - 12:07 AM

You could've, by following a simple tip:

When things don't work, start over.

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#15 Witch King

Witch King
  • Members
  • 38 posts

Posted 12 April 2012 - 07:59 PM

That's what I usually do, but since I am a begginer I always forget something
===ΝΙΨΟΝΑΝΟΜΗΜΑΤΑΜΗΜΟΝΑΝΟΨΙΝ===




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users