Cluster Rockets v1.1.1

  • Description

Tinker deploys his rocket pads and fire all the rockets to any targeted unit or any units near the targeted location. Each rocket will explode if collide with any enemy units. The explosion causes damage to nearby units.​
Level 1 - 32 rockets, 60 explosion damage.​
Level 2 - 48 rockets, 65 explosion damage.​
Level 3 - 64 rockets, 70 explosion damage.​
Channeling
  • Changelog

--- v1.0.0 ---​
First public release version.​
--- v1.0.1 ---​
Optimized scripts based on some review.​
--- v1.0.2 ---​
Optimized scripts and fixed a small leak based on reviews.​
--- v1.0.3 ---​
Optimized scripts and a little performance fix based on review.​
Changed tooltip and hotkey.​
New ability icon.​
--- v1.0.4 ---​
Fixed one fatal problem: spell freezes due to bad indexing.​
--- v1.0.5 ---​
Fixed another fatal problem: can't cast at the center of map.​
--- v1.0.6 ---​
Optimized unit target acquiring.​
--- v1.0.7 ---​
Fixed bug: rockets stop when casting rapidly.​
--- v1.0.8 ---​
New property settings.​
Improved ground targeting.​
Added target effect on units.​
Changed configuration variables.​
Note: All version v1.0.x are made compatible for game version 1.27 and probably below. (I tested using 1.27)​
--- v1.1.0 ---​
Adapted to game patch 1.30. No more dummy units.​
New property settings.​
Improved ground targeting.​
Added target effect on units.​
Changed configuration variables.​
--- v1.1.1 ---​
Adapted and tested for game version 1.36. Fixed rockets flying orientation.​
  • Credits

Some of the code are adapted from vJASS libraries and Wurst.​
Credits to Nestharus, D.O.G, and Wareditor.​
Icon by darkdeathknight.​
Target effect model by ChirusHighwind.​
  • Other

You can find importing instruction and some Q&A inside the map.​
Thanks also to Tank-Commander, Almia, Meatmuffin, BPower, Kam and ILH for their reviews that helped me discover things need to be fixed.​

Keywords:
Rocket, Explosive, Collision, Cluster.
Previews
Contents

Cluster Rockets (Map)

Cluster Rockets (Map)

Reviews
11:09, 31st May 2016 Tank-Commander: Thanks for the great submission, just have a few notes on some issues. See my post
Just went over very quickly (haven't quite finished going through)

- You never flush your hashtable
- Your check unit exists function is flawed: a unit can have x and y co-ordinates of 0 and still exist albeit very unlikely, you can check if the UnitTypeId is null (which will be the case if it doesn't exist)
- This is a very weird hybrid of using a Linked List and a Hashtable, why?
- You only need one initialisation function, they can be combined
 
GetWidgetLife cannot detect whether or not a unit(widget) is alive in some circumstances.
You can just check if the UnitTypeId is 0

Check whether the unit exist in the map should be removed. It is just equal to UnitAlive

FlyAbilityID is not recommended to become a constant. Users might change it and break the spell :V
set rFacing = GetRandomReal(0, 360) * bj_DEGTORAD
->
set rFacing = GetRandomReal(-bj_PI, bj_PI)

As for Tank-Commander's comment
- The reason his hashtable is not flushed is because it is being used for unit collision values. But I think the keys used for channeling check shall be flushed.

- " This is a very weird hybrid of using a Linked List and a Hashtable, why?" Hashtable was used for collision check(Again) and for channeling check. He doesn't use a Unit Indexer so he doesn't want to do a linear search for it :V

Overall, I liked it :D

I should test this tomorrow

opinion : I think you should use the Barrage missile model :V
 
Level 13
Joined
Mar 29, 2012
Messages
542
- You only need one initialisation function, they can be combined
You mean the custom script inside the configuration?
Nah, I think it's not neat :3
It's also made for if the user want to reconfigure the spell for some reason, they can just put it at the end of their new configuration (that's the bonus maybe).

GetWidgetLife cannot detect whether or not a unit(widget) is alive in some circumstances.
You can just check if the UnitTypeId is 0

Check whether the unit exist in the map should be removed. It is just equal to UnitAlive
Done.

FlyAbilityID is not recommended to become a constant. Users might change it and break the spell :V
I was thinking that in worst case, that the default crow ability has been somehow edited. So the user can use this to rescue the spell. *\o/*

set rFacing = GetRandomReal(0, 360) * bj_DEGTORAD
->
set rFacing = GetRandomReal(-bj_PI, bj_PI)
Forgot this one. Done.

But I think the keys used for channeling check shall be flushed.
It's just boolean and integer. Right?
 
I've gone over the code a bit more thoroughly now and noted a few things:

- You use a lot of local unit groups and destroy them, since you always utilise them in a way that leaves them empty you do not need to do this and can use one global unit group for all uses (adding one global but removing all the lines creating/destroying local groups)
- Please give your local variables meaningful names using single letters is very unhelpful; while you do explain what they are in most functions (some are not) having to scroll back up every two seconds isn't that great
- You have the number for bj_DEGTORAD (57.2957795) instead of the constant bj_DEGTORAD in your code, seems a bit pointless
- When you recycle with a linked list you don't need to null all the unit variables, it will not leak regardless (as the variable will be reused)
- Having a GUI configuration does not a GUI spell make; this is a pure JASS submission
- udg_ClsR_trig can be a local making
JASS:
    if udg_ClsR_trig != null then
        call DestroyTrigger(udg_ClsR_trig)
    endif
redundant
- this makes the spell uncastable on the line x == 0 of any map (again unlikely but it is a problem)
JASS:
if GetOrderTarget() != null or GetOrderPointX() != 0 then

I'd note not all of these are mandatory (the ones towards the top particularly) but it would be helpful and would be slight improvements in my opinion (notably in terms of readability) The spell is great and I'd like to approve it once these things have been solved
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
And still theres a bug occuring ( cant post screenshot atm ), the current missiles just paused the whole spell instances ( the debug expiration timer didnt also work on missiles ), it is frequently visible by lowering the missile speed and rapidly casting it alternatively on the ally and enemy unit.
 
Level 13
Joined
Mar 29, 2012
Messages
542
And still theres a bug occuring ( cant post screenshot atm ), the current missiles just paused the whole spell instances ( the debug expiration timer didnt also work on missiles ), it is frequently visible by lowering the missile speed and rapidly casting it alternatively on the ally and enemy unit.
Completely missed this. :(
I forgot what I was doing with the code back then but I already had this happened.
Gonna check this soon.
 
KILLCIDE and I had a look at the specific issue the other day; after KILLCIDE confirmed that the event runs but runs with a different order ID we wondered why the targetX check was even necessary. Then we noticed that udg_CLsR_AbilityOrder is never set to anything at all which would rather make the "GetUnitCurrentOrder(GetTriggerUnit()) == udg_ClsR_AbilityOrder" condition rather ineffectual, we both assumed this is supposed to be set to the order ID of the ability, the order ID reported on learn was 1(lots of 0s) while all spell cast IDs are between 851970 & 852,672

I can't in good faith approve an ability with a known fatal flaw, though I will do my best to assist solve the issue since I do want to see this approved
 
Level 13
Joined
Mar 29, 2012
Messages
542
Updated to 1.0.5
we noticed that udg_CLsR_AbilityOrder is never set to anything at all
It is set to "firebolt" order ID inside the GUI configuration trigger.

Anyway, I've removed GetOrderPointX() == 0 line and any other 'if's that checks for x == 0. Seems no problem now.
I've tested casting the spell at the very center of the map using trigger and it works.
 
Would anyone have the 1.0.7 version of this still?
Edit: if anyone's interested in a dummy unit version, I started some work on it except I can't figure out how to get SetUnitLookAt to work with this current systems angles.
I was playing around with the latest original version 1.1.0 and discovered why angles weren't working for me, seems sometimes the missiles don't update where they're looking?
 
Level 10
Joined
May 24, 2016
Messages
339
Yeah I've digged into 1.0.5 since this is the last version avaliable before non-dummy reforged version, but it seems like I cant figure out what seems to be the reason of this spell getting broken if casted rapidly.

@Ofel might not care at all about this spell anymore, and, moreover, might not care about old versions, but I'd be glad if he could help eventually.
 
Level 13
Joined
Mar 29, 2012
Messages
542
Yeah I've digged into 1.0.5 since this is the last version avaliable before non-dummy reforged version, but it seems like I cant figure out what seems to be the reason of this spell getting broken if casted rapidly.

@Ofel might not care at all about this spell anymore, and, moreover, might not care about old versions, but I'd be glad if he could help eventually.
I've been off for quite a while from wc3 modding, but I just downloaded Warcraft 3 again, classic. Just yesterday.
I noticed the rockets aren't facing correctly. I haven't noticed the bug like you mentioned though.
I'm using game version 1.31.1 (if that can cause any difference probably?). Maybe I'll take a look again soon.
 
Level 10
Joined
May 24, 2016
Messages
339
I've been off for quite a while from wc3 modding, but I just downloaded Warcraft 3 again, classic. Just yesterday.
I noticed the rockets aren't facing correctly. I haven't noticed the bug like you mentioned though.
I'm using game version 1.31.1 (if that can cause any difference probably?). Maybe I'll take a look again soon.
Thx for taking a look at my request. I've only tested v1.0.5, and this version has a problem with getting broken when rockets spawned rapidly.
@Kam was the first one who pointed out about that bug in his post above. And it looks like that 1.0.7 was fixing that bug.

So I dunno, maybe you fixed that in later patches, but 1.0.7 is not avaliable here to download and test, and 1.1 is reforged version im not playing since im at 1.26 (thx blizzard for banning reforged in my country) . Moreover 1.1 is non dummy version, so not usable for me to even workaround it.
 

Rheiko

Spell Reviewer
Level 26
Joined
Aug 27, 2013
Messages
4,214
If you have a CD-Key, you can use it on this copy:

Might help. But if that's not an option, I don't think there's much you can do.
Unless Ofel can perhaps rebuild the spell in 1.26.

I wish we could have an editor that can open and modify any version of a map,
though it's probably too much of a work or just impossible to do.
 
Level 13
Joined
Mar 29, 2012
Messages
542
Thx for taking a look at my request. I've only tested v1.0.5, and this version has a problem with getting broken when rockets spawned rapidly.
@Kam was the first one who pointed out about that bug in his post above. And it looks like that 1.0.7 was fixing that bug.

So I dunno, maybe you fixed that in later patches, but 1.0.7 is not avaliable here to download and test, and 1.1 is reforged version im not playing since im at 1.26 (thx blizzard for banning reforged in my country) . Moreover 1.1 is non dummy version, so not usable for me to even workaround it.
I lost the old version files. :) I bought a new device and forgot to copy those files.

I'm still messing around with world editor. Reading Jazz code in plain editor feels hurting.
Still messing with some comfortable tools before coding again.
If you have a CD-Key, you can use it on this copy:

Might help. But if that's not an option, I don't think there's much you can do.
Unless Ofel can perhaps rebuild the spell in 1.26.

I wish we could have an editor that can open and modify any version of a map,
though it's probably too much of a work or just impossible to do.
Not sure if I could rebuild the spell for 1.26 hehe.
 
Level 10
Joined
May 24, 2016
Messages
339
I lost the old version files. :) I bought a new device and forgot to copy those files.

I'm still messing around with world editor. Reading Jazz code in plain editor feels hurting.
Still messing with some comfortable tools before coding again.

Not sure if I could rebuild the spell for 1.26 hehe.
Eh that's sad. Anyway thx for cooperation, it's really nice from you.
 

Rheiko

Spell Reviewer
Level 26
Joined
Aug 27, 2013
Messages
4,214
If your code is pure JASS, I don't see the necessity to use JNGP to edit and save.
Just remove the globals you are currently using and modify their use in the rest of the code.
It will be open-able in vanilla WE since it's the only vJASS feature you're using.

I think you can also upload multiple files in a bundle.
So one is for the newer version of the game, another is for the backward compatibility version.
 
Last edited:
Level 10
Joined
May 24, 2016
Messages
339
pre-reforged version seems pretty cool for now. Provides no lags and pretty configurable for using.
If I get it right, I can easily run another config to change the values play session at any time.

Bugs no encountered in the test. I'd like to tell you if I will enouncter them furhter, if you are interested.
 
Last edited:
Level 13
Joined
Mar 29, 2012
Messages
542
pre-reforged version seems pretty cool for now. Provides no lags and pretty configurable for using.
If I get it right, I can easily run another config to change the values play session at any time.

Bugs no encountered in the test. I'd like to tell you if I will enouncter them furhter, if you are interested.
Yes, some values can be changed mid game I suppose. But better avoid running again the initialization script at the end of the config.

I'm thinking it might cause problem.
 
Level 10
Joined
May 24, 2016
Messages
339
Yes, some values can be changed mid game I suppose. But better avoid running again the initialization script at the end of the config.

I'm thinking it might cause problem.
Yeah, I can see that will lead to creating another hastables and triggers
So I should manipulate only with variables like that to change in game


JASS:
local integer i = 0

    set udg_ClsR_RocketsSpeedBase[1] = 800.00
    set udg_ClsR_RocketsSpeedBase[2] = 800.00
    set udg_ClsR_RocketsSpeedBase[3] = 800.00
    
    set udg_ClsR_AreaOfEffect[1] = 300.00
    set udg_ClsR_AreaOfEffect[2] = 300.00
    set udg_ClsR_AreaOfEffect[3] = 300.00
    
    
    set udg_ClsR_RocketsTurnAcceleration[1] = 112.00
    set udg_ClsR_RocketsTurnAcceleration[2] = 112.00
    set udg_ClsR_RocketsTurnAcceleration[3] = 112.00
    
    set udg_ClsR_DamagePerRocket[1] = 30.00
    set udg_ClsR_DamagePerRocket[2] = 60.00
    set udg_ClsR_DamagePerRocket[3] = 90.00
    
    
    
    set udg_ClsR_RocketsDamageRange[1] = 100.00
    set udg_ClsR_RocketsDamageRange[2] = 100.00
    set udg_ClsR_RocketsDamageRange[3] = 100.00
    
    set udg_ClsR_RocketsPerWave = 6
    set udg_ClsR_RocketsPerSecond = 12
    set udg_ClsR_RocketsCount[1] = 24
    set udg_ClsR_RocketsCount[2] = 24
    set udg_ClsR_RocketsCount[3] = 24
     set udg_ClsR_RocketsSize = 1.20
   set udg_ClsR_RocketsModel = "Abilities\\Spells\\Other\\TinkerRocket\\TinkerRocketMissile.mdl"
    
    
    
    set udg_ClsR_RocketsMaxFacingVariation = 0
    set udg_ClsR_RocketsMinFacingVariation = 0
      
 set udg_ClsR_RocketsSpawnOffset = 25.00
// Determines rockets max pitch angle
    set udg_ClsR_RocketsMaxPitchVariation = 50.00
    // ---------------------------
    // Determines rockets min pitch angle
    set udg_ClsR_RocketsMinPitchVariation = -20.00
    
    // Determines rockets facing angle width range
    set udg_ClsR_RocketsFacingWidth = 130.00
    
    
    
// Convert facing and pitch angle from degree to radian
    set udg_ClsR_RocketsFacingWidth = udg_ClsR_RocketsFacingWidth / 2.
    set udg_ClsR_RocketsMaxFacingVariation = (udg_ClsR_RocketsMaxFacingVariation + udg_ClsR_RocketsFacingWidth) * ClsR_DEGTORAD()
    set udg_ClsR_RocketsMinFacingVariation = (udg_ClsR_RocketsMinFacingVariation + udg_ClsR_RocketsFacingWidth) * ClsR_DEGTORAD()
    set udg_ClsR_RocketsMaxPitchVariation = udg_ClsR_RocketsMaxPitchVariation * ClsR_DEGTORAD()
    set udg_ClsR_RocketsMinPitchVariation = udg_ClsR_RocketsMinPitchVariation * ClsR_DEGTORAD()
    
    set udg_ClsR_RocketsInterval = 1 / I2R(udg_ClsR_RocketsPerSecond)
    
    // Initialize additional properties
    loop
        set i = i + 1
        exitwhen i > udg_ClsR_AbilityLevels
        
        set udg_ClsR_RocketsSpeedBase[i] = udg_ClsR_RocketsSpeedBase[i] * ClsR_FrameUpdate()
        set udg_ClsR_RocketsTurnAcceleration[i] = udg_ClsR_RocketsTurnAcceleration[i] * ClsR_FrameUpdate()
        set udg_ClsR_areaOfTarget[i] = (udg_ClsR_AreaOfEffect[i] - udg_ClsR_RocketsDamageRange[i]) / 2.
    endloop
 
Last edited:
Level 2
Joined
Sep 21, 2023
Messages
3
This ability is great, thank you very much.

However, there seems to be a small issue:

The size of my map is X=-4096~8912, Y=-20408~12288.

When I import the skill, in the map range where Y < -4096, the skill cannot be cast properly.
This is because all the missiles are blocked above the Y=-4096 axis.

I believe this issue is related to how the map boundaries are determined.

After temporarily changing the related values to the following, it is now working properly:

set udg_ClsR_mapBorder[1] = GetRectMaxY(map)
set udg_ClsR_mapBorder[2] = GetRectMaxY(map)
set udg_ClsR_mapBorder[3] = GetRectMinY(map)
set udg_ClsR_mapBorder[4] = GetRectMinY(map)

But the original function seems to be correct, so I’m quite confused.

===

Also, I wonder if we could get a version of the ability that changes the Rockets per wave and the Rockets per second based on the level? Thank you!
 
Level 13
Joined
Mar 29, 2012
Messages
542
This ability is great, thank you very much.

However, there seems to be a small issue:

The size of my map is X=-4096~8912, Y=-20408~12288.

When I import the skill, in the map range where Y < -4096, the skill cannot be cast properly.
This is because all the missiles are blocked above the Y=-4096 axis.

I believe this issue is related to how the map boundaries are determined.

After temporarily changing the related values to the following, it is now working properly:

set udg_ClsR_mapBorder[1] = GetRectMaxY(map)
set udg_ClsR_mapBorder[2] = GetRectMaxY(map)
set udg_ClsR_mapBorder[3] = GetRectMinY(map)
set udg_ClsR_mapBorder[4] = GetRectMinY(map)

But the original function seems to be correct, so I’m quite confused.

===

Also, I wonder if we could get a version of the ability that changes the Rockets per wave and the Rockets per second based on the level? Thank you!
Do you referring the latest version?

About the rockets per wave and rockets per second, sure I could update and make it configurable for each hero level.
I'll follow up when I'm free, do not hesitate to leave me a reminder. :)
 
Level 2
Joined
Sep 21, 2023
Messages
3
Do you referring the latest version?

About the rockets per wave and rockets per second, sure I could update and make it configurable for each hero level.
I'll follow up when I'm free, do not hesitate to leave me a reminder. :)
THANKS!!

Yes. I import the latest version (1.1.1). If needed, I can revert the error and provide the map file after the import.
 
Top