Spellpack

Im_On_56k

Hm...
Reaction score
116
I have made my first all jass spell pack.
Consists of 6 jass abilities.
Please comment if you try these spells out.
You can freely use these spells in your map, and no credit is required.
If you put these in your map you will have to copy all of the dummy units, spells and triggers, you must also change the raw code of the dummy units and spells to what it is in your map. Or it will not work in your map.

If you want a spell made you can suggest one, but may I warn you I just started learning jass a few days ago :)

Mass Coil - Shoots out 10 coils, each coil dealing 20 damage.

Magic Nova - Uses all the elements of magic to deal single target and AOE damage to units around the target.

Magic Missle - Shoots a missle at a target enemy unit, stunning all units around the target, while teleporting the target to the hero.

Thunderstruck - Shoots 3 bolts of lightning at a enemy unit, the force of the lightning splashes to nearby enemy units dealing damage.

Demi Light - Shoots out horific light to nearby enemy units, each time an enemy unit is attacked that is affected by the light, the unit will lose 10% of its health. Lasts 9 seconds.

Natures Growth - Enlusts yourself from the power of nature, starting weak, and getting bigger and faster each second. Lasts 30 seconds.
 
Good for a first spell pack, but you have alot of problems.

For instance, you can change all your conditions to

Code:
function Trig_Magic_Missle_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A005'
endfunction

Instead of

Code:
function Trig_Magic_Missle_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A005' ) ) then
        return false
    endif
    return true
endfunction

You also leakt ons of memory. Remember to set your locals to null after using them. You CAN'T set Booleans, reals, integers, etc. to null since they aren't handles.

One of the good things about JASS is making GUI more efficient. You didn't use any of these besides local variables.

Remember for unit groups you can use a loop and use a unit as the first of group and do your actions like that.

Also remember, most BJ functions just call natives which isn't efficient at all. You can jsut call the native instead of using a BJ like ForGroupBJ.
 
Ok, even if these are your first, no mercy in my critique =]

Overall: They work with their intended effect, however some of their effects aren't very clean and also the formating (at least how it appears to me) is quite bad. Indent and space things out more, it makes it easier to follow and look more organized. Also, it makes easier to find things when you look at it again, just like paragraphs in normal writing. One last thing would be, give your variables more descriptive names. In short code like this it isn't a problem, but it can be a problem as things get longer.

Magic Nova: There are too many things in the loop in my opinion (unless it was intentional to play the frost nova, flamestrike and monsoon animations 10 times). Also, you didn't give the skulls enough time to move to the target.

Mass Coil: Everything works well. Good job.

Thunderstruck: Hard to tell that there are three lightning bolts, its more apparent when the target unit is moving however.

Demi Light: Interesting spell, and it works very nicely.

Magic Missle: Target teleports slightly (.5 sec or so) before the 'missle' of the spell reaches it. Also, why didn't you add the stun 'cyclone' over the heads of the paused units? =p

Nature's Growth: Interesting, enlargement is stilted somewhat (probably unavoidable with your method). Out of curiosity, why did you separate it into three parts?

My vote for best? Demi Light.
 
- At Magic nova u use frost nova effect which must be attached to origin of unit instead of overhead. Also when you create a special effect it will go ahead untill it finishes its animation even u destroy it. At magic nova the frost nova effect stands still even unit is death in my opinion when you cast the magic nova to target first pause it then do effects, and finally demage the targeted unit.
Also when you cast the spell to large scale units death coil missle dummys cannot be seen well.

- Mass Coil is nice but target get demage before coil hits it. You must fix this couse it makes the spell look bad.

- Magic missle does not stuns the units within range of 300 of targeted unit.

- Thunderstruck has a problem instead of creating it at location create it attached to unit. it will solve the problem couse when targeted unit moves while casting this ability bolts stands at its back but units demage near unit with no effects.

- you dont need to do Natures Growth with Jass just create ability from neutral hostiles frenzy and modify its effects.

- And finally I could not find anything with Demi Light its a good spell in my opinion.
After fixing bugs my votes will be like that
- Demi Light *****
Good challenging spell, a new idea that doeas something instead of just demaging unit/units Will be greate if you can add more tings in it forex if the unit is undeath do something different ect.
- Mass Coil ***
Nothing special with it but i liked the rapid fire tingie
- Magic Missle ***
Can be a good challenging spell if you modify it on better way and fix its bugs but good for melee heros not for ranged ones.
- Magic nova **
Something that demages the unit.. only point is the death coil dummys which is attacking from well fixed locations
- Natures Growth (none)

And about Jass good point to start with. But i strongly reccomend you to read this:
http://wc3sear.ch/viewtopic.php?t=10112
Also you must really correct your codding creating spaces adding some comments will make it understadable even when you want to open and edit your own codes after sometime...
By the way i want comments too :p
take a look at this:
http://www.thehelper.net/forums/showthread.php?t=20082

I wonder why no one posts comments to my posts?
 
mems said:
- At Magic nova u use frost nova effect which must be attached to origin of unit instead of overhead.

Thats not a requirement, just the default. He can attach it where he likes =p

mems said:
Also when you create a special effect it will go ahead untill it finishes its animation even u destroy it.

That would be wrong. "call DestroyEffect(<effect>)" will remove the <effect> instantly.

mems said:
- Magic missle does not stuns the units within range of 300 of targeted unit.

If you read my comment (or his code), it pauses them, but he forgot to add the 'stun' special effect overhead =p

Just pointing out some things. Also, I'll take a look at the thread you wanted comments on ^_^
 
That would be wrong. "call DestroyEffect(<effect>)" will remove the <effect> instantly.
u must try it..

Some effects are continues but some of them has a death time.

When you destroy an effect instandly with a death time such as life steal, hail or a missle it will stand still untill it dies...

But you are right only on channeling effects like starfall effect, tranquility effect.
 
mems said:
When you destroy an effect instandly with a death time such as life steal, hail or a missle it will stand still untill it dies...

"Death time"? What do you mean?
 
Could you clarify what you mean by 'kill' and 'remove'?

I assume you mean 'kill' as in 'end', and 'remove' as in 'remove from memory' but I just wanted to be sure.
 
yes i meant some effects continue forever but some effects appear and die after some time.
 
Ok, in that case I am 100% sure that DestroyEffect() will stop that effect from being shown.

Example: I thought maybe the animations would continue for a spell I was making so I put a DestoryEffect(GetLastCreatedEffect()) to try and clean things up. Right after I added it, when I went to test the ability the effects didn't seem to appear at all. They were there before I added that line and after I removed it. (The effect was the Blink <caster> effect btw, which does disappear after it plays).
 
Can you please try this one this time? :
Code:
    Events
        Unit - A unit Is attacked
    Conditions
    Actions
        Special Effect - Create a special effect attached to the origin of (Attacking unit) using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
        Special Effect - Destroy (Last created special effect)
 
Hmmm... I can't test that right now, but heres something:

I know some abilities like banish and others seem to 'linger' (like a cloud or mist afterwards) after the effect is done. Perhaps this is linked to a 'death' animation in the effect model? And that destroyeffect(), like killunit() will imediately remove that widget and play the death animation? So, if some effects have it (like frost nova (maybe?) and banish, etc) while others do not (blink, etc), that would lead to that inconsistency.

This is just speculation at the moment as I cannot test with the WE.
 
No your point is right you get it. I was meaning that but could not explaned it.
 
It's jsut like with units.

Destroying an effect will play it's death animation and destroy it. You don't need to destroy an effect that isn't looping.

And, it's better to use this:

call DestroyEffect(AddSpecialEffectLoc("Whatever", loc))
 
Nice spells! They're good, but you should follow some guidelines in your next JASS code:

- Indentation is the key to undestand what are you doing
Put some fixed number of spaces for every level of indentation
This helps reading the code and working with it

- Put self-descriptive names to your locals
For example, in Trig_Mass_Coil_Actions, inside Mass coil, there's a local named o. What o stands for?
At the very end of this function there's a exitwhen that should look like that "exitwhen o > 10" but instead it is "exitwhen 0 > 10"
This creates an infinite loop because 0 is always less than 10
Obviously, this wouldn't had happen if your variable name were UnitCounter or something like this.

- Init your locals value as soon as possible, even in declaration
Code:
local unit Unit1
local unit unit2
set Unit1 = GetSpellAbilityUnit()
set unit2 = GetSpellTargetUnit()
becomes
Code:
local unit Unit1 = GetSpellAbilityUnit()
local unit unit2 = GetSpellTargetUnit()
This way your code will look more readable and understandable, for you and for others!

Anyhow, great work, all abilities look nice
Happy mapping and happy coding!
 
I always recommend making your locals as short as possible, making them cleaner and more efficient.

I always use "u" to declare the caster, "t" for target, "g" for group, etc.
 
Ooh. Very pretty! :D

Doesn't that all create a lot of lag, though?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    I think on the new one they did change it, but idk. I don't really care whatever the government is doing right now because it's consistently absurd. Like what is RFK doing in charge of health anything? I love the bear story because WTF was that, but also, pretty much every time he talks it's WTF. Like even his voice sounds microwaved
    +1
  • Varine Varine:
    The pyramid is fucking dumb as shit, no matter how you arrange it.
  • Varine Varine:
    It's actually remarkably easy to make mayonnaise though. Fun fact, it USED to kind of be a French mother sauce. I believe that Careme considered it one, it may have been aioli but that has also built a different meaning than it used to. An aioli is just mayonnaise I mixed with other shit typically, I didn't start it don't come at me
  • Varine Varine:
    It's very hard to do it on a large scale though
  • Varine Varine:
    Depending on how you pour the oil the consistency can vary wildly, but that's true for most emulsions. I can only make about two quarts at a time with my robo coup, and if I have to make several in series because I forgot to order it becomes really obvious even when I do it. We have to wait and mix them all together to make sure we have the same thing.
  • Varine Varine:
    Hollandaise is also kind of like that, emulsions require a very steady hand to do exactly the same every time.
  • Varine Varine:
    Luckily I live in an age with electricity so it's way fucking faster, but when I was just a boy trying to find my place I had some hardcore chefs that made use do things like that by hand. It is WAY easier to get right by hand because you control it and can feel it, but it takes soooooo much longer. And on the scale a modern kitchen requires... I serve 400-500 guests on average per day right now, if I had 100 then we could do things way better
  • Varine Varine:
    But we can't do that. In the winter yeah, but I HAVE to get people through here right now so I can afford the staff that we CAN do that. We have about 100 days of summer, and if that summer doesn't make us what it will, then I can't operate the other most of the year with my staff. The owner is talking about closing two days a week to cut down on labor, I told him he should cut down on vacations and it did not go great. I do think I won though, I have to keep my fucking core staff and they have to be gainfully employed
  • Varine Varine:
    Sure some of them might take a second job, but I can't just cut my entire staff to unlivable hours, nor can I can cut them off all winter if I want them to come back.
  • Varine Varine:
    And also, there is no fucking way I'm pulling these hours come september. I only do this right now because I have to, the second I don't have to be the one doing it I won't be
  • Varine Varine:
    I have a 5 person core staff in the kitchen, not including me or Chef Ben
  • Varine Varine:
    Though two of those people are likely not making it this year. One of them has been replaced, the other I am kind of trying to. He's being a giant bitch, today I had to get onto him because in the three hours before I left he had taken like thirty minutes for cigarette breaks
  • Varine Varine:
    And he was also complaining to me the other day that he was out of weed so couldn't smoke any before work that day, and was confused about why I was annoyed he was telling me, his boss, that he is smoking weed everyday before work.
    +1
  • Varine Varine:
    Like yeah I can tell. I don't need to fucking know.
  • Varine Varine:
    So now he's getting scrutinized and will not be top of the list. I know I don't have the smartest people but I do expect them to have some common fucking sense
  • Varine Varine:
    I did do a rare thing for me and hire a girl last month without warning. Everyone was made at me because I started her at like 21, but she worked with me before and I was like don't care. She made 19 at her old job and I wanted her to come work with me, she is the best
    +1
  • Varine Varine:
    I'm going to get her a raise at the end of the summer. She wants to go to school again, but I want her to still work with me so.... she kind of can just tell me what the price is. I can go to 25 if she keeps up. I need to get her onto line more, that's what she wants, but I need her where she is and it's not fair that she doesn't get the little bit of raise that comes with it. She can do it no problem, I've worked with her there.
  • Varine Varine:
    It's just hard to move and train people unnecessarily right now. And also the line fucking sucks, it's not any more fun. This is turn and burn so I have the bankroll, and everyone suffers for it
  • Varine Varine:
    Eventually we'll get it balanced, we'
  • Varine Varine:
    we're starting online orders and stuff, but I also turn that off all the time because I barely keep up trying to be the best at Sysco shit
  • Varine Varine:
    I think it's gonna be a good fall and winter though. We're going to have a good staff, they will get along, they will be able to manage the workload and the complications, they know how to really cook this year, like every person on line knows their steak temps. Some of them use thermometers a lot and they don't always use them right, but they do know how to do it. Failure, especially in this field, is the only way to get better. They'll get it
  • Varine Varine:
    They won't get feel down while they do the thermometer, but we didn't have an instant read probe when I was learning. Like they did but god knows how off it is, you HAD to do it by feel. Even if the chef was fine with me bringing my own, it takes too long. Poke and know
  • The Helper The Helper:
    420 threads in the Artificial Intelligence forum :)
  • The Helper The Helper:
    Happy Monday!
    +1
  • The Helper The Helper:
    and then it was Tuesday!
    +1

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials
      Top