• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

"Custom Spell" Advice.

Status
Not open for further replies.
Level 2
Joined
Oct 2, 2010
Messages
15
Hello! Thank you for taking the time to check my post :)

Basically, I've been making maps for about 10 years. Thing is, I learnt pretty much everything I know about mapping from trial and error, and I'm not terribly bright! I mostly make single-player dungeon maps, where you take ~1-5 heroes through a dungeon, killing bosses (the usual stuff).

Thing is, I always struggle when it comes to making 'new' boss abilities (basically anything different from the existing Blizzard, Flame Strike, etc). I always create my "custom spells" through the Special Effects and Damage Area triggers, and an extensive use of regions.

I threw a quick fight together earlier today to show you an example. It took me about 3 Hours to put together, which is probably about average for the time it takes me to make new Boss abilities like this.

(Basically, a flame strike hits the corner of the platform, sends out 3 waves of badness and spawns an add).

f17v.jpg


This technique has sort of worked for me for a number of years now, but it's starting to feel very limiting (not to mention just in that 30 seconds of combat it took over 50 regions, so when I'm making a full map of 10+ Bosses things get a little chaotic).

My question basically is this: Is it worth me learning to make proper custom spells, or is my method more efficient? I've tried to learn from tutorials a few times before, but I can't even begin to get my head around it (In the basic triggers I use it's all very nice a simple "Create Unit" Creates a Unit, in all of the custom spell triggers I've seen there are countless 'Green Icon' triggers which make zippo sense to me).
 
Level 2
Joined
Oct 2, 2010
Messages
15
What's simple and basic to some isn't simple and basic to people with less smarts :D

My question is (If I didn't make it clear, sorry! D:):

For making boss abilities for a single player map, is my method efficient compared to the 'Green Icon' stuff? And is it possible just to maybe learn a little of the complicated stuff and benefit from that? And how long will that take to learn, roughly? :)
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
First, you leak a lot - in the trigger you posted, all your special effects leak - that number is further multiplied each time that trigger fires.
Look here: http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/ to learn how to remove memory leak.

There is far better way to create and move units by creating points via trigger editor, instead of million regions. Also, moving units via points can make it look as a more fluid movement than moving them from region to region.

Last but not least, all wait actions with small time (like 0,27 or lower I think) will not be accurate - e.g. a "wait 0,2 second" action will wait the first time for example 0,15 and the other 0,27 second.

I suggest you take a look at Tutorials section - mainly general mapping tutorials and trigger (gui) editor sections. Those have some great tutorials that can explain and show you wonders you can do via the trigger editor.
 
Level 2
Joined
Oct 2, 2010
Messages
15
That's great to know to destroy a special effect directly after it displays, but saying that I can't say I've ever noticed any lag from 'leaks' even in my larger maps. It's also good to know that under 0.27 seconds the Wait commands become inaccurate - These are just the sort of things that it's really hard to pick up on when you learn just from experience!

As silly as it sounds though, I struggle to learn much from tutorials, because I just don't understand them. It's rarely explained as simple and clear as you just did :) Thank you.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
wait is inaccurate always, in single player it could be usable, but not in multiplayer maps.

Wait has a problem tho, it ignores the fact that warcraft 3 window may not even have focus right now, and also wait keeps clocking even if you pause game, timers wont

the Wait has flaw that it always adds a bit time to it, so if you say Wait 0.00 seconds, it is going to be from 0.08 to like 0.3, the same difference is for every wait, its just that with 100 seconds wait you will not notice 0.3 seconds difference, but with 0.1 seconds delay, you most likely will, and no wait will never wait for lower then the time specified, always for longer

But yes Nichilus is right about the fact that calling twice the same Wait command may end in different times that you wait(0.2 -> 0.24, 0.35, 0.28 ...)

by the way, the boss fight looks nice :)

You could improve it by making the whole platform one big region and creating those effects at random points, it would reduce the pattern predicition, but would be more random = a bit harder
 
Level 2
Joined
Oct 2, 2010
Messages
15
by the way, the boss fight looks nice :)

You could improve it by making the whole platform one big region and creating those effects at random points, it would reduce the pattern predicition, but would be more random = a bit harder

Thank you very much!!

And that's exactly the sort of advancements I want to make with my triggering! The problem is with making the "flame strike" hit a random point in the region, for example, would be that I can't predict where it would hit so I can't plan which regions the 'waves' should move across :( Any ideas?
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
That's great to know to destroy a special effect directly after it displays, but saying that I can't say I've ever noticed any lag from 'leaks' even in my larger maps.
It depends on how good your PC is really - a better PC has more memory and so it can "withstand" those leaks compared to older PCs.
Those leaks do not take much of your memory and it really depends on your triggers - if you create a few leaks, you may never notice anything.

But say I use a periodic trigger that fires every 0,01 second and that trigger causes 10 leaks - just after a second I would have 1000 memory leaks, giving that trigger to run for some time, my fps would start dropping down.

Even if you have a few leaks, though, it is better to clear them all - only for practice if nothing else, so with more complicated triggers you won't forget that.


Thank you very much!!

And that's exactly the sort of advancements I want to make with my triggering! The problem is with making the "flame strike" hit a random point in the region, for example, would be that I can't predict where it would hit so I can't plan which regions the 'waves' should move across :( Any ideas?
This is where variables come in :)
With variables, you can choose random spot in your platform and save that spot to use it as a center of "offspring" points.

Look here: http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/variables-5896/
In the end, it's all about experimenting yourself with the knowledge you have and ask for advice here :)
 
Level 2
Joined
Oct 2, 2010
Messages
15
Ok, great! I'll start clearing up my leaks, just for good practice if nothing else.

I'll check over your Variables link. I'm really hoping I can get to grips with it - After 10 years of these restrictions my mind would be blown to have this extra freedom ^^
 
Level 2
Joined
Oct 2, 2010
Messages
15
Ok! BRILLIANT NEWS!!!

After reading a lot of tutorials, I still had no clue. I just can't learn by reading...



... However! I spent a while exploring the variables and such, and now I finally understand how to set a point! So that's a brilliant start.

Next question - I get that I could use Dummy Units to cast a spell, but! How can I get them to cast it in a set direction? For example, if I picked a random point with my variable, and I wanted 4 Dummy Units to cast a Shockwave out of it in a star/cross (Think like Bomberman-style), how would I set them to fire one out a 0 degrees, one a 90, one at 180?
 
Last edited:
Level 28
Joined
Sep 26, 2009
Messages
2,520
That would be quite hard (but not impossible), because a face pattern cannot be mathematically calculated (like circle, spiral, rectangle, etc.)

You would need epicenter of the face - let's call it StartPoint and then you would need to know the range and angle of each point of the face from the StartPoint.
The good thing is that face is symmetrical (well, almost), so you need to know only one side of the face and from that part you can "mirror" the other part.


The hard part about it is that you would need to find out the angle and range of each point of the face towards the epicenter of the face, but once you have that done, you can cast the spell everywhere and it should create nice face.

----------
About exploding - you would have to save each effect into variable and when you want it to explode you destroy those effects, pick all units in X range of the epicenter and check their range towards each flame - if it is close enough, you damage it, else you don't.

For those exploding flames - instead of special effect, you could instead use dummy unit, whose location you can easily find out.
 
Level 2
Joined
Oct 2, 2010
Messages
15
That would be quite hard (but not impossible), because a face pattern cannot be mathematically calculated (like circle, spiral, rectangle, etc.)

You would need epicenter of the face - let's call it StartPoint and then you would need to know the range and angle of each point of the face from the StartPoint.
The good thing is that face is symmetrical (well, almost), so you need to know only one side of the face and from that part you can "mirror" the other part.


The hard part about it is that you would need to find out the angle and range of each point of the face towards the epicenter of the face, but once you have that done, you can cast the spell everywhere and it should create nice face.

----------
About exploding - you would have to save each effect into variable and when you want it to explode you destroy those effects, pick all units in X range of the epicenter and check their range towards each flame - if it is close enough, you damage it, else you don't.

For those exploding flames - instead of special effect, you could instead use dummy unit, whose location you can easily find out.

The face was just an example as the first pattern I could think of. A circle or a spiral would work just as well :)

I'll take what I've learnt about using the Point Variable and I'm sure I can make plenty of new stuff from that, the rest sounds a little advanced :) Thank you.
 
Level 2
Joined
Oct 2, 2010
Messages
15
Just thought I'd pop another update, to show people I've actually learnt something! Thank you very much for your help.


osmr.jpg


Similar better boss ability, made in about 2.5 hours less than my original example :)
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
What's simple and basic to some isn't simple and basic to people with less smarts :D

And how did you figure out part of GUI triggering? You just have to have some courage to experiment. My point was that you can probably learn jass by applying a small quantity of effort instead of by being smart or possessing previous knowledge. Unlike 10 years ago, there are a lot of tutorials by now, people that can teach you about it and reference material.

When I started out, I did so by opening others' maps, adopting their structures. In general, thoroughly checking out the possibilities of the editor is most helpful. For jass, it was kinda enough to convert some of the GUI triggers to learn about the syntax. Reading around the forums would then extend the wisdom and close gaps.

Since you do not even know about variables, you probably nowhere use hashtable. So I strongly advise to use Jass NewGen Pack, an alternate editor that provides some key advantages.

For making boss abilities for a single player map, is my method efficient compared to the 'Green Icon' stuff? And is it possible just to maybe learn a little of the complicated stuff and benefit from that? And how long will that take to learn, roughly? :)

I do not know what you mean by 'Green icon' stuff. Green icons appear if you select some invalid image for object buttons e.g.

My question basically is this: Is it worth me learning to make proper custom spells, or is my method more efficient? I've tried to learn from tutorials a few times before, but I can't even begin to get my head around it (In the basic triggers I use it's all very nice a simple "Create Unit" Creates a Unit, in all of the custom spell triggers I've seen there are countless 'Green Icon' triggers which make zippo sense to me).

I will say it this way: By extending your scope, your expectations will most-likely raise. The range GUI offers is engine-oriented. Swinging off this path will provide new chances but also reveal difficulties. Maps do not have to be written in the most marvelous way to be fun. The primitive method allows you to output great dimensions of independent content since you do not need to follow/build up any environment. Such environments in contrast enable you to create wholly new aspects and the mapmaking process becomes an art in itself.

Systems are good as a base layer, particle mapmaking accelerates the creation of differentiated content. The trick is to find the intersection and modularize it the way it can match.
 
Level 2
Joined
Oct 2, 2010
Messages
15
The spell was silly
It uses Regions just to create effects.

Use Offsets :D
Offset also leaks, make another point variable for it.
Uhm,... :(

Almost everything leaks, well, unit don't leak, as well as visibility, and some other I forgot.
Should I just forget about leaks then? It seems like (for something that's never caused me problems, yet) they make my triggers even more limited than what I was doing before.

Btw, use tags in posting triggers
Ok, thank you!
 
Level 2
Joined
Oct 2, 2010
Messages
15
And how did you figure out part of GUI triggering? You just have to have some courage to experiment. My point was that you can probably learn jass by applying a small quantity of effort instead of by being smart or possessing previous knowledge. Unlike 10 years ago, there are a lot of tutorials by now, people that can teach you about it and reference material.

When I started out, I did so by opening others' maps, adopting their structures. In general, thoroughly checking out the possibilities of the editor is most helpful. For jass, it was kinda enough to convert some of the GUI triggers to learn about the syntax. Reading around the forums would then extend the wisdom and close gaps.

Since you do not even know about variables, you probably nowhere use hashtable. So I strongly advise to use Jass NewGen Pack, an alternate editor that provides some key advantages.



I do not know what you mean by 'Green icon' stuff. Green icons appear if you select some invalid image for object buttons e.g.



I will say it this way: By extending your scope, your expectations will most-likely raise. The range GUI offers is engine-oriented. Swinging off this path will provide new chances but also reveal difficulties. Maps do not have to be written in the most marvelous way to be fun. The primitive method allows you to output great dimensions of independent content since you do not need to follow/build up any environment. Such environments in contrast enable you to create wholly new aspects and the mapmaking process becomes an art in itself.

Systems are good as a base layer, particle mapmaking accelerates the creation of differentiated content. The trick is to find the intersection and modularize it the way it can match.

I'll take a look at some Jass tutorials, motivated by people on youtube claiming how easy it is :p
 
^Creating a unit leaks, even if you remove the unit afterwards. But the leak is very very small so don't worry about that.

Well, still not so leaky and good enough to be called leakless [unless spammed, also, is this removable?]

Uhm,... :(


Should I just forget about leaks then? It seems like (for something that's never caused me problems, yet) they make my triggers even more limited than what I was doing before.
Never, ever Ignore Leaks <except unit since its not removable [I guess]> because it has an overall problem on the game's performance.
 
Level 2
Joined
Oct 2, 2010
Messages
15
  • Events
  • Time - Every 4.00 seconds of game time
  • Conditions
  • Actions
  • Set Pointy = (Random point in Learning <gen>)
  • Set Pointy2 = (Random point in Learning <gen)
  • Special Effect - Create a special effect as Pointy using Abilities\Spells\Orc\WarStomp\WarstompCaster.mdl
  • Special Effect - Destroy (Last created special effect)
  • Special Effect - Create a special effect as Pointy2 using Abilities\Spells\Orc\WarStomp\WarstompCaster.mdl
  • Special Effect - Destroy (Last created special effect)
  • Unit - Move Footman 0002 <gen> instantly to Pointy
  • Unit - Move Footman 0004 <gen> instantly to Pointy
  • Unit - Move Footman 0005 <gen> instantly to Pointy
  • Unit - Move Footman 0006 <gen> instantly to Pointy
  • Unit - Move Footman 0008 <gen> instantly to Pointy2
  • Unit - Move Footman 0009 <gen> instantly to Pointy2
  • Unit - Move Footman 0010 <gen> instantly to Pointy2
  • Unit - Move Footman 0007 <gen> instantly to Pointy2
  • Wait 1.00 seconds
  • Unit - Order Footman 0002 <gen> to Orc Tauren Chieftain - Shockwave (Pointy offset by (100.00, 0.00))
  • Unit - Order Footman 0004 <gen> to Orc Tauren Chieftain - Shockwave (Pointy offset by (-100.00, 0.00))
  • Unit - Order Footman 0005 <gen> to Orc Tauren Chieftain - Shockwave (Pointy offset by (0.00, -100.00))
  • Unit - Order Footman 0006 <gen> to Orc Tauren Chieftain - Shockwave (Pointy offset by (0.00, 100.00))
  • Unit - Order Footman 0007 <gen> to Orc Tauren Chieftain - Shockwave (Pointy2 offset by (100.00, 0.00))
  • Unit - Order Footman 0008 <gen> to Orc Tauren Chieftain - Shockwave (Pointy2 offset by (-100.00, 0.00))
  • Unit - Order Footman 0009 <gen> to Orc Tauren Chieftain - Shockwave (Pointy2 offset by (0.00, 100.00))
  • Unit - Order Footman 0010 <gen> to Orc Tauren Chieftain - Shockwave (Pointy2 offset by (0.00, -100.00))
  • Custom Script : call RemoveLocation(udg_Pointy)
  • Custom Scripn : call RemoveLocation(udg_Pointy2)
 
Level 2
Joined
Oct 2, 2010
Messages
15
Sigh...

Alright, thanks for all the help everybody. I really appreciate it, but this is just taking away the fun of map making for me :/ I'm going to take a break from mapping for now.
 
  • Events
  • Time - Every 4.00 seconds of game time
  • Conditions
  • Actions
  • Set Pointy = (Random point in Learning <gen>)
  • Set Pointy2 = (Point offset by (100.00,00.00))
  • Special Effect - Create a special effect as Pointy using Abilities\Spells\Orc\WarStomp\WarstompCaster.mdl
  • Special Effect - Destroy (Last created special effect)
  • Special Effect - Create a special effect as Pointy2 using Abilities\Spells\Orc\WarStomp\WarstompCaster.mdl
  • Special Effect - Destroy (Last created special effect)
  • Unit - Move Footman 0002 <gen> instantly to Pointy
  • Unit - Move Footman 0004 <gen> instantly to Pointy
  • Unit - Move Footman 0005 <gen> instantly to Pointy
  • Unit - Move Footman 0006 <gen> instantly to Pointy
  • Unit - Move Footman 0008 <gen> instantly to Pointy
  • Unit - Move Footman 0009 <gen> instantly to Pointy
  • Unit - Move Footman 0010 <gen> instantly to Pointy
  • Unit - Move Footman 0007 <gen> instantly to Pointy
  • Wait 1.00 seconds
  • Unit - Order Footman 0002 <gen> to Orc Tauren Chieftain - Shockwave (Pointy2)
  • Custom Script : call RemoveLocation(udg_Pointy2)
  • Set Pointy2 = (Pointy offset by (-100.00,00.00))
  • Unit - Order Footman 0004 <gen> to Orc Tauren Chieftain - Shockwave (Pointy2)
  • Custom Script : call RemoveLocation(udg_Pointy2)
  • >>Do this again & again for all The Units who uses this ability.
    • Custom Script : call RemoveLocation(udg_Pointy)
You see what I did here mate? I repeat the point2 again and again and reset + destroy it, it just take some additional click of copy pasting and making the offsets, I forgot if point must be removed or can be reassigned and removed at end of trigger still having leaks removed.
 
Status
Not open for further replies.
Top