• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Zephyr Contest #15 - Model Based

Status
Not open for further replies.
the%20hive%20workshop.png


zephyr.png
contest.png
number.png
1.png
5.png


igtb5uyiqj2g1337383565232-jpg.261577



Model Based

Create one fitting spell for one of the listed models. The spell mechanics should be related to the model's visual nature, like it would look awkard for example if a mage uses some slash ability.
You may, but don't have to create a second help-ability next to the main spell if it's required for your concept. -- but in case a second ability is used, it's extend should be kept at a minimum.


Model Themes:


Human Soldier
Templar Justicar

Human Solder / Paladin
Anduin Lothar

Human Magics
Medivh the corrupted

Orc
Garrosh

Raider
Dwarven Knights

Heavy Nature
Dark Ancient

Demon
Lord Hyperion

Doctor/Witch
Vial Heart

Dragon
Varsaigen the Stormlord

Magical
Gnome Arcanist

Demon/Mechanic
InfernalWheeledWarrior

Elemental/Ice
Icecrown Overlord

Darkness
Shame

Undead
HeroAbomination


contest%20rules%20and%20conditions.png

  • Submission must follow the contest theme.
  • Submission must follow the Spell Submission Rules / Jass Submission Rules respectivly.
  • Submission may not be started / made before the official launch of the contest.
  • Teamwork is not allowed. Finding testers for your submission is not considered as teamwork.
  • The use of enhancing systems is permitted as long as their contribution is not the major aspect of the final entry. Clarification matters on certain libraries/snippets should be discussed with judges in the contest thread, in case of uncertainty.
  • Third party programs, except Jass New Gen Pack, are not allowed. Using WurstScript might be accepted, as well, but should be mentioned in the contest thread to ensure a proper judgement set.
  • Each contestant must post at least one work in progress (code or ingame screenshots) in the contest thread before the deadline.
  • The entry must be posted before the deadline in the respective resource section.
    • The resource description must make it clear it is an entry from the respective contest.
    • The submission must be testable with the standard WorldEditor.
    • The map's file name has to follow following shema: "<username> + <spell name>"
    • A post in the contest thread must be made, linking to the final submission.
  • The test map must have decent testing conditions. Which means the user can test various aspects and behaviour of the spell/code under certain conditions without too much of effort. For example cliffs/water/trees might be provided already in a spell demonstration, or chat commands might be given as well.
  • Judges may not participate.
Breaking any of these rules may lead to punishment in the judgement score, up to disqualification from the contest, depending on the weight of the issue.
In case of doubts towards a certain rule or the urge to discuss something related, you are very encouraged to post in the contest thread so others and judges may help with sorting it out.​

prizes.png

  • First Place: 45 reputation points and your entry on the award icon
  • Second Place: 30 reputation points and an award icon
  • Third Place: 20 reputation points and an award icon
  • Remaining entries: 5 reputation points
  • Judge: 5 reputation points

judges.png

  • IcemanBo

contest%20judging.png


Zepyhr Contest is meant to be a coding contest, so the focus lies on creating the spell with code and triggers.


Coding
Is the skill bug- and leak-free? Does it support multiple instances? Is there a good documentation and are there enough configurable variables to fit the needs of different user? Does it cause performance issues upon effect? Is the code fitting for a decent spell submission, or is it too simple?/20

Concept
Is it unique? How creatively was the idea executed and is it fitting the contest theme?/10

Visuals
How does the whole spell procedure look? Is it overloaded with special effects? How explanatory is the tooltip/description of its functionality?/10
FinalScore = (30*PollVotes/POLL_VOTES_TOTAL) + (70*JudgeScore/JUDGE_SCORE_TOTAL)


contest%20dates%20and%20deadline.png

  • The contest shall begin on 26th of February and conclude on 4rd of April GMT (day is included).

entries.png


Being mentioned in the list doesn't exlcude one of being disqualified. These are the potential entries:

Table by Tank-Commander, which can be used for some references.

< Download all entries - here >​

===============================================

Assigned Staff: IcemanBo

:fp: The Poll | Results
 

Attachments

  • IGTB5UYIQJ2G1337383565232.jpg
    IGTB5UYIQJ2G1337383565232.jpg
    58.7 KB · Views: 1,139
By the way guys, one model is not restricted in usage only if someone else uses it already. You may choose what ever model you want from the list.

@Cokemonkey11 I would not like to disallow wurst, so if there is a judge who is capable of revewing it properly there is no problem. Preferable the judge should be a "normal" judge, I mean that he reviews all other submissions, too, and not exclusivly the wurst submission. We maybe might split the judegement, too, so that for example one judge handles all code stuff, and an other judge the concept and visuals. For now I have no judge in reserve, so I sadly can not say it, but in case there is one I will post again in thread that someone wants to judge with wurst.
 

Cokemonkey11

Code Reviewer
Level 29
Joined
May 9, 2006
Messages
3,515
> I would not like to disallow wurst, so if there is a judge who is capable of revewing it properly there is no problem. Preferable the judge should be a "normal" judge, I mean that he reviews all other submissions, too, and not exclusivly the wurst submission. We maybe might split the judegement, too, so that for example one judge handles all code stuff, and an other judge the concept and visuals. For now I have no judge in reserve, so I sadly can not say it, but in case there is one I will post again in thread that someone wants to judge with wurst.


Okay, probably that means I can't join in the contest.
 
Okay, probably that means I can't join in the contest.
aha, your intention was to join with wurst without having a judge who knows wurst? I thought it was logical.

Ill just make a spell first then pick a model. It works either way. Haha or its not allowed?
Result will matter.

I've made the garrosh Overlord Slam ability. What am I should do next?
It's pretty much explained in the description and rules. You select a model, then from tomorrow (when the contest starts) you have 1 month to post a WorkInProgress and the final submission.
 
Level 6
Joined
Jan 8, 2010
Messages
155
Okay, I think I'm finishing up right now. I just have to finish my test environment :)


These are my two functions that make the spell work. It is MUI! Wew!

This function takes place when the spell is being cast, and sets up all of the variables for the loop function.
castFunction.png


This function iterates through all of the ongoing spell instances. It tracks the time that each has been going, and replaces the current one with the last one when it reaches 5.4 seconds. Note: This function is not entirely complete in this screenshot, it is missing the part that will turn itself off :p Whoops! (It will be in the final version, just didn't want to recreate this screenshot set)
loopFunction.png



(unfortunately my warcraft 3 wont let me print screen in it anymore, for whatever reason. So this is from the editor (which better demonstrates what I was doing anyways) )
positioningAndAngle.png


 
Level 13
Joined
Jun 20, 2014
Messages
479
Making the spell first before the model is harder than expected. I would like to choose a model. Garrosh is really appealing to me. I plan to create a warstomp spell. Thats it for now.

EDIT: hi, im having trouble with the garrosh model. somehow i cannot see it in the editor. other models are running just fine. im trying to see what animations i can use. pls help

EDIT2: ill just go for medivh model.
 
Last edited:
Level 40
Joined
Dec 14, 2005
Messages
10,532
Planning on finishing this but we'll see how life goes. WIP (not part of the spell code, but a library that it needs):


JASS:
library Geometry
globals
    private integer DUMMY = 'e000'
endglobals

struct Rectangle
    real p1x
    real p2x
    real p3x
    real p4x
    real p1y
    real p2y
    real p3y
    real p4y
  
    real x12diff
    real x23diff
    real x34diff
    real x41diff
    real y12diff
    real y23diff
    real y34diff
    real y41diff
  
    //1 and 3 (and also 2 and 4) are opposite corners
    static method create takes real x1, real y1, real x2, real y2, real x3, real y3, real x4, real y4 returns Rectangle
        local Rectangle this = Rectangle.allocate()
        set this.p1x = x1
        set this.p2x = x2
        set this.p3x = x3
        set this.p4x = x4
        set this.p1y = y1
        set this.p2y = y2
        set this.p3y = y3
        set this.p4y = y4
        set this.x12diff = x2 - x1
        set this.x23diff = x3 - x2
        set this.x34diff = x4 - x3
        set this.x41diff = x1 - x4
        set this.y12diff = y2 - y1
        set this.y23diff = y3 - y2
        set this.y34diff = y4 - y3
        set this.y41diff = y1 - y4
        return this
    endmethod
  
    static method createFacing takes real px, real py, real width, real length, real angle returns Rectangle
        local real perpAngle = angle + bj_PI/2.
        local real offsetCosP = width/2. * Cos(perpAngle)
        local real offsetSinP = width/2. * Sin(perpAngle)
        local real lenCos = length * Cos(angle)
        local real lenSin = length * Sin(angle)
        local real p1x = px - offsetCosP
        local real p1y = py - offsetSinP
        local real p2x = px + offsetCosP
        local real p2y = py + offsetSinP
        return Rectangle.create(p1x, p1y, p2x, p2y, p2x + lenCos, p2y + lenSin, p1x + lenCos, p1y + lenSin)
    endmethod
  
    method containsPoint takes real px, real py returns boolean
      return (py - this.p1y)*this.x12diff <= (px - this.p1x)*this.y12diff and (py - this.p2y)*this.x23diff <= (px - this.p2x)*this.y23diff and (py - this.p3y)*this.x34diff <= (px - this.p3x)*this.y34diff and (py - this.p4y)*this.x41diff <= (px - this.p4x)*this.y41diff
    endmethod
endstruct

//Requires Count >= 2
function DisplayEffectInLine takes string model, real px, real py, real distance, real angle, real height, integer count returns nothing
    local real dx = px + distance * Cos(angle)
    local real dy = py + distance * Sin(angle)
    local real dist = SquareRoot((dx - px)*(dx - px) + (dy - py)*(dy - py))
    local real vx = distance/I2R(count - 1) * Cos(angle)
    local real vy = distance/I2R(count - 1) * Sin(angle)
    local unit u
    loop
        set count = count - 1
        exitwhen count == 0
        set u = CreateUnit(Player(15),DUMMY,px,py,270.)
        call UnitApplyTimedLife(u,'BTLF',1.)
        call SetUnitFlyHeight(u,height,0.)
        call SetUnitExploded(u,true)
        call DestroyEffect(AddSpecialEffectTarget(model,u,"origin"))
        set px = px + vx
        set py = py + vy
    endloop
    set u = null
endfunction
endlibrary
 
Last edited:
Level 40
Joined
Dec 14, 2005
Messages
10,532
I'm also pretty sure it started everywhere in the world by the time I posted mine (given that it was 11:30AM EST), although I started a few hours earlier.

EDIT: Another WIP, this time of the main spell code (uses a few libraries, not pictured)

JASS:
scope PrismaticSpray initializer init
globals
    private constant hashtable timers = InitHashtable()
endglobals

private function RayOfFrostInitial takes unit source, unit target, integer level returns nothing
endfunction
private function RayOfFrostOngoing takes unit source, unit target, integer level returns nothing
endfunction

private function RayOfFireInitial takes unit source, unit target, integer level returns nothing
endfunction
private function RayOfFireOngoing takes unit source, unit target, integer level returns nothing
    if IsPlayerEnemy(GetOwningPlayer(target),GetOwningPlayer(source)) then
        call UnitDamageTarget(source,target,PrismaticSprayConfig_RayOfFireDamageTick(level),false,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
    endif
endfunction

private function HolyRayInitial takes unit source, unit target, integer level returns nothing
endfunction
private function HolyRayOngoing takes unit source, unit target, integer level returns nothing
endfunction

private function DarkRayInitial takes unit source, unit target, integer level returns nothing
endfunction
private function DarkRayOngoing takes unit source, unit target, integer level returns nothing
endfunction

private function PlagueRayInitial takes unit source, unit target, integer level returns nothing
endfunction
private function PlagueRayOngoing takes unit source, unit target, integer level returns nothing
endfunction

private function ArcaneRayInitial takes unit source, unit target, integer level returns nothing
endfunction
private function ArcaneRayOngoing takes unit source, unit target, integer level returns nothing
endfunction

private struct Data
    unit caster
    integer level
    real angleFacing
    real angle
    boolean roundEnd
    method onDestroy takes nothing returns nothing
        set this.caster = null
    endmethod
endstruct

private function ShootRays takes Data dat returns nothing
    local real sourcex = GetUnitX(dat.caster) + PrismaticSprayConfig_EFFECT_POINT_XY_FORWARD * Cos(dat.angleFacing) + PrismaticSprayConfig_EFFECT_POINT_XY_PERP * Cos(dat.angleFacing + bj_PI/2.)
    local real sourcey = GetUnitY(dat.caster) + PrismaticSprayConfig_EFFECT_POINT_XY_FORWARD * Sin(dat.angleFacing) + PrismaticSprayConfig_EFFECT_POINT_XY_PERP * Sin(dat.angleFacing + bj_PI/2.)
    local integer numRays = GetRandomInt(PrismaticSprayConfig_RAYS_PER_BURST_MIN,PrismaticSprayConfig_RAYS_PER_BURST_MAX)
    local real angle
    local integer rayType
    local PrismaticSprayRays_RayEffect initialEffect
    local PrismaticSprayRays_RayEffect ongoingEffect
    local string sfx
    loop
        exitwhen numRays == 0
        set angle = GetRandomReal(-PrismaticSprayConfig_RAY_EFFECT_ARC/2.,PrismaticSprayConfig_RAY_EFFECT_ARC/2.) + dat.angle
        set rayType = GetRandomInt(0,3)
        if rayType == 0 then //Fire
            set initialEffect = RayOfFireInitial
            set ongoingEffect = RayOfFireOngoing
            set sfx = PrismaticSprayConfig_RAY_OF_FIRE_EFFECT
        elseif rayType == 1 then //Frost
            set initialEffect = RayOfFrostInitial
            set ongoingEffect = RayOfFireOngoing
            set sfx = PrismaticSprayConfig_RAY_OF_FROST_EFFECT
        elseif rayType == 2 then //Holy
            set initialEffect = HolyRayInitial
            set ongoingEffect = HolyRayOngoing
            set sfx = PrismaticSprayConfig_HOLY_RAY_EFFECT
        elseif rayType == 3 then //Dark
            set initialEffect = DarkRayInitial
            set ongoingEffect = DarkRayOngoing
            set sfx = PrismaticSprayConfig_DARK_RAY_EFFECT
        elseif rayType == 4 then //Plague
            set initialEffect = PlagueRayInitial
            set ongoingEffect = PlagueRayOngoing
            set sfx = PrismaticSprayConfig_PLAGUE_RAY_EFFECT
        elseif rayType == 5 then //Arcane
            set initialEffect = ArcaneRayInitial
            set ongoingEffect = ArcaneRayOngoing
            set sfx = PrismaticSprayConfig_ARCANE_RAY_EFFECT
        endif
        call FireRay(dat.caster,sfx,sourcex,sourcey,angle,PrismaticSprayConfig_EFFECT_POINT_Z,dat.level,initialEffect,ongoingEffect)
        set numRays = numRays - 1
    endloop
endfunction

private function TimerExpires takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local Data dat = GetTimerData(t)
    //Create rays if appropriate, then go to next iteration
    if dat.roundEnd then
        call TimerStart(t,PrismaticSprayConfig_EFFECT_POINT_TIME,false,function TimerExpires)
    else
        call ShootRays(dat)
        call TimerStart(t,PrismaticSprayConfig_EFFECT_END_TIME - PrismaticSprayConfig_EFFECT_POINT_TIME,false,function TimerExpires)
    endif
    set dat.roundEnd = not dat.roundEnd
    set t = null
endfunction

private function Actions takes nothing returns nothing
    local Data dat = Data.create()
    local timer t = NewTimer()
    local real x = GetUnitX(GetTriggerUnit())
    local real y = GetUnitY(GetTriggerUnit())
    set dat.caster = GetTriggerUnit()
    set dat.level = GetUnitAbilityLevel(dat.caster,GetSpellAbilityId())
    set dat.angleFacing = Atan2(GetSpellTargetY() - y,GetSpellTargetX() - x)
    set x = x + PrismaticSprayConfig_EFFECT_POINT_XY_FORWARD * Cos(dat.angleFacing)
    set y = y + PrismaticSprayConfig_EFFECT_POINT_XY_FORWARD * Sin(dat.angleFacing)
    set x = x + PrismaticSprayConfig_EFFECT_POINT_XY_PERP * Cos(dat.angleFacing + bj_PI/2.)
    set y = y + PrismaticSprayConfig_EFFECT_POINT_XY_PERP * Sin(dat.angleFacing + bj_PI/2.)
    set dat.angle = Atan2(GetSpellTargetY() - y,GetSpellTargetX() - x)
    set dat.roundEnd = false
    call SaveTimerHandle(timers,GetHandleId(dat.caster),0,t)
    call SetTimerData(t,dat)
    call TimerStart(t,PrismaticSprayConfig_EFFECT_POINT_TIME,false,function TimerExpires)
    set t = null
endfunction

private function EndActions takes nothing returns nothing
    local timer t = LoadTimerHandle(timers,GetHandleId(GetTriggerUnit()),0)
    local Data dat = GetTimerData(t)
    call FlushChildHashtable(timers,GetHandleId(GetTriggerUnit()))
    call dat.destroy()
    call PauseTimer(t)
    call ReleaseTimer(t)
    set t = null
endfunction

private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == PrismaticSprayConfig_ABILITY_ID
endfunction

private function init takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(t,Condition(function Conditions))
    call TriggerAddAction(t,function Actions)
  
    set t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_FINISH)
    call TriggerAddCondition(t,Condition(function Conditions))
    call TriggerAddAction(t,function EndActions)
endfunction
endscope
 
Last edited:
Level 40
Joined
Dec 14, 2005
Messages
10,532
I'm behind GMT so works for me either way. I'm also done at this point despite having to spend most of the time between these three posts working on my job, and have a lot more LOC than Fruit Forest, so I don't really see the issue. You can power through a spell in a few hours of focused dev.

---------

Edit: Here's my entry

Uses TimerUtils and no other third-party libraries, dummy.mdx and the Gnome Arcanist model. Idea from a spell of the same name in D&D. Everything is vJass.

And yeah, I know I can use third-party libraries, but I generally don't other than a few basic ones (I'm generally unfamiliar with them and like coding my own stuff from scratch regardless. I also find they don't give me enough flexibility much of the time)
 
Last edited:

Cokemonkey11

Code Reviewer
Level 29
Joined
May 9, 2006
Messages
3,515
aha, your intention was to join with wurst without having a judge who knows wurst? I thought it was logical.

No, my intention was to join the contest on day 1, just like everyone else, then give you the full duration of the contest to find a wurst judge.

Have you noticed that there's no vjass judge either?

Also, go fuck yourself. The contest description says
Using WurstScript might be accepted, as well, but should be mentioned in the contest thread to ensure a proper judgement set.
- it doesn't say "ask for a wurst judge and then start coding once one is found".

Edit - I'm happy to be a wurst/code judge in case someone submits wurst.
 
Level 9
Joined
Oct 14, 2013
Messages
238
OK. I began working on my spell, but I have a question. I'm working on a diversity spell which has different effects depending on the target. Does that break any rules anywhere?

Edit:
To give some examples: on self = heal, on allied = heal, on enemy = damage, on ground summon a unit. But all of them use the trees around the target/target location to cause that effect.

And for clarifications, I only use one spell for that, not multiple spells.
 
Level 11
Joined
May 16, 2016
Messages
730
OK. I began working on my spell, but I have a question. I'm working on a diversity spell which has different effects depending on the target. Does that break any rules anywhere?

Edit:
To give some examples: on self = heal, on allied = heal, on enemy = damage, on ground summon a unit. But all of them use the trees around the target/target location to cause that effect.

And for clarifications, I only use one spell for that, not multiple spells.
It is talking about additional custom abilities, buff, units. For example you can make spec effect, but you also may create the dummy unit with the spec effect model. The rule asks you to choose lesser "custom-ed" way.
 
Just wanted to asking in regards to submissions being posted into the spell section - historically when entries have been put into the spell section before the deadline they've been hidden (rejected) until after the deadline in to ensure fair play since it can reasonably be expected for submitted entries to get improvement feedback leading to an unfair advantage, this has been the case up until the last contest (when Loner-Magixxar's entry had this happen) so are we just ignoring that or is some other countermeasure in place?

I see the purpose of the rule, but it contradicts precedent which brings me pause. When I've submitted entries to the section it has always been after the deadline but before the end of the contest (normally during or after the polling stage) so that the feedback will not hold any positive advantages for my entry (if anything other people finding flaws in it after the deadline has passed while judging is in progress puts you at a disadvantage, assuming any are found)
 

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
it can reasonably be expected for submitted entries to get improvement feedback leading to an unfair advantage
Ahh.. those good ol'times...
But I can't remember the last time I got a useful user feedback in the spell section lol Must be more than 5 months ago lol
But anyway, for precaution, I think TaCo is right. Contest entries better be hidden until the contest deadline.
 
Last edited:
Level 40
Joined
Dec 14, 2005
Messages
10,532
Wait, are we really supposed to avoid making additional spells in the object editor to add buffs and the like? I interpreted the rule/guideline as recommending against secondary user-facing abilities (for example, making a morph spell where the user gets some other spells when they morph). Technically speaking you can almost always avoid custom abilities with enough work (a damage detection system and so forth) and a willingness to use default buffs/effects, but that way lies madness.
 
I'm working on a diversity spell which has different effects depending on the target. Does that break any rules anywhere?
No, it doesn't break rules, you can think of any concept that you think is fitting.

I agree with that certain feedback can lead to unfair treatment, but iirc there was a discussion that we should not close them, hm.. I will try to look into it, thanks.

are we really supposed to avoid making additional spells in the object editor to add buffs and the like? I interpreted the rule/guideline as recommending against secondary user-facing abilities (
You interpreted correclty I think. You can use a buff or so, but in the unit's command card should be one ability only (main), and in special cases maybe you can add an other one if needed.
 
Level 9
Joined
Oct 14, 2013
Messages
238
Here goes my first WIP:

  • ToN Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to ToN_TouchOfNature_Ability
    • Actions
      • -------- >>>>>>>>>>>>>>>>>>>>>>On Self<<<<<<<<<<<<<<<<<<<<<< --------
      • -------- ------------------------------------------Evaluates the caster as the target. Doesn't matter if the caster is a building or not, since it is a tree himself. --------
      • -------- ------------------------------------------Calculations are simple: pick the trees in the area, count them, damage them, spawn dummy unit and cast a dummy spell for effect. --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Target unit of ability being cast) Equal to (Triggering unit)
        • Then - Actions
          • Set ToN_TempLocs_A[(Custom value of (Triggering unit))] = (Position of (Triggering unit))
          • Set ToN_TempReal[1] = 0.00
          • Set ToN_SelfHealHappened = False
          • Destructible - Pick every destructible within (ToN_SelfRadius + (ToN_SelfRadius_PerLvl x (Real((Level of ToN_TouchOfNature_Ability for (Triggering unit)))))) of ToN_TempLocs_A[(Custom value of (Triggering unit))] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked destructible) is dead) Not equal to True
                • Then - Actions
                  • For each (Integer ToN_TempInteger_A[(Custom value of (Triggering unit))]) from 1 to ToN_MaxTreeTypes, do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Destructible-type of (Picked destructible)) Equal to ToN_TargetTreeType[ToN_TempInteger_A[(Custom value of (Triggering unit))]]
                        • Then - Actions
                          • -------- ------------------------------------------If at least one tree was available in the radius, this booleaan will turn true. --------
                          • Set ToN_SelfHealHappened = True
                          • Destructible - Set life of (Picked destructible) to ((Current life of (Picked destructible)) - (ToN_SelfTreeDamage + (ToN_SelfTreeDamage_PerLvl x (Real((Level of ToN_TouchOfNature_Ability for (Triggering unit)))))))
                          • Set ToN_TempReal[1] = (ToN_TempReal[1] + (ToN_SelfHealPerTree + (ToN_SelfHealPerTree_PerLvl x (Real((Level of ToN_TouchOfNature_Ability for (Triggering unit)))))))
                          • Set ToN_TempLoc = (Position of (Picked destructible))
                          • Unit - Create 1 ToN_DummyUnit_Main for (Triggering player) at ToN_TempLoc facing Default building facing degrees
                          • Custom script: call RemoveLocation(udg_ToN_TempLoc)
                          • Unit - Add ToN_SelfSFX_Ability to (Last created unit)
                          • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Triggering unit)
                          • Unit - Remove (Last created unit) from the game
                        • Else - Actions
                • Else - Actions
          • -------- ------------------------------------------We will create SFX and increase the HP of the target, if the boolean from the previous part is turned true. --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ToN_SelfHealHappened Equal to True
            • Then - Actions
              • Special Effect - Create a special effect attached to the ToN_SelfHealSFXPosition of (Triggering unit) using ToN_SelfHealSFX
              • Special Effect - Destroy (Last created special effect)
              • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + ToN_TempReal[1])
            • Else - Actions
          • Set ToN_TempLoc = ToN_TempLocs_A[(Custom value of (Triggering unit))]
          • Custom script: call RemoveLocation(udg_ToN_TempLoc)
          • Skip remaining actions
        • Else - Actions
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • -------- >>>>>>>>>>>>>>>>>>>>>>On Owned/Allied, Non Structure Units<<<<<<<<<<<<<<<<<<<<<< --------
      • -------- ------------------------------------------Evaluates the allied/owned units as the target, and filters out the buildings for the next part. --------
      • -------- ------------------------------------------Calculations are again simple: pick the trees in the area, count them, damage them, spawn dummy unit and cast a dummy spell for effect. --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) belongs to an ally of (Triggering player)) Equal to True
          • (Owner of (Target unit of ability being cast)) Not equal to Neutral Passive
          • ((Target unit of ability being cast) is A structure) Not equal to True
        • Then - Actions
          • Set ToN_TempLocs_A[(Custom value of (Triggering unit))] = (Position of (Target unit of ability being cast))
          • Set ToN_TempReal[2] = 0.00
          • Set ToN_AlliedHealHappened = False
          • Set ToN_TempUnit[1] = (Target unit of ability being cast)
          • -------- ------------------------------------------I have excluded the mechanical units from this spell. --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (ToN_TempUnit[1] is Mechanical) Not equal to True
            • Then - Actions
              • Destructible - Pick every destructible within (ToN_AlliedRadius + (ToN_AlliedRadius_PerLvl x (Real((Level of ToN_TouchOfNature_Ability for (Triggering unit)))))) of ToN_TempLocs_A[(Custom value of (Triggering unit))] and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked destructible) is dead) Not equal to True
                    • Then - Actions
                      • For each (Integer ToN_TempInteger_A[(Custom value of (Triggering unit))]) from 1 to ToN_MaxTreeTypes, do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Destructible-type of (Picked destructible)) Equal to ToN_TargetTreeType[ToN_TempInteger_A[(Custom value of (Triggering unit))]]
                            • Then - Actions
                              • -------- ------------------------------------------If at least one tree was available in the radius, this booleaan will turn true. --------
                              • Set ToN_AlliedHealHappened = True
                              • Destructible - Set life of (Picked destructible) to ((Current life of (Picked destructible)) - (ToN_AlliedTreeDamage + (ToN_AlliedTreeDamage_PerLvl x (Real((Level of ToN_TouchOfNature_Ability for (Triggering unit)))))))
                              • Set ToN_TempReal[2] = (ToN_TempReal[2] + (ToN_AlliedHealPerTree + (ToN_AlliedHealPerTree_PerLvl x (Real((Level of ToN_TouchOfNature_Ability for (Triggering unit)))))))
                              • Set ToN_TempLoc = (Position of (Picked destructible))
                              • Unit - Create 1 ToN_DummyUnit_Main for (Triggering player) at ToN_TempLoc facing Default building facing degrees
                              • Custom script: call RemoveLocation(udg_ToN_TempLoc)
                              • Unit - Add ToN_SelfSFX_Ability to (Last created unit)
                              • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning ToN_TempUnit[1]
                              • Unit - Remove (Last created unit) from the game
                            • Else - Actions
                    • Else - Actions
            • Else - Actions
          • -------- ------------------------------------------We will create SFX and increase the HP of the target, if the boolean from the previous part is turned true. --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ToN_AlliedHealHappened Equal to True
            • Then - Actions
              • Special Effect - Create a special effect attached to the ToN_SelfHealSFXPosition of ToN_TempUnit[1] using ToN_SelfHealSFX
              • Special Effect - Destroy (Last created special effect)
              • Unit - Set life of ToN_TempUnit[1] to ((Life of ToN_TempUnit[1]) + ToN_TempReal[2])
            • Else - Actions
          • Set ToN_TempLoc = ToN_TempLocs_A[(Custom value of (Triggering unit))]
          • Custom script: call RemoveLocation(udg_ToN_TempLoc)
          • Skip remaining actions
        • Else - Actions
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • -------- >>>>>>>>>>>>>>>>>>>>>>On Owned/Allied Structures<<<<<<<<<<<<<<<<<<<<<< --------
      • -------- ------------------------------------------Evaluates the allied/owned structures as the target. --------
      • -------- ------------------------------------------Calculations are again simple: pick the trees in the area, Pick one out, damage it, spawn dummy unit and cast a dummy spell for effect. --------
      • -------- ------------------------------------------But on more unit will be spawned and it will cast an armor on the building. --------
      • -------- ------------------------------------------And another unit is spawned for the SFX of the armor and its scale will change depending on the building's scale. --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) belongs to an ally of (Triggering player)) Equal to True
          • (Owner of (Target unit of ability being cast)) Not equal to Neutral Passive
          • ((Target unit of ability being cast) is A structure) Equal to True
        • Then - Actions
          • Set ToN_TempUnit[2] = (Target unit of ability being cast)
          • Set ToN_AllyBuildingArmorHappened = False
          • Set ToN_TempLocs_A[(Custom value of (Triggering unit))] = (Position of ToN_TempUnit[2])
          • Destructible - Pick every destructible within (ToN_AllyBuildingRadius + (ToN_AllyBuildingRadius_PerLvl x (Real((Level of ToN_TouchOfNature_Ability for (Triggering unit)))))) of ToN_TempLocs_A[(Custom value of (Triggering unit))] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked destructible) is dead) Not equal to True
                  • ToN_AllyBuildingArmorHappened Not equal to True
                • Then - Actions
                  • For each (Integer ToN_TempInteger_A[(Custom value of (Triggering unit))]) from 1 to ToN_MaxTreeTypes, do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Destructible-type of (Picked destructible)) Equal to ToN_TargetTreeType[ToN_TempInteger_A[(Custom value of (Triggering unit))]]
                        • Then - Actions
                          • -------- ------------------------------------------If at least one tree was available in the radius, this booleaan will turn true to prevent more trees from being selected. --------
                          • Set ToN_AllyBuildingArmorHappened = True
                          • Destructible - Set life of (Picked destructible) to ((Current life of (Picked destructible)) - (ToN_AllyBuildingTreeDamage + (ToN_AllyBuildTreeDamage_PerLvl x (Real((Level of ToN_TouchOfNature_Ability for (Triggering unit)))))))
                          • Set ToN_TempLoc = (Position of (Picked destructible))
                          • Unit - Create 1 ToN_DummyUnit_Main for (Triggering player) at ToN_TempLoc facing Default building facing degrees
                          • Custom script: call RemoveLocation(udg_ToN_TempLoc)
                          • Unit - Add ToN_AllyBuildingSFX_Ability to (Last created unit)
                          • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning ToN_TempUnit[2]
                          • Unit - Add ToN_AllyBuildingArmor_Ability to (Last created unit)
                          • Unit - Set level of ToN_AllyBuildingArmor_Ability for (Last created unit) to (Level of ToN_TouchOfNature_Ability for (Triggering unit))
                          • Unit - Order (Last created unit) to Human Priest - Inner Fire ToN_TempUnit[2]
                          • Unit - Remove (Last created unit) from the game
                          • Set ToN_TempReal[3] = (ToN_AllyBuildingArmorTime + (ToN_AllyBuildArmorTime_PerLvl x (Real((Level of ToN_TouchOfNature_Ability for (Triggering unit))))))
                          • Set ToN_TempReal_A[(Custom value of ToN_TempUnit[2])] = ToN_TempReal[3]
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (ToN_TempUnit[2] is in ToN_AllyArmoredBuilding_Group) Not equal to True
                            • Then - Actions
                              • -------- ------------------------------------------Adding the building to the buff-handling group. --------
                              • Unit Group - Add ToN_TempUnit[2] to ToN_AllyArmoredBuilding_Group
                              • -------- ------------------------------------------Here we try to roughly calculate the scale of the building to change the scale of the armor SFX (dummy unit). --------
                              • Unit - Create 1 ToN_DummyUnit_ScaleFinder for (Triggering player) at ToN_TempLocs_A[(Custom value of (Triggering unit))] facing Default building facing degrees
                              • Set ToN_TempLoc = (Position of (Last created unit))
                              • Unit - Remove (Last created unit) from the game
                              • Set ToN_TempReal[3] = (Distance between ToN_TempLoc and ToN_TempLocs_A[(Custom value of (Triggering unit))])
                              • Custom script: call RemoveLocation(udg_ToN_TempLoc)
                              • Unit - Create 1 ToN_DummyUnit_Armor for (Triggering player) at ToN_TempLocs_A[(Custom value of (Triggering unit))] facing Default building facing degrees
                              • Set ToN_TempUnit_A[(Custom value of ToN_TempUnit[2])] = (Last created unit)
                              • Set ToN_TempReal[3] = (ToN_TempReal[3] x ToN_AllyBuildingArmorSFX_Scale)
                              • Animation - Change (Last created unit)'s size to (ToN_TempReal[3]%, ToN_TempReal[3]%, ToN_TempReal[3]%) of its original size
                              • -------- ------------------------------------------Saving the unit and the timer along with the building for buff handling. --------
                            • Else - Actions
                        • Else - Actions
                • Else - Actions
          • Set ToN_TempLoc = ToN_TempLocs_A[(Custom value of (Triggering unit))]
          • Custom script: call RemoveLocation(udg_ToN_TempLoc)
          • Skip remaining actions
        • Else - Actions
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • Set ToN_TempLoc = (Target point of ability being cast)
      • Set ToN_TargetIsTree[(Player number of (Triggering player))] = False
      • Destructible - Pick every destructible within 50.00 of ToN_TempLoc and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ToN_TargetIsTree[(Player number of (Triggering player))] Equal to False
            • Then - Actions
              • For each (Integer ToN_TempInteger_A[(Custom value of (Triggering unit))]) from 1 to ToN_MaxTreeTypes, do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Destructible-type of (Picked destructible)) Equal to ToN_TargetTreeType[ToN_TempInteger_A[(Custom value of (Triggering unit))]]
                    • Then - Actions
                      • Set ToN_TargetIsTree[(Player number of (Triggering player))] = True
                      • Set ToN_TargetedTree[(Custom value of (Triggering unit))] = (Picked destructible)
                    • Else - Actions
            • Else - Actions
      • Custom script: call RemoveLocation(udg_ToN_TempLoc)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ToN_TargetIsTree[(Player number of (Triggering player))] Equal to True
        • Then - Actions
          • Quest - Display to (All players) the Quest Update message: Tree
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ToN_TargetIsTree[(Player number of (Triggering player))] Equal to False
          • (Target unit of ability being cast) Equal to No unit
        • Then - Actions
          • Quest - Display to (All players) the Quest Update message: Ground
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • ((Target unit of ability being cast) belongs to an enemy of (Triggering player)) Equal to True
              • (Owner of (Target unit of ability being cast)) Equal to Neutral Passive
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Target unit of ability being cast) is A structure) Equal to True
            • Then - Actions
              • Quest - Display to (All players) the Quest Update message: Enemy Building
            • Else - Actions
              • Quest - Display to (All players) the Quest Update message: Enemy
        • Else - Actions
 
Level 9
Joined
Oct 14, 2013
Messages
238
I'm trying to use the DummyRecycler in my map. I paste the codes in my custom trigger and change the trigger's name, but when I try to save the map it produces errors. Anyone can point me to a tutorial about this matter? I'm really stuck. I guess it has something to do with library tables (?) but I couldn't find anything that solves my problem.

All right I get it. I forgot about the Zephyrs' norms!

As my second and probably last WIP, I turned the previous WIP into a more economic one:

  • ToN Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to ToN_TouchOfNature_Ability
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Target unit of ability being cast) Not equal to No unit
        • Then - Actions
          • Set ToN_TempLocs_A[(Custom value of (Triggering unit))] = (Position of (Target unit of ability being cast))
          • Set ToN_TempReal_A[(Custom value of (Triggering unit))] = 0.00
          • Set ToN_TempReal_B[(Custom value of (Triggering unit))] = 0.00
          • Set ToN_TempReal_C[(Custom value of (Triggering unit))] = 0.00
          • Set ToN_TempReal_D[(Custom value of (Triggering unit))] = 0.00
          • Set ToN_TempInteger_B[(Custom value of (Triggering unit))] = 0
          • Set ToN_TempUnit_A[(Custom value of (Triggering unit))] = (Target unit of ability being cast)
          • Set ToN_TempUnit_C[(Custom value of (Triggering unit))] = No unit
          • Set ToN_HealDamageHappened[(Custom value of (Triggering unit))] = False
          • Set ToN_BuildingArmorRootsHappened[(Custom value of (Triggering unit))] = False
          • Set ToN_CaptureHappened[(Custom value of (Triggering unit))] = False
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ToN_TempUnit_A[(Custom value of (Triggering unit))] Equal to (Triggering unit)
            • Then - Actions
              • Set ToN_TempReal_A[(Custom value of (Triggering unit))] = (ToN_SelfRadius + (ToN_SelfRadius_PerLvl x (Real((Level of ToN_Touch of Nature for (Triggering unit))))))
              • Set ToN_TempReal_B[(Custom value of (Triggering unit))] = (ToN_SelfTreeDamage + (ToN_SelfTreeDamage_PerLvl x (Real((Level of ToN_Touch of Nature for (Triggering unit))))))
              • Set ToN_TempReal_C[(Custom value of (Triggering unit))] = (ToN_SelfHealPerTree + (ToN_SelfHealPerTree_PerLvl x (Real((Level of ToN_Touch of Nature for (Triggering unit))))))
              • Set ToN_TempAbility_A[(Custom value of (Triggering unit))] = ToN_SelfSFX_Ability
              • Set ToN_TempString_A[(Custom value of (Triggering unit))] = ToN_SelfHealSFX
              • Set ToN_TempString_B[(Custom value of (Triggering unit))] = ToN_SelfHealSFXPosition
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (ToN_TempUnit_A[(Custom value of (Triggering unit))] belongs to an ally of (Triggering player)) Equal to True
              • (Owner of ToN_TempUnit_A[(Custom value of (Triggering unit))]) Not equal to Neutral Passive
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (ToN_TempUnit_A[(Custom value of (Triggering unit))] is A structure) Not equal to True
                • Then - Actions
                  • Set ToN_TempReal_A[(Custom value of (Triggering unit))] = (ToN_AlliedRadius + (ToN_AlliedRadius_PerLvl x (Real((Level of ToN_Touch of Nature for (Triggering unit))))))
                  • Set ToN_TempReal_B[(Custom value of (Triggering unit))] = (ToN_AlliedTreeDamage + (ToN_AlliedTreeDamage_PerLvl x (Real((Level of ToN_Touch of Nature for (Triggering unit))))))
                  • Set ToN_TempReal_C[(Custom value of (Triggering unit))] = (ToN_AlliedHealPerTree + (ToN_AlliedHealPerTree_PerLvl x (Real((Level of ToN_Touch of Nature for (Triggering unit))))))
                  • Set ToN_TempAbility_A[(Custom value of (Triggering unit))] = ToN_AlliedSFX_Ability
                  • Set ToN_TempString_A[(Custom value of (Triggering unit))] = ToN_AlliedHealSFX
                  • Set ToN_TempString_B[(Custom value of (Triggering unit))] = ToN_AlliedHealSFXPosition
                • Else - Actions
                  • Set ToN_TempReal_A[(Custom value of (Triggering unit))] = (ToN_AllyBuildingRadius + (ToN_AllyBuildingRadius_PerLvl x (Real((Level of ToN_Touch of Nature for (Triggering unit))))))
                  • Set ToN_TempReal_B[(Custom value of (Triggering unit))] = (ToN_AllyBuildingTreeDamage + (ToN_AllyBuildTreeDamage_PerLvl x (Real((Level of ToN_Touch of Nature for (Triggering unit))))))
                  • Set ToN_TempReal_C[(Custom value of (Triggering unit))] = (ToN_AllyBuildingArmorTime + (ToN_AllyBuildArmorTime_PerLvl x (Real((Level of ToN_Touch of Nature for (Triggering unit))))))
                  • Set ToN_TempReal_D[(Custom value of (Triggering unit))] = ToN_AllyBuildingArmorSFX_Scale
                  • Set ToN_TempAbility_A[(Custom value of (Triggering unit))] = ToN_AllyBuildingSFX_Ability
                  • Set ToN_TempAbility_B[(Custom value of (Triggering unit))] = ToN_AllyBuildingArmor_Ability
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (ToN_TempUnit_A[(Custom value of (Triggering unit))] belongs to an ally of (Triggering player)) Not equal to True
              • (ToN_TempUnit_A[(Custom value of (Triggering unit))] is A structure) Not equal to True
            • Then - Actions
              • Set ToN_TempReal_A[(Custom value of (Triggering unit))] = (ToN_FoeRadius + (ToN_FoeRadius_PerLvl x (Real((Level of ToN_Touch of Nature for (Triggering unit))))))
              • Set ToN_TempReal_B[(Custom value of (Triggering unit))] = (ToN_FoeTreeDamage + (ToN_FoeTreeDamage_PerLvl x (Real((Level of ToN_Touch of Nature for (Triggering unit))))))
              • Set ToN_TempReal_C[(Custom value of (Triggering unit))] = (ToN_FoeDamagePerTree + (ToN_FoeDamagePerTree_PerLvl x (Real((Level of ToN_Touch of Nature for (Triggering unit))))))
              • Set ToN_TempAbility_A[(Custom value of (Triggering unit))] = ToN_FoeSFX_Ability
              • Set ToN_TempString_A[(Custom value of (Triggering unit))] = ToN_FoeDamageSFX
              • Set ToN_TempString_B[(Custom value of (Triggering unit))] = ToN_FoeDamageSFXPosition
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (ToN_TempUnit_A[(Custom value of (Triggering unit))] belongs to an ally of (Triggering player)) Not equal to True
                  • (Owner of ToN_TempUnit_A[(Custom value of (Triggering unit))]) Equal to Neutral Passive
              • (ToN_TempUnit_A[(Custom value of (Triggering unit))] is A structure) Equal to True
            • Then - Actions
              • Set ToN_TempReal_A[(Custom value of (Triggering unit))] = (ToN_FoeBuildingRadius + (ToN_FoeBuildingRadius_PerLvl x (Real((Level of ToN_Touch of Nature for (Triggering unit))))))
              • Set ToN_TempReal_B[(Custom value of (Triggering unit))] = (ToN_FoeBuildingTreeDamage + (ToN_FoeBuildTreeDamage_PerLvl x (Real((Level of ToN_Touch of Nature for (Triggering unit))))))
              • Set ToN_TempReal_C[(Custom value of (Triggering unit))] = (ToN_FoeBuildingRootTime + (ToN_FoeBuildingRootTime_PerLvl x (Real((Level of ToN_Touch of Nature for (Triggering unit))))))
              • Set ToN_TempReal_D[(Custom value of (Triggering unit))] = ToN_FoeBuildingRootSFX_Scale
              • Set ToN_TempAbility_A[(Custom value of (Triggering unit))] = ToN_FoeBuildingSFX_Ability
              • Set ToN_TempAbility_B[(Custom value of (Triggering unit))] = ToN_FoeBuildingRoot_Ability
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of ToN_TempUnit_A[(Custom value of (Triggering unit))]) Equal to Neutral Passive
              • (ToN_TempUnit_A[(Custom value of (Triggering unit))] is A structure) Not equal to True
            • Then - Actions
              • Set ToN_TempReal_A[(Custom value of (Triggering unit))] = (ToN_NeutralRadius + (ToN_NeutralRadius_PerLvl x (Real((Level of ToN_Touch of Nature for (Triggering unit))))))
              • Set ToN_TempReal_B[(Custom value of (Triggering unit))] = (ToN_NeutralTreeDamage + (ToN_NeutralTreeDamage_PerLvl x (Real((Level of ToN_Touch of Nature for (Triggering unit))))))
              • Set ToN_TempReal_C[(Custom value of (Triggering unit))] = (ToN_NeutralHPTreshold + (ToN_NeutralHPTreshold_PerLvl x (Real((Level of ToN_Touch of Nature for (Triggering unit))))))
              • Set ToN_TempReal_D[(Custom value of (Triggering unit))] = (Max life of ToN_TempUnit_A[(Custom value of (Triggering unit))])
              • Set ToN_TempAbility_A[(Custom value of (Triggering unit))] = ToN_NeutralSFX_Ability
              • Set ToN_TempString_A[(Custom value of (Triggering unit))] = ToN_NeutralCaptureSFX
              • Set ToN_TempString_B[(Custom value of (Triggering unit))] = ToN_NeutralCaptureSFX_Position
            • Else - Actions
          • -------- ------------------------------------------I have excluded the mechanical units from this spell. --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (ToN_TempUnit_A[(Custom value of (Triggering unit))] is Mechanical) Not equal to True
                  • ToN_TempUnit_A[(Custom value of (Triggering unit))] Equal to (Triggering unit)
                  • (ToN_TempUnit_A[(Custom value of (Triggering unit))] is A structure) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Owner of ToN_TempUnit_A[(Custom value of (Triggering unit))]) Equal to Neutral Passive
                  • (ToN_TempUnit_A[(Custom value of (Triggering unit))] is A structure) Not equal to True
                • Then - Actions
                  • Destructible - Pick every destructible within ToN_TempReal_A[(Custom value of (Triggering unit))] of ToN_TempLocs_A[(Custom value of (Triggering unit))] and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked destructible) is dead) Not equal to True
                        • Then - Actions
                          • For each (Integer ToN_TempInteger_A[(Custom value of (Triggering unit))]) from 1 to ToN_MaxTreeTypes, do (Actions)
                            • Loop - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Destructible-type of (Picked destructible)) Equal to ToN_TargetTreeType[ToN_TempInteger_A[(Custom value of (Triggering unit))]]
                                  • ToN_TempReal_D[(Custom value of (Triggering unit))] Greater than 0.00
                                • Then - Actions
                                  • Set ToN_TempReal_D[(Custom value of (Triggering unit))] = (ToN_TempReal_D[(Custom value of (Triggering unit))] - ToN_TempReal_C[(Custom value of (Triggering unit))])
                                  • Set ToN_TempInteger_B[(Custom value of (Triggering unit))] = (ToN_TempInteger_B[(Custom value of (Triggering unit))] + 1)
                                • Else - Actions
                        • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ToN_TempReal_D[(Custom value of (Triggering unit))] Less than or equal to 0.00
                      • ToN_TempInteger_B[(Custom value of (Triggering unit))] Greater than 0
                    • Then - Actions
                      • Set ToN_CaptureHappened[(Custom value of (Triggering unit))] = True
                      • Destructible - Pick every destructible within ToN_TempReal_A[(Custom value of (Triggering unit))] of ToN_TempLocs_A[(Custom value of (Triggering unit))] and do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • ((Picked destructible) is dead) Not equal to True
                            • Then - Actions
                              • For each (Integer ToN_TempInteger_A[(Custom value of (Triggering unit))]) from 1 to ToN_MaxTreeTypes, do (Actions)
                                • Loop - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Destructible-type of (Picked destructible)) Equal to ToN_TargetTreeType[ToN_TempInteger_A[(Custom value of (Triggering unit))]]
                                      • ToN_TempInteger_B[(Custom value of (Triggering unit))] Greater than 0
                                    • Then - Actions
                                      • Set ToN_TempInteger_B[(Custom value of (Triggering unit))] = (ToN_TempInteger_B[(Custom value of (Triggering unit))] - 1)
                                      • Destructible - Set life of (Picked destructible) to ((Current life of (Picked destructible)) - ToN_TempReal_B[(Custom value of (Triggering unit))])
                                      • Set ToN_TempLoc = (Position of (Picked destructible))
                                      • Unit - Create 1 ToN_DummyUnit_Main for (Triggering player) at ToN_TempLoc facing Default building facing degrees
                                      • Custom script: call RemoveLocation(udg_ToN_TempLoc)
                                      • Set ToN_TempUnit_C[(Custom value of (Triggering unit))] = (Last created unit)
                                      • Unit - Add ToN_TempAbility_A[(Custom value of (Triggering unit))] to ToN_TempUnit_C[(Custom value of (Triggering unit))]
                                      • Unit - Order ToN_TempUnit_C[(Custom value of (Triggering unit))] to Orc Far Seer - Chain Lightning ToN_TempUnit_A[(Custom value of (Triggering unit))]
                                      • Unit - Remove ToN_TempUnit_C[(Custom value of (Triggering unit))] from the game
                                    • Else - Actions
                            • Else - Actions
                    • Else - Actions
                • Else - Actions
                  • Destructible - Pick every destructible within ToN_TempReal_A[(Custom value of (Triggering unit))] of ToN_TempLocs_A[(Custom value of (Triggering unit))] and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked destructible) is dead) Not equal to True
                          • ToN_BuildingArmorRootsHappened[(Custom value of (Triggering unit))] Equal to False
                        • Then - Actions
                          • For each (Integer ToN_TempInteger_A[(Custom value of (Triggering unit))]) from 1 to ToN_MaxTreeTypes, do (Actions)
                            • Loop - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Destructible-type of (Picked destructible)) Equal to ToN_TargetTreeType[ToN_TempInteger_A[(Custom value of (Triggering unit))]]
                                • Then - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (ToN_TempUnit_A[(Custom value of (Triggering unit))] is A structure) Equal to True
                                    • Then - Actions
                                      • -------- ------------------------------------------This boolean will prevent any other trees from being selected, if the target is a building. --------
                                      • Set ToN_BuildingArmorRootsHappened[(Custom value of (Triggering unit))] = True
                                    • Else - Actions
                                      • -------- ------------------------------------------If at least one tree was available in the radius, this booleans will turn true. --------
                                      • Set ToN_HealDamageHappened[(Custom value of (Triggering unit))] = True
                                      • Set ToN_TempReal_D[(Custom value of (Triggering unit))] = (ToN_TempReal_D[(Custom value of (Triggering unit))] + ToN_TempReal_C[(Custom value of (Triggering unit))])
                                  • Destructible - Set life of (Picked destructible) to ((Current life of (Picked destructible)) - ToN_TempReal_B[(Custom value of (Triggering unit))])
                                  • Set ToN_TempLoc = (Position of (Picked destructible))
                                  • Unit - Create 1 ToN_DummyUnit_Main for (Triggering player) at ToN_TempLoc facing Default building facing degrees
                                  • Custom script: call RemoveLocation(udg_ToN_TempLoc)
                                  • Set ToN_TempUnit_C[(Custom value of (Triggering unit))] = (Last created unit)
                                  • Unit - Add ToN_TempAbility_A[(Custom value of (Triggering unit))] to ToN_TempUnit_C[(Custom value of (Triggering unit))]
                                  • Unit - Order ToN_TempUnit_C[(Custom value of (Triggering unit))] to Orc Far Seer - Chain Lightning ToN_TempUnit_A[(Custom value of (Triggering unit))]
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (ToN_TempUnit_A[(Custom value of (Triggering unit))] is A structure) Equal to True
                                    • Then - Actions
                                      • Unit - Add ToN_TempAbility_B[(Custom value of (Triggering unit))] to (Last created unit)
                                      • Unit - Set level of ToN_TempAbility_B[(Custom value of (Triggering unit))] for (Last created unit) to (Level of ToN_TouchOfNature_Ability for (Triggering unit))
                                      • Unit - Order (Last created unit) to Human Priest - Inner Fire ToN_TempUnit_A[(Custom value of (Triggering unit))]
                                      • Unit - Remove ToN_TempUnit_C[(Custom value of (Triggering unit))] from the game
                                      • Set ToN_TempReal_E[(Custom value of ToN_TempUnit_A[(Custom value of (Triggering unit))])] = ToN_TempReal_C[(Custom value of (Triggering unit))]
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • (ToN_TempUnit_A[(Custom value of (Triggering unit))] is in ToN_BuildingGroup) Not equal to True
                                        • Then - Actions
                                          • -------- ------------------------------------------Adding the building to the buff-handling group. --------
                                          • Unit Group - Add ToN_TempUnit_A[(Custom value of (Triggering unit))] to ToN_BuildingGroup
                                          • -------- ------------------------------------------Here we try to roughly calculate the scale of the building to change the scale of the armor SFX (dummy unit). --------
                                          • -------- ------------------------------------------The calculation is done through spawning a unit on the building. The unit will be spawned on the first available point next to the building. --------
                                          • -------- ------------------------------------------The distance between the spawned unit and the building is returned as a rough scaling value of the building. --------
                                          • -------- ------------------------------------------It's not exact, but doesn't matter since we only want to scale the armor SFX to be visible from outside of the building. --------
                                          • Unit - Create 1 ToN_DummyUnit_ScaleFinder for (Triggering player) at ToN_TempLocs_A[(Custom value of (Triggering unit))] facing Default building facing degrees
                                          • Set ToN_TempLoc = (Position of (Last created unit))
                                          • Unit - Remove (Last created unit) from the game
                                          • Set ToN_TempReal_C[(Custom value of (Triggering unit))] = (Distance between ToN_TempLoc and ToN_TempLocs_A[(Custom value of (Triggering unit))])
                                          • Custom script: call RemoveLocation(udg_ToN_TempLoc)
                                          • -------- ------------------------------------------Saving the unit and the timer along with the building for buff handling. --------
                                          • Unit - Create 1 ToN_DummyUnit_Armor for (Triggering player) at ToN_TempLocs_A[(Custom value of (Triggering unit))] facing Default building facing degrees
                                          • Set ToN_TempUnit_B[(Custom value of ToN_TempUnit_A[(Custom value of (Triggering unit))])] = (Last created unit)
                                          • Set ToN_TempReal_D[(Custom value of (Triggering unit))] = (ToN_TempReal_D[(Custom value of (Triggering unit))] x ToN_TempReal_C[(Custom value of (Triggering unit))])
                                          • -------- ------------------------------------------Scaling the SFX unit. --------
                                          • Animation - Change (Last created unit)'s size to (ToN_TempReal_D[(Custom value of (Triggering unit))]%, ToN_TempReal_D[(Custom value of (Triggering unit))]%, ToN_TempReal_D[(Custom value of (Triggering unit))]%) of its original size
                                          • -------- ------------------------------------------Unpause the building to enable it, if it is disabled. --------
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • (ToN_TempUnit_A[(Custom value of (Triggering unit))] belongs to an ally of (Triggering player)) Equal to True
                                              • (Owner of ToN_TempUnit_A[(Custom value of (Triggering unit))]) Not equal to Neutral Passive
                                            • Then - Actions
                                              • Unit - Unpause ToN_TempUnit_A[(Custom value of (Triggering unit))]
                                            • Else - Actions
                                              • Unit - Pause ToN_TempUnit_A[(Custom value of (Triggering unit))]
                                        • Else - Actions
                                    • Else - Actions
                                      • Unit - Remove ToN_TempUnit_C[(Custom value of (Triggering unit))] from the game
                                • Else - Actions
                        • Else - Actions
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • ToN_HealDamageHappened[(Custom value of (Triggering unit))] Equal to True
                  • ToN_CaptureHappened[(Custom value of (Triggering unit))] Equal to True
            • Then - Actions
              • -------- ------------------------------------------We will create SFX and increase the HP of the target, if the boolean from the previous part is turned true. --------
              • Special Effect - Create a special effect attached to the ToN_TempString_B[(Custom value of (Triggering unit))] of ToN_TempUnit_A[(Custom value of (Triggering unit))] using ToN_TempString_A[(Custom value of (Triggering unit))]
              • Special Effect - Destroy (Last created special effect)
              • -------- ------------------------------------------Calculated amount turns into healing the target. --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (ToN_TempUnit_A[(Custom value of (Triggering unit))] belongs to an ally of (Triggering player)) Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Owner of ToN_TempUnit_A[(Custom value of (Triggering unit))]) Equal to Neutral Passive
                    • Then - Actions
                      • Unit - Change ownership of ToN_TempUnit_A[(Custom value of (Triggering unit))] to (Triggering player) and Change color
                    • Else - Actions
                      • Unit - Set life of ToN_TempUnit_A[(Custom value of (Triggering unit))] to ((Life of ToN_TempUnit_A[(Custom value of (Triggering unit))]) + ToN_TempReal_D[(Custom value of (Triggering unit))])
                • Else - Actions
                  • Unit - Cause (Triggering unit) to damage ToN_TempUnit_A[(Custom value of (Triggering unit))], dealing ToN_TempReal_D[(Custom value of (Triggering unit))] damage of attack type ToN_FoeDamage_AttackType and damage type ToN_FoeDamage_DamageType
              • Set ToN_TempLoc = ToN_TempLocs_A[(Custom value of (Triggering unit))]
              • Custom script: call RemoveLocation(udg_ToN_TempLoc)
            • Else - Actions
        • Else - Actions
 
Last edited:
Level 9
Joined
Oct 14, 2013
Messages
238
A quick update. My work on the spell is done. I just need to document it and do some polishin'. and here is my last WIP (Configurables without proper documentation). Expect my entry in a day or two:

  • ToN Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- >>>>>>Basic --------
      • Set ToN_TouchOfNature_Ability = ToN_Touch of Nature
      • Set ToN_DummyUnit_Main = ToN_DummyUnit_Main
      • Set ToN_DummyUnit_Scale = ToN_DummyUnit_ScaleFinder
      • Set ToN_DummyUnit_Pulse = ToN_DummyUnit_Pulse
      • -------- ------------------------------------------------------------------Main ability and dummy units. --------
      • Set ToN_TargetTreeType[1] = Northrend Tree Wall
      • Set ToN_TargetTreeType[2] = Summer Tree Wall
      • -------- ------------------------------------------------------------------Add all the trees that are used in your map (These two types are used in this map). --------
      • For each (Integer ToN_TempInteger_A[1]) from 1 to 1000, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ToN_TargetTreeType[ToN_TempInteger_A[1]] Not equal to (Destructible-type of No destructible)
            • Then - Actions
              • Set ToN_MaxTreeTypes = ToN_TempInteger_A[1]
            • Else - Actions
      • -------- ------------------------------------------------------------------Don't touch this, unless the number of tree TYPES used in your map exceeds 1000. --------
      • -------- ------------------------------------------------------------------If it's so (which is highly unlikely), change the max number of loops. --------
      • Set ToN_DefaultSummonedTreeTypes = True
      • -------- ------------------------------------------------------------------This is relevant to the situation when you cast the spell on the ground and from corpses or dead trees, new trees will be summoned. --------
      • -------- ------------------------------------------------------------------Set this to true if you want the type of summoned trees to be a random type from the targetable trees. --------
      • -------- ------------------------------------------------------------------Set this to false if you want to specify a costum array of your own preferred types for the summoned trees. --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ToN_DefaultSummonedTreeTypes Equal to False
        • Then - Actions
          • Set ToN_MaxCostumTreeTypes = 0
          • For each (Integer ToN_TempInteger_A[1]) from 1 to ToN_MaxTreeTypes, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • ToN_TempInteger_A[1] Equal to 1
                      • ToN_TempInteger_A[1] Equal to 2
                • Then - Actions
                  • Set ToN_MaxCostumTreeTypes = (ToN_MaxCostumTreeTypes + 1)
                  • Set ToN_CustomSummonedTreeType[ToN_MaxCostumTreeTypes] = ToN_TargetTreeType[ToN_TempInteger_A[1]]
                • Else - Actions
        • Else - Actions
      • -------- ------------------------------------------------------------------For example, the ones that I have picked here are 1 and 2. So it means only the "ToN_TargetTreeType [1] and [2]" are summoned. --------
      • -------- ------------------------------------------------------------------The numbers are crorresponding to the "ToN_TargetTreeType [x]" variable. Choose between the numbers and add them here. --------
      • -------- ------------------------------------------------------------------If you has set the DefaultSummonedTreeTypes to false, then add your owned preferred types to the conditions here. --------
      • Set ToN_TargetAlliedEnabled = True
      • Set ToN_TargetAllyBuildingEnabled = True
      • Set ToN_TargetEnemyBuildingEnabled = True
      • Set ToN_TargetEnemyEnabled = True
      • Set ToN_TargetGroundEnabled = True
      • Set ToN_TargetNeutralEnabled = True
      • Set ToN_TargetSelfEnabled = True
      • Set ToN_TargetTreeEnabled = True
      • -------- ------------------------------------------------------------------To modify the possible targets of the spell, turn true/false the above booleans. --------
      • Set ToN_ManaCost = 50.00
      • Set ToN_ManaCost_PerLvl = 25.00
      • -------- ------------------------------------------------------------------Set this according to the mana cost of each level of Touch of Nature (ToN) --------
      • -------- ------------------------------------------------------------------This amount is returned to the caster if no casting takes place; ie. if there are no trees available in the vicinity --------
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • -------- >>>>>>Cast on Self --------
      • Set ToN_SelfRadius = 500.00
      • Set ToN_SelfRadius_PerLvl = 0.00
      • -------- ------------------------------------------------------------------Radius around the caster in which the trees are selected. --------
      • Set ToN_SelfTreeLimit = 100
      • Set ToN_SelfTreeLimit_PerLvl = 0
      • -------- ------------------------------------------------------------------Maximum number of selectable trees. --------
      • Set ToN_SelfTreeDamage = 10.00
      • Set ToN_SelfTreeDamage_PerLvl = 5.00
      • -------- ------------------------------------------------------------------Damage inflicted to the trees after casting this ability on caster. --------
      • Set ToN_SelfHealPerTree = 6.00
      • Set ToN_SelfHealPerTree_PerLvl = 4.00
      • -------- ------------------------------------------------------------------Amount of HP recovered for the caster per tree. --------
      • Set ToN_SelfHealSFX = Units\NightElf\Wisp\WispExplode.mdl
      • Set ToN_SelfHealSFXPosition = origin
      • -------- ------------------------------------------------------------------SFX for HP recovery and it's position on the caster. --------
      • Set ToN_SelfSFX_Ability = ToN_Self SFX
      • -------- ------------------------------------------------------------------Dummy ability for Lightning Effects of drawn HP out of trees. --------
      • -------- ======Note: To change the lightning effect of SFX, change the Lightning Effects of the Spell "ToN_Slef SFX" in the object editor. --------
      • -------- ======And to change the sound effect of the SFX, change the Sound Effect of the Spell "ToN_Slef SFX" in the object editor. --------
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • -------- >>>>>>Cast on Owned/Allied Non-Structure Units --------
      • Set ToN_AlliedRadius = 500.00
      • Set ToN_AlliedRadius_PerLvl = 0.00
      • -------- ------------------------------------------------------------------Radius around the owned/allied unit in which the trees are selected. --------
      • Set ToN_AlliedTreeLimit = 100
      • Set ToN_AlliedTreeLimit_PerLvl = 0
      • -------- ------------------------------------------------------------------Maximum number of selectable trees. --------
      • Set ToN_AlliedTreeDamage = 10.00
      • Set ToN_AlliedTreeDamage_PerLvl = 5.00
      • -------- ------------------------------------------------------------------Damage inflicted to the trees after casting this ability on owned/allied units. --------
      • Set ToN_AlliedHealPerTree = 6.00
      • Set ToN_AlliedHealPerTree_PerLvl = 4.00
      • -------- ------------------------------------------------------------------Amount of HP recovered for the owned/allied unit per tree. --------
      • Set ToN_AlliedHealSFX = Units\NightElf\Wisp\WispExplode.mdl
      • Set ToN_AlliedHealSFXPosition = origin
      • -------- ------------------------------------------------------------------SFX for HP recovery and it's position on the owned/allied unit. --------
      • Set ToN_AlliedSFX_Ability = ToN_Allied SFX
      • -------- ------------------------------------------------------------------Dummy ability for Lightning Effects of drawn HP out of trees. --------
      • -------- ======Note: To change the lightning effect of SFX, change the Lightning Effects of the Spell "ToN_Allied SFX" in the object editor. --------
      • -------- ======And to change the sound effect of the SFX, change the Sound Effect of the Spell "ToN_Allied SFX" in the object editor. --------
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • -------- >>>>>>Cast on Owned/Allied Buildings --------
      • Set ToN_AllyBuildingRadius = 550.00
      • Set ToN_AllyBuildingRadius_PerLvl = 0.00
      • -------- ------------------------------------------------------------------Radius around the owned/allied building which a random tree is selected from. --------
      • Set ToN_AllyBuildingTreeDamage = 5.00
      • Set ToN_AllyBuildTreeDamage_PerLvl = 15.00
      • -------- ------------------------------------------------------------------Damage inflicted to the tree after casting this ability on owned/allied buildings. --------
      • Set ToN_AllyBuildingArmorTime = 8.00
      • Set ToN_AllyBuildArmorTime_PerLvl = 4.00
      • -------- ------------------------------------------------------------------The duration that the armor lasts. --------
      • Set ToN_AllyBuildingArmor_Ability = ToN_Allied Building Armor
      • -------- ------------------------------------------------------------------This ability is used to cast an armor on the building. It is made of "Inner Fire" spell. --------
      • -------- ------------------------------------------------------------------To change the amount of armor or life regeneration of it, change the properties of the spell "ToN_Allied Building Armor" in the object editor. --------
      • -------- ------------------------------------------------------------------The level of this ability should correspond to the level of Nature's Touch (ToN). --------
      • Set ToN_AllyBuildingArmorSFX_Unit = ToN_DummyUnit_Armor
      • -------- ------------------------------------------------------------------This dummy unit is a locust unit that serves as the armor SFX. --------
      • Set ToN_AllyBuildingArmorSFX_Scale = 2.00
      • -------- ------------------------------------------------------------------This is the coefficient for the scale of the armor SFX (The dummy unit in the above). --------
      • -------- ------------------------------------------------------------------This number is multiplied in the scale of the building. --------
      • -------- ------------------------------------------------------------------A rough scale of the building is determined by the cast trigger. You don't need to worry about that. --------
      • -------- ======Note: Be carful with this one. Setting it to extreme values, results in the SFX bumping to the game camera!! --------
      • Set ToN_AllyBuildingSFX_Ability = ToN_Allied Building SFX
      • -------- ------------------------------------------------------------------Dummy ability for Lightning Effects of drawn force out of the tree. --------
      • -------- ======Note: To change the lightning effect of SFX, change the Lightning Effects of the Spell "ToN_Allied Building SFX" in the object editor. --------
      • -------- ======And to change the sound effect of the SFX, change the Sound Effect of the Spell "ToN_Allied Building SFX" in the object editor. --------
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • -------- >>>>>>Cast on Enemy Non-Structure Units --------
      • Set ToN_FoeRadius = 500.00
      • Set ToN_FoeRadius_PerLvl = 0.00
      • -------- ------------------------------------------------------------------Radius around the enemy unit in which the trees are selected. --------
      • Set ToN_FoeTreeLimit = 100
      • Set ToN_FoeTreeLimit_PerLvl = 0
      • -------- ------------------------------------------------------------------Maximum number of selectable trees. --------
      • Set ToN_FoeTreeDamage = 10.00
      • Set ToN_FoeTreeDamage_PerLvl = 5.00
      • -------- ------------------------------------------------------------------Damage inflicted to the trees after casting this ability on enemy units. --------
      • Set ToN_FoeDamagePerTree = 10.00
      • Set ToN_FoeDamagePerTree_PerLvl = 5.00
      • -------- ------------------------------------------------------------------Amount of damage inflicted on the enemy unit per tree. --------
      • Set ToN_FoeDamage_AttackType = Spells
      • Set ToN_FoeDamage_DamageType = Magic
      • -------- ------------------------------------------------------------------Attack and damage type of the inflicted damage on the enemy unit. --------
      • Set ToN_FoeDamageSFX = Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
      • Set ToN_FoeDamageSFXPosition = origin
      • -------- ------------------------------------------------------------------SFX for damage inflicted and it's position on the enemy unit. --------
      • Set ToN_FoeSFX_Ability = ToN_Foe SFX
      • -------- ------------------------------------------------------------------Dummy ability for Lightning Effects of drawn HP out of trees. --------
      • -------- ======Note: To change the lightning effect of SFX, change the Lightning Effects of the Spell "ToN_Foe SFX" in the object editor. --------
      • -------- ======And to change the sound effect of the SFX, change the Sound Effect of the Spell "ToN_Foe SFX" in the object editor. --------
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • -------- >>>>>>Cast on Enemy/Neutral Buildings --------
      • Set ToN_FoeBuildingRadius = 550.00
      • Set ToN_FoeBuildingRadius_PerLvl = 0.00
      • -------- ------------------------------------------------------------------Radius around the enemy/neutral building which a random tree is selected from. --------
      • Set ToN_FoeBuildingTreeDamage = 5.00
      • Set ToN_FoeBuildTreeDamage_PerLvl = 15.00
      • -------- ------------------------------------------------------------------Damage inflicted to the tree after casting this ability on enemy/neutral buildings. --------
      • Set ToN_FoeBuildingRootTime = 8.00
      • Set ToN_FoeBuildingRootTime_PerLvl = 4.00
      • -------- ------------------------------------------------------------------The duration that the roots last. --------
      • Set ToN_FoeBuildingRoot_Ability = ToN_Foe Building Root
      • -------- ------------------------------------------------------------------This ability is used to cast roots on the building. It is made up of "Inner Fire" spell. --------
      • -------- ------------------------------------------------------------------To change the amount of armor or life degeneration of it, change the properties of the spell "ToN_Foe Building Root" in the object editor. --------
      • -------- ------------------------------------------------------------------The level of this ability should correspond to the level of Nature's Touch (ToN). --------
      • Set ToN_FoeBuildingRootSFX_Unit = ToN_DummyUnit_Root
      • -------- ------------------------------------------------------------------This dummy unit is a locust unit that serves as the roots' SFX. --------
      • Set ToN_FoeBuildingRootSFX_Scale = 2.00
      • -------- ------------------------------------------------------------------This is the coefficient for the scale of the roots' SFX (The dummy unit in the above). --------
      • -------- ------------------------------------------------------------------This number is multiplied in the scale of the building. --------
      • -------- ------------------------------------------------------------------A rough scale of the building is deermined by the cast trigger. You don't need to worry about that. --------
      • -------- ======Note: Be carful with this one. Setting it to extreme values, results in the SFX bumping to the game camera!! --------
      • Set ToN_FoeBuildingSFX_Ability = ToN_Foe Building SFX
      • -------- ------------------------------------------------------------------Dummy ability for Lightning Effects of drawn force out of the tree. --------
      • -------- ======Note: To change the lightning effect of SFX, change the Lightning Effects of the Spell "ToN_Foe Building SFX" in the object editor. --------
      • -------- ======And to change the sound effect of the SFX, change the Sound Effect of the Spell "ToN_Foe Building SFX" in the object editor. --------
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • -------- >>>>>>Cast on Neutral Passive Non-Structure Units --------
      • Set ToN_NeutralRadius = 500.00
      • Set ToN_NeutralRadius_PerLvl = 0.00
      • -------- ------------------------------------------------------------------Radius around the neutral unit in which the trees are selected. --------
      • Set ToN_NeutralTreeLimit = 100
      • Set ToN_NeutralTreeLimit_PerLvl = 0
      • -------- ------------------------------------------------------------------Maximum number of selectable trees. --------
      • Set ToN_NeutralTreeDamage = 1000.00
      • Set ToN_NeutralTreeDamage_PerLvl = 0.00
      • -------- ------------------------------------------------------------------Damage inflicted to the trees if there are enough trees around the unit. --------
      • -------- ------------------------------------------------------------------I've set this in a way that the trees die. you can change this and make changes accordingly to the tooltip. --------
      • Set ToN_NeutralHPTreshold = 75.00
      • Set ToN_NeutralHPTreshold_PerLvl = 25.00
      • -------- ------------------------------------------------------------------For each amount of this configurable, a tree will be needed to capture the neutral passive unit. --------
      • -------- ------------------------------------------------------------------The higher you set this, the less trees would be needed for tougher units. --------
      • Set ToN_NeutralCaptureSFX = Abilities\Spells\Other\Charm\CharmTarget.mdl
      • Set ToN_NeutralCaptureSFX_Position = origin
      • -------- ------------------------------------------------------------------SFX for capturing and it's position on the target unit. --------
      • Set ToN_NeutralSFX_Ability = ToN_Neutral SFX
      • -------- ------------------------------------------------------------------Dummy ability for Lightning Effects of drawn force out of trees. --------
      • -------- ======Note: To change the lightning effect of SFX, change the Lightning Effects of the Spell "ToN_Neutral SFX" in the object editor. --------
      • -------- ======And to change the sound effect of the SFX, change the Sound Effect of the Spell "ToN_Neutral SFX" in the object editor. --------
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • -------- >>>>>>Cast on Trees --------
      • Set ToN_PulseTreeSelectionRadius = 70.00
      • -------- ------------------------------------------------------------------The radius the target point will detect a tree as a target for Pulsing. --------
      • -------- ------------------------------------------------------------------The less you set this value, the harder it will be for you to select trees for pulsing. --------
      • Set ToN_PulseTreeDamage = 1.00
      • Set ToN_PulseTreeDamage_PerLvl = 0.50
      • -------- ------------------------------------------------------------------Damage inflicted to the tree by each pulse. --------
      • Set ToN_PulseDamage = 6.00
      • Set ToN_PulseDamage_PerLvl = 4.00
      • -------- ------------------------------------------------------------------The damage inflicted on each unit by each pulse. --------
      • Set ToN_PulseDamage_AttackType = Spells
      • Set ToN_PulseDamage_DamageType = Magic
      • -------- ------------------------------------------------------------------Attack and damage type of the inflicted damage on the enemy unit by each pulse. --------
      • Set ToN_PulseDamageSourceIsCaster = False
      • -------- ------------------------------------------------------------------This will determine if the caster is the source of pulse damage or the dummy unit itself. --------
      • -------- ------------------------------------------------------------------What's the difference? If the caster is the source, the units will run away from the caster instead of the tree that is pulsing --------
      • -------- ------------------------------------------------------------------And this might result in the unit running toward the pulsing tree (If it is caught between the caster and the tree). --------
      • -------- ------------------------------------------------------------------And if the source is the caster, the killer will be considered the caster, instead of another unit. --------
      • -------- ------------------------------------------------------------------And if the source is caster, hthere won't be any damage after its death or removal. --------
      • Set ToN_PulseInterval = 1.00
      • Set ToN_PulseInterval_PerLvl = -0.20
      • -------- ------------------------------------------------------------------The interval between each pulse. The less you set it the more pulses will be. --------
      • -------- ------------------------------------------------------------------Note that the number won't get below 0.03, for safety measures! --------
      • Set ToN_PulseDuration = 9.00
      • Set ToN_PulseDuration_PerLvl = 1.00
      • -------- ------------------------------------------------------------------The duration that the pulsing will continue. --------
      • -------- ------------------------------------------------------------------To calculate the number of pulses for each level, devide the duration by the interval and sum the result with 1 (The first pulse). --------
      • -------- ------------------------------------------------------------------For example: [(9+1) / (1-0.2)] + 1 = (10/0.8) + 1 = (100/8) + 1 = 12.5 +1 = 13.5 = 13 pulse --------
      • Set ToN_Pulse_Ability = ToN_Tree Pulse
      • -------- ------------------------------------------------------------------This ability is used to cast the pulsing on behalf of the tree. It is made of "Fan of Knives" spell. --------
      • -------- ------------------------------------------------------------------To change the radius of the pulse, change the Area of Effect of the spell "ToN_Tree Pulse" in the object editor. --------
      • -------- ------------------------------------------------------------------The level of this ability should correspond to the level of Touch of Nature (ToN). --------
      • -------- ======Note: To change the missile effect/arc of the pulse, change the Missile Art/Arc of the Spell "ToN_Tree Pulse" in the object editor. --------
      • -------- ======And to change the Burst effect of the pulse, change the Effect of the Spell "ToN_Tree Pulse" in the object editor. --------
      • -------- ======And to change the sound effect of the pulse, change the Sound Effect of the Spell "ToN_Tree Pulse" in the object editor. --------
      • -------- ======Note: If you set the built-in damage of the spell to a non-zero value, the configurable damage in here will get overridden. --------
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • -------- >>>>>>Cast on Ground --------
      • Set ToN_GroundRadius = 500.00
      • Set ToN_GroundRadius_PerLvl = 0.00
      • -------- ------------------------------------------------------------------Radius around the target point in which the corpses are selected. --------
      • Set ToN_GroundCorpseLimit = 2
      • Set ToN_GroundCorpseLimit_PerLvl = 1
      • -------- ------------------------------------------------------------------Maximum number of selectable corpses. --------
      • Set ToN_GroundTreeLimit = 0
      • Set ToN_GroundTreeLimit_PerLvl = 2
      • -------- ------------------------------------------------------------------Maximum number of selectable dead trees. --------
      • Set ToN_GroundTreePerCorpse = 2
      • Set ToN_GroundTreePerCorpse_PerLvl = 0
      • -------- ------------------------------------------------------------------Number of tree(s) created per each corpse. --------
      • Set ToN_GroundTreePerTree = 1
      • Set ToN_GroundTreePerTree_PerLvl = 0
      • -------- ------------------------------------------------------------------Number of tree(s) created per each dead tree. --------
      • Set ToN_GroundSummonedTreeSize_Min = 1.00
      • Set ToN_GroundSummonedTreeSize_Max = 1.00
      • -------- ------------------------------------------------------------------Minimum and maximum size of the summoned tree. --------
      • Set ToN_GroundGrowthDelay = 9.00
      • Set ToN_GroundGrowthDelay_PerLvl = 0.00
      • -------- ------------------------------------------------------------------The time that takes until the trees start growing. --------
      • Set ToN_GroundTreeHeal = 20.00
      • Set ToN_GroundTreeHeal_PerLvl = 5.00
      • -------- ------------------------------------------------------------------The amount of HP recovered for the trees in the delay time. --------
      • -------- ------------------------------------------------------------------This amount is devided by the delay duration and applied to the trees each 0.03 by 3x. --------
      • Set ToN_GroundGrowthTime = 120.00
      • Set ToN_GroundGrowthTime_PerLvl = -20.00
      • -------- ------------------------------------------------------------------The time that takes until the trees finish growing (added to the "ToN_GroundGrowthDelay" in the above). --------
      • Set ToN_GroundGrowthSFX_Unit = ToN_DummyUnit_Growth Process
      • -------- ------------------------------------------------------------------This dummy unit is a locust unit that serves as the growth process SFX. --------
      • Set ToN_GroundGrowthSFXUnitSizeMin = 0.50
      • Set ToN_GroundGrowthSFXUnitSizeMax = 1.40
      • -------- ------------------------------------------------------------------The minimum and maximum scale of the SFX unit for growth. --------
      • Set ToN_GroundGrowthDelaySFX_1 = Abilities\Spells\Other\Drain\DrainCaster.mdl
      • -------- ------------------------------------------------------------------Central SFX for growth delay and it's position on the target unit. --------
      • Set ToN_GroundGrowthDelaySFX_Unit1 = ToN_DummyUnit_Growth Delay Center
      • -------- ------------------------------------------------------------------This dummy unit is a locust unit that serves as the central growth delay SFX. --------
      • Set ToN_GroundDelaySFX1Size = 2.50
      • Set ToN_GroundDelaySFX1Size_PerLvl = 0.00
      • Set ToN_GroundGrowthDelaySFX_Trans = 90.00
      • -------- ------------------------------------------------------------------The scale and transparency of the central SFX unit for growth delay. --------
      • -------- ------------------------------------------------------------------The scale can't get bigger than 10. --------
      • Set ToN_GroundGrowDelaySFX_Ability = ToN_Ground Growth Delay Sound Effect
      • -------- ------------------------------------------------------------------This ability is used only for its SFX and specially for its sound effect. --------
      • Set ToN_GroundGrowthDelaySFX_Unit2 = ToN_DummyUnit_Growth Delay Margin
      • -------- ------------------------------------------------------------------This dummy unit is a locust unit that serves as the marginal growth delay SFX. --------
      • -------- ------------------------------------------------------------------SFXs for growth delay that appear on the boundaries of the area selected. --------
      • Set ToN_GroundDelaySFX2Size = 1.00
      • -------- ------------------------------------------------------------------The scale of the marginal SFX unit for growth delay. --------
      • -------- ------------------------------------------------------------------The scale can't get bigger than 10. --------
      • Set ToN_GroundDelaySFXRotationRate = 90.00
      • -------- ------------------------------------------------------------------The degree that the above SFX unit will rotate around the central SFX. (Degree per Second) --------
      • -------- ------------------------------------------------------------------Example: Setting it to 90 means that the SFX will rotate 90 degrees in one second. --------
      • Set ToN_GroundDelaySFXSinusRate = 400.00
      • -------- ------------------------------------------------------------------The speed at which the above SFX unit will sinus to or fro in relation to the centeral SFX. (Point per second). --------
      • -------- ------------------------------------------------------------------Example: Setting it to 250 means that the SFX will travel 250 points in one second. --------
      • Set ToN_GroundDelaySFXSinusMin = 50.00
      • -------- ------------------------------------------------------------------The minimum distance from the central SFX that the above SFX unit will appear. --------
      • -------- ------------------------------------------------------------------The maximum distance will be set as the radius of the spell. --------
      • Set ToN_GroundGrowSoundSFX_Ability = ToN_Ground Growth SFX/Sound Effect
      • -------- ------------------------------------------------------------------This ability serves as SFX and sound effect of the growing trees. --------
      • -------- ======To change the sound effect or Effect of the growth, change the Sound Effect or Effect of the Spell "ToN_Ground Growth SFX/Sound Effect" in the object editor. --------
 
Level 9
Joined
Oct 14, 2013
Messages
238
Final Entry: Touch of Nature (for Dark Ancient model)

My work is done. I'll post my entry here; then later, when I have enough time, I'll post it in the resource section.

Since making a fancy and fully descriptive entry won't change the fact that almost no one will review my entry, I felt no need to waste half a day doing it. So don't pull any words of wisdom on me. My entry is mostly directed towards the eyes of the unknown judge(s). I probably won't be available for about 2 weeks (Traveling). And, Oh Boy, did I put so much time in this.

There is a mini-game in my entry for testing the spell's potential in battle. If anybody (If!) wants to play the mini-game, I suggest play it through the Warcraft itself and not through the test map button of the editor. For some reason, when you test the map via the editor, random numbers/items always turn out to be the same.

This was probably my last participation in a contest. You first think that you're gonna get it ready in no time, but man! it drags endlessly.

You will hear about me soon in this site and for the last time. I'm working on my final secret project: a huge co-op action-adventure map which has been in progress for one year now.

And sorry for the rambling.
 

Attachments

  • Loner-Magixxar-Touch of Nature V1.0.0.w3x
    209.2 KB · Views: 36
Last edited:
Status
Not open for further replies.
Top