I've been working on a 'Shield Generator' idea for over a week now but could use some help. I'm hoping to hear some possibilities from anyone and would really appreciate an open discussion on how to make this work. I've tried so many solutions now that I'm just stuck.
This is what I'm going for:
(0:22-1:04)
(the whole video is applicable, but you first see the shield effect up-close at 0:11)
Here's the ability in it's entirety:
1. Shield Generator building creates an AoE shield from origin for 30 seconds. This protects everyone inside the AoE from attacks outside the AoE. If possible, abilities need to be ignored as well. Best solution at this time is to make them invulnerable.
2. The shield has a life value and it may be targeted/fired upon. *Important, when the shield is fired upon, a graphic must show in some capacity that the projectile is being reflected/absorbed.
3. Units may move in and out of the shield's AoE at will.
4. Units inside the shield's AoE may target the Shield Generator and attack it directly, bypassing the shields.
5. Units inside the shield may fight each other and no invulnerability applies. Most difficult aspect to achieve.
So far, the closest solution I've found is to have a Search Area Effect (with radius equal to the shield's AoE) that uses a Apply Behavior Effect, with the Behavior causing everyone in the AoE to be invulnerable. Therefore, enemy units outside the AoE will automatically attack the Shield Generator, which in combination with a Squib (Shield) will cause the appropriate impact hits.
The problem lies in resolving the invulnerability. I want units inside the AoE to be invulnerable to units outside the AoE, but remain vulnerable to units inside the AoE.
Is there a way I can modify a unit's existing attack to allow "invulnerability" as a target filter? I don't want to give a new weapon to targets in the AoE because that would replace their existing weapon; rather, I just want to give all units affected the ability to damage invulnerable units. Or does anyone else have a better solution in mind?
Again, any help on this matter is greatly appreciated!
Thanks, Ahli. I had not thought of using validators for each weapon to solve this. That being said, I also added in to the original inquiry of making the AoE shield also able to protect the affected units from abilities like nukes, psi-storm, fungal growth, etc. I'm wondering if I could do the same validators for each ability.
I checked out the map and the shield idea is neat, but it's just a slightly modified Guardian Shield. I'm trying to take it a step further by causing all attacks (and hopefully abilities) to visually "stop" at the shield itself and cause an impact hit (as it appears in the youtube links above.)
Psi Storm is virtually impossible to handle like that, as the effect occurs immediately at the target location. Considering it is "summoned from thin air" adding a projectile wouldn't be realistic either. (where would the impact effect be? all around? or would Psi Storm simply ignore the shield?)
Maybe you can use Damage Responses for the protection effect? Give a behavior to every unit that sets damage to 0 if the target is "marked" and the attacker isn't. You could even use ID markers to tell apart multiple shield generators, and since it's a damage response and not an attack response it will automatically include abilities.
What I don't know is whether a Damage Response has access to both the attacker and defender for use in validators, if it doesn't the above won't work.
You can also add a "projectile killzone" ring around the generator to handle those seperately. Since projectiles have a full trajectory you can just spawn an effect like GuardianShieldImpact on them as they get destroyed.
Can I not create a set of validators that check and make sure units inside the AoE (affected by behavior) are invulnerable to units outside the AoE (not affected by behavior), but are vulnerable to units inside the AoE (affected by behavior)? A combination of Unit Behavior State and Unit Filters?
Can you elaborate, Drsuperevil? I looked into conjoined behaviors and what I figure is that this would allow me to make shielded units have their damage redirected/shared with the shield generator. Not really what I'm going for but thanks.
The projectile killer ring was meant as an additional precaution, as projectiles can be handled extremely easily unless they're going at ridiculous speeds.
The main idea was to give every unit a Damage Response behavior by default (on the Unit itself) which sets all damage dealt to 0, but with a validator for "target has ShieldGen buff AND caster doesn't". For telling apart multiple generators you would instead use markers and apply the buff via a Search on the generator, with a range greater than the maximum attack range of any unit (>15 for vanilla HotS).
I haven't tried this myself, but the only problem I see is grabbing both the Source and Target references from the attack without modding the weapon.
Ah, I understand the projectile ring. I like that idea.
I tried the damage response and got it to work properly, but unless I'm missing something the affected units with the damage response still receive the visual impact hits, rather than the AoE shield. Am I doing something wrong, Photonloss? The affected units should receive no impact hits whatsoever to maintain the visual authenticity of the shield working.
Patch 1.5 allows the conjoined behaviour to only share shields via the Conjoined Flags field. In supreme commander1/2 the shield took the damage and since you need either energy of shield to represent the damage amount and not just some point deduction (unless you use a complex trigger system) you need to make one of the secondary attributes the shield stat.
Sorry, I don't follow. Are you saying that in order for the AoE Shield to take all the damage, that I need to apply the affected units (in the AoE) with a shield stat from a Conjoined Behavior with "Share Shields?" If I did that, wouldn't it still cause the impact hits on the units themselves, rather than the AoE Shield?
The Conjoined setup sounds like the best option if you want the shield to have a limited capacity, unlike the Gungan one which didn't look like it'd run out of power any time soon.
For the visuals you can easily add a fizzle to the shield bubble (in the worst case you place a buff on each unit inside the shield which runs a dummy effect on the Caster/generator whenever it is attacked)
I have no idea how to remove the effects on the target. Impact effects could possibly be destroyed via a macro actor. Projectiles would need an effect-based setup to redirect as they are units and not purely visual Actor constructs. Beams wouldn't be affected by either option.
Another option would be to simply force all units to attack the generator whenever they target a unit in its AoE. This would fix the visuals and HP management, but it would be insanely abuseable unless you come up with a very tight safety net. I would advise against this option for any even semi-competitive map.
Try giving the units a buff as well that reduces their natural max shields to 0 and when the shield runs out of power it removes the buff restoring their shields again (problem would be a heal effect for the unit shields though. That way it would in theory work just like Supreme Commander.
In theory you could use actor events to redirect the impact subject of the Action actor like how the hellion beam is retargeted to a site at the end of the persistent.
Guys, first off, thanks a ton for the continued help. The multiple perspectives have been really useful.
Secondly, unless I can make a validator to stop this, I added the conjoined behavior and I don't think this will suit mainly because the Shield Generator's ability allows units (ally and enemy alike) to move in and out of the shield's AoE. Because of this aspect, the conjoined behavior creates scenarios where units would be attacked from enemies within the shield's AoE, and all units inside (including the shield generator) would lose shield points due to the conjoined behavior.
Example:
1. Shield Generator uses Shield Ability and creates a radius 5 shield that has 100 shield points.
2. Units affected by the shield's AoE (radius) now have 100 shield points.
3. An enemy unit walks into the Shield's AoE, attacks your units inside the AoE, and every affected unit now has reduced shields. This doesn't make sense since the Shield Generator should be stopping attacks from coming in, not attacks from within.
@Sirrace: Go
Another option would be to simply force all units to attack the generator whenever they target a unit in its AoE. This would fix the visuals and HP management, but it would be insanely abuseable unless you come up with a very tight safety net. I would advise against this option for any even semi-competitive map.
My friend helped me do this with triggers, and I'm trying to create the same thing in data. That being said, this is why I think either not allowing units to attack or making units invulnerable would be the best solution if I could figure out how to implement it properly. Invulenrability is ultimately the best since it covers damage from abilities as well.
The logic is simple:
I. Units inside AoE are invulnerable to units outside AoE.
a. Validator for "Not Shield Generator" excludes the Shield Generator from being invulnerable, meaning it can be attacked.
b. Add an Origin "Shield" with Squib Type "Shield" to Shield Generator, setting radius to same as the AoE of ability.
II. Units inside AoE are vulnerable to units inside AoE.
a. Attacking Shield Generator while inside the AoE allows attacking unit to ignore the Shield Gnerator's shields (No Draw Shields).
I just can't add the above in properly. I'm trying Ahli's solution, but still figuring it out.
The Attribute/Target Filter method will only work if you have a spare "dummy tag" that's only used by the shield generator. If you used the stock Invulnerable tag for example, units under the shield could probably attack mineral patches and the like.
Could you elaborate the exact functionality you want? For example anything involving a "generator power/capacity" will require an additional method for communicating attacks to the generator. Interactions between multiple generators are also a concern unless it's meant to be a "hero superunit"
I don't see how Ahli's method could be modified to differentiate multiple overlapping shields as the weapons don't have access to the effect scope of your generator buff system.
If you listened to the developer interviews for supreme commander 1/2 you would know that even for them the shield system was a technical challenge.
I'm starting to understand that. It seems it's one of those concepts that a game revolves around. That's why I wanted an open discussion, so that our knowledge and persistence could be pooled together to collectively come up with a solution.
Given that, my desire for a solution is only stronger. For the first time, people would be able to find a method for incorporating what seems to be a common idea for many people. To top it off, it would be created by users of this forum; people of vast technical skill and dedication to this game.
@Sirrace: Go
Could you elaborate the exact functionality you want? For example anything involving a "generator power/capacity" will require an additional method for communicating attacks to the generator. Interactions between multiple generators are also a concern unless it's meant to be a "hero superunit"
Sure, Photonloss. The functionality in game terms is what I'm trying to figure out. On paper and conceptually speaking, it is exactly how you see it in the Star Wars clip I provided above: a shield is cast that protects everything within the area of effect and it stops all projectiles from penetrating the shield.
In game terms, I do not want any beams, missiles, impact hits, or any ranged attacks to be able to be able to penetrate through the projected shield; visually speaking, I want all ranged attacks to be absorbed by the shield with some visual cue. Units inside AoE should never be hit from units outside the AoE. They are protected from all damage.
The Shield Generator has a fixed 1000 shield points that regenerate 25/second, with no delay. For now, lets make this an aura that is always on. When it loses all shield points, the shield disappears and will not become active again until it has regenerated 1/4 of its max shields (250 shield points). Validator = 1/4 Shields would solve this.
Multiple Shield Generators is difficult. If there were three shield generators side by side, then the units inside would be protected from all attacks until no shield exists. I'm not too worried about multiple Generators as I may just add in a validator that doesn't allow a Shield Generator to be built near another shield generator.
Hi Guys,
I've been working on a 'Shield Generator' idea for over a week now but could use some help. I'm hoping to hear some possibilities from anyone and would really appreciate an open discussion on how to make this work. I've tried so many solutions now that I'm just stuck.
This is what I'm going for:
(0:22-1:04)
(the whole video is applicable, but you first see the shield effect up-close at 0:11)
Here's the ability in it's entirety:
1. Shield Generator building creates an AoE shield from origin for 30 seconds. This protects everyone inside the AoE from attacks outside the AoE. If possible, abilities need to be ignored as well. Best solution at this time is to make them invulnerable.
2. The shield has a life value and it may be targeted/fired upon. *Important, when the shield is fired upon, a graphic must show in some capacity that the projectile is being reflected/absorbed.
3. Units may move in and out of the shield's AoE at will.
4. Units inside the shield's AoE may target the Shield Generator and attack it directly, bypassing the shields.
5. Units inside the shield may fight each other and no invulnerability applies. Most difficult aspect to achieve.
So far, the closest solution I've found is to have a Search Area Effect (with radius equal to the shield's AoE) that uses a Apply Behavior Effect, with the Behavior causing everyone in the AoE to be invulnerable. Therefore, enemy units outside the AoE will automatically attack the Shield Generator, which in combination with a Squib (Shield) will cause the appropriate impact hits.
The problem lies in resolving the invulnerability. I want units inside the AoE to be invulnerable to units outside the AoE, but remain vulnerable to units inside the AoE.
Is there a way I can modify a unit's existing attack to allow "invulnerability" as a target filter? I don't want to give a new weapon to targets in the AoE because that would replace their existing weapon; rather, I just want to give all units affected the ability to damage invulnerable units. Or does anyone else have a better solution in mind?
Again, any help on this matter is greatly appreciated!
Sirrace
Use a buff behavior for the invulnerable units that the generator gives to all units (except for other generators).
Create a validator that returns true, if:
- caster & target unit have that behavior
or
- target unit hasn't that behavior
Add this validator to the first effect of every weapon. This validates if the weapon can be used on the target.
@Ahli634: Go
Thanks, Ahli. I had not thought of using validators for each weapon to solve this. That being said, I also added in to the original inquiry of making the AoE shield also able to protect the affected units from abilities like nukes, psi-storm, fungal growth, etc. I'm wondering if I could do the same validators for each ability.
here is catalyst, i know that it has a shield system similiar to what you are asking for, why don't you take a look at the map.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
@willuwontu: Go
I checked out the map and the shield idea is neat, but it's just a slightly modified Guardian Shield. I'm trying to take it a step further by causing all attacks (and hopefully abilities) to visually "stop" at the shield itself and cause an impact hit (as it appears in the youtube links above.)
Psi Storm is virtually impossible to handle like that, as the effect occurs immediately at the target location. Considering it is "summoned from thin air" adding a projectile wouldn't be realistic either. (where would the impact effect be? all around? or would Psi Storm simply ignore the shield?)
Maybe you can use Damage Responses for the protection effect? Give a behavior to every unit that sets damage to 0 if the target is "marked" and the attacker isn't. You could even use ID markers to tell apart multiple shield generators, and since it's a damage response and not an attack response it will automatically include abilities.
What I don't know is whether a Damage Response has access to both the attacker and defender for use in validators, if it doesn't the above won't work.
You can also add a "projectile killzone" ring around the generator to handle those seperately. Since projectiles have a full trajectory you can just spawn an effect like GuardianShieldImpact on them as they get destroyed.
Maybe a shield sharing Conjoined behaviour?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Can I not create a set of validators that check and make sure units inside the AoE (affected by behavior) are invulnerable to units outside the AoE (not affected by behavior), but are vulnerable to units inside the AoE (affected by behavior)? A combination of Unit Behavior State and Unit Filters?
@Photoloss: Go
Good solution, but wouldn't that cause beams and any attacks that don't use projectiles to still hit units that are within the shield?
@DrSuperEvil: Go
Can you elaborate, Drsuperevil? I looked into conjoined behaviors and what I figure is that this would allow me to make shielded units have their damage redirected/shared with the shield generator. Not really what I'm going for but thanks.
@Sirrace: Go
The projectile killer ring was meant as an additional precaution, as projectiles can be handled extremely easily unless they're going at ridiculous speeds.
The main idea was to give every unit a Damage Response behavior by default (on the Unit itself) which sets all damage dealt to 0, but with a validator for "target has ShieldGen buff AND caster doesn't". For telling apart multiple generators you would instead use markers and apply the buff via a Search on the generator, with a range greater than the maximum attack range of any unit (>15 for vanilla HotS).
I haven't tried this myself, but the only problem I see is grabbing both the Source and Target references from the attack without modding the weapon.
@Photoloss: Go
Ah, I understand the projectile ring. I like that idea.
I tried the damage response and got it to work properly, but unless I'm missing something the affected units with the damage response still receive the visual impact hits, rather than the AoE shield. Am I doing something wrong, Photonloss? The affected units should receive no impact hits whatsoever to maintain the visual authenticity of the shield working.
@Sirrace: Go
Patch 1.5 allows the conjoined behaviour to only share shields via the Conjoined Flags field. In supreme commander1/2 the shield took the damage and since you need either energy of shield to represent the damage amount and not just some point deduction (unless you use a complex trigger system) you need to make one of the secondary attributes the shield stat.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
Sorry, I don't follow. Are you saying that in order for the AoE Shield to take all the damage, that I need to apply the affected units (in the AoE) with a shield stat from a Conjoined Behavior with "Share Shields?" If I did that, wouldn't it still cause the impact hits on the units themselves, rather than the AoE Shield?
@Sirrace: Go
The Conjoined setup sounds like the best option if you want the shield to have a limited capacity, unlike the Gungan one which didn't look like it'd run out of power any time soon.
For the visuals you can easily add a fizzle to the shield bubble (in the worst case you place a buff on each unit inside the shield which runs a dummy effect on the Caster/generator whenever it is attacked)
I have no idea how to remove the effects on the target. Impact effects could possibly be destroyed via a macro actor. Projectiles would need an effect-based setup to redirect as they are units and not purely visual Actor constructs. Beams wouldn't be affected by either option.
Another option would be to simply force all units to attack the generator whenever they target a unit in its AoE. This would fix the visuals and HP management, but it would be insanely abuseable unless you come up with a very tight safety net. I would advise against this option for any even semi-competitive map.
Try giving the units a buff as well that reduces their natural max shields to 0 and when the shield runs out of power it removes the buff restoring their shields again (problem would be a heal effect for the unit shields though. That way it would in theory work just like Supreme Commander.
In theory you could use actor events to redirect the impact subject of the Action actor like how the hellion beam is retargeted to a site at the end of the persistent.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Guys, first off, thanks a ton for the continued help. The multiple perspectives have been really useful.
Secondly, unless I can make a validator to stop this, I added the conjoined behavior and I don't think this will suit mainly because the Shield Generator's ability allows units (ally and enemy alike) to move in and out of the shield's AoE. Because of this aspect, the conjoined behavior creates scenarios where units would be attacked from enemies within the shield's AoE, and all units inside (including the shield generator) would lose shield points due to the conjoined behavior.
Example:
1. Shield Generator uses Shield Ability and creates a radius 5 shield that has 100 shield points.
2. Units affected by the shield's AoE (radius) now have 100 shield points.
3. An enemy unit walks into the Shield's AoE, attacks your units inside the AoE, and every affected unit now has reduced shields. This doesn't make sense since the Shield Generator should be stopping attacks from coming in, not attacks from within.
Is there a way around this with a validator?
My friend helped me do this with triggers, and I'm trying to create the same thing in data. That being said, this is why I think either not allowing units to attack or making units invulnerable would be the best solution if I could figure out how to implement it properly. Invulenrability is ultimately the best since it covers damage from abilities as well.
The logic is simple:
I. Units inside AoE are invulnerable to units outside AoE.
a. Validator for "Not Shield Generator" excludes the Shield Generator from being invulnerable, meaning it can be attacked.
b. Add an Origin "Shield" with Squib Type "Shield" to Shield Generator, setting radius to same as the AoE of ability.
II. Units inside AoE are vulnerable to units inside AoE.
a. Attacking Shield Generator while inside the AoE allows attacking unit to ignore the Shield Gnerator's shields (No Draw Shields).
I just can't add the above in properly. I'm trying Ahli's solution, but still figuring it out.
hmm i though that catalyst functioned the same way as what you wanted.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
@Sirrace: Go
The Attribute/Target Filter method will only work if you have a spare "dummy tag" that's only used by the shield generator. If you used the stock Invulnerable tag for example, units under the shield could probably attack mineral patches and the like.
Could you elaborate the exact functionality you want? For example anything involving a "generator power/capacity" will require an additional method for communicating attacks to the generator. Interactions between multiple generators are also a concern unless it's meant to be a "hero superunit"
I don't see how Ahli's method could be modified to differentiate multiple overlapping shields as the weapons don't have access to the effect scope of your generator buff system.
@Sirrace: Go
If you listened to the developer interviews for supreme commander 1/2 you would know that even for them the shield system was a technical challenge.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
I'm starting to understand that. It seems it's one of those concepts that a game revolves around. That's why I wanted an open discussion, so that our knowledge and persistence could be pooled together to collectively come up with a solution.
Given that, my desire for a solution is only stronger. For the first time, people would be able to find a method for incorporating what seems to be a common idea for many people. To top it off, it would be created by users of this forum; people of vast technical skill and dedication to this game.
Sure, Photonloss. The functionality in game terms is what I'm trying to figure out. On paper and conceptually speaking, it is exactly how you see it in the Star Wars clip I provided above: a shield is cast that protects everything within the area of effect and it stops all projectiles from penetrating the shield.
In game terms, I do not want any beams, missiles, impact hits, or any ranged attacks to be able to be able to penetrate through the projected shield; visually speaking, I want all ranged attacks to be absorbed by the shield with some visual cue. Units inside AoE should never be hit from units outside the AoE. They are protected from all damage.
The Shield Generator has a fixed 1000 shield points that regenerate 25/second, with no delay. For now, lets make this an aura that is always on. When it loses all shield points, the shield disappears and will not become active again until it has regenerated 1/4 of its max shields (250 shield points). Validator = 1/4 Shields would solve this.
Multiple Shield Generators is difficult. If there were three shield generators side by side, then the units inside would be protected from all attacks until no shield exists. I'm not too worried about multiple Generators as I may just add in a validator that doesn't allow a Shield Generator to be built near another shield generator.
Or just make it the shield buff only applies to units with it from the same caster.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg