Jump to content


Photo

Help With Saruman


  • Please log in to reply
9 replies to this topic

#1 Valarauko

Valarauko
  • Members
  • 33 posts

Posted 07 July 2005 - 09:11 PM

Hey everyone i'm having trouble giving saruman a palantir power that works like the spellbook power but reveals the entire map. I tried to base it off of the Mirkwood Elves power tutorial for legolas (called something like: add summon power to heroes).

I added the upgrade to upgrade.ini, the specialpower to specialpower.ini,

I created an OCL for an object i created called PalantirVisionPing2 (it's the same as PalantirVisionPing but with a bigger vision range).

I added the commandbutton and added it to Saruman's commandset and experiencelevels, and added the behavior to Saruman's file in evilfactionunits.

...But something's obviously wrong because i can load the game fine but when i buy saruman when he would normally come out an error comes up.

Error was:

EXCEPTION_ACCES_VIOLATION
The thread tried to write from or write to a virtual address for which it does not have appropriate access.
Access address 0x00000004 was read from.

Location:  0066ddbe game.dat+0x26ddbe, Matrix4D::operator+=+0x222791


Any help would be appreciated

#2 GothmogtheOrc

GothmogtheOrc

    Ruler of the Morgul Vale

  • Hosted
  • 2,263 posts
  • Location:USA
  • Projects:Kings of the West Mod
  •  T3A Chamber Member - Retired

Posted 07 July 2005 - 10:01 PM

Ok, when you get that error it means that one of the codes you put in is slightly wrong... so, could you copy and paste all the codes that you put into the game and put them into a responce so that I can see what you did and see if you left anything out or mispelled something?

Thanks, GothmogtheOrc

Nine%20rings.jpg
Click on my Sig to go to my BFME Modding site where you can download my mods.
KotW%20Morgul%20In-game.jpg
Kings of the West Mod Leader
*Retired. PM me if you need to get a hold of me as I'll get an email notification and should reply within a day or so*


#3 Valarauko

Valarauko
  • Members
  • 33 posts

Posted 07 July 2005 - 10:33 PM

upgrade.ini
Upgrade Upgrade_SpecialAbilityHugePalantir
Type = OBJECT
End

specialpower.ini
SpecialPower SpecialAbilityHugePalantir
Enum = SPECIAL_SPAWN_ORCS
ReloadTime = 300000
PublicTimer = No
InitiateAtLocationSound = SpellPalantirVision
End

objectcreationlist.ini
ObjectCreationList OCL_SpecialPowerHugePalantir
  CreateObject
    ObjectNames = PalantirVisionPing2
    Count = 1
  End
End

object.ini\system\system (exact copy of palantirvisionping except for visionrange)
Object PalantirVisionPing2

	EvaEnemyUnitSightedEvent = None; Not a real unit

; ***DESIGN parameters ***
	VisionRange     = 20000000000000.0
	EditorSorting   = SYSTEM
	KindOf = NO_COLLIDE IMMOBILE UNATTACKABLE IGNORE_FOR_VICTORY IGNORE_FOR_EVA_SPEECH_POSITION MOVE_ONLY;INERT
	ThreatLevel = 0
; *** ENGINEERING Parameters ***
	Body = ActiveBody ModuleTag_01
  MaxHealth = 999999
  InitialHealth = 999999
	End

;;; ???? I don't think this works right -- shouldn't it be a DeletionUpdate?
;;; LifetimeUpdate can't kill ImmortalBody
	Behavior = LifetimeUpdate ModuleTag_LifetimeUpdate
  MinLifetime  = 120000
  MaxLifetime  = 120000
	End	
	
; Gives ally trrops bonus
	Behavior = AttributeModifierAuraUpdate ModuleTag_TroopBonus
  StartsActive	= Yes;If no, requires upgrade to turn on.
  BonusName  = PalantirVision
  RefreshDelay	= 1000
  Range  	= 200
  ObjectFilter	= ANY +ORC +URUK +CAVALRY -STRUCTURE -BASE_FOUNDATION -HERO
	End	
	
; Detects other stealth units
	Behavior = StealthDetectorUpdate StealthDetectorUpdateModuleTag
  DetectionRate   = 500  ; how often to rescan for stealthed things in my sight (msec)
	End
	
End

experiencelevels.ini
ExperienceLevel	SarumanLevel10
	TargetNames    = IsengardSaruman
	RequiredExperience	= SARUMAN_LVL10_EXP_NEEDED 
	ExperienceAward    =	SARUMAN_LVL10_EXP_AWARD	
	AttributeModifiers	= HeroLevelUpDamage9
	Rank      = 10
	Upgrades = Upgrade_SpecialAbilityHugePalantir
	LevelUpFx      =	FX:GandalfLevelUp1FX
	SelectionDecal
  Texture    	= decal_hero_evil
  Style       =	SHADOW_ALPHA_DECAL
  OpacityMin     =	50%	
  OpacityMax     =	100%
  MinRadius    = 40
  MaxRadius    = 200
  MaxSelectedUnits	= 40
	End	
END

commandset.ini
CommandSet SarumanCommandSet
	1  = Command_SpecialAbilityIsengardWizardBlast
	2  = Command_SarumanFireball
	3  = Command_SpecialAbilityDominateEnemy
	4  = Command_SpecialAbilitySpeechCraft
	5  = Command_SarumanLeadership
	6  = Command_VisionOfOrthanc
	13 = Command_AttackMove
	14 = Command_Stop
	15 = Command_Guard
End

commandbutton.ini
CommandButton Command_VisionOfOrthanc
Command = SPECIAL_POWER
SpecialPower = SpecialAbilityHugePalantir
TextLabel = CONTROLBAR:PalantirVision
ButtonImage = SBEvil_PalantirVision
ButtonBorderType = ACTION; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:TooltipPalantirVision
InPalantir = Yes
End

evilfactionunits.ini under saruman's engineering parameters
;;;;;Huge Palantir Special Power;;;;;;
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_HugePalantir
SpecialPowerTemplate = SpecialAbilityHugePalantir
TriggeredBy = Upgrade_SpecialAbilityHugePalantir
End

Behavior = OCLSpecialPower ModuleTag_OCLSpecialPower
SpecialPowerTemplate = SpecialAbilityHugePalantir
OCL = OCL_SpecialPowerHugePalantir
CreateLocation = USE_OWNER_OBJECT
StartsPaused = yes
SetModelCondition = ModelConditionState:USER_1
SetModelConditionTime = 8.1
End


thanks a lot

Edited by Valarauko, 09 July 2005 - 12:31 AM.


#4 GothmogtheOrc

GothmogtheOrc

    Ruler of the Morgul Vale

  • Hosted
  • 2,263 posts
  • Location:USA
  • Projects:Kings of the West Mod
  •  T3A Chamber Member - Retired

Posted 07 July 2005 - 10:42 PM

Here is one thing that you could change:

specialpower.ini

SpecialPower SpecialPowerHugePalantir
Enum = SPECIAL_SPAWN_ORCS
ReloadTime = 300000
PublicTimer = No
InitiateAtLocationSound = SpellPalantirVision
End

To:

SpecialPower SpecialPowerHugePalantir
Enum = SPECIAL_SPELL_BOOK_PALANTIR_VISION
ReloadTime = 300000
PublicTimer = No
RadiusCursorRadius	= 300.0
InitiateAtLocationSound = SpellPalantirVision
End

Change that and give it a try... and let me know if it works.
I'll keep looking and see if I can find anything else.

-GothmogtheOrc

Nine%20rings.jpg
Click on my Sig to go to my BFME Modding site where you can download my mods.
KotW%20Morgul%20In-game.jpg
Kings of the West Mod Leader
*Retired. PM me if you need to get a hold of me as I'll get an email notification and should reply within a day or so*


#5 Valarauko

Valarauko
  • Members
  • 33 posts

Posted 07 July 2005 - 11:22 PM

i tried changing the specialpower but got the same error :sad:

i'll also try to look for something else wrong, i might get lucky...

thanks

#6 GothmogtheOrc

GothmogtheOrc

    Ruler of the Morgul Vale

  • Hosted
  • 2,263 posts
  • Location:USA
  • Projects:Kings of the West Mod
  •  T3A Chamber Member - Retired

Posted 07 July 2005 - 11:31 PM

Well, here is another thing you might try:

Change the names of all these Module_Tag's to any name you want...

Object PalantirVisionPing2

EvaEnemyUnitSightedEvent = None ; Not a real unit

; ***DESIGN parameters ***
VisionRange    = 20000000000000.0
EditorSorting  = SYSTEM
KindOf = NO_COLLIDE IMMOBILE UNATTACKABLE IGNORE_FOR_VICTORY IGNORE_FOR_EVA_SPEECH_POSITION MOVE_ONLY;INERT
ThreatLevel = 0
; *** ENGINEERING Parameters ***
Body = ActiveBody ModuleTag_new1
MaxHealth = 999999
InitialHealth = 999999
End

;;; ???? I don't think this works right -- shouldn't it be a DeletionUpdate?
;;; LifetimeUpdate can't kill ImmortalBody
Behavior = LifetimeUpdate ModuleTag_new2
MinLifetime  = 120000
MaxLifetime  = 120000
End

; Gives ally trrops bonus
Behavior = AttributeModifierAuraUpdate ModuleTag_new3
StartsActive = Yes;If no, requires upgrade to turn on.
BonusName  = PalantirVision
RefreshDelay = 1000
Range  = 200
ObjectFilter = ANY +ORC +URUK +CAVALRY -STRUCTURE -BASE_FOUNDATION -HERO
End

; Detects other stealth units
Behavior = StealthDetectorUpdate StealthDetector2UpdateModuleTag
DetectionRate  = 500  ; how often to rescan for stealthed things in my sight (msec)
End

End


See if that works... (I doubt it will, but it can't hurt to try...)

-GothmogtheOrc

Nine%20rings.jpg
Click on my Sig to go to my BFME Modding site where you can download my mods.
KotW%20Morgul%20In-game.jpg
Kings of the West Mod Leader
*Retired. PM me if you need to get a hold of me as I'll get an email notification and should reply within a day or so*


#7 Valarauko

Valarauko
  • Members
  • 33 posts

Posted 07 July 2005 - 11:53 PM

that wasn't it either :sad:

but you're right trying didnt hurt

Edited by Valarauko, 07 July 2005 - 11:54 PM.


#8 Celeglin

Celeglin

    Silhouette of a Serenade

  • Hosted
  • 2,468 posts
  • Projects:The Elven Alliance, Rhovanion Alliance
  •  T3A Team Chamber Member

Posted 08 July 2005 - 03:28 AM

I've done something similar with my Galadriel. Unfortunately though, I'm way too tired right now to remember what exactly I did. In the morning, I'll post up as much coding for you as I can remember using. Sorry for the delay!

Posted Image
Posted Image


#9 Celeglin

Celeglin

    Silhouette of a Serenade

  • Hosted
  • 2,468 posts
  • Projects:The Elven Alliance, Rhovanion Alliance
  •  T3A Team Chamber Member

Posted 08 July 2005 - 01:26 PM

Sorry for the double post. Here's all the stuff I've added:

To CommandButton.ini:
CommandButton Command_SpecialAbilityGaladrielVision
  Command           = SPECIAL_POWER
  SpecialPower      = SpecialAbilityGaladrielVision
  TextLabel         = CONTROLBAR:GaladrielVision
  ButtonImage       = HSGaladrielVision
  Options           = NEED_TARGET_POS
  RadiusCursorType  = PALANTIR_VISION
  CursorName        = Bombard
  InvalidCursorName = GenericInvalid  
  ButtonBorderType  = ACTION
  DescriptLabel     = CONTROLBAR:TooltipPalantirVision
  InPalantir     = Yes
  PresetRange     = 30.0
End

To CommandSet.ini (3rd entry):
CommandSet GaladrielCommandSet
	1  = Command_SpecialAbilityGaladrielHeal
	2  = Command_GaladrielLeadership
	3  = Command_SpecialAbilityGaladrielVision
	4  = Command_ElvenGaladrielLight
	5 = Command_SpecialAbilityGaladrielSphere
	6  = Command_SpecialAbilityGaladrielQueen	
	13 = Command_AttackMove
	14 = Command_Stop
        15 = Command_Guard
End

To ExperienceLevels.ini (Level 5):
ExperienceLevel	GaladrielLevel5
	TargetNames      =	ElvenGaladriel
	RequiredExperience    =	Galadriel_LVL5_EXP_NEEDED 
	ExperienceAward    	=	Galadriel_LVL5_EXP_AWARD	
	AttributeModifiers    =	HeroLevelUpDamage4
	Rank      	=	5
	LevelUpFx      =	FX:GandalfLevelUp1FX
;LevelUpOCL      =	OCL_GandalfLevelUp1OCL
	Upgrades      =	Upgrade_GaladrielVision
	SelectionDecal
  Texture      =	decal_hero_good
  Style      =	SHADOW_ALPHA_DECAL
  OpacityMin    	=	50%	
  OpacityMax    	=	100%
  MinRadius    	=	40;16
  MaxRadius    	=	200;16
  MaxSelectedUnits  	=	40;1
	End
END

To ObjectCreationList.ini:
;;;;;GALADRIEL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;
; ---------------------------------------------------------------------------------------
ObjectCreationList OCL_SpawnGaladrielVisionEgg
    CreateObject
    ObjectNames = PalantirVisionPing
    Count = 1
  End
End

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;

To SpecialPower.ini:
;------------------------------------------------------------------------------
SpecialPower SpecialAbilityGaladrielVision
	Enum    = SPECIAL_SPAWN_OATHBREAKERS
	ReloadTime  	= 150000 
	PublicTimer  	= No
	RadiusCursorRadius	= 200.0
	InitiateAtLocationSound       = SpellPalantirVision
End

To Upgrade.ini:
Upgrade Upgrade_GaladrielVision
	Type	= OBJECT
End

This is where I think you've made your error (as I can't find anywhere in your code the object coding for "SpecialPowerHugePalantir". You've made one for your PalantirVisionPing2, but not for SpecialPowerHugePalantir. Notice how above, in my own ObjectCreationList stuff, I have SpawnGaladrielVisionEgg? This is in the same spot as your SpecialPowerHugePalantir. As a result, you'll need similar coding here:
To NewProjectiles.ini (this is an ini I've made myself. You can put this bit of code in GoodFactionSubobjects.ini if you want)
;--------------- Galadriel Vision --------------------------------------------------------------------------
Object SpawnGaladrielVisionEgg
	Draw = W3DScriptedModelDraw ModuleTag_Draw
  DefaultModelConditionState
  	Model = None
  End
	End

  VisionRange = 200

	KindOf = INERT IMMOBILE UNATTACKABLE
	
	Body = ActiveBody ModuleTag_MakesKillWork
  MaxHealth = 1
	End
	Behavior = LifetimeUpdate ModuleTag_HatchTrigger
  MinLifetime = 10000
  MaxLifetime = 10000
	End

End

And to Galadriel.ini:
;-------------------------Visions------------
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_AragornOathbreakersEnabler
  SpecialPowerTemplate = SpecialAbilityGaladrielVision
  TriggeredBy = Upgrade_GaladrielVision
	End

	Behavior = OCLSpecialPower ModuleTag_OCLSpecialPower
  SpecialPowerTemplate	= SpecialAbilityGaladrielVision
  OCL    = OCL_SpawnGaladrielVisionEgg
  CreateLocation  	= CREATE_AT_LOCATION
  StartsPaused  	= No
  SetModelCondition  = ModelConditionState:LEVELED
  SetModelConditionTime  = 8.1
	End

You'll of course have to change quite a few things to suit your needs, but this is the basis of what you'll need. Unfortunately, the Palantir "object" can only be summoned directly beside Galadriel. However, since you are making your's reveal the entire map, this shouldn't be an issue. I have not yet figured out how to make it so you don't have to click a target to use the ability and it will just be activated when the button is clicked (I'm looking for this as I'm going to do something very similar to what you're doing with your Saruman).

Edited by Celeglin, 08 July 2005 - 01:34 PM.

Posted Image
Posted Image


#10 Valarauko

Valarauko
  • Members
  • 33 posts

Posted 09 July 2005 - 12:30 AM

Thanks Celeglin!!!! ^_^

Using that as a guideline I got it to work! ;)

Again, thanks a lot! ;)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users