HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Chill of the Earth

06-07-2006, 09:14 PM#1
Rising_Dusk
CHILL OF THE EARTH
v1.4

Description: The temperature of the air surrounding any unit with this spell is so low that it actually congeals the land over which it travels. Any enemy units caught within this frozen earth will have a chance to fall over and slide when they are issued an order instead of following the order, then stunning them on the ground for an additional X seconds. (X is a constant that can be changed)

Background: Well I made this for the Spell Session #4. It didn't go over too terribly well, only got one honorable mention. But oh well, maybe someone else can find it useful. I took some of Vuen's advice and modified it slightly to make it more useful. I didn't go back and make a % chance every X seconds though, however I can if enough people would like to see it.

Special Thanks: All credits to anything I used are in the map, but I want to thank Vuen & Naakaloh for being the only people to offer real feedback on the spell, even if it was after the contest had ended. Apologies to Naak for not noticing he even looked at it, I wasn't aware he commented on EVERY spell, not just his top three. :P

Quote:
New Stuff:
1.2: Now it doesn't use the global group, it doesn't leak, and all of the things that everyone mentioned should be addressed.
I did the function call saver thingie Blu suggested, fixed everything like Blade suggested, all of the cote_ functions are now in the trigger itself. All timers are nulled, GetTriggerUnit() and GetEnumUnit() are both set to variables and then nulled at the end. What else... Oh, the GetRandomReal is now (0,100).

I also completely redid the MoveUnitToPolarProjection so it does one calculation and then uses that calculated value.

1.3: Ok, this update was a bit minor. Basically this fixed a backwards conditional, made the implementation of handles clearer so people would know you don't need two copies of them. Also fixed my only BoolExpr leak.

1.4: Updated the implementation portion of the map to better explain how to add the handle vars into another map.

Anyways, I hope you all enjoy.
Give credits where they're deserved if this should make its way into anyone's map.

Screenshot:
Attached Images
File type: jpgCote Pic22.jpg (57.8 KB)
File type: jpgCote_Pic.jpg (151.1 KB)
Attached Files
File type: w3xSpellSession4_ChilloftheEarth_v1.4.w3x (54.0 KB)
06-08-2006, 03:02 AM#2
Naakaloh
Quote:
Originally Posted by Rising_Dusk
Special Thanks: All credits to anything I used are in the map, but I want to thank Vuen for being the only person to offer real feedback on the spell, even if it was after the contest had ended.

What about me? I tried to give some feedback and you're spell was my second choice. I feel sad and ignored now. Oh well, anyway, good choice with checking for the tileset, it doesn't look as odd. If you still want suggestions, I still recommend reverting the tileset back to whatever it was instead of snow, but hey, it's your choice, it doesn't really affect gameplay unless it changes an unbuildable terrain type to a buildable one.

Edit: Just ran the map... Apparently there's an issue with occasionally neglecting to change the ice.
06-08-2006, 06:37 AM#3
Blade.dk
Quote:
Originally Posted by JESP Standard
- Does not use any Global variable that is specific for the spell (It may use non-specific
global variables)

That is one of the requirements for the JESP Standard, and your spell uses a global specific to it (the unit group).

Quote:
Originally Posted by JESP Standard
- All the spell's specific code is inside the spell's "Trigger" (Trigger== that custom text
slot that world editor calls Trigger, the spell may use as many 'trigger' objects as needed)

Like half of your cote_ functions are in the map's custom script section.

Why do you not use the original version of the handle variables? It is annoying when everybody uses their own renamed versions, makes importing spells harder.

You do not set a timer to null a single place, why not?

The bug is very rare, you should only care about it when you see it. And I doubt it has happened in every single function in the map.

When you use GetTriggerUnit many times in the same function, it gets inefficient. Better save it in a local in the start of the function (the function I am talking about is cote_SlideConditions, it might be the same other places too).

Why do you use GetRandomReal(1, 100) for the percentage? Most people use 0, 100, for a reason. 0 is also a valid percentage.
________________

It is a nice spell, but you have to fix some things before it can be approved.
If you have the JESP Document in your map, the spell MUST follow the standard to be approved.
I suggest looking at the other points I wrote too.
06-08-2006, 07:10 AM#4
blu_da_noob
It should be GetRandomReal(0,99.99999) :P Agree with everything else Blade said.

Also:
Collapse JASS:
((cote_InitialPercent() - cote_PercentPerLevel()) + (cote_PercentPerLevel()*level))
Could be:
Collapse JASS:
((cote_InitialPercent()  + (cote_PercentPerLevel()*(level - 1)))
Saving a function call.

You also repeatedly use GetEnumUnit() in cote_GroupTerrainEffect (similar to the TriggerUnit thing mentioned by Blade).

You use a MoveUnitToPolarProjection, which is very inefficient. The direction the units are moving in doesn't change, so store the Sin/Cos of the angle and use those directly. Why do you have two separate function for movement and rotation anyway? It ends up with two 0.033 repeating timers per unit, a single one would be much better.
06-08-2006, 04:07 PM#5
Rising_Dusk
Alright, I'll go through and work out everything you all mentioned.
Give me a bit and I'll update it.

Sorry everything was so screwy, Blade, it appears you got kinda angry at the spell.
Apologies for not following JESP perfectly, it was my first time, I'll fix it all right away.

Naak, apologies! I wasn't aware you went through every spell! Thanks! >_<
(I fixed the top too!)


EDIT: OK!
It's all redone, the update is at the top.
06-09-2006, 04:26 PM#6
blu_da_noob
A great improvement, good work. A couple more things that could be improved though ^^.

Collapse JASS:
    call SetReal(rns, "anglecos", Cos((bj_PI/180)*angle))

Instead of calculating bj_PI/180 everytime, use either the constant bj_DEGTORAD, or the actual value of pi/180.

Collapse JASS:
            if GetRandomReal(0, 100) > (cote_InitialPercent()  + (cote_PercentPerLevel()*(level - 1))) then

Should be less than ^^. You're inverting the % chance atm (to see it easily, look what would happen if you gave it 100% chance).

Collapse JASS:
    call GroupEnumUnitsInRect(g, map, Condition(function cote_GroupCheck))

GroupEnumUnitsInRect is a common.j function and, as such, does not clean up the boolexpr. You will need to do it manually.


The last thing is the fact that you have the handle variables in two separate places, and your installation instructions make it sound like you should copy both sets over. Maybe just clarify that a little.
06-09-2006, 05:48 PM#7
Rising_Dusk
The first one I can fix in a split second, no prob.
The second one I must have been an idiot for doing, that's what happens when you don't pay 100% attention, -_-.

And yeah, I'll set the BoolExpr to a var and clean it up myself.
I'll update in like ten minutes.

EDIT: There, fixed, fixed, and fixed.
That's everything you mentioned. Sorry there was so much wrong with it. -_-;;
06-09-2006, 07:37 PM#8
blu_da_noob
You still haven't clarified about the installation of the handle vars, but it's not vital, and I'll approve in anticipation of it being rectified.
06-09-2006, 09:07 PM#9
Rising_Dusk
Alright, well I went back and rewrote that whole section.
It should be much clearer on how to add handle vars to any given map now.

Let me know if I need to add more. :P
06-09-2006, 09:22 PM#10
blu_da_noob
Seems fine to me.
06-10-2006, 07:59 PM#11
SeruK
Reminds me of Morran in the Mumin trolls. xD Everywhere she walks turn into ice.

For the unknowing

10-26-2006, 04:47 PM#12
Zachary_Shadow
Have to say I'm not impressed, not by the coding, kudos on that! But on the actual usage of the spell... Wouldn't it be possible to change it to maybe, every time a unit attacks instead of is issued an attack order ? And keep the move order... that would make the unit drop alot more, and actually make it valuable to implement.