Inquiry on advanced GDScript chicanery

Godot Version

4.7.2

TLDR

GraphEdit sucks to code for. I am not normal about coding. Please send advanced GDScript knowledge so I can continue to find more ways to put the square in the circle hole.

I love coding. I have managed to spend upwards of 18 hours a day exclusively coding a plugin because I just enjoy coding that much. I have also pulled an all nighter just trying to add in RegEx because I thought it would be useful, only to remove it because it really was not helping at all.

I feel like the hardest part of improving at working with Godot is when you get to the point that you can be considered good at it. At that point, it can be impossible to find an issue because when I am asking about say “how to not execute @tool scripts in the scene editor, but edit it inside a main panel plugin” I get results talking about @tool scripts, and nothing about what I search. I’ve had to read the source code to debug several times at this point, and I feel I am doing something wrong. I feel it is a good thing there is a lot of beginner tutorials out there but for people who need help figuring a solution to a complex problem tangentially related to a wider topic, it seems impossible to find anything on it, even in documentation.

For example, GraphEdit’s description for the “scroll_offset” property is “The scroll offset”. I had an issue with no tutorials, no documentation, no forum posts on a bug I had involving this property, which I had been debugging for 6 hours at that point. Safe to say, when I read that I almost threw my wardrobe across the room.

It also took me 5 entire days of nonstop searching, just to find a single forum post which had the solution to that issue.

Question.

So the question is, are there any good ways to go about learning when there only seems to be tutorials on stuff I already know like the back of my hand? I have already used _get_property_list() and the sort to dynamically change properties based on the input and output slot’s available to a GraphNode, and have it hold unique properties based on what type it is.

Anything is appreciated even if it’s simple. I am mostly self taught so I may have missed a few things learning.

FYI: I don’t use C++ or C# but I would say I enjoy GDScript due to it’s insanely good iteration speed, and general ease of use and integration. I am very open to using C++ if it allows me to add small extensions to the editor or to open the door to more flexibility in plugin development.

Yeah GraphEdit is complex and the way GraphNodes connect is hard to figure out, I’ve had success making visualizers with it, but I don’t want to try making an editor.


Talking about it helps, having specific problems means statistically less people will have a solution. If you make posts about it then maybe the next unlucky fellow will stumble upon your solution. Maybe someone will give back the same way and your next unlucky day will be solved. We only really have community, standing on the shoulders of giants.

Sometimes it feels like a specific problem but the real issue is being masked by others, like we get a ton of issues from globals/autoloads being added as a Script instead of a Scene so none of the global’s children exist. This presents as several different errors, none of which mention “global” or “autoload.” I’m sure you know this though, and often enough are in unique scenarios.

I agree it’s tough and often also find myself digging through the engine’s source code, sometimes it’s just a bug or missing feature, one of these days I’ll make a pull request.

GDExtension doesn’t really add or expose new features, just a compiled way to interface with the engine. You can use other compiled languages than C++ as well.

I mean this example doesnt really pertain to getting better at gdscript. And the solution is easy. Dont open a scene with the tooled script, just open the script frome the Scripting main panel. ( Or ctrl+p and search for the name of the script.)

When it comes to understanding how to work in the plugin world reading the source code is never a bad idea. Since you already have the ability to navigate and read to debug the source code, just go deeper into your problem area and read how the whole editor is just a collection scenes of them selfs. Seek out other open source plugins on github. Must plugins have links to github.

Reading code is as good as being able to write code.

Regarding the tool script thing, having given it some thought, I genuinely do not know why I struggled with that. Despite it being something that may become an issue, I realize all I really was doing is bug-fixing in advance for something that may not even be an issue. Despite 5 years of coding a few bad habits keep rearing their ugly head from time to time.

I also have actually taken to checking out some plugins I already use a lot like YARD. I am suprised by how much I still have to learn frankly. I never knew I could just import a GDScript file and stuff from it without it extending anything. Usually I explore docs when I can but I need to set aside to fully focus on reading stuff on the variant classes and such. As for reading C++ code, usually I do this off error message links, but I may as well start reading through the classes.

Thanks!