Have decided to pick up my map again after a little pause. Have decided to try something out in it. The map itself revolves a lot around a special unit, the matriarch, which can when you have enough resources morph into a stronger matriarch. In any case, I want to make so each matriarch you can evolve into will "favor" different units. Like if you upgrade to one all zerglings may get 10 more in life, and another may do the same to roaches. How would I do this?
Take care,
PsycoticBanana.
EDIT:
Should maybe mention what I have tried so far. Tried to solve it by creating a behaviour for the zerglings that would add 10 life to their maximum life. Then I would use an validator or requirement to turn it on or off. Didnt work, but I am not sure why (could be that I did something wrong or that the approach itself was wrong).
If you put a different periodic buff on the different matriarchs that can be morphed to, it will give the results your looking for.
I just re-read that, realized it's a bit confusing. It's fairly simple:
you have 1 set of behavior/effects for each type of matriarch:
EXAMPLE: Zergling Matriarch
Behavior (search for zerglings): Buff, period count -1, period 1.0, periodic effect: search for zerglings.
Behavior (Buff the zerglings): Buff, duration 1.1, add 10 hp or whatever your buff does.
Effect: Search for zerglings, range and whatnot for whatever you need, effect: apply behavior (buff for zerglings)
Effect: Apply behavior (Buff the Zerglings).
Add the Behavior that searches for zerglings to the zergling matriarch, and it will search every 1 second for zerglings in the range specified. If it finds them, it will apply the buff for zerglings, which will last 1.1 seconds, so the search will occur before the behavior wears off, giving the impression of a continuous effect.
You can use this same framework for each of your specialized matriarchs, changing the search parameters to roaches or whatever, and changing the buff as needed.
I know, I would just prefer to do it based with the data editor rather then triggers. And I am using upgrades as well, this is just to make so the matriarchs has different "personalities" (as in that they favor different tactics).
You can probably use pure data workarounds for this (invisible dummy unit with autocast upgrade ability, requirements checking for the different Matriarch mutations or whatever), but still, I think a trigger would be the easiest way here, especially because there is basically no performance penalty in this case.
Yeah, managed to miss your post first, lol. It could work, will have to try.
In case I have written it in a confusing way... I am not trying to give a buff to my matriarchs, but rather give it to the other units depending on which matriarch I have. If you have ever played Age of Mythology, it is a bit like the worship system. Each time you would go to a new age you chose a god to worship and different gods had different pros and cons. Sorry if I am confusing, not very good at explaining stuff.
The reason that I want to use data is that I prefer to solve it that way if I can. However, if triggers would be better then maybe I should use them... I dont know, lol.
Yes, I also wrote my last post a bit off-kilter. Again, apologies. I meant to say give the buffs FROM your matriarchs.
I see now this is a validator issue, and my question is, what kind of validator did you use? I think a Unit Type will work just fine, when used in the search effect. I will play around and get back to you later, to be sure.
However, Kueken has the right of it as far as triggers go, so if, for some reason, a pure data solution can't be found, then his method will work just as well, and like he said, it will have minimal overhead.
Ok, thanks :). I have honestly no idea what I am doing. Tend to learn by trial and error, lol.
In any case, I have to confess I have no idea of how to affect the life of a unit in this manner. Have just added the bahaviour without any validator or requirement (not sure which one I should use) and it has had no effect. So I have to ask, how would I do that? Affect the maximum life of a unit from a behaviour?
Make a behavior, type is a Buff. In the Behavior - Modification+ field, you would go to the Unit tab and scroll towards the bottom. There is a field called "Vital Max Bonus", and you would change the Life value to be whatever you wanted.
Edit: I have attached an example map of what you need. Basically, the set up is as I listed above, but with a vailidator in the actual buff (the one that adds life to the unit) that makes sure it's a zergling or roach. Let me know if this helps! Any questions, feel free to PM me.
I think there is a much better way to do what you want to do, because it sounds like you want the Matriarch to act similar to a researched upgrade analog, not have an aura:
1) Create behaviors for each effect you want. +10 hp for zerglings, +1 armor for roaches, whatever.
2) Go to the individual unit tabs and place all the behaviors you want in the Behaviors+ field.
At this point all the units should essentially have the behaviors on by default, but you want them only to selectively turn on when the right Matriarch is anywhere on the battlefield, right?
Now we start adding validators so the behaviors only are active when you possess a Matriarch of the appropriate type.
3) You're going to create a Requirement now for each Matriarch you have. This is going to be the logical backbone that our validator calls upon, and the validator will turn these upgrade behaviors on and off.
4) Copy/paste and modify a requirement like Have Nexus, and retitle it Have [name of Matriarch]. In the data window, you'll see a field call Requirements+. Double click on it. You'll see a field that says "Count Unit bla bla bla". Simply change the Nexus to the Matriarch unit you want. Repeat this until you have a Requirement for each Matriarch you have.
5) Now you need to make validators that reference the Requirement's test. Create a validator of type Player Requirement. Player Requirement validators return true if the respective Requirement returns true. The key part is you want field Value to reference the Requirement you want to use. Repeat this for each Matriarch type. These validators will return true (and therefore turn on the behavior) if you control at least 1 of the appropriate Matriarch.
6) Now go to the behaviors you made to give the units these initial abilities. Scroll down to Validators (Disable), and put in the appropriate validator for each behavior. This means that, if the validator returns false - you do not have 1 of the appropriate Matriarch - the behavior will be disabled.
At this point, you zergies should have latent behaviors that give them buffs that only turn on when you have 1 of the appropriate Matriarch. You can also, if you want, use Requirements to make it so that only 1 Matriarch is allowed on the field at a time. That's pretty simple but I can explain how to do that if you want. Tell me if this works out. Cheers.
Hi all.
Have decided to pick up my map again after a little pause. Have decided to try something out in it. The map itself revolves a lot around a special unit, the matriarch, which can when you have enough resources morph into a stronger matriarch. In any case, I want to make so each matriarch you can evolve into will "favor" different units. Like if you upgrade to one all zerglings may get 10 more in life, and another may do the same to roaches. How would I do this?
Take care, PsycoticBanana.
EDIT:
Should maybe mention what I have tried so far. Tried to solve it by creating a behaviour for the zerglings that would add 10 life to their maximum life. Then I would use an validator or requirement to turn it on or off. Didnt work, but I am not sure why (could be that I did something wrong or that the approach itself was wrong).
@PsycoticBanana: Go
If you put a different periodic buff on the different matriarchs that can be morphed to, it will give the results your looking for.
I just re-read that, realized it's a bit confusing. It's fairly simple:
you have 1 set of behavior/effects for each type of matriarch:
EXAMPLE: Zergling Matriarch
Add the Behavior that searches for zerglings to the zergling matriarch, and it will search every 1 second for zerglings in the range specified. If it finds them, it will apply the buff for zerglings, which will last 1.1 seconds, so the search will occur before the behavior wears off, giving the impression of a continuous effect.
You can use this same framework for each of your specialized matriarchs, changing the search parameters to roaches or whatever, and changing the buff as needed.
Hope this helps.
You could also use upgrades to easily manipulate the unit types. You might probably need a trigger to set the upgrade according to your morph state.
@Kueken531: Go
I know, I would just prefer to do it based with the data editor rather then triggers. And I am using upgrades as well, this is just to make so the matriarchs has different "personalities" (as in that they favor different tactics).
@PsycoticBanana: Go
You can probably use pure data workarounds for this (invisible dummy unit with autocast upgrade ability, requirements checking for the different Matriarch mutations or whatever), but still, I think a trigger would be the easiest way here, especially because there is basically no performance penalty in this case.
Additional upgrades are not a problem at all.
@PsycoticBanana: Go
Did I misunderstand your question? If I did, apologies. I thought you were asking for a pure data way to give buffs to your matriarch unit.
@Snappybean: Go
Yeah, managed to miss your post first, lol. It could work, will have to try.
In case I have written it in a confusing way... I am not trying to give a buff to my matriarchs, but rather give it to the other units depending on which matriarch I have. If you have ever played Age of Mythology, it is a bit like the worship system. Each time you would go to a new age you chose a god to worship and different gods had different pros and cons. Sorry if I am confusing, not very good at explaining stuff.
The reason that I want to use data is that I prefer to solve it that way if I can. However, if triggers would be better then maybe I should use them... I dont know, lol.
@PsycoticBanana: Go
Yes, I also wrote my last post a bit off-kilter. Again, apologies. I meant to say give the buffs FROM your matriarchs.
I see now this is a validator issue, and my question is, what kind of validator did you use? I think a Unit Type will work just fine, when used in the search effect. I will play around and get back to you later, to be sure.
However, Kueken has the right of it as far as triggers go, so if, for some reason, a pure data solution can't be found, then his method will work just as well, and like he said, it will have minimal overhead.
@Snappybean: Go
Ok, thanks :). I have honestly no idea what I am doing. Tend to learn by trial and error, lol.
In any case, I have to confess I have no idea of how to affect the life of a unit in this manner. Have just added the bahaviour without any validator or requirement (not sure which one I should use) and it has had no effect. So I have to ask, how would I do that? Affect the maximum life of a unit from a behaviour?
@PsycoticBanana: Go
Make a behavior, type is a Buff. In the Behavior - Modification+ field, you would go to the Unit tab and scroll towards the bottom. There is a field called "Vital Max Bonus", and you would change the Life value to be whatever you wanted.
Edit: I have attached an example map of what you need. Basically, the set up is as I listed above, but with a vailidator in the actual buff (the one that adds life to the unit) that makes sure it's a zergling or roach. Let me know if this helps! Any questions, feel free to PM me.
Ok, thanks. Will try it right away.
EDIT:
Got it to work :D. Now I just have to figure out how to use validators or requirements... which one is it? A validator or a requirement?
I think there is a much better way to do what you want to do, because it sounds like you want the Matriarch to act similar to a researched upgrade analog, not have an aura:
1) Create behaviors for each effect you want. +10 hp for zerglings, +1 armor for roaches, whatever.
2) Go to the individual unit tabs and place all the behaviors you want in the Behaviors+ field. At this point all the units should essentially have the behaviors on by default, but you want them only to selectively turn on when the right Matriarch is anywhere on the battlefield, right?
Now we start adding validators so the behaviors only are active when you possess a Matriarch of the appropriate type.
3) You're going to create a Requirement now for each Matriarch you have. This is going to be the logical backbone that our validator calls upon, and the validator will turn these upgrade behaviors on and off.
4) Copy/paste and modify a requirement like Have Nexus, and retitle it Have [name of Matriarch]. In the data window, you'll see a field call Requirements+. Double click on it. You'll see a field that says "Count Unit bla bla bla". Simply change the Nexus to the Matriarch unit you want. Repeat this until you have a Requirement for each Matriarch you have.
5) Now you need to make validators that reference the Requirement's test. Create a validator of type Player Requirement. Player Requirement validators return true if the respective Requirement returns true. The key part is you want field Value to reference the Requirement you want to use. Repeat this for each Matriarch type. These validators will return true (and therefore turn on the behavior) if you control at least 1 of the appropriate Matriarch.
6) Now go to the behaviors you made to give the units these initial abilities. Scroll down to Validators (Disable), and put in the appropriate validator for each behavior. This means that, if the validator returns false - you do not have 1 of the appropriate Matriarch - the behavior will be disabled.
At this point, you zergies should have latent behaviors that give them buffs that only turn on when you have 1 of the appropriate Matriarch. You can also, if you want, use Requirements to make it so that only 1 Matriarch is allowed on the field at a time. That's pretty simple but I can explain how to do that if you want. Tell me if this works out. Cheers.
@PsycoticBanana: Go
It would be a validator.
@Myrkridian: Go
This is a method I never would have thought of. Very nice. Probably better on the overhead as well than a period search. I'll have to remember this.