Jump to content


Photo

Attribute Modifier


  • Please log in to reply
19 replies to this topic

#1 Hobbitccd17

Hobbitccd17
  • New Members
  • 28 posts

Posted 20 July 2007 - 12:42 AM

Alright there is no tutorial on this so i need someones help! Im trying to add a passive power to a hero that upgrades his armor when he reaches a certain level. All i know is that it involves attritbutemodifier.ini. Can anyone tell me how to go about doing this???

#2 Radspakr Wolfbane

Radspakr Wolfbane

    The John Farnham of modding

  • Members
  • 7,722 posts
  • Location:less than 5 meters from my bed
  • Projects:Comeback tour
  •  The Retired Beard

Posted 20 July 2007 - 09:35 AM

This code is from Eomer first off add this code to the hero.
   ;;; PASSIVE OUTLAW LEADERSHIP;;;	
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_TheodenLeadership2
		SpecialPowerTemplate = SpecialAbilityFakeLeadership2
		TriggeredBy = Upgrade_EomerOutlawLeader
	End
	Behavior = SpecialPowerModule ModuleTag_TheodenLeadershipUpdate2 
		SpecialPowerTemplate	  = SpecialAbilityFakeLeadership2
		UpdateModuleStartsAttack  = No
		StartsPaused = Yes
	End	
	Behavior = AttributeModifierAuraUpdate ModuleTag_Leadership2
		StartsActive	= No;If no, requires upgrade to turn on.
		BonusName		= EomerPassiveOutlawLeadership
		TriggeredBy		= Upgrade_EomerOutlawLeader
		RefreshDelay	= 2000
		Range			= 200
		AllowSelf		= Yes		
		ObjectFilter	= ANY +CAVALRY +INFANTRY -STRUCTURE -BASE_FOUNDATION
	End  

Now make a couple modifications first off the AttributeModifier Range
Range			= 200
change the 200 to 1

next change the Attribute Modifier name to whatever you want to call it this will be the one referenced in AttributeModifier.ini
I'll change it to EomerArmorUpgrade

so it should look like this

   ;;; PASSIVE OUTLAW LEADERSHIP;;;	
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_TheodenLeadership2
		SpecialPowerTemplate = SpecialAbilityFakeLeadership2
		TriggeredBy = Upgrade_EomerOutlawLeader
	End
	Behavior = SpecialPowerModule ModuleTag_TheodenLeadershipUpdate2 
		SpecialPowerTemplate	  = SpecialAbilityFakeLeadership2
		UpdateModuleStartsAttack  = No
		StartsPaused = Yes
	End	
	Behavior = AttributeModifierAuraUpdate ModuleTag_Leadership2
		StartsActive	= No;If no, requires upgrade to turn on.
		BonusName		= EomerArmorUpgrade
		TriggeredBy		= Upgrade_EomerOutlawLeader
		RefreshDelay	= 2000
		Range			= 1
		AllowSelf		= Yes		
		ObjectFilter	= ANY +CAVALRY +INFANTRY -STRUCTURE -BASE_FOUNDATION
	End  

now go to ExperienceLevels.ini and add the upgrade to the Hero and for the level you want.
Next go to AttributeModifier.ini and the following code
ModifierList EomerArmorUpgrade
	Category = SPELL
	Modifier = ARMOR 50%
	Duration = 0				   ; Duration is forever when set to 0
End

This will add 50% armour to the Hero at the level you decided now just add to the commandset.
And that should do it.

Break dancing into the hearts of millions


#3 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 20 July 2007 - 09:46 AM

That way works, though there is another Module specially designed for that purpose:

Behavior = AttributeModifierUpgrade ModuleTag_AndurilBonus
		TriggeredBy = Upgrade_Anduril
		AttributeModifier = SpellBookAnduril
	End
Use that instead of the AttributeModifierAuraUpdate.

revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#4 Radspakr Wolfbane

Radspakr Wolfbane

    The John Farnham of modding

  • Members
  • 7,722 posts
  • Location:less than 5 meters from my bed
  • Projects:Comeback tour
  •  The Retired Beard

Posted 20 July 2007 - 12:49 PM

Oh yeah I forgot about that one.

Break dancing into the hearts of millions


#5 Hobbitccd17

Hobbitccd17
  • New Members
  • 28 posts

Posted 20 July 2007 - 02:50 PM

Radspar, i did exactly what you said but when i went to start up the game a error message came up saying it had something to do with 'behavior' in my heroes ini file. Do you know what happened????

#6 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 20 July 2007 - 02:53 PM

Post the error message, then we can help.

revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#7 Hobbitccd17

Hobbitccd17
  • New Members
  • 28 posts

Posted 20 July 2007 - 03:05 PM

This is what i added in my heros ini file.




;;; PASSIVE OUTLAW LEADERSHIP ;;;
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_TheodenLeadership2
SpecialPowerTemplate = SpecialAbilityFakeLeadership2
TriggeredBy = Upgrade_EomerOutlawLeader
End
Behavior = SpecialPowerModule ModuleTag_TheodenLeadershipUpdate2
SpecialPowerTemplate = SpecialAbilityFakeLeadership2
UpdateModuleStartsAttack = No
StartsPaused = Yes
End
Behavior = AttributeModifierAuraUpdate ModuleTag_Leadership2
StartsActive = No ;If no, requires upgrade to turn on.
BonusName = FrodoMithrilVest
TriggeredBy = Upgrade_EomerOutlawLeader
RefreshDelay = 2000
Range = 1
AllowSelf = Yes
ObjectFilter = ANY +CAVALRY +INFANTRY -STRUCTURE -BASE_FOUNDATION
End








The error message is:



" Unknown field 'Behavior' in block 'Object'.

Error parsing field 'Behavior' in block 'Object' in file 'Data\INI\Object\goodfaction\units\rohan\frodo.ini',line 1008

Error parsing field 'Behavior' in block 'Object' in file 'Data\INI\Object\goodfaction\units\rohan\frodo.ini',line 1008



Error parsing INI block ' Behavior' in file 'Data\INI\Object\goodfaction\units\rohan\frodo.ini'.
5 adresses:
(unknown)(0): game.dat+8961088 Debug::PostStaticInit+3296
(unknown)(0): game.dat+502829 StringBase<char>::startsWith+193933
(unknown)(0): game.dat+521227 StringBase<char>::startsWith+212331
(unknown)(0): game.dat+10449993 Xfer::operator==+133593
(unknown)(0): kernel32.dll+93519RegisterWaitForInputIdle+73"

#8 GothmogtheOrc

GothmogtheOrc

    Ruler of the Morgul Vale

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

Posted 20 July 2007 - 07:51 PM

You'll need to post the code before and after as well... it would probably be easiest to just attach your frodo.ini file.

The reason you got this error is because you are missing an "End" code somewhere, probably right above your new code.

-Gto

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*


#9 Hobbitccd17

Hobbitccd17
  • New Members
  • 28 posts

Posted 20 July 2007 - 08:24 PM

Thanks Gothmogtheorc. I added in a End and fixed the error, but when i went to start it up a different error appeared. I have no idea what is wrong this time.


Here is the error:


"Unknown field 'AwardXPForTriggering' in block 'Object'.

Error parsing field 'AwardXPForTriggering' in block 'Object' in file 'Data\INI\Object\goodfaction\units\rohan\frodo.ini'."


Thats pretty much everything important. If you need me to copy my frodo.ini then just ask.

#10 GothmogtheOrc

GothmogtheOrc

    Ruler of the Morgul Vale

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

Posted 20 July 2007 - 09:51 PM

yes please go ahead and attach it.... not copy in... attach as a seperate file. When you are writing your post you'll see below the text box and above the "Add Reply" button an area that says: File Attachments. Click the browse button, find the frodo.ini file and then click Add this Attachment. That way it doesn't take up a full page when you reply.

The problem is that you are still missing an end somewhere... but without looking at the code I don't know why or where exactly.

-Gto

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*


#11 Hobbitccd17

Hobbitccd17
  • New Members
  • 28 posts

Posted 20 July 2007 - 11:15 PM

I cant attach the ini file because i use a program which doesnt allow me to seperate ini files from inside the ini.big file. So i will copy what i added and the section where it says the problem is coming from.



Behavior = UnpauseSpecialPowerUpgrade ModuleTag_TheodenLeadership2
SpecialPowerTemplate = SpecialAbilityFakeLeadership2
TriggeredBy = Upgrade_EomerOutlawLeader
End

Behavior = SpecialPowerModule ModuleTag_TheodenLeadershipUpdate2
SpecialPowerTemplate = SpecialAbilityFakeLeadership2
UpdateModuleStartsAttack = No
StartsPaused = Yes
End

Behavior = AttributeModifierAuraUpdate ModuleTag_Leadership2
StartsActive = No ;If no, requires upgrade to turn on.
BonusName = FrodoMithrilVest
TriggeredBy = Upgrade_EomerOutlawLeader
RefreshDelay = 2000
Range = 1
AllowSelf = Yes
ObjectFilter = ANY +CAVALRY +INFANTRY -STRUCTURE -BASE_FOUNDATION
End



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; No More Animations :(
; UnpackingVariation = 2
; StartAbilityRange = 2.0
;
; UnpackTime = 1700 ; Drawing the horn
; PreparationTime = 1 ; nothing
; PersistentPrepTime = 1600 ; Blowing
; PackTime = 1666 ; Putting horn away
;
; PackSound =
; UnpackSound =
; TriggerSound =
; PrepSoundLoop =
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
AwardXPForTriggering = 0
End


; AddModule AddModuleTag_GivingRingPenalty
Behavior = OneRingPenaltyUpdate ModuleTag_SinglePlayerEyeSummoning
SpecialObjectName = EyeOfSauronFromRing ;Different from the Spell driven Stealth Detector, this is just for looks

RingTimeBeforeSpawning = 30000 ; Time ring is active before Eye spawns
TimeSpentRoamingAround = 15000 ; Time of roaming before Eye snaps to us
TimeRingPowerSuppressed = 30000 ; How long we can't use the ring for after being found
StartingDistanceFromMe = 300 ; How far the Eye is created to start wandering
TimeFrozenFromPenalty = 5000 ; How long we are paralyzed the moment we are discovered, seperate from the time our stealth is supressed
DiscoveredSound = FrodoVoiceEyeOnMe ; Sound to play when found out
End
; End

Geometry = CYLINDER
GeometryMajorRadius = 8.0
GeometryMinorRadius = 8.0
GeometryHeight = 19.2
GeometryIsSmall = Yes

Shadow = SHADOW_DECAL
ShadowSizeX = 18;
ShadowSizeY = 18;
ShadowTexture = ShadowI;
End

Edited by Hobbitccd17, 20 July 2007 - 11:17 PM.


#12 Bart

Bart

  • Network Admins
  • 8,524 posts
  • Location:The Netherlands
  • Division:Revora
  • Job:Network Leader

Posted 20 July 2007 - 11:33 PM

you could as well have pasted it in notepad and save and attach that :p
anyway, are you using finalbig? if yes, then you can extract the files. if no...use finalbig :sad:
bartvh | Join me, make your signature small!
Einstein: "We can’t solve problems by using the same kind of thinking we used when we created them."

#13 Radspakr Wolfbane

Radspakr Wolfbane

    The John Farnham of modding

  • Members
  • 7,722 posts
  • Location:less than 5 meters from my bed
  • Projects:Comeback tour
  •  The Retired Beard

Posted 21 July 2007 - 01:02 AM

Simply search for
AwardXPForTriggering
and they'll probably be a missing "End" token

Break dancing into the hearts of millions


#14 Bart

Bart

  • Network Admins
  • 8,524 posts
  • Location:The Netherlands
  • Division:Revora
  • Job:Network Leader

Posted 21 July 2007 - 10:18 AM

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; No More Animations :(
; UnpackingVariation = 2
; StartAbilityRange = 2.0
;
; UnpackTime = 1700; Drawing the horn
; PreparationTime = 1; nothing
; PersistentPrepTime = 1600; Blowing
; PackTime = 1666; Putting horn away
;
; PackSound =
; UnpackSound =
; TriggerSound =
; PrepSoundLoop =
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
AwardXPForTriggering = 0
End
comment out the last 2 lines too
bartvh | Join me, make your signature small!
Einstein: "We can’t solve problems by using the same kind of thinking we used when we created them."

#15 Hobbitccd17

Hobbitccd17
  • New Members
  • 28 posts

Posted 21 July 2007 - 03:09 PM

"AwardXPForTriggering = 0
End "




There is an end after awardxpfortriggering

#16 Bart

Bart

  • Network Admins
  • 8,524 posts
  • Location:The Netherlands
  • Division:Revora
  • Job:Network Leader

Posted 21 July 2007 - 04:13 PM

the AwardXPForTriggering shouldn't be there at all, and the End doesn't make sense since AwardXPForTriggering is not a block
bartvh | Join me, make your signature small!
Einstein: "We can’t solve problems by using the same kind of thinking we used when we created them."

#17 Hobbitccd17

Hobbitccd17
  • New Members
  • 28 posts

Posted 21 July 2007 - 06:15 PM

Thanks 2playgames. I took it out and fixed the error. But, yet again, another error appeared in commandset.ini. So, what am i sopost to add in commandbutton.ini to make it work as a passive ability??

Edited by Hobbitccd17, 21 July 2007 - 06:18 PM.


#18 GothmogtheOrc

GothmogtheOrc

    Ruler of the Morgul Vale

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

Posted 21 July 2007 - 09:59 PM

Well, what special power template did you use?

SpecialPowerTemplate = SpecialAbilityFakeLeadership2

That one :shiftee: so now you need to find a leadership code from CommandButton.ini and make a copy of it. Then change the special power template to the one your power uses. Make sure the Command_YourButtonName matches in both CommandSet and CommandButton. Then edit the button art and description however you want (hint: there is a perfect frodo mithril vest button art that EA included but didn't use... see if you can find it :lol: ).

And that should do it ;)

Edit: one of the best ways to learn how to mod is to try things yourself... in this case you could have found an already made leadership and see how it was coded. That probably would have answered all your questions :p

-Gto

Edited by GothmogtheOrc, 21 July 2007 - 10:01 PM.

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*


#19 Hobbitccd17

Hobbitccd17
  • New Members
  • 28 posts

Posted 21 July 2007 - 11:37 PM

I got it working. Thanks Gothmogtheorc!!

#20 GothmogtheOrc

GothmogtheOrc

    Ruler of the Morgul Vale

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

Posted 23 July 2007 - 12:42 AM

You're welcome. Good job :blink:

-Gto

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*





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users