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!
Thought I'd release another one for the start of the month, Continuing a little ghostly theme I have going in my head, Anyway here it is:
Creates a portal at the target point which will trap nearby units within it's effect radius and push and pull them around the cage tearing them apart dealing damage and repelling units trying to enter the cage away from it.
Level 1 - 325 AOE, 15 Damage per hit 5 Pulses, Weak knockback
Level 2 - 425 AOE, 20 Damage per hit, 7 Pulses, Medium knockback
Level 3 - 525 AOE, 25 Damage per hit, 9 Pulses, Strong knockback
- Powerful
- Heavily configurable
- Looks pretty =3
- No bugs
- Makes a good ultimate
Chaos Portal Configuration
Events
Map initialization
Conditions
Actions
-------- Do not touch --------
Hashtable - Create a hashtable
Set CP_Hash = (Last created hashtable)
-------- -------- --------
-------- Determines the area that will be caught --------
Set CP_AoeBase = 225.00
Set CP_AoePerLevel = 100.00
-------- Determines the damage dealt by Knockback/Pulses --------
Set CP_DamageBase = 10.00
Set CP_DamagePerLevel = 5.00
-------- Determines the strength of the knockback --------
Set CP_KnockbackStrengthBase = 14.00
Set CP_KnockbackStrengthPerLevel = 5.00
Set CP_KnockbackStrengthDetriment = 1.00
-------- Determines the amount of pulses --------
Set CP_PulsesBase = 2
Set CP_PulsesPerLevel = 2
-------- Determines the settings of the portal --------
Set CP_PortalStartSize = 2.00
Set CP_PortalGrowthSpeed = 2.00
Set CP_PortalMaxSize = 150.00
-------- Determines the settings of the Cage --------
-------- The Aoe of each part (comes into calculating how many parts there will be) --------
Set CP_CageSegmentAoe = 250.00
-------- Determines how fast each segment of the cage will fly --------
Set CP_CageSpeed = 20.00
-------- Determines the delay between each segment (also effects pulse rate) --------
Set CP_CageProjectileFireRate = 5
-------- Determines the height of the arc in relevence to the distance the Cage will be thrown at --------
Set CP_HeightMultiplyer = 0.75
-------- Determines the Dummy unit of the spell --------
Set CP_Portal = Chaos Portal
-------- Determines the unit model used as the Portal --------
Set CP_PortalModel = Abilities\Spells\Undead\Possession\PossessionCaster.mdl
-------- Determines the unit model used as the Cage --------
Set CP_CageModel = Abilities\Spells\Undead\OrbOfDeath\AnnihilationMissile.mdl
-------- Determines the unit model used as the Pulse --------
Set CP_PulseModel = Abilities\Spells\Other\HowlOfTerror\HowlCaster.mdl
-------- Determines the scale of the cage segments --------
Set CP_CageScale = 20.00
-------- Determines the spell used to act as the activation spell --------
Set CP_Spell = Chaos Portal
-------- Do not touch --------
-------- Tree Checking Set up --------
Set CP_TreeKill = True
Set CP_TreeAreaDestroy = 150.00
Set CP_TempPoint = (Center of (Playable map area))
Unit - Create 1 Peasant for Neutral Passive at CP_TempPoint facing Default building facing degrees
Hashtable - Save (CP_TempInteger + 1) as 9 of CP_UHandle in CP_Hash
-------- Check Pulse delay timer --------
Set CP_TempInteger = (Load 10 of CP_UHandle from CP_Hash)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CP_TempInteger Equal to (CP_CageProjectileFireRate x 10)
Then - Actions
-------- Resetting delay timer --------
Hashtable - Save 0 as 10 of CP_UHandle in CP_Hash
-------- Checking pulse count --------
Set CP_TempInteger = (Load 11 of CP_UHandle from CP_Hash)
Set CP_TempPoint = (Position of CP_U)
-------- Creating pulse --------
Unit - Create 1 CP_Portal for (Owner of CP_U) at CP_TempPoint facing Default building facing degrees
-------- Scaling pulse --------
Set CP_RealCache[1] = ((Load 4 of CP_UHandle from CP_Hash) / 3.00)
Animation - Change (Last created unit)'s size to (CP_RealCache[1]%, CP_RealCache[1]%, CP_RealCache[1]%) of its original size
Special Effect - Create a special effect attached to the overhead of (Last created unit) using CP_PulseModel
-------- Removing pulse --------
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
-------- Pulse effects setup --------
Set CP_TempGroup = (Units within (Load 4 of CP_UHandle from CP_Hash) of CP_TempPoint)
Custom script: set udg_CP_TempX = GetUnitX(udg_CP_U)
Custom script: set udg_CP_TempY = GetUnitY(udg_CP_U)
-------- Pulse effects --------
Unit Group - Pick every unit in CP_TempGroup and do (Actions)
Loop - Actions
-------- Finding target units --------
Set CP_TempU = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(CP_TempU is Magic Immune) Equal to False
(CP_TempU is A structure) Equal to False
(CP_TempU is alive) Equal to True
(CP_TempU belongs to an enemy of (Owner of CP_U)) Equal to True
(CP_TempU is A ground unit) Equal to True
Then - Actions
-------- Getting co-ordinates and setup --------
Custom script: set udg_CP_TempX2 = GetUnitX(udg_CP_TempU)
Custom script: set udg_CP_TempY2 = GetUnitY(udg_CP_TempU)
Custom script: set udg_CP_UHandleC = GetHandleId(udg_CP_TempU)
-------- Damage --------
Unit - Cause (Load 1 of CP_UHandle in CP_Hash) to damage CP_TempU, dealing (Load 5 of CP_UHandle from CP_Hash) damage of attack type Spells and damage type Normal
-------- Knockback setup --------
-------- Knockback strength --------
Hashtable - Save (Load 6 of CP_UHandle from CP_Hash) as 13 of CP_UHandleC in CP_Hash
-------- Knockback Angle setup --------
Hashtable - Save CP_TempX as 14 of CP_UHandleC in CP_Hash
Hashtable - Save CP_TempY as 15 of CP_UHandleC in CP_Hash
Hashtable - Save CP_TempX2 as 16 of CP_UHandleC in CP_Hash
Hashtable - Save CP_TempY2 as 17 of CP_UHandleC in CP_Hash
Set CP_RealCache[1] = (Load 7 of CP_UHandle from CP_Hash)
Set CP_RealCache[2] = (Load 8 of CP_UHandle from CP_Hash)
Set CP_RealCache[3] = ((Load 9 of CP_UHandle from CP_Hash) + CP_CageSpeed)
Hashtable - Save CP_RealCache[3] as 9 of CP_UHandle in CP_Hash
Set CP_RealCache[4] = (((4.00 x CP_RealCache[2]) / CP_RealCache[1]) x ((CP_RealCache[3] / CP_RealCache[1]) x (CP_RealCache[1] - CP_RealCache[3])))
Animation - Change CP_U flying height to CP_RealCache[4] at 0.00
-------- Checking height --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CP_RealCache[4] Less than 0.00
Then - Actions
-------- Damage and target setup --------
Set CP_TempU2 = (Load 10 of CP_UHandle in CP_Hash)
Custom script: set udg_CP_UHandleC2 = GetHandleId(udg_CP_TempU2)
Custom script: set udg_CP_TempX2 = GetUnitX(udg_CP_TempU2)
Custom script: set udg_CP_TempY2 = GetUnitY(udg_CP_TempU2)
Set CP_TempPoint2 = (Position of CP_TempU2)
Set CP_TempPoint = (Position of CP_U)
Set CP_TempGroup = (Units within CP_CageSegmentAoe of CP_TempPoint)
-------- Damage and knockback --------
Unit Group - Pick every unit in CP_TempGroup and do (Actions)
Loop - Actions
-------- Finding targets --------
Set CP_TempU = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(CP_TempU is Magic Immune) Equal to False
(CP_TempU is A structure) Equal to False
(CP_TempU is alive) Equal to True
(CP_TempU belongs to an enemy of (Owner of CP_U)) Equal to True
(CP_TempU is A ground unit) Equal to True
Then - Actions
-------- setup --------
Custom script: set udg_CP_UHandleC = GetHandleId(udg_CP_TempU)
-------- Damage --------
Unit - Cause (Load 1 of CP_UHandle in CP_Hash) to damage CP_TempU, dealing (Load 5 of CP_UHandle from CP_Hash) damage of attack type Spells and damage type Normal
-------- Knockback setup --------
-------- Knockback strength --------
Hashtable - Save (Load 6 of CP_UHandle from CP_Hash) as 13 of CP_UHandleC in CP_Hash
-------- Knockback Angle setup --------
Set CP_TempPoint3 = (Position of CP_TempU)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between CP_TempPoint2 and CP_TempPoint3) Greater than or equal to ((Load 4 of CP_UHandleC2 from CP_Hash) + (CP_CageSegmentAoe / 2.00))
Then - Actions
Hashtable - Save CP_TempX2 as 14 of CP_UHandleC in CP_Hash
Hashtable - Save CP_TempY2 as 15 of CP_UHandleC in CP_Hash
Hashtable - Save CP_TempY as 17 of CP_UHandleC in CP_Hash
Hashtable - Save CP_TempX as 16 of CP_UHandleC in CP_Hash
Else - Actions
Hashtable - Save CP_TempX as 14 of CP_UHandleC in CP_Hash
Hashtable - Save CP_TempY as 15 of CP_UHandleC in CP_Hash
Hashtable - Save CP_TempX2 as 16 of CP_UHandleC in CP_Hash
Hashtable - Save CP_TempY2 as 17 of CP_UHandleC in CP_Hash
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 13 of CP_UHandle from CP_Hash) Less than or equal to 0.00
Then - Actions
Unit Group - Remove CP_U from CP_PortalGroup
Hashtable - Clear all child hashtables of child CP_UHandle in CP_Hash
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(CP_PortalGroup is empty) Equal to True
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Else - Actions
-------- ------ --------
Else - Actions
-=V1.00=-
- Initial upload
- Expect errors
-=V1.01=-
- Modified Default settings (to remove lag)
- Added a special effect to make the cage not look like it has holes in it with the settingsp
-=V1.02=-
- Used the dummy model (so only one dummy unit is now used)
- Made small efficiency changes
Enjoy and Give credits if you use this in your map
Do not modify/steal and republish this spell without my permission
-=Note on effects=-
All the special effects that are created (the speed of them and the rate at which they are fired) is required to prevent units from leaking in and out of the cage, I aplogise if this generates any lag for you due to the amount of special effects, but please understand that it is necessary for the spell to work. In the comments I have said the three things you can changed to reduce lag and I will state tem here as well
1) The AOE of each Cage segment (increasing it will reduce the amount in the circle in total)
2) The models used for the special effects
3) The AOE of the spell itself, reducing it will reduce the amount of segments in the circle
Approved
This spell is very well done.
The tooltip could have Level 1, Level 2 and Level 3 coloured and the extra space removed. The "facing" of the moving units could be set with
SetUnitAnimationByIndex so the projectile would face the direction...
Reviewed by Maker, Chaos Portal V1.02, 9th Mar 2012
Approved
This spell is very well done.
The tooltip could have Level 1, Level 2 and Level 3 coloured and the extra space removed. The "facing" of the moving units could be set with
SetUnitAnimationByIndex so the projectile would face the direction of the arc. But these are minor issues.
The spell's effects are nice, but I personally would like slightly more subtle approach.
4.25/5
Reviewed by Maker, Chaos Portal V1.01, 5th Feb 2012
Required changes
TempPoint seems to be leaking in stage 2
Suggested changes
Small efficiency improvements, like calculating bj_DEGTORAD when setting angle, not separately for cos and sin
Also load values into variables from hashtable before loops,
don't repeatedly load the value inside the loop
There are a bit too many effects in my opinion
Variable is not use for unit type in loop 2 when you create the dummy
If you used the well know dummy unit model and attached the effect instead of
using the effect as the model, you could set the effect's facing to be the same
as the direction of the movement for the Chaos Cage dummies
Some times less is more. There are quite many effects by default. I tried lowering CageSpeed to 5 and ProjectileFireRate to 10
and it looked more impressive.
21:45, 2nd Mar 2012
Pharaoh_: Decrease the dummy missiles' count; two spells at the same time create immense lag that predicts freezing of the program.
Yeah I was concerned about that happening on lower-end computers, to solve it you either increase the AOE of the Cage segments, change the model of the Cage Segment unit, or decrease the AOE of the spell
Edit: Although as far as actual problems with the spell, the only problem is your computer's processor, nothing to do with the coding of the spell, the problem isn't hard to fix I just up the defaults for showcasing purposes
Well I certainly didn't come across any problems with lag and even when I cast enough to make it lag (about 4 at the same time) I then modified the fields which I said before to a more "normal" rather than my showcasing version and it took 10 casts at the same time to make it Lag, and that was with only changing one of them. So yes it is more the computers fault, as the better your computer the more it can handle, I just suited it to mine rather than the "norm" but if that's problematic then you can very easily make the changes necessary with minimal effort, on a side note though knockback /never/ generated a problem on my side.
My point is, it's not something programmatically which is wrong, it's just the configuration needing to be adjusted to suit your computers , and I already said the three things you can modify to rectify the problem of lag, so really no more comments on lag if you please, as they're rather pointless now
and I already said the three things you can modify to rectify the problem of lag, so really no more comments on lag if you please, as they're rather pointless now
They are not pointless. The point for a spell to be approved is to be MUI. When only two of its instances result lag to most of us, it should be fixed.
Edit: What part did you change to reduce the lag?
The new sfx is unneeded and it just burdens the spell even more. I also dislike the "Howl of terror" sound spam.
I modified the AOE of each cage segment - thus is automatically recalculated how many were needed to cover the cercumference, I doubled it, so it should be
half as much
Edit: As for the howl of terror I didn't like that much either, but I don't have many alternatives which'd preserve the look of the spell, any suggestions?
Um, what? Are you running on an extremely old computer or something? Plus making it only affect heros would kind of make the spell useless. You can do that yourself if it suits your purposes but for the rest of us who it runs fine with can have it as it is XD
Um, what? Are you running on an extremely old computer or something? Plus making it only affect heros would kind of make the spell useless. You can do that yourself if it suits your purposes but for the rest of us who it runs fine with can have it as it is XD
Look we're not here to discuss computer specs required for the spell, I'm simply saying Since I already made modifications to prevent the two-cast lag, and already said /how/ to get rid of it if it still causes lag, I personally can cast the spell 4-5 times at the same time and experience no lag, and most others I imagine can cast at least two, in either case, I'm not going to be modifying the spell further because there's nothing wrong with it.
To decrease the possibility of ingame lag, you need to optimise the loops here.
You can do this by using dynamic indexing instead of hashtables.
This would be a huge improvement because you would get rid of a lot of function calls and you wouldn't need to pick all units in the caster group, but loop through a list of spell instances which is theoretically a 30% speed increase
The total speed increase would be a little over 300%
Look we're not here to discuss computer specs required for the spell, I'm simply saying Since I already made modifications to prevent the two-cast lag, and already said /how/ to get rid of it if it still causes lag, I personally can cast the spell 4-5 times at the same time and experience no lag, and most others I imagine can cast at least two, in either case, I'm not going to be modifying the spell further because there's nothing wrong with it.
There is a problem with it, and that problem is lag. If I got lag from this test map, with ONLY this spell in it... Just imagine a map full of periodic systems and other things going on, I could imagine seeing a shit ton more lag, from a SINGLE cast.
Tank-Commander, why don't you try out the way that Mag suggested to you? It's about 300% speed improvement!
Lag is indeed a problem, I think, because if one spell that lags even if it had been fully optimised by the way you suggested, but when comes to lots of spells and with systems in a map. It definitely would lag spike or something as said by maddeem.
I like it! My only problem is that the knockback can be slightly glitchy. I tried it on the enemy Archmage and it ended up getting knocked away just as the spell ended, leaving the Archmage stuck in some rocks that it shouldn't be able to get too. I also found that if you target a single unit and just put the center of the spell on them, they don't get knocked around. Other than that I like! No lag happened when I tested!
The archmage managing to get through rocks would be a terrain error on my part (there's probably a hole in the obstruction which it can fit through) Although the knocking back as it ends is intentional, also if the distance between the portal centre and the unit is 0, then I wouldn't be surprised if they didn't move at all but sadly I can't change that
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.