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

Data Editor: Validators & Requirements

Status
Not open for further replies.
Level 9
Joined
Nov 4, 2007
Messages
931
I am currently trying to make an effect that passively grants a units weapon 15% greater damage when a certain ability of his reaches level 5. So far though I can't quite figure out how to do this with the data editor alone. I know that requirements can check the level of an ability completed at a unit, but the effect to add the 15% damage only uses validators as a check. So is there any way to do this or do I have to settle with just doing this with a trigger. (I'd really like to keep it confined to data editor for now if it can be helped.) Thanks in advance.
 
Level 9
Joined
Nov 4, 2007
Messages
931
The key is to use the Behavior as the link to the Validator and Requirement, as this is the place in the data editor that can use both of these. So say for instance (in this example) you want to make a Hero unit able to deal 10 more damage and have 25% a chance to, oh lets say, instantly kill an enemy unit when its ability that can level up which we'll just call Damage+ (name creativity is irrelevant in this example) reaches level 3. The ability itself can do anything, the key is to make it do the killing part when the ability reaches level 3, something that can only be done by Requirements but said Requirements cannot be referenced by Validators or Effects. Naturally the only solution here would be to trigger it but it can be done via Data Editor as you will soon see. So lets assume you know how to do Hero and Ability levels and setup Requirements, set a Requirement to Count Ability Damage+ Completed At Unit Greater than Or Equal to 3 in both the Show and Use fields (putting it in both fields is necessary). Next create a Behavior of type buff (whether you want to make it do anything or have it Hidden/Not Hidden is up to you). This Behavior will act as our Link between our Requirements and our Effects & Validators. Add your Requirement to this Behavior. Next create a validator to detect when the Behavior Count of the Behavior we just created is Greater than or Equal to 1 . This indirectly links our Validator to our Requirement using the Behavior as a proxy, effectively making it a Validator to check when Damage+ is Greater than or Equal to Level 3, because we made the data in the Requirement in both the Show and Use fields, this will effectively hide the Behavior from the Validator until Damage+ is Level 3, in other words, when this Behavior is pre-placed or applied to a unit, it will not show or be validated unless that unit has Damage+ at level 3 or greater. Now for our damage and killing part, the damage can easily be set in the Behavior modifications, but if you want to make it change the damages for something else, say, a Seeker Missile, that can be done to if you really wish to know, but for now it will just be weapon damage. Finally we reach our 25% chance to kill part, now in order to put this effect in to use by a unit's weapon, the units Weapon Effect must reference an Effect of type Set in order to encompass both the units Damage as well as any subsequent effects that go along with it, in this case our kill part. To create the Killing effect, simply create an effect of type Damage and set its Flags on for Kill. Next create your effect Set to hold the Killing effect, and give it the Validator to check if your unit has the Behavior we created earlier on it, else this effect will activate regardless of whether or not the unit even has an ability called Damage+, much less it being Level 3 or greater on it. Now set the Effect Minimum and Maximum to 1, and make sure that Effect - Random is enabled and add your Killing effect and 3 blank effects into it. This should look like you have Killing at the top, and 3 empty lines below it in the Effects list, and what this will achieve is that whenever the Set effect is activated it will pick 1 effect at random from our list of effects to activate, in other words, a 1/4 chance to kill, and a 3/4 chance to simply do nothing. Next we need to combine this 25% chance kill with our Weapon damage, to do this we need another Set effect, only in this one no validators will be needed, and Random will be disabled, instead we will have Effect minimum and maximum at 2, and in the Effects list we will add the Weapon Damage and our Killing Set. Finally just reference this in your Weapon - Effect, and make sure that if you don't want this to be a buff, you have the Behavior already added to the unit(s) you want in the data editor. And with that you should have effectively linked a Require to an Effect by using a Behavior proxy, no triggers required. Good luck, hope this helped.
 
Status
Not open for further replies.
Top