Jump to content


Photo

Spellbook Powers to Normal Powers?


  • Please log in to reply
10 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 15 January 2007 - 07:47 AM

Hey all,
I'm sure it is possible to make a spellbook power into a normal hero power but I'm sort of new and still learning could someone tell me how. I was planning to give galadriel sunflare and sauron summon balrogs, but i don;t know what inis to look at and copy etc.
Thanks

#2 MrRanck

MrRanck
  • Members
  • 15 posts

Posted 15 January 2007 - 02:30 PM

I've made a summon balrog hero power. Check the tutorial on summoning units -- it'll contain most of the code you'll need.

#3 Edhel Aran

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

Posted 22 January 2007 - 07:55 AM

OK I got my balrog summon to work..yay. I tried sunflare but no success the button doesnt show up on the commandset. And no the black space isn't clickable (just no button image) it is not there at all.
I will post my codes when I get home. But could anyone tell me how to make sunflare useable for galadriel

#4 Solinx

Solinx

    .

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

Posted 22 January 2007 - 05:40 PM

Sunflare... tried to make that work with Gandalf once and got stuck on the FX. I'll post the code once I find it again :blink:

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


#5 IthronAiwendil

IthronAiwendil

    Retired modder

  • Hosted
  • 1,452 posts
  • Location:Finland
  • Projects:None
  •  Coder, skinner, modeler, art guy

Posted 22 January 2007 - 06:07 PM

I added Sunflare to my Tom Bombadil and it worked fine. I can post some of the codes soon if you want.

#6 Solinx

Solinx

    .

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

Posted 22 January 2007 - 06:11 PM

Yes, Ithron, if you could post them it would be very helpful. Gandalf is backed up *somewhere* in the stuff I was working on half a year ago :blink:

Solinx

Edited by Solinx, 22 January 2007 - 06:12 PM.

Posted Image

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


#7 IthronAiwendil

IthronAiwendil

    Retired modder

  • Hosted
  • 1,452 posts
  • Location:Finland
  • Projects:None
  •  Coder, skinner, modeler, art guy

Posted 23 January 2007 - 04:15 PM

OK I have some codes now, hope they help you:

Object.ini:
	  ;;; SUNFLARE (Level 10);;;
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_SunflareEnabler
		SpecialPowerTemplate = TomBombadilSmallSunflare
		TriggeredBy = Upgrade_TomBombadilSunflare
	End

	Behavior = OCLSpecialPower ModuleTag_Sunflare
		SpecialPowerTemplate 			= TomBombadilSmallSunflare
		OCL							  = OCL_TomBombadilSunflare
		CreateLocation	   			= CREATE_AT_LOCATION
;UpdateModuleStartsAttack	= Yes
		StartsPaused				= Yes
;AttributeModifierAffects		= ANY +INFANTRY +CAVALRY +MONSTER -HERO ENEMIES
;ReEnableAntiCategory			= Yes
;AttributeModifierWeatherBased	= Yes			
;WeatherDuration					= 10000
;ChangeWeather					= SUNNY
		SetModelCondition		= ModelConditionState:USER_2
		SetModelConditionTime	= 5.0
	End

Objectcreationlist.ini
ObjectCreationList OCL_TomBombadilSunflare
	CreateObject
		ObjectNames		= TomBombadilSmallSunflare
		Count			= 1
	End
End

system.ini
ChildObject TomBombadilSmallSunflare SunflareSunbeam	Draw = W3DScriptedModelDraw ModuleTag_Draw		DefaultModelConditionState			Model               = NONE			ParticleSysBone		= None SunRays			ParticleSysBone		= None BombadilSunFlareGlow			ParticleSysBone		= None BombadilSunFlareProxy		End	End        Scale = 0.8	;// the following two modules control death fade -- uses alpha for now	Behavior = LifetimeUpdate ModuleTag_02		MinLifetime = 18000  ;// min lifetime in msec		MaxLifetime = 18000  ;// max lifetime in msec	End	Behavior = FireWeaponUpdate ModuleTag_DamageHandler		FireWeaponNugget			WeaponName	= TomBombadilSunflareWeapon			FireDelay	= 0			OneShot		= Yes	;// Alternative is to fire as often as the reload time of this weapon allows		End	EndEnd

weapon.ini:
Weapon TomBombadilSunflareWeapon		RadiusDamageAffects		= ENEMIES NEUTRALS		//Turn the troll effectively to stone	AttributeModifierNugget		AttributeModifier        = SunFlareTrollToStone		Radius					 = SPELL_SUNFLARE_EFFECT_RADIUS				SpecialObjectFilter      = ANY +MordorAttackTroll +MordorDrummerTroll +MordorMountainTroll +MordorCaveTroll +GoblinCaveTroll +GoblinCaveTroll_FromTrollLair +CaveTroll_Slaved	End            		// A basic Nugget that just does damage	DamageNugget                		Damage        = 2700		Radius        = 90		DelayTime     = 0		DamageType    = FLAME		DamageFXType  = FLAME		DeathType     = BURNED	End	//Paralyze everything that's light sensitive	ParalyzeNugget						Radius					= SPELL_SUNFLARE_EFFECT_RADIUS		Duration				= SPELL_SUNFLARE_DURATION		SpecialObjectFilter     = ANY +MordorFighter +MordorArcher +MordorBannerOrc +WildBannerGoblin +WildBannerMarauder +WildBannerSpiderling +GoblinFighter +GoblinArcher +WildSpiderling +GoblinSpiderRider +WildShelob +MordorGoblinSwordsman +MordorGoblinArcher +BarrowWight ENEMIES	EndEnd

specialpower.ini:
SpecialPower TomBombadilSmallSunflare
	Enum			= SPECIAL_SPELL_BOOK_SUNFLARE
	Flags			= WATER_OK RESPECT_RECHARGE_TIME_DISCOUNT NO_FORBIDDEN_OBJECTS
	RadiusCursorRadius	= 90
	ReloadTime		= 370000;// in milliseconds
		ForbiddenObjectFilter	= NO_SUMMON_NEAR_OBJECT_FILTER
		ForbiddenObjectRange	= 110.0
	InitiateAtLocationSound = SpellSunflareMS
End

commandbutton.ini:
CommandButton Command_TomBombadilSunflare
	Command				= SPECIAL_POWER
		SpecialPower		= TomBombadilSmallSunflare
	Options				= NEED_TARGET_POS 
	TextLabel			= CONTROLBAR:Sunflare
		ButtonImage			= SBGood_Sunflare
	ButtonBorderType	= ACTION
	DescriptLabel		= CONTROLBAR:TooltipTomBombadilSunflare
		RadiusCursorType	= SunflareRadiusCursor
		CursorName			= AttackObj
		InvalidCursorName	= GenericInvalid
	InPalantir			= Yes
End

To get the fx to work, replace these particle names with your own ones:
			ParticleSysBone		= None SunRays
			ParticleSysBone		= None BombadilSunFlareGlow
			ParticleSysBone		= None BombadilSunFlareProxy

And notice that I've commented out the part that makes the weather change in object.ini.

Edited by IthronAiwendil, 23 January 2007 - 04:16 PM.


#8 Edhel Aran

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

Posted 23 January 2007 - 10:28 PM

Nice!
This should be very useful! I will report on my success when I finally get on my own damn computer.
Thanks! :huh:

#9 Edhel Aran

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

Posted 29 January 2007 - 05:13 AM

OK I added all the codes to their destinations and added the button to galadriels commandset, I didnt exactly understand what you meant by "To get the fx to work, replace these particle names with your own ones" so I replaced them with the ones from the original sunflare. ok so i save everything eventually kill gollum and get the ring lol and buy her and when the count down is done when she would normally come out i get a game.dat error...1 of the ones that doesnt give you the error...1 that just says game.dat. I dont know what I did wrong so If anyone else has any solution pls post. I also added sunflare to her experince levels

#10 Imladhrim

Imladhrim
  • Members
  • 51 posts
  • Projects:Otherland

Posted 29 January 2007 - 08:06 AM

Your codes might help to spot the error
also you could try to make a "normal" hero out of galadriel during testing

I had some game.dat issues myself while messing arround with powers
Some times it was caused by a typo .. But mostly I had forgotten to name every "SpecialPowerTemplate ="
correctly in the powerdefinition .. or had a mistake in commandbutton.ini especially with "Command= ... " or "SpecialPower= ..."

#11 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 01 October 2007 - 12:42 PM

i was wandering wether you could post some codes for other spell book powers like flood or balrog. i was having trouble with these. Also do you what could sunflare to do no damage or stun everything else works though




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users