If the Terran player has less than 10 workers in play, the cooldown of Calldown Mule is 10 seconds.
If the Terran player has between 11-19 workers in play, the cooldown of Calldown Mule is 15 seconds.
If the Terran player has between 20-29 workers in play, the cooldown of Calldown Mule is 20 seconds.
Etc...
Any ideas how to build this?
The only way I can think of is by having a passive behavior added to the Orbital Command. The behavior has a Validator that checks for the amount of workers the player control... If the number is for example below 10, then the buff becomes activated and speeds up Time Scale of the Orbital Command.
Hmm...
Alternatively, would it be possible to make it work like this?
If the Terran player controls 5 workers, Calldown Mule has 5% longer cooldown.
If the Terran player controls 7 workers, Calldown Mule has 7% longer cooldown.
If the Terran player controls 29 workers, Calldown Mule has 29% longer cooldown.
(Or, the cooldown is increased by 0.5 seconds for each worker... So 5 workers would make the cooldown be 2.5 seconds longer...)
One small dilemma though - In my mod, Calldown SCV is based on charges. A charge is normally replenished every 20 second, up to a maximum of 5 charges.
This trigger "skips" to change cooldown immediately, but rather does so later.
I will explain how I mean:
When a player has equal to or greater than 10 workers in play, cooldown is increased from 20 to 25 seconds.
If a player has equal to or greater than 15 workers in play, cooldown is increased from 25 to 30 seconds.
For example, as soon as a player goes from 9 to 10 workers, or 9 to 13 workers, the cooldown still remains on the lower value. (20 seconds instead of 25 seconds) It changes cooldown AFTER two additional "cooldown circles" have passed. (2x20 seconds, THEN it changes to the new cooldown value.)
It is the same thing when a player looses workers - the cooldown remains on the higher value, instead of dropping down to a lower value immediately. It takes two additional "cooldown circles" before it changes value.
Is it possible to modify the trigger so it changes the cooldown immediately?
I have played around with the trigger (to the degree that I am capable of, with my trigger skills), but the cooldown timer still refuses to switch to the new value. It always takes two extra cooldown loops before the new cooldown value is applied, regardless if a player gains or looses workers.
Ideally, it should work like this (just in case I explained it badly above):
Player A has 9 workers in play. That means that the cooldown of a charge for Calldown SCV is 20 seconds.
He uses his last charge to calldown a SCV. He now has 10 workers in play, which means that the cooldown for the next charge will immediately be increased to 25 seconds. (IF that is even possible..)
I attach the modified trigger here.
More thoughts or ideas for potential workarounds? I really would need this to work as smooth as possible : /
Duplicate your calldown ability so you have three of it, but give each of them different cooldowns. Put three buttons on the command card for them, but in the same spot. Make three requirements that return true for the different numbers of SCVs you want. Put these tests under the Show section of the requirements. Then make each ability use the requirement that you want it to have.
EDIT: There are also effects that can change cooldowns. (Modify Unit I think.) You could try those too.
Thanks for an interesting suggestion! I do unfortunately think there are two problems with this approach:
1. Lets say that I have 4 charges on my Calldown SCV ability. I have 9 workers in play, which means that the cooldown of the ability is 20 seconds. I calldown one SCV, which makes me have 10 workers in play. BAM! The ability is now switched to a new Calldown SCV ability, which has cooldown 25 seconds. All the charges that I had saved up are now removed. (Since the ability is replaced)
2. I have one charge left on Calldown SCV. I have 9 workers in play, which means that the cooldown of the ability is 20 seconds. I use the last charge to calldown one SCV. The ability is now switched to another ability that has a slower cooldown. I will now be able to calldown another SCV immediately. (One SCV from the first version of Calldown SCV, which gives me 10 workers. This swaps Calldown SCV to the second version, which gives me a new worker immediately.) This might be fixable, if "Time - Start" works to give the ability a cooldown from start, as soon as it is applied.
Preferably, it should work like this:
Calldown worker #8 - wait 20 seconds.
Calldown worker #9 - wait 20 seconds.
Calldown worker #10 - wait 25 seconds.
Calldown worker #11 - wait 25 seconds.
Etc.. (And the same would happen if a player loses workers)
Another possibility is what I mentioned. Modify Unit effects to add-subtract from the cooldown of that ability. But to get a consistent cooldown graphic, I think you'd have to apply the effect at the precise moment that the ability is used.
I've never tried this myself though, so you'll have to investigate Modify Unit effects yourself.
I'm also not sure which way it works. I don't know whether it temporarily modifies the cooldown one time, or permanently modifies it for that ability. You'll have to test.
I have found an action called "Add charge regen time for unit ability", that seems interesting to use for a trigger. The description of the actions is: "Adds to the amount of time it takes to regenerate the specified ability charge link."
I attach a very shitty version of two triggers I have modified for this, down below. I know that it is not correct, but I am unsure how to proceed. It obviously needs to work as smooth as possible
Imagine an Orbital Command.
If the Terran player has less than 10 workers in play, the cooldown of Calldown Mule is 10 seconds.
If the Terran player has between 11-19 workers in play, the cooldown of Calldown Mule is 15 seconds.
If the Terran player has between 20-29 workers in play, the cooldown of Calldown Mule is 20 seconds.
Etc...
Any ideas how to build this?
The only way I can think of is by having a passive behavior added to the Orbital Command. The behavior has a Validator that checks for the amount of workers the player control... If the number is for example below 10, then the buff becomes activated and speeds up Time Scale of the Orbital Command.
Hmm...
Alternatively, would it be possible to make it work like this?
If the Terran player controls 5 workers, Calldown Mule has 5% longer cooldown.
If the Terran player controls 7 workers, Calldown Mule has 7% longer cooldown.
If the Terran player controls 29 workers, Calldown Mule has 29% longer cooldown.
(Or, the cooldown is increased by 0.5 seconds for each worker... So 5 workers would make the cooldown be 2.5 seconds longer...)
Triggers
Periodic event
number of units in unit group (workers)
If X
then
catalog field value set
Thank you for your quick reply!
Would you mind being a bit more precise? (I am not very skilled at the trigger editor, since I tend to make everything in the data editor.)
It'd look something like this.
@Kabelkorven: Go Triggers. Unit - Add 0.0 seconds to cool down Cooldown on unit Unit You just need to create a Variable for the Scv's. more info?
Thanks for the help!
One small dilemma though - In my mod, Calldown SCV is based on charges. A charge is normally replenished every 20 second, up to a maximum of 5 charges.
This trigger "skips" to change cooldown immediately, but rather does so later.
I will explain how I mean:
When a player has equal to or greater than 10 workers in play, cooldown is increased from 20 to 25 seconds.
If a player has equal to or greater than 15 workers in play, cooldown is increased from 25 to 30 seconds.
For example, as soon as a player goes from 9 to 10 workers, or 9 to 13 workers, the cooldown still remains on the lower value. (20 seconds instead of 25 seconds) It changes cooldown AFTER two additional "cooldown circles" have passed. (2x20 seconds, THEN it changes to the new cooldown value.)
It is the same thing when a player looses workers - the cooldown remains on the higher value, instead of dropping down to a lower value immediately. It takes two additional "cooldown circles" before it changes value.
Is it possible to modify the trigger so it changes the cooldown immediately?
I would try experimenting with actions like "Reset Ability Cooldowns", "Activate Ability Cooldowns", and "Add cooldown..."
@Kabelkorven: Go
Maybe you have the "event:" Set to a long duration so it only fires once in a while. Try changing it to:
Unit - Any Unit dies
OR
Unit - Any Unit Enters (Entire map)
So it fires the Cooldown pretty much ASAP.
As far as the Mid cycle Restart
Unit - Reset All cooldowns on ability "Ability" on unit (Triggering unit)
then add what i posted above
Unit - Add 0.0 seconds to cooldown Cooldown on unit Unit
Thanks for your suggestions!
I have played around with the trigger (to the degree that I am capable of, with my trigger skills), but the cooldown timer still refuses to switch to the new value. It always takes two extra cooldown loops before the new cooldown value is applied, regardless if a player gains or looses workers.
Ideally, it should work like this (just in case I explained it badly above):
Player A has 9 workers in play. That means that the cooldown of a charge for Calldown SCV is 20 seconds.
He uses his last charge to calldown a SCV. He now has 10 workers in play, which means that the cooldown for the next charge will immediately be increased to 25 seconds. (IF that is even possible..)
I attach the modified trigger here.
More thoughts or ideas for potential workarounds? I really would need this to work as smooth as possible : /
Try this:
Duplicate your calldown ability so you have three of it, but give each of them different cooldowns. Put three buttons on the command card for them, but in the same spot. Make three requirements that return true for the different numbers of SCVs you want. Put these tests under the Show section of the requirements. Then make each ability use the requirement that you want it to have.
EDIT: There are also effects that can change cooldowns. (Modify Unit I think.) You could try those too.
Thanks for an interesting suggestion! I do unfortunately think there are two problems with this approach:
1. Lets say that I have 4 charges on my Calldown SCV ability. I have 9 workers in play, which means that the cooldown of the ability is 20 seconds. I calldown one SCV, which makes me have 10 workers in play. BAM! The ability is now switched to a new Calldown SCV ability, which has cooldown 25 seconds. All the charges that I had saved up are now removed. (Since the ability is replaced)
2. I have one charge left on Calldown SCV. I have 9 workers in play, which means that the cooldown of the ability is 20 seconds. I use the last charge to calldown one SCV. The ability is now switched to another ability that has a slower cooldown. I will now be able to calldown another SCV immediately. (One SCV from the first version of Calldown SCV, which gives me 10 workers. This swaps Calldown SCV to the second version, which gives me a new worker immediately.) This might be fixable, if "Time - Start" works to give the ability a cooldown from start, as soon as it is applied.
Preferably, it should work like this:
Calldown worker #8 - wait 20 seconds.
Calldown worker #9 - wait 20 seconds.
Calldown worker #10 - wait 25 seconds.
Calldown worker #11 - wait 25 seconds.
Etc.. (And the same would happen if a player loses workers)
I will experiment in the editor.
More thoughts on this matter?
Oh shoot, I didn't even think of that.
Another possibility is what I mentioned. Modify Unit effects to add-subtract from the cooldown of that ability. But to get a consistent cooldown graphic, I think you'd have to apply the effect at the precise moment that the ability is used.
I've never tried this myself though, so you'll have to investigate Modify Unit effects yourself.
I'm also not sure which way it works. I don't know whether it temporarily modifies the cooldown one time, or permanently modifies it for that ability. You'll have to test.
I have found an action called "Add charge regen time for unit ability", that seems interesting to use for a trigger. The description of the actions is: "Adds to the amount of time it takes to regenerate the specified ability charge link."
I attach a very shitty version of two triggers I have modified for this, down below. I know that it is not correct, but I am unsure how to proceed. It obviously needs to work as smooth as possible
Any thoughts?