The *Impl methods get called from the activate/deactivate/cleanup methods of the parent class.
activateImpl gets called when the ability is activated - i.e. the button is pressed in the UI, or an AI decides to use the ability. deactivateImpl gets called when it's deactivated - i.e. button press, the AI deciding to stop using it, OR a conflicting ability being activated.
cleanupImpl gets called if the ability is removed from the fleet while the ability is active.
applyEffect -> what value will level take ? when is the the method called with level = 0 and with level > 0 ?
getActivationDays, getDeactivationDays -> Time it takes for the ability to activate and deactivate ? How does that relate to applyEffect and *Impl methods ?
level is [0-1]. If the activation/deactivation days are 0, then level will only ever be 0 or 1. If they're non-zero, then level will ramp up and ramp down in that time.
Basically, the flow is:
activate
activateImpl
applyEffect with level = 1 if activationDays is 0, or 0.x if it's non-instantaneous
applyEffect with level = 1 or ramping up to 1 and then staying at 1 for however long
deactivate when ability is turned off
applyEffect with level = 0 if deactivationDays is 0, or 1 if it's non-instantaneous
deactivateImpl
applyEffect with level ramping down to 0, if deactivationDays > 0
I have kind of hit a wall here, the starsector API doesn't give much details on these questions and I couldn't find any other documentation.
If you haven't already, I'd suggest looking through the code for BaseToggleAbility; all the answers are there. Another thing that could help you figure it out is to create an ability that doesn't do anything except print stuff when the calls are made, so that you know the exact order, values passed in, etc.
(But I'll be happy to answer some more questions.)