I've been working on an extended autocast system which introduces another stage after the normal autocast where this new added stage only targets heroes.
The idea is that is that it could hopefully help reduce mental load of managing casters by giving another tool in the toolbox. If you only have a few casters, having to prioritize important targets like heroes could maybe be useful, by ensuring your Hero is always buffed/healed while your enemy's Hero is always debuffed.
I've been going through many different approaches and I thought I was done implementing this week until I realized my approach with having different abilities representing different stages resulted in the icon disappearing from the command card when multiple units with different stages of the autocast were selected at the same time. But @Duckfarter came to the rescue with the info that levels of abilities can decide allowed targets, and selecting multiple units with different levels of an ability still displays the ability in the command card.
So this is what this implementation is built around, which was fairly straight forward for single units.
However group orders made it significantly more complicated as I wanted similar behavior as for normal autocast toggling, where if some units in a group have autocast toggled on and some do not, a right click only toggles the ability on for those who do not already have it on.
In this implementation this means that if a unit in a group has the Hero only autocast toggled on and some do not, right clicking the ability will result in the other units incrementing their stage of the autocast until all have the Hero only autocast toggled on, at which point the next right click will turn it off for all the units in the group.
This is just a map with a bunch units and casters and the script controlling the autocast.
How the implementation works is described in the script if you are interested.
I would love some feedback.
The idea is that is that it could hopefully help reduce mental load of managing casters by giving another tool in the toolbox. If you only have a few casters, having to prioritize important targets like heroes could maybe be useful, by ensuring your Hero is always buffed/healed while your enemy's Hero is always debuffed.
I've been going through many different approaches and I thought I was done implementing this week until I realized my approach with having different abilities representing different stages resulted in the icon disappearing from the command card when multiple units with different stages of the autocast were selected at the same time. But @Duckfarter came to the rescue with the info that levels of abilities can decide allowed targets, and selecting multiple units with different levels of an ability still displays the ability in the command card.
So this is what this implementation is built around, which was fairly straight forward for single units.
However group orders made it significantly more complicated as I wanted similar behavior as for normal autocast toggling, where if some units in a group have autocast toggled on and some do not, a right click only toggles the ability on for those who do not already have it on.
In this implementation this means that if a unit in a group has the Hero only autocast toggled on and some do not, right clicking the ability will result in the other units incrementing their stage of the autocast until all have the Hero only autocast toggled on, at which point the next right click will turn it off for all the units in the group.
This is just a map with a bunch units and casters and the script controlling the autocast.
How the implementation works is described in the script if you are interested.
I would love some feedback.
Attachments
Last edited:
