wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > Spells
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 09-07-2007, 07:11 AM   #1
Pyrogasm
Lackadaisically Absent.
 
Pyrogasm's Avatar


Respected User
 
Join Date: Sep 2006
Posts: 4,520

Submissions (9)

Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)

Hero Contest - Fourth place

Send a message via ICQ to Pyrogasm Send a message via AIM to Pyrogasm Send a message via MSN to Pyrogasm Send a message via Yahoo to Pyrogasm
Default Chains of Solidarity

Chains of Solidarity v1.30
(That's "solidarity", not "solitude")


Zoom (requires log in)

This spell was made for a contest at TheHelper.net; I don't think it fit the theme at all. I wonder if it would be better with multiple links in the chain instead of just 1 link; what do you guys think?

The Spell:
Chains of SolidarityLinks the caster and target unit together with a bond of immeasureable energy from their own life-forces. All units in the path of this link will constantly be healed for a small amount.

Level 1 - Heals 35 health per second, lasts 11 seconds.
Level 2 - Heals 50 health per second, lasts 12 seconds.
Level 3 - Heals 65 health per second, lasts 13 seconds.

Because I use Mac OS X, my code tends to get fucked up when looked at in the World Editor. To rectify this, simply use the code in the attached text file instead of that in the map trigger or use the below code. (Note: vBulletin has been known to screw with JASS tags, so please quote this post and get the correct code from there)
Collapse Full Code:
//*****************************************************************************************\\
//                            Spell Name: Chains of Solidarity                             \\
//                                 Spell Author: Pyrogasm                                  \\
//                                                                                         \\
//                                Follows the JESP Standard                                \\
//*****************************************************************************************\\

constant function ChainsOfSolidarity_AbilityId takes nothing returns integer
    return 'A000' //Rawcode of the spell itself.
endfunction

constant function ChainsOfSolidarity_DummyUnitId takes nothing returns integer
    return 'h000' //This unit MUST have a "cast backswing point" of 0.00
endfunction       //And CANNOT have negative regeneration.

constant function ChainsOfSolidarity_DummyLightningSpellId takes nothing returns integer
    return 'A001' //The "CoS Dummy Lightning spell" determines the lightning effect.
endfunction

constant function ChainsOfSolidarity_DummyLightningSpellOrderString takes nothing returns string
    return "fingerofdeath" //The orderstring of the dummy lightning spell if you didn't use mine.
endfunction

constant function ChainsOfSolidarity_DummyBuffSpellId takes nothing returns integer
    return 'A002' //The "CoS Dummy Buff Spell" spell.
endfunction

constant function ChainsOfSolidarity_DummyBuffSpellOrderString takes nothing returns string
    return "unholyfrenzy" //The orderstring of the dummy buff spell if you didn't use mine.
endfunction

constant function ChainsOfSolidarity_BuffId takes nothing returns integer
    return 'B000' //The "Chains of Solidarity (Buff)" buff
endfunction

constant function ChainsOfSolidarity_CrowFormAbilityId takes nothing returns integer
    return 'Amrf' //Medivh's Crow form ability; you don't need to change this rawcode unless
endfunction       //you modified it in your map. If you have, copy it, reset the copied one,
                  //and use its rawcode here.

constant function ChainsOfSolidarity_BreakDistance takes integer Level returns real
    return 1500.00 //If the two units are farther than this distance apart, the spell will end.
endfunction

constant function ChainsOfSolidarity_DummyFlyHeight takes integer Level returns real
    return 22.00 //If you want the lightning effect on the caster to be higher or lower.
endfunction      //It will always go directly to the target.

constant function ChainsOfSolidarity_Duration takes integer Level returns real
    return 10.00 + (1.00*Level) //Duration of the lightning effect is changed in the Object Editor.
endfunction

constant function ChainsOfSolidarity_HealthPerSecond takes integer Level returns real
    return 20.00 + (15.00*Level) //In Health per Second.
endfunction

constant function ChainsOfSolidarity_LineWidth takes integer Level returns real
    return 145.00 //Distance from center to outer edge of line.
endfunction

constant function ChainsOfSolidarity_CircleOptions takes integer Level returns integer
     return 3 //0 = no circles; 1 = only around target; 2 = only around caster; 3 = around both
endfunction

constant function ChainsOfSolidarity_CircleRadius takes integer Level, integer WhichCircle returns real
     if WhichCircle == 1 then     //Radius of the circle(s) around the caster/target
         return 75.00             //This might conceivably be the same as the LineWidth.
     elseif WhichCircle == 2 then //To make it only affect the caster/target, simply put 10.00
         return 75.00             //Or something.
     endif

     return 0.00                  //Just a safety return; don't change this
endfunction

constant function ChainsOfSolidarity_MinHeight takes integer Level returns real
    return 0.00 //No units below this height will be affected
endfunction

constant function ChainsOfSolidarity_MaxHeight takes integer Level returns real
    return 500.00 //No units above this height will be affected
endfunction

constant function ChainsOfSolidarity_TimerInterval takes integer Level returns real
    return 0.04 //Interval that the timer runs at; this affects the lightning effect
endfunction

constant function ChainsOfSolidarity_HealAllies takes integer Level returns boolean
    return true
endfunction

constant function ChainsOfSolidarity_HealEnemies takes integer Level returns boolean
    return false
endfunction

constant function ChainsOfSolidarity_HealOnCast takes integer Level returns boolean
    return false
endfunction

constant function ChainsOfSolidarity_HealGround takes integer Level returns boolean
    return true
endfunction

constant function ChainsOfSolidarity_HealAir takes integer Level returns boolean
    return true
endfunction

constant function ChainsOfSolidarity_EffectPath takes nothing returns string
    return "Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl"
endfunction

constant function ChainsOfSolidarity_EffectAttach takes nothing returns string
    return "chest"
endfunction

constant function ChainsOfSolidarity_EffectInterval takes nothing returns real
    return 0.48 //This should probably be a multiple of the timer interval
endfunction



//*****************************************************************************************\\
//                                Start External Functions                                 \\
//*****************************************************************************************\\

//=============================
// Function by grim001
//=============================
function ChainsOfSolidarity_GroupEnumUnitsInQuad takes group g, real x1, real y1, real x2, real y2, real x3, real y3, real x4, real y4, boolexpr f returns nothing
    local real maxx
    local real minx
    local real maxy
    local real miny
    local unit u
    local real ux
    local real uy
    local group g2 = CreateGroup()
    local rect r

    if x1 >= x2 and x1 >= x3 and x1 >= x4 then
        set maxx = x1
    elseif x2 >= x1 and x2 >= x3 and x2 >= x4 then
        set maxx = x2
    elseif x3 >= x1 and x3 >= x2 and x3 >= x4 then
        set maxx = x3
    else
        set maxx = x4
    endif

    if x1 <= x2 and x1 <= x3 and x1 <= x4 then
        set minx = x1
    elseif x2 <= x1 and x2 <= x3 and x2 <= x4 then
        set minx = x2
    elseif x3 <= x1 and x3 <= x2 and x3 <= x4 then
        set minx = x3
    else
        set minx = x4
    endif

    if y1 >= y2 and y1 >= y3 and y1 >= y4 then
        set maxy = y1
    elseif y2 >= y1 and y2 >= y3 and y2 >= y4 then
        set maxy = y2
    elseif y3 >= y1 and y3 >= y2 and y3 >= y4 then
        set maxy = y3
    else
        set maxy = y4
    endif

    if y1 <= y2 and y1 <= y3 and y1 <= y4 then
        set miny = y1
    elseif y2 <= y1 and y2 <= y3 and y2 <= y4 then
        set miny = y2
    elseif y3 <= y1 and y3 <= y2 and y3 <= y4 then
        set miny = y3
    else
        set miny = y4
    endif

    set r = Rect(minx, miny, maxx, maxy)
    call GroupEnumUnitsInRect(g2, r, f)
    loop
        set u = FirstOfGroup(g2)
        exitwhen u == null
        call GroupRemoveUnit(g2, u)
        set ux = GetUnitX(u)
        set uy = GetUnitY(u)
        if (uy - y1)*(x2 - x1) - (ux - x1)*(y2 - y1) <= 0. then
            if (uy - y2)*(x3 - x2) - (ux - x2)*(y3 - y2) <= 0. then
                if (uy - y3)*(x4 - x3) - (ux - x3)*(y4 - y3) <= 0. then
                    if (uy - y4)*(x1 - x4) - (ux - x4)*(y1 - y4) <= 0. then
                        call GroupAddUnit(g, u)
                    endif
                endif
            endif
        endif
    endloop
    call DestroyGroup(g2)
    call RemoveRect(r)
    set g2 = null
    set r = null
endfunction
//*****************************************************************************************\\
//                                 End External Functions                                  \\
//*****************************************************************************************\\


function ChainsOfSolidarity_CastConditions takes nothing returns boolean
    return GetSpellAbilityId() == ChainsOfSolidarity_AbilityId()
endfunction

function ChainsOfSolidarity_HealFilter takes nothing returns boolean
    local unit U = GetFilterUnit()
    local boolean Ally = bj_slotControlUsed[95] and IsUnitAlly(U, bj_forceRandomCurrentPick)
    local boolean Enemy = bj_slotControlUsed[96] and IsUnitEnemy(U, bj_forceRandomCurrentPick)
    local boolean Ground = bj_slotControlUsed[97] and (IsUnitType(U, UNIT_TYPE_FLYING) == true)
    local boolean Air = bj_slotControlUsed[98] and (IsUnitType(U, UNIT_TYPE_GROUND) == true)
    set U = null
    return (Ally or Enemy) and (Ground or Air)
endfunction

function ChainsOfSolidarity_Heal takes unit U, integer Level, boolean Effects, real X, real Y, real X2, real Y2, real TimerInterval returns nothing
    local real Width = ChainsOfSolidarity_LineWidth(Level)
    local real HealAmount = ChainsOfSolidarity_HealthPerSecond(Level)*TimerInterval
    local real Angle = Atan2((Y2-Y),(X2-X))
    local integer CircleOptions = ChainsOfSolidarity_CircleOptions(Level)
    local string EffectPath
    local string EffectAttach
    local unit U3
    local group G = CreateGroup()
    local group G2

    local real Side1X = X2 - X
    local real Side1Y = Y2 - Y
    local real Side2X = Width*Cos(Angle-1.5708)
    local real Side2Y = Width*Sin(Angle-1.5708)
    local real RX4 = X + Side2X*0.5
    local real RY4 = Y + Side2Y*0.5
    local real RX3 = RX4 + Side1X
    local real RY3 = RY4 + Side1Y
    local real RX2 = RX3 - Side2X
    local real RY2 = RY3 - Side2Y
    local real RX1 = RX2 - Side1X
    local real RY1 = RY2 - Side1Y


    if Effects then
        set EffectPath = ChainsOfSolidarity_EffectPath()
        set EffectAttach = ChainsOfSolidarity_EffectAttach()
    endif

    set bj_slotControlUsed[95] = ChainsOfSolidarity_HealAllies(Level)
    set bj_slotControlUsed[96] = ChainsOfSolidarity_HealEnemies(Level)
    set bj_slotControlUsed[97] = ChainsOfSolidarity_HealGround(Level)
    set bj_slotControlUsed[98] = ChainsOfSolidarity_HealAir(Level)
    set bj_forceRandomCurrentPick = GetOwningPlayer(U)
    call ChainsOfSolidarity_GroupEnumUnitsInQuad(G, RX1, RY1, RX2, RY2, RX3, RY3, RX4, RY4, Condition(function ChainsOfSolidarity_HealFilter))

    if CircleOptions > 0 then
        set G2 = CreateGroup()
        set bj_groupAddGroupDest = G
        if CircleOptions == 1 or CircleOptions == 3 then
            call GroupEnumUnitsInRange(G2, X2, Y2, ChainsOfSolidarity_CircleRadius(Level, 1), Condition(function ChainsOfSolidarity_HealFilter))
            call ForGroup(G2, function GroupAddGroupEnum)
            call GroupClear(G2)
        endif
        if CircleOptions == 2 or CircleOptions == 3 then
            call GroupEnumUnitsInRange(G2, X, Y, ChainsOfSolidarity_CircleRadius(Level, 2), Condition(function ChainsOfSolidarity_HealFilter))
            call ForGroup(G2, function GroupAddGroupEnum)
        endif
        call DestroyGroup(G2)
        set G2 = null
    endif

    loop
        set U3 = FirstOfGroup(G)
        exitwhen U3 == null

        call SetWidgetLife(U3, GetWidgetLife(U3)+HealAmount)
        if Effects then
            call DestroyEffect(AddSpecialEffectTarget(EffectPath, U3, EffectAttach))
        endif

        call GroupRemoveUnit(G, U3)
    endloop

    call DestroyGroup(G)
    set G = null
endfunction

function ChainsOfSolidarity_Callback takes nothing returns nothing
    local timer T = GetExpiredTimer()
    local integer ArrayIndex = GetCSData(T)
    local unit U = GetArrayUnit(ArrayIndex, 1)
    local unit U2 = GetArrayUnit(ArrayIndex, 2)
    local integer Level = GetArrayInt(ArrayIndex, 4)
    local real X = GetUnitX(U)
    local real Y = GetUnitY(U)
    local real X2 = GetUnitX(U2)
    local real Y2 = GetUnitY(U2)
    local unit Dummy = GetArrayUnit(ArrayIndex, 3)
    local real Duration = ChainsOfSolidarity_Duration(Level)
    local real TimerInterval = ChainsOfSolidarity_TimerInterval(Level)
    local real BreakDist = ChainsOfSolidarity_BreakDistance(Level)
    local real Elapsed = GetArrayReal(ArrayIndex, 5)

    if Elapsed > Duration or GetWidgetLife(U) < 0.406 or GetWidgetLife(U2) < 0.406 or (X-X2)*(X-X2)+(Y-Y2)*(Y-Y2) > BreakDist*BreakDist then
        set Level = ChainsOfSolidarity_BuffId()
        call RemoveUnit(Dummy)
        call UnitRemoveAbility(U, Level)
        call UnitRemoveAbility(U2, Level)

        call PauseTimer(T)
        call DestroyArray(ArrayIndex)
        call DestroyTimer(T)
    else
        call SetArrayReal(ArrayIndex, 5, Elapsed+TimerInterval)
        call SetUnitX(Dummy, X)
        call SetUnitY(Dummy, Y)

        call ChainsOfSolidarity_Heal(U, Level, (ModuloReal(Elapsed, ChainsOfSolidarity_EffectInterval()) <= TimerInterval), X, Y, X2, Y2, TimerInterval)
    endif

    set U = null
    set U2 = null
    set Dummy = null
    set T = null
endfunction

function ChainsOfSolidarity_Cast takes nothing returns nothing
    local unit U = GetTriggerUnit()
    local unit U2 = GetSpellTargetUnit()
    local integer Level = GetUnitAbilityLevel(U, ChainsOfSolidarity_AbilityId())
    local real X = GetUnitX(U)
    local real Y = GetUnitY(U)
    local integer DummySpellId = ChainsOfSolidarity_DummyLightningSpellId()
    local unit Dummy
    local real Duration = ChainsOfSolidarity_Duration(Level)
    local real TimerInterval = ChainsOfSolidarity_TimerInterval(Level)
    local timer T = CreateTimer()
    local integer ArrayIndex = NewArray(6, true)
    local string OrderString = ChainsOfSolidarity_DummyBuffSpellOrderString()

    set bj_forceRandomCurrentPick = GetOwningPlayer(U)
    set Dummy = CreateUnit(bj_forceRandomCurrentPick, ChainsOfSolidarity_DummyUnitId(), X, Y, 0.00)
    call UnitAddAbility(Dummy, DummySpellId)
    call SetUnitAbilityLevel(Dummy, DummySpellId, Level)
    call IssueTargetOrder(Dummy, ChainsOfSolidarity_DummyLightningSpellOrderString(), U2)
    call UnitApplyTimedLife(Dummy, 'BTLF', Duration+TimerInterval)

    call SetArrayObject(ArrayIndex, 1, U)
    call SetArrayObject(ArrayIndex, 2, U2)
    call SetArrayObject(ArrayIndex, 3, Dummy)
    call SetArrayInt(ArrayIndex, 4, Level)
    call SetCSData(T, ArrayIndex)

    set DummySpellId = ChainsOfSolidarity_CrowFormAbilityId()
    call UnitAddAbility(Dummy, DummySpellId)
    call UnitRemoveAbility(Dummy, DummySpellId)
    call SetUnitFlyHeight(Dummy, ChainsOfSolidarity_DummyFlyHeight(Level), 10000.00)

    set DummySpellId = ChainsOfSolidarity_DummyBuffSpellId()
    set Dummy = CreateUnit(bj_forceRandomCurrentPick, ChainsOfSolidarity_DummyUnitId(), X, Y, 0.00)
    call UnitAddAbility(Dummy, DummySpellId)
    call SetUnitAbilityLevel(Dummy, DummySpellId, Level)
    call IssueTargetOrder(Dummy, OrderString, U)
    call IssueTargetOrder(Dummy, OrderString, U2)
    call UnitApplyTimedLife(Dummy, 'BTLF', 1.00)

    if ChainsOfSolidarity_HealOnCast(Level) then
        call ChainsOfSolidarity_Heal(U, Level, true, X, Y, GetUnitX(U), GetUnitY(U), TimerInterval)
    endif

    call TimerStart(T, TimerInterval, true, function ChainsOfSolidarity_Callback)

    set U = null
    set U2 = null
    set Dummy = null
    set T = null
endfunction

//===========================================================================
function InitTrig_ChainsOfSolidarity takes nothing returns nothing
    set gg_trg_ChainsOfSolidarity = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(gg_trg_ChainsOfSolidarity, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(gg_trg_ChainsOfSolidarity, Condition(function ChainsOfSolidarity_CastConditions))
    call TriggerAddAction(gg_trg_ChainsOfSolidarity, function ChainsOfSolidarity_Cast)

    call Preload(ChainsOfSolidarity_EffectPath())
endfunction


And if, by some miracle, you can't figure out how to implement it, an additional copy of the instructions can be found below.
How to Implement

Collapse JASS:
 How to implement:

 ****General Notes****
 - If you do not have CSCache or the CasterSystem in your map, do the following:
     - SAVE YOUR MAP FIRST!
     - Make sure the option "Create unknown variables when pasting trigger data" is turned on in the WE preferences.
     - Copy the trigger called "Create CSCache Variables" into your map and then delete it. This creates the required
       variables.
     - Copy the ENTIRE custom script section of the map into your map. The Custom Script section is the thing
       above the category "Map Triggers" on the left-hand side of the screen.
 - After you have CSCache or the CasterSystem successfully implemented in your map, do the following:
     - Copy the trigger ChainsOfSolidarity into your map.
     - Modify all relevant configuration functions. Even if it's not used, most functions take "Level" as an argument.


 - This map uses a modified version ofVexorian's CSCache v14.3 (I made it compatable with non-preprocessor
   Word Editor), but it should be compatable with any other version of CSCache though I have not tried.

 - Note: THIS MEANS THAT YOU CANNOT JUST USE KATTANA'S LOCAL HANDLE VARIABLES SYSTEM;
         YOU MUST IMPLEMENT EVERYTHING OUTLINED ABOVE OR MODIFY THE SPELL'S CODE!


 ****Chains of Solidarity-Specific Notes****
 - This spell requires 1 buff, 3 abilities, and (if you don't already have one) a dummy unit. Copy them well.
 - This spell could easy be turned into a chain spell; you may modify it to be used in such a fashion
   if you wish.



Spell download is below.
Attached Images
File Type: jpg Chains of Solidarity.jpg (120.3 KB, 2097 views)
Attached Files
File Type: zip Chains of Solidarity v1.30.zip (85.9 KB, 552 views)
__________________
Quote:
Originally posted by Rising_Dusk
Your spells are mostly ignored because they are not very cool so we aren't very excited to review/approve them, but you are incredibly persistent and won't give us an excuse to graveyard it. That is generally what results in a resource being ignored for a long time.

The Spell Request Thread Done for, unless someone else wants to revive it...
It lasted a damn long time.

Please; Ask for Help Appropriately














Quote:
Originally posted by Kyrbi0
Huh. Almost makes me wish I had a girlfriend, to take advantage of today (wait, no, that's not what I meant... I mean, take advantage of the fact that it is international women's day... gah, never mind).
Quote:
Originally posted by Pyrogasm
Rome may not have been built in a day, but the Romans sure as hell didn't say "look at this great city we built guys!" when they had nothing more than a bit of stone and some cottages.

Last edited by Pyrogasm : 09-30-2007 at 07:30 PM.
Pyrogasm is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 09-07-2007, 11:56 AM   #2
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,278

Submissions (17)

moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default

Why didn't you add the picture to the post?? I'll check it out this night.
moyack is offline   Reply With Quote
Old 09-07-2007, 02:45 PM   #3
Callahan
Bullseye
 
Callahan's Avatar
 
Join Date: Jan 2006
Posts: 977

Submissions (72)

Callahan is a splendid one to behold (688)Callahan is a splendid one to behold (688)Callahan is a splendid one to behold (688)Callahan is a splendid one to behold (688)

Default

It's a strange spell.I mean the way it heal is unusual.
__________________
Current project:
-Singleplayer RPG:World of Genesia
-Heroes of Genesia

_________
I support every RPG map maker.
_______
OMG!My signature doesn't countains subliminal messages anymore!
Callahan is offline   Reply With Quote
Old 09-07-2007, 08:25 PM   #4
emjlr3
Rehabbing
 
emjlr3's Avatar
 
Join Date: Jun 2005
Posts: 1,386

Submissions (14)

emjlr3 is a jewel in the rough (151)emjlr3 is a jewel in the rough (151)

Mapping Contest First Place

Send a message via AIM to emjlr3 Send a message via MSN to emjlr3
Default

I think its neat, though I agree, Holy it may be not, cool, however, it is
__________________
emjlr3 is offline   Reply With Quote
Old 09-07-2007, 08:26 PM   #5
Veev
User
 
Join Date: Nov 2006
Posts: 199

Veev will become famous soon enough (63)Veev will become famous soon enough (63)Veev will become famous soon enough (63)

Default

It is a little weird I guess, but I think that is what makes it interesting.

Last edited by Veev : 09-07-2007 at 08:26 PM.
Veev is offline   Reply With Quote
Old 09-08-2007, 03:01 AM   #6
Pyrogasm
Lackadaisically Absent.
 
Pyrogasm's Avatar


Respected User
 
Join Date: Sep 2006
Posts: 4,520

Submissions (9)

Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)

Hero Contest - Fourth place

Send a message via ICQ to Pyrogasm Send a message via AIM to Pyrogasm Send a message via MSN to Pyrogasm Send a message via Yahoo to Pyrogasm
Default

Oh, sorry. I'll attach the picture to the post.


Would it be better with a chain function?
__________________
Quote:
Originally posted by Rising_Dusk
Your spells are mostly ignored because they are not very cool so we aren't very excited to review/approve them, but you are incredibly persistent and won't give us an excuse to graveyard it. That is generally what results in a resource being ignored for a long time.

The Spell Request Thread Done for, unless someone else wants to revive it...
It lasted a damn long time.

Please; Ask for Help Appropriately














Quote:
Originally posted by Kyrbi0
Huh. Almost makes me wish I had a girlfriend, to take advantage of today (wait, no, that's not what I meant... I mean, take advantage of the fact that it is international women's day... gah, never mind).
Quote:
Originally posted by Pyrogasm
Rome may not have been built in a day, but the Romans sure as hell didn't say "look at this great city we built guys!" when they had nothing more than a bit of stone and some cottages.
Pyrogasm is offline   Reply With Quote
Old 09-08-2007, 11:12 AM   #7
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,177

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

I didn't have the time to download the map, but since you so conveniently posted the code I read through it here.
  • The calibration functions could use some more comments, for example it would be helpful if the comments said what the dummy lightning and dummy buff spells were based on and what they did in the spell. Sure, normaly users would just copy your spells but they might not, they might make their own dummy buff spell based on something other than unholy frenzy. Heck, they might even not be able to use unholy frenzy because they already use it for another spell, you should either make the dummy buff spell choosable by making the orderstring a constant function too or use tornado aura to apply the buff since auras can stack.
  • Unless you are using vJass global declarations, you can not have spell-specific globals like udg_CoS_Rect and udg_CoS_Group if you want the spell to follow the JESP standard. If I tried to implement this spell like a JESP spell (copy the trigger, recreate the objects, adjust the calibration functions) the map would give me compile errors. You either need to use local groups and rects created every time (not as efficient) or not call your spell JESP compliant (it needs implementation instructions in that case).
  • Also, for it to be a JESP spell, the GUI "trigger" name should be the same as the function prefix you use (CoS). The GroupEnumUnitsInQuad should have this prefix as well or should be listed as a required function and placed in the custom script section. The code also doesn't state that it needs CSCache. Perhaps you have that elsewhere in your map but you really should have it in the spell's GUI "trigger".
  • Use of I2H is deprecated, but I can see how you don't really have much choice in the matter without vJass.
  • I can't test right now if the spell works on my computer without the CoS_InitRect function, but it should. I'm not passing any judgment until I get it to work on map init myself, but it seems weird that it wouldn't work.
  • Not really important, but I need more points in my list: X/(1.00/TimerInterval) == X*TimerInterval
__________________
Anitarf is offline   Reply With Quote
Old 09-08-2007, 10:07 PM   #8
Pyrogasm
Lackadaisically Absent.
 
Pyrogasm's Avatar


Respected User
 
Join Date: Sep 2006
Posts: 4,520

Submissions (9)

Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)

Hero Contest - Fourth place

Send a message via ICQ to Pyrogasm Send a message via AIM to Pyrogasm Send a message via MSN to Pyrogasm Send a message via Yahoo to Pyrogasm
Default

Quote:
Originally Posted by Anitarf
The calibration functions could use some more comments, for example it would be helpful if the comments said what the dummy lightning and dummy buff spells were based on and what they did in the spell. Sure, normaly users would just copy your spells but they might not, they might make their own dummy buff spell based on something other than unholy frenzy. Heck, they might even not be able to use unholy frenzy because they already use it for another spell, you should either make the dummy buff spell choosable by making the orderstring a constant function too or use tornado aura to apply the buff since auras can stack.
o.O I've never made the spell orderstring a constant function before in any spell... I suppose I should do that.
Quote:
Originally Posted by Anitarf
Unless you are using vJass global declarations, you can not have spell-specific globals like udg_CoS_Rect and udg_CoS_Group if you want the spell to follow the JESP standard. If I tried to implement this spell like a JESP spell (copy the trigger, recreate the objects, adjust the calibration functions) the map would give me compile errors. You either need to use local groups and rects created every time (not as efficient) or not call your spell JESP compliant (it needs implementation instructions in that case).
But... but... damn. Does someone want to compile the code for me if I write a version that uses a globals block and a scope? Fuck; I could just write the whole damn spell using vJASS and have someone compile it for me... but that just seems like a bad idea somehow.
Quote:
Originally Posted by Anitarf
Also, for it to be a JESP spell, the GUI "trigger" name should be the same as the function prefix you use (CoS). The GroupEnumUnitsInQuad should have this prefix as well or should be listed as a required function and placed in the custom script section. The code also doesn't state that it needs CSCache. Perhaps you have that elsewhere in your map but you really should have it in the spell's GUI "trigger".
I have a "How to implement this spell" trigger that I didn't post here; maybe I should. Additionally, my other JESP spells haven't had matching prefixes and trigger names because of the length of the spell name. Don't you think ChainsOfSolidarity_ is a little long for a prefix?
Quote:
Originally Posted by Anitarf
Use of I2H is deprecated, but I can see how you don't really have much choice in the matter without vJass.
Yep.
Quote:
Originally Posted by Anitarf
I can't test right now if the spell works on my computer without the CoS_InitRect function, but it should. I'm not passing any judgment until I get it to work on map init myself, but it seems weird that it wouldn't work.
I does not work on my computer.
Quote:
Originally Posted by Anitarf
Not really important, but I need more points in my list: X/(1.00/TimerInterval) == X*TimerInterval
Dur; I'll fix that.
__________________
Quote:
Originally posted by Rising_Dusk
Your spells are mostly ignored because they are not very cool so we aren't very excited to review/approve them, but you are incredibly persistent and won't give us an excuse to graveyard it. That is generally what results in a resource being ignored for a long time.

The Spell Request Thread Done for, unless someone else wants to revive it...
It lasted a damn long time.

Please; Ask for Help Appropriately














Quote:
Originally posted by Kyrbi0
Huh. Almost makes me wish I had a girlfriend, to take advantage of today (wait, no, that's not what I meant... I mean, take advantage of the fact that it is international women's day... gah, never mind).
Quote:
Originally posted by Pyrogasm
Rome may not have been built in a day, but the Romans sure as hell didn't say "look at this great city we built guys!" when they had nothing more than a bit of stone and some cottages.
Pyrogasm is offline   Reply With Quote
Old 09-09-2007, 08:18 PM   #9
~Void~
Inactive as fuck
 
Join Date: Jun 2007
Posts: 496

Submissions (39)

~Void~ is a jewel in the rough (213)~Void~ is a jewel in the rough (213)~Void~ is a jewel in the rough (213)~Void~ is a jewel in the rough (213)

Default

If one unit was at one corner of the map and the other on the opposite corner, it would be very hectic. Maybe you should have so if the units get too far apart the link will break.
__________________
~Void~ is offline   Reply With Quote
Old 09-09-2007, 09:25 PM   #10
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,278

Submissions (17)

moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default

Quote:
Originally Posted by ~Void~
If one unit was at one corner of the map and the other on the opposite corner, it would be very hectic. Maybe you should have so if the units get too far apart the link will break.

Ejem....
Collapse JASS:
constant function CoS_BreakDistance takes integer Level returns real
    return 1500.00 //If the two units are farther than this distance apart, the spell
endfunction        //Will end.
moyack is offline   Reply With Quote
Old 09-09-2007, 09:53 PM   #11
Pyrogasm
Lackadaisically Absent.
 
Pyrogasm's Avatar


Respected User
 
Join Date: Sep 2006
Posts: 4,520

Submissions (9)

Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)

Hero Contest - Fourth place

Send a message via ICQ to Pyrogasm Send a message via AIM to Pyrogasm Send a message via MSN to Pyrogasm Send a message via Yahoo to Pyrogasm
Default

Yep; that's what that's there for.
__________________
Quote:
Originally posted by Rising_Dusk
Your spells are mostly ignored because they are not very cool so we aren't very excited to review/approve them, but you are incredibly persistent and won't give us an excuse to graveyard it. That is generally what results in a resource being ignored for a long time.

The Spell Request Thread Done for, unless someone else wants to revive it...
It lasted a damn long time.

Please; Ask for Help Appropriately














Quote:
Originally posted by Kyrbi0
Huh. Almost makes me wish I had a girlfriend, to take advantage of today (wait, no, that's not what I meant... I mean, take advantage of the fact that it is international women's day... gah, never mind).
Quote:
Originally posted by Pyrogasm
Rome may not have been built in a day, but the Romans sure as hell didn't say "look at this great city we built guys!" when they had nothing more than a bit of stone and some cottages.
Pyrogasm is offline   Reply With Quote
Old 09-11-2007, 10:02 AM   #12
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,177

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by Pyrogasm
o.O I've never made the spell orderstring a constant function before in any spell... I suppose I should do that.
Or, as I said, use a tornado aura to apply the buff. I would prefer that, actualy.

Quote:
But... but... damn. Does someone want to compile the code for me if I write a version that uses a globals block and a scope? Fuck; I could just write the whole damn spell using vJASS and have someone compile it for me... but that just seems like a bad idea somehow.
Well, the problem with using vJass is that if you want your spell to be worthy of approval, you need to use it fully, so you'd need to redo some parts completely, not just add globals blocks. Anyway, dynamicaly creating and destroying handles isn't such a big issue, we used to do it all the time in the old days and the spells still worked.

Quote:
I have a "How to implement this spell" trigger that I didn't post here; maybe I should. Additionally, my other JESP spells haven't had matching prefixes and trigger names because of the length of the spell name. Don't you think ChainsOfSolidarity_ is a little long for a prefix?
Then make the trigger name "CoS". According to the JESP spell manifest the spell codename should be equal to the triggername, I guess some revieweres missed this. Also, the implementation instructions should be in the same GUI trigger, so if someone puts the spell into their map and then someone else sees it in that map and wants to put it into their map they still have the instructions.
__________________
Anitarf is offline   Reply With Quote
Old 09-11-2007, 01:41 PM   #13
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Quote:
Also, the implementation instructions should be in the same GUI trigger, so if someone puts the spell into their map and then someone else sees it in that map and wants to put it into their map they still have the instructions.
I can't find that requirement in the JESP manifest.

I mean, I see the --
Code:
The spell has a configuration header.
-- But that seems rather tough to follow. It's easier for people to understand in most cases how to implement something if it's in a separate trigger from the spell itself. I mean, I suppose.. It just seems counterintuitive to me.
__________________
Rising_Dusk is offline   Reply With Quote
Old 09-11-2007, 08:51 PM   #14
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,177

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Hmm, I suppose I wrote that a bit ambiguously. The comment about the spell documentation needing to be in the same GUI trigger was not meant to imply that the JESP standard states so, but rather that I feel it should be so. I think it is in the spirit of the JESP standard though.
__________________
Anitarf is offline   Reply With Quote
Old 09-12-2007, 01:07 AM   #15
Pyrogasm
Lackadaisically Absent.
 
Pyrogasm's Avatar


Respected User
 
Join Date: Sep 2006
Posts: 4,520

Submissions (9)

Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)

Hero Contest - Fourth place

Send a message via ICQ to Pyrogasm Send a message via AIM to Pyrogasm Send a message via MSN to Pyrogasm Send a message via Yahoo to Pyrogasm
Default

I can do it, I suppose...

I'll update this spell with all of the suggested fixes fixed in maybe 5 hours or so after I return home.
__________________
Quote:
Originally posted by Rising_Dusk
Your spells are mostly ignored because they are not very cool so we aren't very excited to review/approve them, but you are incredibly persistent and won't give us an excuse to graveyard it. That is generally what results in a resource being ignored for a long time.

The Spell Request Thread Done for, unless someone else wants to revive it...
It lasted a damn long time.

Please; Ask for Help Appropriately














Quote:
Originally posted by Kyrbi0
Huh. Almost makes me wish I had a girlfriend, to take advantage of today (wait, no, that's not what I meant... I mean, take advantage of the fact that it is international women's day... gah, never mind).
Quote:
Originally posted by Pyrogasm
Rome may not have been built in a day, but the Romans sure as hell didn't say "look at this great city we built guys!" when they had nothing more than a bit of stone and some cottages.
Pyrogasm is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 06:03 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2017, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services