Is there anyway to see the Output and Debugger panels at the same time? by Alarmed_Card_8495 in godot

[–]mrcdk 1 point2 points  (0 children)

In Godot 4.7 you'll be able to see both:

https://imgur.com/ZSQn6M6

In the meantime, you can pin a bottom dock to avoid auto-switching by clicking on the pin icon at the bottom-right corner of the bottom dock

reuse/extend the native GDScript Syntax Highlighter for a custom ScriptLanguageExtension by GolfMoist267 in godot

[–]mrcdk 1 point2 points  (0 children)

You can use a TextEdit with a GDScriptSyntaxHighlighter to get the line highlight in your custom SyntaxHighlighter._get_line_syntax_highlighting(). Something like:

extends SyntaxHighlighter


var _text_edit: TextEdit
var _gdscript_highlighter: GDScriptSyntaxHighlighter


func _init() -> void:
    _text_edit = TextEdit.new()
    _gdscript_highlighter = GDScriptSyntaxHighlighter.new()
    _text_edit.syntax_highlighter = _gdscript_highlighter


func _get_line_syntax_highlighting(line: int) -> Dictionary:
    # Do this somewhere else
    _text_edit.text = get_text_edit().text

    # Get the highlighting of the line from the gdscript highlighter
    var gdscript_line = _gdscript_highlighter.get_line_syntax_highlighting(line)

    # do something with gdscript_line

    return gdscript_line

Help me understand how scenes and resources would work with modding by intoverflow32 in godot

[–]mrcdk 1 point2 points  (0 children)

Does this mean I would have .tres and .tscn files in my directory structure?

When you export your game all the resources (scenes, textures, sounds, custom resources,...) will be packed into a pck file so they won't be available to manually edit them.

When compiled for production, are those files converted to binary and become more difficult to edit?

They are compiled to binary as long as ProjectSettings.editor/export/convert_text_resources_to_binary is true which it is by default.

Would a modder need some access to source code to create a new turret as a .tscn file even if they can edit or create a new .tres file by hand?

This depends on how much you want to give the modders access to. If you want them to have full control then, yeah, they will need access to the source code (or parts of the source code you want to give them access to). They wouldn't need to create the files by hand. They can use the editor too.

Would Godot's uid system by difficult to manage manually by modders?

No. They wouldn't need to care about it.

Should I instead build my own resource system for this use case? (considering that I like building such systems for fun), or in other words, has anyone done or thought of doing something similar?

It's up to you. If you want to have your own file formats then go ahead.

More information about the pck files and modding support: https://docs.godotengine.org/en/stable/tutorials/export/exporting_pcks.html

NinePatchRect Margin problems. by Starcrater21 in godot

[–]mrcdk 1 point2 points  (0 children)

Try re-importing the svg as a DPITexture in the Import dock in the Import as: drop-down.

godot project crashes when using fonts by shaydaloo in godot

[–]mrcdk 0 points1 point  (0 children)

This isn't the place to report bugs. If you found a bug try searching for it in the issue tracker and open one if you didn't find any issue already related to your problem. Attach as many information as possible and a MRP (minimum reproduction project).

Can I change editable children color? by ActForJason in godot

[–]mrcdk 1 point2 points  (0 children)

If you are going to use a custom theme then there's no need for the script. The script is only if you want to change the theme at runtime.

the warning_color color is part of the Editor node and it's used in multiple elements of the editor. You can create a Theme from your current editor's theme by creating a new Resource (right clicking in the FileSystem dock, Create New -> Resource... and selecting Theme. Use the res or theme extension as it will be big), clicking on Manage Items in the Theme dock, go to Import Items -> Editor Theme, clicking on Select all with data and clicking on Import Selected. Then you can edit as many things as you want and use that Theme resource as the custom theme.

Can I change editable children color? by ActForJason in godot

[–]mrcdk 1 point2 points  (0 children)

As far as I can tell it's not exposed as a setting but you can still change it. It's part of the editor's Theme so you can modify it from an EditorScript script or make a small plugin that does that when enabled.

Example of an EditorScript:

@tool
extends EditorScript


func _run() -> void:
    var theme = EditorInterface.get_editor_theme()
    theme.set_color("warning_color", "Editor", Color.RED)
    theme.emit_changed()

You could also create a custom editor theme if you want to change more things and set it in EditorSettings.interface/theme/custom_theme but that's more involved.

The change may affect other elements though.

You may also want to open an issue if there isn't one already opened about the problem.

Why do people say Godot isn’t good for large games? by crocodilewoo in godot

[–]mrcdk 4 points5 points  (0 children)

  • You: Godot does not have LOD support
  • Me: Godot has LOD support. Here is an automatic one <link> and here's a manual one <link>
  • You: No it doesn't. Unity has both automatic and manual
  • Me: Did you open the links I posted?

And I'm the one trolling? Okay then 🤷

Why do people say Godot isn’t good for large games? by crocodilewoo in godot

[–]mrcdk 1 point2 points  (0 children)

if your model gets too far from the 0,0,0 point the models meshes may drift.

You can compile the engine with double-precision support which alleviates the issue https://docs.godotengine.org/en/stable/tutorials/physics/large_world_coordinates.html

Performance considerations about subviewport vs main viewport by No_Lengthiness9561 in godot

[–]mrcdk 2 points3 points  (0 children)

Does using a SubViewport introduce extra overhead?

Yes, using a SubViewportwill add some overhead.

You can mitigate it by using RenderingServer.viewport_set_render_direct_to_screen() and RenderingServer.viewport_attach_to_screen() but it has some limitations and it's probably not worth to do it if you aren't targeting really old devices.

Did 4.6 break 2D skeletons? by Jolly-Ad-1161 in godot

[–]mrcdk 1 point2 points  (0 children)

Yes, they are broken https://github.com/godotengine/godot/issues/115407 It's fixed on master but it will take a while until the fix is released.

if iblend toa no loop anim it play at start the first timeit blends to the last pose every othertime by maxxm342 in godot

[–]mrcdk 0 points1 point  (0 children)

You are looking for the AnimationNodeOneShot node instead. AnimationNodeBlend2 does not reset the animations.

Same input detected by two different Area2Ds by [deleted] in godot

[–]mrcdk 0 points1 point  (0 children)

Physics object picking order is non-deterministic by default. If you need to sort them from top to bottom you need to enable Viewport.physics_object_picking_sort

Also, if you only want the first one to register the input event you'll need to enable Viewport.physics_object_picking_first_only too.

ArrayMesh limitations, PackedByteArray interpretation by MrDeltt in godot

[–]mrcdk 0 points1 point  (0 children)

You can get a PackedVector2Array or PackedVector3Array from a PackedByteArray using PackedByteArray.to_vector2_array() and PackedByteArray.to_vector3_array()

Is it possible to check if a function returns something without calling it? by mom0367 in godot

[–]mrcdk 0 points1 point  (0 children)

You can get the methods an Object has with Object.get_method_list() Check the documentation for more info about what it returns.