GDScript: Impossible to extend built-in scripts in Godot 4.4?

Godot Version

4.4

Question

So today I clicked to attach script to a CharacterBody3D and attached the Basic Movement template script for the node.

I’ve completed the Attach Node Script Dialog, by ticking Built-in Script,
inserting Name and clicking Create button. All good and well for now.

Now that I have embedded built-in script into the scene file, I considered I want to extend it. So I click the Extend Script.

And suddenly the problem: Invalid inherited parent name or path.

This got me frustrated as I know that you can go and open scene file with a simple text editor and see all the built-in scripts, “how it is possible that Godot Engine does not have support for extending built-in scripts.”

My question:
Is it not possible to extend gdscripts that are built-in into .tscn scenes or I’m doing something incorrectly?

I don’t have an answer, but I’m curious why you would want to use a built-in script? The only reason I’ve seen people say is it makes the filesystem look tidier, but I think a well-organized filesystem is already tidy enough. I much prefer having my code be a separate file.

In particular, if a script is being inherited by other scripts, it is already not confined to a single scene, so why keep it built-in to that scene?

2 Likes

It’s easier to think in nodes. You click the node and you see the script. You don’t need to go around looking for exact script in the filesystem. That’s additional mental load and complexity to manage both for logic.

I’m all for leaving filesystem for assets, data, addons, plugins and other extensions of the core, not the basic stuff. The basic stuff should live in the nodes and composed of sub-nodes. That’s my perspective for easier management.

1 Like

This is already true, though. No matter where the script is located, once you have attached a script to a node, you can either click the “Script” header at the top, or click the script icon on the node and it immediately opens the editor to the correct script. I never have to look for a script in the filesystem, and I’ve never used a built-in script.

2 Likes

From the picture it looks like you are trying to extend a script with a scene file (.tscn).
Scripts extend from godot classes or custom classes.

1 Like