I’m not an expert in gdscript/godot, but here is what I presume:
_ready being a “core” function acts similarly as a constructor. Typically (at least with a language like c++), when a new object is created, the most-parent constructor is called first, to make sure that the object is constructed when the child classes’ constructor is called. The child not yet being constructed, if the function
foo is called in the parent’s constructor, it’s the parent class’s
foo that will be called.
Although we have similarities here, it’s not exactly the same.
_ready being a utility function, it will be called in order of the most parent’s to the most child by the framework, making sure that what’s “initialized” in the parents is initialized for the children–just like a constructor. However, unlike it would be the case in a constructor, all the objects having already been created, the “most overridden” function
foo will hide all those that have been defined its ancestors.
Taking a look at the source code, there are multiple occurrences where a “child”
_Ready() will call it’s
base._Ready() as the first thing it does, so it appears this is consistent with the theory.
How to know if an overriden method calls its super method or not?
It’s probably safe to say that the “top ancestor” will have it’s
_ready function called first, down to the “most overridden”
_ready function. This behaviour will likely be the same for
_init, although I have not found anything relevant about it.
For the other cases, the normal “hiding” will be done, and you’ll call the the “most overridden”