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

Permanent Plasma Shield in Warcraft III

Status
Not open for further replies.
Level 4
Joined
May 1, 2011
Messages
81
Hi there guys. I want to install the Starcraft's Protoss Plasma Shield in the Warcraft III. So I found out that you can actually use the Mana Shield ability as the Plasma Shield, as if the mana is the plasma.

However, when the mana finishes, the Mana Shield will return to its original, and when the mana regenerates, you must click the Mana Shield button again to re-activate back the so-called Plasma Shield. This is not the case when it comes to Starcraft, where their P.Shield will automatically re-activate once the plasma starts with 1 MP.

So is there any suggestion such that this Mana Shield in WC3 will happen like Starcraft, where I want a permanent Plasma Shield without having clicking the button all the time when depleted? Any help will be appreciated.
 
Level 4
Joined
May 1, 2011
Messages
81
Could you be more specific when giving Trigger suggestion? Is there any Events needed to be created? What about conditions?

And no I can't. Because I have taken out the Buff

Plasma Shield is a Starcraft's race Protoss defense method created by a blend of psionic power and technology design to protect the Protoss' units and buildings, just like the one at Star Trek.
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
This should work:

Unit is issued an order with no target
Order == unmanashield // whatever the order string is
Add unit to group
turn on trigger 2

Every 0.1 seconds // whatever interval you like, don't make it too low
Pick every unit in group
If
mana of picked unit > 1
then
Order picked unit to activate mana shield
remove unit from group
if
group is empty
then
tun off this trigger
endif
endif

Make sure the mana cost to cast the ability is 0.
 
Level 4
Joined
May 1, 2011
Messages
81
The condition "Order == unmanashield // whatever the order string is"

Is it at String Comparison condition? If so, then what is the first function "Order == unmanashield "?

What is "turn on trigger 2"? Is there need for another trigger?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Yes, it's a string comparison. Look for issued order function or something like that. Should be easy to find.

You can check the activate/deactivate order string of your ability in object editor.

The trigger 2 is the one with the Every 0.1 seconds event. I believe you do need it. You can try without it of course to see if it works like that.
 
Level 4
Joined
May 1, 2011
Messages
81
"Look for issued order function or something like that"

It's belong to the function "Conversion - Convert Unit-Type to String"?

And the 2nd trigger action "Pick every unit in group"

It's the "Pick Every unit" in the Unit Group section or the Player Group section? I'm not very sure which group you were referring to. And it's referring to multiple actions or just the single action/conditions?
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

Well I think Maker thinks of something like this:

  • Init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mana Shield
      • ((Triggering unit) is in TempGroup) Equal to False
    • Actions
      • Unit Group - Add (Triggering unit) to TempGroup
      • Trigger - Turn on (Loop <gen>)
  • Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Neutral Naga Sea Witch - Activate Mana Shield
          • Unit Group - Remove (Picked unit) from TempGroup
      • Custom script: call DestroyGroup(udg_TempGroup)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (TempGroup is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
Nearby the same but with better performance would be this:
JASS:
function MSFilter takes nothing returns boolean
    local unit u = GetFilterUnit()
    
    if GetWidgetLife(u) > 0.405 and GetUnitAbilityLevel(u,'A000') > 0 and GetUnitAbilityLevel(u,'B000') < 1 and GetUnitState(u,UNIT_STATE_MANA) >= 1 then
        call IssueImmediateOrder(u,"manashieldon")
    endif
    set u = null
    return false
endfunction

function MSActions takes nothing returns nothing
    local group g = CreateGroup()
    local real x = GetRectCenterX(bj_mapInitialPlayableArea)
    local real y = GetRectCenterY(bj_mapInitialPlayableArea)
    
    call GroupEnumUnitsInRange(g,x,y,1000000.,Condition(function MSFilter))
    call DestroyGroup(g)
endfunction

function InitTrig_Manashield takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterTimerEvent(t,0.5,true)
    call TriggerAddAction(t,function MSActions)
    set t = null
endfunction

'A000' is the rawcode of the manashield ability (you have to change this)
'B000' is the rawcode of the manashield buff (you have to change this too)

In the jass code you check, if picked units are alive, if they have the manashield ability, if he don't have the mana shield buff (so manashield if off!) and if the mana of them is greater then 1.
 
Level 4
Joined
May 1, 2011
Messages
81
Consider you are "Turning On" the second trigger Loop, does that mean you need to uncheck the Initially On when right-click the Loop trigger?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
I was thinking that one could detect the moment when the shield is turned off due to mana being drained. Apparently that can't be done.

Dr.Boom, don't destroy the group in the GUI trigger.

In the JASS version, don't use 1000000 range since even a 480x480 map can only have about 87000 range from lower left corner to upper right corner. You could also use bj_lastCreatedGroup instead of creating/destroying groups.

The problem with Mana Shield is that it interrupts the current order. I recommend using a damage detection system. There should be some shield system here at the hive's spell section.
 
Level 4
Joined
May 1, 2011
Messages
81
@Maker
I was thinking about just re-give me the trigger suggestion. As for me, JASS script is too tough for me to understand what are the triggers talking about. I get error because I can't initialize the trigger when using text. So I think its best you show the normal trigger for the re-activation of plasma shield.
 
Level 16
Joined
May 1, 2008
Messages
1,605
@Maker
I was thinking about just re-give me the trigger suggestion. As for me, JASS script is too tough for me to understand what are the triggers talking about. I get error because I can't initialize the trigger when using text. So I think its best you show the normal trigger for the re-activation of plasma shield.

Well about the initialize error, because my trigger name was "Manashield" and this why I have "function InitTrig_Manashield takes nothing returns nothing"

If you named it "Plasma Shield" you need "function InitTrig_Plasma_Shield takes nothing returns nothing" or if it is "PlasmaShield" then "function InitTrig_PlasmaShield takes nothing returns nothing"

And this with 1000000. is just an example fast typed -_-;
 
There is...another way...

1. You need Weep's GDD.
2. You'll need a custom 'health bar' to represent the shield
3. You need basic GUI knowledge.
4. Mash it all up, and you should have a system which detects damage and creates a virtual Energy Shield.

It's alot harder to make it, but the outcome becomes much more realistic, and you don't need to give the units Mana Shield. I could have a go at this if you want (though the above solution is much easier).
 
Level 4
Joined
May 1, 2011
Messages
81
@GhostThruster

I don't need that ACCURATE as Starcraft/Starcraft II's Plasma Shield system. I just need substitution to the Warcraft III for Mana Shield as Plasma Shield. Any help will be appreciate, if you can explain that trigger properly. This is how I did trigger script regarding the same as Stim Pack losing 10 HP every once.

@Dr. Boom

I'm confused about what you post. This is what I don't understand about the JASS you are giving me. When you said "Nearby the same but with better performance would be this:",

Is that script referring to the 2 trigger page you are posting, or actually the third one?
 
Level 4
Joined
May 1, 2011
Messages
81
Maybe that's because I don't have enough knowledge to learn about making scripts, JASS, GUIs, variables, strings and other wordings, other than I learned the basic trigger editor. Sorry but I'm not as genius as you guys think, ironically I have use WC3 Editor for 3 - 4 years already.

Sometimes, if you don't do the Mathematical Reasoning's arguments properly in the Trigger Editor, you might end up responding to the wrong one, which that's not what you one. So when Dr. Boom show me the two trigger page along with one script, I'm not even sure what's he talking about. This is actually the first time a person show me with JASS scripts, as normally when I edited some DotA maps full of scripts, I couldn't bother about that, as it might cause me to "faint". I have actually copy everything what he gave me the script, but none of them works.

In conclusion, I agreed that sometimes we need to learn JASS script. Maybe this is my first time, so that explains why I'm very vague of what you guys were talking about by making a permanent Plasma Shield. Just tell me properly what to do, and I try my best to follow if I understand.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
1. Use a damage detecting system to redirect damage to mana (but this can be tricky as the even fires before damage is dealt and you need to make sure leaked damage falls to HP correctly).
2. Just reorder the mana shield to activate via triggers when it gets turned off after a while. Checking all units every 5 - 10 seconds which have the mana shield ability would suffice (as the amount regenerated inbetween is minimal).

Or you could try modding the game StarCraft II instead where this mechanic is easilly accessible.
 
Level 4
Joined
May 1, 2011
Messages
81
My Plasma Shield ability is a custom Mana Shield ability copied from the original one. If asking me to reorder the mana shield to activate, I believe that's what you said (correct me if I'm wrong):

  • Plasma Shield
    • Actions
    • Unit - Order (Triggering Unit) to Neutral Naga Sea Witch - Activate Mana Shield
But the problem is, this order is actually for the original mana shield. Can this apply to the custom mana shield?

I see you guys were talking about damage detecting system. How do I find in the trigger editor?
 
Level 17
Joined
Jan 21, 2010
Messages
2,111
Damage detection system is a custom system made by people, i would suggest you to use the vjass gui friendly dds
And for the order, that order is 'applied' to all custom skill copied from the original.
So if you have war stomp, you can order a unit to use it, by ordering it orc-tauren cheiftan war stomp
 
Level 4
Joined
May 1, 2011
Messages
81
So if I uses the custom Mana Shield (Copied), then would the Wc3 recognizes the custom mana shield from the trigger Naga Sea Witch's? Or is there any strings needed to recognize it?
 
Level 4
Joined
May 1, 2011
Messages
81
Okay. Then how would I recognize a specific race or any groups who has the Mana Shield ability in the Trigger Editor?
 
Status
Not open for further replies.
Top