← BACK_TO_UNDERTAKINGS

GDSCRIPT FUNCTION HELPER

a simple godot 4 plugin that helps you write functions faster by auto-completing return types and adding default return values. just write your function and hit tab.

this plugin adds the return type for you (-> void if you don't specify one), puts in default return values, keeps your parameters and types intact, and works with partial or complete function declarations.

godotgdscriptplugindeveloper toolopen source

DEFAULT RETURN VALUES

  • void functions get pass
  • bool functions get return false
  • int functions get return 0
  • float functions get return 0.0
  • String functions get return ""
  • Array functions get return []
  • Dictionary functions get return {}
  • Objects like Node get return null

HOW IT WORKS

type your function, then press Tab to complete it. the examples below show what you type and what happens after pressing Tab.

WITH COMPLETE FUNCTIONS

func do_math(value: int) -> int:
return 0

WITH INCOMPLETE FUNCTIONS

func not_done(value: int
→ press Tab
func not_done(value: int) -> void:
pass

WITH ARROWS

func arrows_are_cool() ->
→ press Tab
func arrows_are_cool() -> void:
pass

WITHOUT ARROWS

func give_string String
→ press Tab
func give_string() -> String:
return ""

PRESERVING PARAMETERS

func move_stuff(pos: vector2, speed: float
→ press Tab
func move_stuff(pos: vector2, speed: float) -> void:
pass

INSTALLATION

  1. Download the plugin

    either from the GitHub repository or the Godot Asset Library.

  2. Install in your Godot project

    extract the downloaded files into your project's addons/ folder.

  3. Enable the plugin

    in godot, go to project → project settings → plugins tab, and enable "gdscript function helper".

  4. Start coding

    open any gdscript file and start writing functions faster!

COMPATIBILITY

this plugin is designed for godot 4.x and has been tested with versions up to 4.3. it's a simple plugin focused on making function writing faster and more convenient.

if you encounter any issues, feel free to file an issue on the GitHub repository with details about what's going wrong, your Godot version, and your operating system.

DEMO VIDEO