Jump to content


Photo

Modding spellbook power debug


  • Please log in to reply
4 replies to this topic

#1 Ap0C552

Ap0C552
  • Members
  • 84 posts

Posted 12 December 2009 - 12:33 AM

I am trying to modify the spellbookheal heal amount

I added the following to my map.ini and keep getting crashes stating "Unknown field "X" in block 'object'".

The X = whatever variable is the first in line in the module.

Object GoodSpellBook

AddModule = PlayerHealSpecialPower ModuleTag_Heal
		SpecialPowerTemplate  = SpellBookHeal
		HealAffects			  = INFANTRY CAVALRY SHIP DOZER;; MONSTER MACHINE 
		HealAmount			  = 1
		HealRadius			  = SPELL_HEAL_RADIUS_UNIT_SCAN
		HealFX				  = FX_SpellHealUnitHealBuff;FX_DefaultUnitHealBuff
; To replenish hordes a bit
		HealOCL			   = OCL_HealSpellHordeReplenishPing
		AvailableAtStart	  = No
		RequirementsFilterMPSkirmish = SPELL_BOOK_REQUIREMENTS_FILTER
		RequirementsFilterStrategic = SPELL_BOOK_REQUIREMENTS_FILTER_STRATEGIC
	End
End

If I use ReplaceModule, its says it can not find module "PlayerHealSpecialPower"

Edited by Ap0C552, 12 December 2009 - 02:41 AM.


#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 12 December 2009 - 02:06 AM

So... you are doing map.ini editing>? then this should be in the WB forum :p
Maybe you need to make it look a bit like this:
AddModule W3DScriptedModelDraw
	   Draw = W3DScriptedModelDraw ModuleTag_DrawShellmap
		DefaultModelConditionState
			Model = RBWatchTowM;;OBBFoundationX
		End
		ModelConditionState = WORLD_BUILDER
			  Model = RBWatchTowM
		  End
		
	   End
	End

Ridder Geel

#3 Ap0C552

Ap0C552
  • Members
  • 84 posts

Posted 12 December 2009 - 02:37 AM

Ridder Geel to the rescue! Your wicked dude. LOL

anyways.....

Its coding, so I thought it best belongs here.

But what is that code you added? I am trying to increase the amount of heal the spell book heal applies to units.

I don't see anything in the code you posted that relates to that

#4 Crusard

Crusard

    Local n00b

  • Project Team
  • 483 posts
  • Location:Buenos Aires, Argentina
  • Projects:Crusard's Tower Defense
  •  Poor feedback kills mapper.

Posted 12 December 2009 - 05:10 AM

Ugh, no no, it should actually look like this (using your example)

Object GoodSpellBook
 
 AddModule
   Behavior = PlayerHealSpecialPower ModuleTag_Heal
		 SpecialPowerTemplate  = SpellBookHeal
		 HealAffects			  = INFANTRY CAVALRY SHIP DOZER;; MONSTER MACHINE 
		 HealAmount			  = 1
		 HealRadius			  = SPELL_HEAL_RADIUS_UNIT_SCAN
		 HealFX				  = FX_SpellHealUnitHealBuff
		 HealOCL			   = OCL_HealSpellHordeReplenishPing
		 AvailableAtStart	  = No
		 RequirementsFilterMPSkirmish = SPELL_BOOK_REQUIREMENTS_FILTER
		 RequirementsFilterStrategic = SPELL_BOOK_REQUIREMENTS_FILTER_STRATEGIC
	 End; (ends behavior)
 End; (ends module add)

END; (ends Object)

That's how the AddModule is used. ReplaceModule is another very useful thingy, and it's used in a completely different way. :p

From what I could understand, you don't want to add new stuff, just change the current heal spell. ReplaceModule comes into action!
Object GoodSpellBook
 
ReplaceModule ModuleTag_Heal; Here is the name of the original behavior we want to edit (replace)
   Behavior = PlayerHealSpecialPower ModuleTag_HealTwiceAsMuch; This is the new name we're giving it (Always use different name)
		 SpecialPowerTemplate  = SpellBookHeal
		 HealAffects			  = INFANTRY CAVALRY SHIP DOZER
		 HealAmount			  = 1
		 HealRadius			  = SPELL_HEAL_RADIUS_UNIT_SCAN
		 HealFX				  = FX_SpellHealUnitHealBuff
		 HealOCL			   = OCL_HealSpellHordeReplenishPing
		 AvailableAtStart	  = No
		 RequirementsFilterMPSkirmish = SPELL_BOOK_REQUIREMENTS_FILTER
		 RequirementsFilterStrategic = SPELL_BOOK_REQUIREMENTS_FILTER_STRATEGIC
	 End; (ends behavior)
 End; (ends module replace)

END; (ends Object)

Gotta love map.ini.

Edited by Crusard, 12 December 2009 - 05:15 AM.

Posted Image


#5 Ap0C552

Ap0C552
  • Members
  • 84 posts

Posted 13 December 2009 - 01:43 AM

Thanks so much guys.

Very helpful.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users