[en] - Modding Corner > General Modding Questions
Spell Books (coding)
KingThranduil:
I want to add in Rohan Aragorn, Legolas and Gimli, but they are in SpellBook. How do I change this ability to another? (I do not want to remove the time. I want to replace it with another)
Lostir:
With which ability do you want to replace the Spell? That is the most important thing.
It would be easiest to just change the effect an summon something else instead.
KingThranduil:
1) I want to replace with spell "Friends of the Old Forest"(Tom Bombadil and Goldberry).
2) possible instead them(Aragorn, Legolas and Gimli) do Gandalf for a while?
Lostir:
1 and 2 are the same for coding.
The easiest way is, you look for the OCL of the Spell with Aragorn Legolas un Gimli:
--- Code: ---ObjectCreationList OCL_SpawnBandderGefährten
CreateObject
ObjectNames = GondorAragornEntwicklung2_Summoned
Count = 1
FadeIn = Yes
FadeTime = 10000
IgnoreCommandPointLimit = Yes
Disposition = SPAWN_AROUND
DispositionAngle = 90 ;SpawnAround uses this as the arc between guys
DispositionIntensity = 0 ; and this for distance from center
End
CreateObject
ObjectNames = LothlorienLegolas_SummonedGefährten
Count = 1
FadeIn = Yes
FadeTime = 10000
IgnoreCommandPointLimit = Yes
Disposition = ABSOLUTE_ANGLE
DispositionAngle = 90 ;SpawnAround uses this as the arc between guys
Offset = X:30 Y:-30 Z:0
End
CreateObject
ObjectNames = DwarvenGimli_SummonedGefährten
Count = 1
FadeIn = Yes
FadeTime = 10000
IgnoreCommandPointLimit = Yes
Disposition = ABSOLUTE_ANGLE
DispositionAngle = 90 ;SpawnAround uses this as the arc between guys
Offset = X:-30 Y:30 Z:0
End
End
--- Ende Code ---
And you replace everything, but the OCL name with the OCL of Tom Bombadil so you get:
--- Code: ---ObjectCreationList OCL_SpawnBandderGefährten
CreateObject
ObjectNames = TomBombadil_Summoned
Count = 1
FadeIn = Yes
FadeTime = 4000
IgnoreCommandPointLimit = Yes
Disposition = LIKE_EXISTING
DispositionAngle = 120 ;SpawnAround uses this as the arc between guys
DispositionIntensity = 200 ; and this for distance from center
End
CreateObject
ObjectNames = GasthausGoldbeere_Summoned
Count = 1
FadeIn = Yes
FadeTime = 4000
IgnoreCommandPointLimit = Yes
Disposition = LIKE_EXISTING
DispositionAngle = 120 ;SpawnAround uses this as the arc between guys
DispositionIntensity = 200 ; and this for distance from center
Offset = X:20.0 Y:0.0 Z:0.0
End
End
--- Ende Code ---
And in addition you replace the Image and the Label in the Commandbutton:
--- Code: ---CommandButton Command_SpellBookBandderGefährten
Command = SPELL_BOOK
SpecialPower = SpellBookBandderGefährten
ButtonImage = HSGoldbeereandBombadil
Options = NEED_TARGET_POS ; Huh, you can't have this flag and a radius cursor: CONTEXTMODE_COMMAND
TextLabel = CONTROLBAR:SummonTomBombadilundGoldbeere
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:TooltipSummonTomBombadilundGoldbeere
RadiusCursorType = DunedainAlliesRadiusCursor
CursorName = AttackObj
InvalidCursorName = GenericInvalid
End
CommandButton Command_PurchaseSpellBandderGefährten
Command = PURCHASE_SCIENCE
ButtonBorderType = UPGRADE
ButtonImage = HSGoldbeereandBombadil
Science = SCIENCE_DieDreiJäger
TextLabel = CONTROLBAR:SummonTomBombadilundGoldbeere
DescriptLabel = CONTROLBAR:TooltipSummonTomBombadilundGoldbeere
End
--- Ende Code ---
All in all you get the exactly the other spell, but the reload time stays the same.
Lostir:
The OCL is in the data\ini\includes\objectcreationlist.inc
The Commandbuttons are in the data\ini\includes\commandbutton.inc
Navigation
[0] Themen-Index
[#] Nächste Seite
[*] Vorherige Sete
Zur normalen Ansicht wechseln