Jump to content


Photo

Rogash Bombard Problem


  • Please log in to reply
7 replies to this topic

#1 Edhel Aran

Edhel Aran
  • Members
  • 22 posts
  • Location:Bathurst NSW Australia
  • Projects:Power the Elves
  •  Power of the Elves Coder

Posted 04 January 2007 - 07:45 AM

Hey all!
I have seen Solinx's guide on how to use Create a Hero powers with normal heroes.
My aim was to give the troll hero rogash from angamr in rotwk the bombard power at rank 10.
I followed the tutorial as best I could, thse are my codes:

What I added to Rogash's Object Ini

//--------------------------------------------------------------------------
//	BOMBARD SPECIAL POWER Level 3
//--------------------------------------------------------------------------
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_NormalBombard_Level3
	SpecialPowerTemplate = SpecialAbilityNormalBombard_Level3
	TriggeredBy = Upgrade_NormalBombard_Level3
End
Behavior = OCLSpecialPower ModuleTag_NormalBombardPower_Level3
	SpecialPowerTemplate = SpecialAbilityNormalBombard_Level3
	OCL				  = OCL_CreateAHeroBombardSeed_Level3
	CreateLocation	   = USE_SECONDARY_OBJECT_LOCATION
	NearestSecondaryObjectFilter = NONE SAME_PLAYER +CASTLE_KEEP 
	StartsPaused		 = Yes
End
Behavior = SpecialPowerModule ModuleTag_CreateAHeroBombardStarter_Level3
	SpecialPowerTemplate		= SpecialAbilityCreateAHeroBombard_Level3
	UpdateModuleStartsAttack	= Yes
	StartsPaused			= Yes
End
Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_NormalBombardUpdate_Level3
	SpecialPowerTemplate	= SpecialAbilityNormalBombard_Level3
	WhichSpecialWeapon		= 4						; use MODELCONDITION_SPECIAL_WEAPON_FOUR
	SkipContinue			= Yes

	UnpackTime			  = 900
	PreparationTime		 = 1   
	PersistentPrepTime	  = 1500 
	PackTime				= 1100
	
	FreezeAfterTriggerDuration	= 2500				; make sure we can't move immediately after.

	AwardXPForTriggering	= 0		
	StartAbilityRange		= 300.0
	MustFinishAbility		= Yes
	SpecialWeapon			= NormalBombardWeapon
End

What I added to Upgrade.ini


Upgrade Upgrade_NormalBombard_Level3
	Type = OBJECT
End

What I added to Specialpower.ini

//------------------------------------------------------------------------------
SpecialPower SpecialAbilityNormalBombard_Level3
	Enum				= SPECIAL_SPELL_BOOK_BOMBARD
	ReloadTime	   	= 240000 // // in milliseconds	
	RadiusCursorRadius	= CREATE_A_HERO_BOMBARD_RADIUS_L3
	InitiateAtLocationSound = CaH_DwarfBombardStartMS
End

What I added to Rogash Rank 10 in experience.ini


ExperienceLevel	RogashLevel10
	TargetNames						=	AngmarRogash
	RequiredExperience				=	ROGASH_LVL10_EXP_NEEDED 
	ExperienceAward					=	ROGASH_LVL10_EXP_AWARD	
	  AttributeModifiers				=	HeroLevelUpDamage9
	Rank							=	10
		Upgrades												=	   Upgrade_NormalBombard_Level3
	LevelUpFx						=	FX:GandalfLevelUp1FX
;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	SelectionDecal
		Texture						=	decal_hero_evil
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40;16
		MaxRadius					=	200;16
		MaxSelectedUnits			=	40;1
	End	
END	

What I added to commandbutton.ini

CommandButton Command_Normal_Bombard_Level3
	Command				= SPECIAL_POWER
	SpecialPower		= SpecialAbilityNormalBombard_Level3
	Options				= NEED_TARGET_POS 
	TextLabel			= CONTROLBAR:CAH_Bombard_Level3
	ButtonImage			= SBGood_Bombard
	ButtonBorderType	= ACTION
	DescriptLabel		= CONTROLBAR:TooltipCAH_Bombard_Level3
	RadiusCursorType	= RainOfFireRadiusCursor
	CursorName			= AttackObj
	InvalidCursorName	= GenericInvalid
	InPalantir			= Yes
End

And finally what I added to Rogash's commandset in commandset.ini


CommandSet AngmarRogashCommandSet
	1	= Command_ToggleStance
	2	   = Command_RogashDominateTroll
		3	   = Command_RogashLeap
		4	   = Command_LurtzPillage
		5	   = Command_SpecialAbilityRageoftheNorth
	6	  = Command_Normal_Bombard_Level3
	12 	= Command_CaptureBuilding
	13 	= Command_AttackMove
	14 	= Command_Stop
	16	  = Command_SetStanceBattle
	17	  = Command_SetStanceAggressive
	18	  = Command_SetStanceHoldGround
End

Those are all the codes I added for the power, now the problem.
When I open up rotwk all is fine....no errors etc good start I thought :grin:
I started a skirmish as angmar got rogash and the power was there! still good i thought
I got him to rank 10 which is what rank I set the power to in experiencelevels.ini but the button was still faded out as if I was still only at rank 1??? I went over my code and couldnt find anything wrong.
Can any1 point out wat I have missing in my code?? Or what am doing wrong?? This would be much appreciated.

I will be away for 2-3 days and I may be able to check this thread while I'm away, but maybe not.
So hopefully by the time I get home there will be some much needed replys.
I would really appreciate it.

Bye for now

#2 Imladhrim

Imladhrim
  • Members
  • 51 posts
  • Projects:Otherland

Posted 04 January 2007 - 04:44 PM

I might be mistaken, but I believe you made a mistake in the Power Description

First, I would try to remove the OCLSpecialPower Behavior, since it is commented out in all the CaH Codes for the Bombard Power
and the other thing i noticed is, that you left the SpecialPowerModule Behavior with the original CaH Codes.
If you change them to your "NormalBombard_Level3", all should be fine .. i think :grin:

The following code might work.. can't test it right now though
//--------------------------------------------------------------------------
//	BOMBARD SPECIAL POWER Level 3
//--------------------------------------------------------------------------
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_NormalBombard_Level3
	SpecialPowerTemplate = SpecialAbilityNormalBombard_Level3
	TriggeredBy = Upgrade_NormalBombard_Level3
End

Behavior = SpecialPowerModule ModuleTag_NormalBombardStarter_Level3
	SpecialPowerTemplate		= SpecialAbilityNormalBombard_Level3
	UpdateModuleStartsAttack	= Yes
	StartsPaused			= Yes
End
Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_NormalBombardUpdate_Level3
	SpecialPowerTemplate	= SpecialAbilityNormalBombard_Level3
	WhichSpecialWeapon		= 4					; use MODELCONDITION_SPECIAL_WEAPON_FOUR
	SkipContinue			= Yes

	UnpackTime			  = 900
	PreparationTime		 = 1   
	PersistentPrepTime	  = 1500 
	PackTime				= 1100
	
	FreezeAfterTriggerDuration	= 2500			; make sure we can't move immediately after.

	AwardXPForTriggering	= 0		
	StartAbilityRange		= 300.0
	MustFinishAbility		= Yes
	SpecialWeapon			= NormalBombardWeapon
End


#3 Downfall

Downfall

    Scenarist

  • Members
  • 356 posts
  • Location:Chicago,USA
  •  There is one?

Posted 04 January 2007 - 05:45 PM

Imladhrim that's what I thought at first but then looking harder I remembered thath Create-a-Hero Powers seem to bee hard coded, well alot of CAH stuff seems to be hard coded. But that doesn't mean you can't modify it to what you want.

To help you Edhel Aran i will give you the simplest soultion possible.

First the power added to Rogash's ini:
//--------------------------------------------------------------------------
//	BOMBARD SPECIAL POWER Level 3
//--------------------------------------------------------------------------
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_NormalBombard_Level3
	SpecialPowerTemplate = SpecialAbilityNormalBombard_Level3
	TriggeredBy = Upgrade_NormalBombard_Level3
End
Behavior = OCLSpecialPower ModuleTag_NormalBombardPower_Level3
	SpecialPowerTemplate = SpecialAbilityNormalBombard_Level3
	OCL				  = OCL_CreateAHeroBombardSeed_Level3
	CreateLocation	   = USE_SECONDARY_OBJECT_LOCATION
	NearestSecondaryObjectFilter = NONE SAME_PLAYER +CASTLE_KEEP 
	StartsPaused		 = Yes
End
Behavior = SpecialPowerModule ModuleTag_CreateAHeroBombardStarter_Level3
	SpecialPowerTemplate		= SpecialAbilityCreateAHeroBombard_Level3
	UpdateModuleStartsAttack	= Yes
	StartsPaused			= Yes
End
Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_NormalBombardUpdate_Level3
	SpecialPowerTemplate	= SpecialAbilityNormalBombard_Level3
	WhichSpecialWeapon		= 4					   ; use MODELCONDITION_SPECIAL_WEAPON_FOUR
	SkipContinue			= Yes

	UnpackTime			  = 900
	PreparationTime		 = 1   
	PersistentPrepTime	  = 1500 
	PackTime				= 1100
	
	FreezeAfterTriggerDuration	= 2500			   ; make sure we can't move immediately after.

	AwardXPForTriggering	= 0		
	StartAbilityRange		= 300.0
	MustFinishAbility		= Yes
	SpecialWeapon			= NormalBombardWeapon
End


Following Solinx's guide is useful, but like he said in the guide it's still flawded to an extent. To fix what the problem with this I'd suggest, recopying the power and adding the different upgrade like so:
//--------------------------------------------------------------------------
//	BOMBARD SPECIAL POWER Level 2
//--------------------------------------------------------------------------
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_CreateAHeroBombard_Level2
	SpecialPowerTemplate = SpecialAbilityCreateAHeroBombard_Level2
	TriggeredBy = Upgrade_NormalBombard_Level3
End
Behavior = OCLSpecialPower ModuleTag_CreateAHeroBombardPower_Level2
	SpecialPowerTemplate = SpecialAbilityCreateAHeroBombard_Level2
	OCL				  = OCL_CreateAHeroBombardSeed_Level2
	CreateLocation	   = USE_SECONDARY_OBJECT_LOCATION
	NearestSecondaryObjectFilter = NONE SAME_PLAYER +CASTLE_KEEP 
	StartsPaused		 = Yes
End
Behavior = SpecialPowerModule ModuleTag_CreateAHeroBombardStarter_Level2
	SpecialPowerTemplate		= SpecialAbilityCreateAHeroBombard_Level2
	UpdateModuleStartsAttack	= Yes
	StartsPaused			= Yes
End
Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_CreateAHeroBombardUpdate_Level2
	SpecialPowerTemplate	= SpecialAbilityCreateAHeroBombard_Level2
	WhichSpecialWeapon		= 4						; use MODELCONDITION_SPECIAL_WEAPON_FOUR
	SkipContinue			= Yes

	UnpackTime			  = 900
	PreparationTime		 = 1   
	PersistentPrepTime	  = 1500 
	PackTime				= 1100
	
	FreezeAfterTriggerDuration	= 2500				; make sure we can't move immediately after.

	AwardXPForTriggering	= 0		
	StartAbilityRange		= 300.0
	MustFinishAbility		= Yes
	SpecialWeapon			= CreateAHeroBombardWeapon
End


That should fix those errors. Onto your commandbutton:
CommandButton Command_Normal_Bombard_Level3
	Command				= SPECIAL_POWER
	SpecialPower		= SpecialAbilityNormalBombard_Level3
	Options				= NEED_TARGET_POS 
	TextLabel			= CONTROLBAR:CAH_Bombard_Level3
	ButtonImage			= SBGood_Bombard
	ButtonBorderType	= ACTION
	DescriptLabel		= CONTROLBAR:TooltipCAH_Bombard_Level3
	RadiusCursorType	= RainOfFireRadiusCursor
	CursorName			= AttackObj
	InvalidCursorName	= GenericInvalid
	InPalantir			= Yes
End

Everything is practically perfect here except for the SpecialPower. This requires a simple fix:
CommandButton Command_Normal_Bombard_Level3
	Command				= SPECIAL_POWER
	SpecialPower		= SpecialAbilityCreateAHeroBombard_Level3
	Options				= NEED_TARGET_POS 
	TextLabel			= CONTROLBAR:CAH_Bombard_Level3
	ButtonImage			= SBGood_Bombard
	ButtonBorderType	= ACTION
	DescriptLabel		= CONTROLBAR:TooltipCAH_Bombard_Level3
	RadiusCursorType	= RainOfFireRadiusCursor
	CursorName			= AttackObj
	InvalidCursorName	= GenericInvalid
	InPalantir			= Yes
End

There now that's done.
Looking at your ExperienceLevels, Upgrade, & Commandset they're all fine. So you should leave those alone. Now, since you're using the SpecialAbilityCreateAHeroBombard_Level3, you don't need the SpecialPower that you created. So you can delete that if you want. Hopefuly that helps.
"Human beings make strange fauna and flora. From a distance they appear negligible; up close they are apt to appear ugly and malicious."
Henry Miller, Tropic of Cancer


Posted Image

Posted Image

#4 Edhel Aran

Edhel Aran
  • Members
  • 22 posts
  • Location:Bathurst NSW Australia
  • Projects:Power the Elves
  •  Power of the Elves Coder

Posted 07 January 2007 - 04:51 AM

OK so here is what I have done... I replaced my object code with downfalls and also my commandbutton with his...thats all I understood this may b the problem. I get the same result rank 10 rogash and faded rank 10 bombard.

To fix what the problem with this I'd suggest, recopying the power and adding the different upgrade like so:


I dont exactly understand what you mean by this...Can anyone explain?

Also I deleted my specialpower....i got a game.dat.....so maybe this is part of the problem

Edited by Edhel Aran, 07 January 2007 - 05:28 AM.


#5 Imladhrim

Imladhrim
  • Members
  • 51 posts
  • Projects:Otherland

Posted 07 January 2007 - 11:46 AM

Could you tell us, what your game.dat error says?
Most of the time the error messages point you in the right direction.
Meaning you can see in which file he error can be found and sometimes even the position.
My guess is, that you still have a reference to your old specialpower somewhere

#6 Edhel Aran

Edhel Aran
  • Members
  • 22 posts
  • Location:Bathurst NSW Australia
  • Projects:Power the Elves
  •  Power of the Elves Coder

Posted 14 January 2007 - 08:23 AM

OK I got it!! :sleep: sorry for typing in an old thread but I'm just happy delete thread if you want

#7 Solinx

Solinx

    .

  • Undead
  • 3,101 posts
  • Location:The Netherlands
  • Projects:Real Life
  • Division:Revora
  • Job:Retired Leader / Manager

Posted 14 January 2007 - 02:08 PM

No need at all to delete this thread. It's good to hear that you found the problem.

Lately I have been unable to check all topics on the forums, so I missed the topic untill now. :( I would have liked helping you solving the problem with your specific power, so if you have any problems with another power in the future, just send me a message with a link to the topic. :sleep:

BTW. Thanks for using my guide :grin:

Solinx
Posted Image

"An expert is a man who has made all the mistakes which can be made in a very narrow field." - Niels Bohr


#8 Edhel Aran

Edhel Aran
  • Members
  • 22 posts
  • Location:Bathurst NSW Australia
  • Projects:Power the Elves
  •  Power of the Elves Coder

Posted 15 January 2007 - 07:41 AM

OK thanks Solinx




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users