• 🏆 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!

[Spell] Nova Spells

Status
Not open for further replies.

sentrywiz

S

sentrywiz

Hi all.

So, nova spells. How are they made?

Is it a for loop that loops every example 30 degrees and creates a dummy in that location?

I'm slightly confused about the for loop that creates the dummies in 0 - 360 degrees angle. Can someone show me a blunt example?
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
To distribute it evenly, you would normally state the amount of spots on the circle or the distance between two spots, so the gap does not get too wide on a greater circle diameter. Then you can calculate the required angle delta. The term nova in gaming usually refers to a sprawling ring, so you have an outer circle and an inner circle which increase in size. You can make range checks to the center to determine what is in between. You do not necessarily have to place spots on the ring, you could also use a model or something in the center and scale it gradually.
 

sentrywiz

S

sentrywiz

Increment a real variable by +X and Set Point1 = (Point offset by RealVariable).
Where Point = Position of Caster. Check if RealVariable < 360-(Increment) and increase its value; otherwise, set it to 0.

You describe only one type of nova spells. According to that, yes, use a timer to spawn the effect every Y seconds.

So something like this?

  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
      • Set degrees = (degrees + 36.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • degrees Greater than 360.00
        • Then - Actions
          • -------- exit loop --------
        • Else - Actions
          • Set loc1 = (Position of (Triggering unit))
          • Set loc2 = (loc1 offset by 100.00 towards degrees degrees)
          • Unit - Create 1 Footman for Player 1 (Red) at loc2 facing Default building facing degrees
Disregard the leaks, this is just a 30 seconds quick example to see if I get the point?

Well nova spells are an expanding circle either in target point or around target unit. I don't know other scenarios where nova spells are valid. If you know other nova spells, then share.

Using your suggested method it'd be fairly hard to find a suiting model. But yeah you create the effects in a circle around the caster and then move them outwards. If you want to use dummy units you can combine it with a knockback system for the movement.

Why would it be hard to find a suiting model?

What way would you suggest I do it? If you know of a more elegant way to create either better looking or more efficient (note, no vjass) nova spells, then please tell.
 
Level 12
Joined
Oct 16, 2010
Messages
680
So something like this?

  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
      • Set degrees = (degrees + 36.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • degrees Greater than 360.00
        • Then - Actions
          • -------- exit loop --------
        • Else - Actions
          • Set loc1 = (Position of (Triggering unit))
          • Set loc2 = (loc1 offset by 100.00 towards degrees degrees)
          • Unit - Create 1 Footman for Player 1 (Red) at loc2 facing Default building facing degrees

Yeah that would be fine, depending on how big the outer circle will be u can make it more dense by increasing the number or by linking them by a special effect
 

sentrywiz

S

sentrywiz

Yeah that would be fine, depending on how big the outer circle will be u can make it more dense by increasing the number or by linking them by a special effect

Okay thanks.

And how would I make a special effect nova, like a circle, then expand it and damage units that come in contact with? That kind of seems hard to do.
 

sentrywiz

S

sentrywiz

I'm confused.

Take for example, Razor's Q spell from DotA.
How would I make a spell like that?
 
You don't need to check if angle is greater than 360. I made tests long ago, and 361 is == 1, 362 == 2 and so on. On a side note, do not use Integer A. Use your own user-defined variable.

An idea for this would be to create an ability based off Carrion Swarm and have one dummy fire it in all directions (with 0 cast backswing/point this would work). A problem with this is, though it is much simpler than handling a loop trigger with one instance per segment, it cannot be repositioned with the caster's movements.
 

sentrywiz

S

sentrywiz

You don't need to check if angle is greater than 360. I made tests long ago, and 361 is == 1, 362 == 2 and so on. On a side note, do not use Integer A. Use your own user-defined variable.

An idea for this would be to create an ability based off Carrion Swarm and have one dummy fire it in all directions (with 0 cast backswing/point this would work). A problem with this is, though it is much simpler than handling a loop trigger with one instance per segment, it cannot be repositioned with the caster's movements.

That's a nova when you don't know how to create dummy missile units or when you need static damage nova. Take this as an example:

This is Razor's Plasma Field spell in DotA (wc3):

razor.jpg


And this is the same ability in Dota 2:

images


The first one looks like dummy units that go up X range then retract. But the second one looks like an expanding ring. Its easier to check whether enemies are in range for every dummy, but how do you do it for one ring? Is that a giant dummy unit? Is it a special effect? This is where I'm confused.
 
It's not hard for an advanced game engine to have circular areas (with ending some distance away from starting circumference). For wc3 I think you will have to use multiple dummies and give them a curved lightning model (resize gradually if needed).

That's a nova when you don't know how to create dummy missile units or when you need static damage nova.
It seems you know how, you can do so. For a global caster group (not for each instance of moving dummy), I suggest to use a unit indexer and store the hit group into the custom value of the caster.
 

sentrywiz

S

sentrywiz

It's not hard for an advanced game engine to have circular areas (with ending some distance away from starting circumference). For wc3 I think you will have to use multiple dummies and give them a curved lightning model (resize gradually if needed).

It seems you know how, you can do so. For a global caster group (not for each instance of moving dummy), I suggest to use a unit indexer and store the hit group into the custom value of the caster.

So you are saying that any nova is created with dummy units?
 

EdgeOfChaos

E

EdgeOfChaos

You could make it with Lightning effects too, but yes, DotA ones are made with dummies. To be honest, lightning effects would make it look even more awesome though.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
I watched an extract of a video showing the DotA 2 ability. It looks like the model just gets scaled up. Compare it to a selection circle in wc3.

Its easier to check whether enemies are in range for every dummy

Why? No. I already said you just have to pick units within the current range of the outer circle and subtract the units within the range of the inner circle.

You demanded a nova, which is an expanding circle. A circle is defined by center coordinates and a radius. So the first thing to do is exactly that. Save a center spot and have a number variable which gets periodically incremented. Everything else is attached to this imaginary shape using the current parameters.
 

sentrywiz

S

sentrywiz

I watched an extract of a video showing the DotA 2 ability. It looks like the model just gets scaled up. Compare it to a selection circle in wc3.



Why? No. I already said you just have to pick units within the current range of the outer circle and subtract the units within the range of the inner circle.

You demanded a nova, which is an expanding circle. A circle is defined by center coordinates and a radius. So the first thing to do is exactly that. Save a center spot and have a number variable which gets periodically incremented. Everything else is attached to this imaginary shape using the current parameters.

I still do not understand how am I to know when the scaling ring / circle that expands will hit and damage a unit. What you are telling me is save a couple of variables, then add to them periodically. Okay, this is logical when expanding the circle so it kind of looks like an expanding nova.

But how do I DETECT when the ring hits something?

With dummies at least I have a unit to add into the condition of "comes into range of enemy unit" but with the ring I just have variables of a ring with radius and center.

EDIT

I made a 1 minute map to simulate the one dummy unit nova. And I'd appreciate if you can put the triggers that you would make so that this nova would detect and hit enemy units if it comes into contact with/

View attachment nova time.w3x
 
Last edited by a moderator:
Level 26
Joined
Aug 18, 2009
Messages
4,097
Well you do not need to subtract the inner units if you assume that a unit is only hit once and cannot appear from the inside. That's a question how you want it. For example a unit could blink over the circle line and therefore be unaffected. The pick frequency and ring width have to be high enough (in comparison to the expanding speed) so you won't miss units walking through.
 

sentrywiz

S

sentrywiz

The Animation - Set Unit Scale action is relative to the model's standard size. So directly applying the circle radius as scale factor may be inappropriate unless the radius of the model is exactly 100.

Okay I just looked at the map, and surprisingly this is simpler than the other way. But I still don't get it... I mean, I'm looking at the triggers, and there are two unit groups.

  • Set pick1 = (Units within radius of (Position of circleDummy))
This I understand, picking units each time the ring increases by 20 per .05 seconds.

  • Set pick2 = (Units within (radius - ringWidth) of (Position of circleDummy))
This I don't really understand. This picks units inside the ring? Since ringWidth is always 75 and the radius always grows so this will pick all units at maximum of 425 when radius reaaches 500. So what is the point of this group?

  • Unit Group - Remove all units of pick2 from pick1
This I completely don't understand. It removes the units picked by pick2 from pick1 group? :vw_wtf:

The rest I understand.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
The radius you increase in intervals defines the outer circle line. Now you do not want to pick all units inside the circle but rather those who are close to the circle line, on the border. If this border had a width of 0, you would not be able to pick anything because the objects won't be exactly on the line. Therefore we add a margin, I simply chose constant 75. So the picks should always happen in the area between current radius and current radius - 75. How do we get this ring area? Wc3 offers us circular picks -> first we pick everything up to the outer border line, up to radius, so we get both the units on the stripe (that we want) and the units below the inner circle line (that we do not want), the units up to the inner circle line are overmuch. Consequently we throw these units out. We pick units again but this time only up to the inner line. Well and now the difference is what we wanted.
 

sentrywiz

S

sentrywiz

I see. So the difference between the outer rim and the inner rim of the circle is that small space where the units are picked.

+rep

Btw, why cannot I just pick units that the circle picks up as it grows, add them to the damage group and not worry about them again?
That way units will get damaged once and if a unit comes close when the ring retracts or expands, it will get damaged as well.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
As I said, it's a question how you want it. Normally a nova is an expanding ring. And if you do not paint in the inner area either, that would be an inconsistence to the pick algorithm. In case you pick within the whole circle everytime, units blinking over the circle line or when a new unit is created within the circle meanwhile, it will still be affected, too. Nor did you state that each unit shall only be hit once, I just included the option because it's rather common.
 

sentrywiz

S

sentrywiz

As I said, it's a question how you want it. Normally a nova is an expanding ring. And if you do not paint in the inner area either, that would be an inconsistence to the pick algorithm. In case you pick within the whole circle everytime, units blinking over the circle line or when a new unit is created within the circle meanwhile, it will still be affected, too. Nor did you state that each unit shall only be hit once, I just included the option because it's rather common.

I see. Well many thanks, I learned a really easy way to make a really cool nova spell. Now if I only find a good model :p
 

sentrywiz

S

sentrywiz

Could just use damage detection and something like phoenix fire if unit-group detection is laggy. Not quite sure which is better. I know immolation and phoenix fire are easier though.

Yeah but now I learned how to make a nova from one dummy unit and a few simple triggers, and I can add cool effects to it with ease.

Well Immolation and Phoenix Fire are great for static spells, if I was gonna be making a dota clone where most spells are static damage without increase from items and abilities.
 

sentrywiz

S

sentrywiz

I don't see the point your trying to make, phoenix buff uses a buff when it deals damage which makes it one of the best detection methods while immolation is useful if combined with looking for help's damage detection system.

I misunderstood your post completely. Plus it was late at night so I was also under confusion magic.

I don't understand the point you are trying to make with Immolation and Phoenix Fire either. I know they are useful spells, but combined with a dds?
 
Status
Not open for further replies.
Top