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

[FINISHED] Spells&Systems Mini-Contest #14

Status
Not open for further replies.
Level 9
Joined
Oct 24, 2007
Messages
421
Thankyou for the welcome.... I've already made my ability, but it leaks a lot (waits are used.... couldn't find a way around them) so I'll try and learn how to overcome this and hopefully have a contendable ability.

I wont give too much away about it, only that it doesn't steal life/mana/attributes/buffs.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
I made my spell.
After a long process of trial and errors of learning structs and how to attach them, a refined(not perfect, just better than before) script emerged.
Now I have two problems.
Either there is an elusive leak somewhere or just my ram drops fast when there are a lot of units using my spell(at first the rate is 1MB/3-4 s.(but that may be connected to a mass spawning of units) then 50-100 KB/s) or there are no leaks.
My other problem is that when I spawn some units to see if my spell works with large numbers(I spawn 1 hero add the ability(it is passive) and 8 units around him (it is looped to spawn 42 heroes - 336 units each time i type something)).
When I type that once just RAM starts to decrease. When I type it again after a few seconds the game crashes.
I think there are no leaks but I will see about that.
 
Last edited:
Level 12
Joined
Apr 27, 2008
Messages
1,228
The heroes have the ability, the units are something to attack(the enemy).
So that I can test if the spell works in massive numbers.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Here is my spell.

Soul Steal
(didn't bother to come up with a more catchier name)

Each time the hero attacks there is a chance that he will steal a piece of each of the nearby enemy units' souls, decreasing their damage and strengthening his own attack with all he steals.
Damage reduction stacks up to 75 per unit.

It is 100% Jass; Uses vJass; Made in JNGP.
Spell uses HSAS 3.60 by PandaMine.
I tried following the JESP standard, but am incompetent of saying if it does(there is a part(point) of it that I do not understand completely). No JESP manifest included.
Every aspect of the spell I could think of is configurable trough the configuration header. There is one though that has to be configured trough the object editor - damage reduction.
It is MUI.
Seams that there are no leaks, but to be honest having really a lot of units(40++++) with this spell succeeding with it at the same time may crash the game (in my opinion it is not my fault, it's either HSAS or structs; but maybe too many lightnings at the same time is kinda bad). HSAS says that none of the handles I attach structs to leak(they are all recycled/destroyed/removed/nulled).
Spell is not abusable by any way( or so I think).
It has no specific usage(yeah, it is a passive). But some bonus damage always comes in handy and what is even better is that it is on your enemies account(payment).

My overall(personal) opinion: it is a nice looking spell, that has an original and practical idea and triggering is fairly well done/scripted. In it's current state is a bit overpowered, but can easily be configured not to be.

Update(25-06): Here is the last version(I hope ;) ).
Changed Icons to fit the color theme.
Modified the way the buff is given(credits to Eccho; sometimes even discussing problems helps).
Added elevation and flight support (Credits to The_Reborn_Devil for the tip).
Optimized code - less stress on the hardware ;)
I think It is leakless, though I spotted a problem with buffs/damage reduction(it is a minor thing), that I do not know the reason for and I doubt I will be trying to fix it.
Last Edit: Despite My upper statement I edited, nothing changed in the way the way the spell works just some organizing. But I have no motivation to organize the order of the methods(does it matter; That is a good question does the order of method affect performance :D ).
P.s. My first struct usage in jass and in many years.
 

Attachments

  • S&S 14 - spiwn.w3x
    39.8 KB · Views: 55
Last edited:
Level 22
Joined
Dec 31, 2006
Messages
2,216
spiwn, I have tried your spell and I must say that it is pretty nice.
I didn't look through you whole code, but I looked at the top of it and I noticed that you check if the units hp is above 0.4, this isn't very bad, but a unit is dead when it's health is <= 0.405 which means that if there is a unit with f.ex. 0.403 hp then that unit will be picked and it will get reduced dmg and you will get more on your next hit. The chance for being near a dead unit with health like that is very small, but it can happen.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
The chance of a units health being between 0 and 0.405 is ridiculously small.
The chance of a units health being between 0.4 and 0.405 is a lot smaller ;)
I am willing to take that chance.
My reasons - it is easier to remember(that is the biggest, I couldn't remember the exact value and I was too lazy to check in JNGP's function list(quite a nifty tool)), it is faster to type.
Anyway I am not concerned about picking dead units. This is my first spell that uses structs and my first use of structs for a long long time, so it is bound to have glitches and leaks.
There seems to be some glitch with a lot of units being successful with soul steal at the same time(by a lot I mean a lot).
P.s. As I remember the judge( PurplePoot) likes to use 0
Oh, thanks for feedback :)
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
Ye I know it's very small, but I have had issues with it in one of the spells I have made for my brother, which was a spell that would prevent the death of the user if he had another unit's soul, but sometimes it didn't prevent it, but when I changed it to check if the user's hp was <= 0.405 instead of 0.4 the bug disappeared.

I know almost nothing of structs, but the bugs that can occur when having many units might be that you have attached to many units in a struct or something. If I'm not wrong there is a limit for how many handles you can attach to a struct.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
It is the other way around.
There is a limit to how many handles you can attach a struct to :)
P.s. I will probably change that. It is a minor issue.
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
Hmm... How do you know that it should be 0.405?

According to blizzard its 0
JASS:
function IsUnitDeadBJ takes unit whichUnit returns boolean
    return GetUnitState(whichUnit, UNIT_STATE_LIFE) <= 0
endfunction

Im still new to some things xO
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
Hmm... How do you know that it should be 0.405?

According to blizzard its 0
JASS:
function IsUnitDeadBJ takes unit whichUnit returns boolean
    return GetUnitState(whichUnit, UNIT_STATE_LIFE) <= 0
endfunction

Im still new to some things xO

I have tested it by setting the life of a unit to 0.405 with triggers and the unit died instantly.

To spiwn.
Ok ^^. I'm learning more about structs and vJass every day :).

I'm not sure if this is a good idea, but it might look a little better if you attached a special effect to their weapons/hands when they steal other units damage.
I created a simple spell a long time ago where I created and destroyed effects that was attached to the hammer of a Mountain King every 0.03 sec when he casted a spell and I made him play the "attack" animation and that made a nice looking effect.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Look carefully, there is.
But it is attached to the hands(both) as some heroes and units do not have weapon, and some heroes have a weapon in the left hand, some in the right.
It is just destroyed when the attack is over or 4 seconds after the attack began.
Looking in the ranged heroes would be easier.
P.s Actually my idea about the spell was that it was going to make the lightning effects go towards the swinging hand/weapon of the attacking unit, creating an orb in his hand but getting the position of an attachment point(note it is 3D) if possible, would be plain hard.
P.s. My spell worked in Multiplayer for 4 hours without significant drop in fps.
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
Well since its in gui, you could make a counterA which is increasing +1 everytime you target the spell. Then you could store the target unit in an array (and another array for the caster if its necessary.) Then in the trigger where you "set everything to default again" create a counterB which is increasing +1 after a dummy expiration or a timer expiration (or a wait or something). Then use the counterB as index to set the speed and stuff to normal again.
The system might not be bulletproof, so yea, maybe you shouldnt use it :S

ok another one of my ideas to the test. i'll try to do good on this one

You're not allowed xO (to win). You won last time...
IM sorry Im wrong, it was Diciple of Life, not you

(Damn Im still mix you 2 up...)
 
Level 7
Joined
Mar 16, 2008
Messages
348
Well I'm in, maybe i'm a bit late but anyways i'll just make a simple useful spell.Gota get some idea.
 
Level 7
Joined
Oct 5, 2007
Messages
118
Imo is the theme quite limiting due to the fact that normal units don't have that much values to steal :S And heroes just have 3 further attributes... Hard to find an innovative spell idea ^^
 
Level 9
Joined
Aug 28, 2005
Messages
271
I'm ready with my entry and here it is:
________________________________________________
Hearts Wrest

Unleashes 5 blood hungry spirits to wrest the hearts of nearby enemies. The hearts can then heal allies around them. The hearts cannot survive out of the body for more than 10 seconds.

Level 1: 100 hit points stolen per spirit. 3 regeneration per second.
Level 2: 200 hit points stolen per spirit. 6 regeneration per second.
Level 3: 300 hit points stolen per spirit. 10 regeneration per second.
__________________________________________________________________
The spell supports 3 levels and is fully MUI (At least I think so)
 

Attachments

  • HeartsWrest_MartinBarbov.w3x
    40.6 KB · Views: 136
Level 9
Joined
Oct 24, 2007
Messages
421
Well... I'm sure this leaks like there's no tommorow, I'm still working on learning what leaks and how to fix it, but heres my GUI stealing spell. I'm satisfied with the aesthetics of it, and also how it functions in game, but I'm not sure it will do too well in terms of being leakless etc, so my apologies in advance to the judge :p

And the other abilities so far are very nice! Good jobs to all.

My ability:

STOLEN ASPECT: Physical form :)

Spiritual exchange
Although he has become one with the spiritual realm, the wandering spirit can call upon ancient and powerful magic to drain the existence of a target unit for a short amount of time. Each level gained increases the length of time the chieftain can retain physical form. Cooldown: 60 seconds

Duration of effect: 10 (+10 per level)


The ability is made for units that are by default ethereal, as you will see in this map, which I believe makes this very original as not many people use units that are usually unable to attack.

Enjoy...

EDIT: And when the cinematic fade filters are removed (I just put them there to show it's use for a singleplayer rpg) the ability is multi instancable for 12 players of course
 

Attachments

  • spiritual exchange.w3x
    36.8 KB · Views: 45
Last edited:
Level 7
Joined
Mar 16, 2008
Messages
348
Can we make an whole map just because of the spell?Or does it have to be useful for various map types?
And we can use Vjass correct?
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
Okay I just wanted to say that I tested all of yours =)
Poot, I hope I was allowed to do this...
They are all nice in their own ways, some flaws did I find though<:

Terradont: Your spell is nice, I liked the effect even if it wasn't that big:p. There is a bug though, and that is if the unit got as example 2 agility and the chance happend to be agility, its not decreasing.
You can fix it if you care to, otherwise its fine I think.
The spell will lack being mui due to this
  • Wait until ((StealCast has buff Steal ) Equal to True), checking every 0.10 seconds
Since StealCast is a global variable, if you cast the spell again while waiting for this condition, the StealCast unit will be overwritten. The same will happend to the other variables if this occurs.

Martin Barbov: Looks nice too, but the spirits are acting weird sometimes. The fact is, I saw in your trigger, that you add the target to Targets_Group... But you never remove it. And since the spirits are only allowed to attack a unit matching its not in that group, they will fail moving and just die on its spot.
You use casting unit sometimes. Use triggering unit instead. Casting unit is only referring to triggering unit, and is global. Triggering unit is local however.
If you fix these things the spell will be better, and I think as well Mui.

gavdaman88: I liked the cool effects you did, and the sound (omg scary^^). However there are two things which is bad in your code. The first thing is that you have a massive amount of point leaks. Everytime you do an action consisting "position of..." it will leak. You must do a point variable where you define the "position of" and then destroy the point after you have used it. The other thing is, that its not Mui. Its however Multi-player-instance [MPI].

spiwn: I can't really say much about yours, since my knowledge of structs and jass isnt that good yet :> The game looks as it works great in game though.

I think Im right in this points, correct me if Im wrong ._.
 
Level 7
Joined
Mar 16, 2008
Messages
348
Wow everione is already putting there spells, just to remind you its still more than a week left, you got time to perfect your spells, don't rush.
 
Level 21
Joined
Aug 9, 2006
Messages
2,384
Gold Drain
Coder: redscores.
Features:
-Flexible Duration (you can adjust it through the Gold Drains Ability in the Object Editor).
-Easy-2-Change (comments are written where you need them)
-Useful
-MUI (completely)
-leak free (tested 5 continous casts and it lagged not a lil bit)
-No Waits used.
-Uses Jass NewGen Pack v5a
-Supports Flying Height and Ground Elevation now.

Give Credits if you use it in your Map and hf with it.

itsaystooshortmessage
 

Attachments

  • Gold Drain.w3x
    49.1 KB · Views: 53
Last edited:
Level 12
Joined
Apr 27, 2008
Messages
1,228
redscores - nice spell :)
I suggest changing the direction of the lightning - should look better if it is going the other way, after all who is stealing the gold ;)

Anyway I have updated my spell.
Leak free, more stable :p
More complete submission as a whole map.
Changed some effects so that they would all fit(better) with each other.
The spell is still in the original submission - here.
 
Status
Not open for further replies.
Top