Requirement for custom Attack ability

Editor Discussion
Hi. I've been trying to recreate the Tunneling Jaws upgrade and I'm glad everything that it needs shipped with the game, from upgrade icon to Baneling's walk animation when burrowed. But there is one detail away from calling it perfect: The attack button.

As it is with the Roach a custom Stop ability with a requirement was needed to hide the button until the upgrade is completed, and it works fine. The same requirement, however, doesn't work as expected for a custom Attack ability. Without the requirement the button is always visible, which is undesirable, and with the requirement the button never appears, even after the upgrade.

I'm led to believe there is something wrong in the Attack ability itself, not anything I can see from the editor, but some underlying process, so I hope someone can help me here.
Sorry it took a while to look into this. Our QA department was able to create a custom map which reproduced the behavior you are seeing by adding an additional stop and attack ability to a custom Marine and then adding buttons for that ability. The reason this doesn't work is that a unit may only have one attack and one stop ability. Whichever one comes second will be ignored and its commands (and requirements) will reference the instance that does exist on the unit. The code showing the tooltip is referencing the command card data not what ability is actually on the unit, so that's why the tooltip seems to show the requirement but the button is still available.

Supporting multiple attack and stop abilities per unit is not something we want to do, so I suggest just removing whichever one does not have your custom requirements.
Hi Tyrran, thank you for looking into this, but that isn't my case. The burrowed Baneling has one stop and one attack ability, and these are the custom versions I created. The stop ability works as it should, but the attack ability, using the same requirement, never appears in the command card.

I made additional tests today, because I thought it could be a problem with the weapon, as I disabled it by default and enabled it through the same upgrade used in the requirements. But that isn't the problem, setting the weapon to enabled by default changes nothing.

It seems your tests missed something. Here is a more detailed setup for new tests: Give the unit a dummy weapon like the baneling has, then give it one or more hidden weapons, then make the unit use an attack ability that is unlocked by an upgrade. I can't think of other details that might be relevant here.

I may try to replicate your tests later.
Units which morph share abilities with the other forms that they can morph to. This means that if the normal and burrowed Baneling units have different attack or stop abilities, we will just pick one.

This is something that is totally hidden to modders and we need to either communicate better or if possible find an alternative that doesn't require this. I think it would be pretty straight forward to permit multiple stop abilities, but permitting multiple attack abilities could require a lot of work.

If it's possible to assign the same attack for all forms of the unit I would suggest that approach.
Thank you, I didn't know that, and I believe most have no idea the abilities are shared. It is a good idea to communicate that and explain what are the most common consequences.

Ok, I can assign the standard attack ability, then enable the weapons through the upgrade.

Join the Conversation

Return to Forum