Здравствуйте! Авторизуйтесь или зарегистрируйтесь, чтобы использовать полный функционал сайта
Быстрая авторизация через соцсети:

Главная » Статьи » Моддинг » Коддинг
Заклинание "Тёмное лечение"

А сейчас я напишу, как сделать заклинание "Тёмное лечение". Оно будет немного оригинальным: лечит не так эффективно, но ослабляет врагов на зоне применения. Сделаем Мордору его вместо "Осквернённой земли"
И так, начнём.
Нам понадобятся следующие адреса:
1.data\ini\commandbutton.ini.
2.data\ini\commandset.ini.
3.data\ini\science.ini.
4.data\ini\object\system\system.ini.
5.data\ini\objectcreationlist.ini.
6.data\ini\attributemodifier.ini.
7.data\ini\specialpower.ini.
8.data\ini\fxlist.ini.
9.data\ini\fxparticlesystem.ini.


Сначала заглянем в data\ini\commandbutton.ini.
Там вставляем это:

CommandButton Command_PurchaseSpellDarkHeal
Command = PURCHASE_SCIENCE
ButtonBorderType = UPGRADE
ButtonImage = HPWitchKingCursed
Science = SCIENCE_DarkHeal
TextLabel = CONTROLBAR:DarkHeal //; it is must edit
DescriptLabel = CONTROLBAR:ToolTipDarkHeal // ;it is must edit
End


CommandButton Command_SpellBookDarkHeal
Command = SPELL_BOOK
TextLabel = CONTROLBAR:DarkHeal // ;it is must edit
Options = NEED_TARGET_POS
DescriptLabel = CONTROLBAR:ToolTipDarkHeal // ;it is must edit
SpecialPower = SpellBookDarkHeal
ButtonImage = HPWitchKingCursed
ButtonBorderType = ACTION
RadiusCursorType = HealRadiusCursor
End


Затем идём в data\ini\commandset.ini.
Там находим это:

CommandSet MordorSpellBookCommandSet
1 = Command_SpellBookTaint
2 = Command_SpellBookEyeofSauron
3 = Command_SpellBookWarChant

4 = Command_SpellBookIndustry
5 = Command_SpellBookBarricade
6 = Command_SpellBookUntamedAllegiance
7 = Command_SpellBookArrowVolleyEvil

8 = Command_SpellBookEvilBombard
9 = Command_SpellBookDarkness
10 = Command_SpellBookAwakenWyrm

11 = Command_SpellBookBalrogAlly
12 = Command_SpellBookRainOfFire
End

CommandSet MordorSpellStoreCommandSet
1 = Command_PurchaseSpellTaint
2 = Command_PurchaseSpellEyeofSauron
3 = Command_PurchaseSpellWarChant

4 = Command_PurchaseSpellIndustry ; ;Command_PurchaseSpellBarricade
5 = Command_PurchaseSpellUntamedAllegiance
6 = Command_PurchaseSpellBarricade ; ;Command_PurchaseSpellIndustry
7 = Command_PurchaseSpellArrowVolleyEvil

8 = Command_PurchaseSpellEvilBombard ; ;Command_PurchaseSpellAwakenWyrm
9 = Command_PurchaseSpellDarkness
10 = Command_PurchaseSpellAwakenWyrm ; ;Command_PurchaseSpellEvilBombard

11 = Command_PurchaseSpellBalrogAlly
12 = Command_PurchaseSpellRainOfFire
End


И заменяем на это:

CommandSet MordorSpellBookCommandSet
1 = Command_SpellBookDarkHeal ;Command_SpellBookTaint
2 = Command_SpellBookEyeofSauron
3 = Command_SpellBookWarChant

4 = Command_SpellBookIndustry
5 = Command_SpellBookBarricade
6 = Command_SpellBookUntamedAllegiance
7 = Command_SpellBookArrowVolleyEvil

8 = Command_SpellBookEvilBombard
9 = Command_SpellBookDarkness
10 = Command_SpellBookAwakenWyrm

11 = Command_SpellBookBalrogAlly
12 = Command_SpellBookRainOfFire
End

CommandSet MordorSpellStoreCommandSet
1 = Command_PurchaseSpellDarkHeal ;Command_PurchaseSpellTaint
2 = Command_PurchaseSpellEyeofSauron
3 = Command_PurchaseSpellWarChant

4 = Command_PurchaseSpellIndustry ; ;Command_PurchaseSpellBarricade
5 = Command_PurchaseSpellUntamedAllegiance
6 = Command_PurchaseSpellBarricade ; ;Command_PurchaseSpellIndustry
7 = Command_PurchaseSpellArrowVolleyEvil

8 = Command_PurchaseSpellEvilBombard ; ;Command_PurchaseSpellAwakenWyrm
9 = Command_PurchaseSpellDarkness
10 = Command_PurchaseSpellAwakenWyrm ; ;Command_PurchaseSpellEvilBombard

11 = Command_PurchaseSpellBalrogAlly
12 = Command_PurchaseSpellRainOfFire
End


Далее пропишем в data\ini\science.ini это в любое место, только ниже SCIENCE_MORDOR и выше тех "сайнсов", которые будут от него зависеть:

Science SCIENCE_DarkHeal
PrerequisiteSciences = SCIENCE_EVIL OR SCIENCE_MORDOR
SciencePurchasePointCost = EVIL_RANK_1_COST
SciencePurchasePointCostMP = 5
IsGrantable = Yes
End


Потом там же отредактируем два зависящих от него "сайнса":

Science SCIENCE_Industry
PrerequisiteSciences = SCIENCE_EVIL SCIENCE_UntamedAllegiance OR SCIENCE_EVIL SCIENCE_Devastation OR SCIENCE_ISENGARD SCIENCE_Crebain OR SCIENCE_MORDOR SCIENCE_DarkHeal; ;SCIENCE_MORDOR SCIENCE_Taint OR SCIENCE_MORDOR SCIENCE_EyeofSauron OR SCIENCE_MORDOR SCIENCE_WarChant
SciencePurchasePointCost = EVIL_RANK_3_COST
SciencePurchasePointCostMP = 10
IsGrantable = Yes
End

Science SCIENCE_UntamedAllegiance
PrerequisiteSciences = SCIENCE_EVIL SCIENCE_Taint OR SCIENCE_EVIL SCIENCE_Scavenger OR SCIENCE_MORDOR SCIENCE_EyeofSauron OR SCIENCE_WILD SCIENCE_Taint OR SCIENCE_WILD SCIENCE_CaveBats OR SCIENCE_MORDOR SCIENCE_DarkHeal; ;SCIENCE_MORDOR SCIENCE_Taint
SciencePurchasePointCost = EVIL_RANK_2_COST
SciencePurchasePointCostMP = 10
IsGrantable = Yes
End


Потом заходим в data\ini\object\system\system.ini. Там прописываем саму способность только в рамках объекта EvilSpellBook или MordorSpellBook:

Behavior = PlayerHealSpecialPower ModuleTag_Heal
SpecialPowerTemplate = SpellBookDarkHeal
HealAffects = INFANTRY CAVALRY SHIP DOZER
HealAmount = 0.5
HealRadius = 200
HealFX = FX_SpellDarkHealUnitHealBuff
; To replenish hordes a bit
HealOCL = OCL_DarkHealSpellHordeReplenishPing
AvailableAtStart = No
RequirementsFilterMPSkirmish = SPELL_BOOK_REQUIREMENTS_FILTER
RequirementsFilterStrategic = SPELL_BOOK_REQUIREMENTS_FILTER_STRATEGIC
End
Behavior = AISpecialPowerUpdate SpellBookDarkHealAI
CommandButtonName = Command_SpellBookDarkHeal
SpecialPowerAIType = AI_SPELLBOOK_HEAL
SpecialPowerRadius = 100
End


Затем прописываем призыв объекта в data\ini\objectcreationlist.ini:

; ---------------------------------------------------------------------------------------
ObjectCreationList OCL_DarkHealSpellHordeReplenishPing
CreateObject
ObjectNames = DarkHealSpellHordeReplenishPing
Count = 1
End
End


Возвращаемся в data\ini\object\system\system.ini, вниз добавляем это:

;------------------------------------------------------------------------------
Object DarkHealSpellHordeReplenishPing

EvaEnemyObjectSightedEvent = None ; Not a real unit

; ***DESIGN parameters ***
EditorSorting = SYSTEM
KindOf = NO_COLLIDE IMMOBILE UNATTACKABLE IGNORE_FOR_VICTORY IGNORE_FOR_EVA_SPEECH_POSITION ;INERT

; *** ENGINEERING Parameters ***
Body = ImmortalBody ModuleTag_01
MaxHealth = 10000
InitialHealth = 10000
End

Behavior = DeletionUpdate ModuleTag_DeletionUpdate ; Not LifetimeUpdate because I can't die
MinLifetime = 1000 ; Last 1 second, just long enough to replenish once
MaxLifetime = 1000
End

Behavior = BannerCarrierUpdate BannerCarrierUpdateModuleTag
IdleSpawnRate = 2000 ; spawn a new member every n seconds when idle (in miliseconds). Greater than lifetime
UnitSpawnFX = FX_BannerCarrierSpawnUnitDark; name of particle FX to use when the BannerCarrier spawns a new unit

; This object acts like a banner carrier except it spawns unit on nearby hordes instead of itself.
ReplenishNearbyHorde = Yes
ReplenishAllNearbyHordes = Yes ; Except it replenishes 1 for each horde, not 1 total
ScanHordeDistance = 280
End

Behavior = AttributeModifierAuraUpdate ModuleTag_Drawback
StartsActive = Yes
BonusName = DarkHealModifier
RefreshDelay = 2000
Range = 200
TargetEnemy = Yes
ObjectFilter = GENERIC_BUFF_RECIPIENT_OBJECT_FILTER
End
End


После этого идём в data\ini\attributemodifier.ini, чтобы прописать эффект. Там вставляем это:

ModifierList DarkHealModifier
Category = DEBUFF
Modifier = ARMOR -25%
Modifier = DAMAGE_MULT 75%
Modifier = SPEED 60%
Modifier = EXPERIENCE 50%
Duration = 30000
FX = FX_GenericDebuff30
End


Теперь пора прописать визуальныё эффекты. Для этого заходим в data\ini\fxlist.ini.
Там добавляем:

; ----------------------------------------------

FXList FX_SpellDarkHealUnitHealBuff
;Sound
; Name = SpellHeal ;this FX gets triggered over and over constantly and we don't want this sound to be playing that often
; End
BuffNugget
BuffType = Healing
BuffInfantryTemplate = HealingBuff
BuffCavalryTemplate = HealingBuff
BuffTrollTemplate = HealingBuff
BuffShipTemplate = HealingBuffBig
BuffMonsterTemplate = HealingBuffBig
IsComplexBuff = No
BuffLifeTime = 2400
End
ParticleSystem
Name = SpellDarkHeal
Offset = X:0.0 Y:0.0 Z:3.0
End
End

;-----------------------
FXList FX_BannerCarrierSpawnUnitDark
Sound
Name = GenericRespawn1
End
ParticleSystem
Name = HordeResEvilDarkCenter
Offset = X:0.0 Y:0.0 Z:1.0
End
ParticleSystem
Name = HordeResEvilDarkLightShaft
Offset = X:0.0 Y:0.0 Z:1.0
End
ParticleSystem
Name = HordeResEvilDarkVortex
Offset = X:0.0 Y:0.0 Z:1.0
End
ParticleSystem
Name = HordeResEvilDarkWave
Offset = X:0.0 Y:0.0 Z:1.0
End
End



Далее направляемся в data\ini\fxparticlesystem.ini.
Там вставляем:

FXParticleSystem SpellDarkHeal
System
Priority = ALWAYS_RENDER
ParticleName = EXHPicsubtle.tga
Lifetime = 40 40
SystemLifetime = 1
SortLevel = 1
BurstDelay = 2 2
BurstCount = 1 1
IsGroundAligned = Yes
End
Color = DefaultColor
Color2 = R:120 G:50 B:240 20
Color3 = R:0 G:0 B:0 40
End
Alpha = DefaultAlpha
End
Update = DefaultUpdate
SizeRate = 5 5
SizeRateDamping = 0.9 0.95
AngleZ = 0 7
AngularRateZ = -0.1 0.1
AngularDamping = 1 1
AngularDampingXY = 1 1
End
Physics = DefaultPhysics
VelocityDamping = 1 1

End
EmissionVelocity = OrthoEmissionVelocity
End
EmissionVolume = LineEmissionVolume
EndPoint = X:0 Y:0 Z:20
End
Draw = DefaultDraw
End
End

FXParticleSystem HordeResEvilDarkCenter
System
Priority = VERY_LOW_OR_ABOVE
ParticleName = EXexplo01.tga
Lifetime = 10 10
SystemLifetime = 25
SortLevel = 1
BurstCount = 2 2
InitialDelay = 10 10
End
Color = DefaultColor
Color1 = R:200 G:0 B:0 0
Color2 = R:0 G:0 B:0 10
End
Update = DefaultUpdate
SizeRate = 2.5 2.5
SizeRateDamping = 0.9 0.95
AngleZ = -3 3
AngularDamping = 1 1
AngularDampingXY = 1 1

End
Physics = DefaultPhysics
Gravity = 0.08
VelocityDamping = 0.8 0.85
End
EmissionVelocity = OutwardEmissionVelocity
End
EmissionVolume = PointEmissionVolume
End
Draw = DefaultDraw
End
End

FXParticleSystem HordeResEvilDarkLightShaft
System
Priority = MEDIUM_OR_ABOVE
Shader = W3D_EMISSIVE
Type = DRAWABLE
ParticleName = EXLight01.W3D
Lifetime = 60 60
SystemLifetime = 25
SortLevel = 1
Size = 0.1 0.1
BurstDelay = 5 5
BurstCount = 2 4
End
Color = DefaultColor
Color1 = R:205 G:00 B:00 0
Color2 = R:0 G:0 B:0 60
End
Alpha = DefaultAlpha
Alpha2 = 0.1 0.1 10
Alpha3 = 0 0 75
End
Update = RenderObjectUpdate
StartSizeX = 0.05 0.05
StartSizeY = 0.05 0.05
StartSizeZ = 0.05 0.05
SizeRateX = 0.1 0.1
SizeRateY = 0.1 0.1
SizeRateZ = 0.05 0.05
SizeDampingX = 0.9 0.9
SizeDampingY = 0.9 0.9
SizeDampingZ = 0.98 0.98
AngleZ = -5 5
Rotation = ROTATE_Z

End
Physics = DefaultPhysics
VelocityDamping = 1 1
End
EmissionVelocity = OrthoEmissionVelocity
End
EmissionVolume = PointEmissionVolume
End
Draw = RenderObjectDraw
End
End

FXParticleSystem HordeResEvilDarkVortex
System
Priority = ALWAYS_RENDER
ParticleName = EXLnzFlar6.tga
Lifetime = 30 30
SystemLifetime = 25
SortLevel = 1
Size = 5 5
BurstDelay = 1 1
BurstCount = 3 3
IsParticleUpTowardsEmitter = Yes
End
Color = DefaultColor
Color2 = R:205 G:35 B:10 5
End
Update = DefaultUpdate
SizeRateDamping = 1 1
AngularDamping = 1 1
AngularDampingXY = 1 1
End
Physics = DefaultPhysics
VelocityDamping = 1.05 1.05
End
EmissionVelocity = OutwardEmissionVelocity
Speed = -0.4 -0.4
End
EmissionVolume = SphereEmissionVolume
IsHollow = Yes
Radius = 25
End
Draw = DefaultDraw
End
End

FXParticleSystem HordeResEvilDarkWave
System
Priority = ALWAYS_RENDER
ParticleName = EXStarburstBW.tga
Lifetime = 50 50
SystemLifetime = 25
SortLevel = 1
Size = 40 40
StartSizeRate = 1 4
BurstDelay = 1 3
BurstCount = 2 4
IsGroundAligned = Yes
End
Color = DefaultColor
Color2 = R:240 G:50 B:30 20
Color3 = R:0 G:0 B:0 50
End
Update = DefaultUpdate
SizeRate = -3 -3
SizeRateDamping = 0.95 0.95
AngleZ = -0.5 0.5
AngularDamping = 1 1
AngularDampingXY = 1 1
End
Physics = DefaultPhysics
VelocityDamping = 0 8.07921e+33
End
EmissionVelocity = OrthoEmissionVelocity
End
EmissionVolume = PointEmissionVolume
End
Draw = DefaultDraw
End
End



И, наконец, заглянем в data\ini\specialpower.ini. Там вставляем вот это:

;------------------------------------------------------------------------------
SpecialPower SpellBookDarkHeal
InitiateAtLocationSound = SpellHeal
Enum = SPECIAL_SPELL_BOOK_HEAL
Flags = WATER_OK RESPECT_RECHARGE_TIME_DISCOUNT
ReloadTime = 180000
RequiredSciences = SCIENCE_DarkHeal
RadiusCursorRadius = 200
End


Вот и всё!
P.S. Можно изменить текст способности (а то будут "миссинги"), о том, как это делать вы сможете прочитать Здесь.
Tutorial by Akrahil. Копировать запрещено!




Оценить:
Просмотров: 3037 | Комментарии: 2 | Рейтинг: 4.0/8
Категория: Коддинг | Добавил: Akrahil (24.07.2012)
ПОХОЖИЕ МАТЕРИАЛЫ

Всего комментариев: 2
avatar
2 Akrahil • 09:35, 26.07.2012
Ну, вот, вроде всё.
avatar
1 Mitrandir • 00:24, 26.07.2012
Визуальные какие изменения?
avatar