• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Zephyr Challenge #7 - Nature

Status
Not open for further replies.
Level 18
Joined
Jan 21, 2006
Messages
2,552
-Kobas- said:
Hey I want to ask something, can this spell be mix of few!
For example you cast some spell than hero get new icon (ability) that can do something with first one etc etc?

If you are capable of making the spell handle multiple targets then go right ahead. That is welcomed, and supported; though it still has to follow the rules of the contest and it still has to be nature-themed.
 
Level 3
Joined
Feb 1, 2010
Messages
41
I am not a good coder (I am a bad coder) but I have a cool idea and I want in with it (I am in).
I know little about Jass (0) and I know less about Hashtables and since my spell has a time periodic effect, I ended up making half a dozen arrays to store the variables (this is as far as my coding abilities can take me).
I have some questions (I did read the tutorials and if the answers are there, than I have missed them and I apologize for that) and will +rep anyone who gives answer.
Q1: Is it safe to assume that there won’t be more than 12 hero of the same type in any game (and no more than 1 per player) since that is the limit of the MUI of my spell (it will be hell for me otherwise)?
Q2: Does this leek?
  • Unit Group - Pick every unit in TUG and do (Unit - Add a 6.00 second Force Of Nature expiration timer to (Picked unit))
Q3: Do I have to null the variable in an array slot before I assign a new value to it?
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Q3: Do I have to null the variable in an array slot before I assign a new value to it?

Global variables do not need to be set to null.

Q2: Does this leek?

Doesn't look like it, but are you destroying your group?

Q1: Is it safe to assume that there won’t be more than 12 hero of the same type in any game (and no more than 1 per player) since that is the limit of the MUI of my spell (it will be hell for me otherwise)?

That's up to TriggerHappy, I'll await his response.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Okay, well if you're using SetPlayerAbilityAvailable to allow the user to select when he wants to cast the secondary target spell then it will not be MUI (only MPI) and thus it will not be allowed in this contest.

If you have just two targets in succession, then it will not require SetPlayerAbilityAvailable and thus you will be able to make it MUI if you know what you're doing - in which case it will be credited.

Though, if you choose to make a spell with many targets in succession then I advise you do it very well, because the potential for mindless bugs and loopholes is far greater. If you plan on doing an ability like this and it is not done to "near-perfection" then it probably will hinder the score that you get.

Q1: Is it safe to assume that there won’t be more than 12 hero of the same type in any game (and no more than 1 per player) since that is the limit of the MUI of my spell (it will be hell for me otherwise)?

No, it must support multiple unit instances.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
No, it doesn't sound like you're wrong. I believe that when enumeration natives are used it automatically clears the group anyways, though. This may mean that you don't even need to clear the group, as it will be done automatically for you.

Global group implementations are fairly simple. When you need dynamic groups it gets a little more complicated.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
In your case you should be fine. The problem comes from not setting your group as a variable, and declaring it directly in the function call. This leads to a loss of reference of the group, and ultimately a memory leak.
 
Level 14
Joined
Nov 18, 2007
Messages
816
I think the WIP rule was a good thing to proof if the spell was really created during the competition.
No. You can remove arbitrarily much from a final spell, and call it a WIP. Also, you wouldnt even have to create the WIPs, if you just kept backups from the original development.
Its a rule that serves nothing, except annoying people who dont want to post a WIP due to secrecy.

Edit: I hope documentation is considered while judging code :)
Yes, I will do that.
 
Level 3
Joined
Feb 1, 2010
Messages
41
It is MUI, but how many MUIs should I expect? The number of instances depends on the size of the arrays I am using (setting the size to 100 means that a hundred unit will cast the spell at the same time and the hundred and one unit will cause a bug) but wouldn’t setting arrays to such size cause trouble? And what is the size should I set them to?
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Well an array is always size 8191. There is no way of declaring the size of an array (in GUI declaring the size simply means that those first values will be initialized to a default value). This basically means that no matter what you do, you're going to have an array of size 8191.

I would say that if you can make this spell function 8191 times at once, then that is perfectly acceptable. Once you start getting into spell making MUI doesn't really mean anything, as the same unit can, in many cases, cast the same spell twice in succession (which means it has support for more than MUI).

If you can make it work for 8191 independent units casting it at the same time I will consider that perfectly acceptable.
 
Level 14
Joined
Nov 18, 2007
Messages
816
As stated by the rules, all spells must be MUI. That means: a user should be able to have multiple units of the same player casting the spell at the same time. You are not required to allow multiple instances on the same unit (i think we need an acronym for that, why not use SUMI - Same Unit, Multiple Instances?)

Think about these:
- Two instances of the spell could target the same unit. Think about how to handle such situations.
- If the distinction between caster and target is crucial, think about what might happen if the target of an instance of the spell is the caster of another instance of the same spell.
- Think about what might happen when the caster dies while casting the spell, or gets stunned or ... basically, think about what might break your spell, no matter how improbable it is, and try to find ways to work around that. If you cant successfully catch these exceptions, handle them gracefully. Make sure noone could exploit possible bugs.
- Make sure a hero can unlearn the ability. This is usually a problem of passive abilities.
 
Level 9
Joined
Aug 2, 2008
Messages
219
Are we allowed to use any library we want ? I didnt spot any limitations in the contest rules. I might join if i´m allowed to use one or two of my personal libraries, because it would be pain the the a$$ to realize my idea by coding everything from scratch.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Are we allowed to use any library we want ? I didnt spot any limitations in the contest rules. I might join if i´m allowed to use one or two of my personal libraries, because it would be pain the the a$$ to realize my idea by coding everything from scratch.

I believe all libraries/systems are fair game now.
 
Level 11
Joined
Feb 14, 2009
Messages
884
So, here's the description of my spell. Imma looking for a nice icon at the moment :)

Forest Invoking

The druid calls upon the ancient powers of the forest to aid him in combat. For every tree in a specific range, the druid will be healed by 5 hit points per second. If the druid moves too far away from the tree, the link is broken. Lasts 8 seconds.

Level 1 - Maximum of 4 trees, 400 range.
Level 2 - Maximum of 6 trees, 600 range.
Level 3 - Maximum of 8 trees, 800 range.

That's it :)
I hope I'll be able to do it in time and correctly :)
 
K, I got the effects for my WiP triggered out (well early WiP wise, still more to add), but I haven't done anything like the damage it deals. (It also has some leaks in it and can be optimized trigger -wise).

WIP


Enchanted Bloom:

The caster conjures up a mystic bloom at the target location made of multiple segments which then explode one by one scattering deadly poisoned thorns in the surrounding area. When the flower finally bursts it fills the surrounding area with a deadly toxic gas along with spreading poisoned thorns.

Level 1: 2 stem segments and bloom.
Level 2: 5 stem segments and bloom.
Level 3: 8 stem segments and bloom.

(Don't have the damage worked out yet)
 

Attachments

  • Wherewolfs Spell - Enchanted Bloom.w3x
    33.3 KB · Views: 101
Status
Not open for further replies.
Top