/godot-cheatsheet

A debug console your Godot game

Primary LanguageGDScriptMIT LicenseMIT

Cheatsheet

A debug console for your Godot game.

console

Features

  • Debug console with text based input.
  • Adding custom commands with arguments.
  • A help menu that lists all of the available commands and how to use them.
  • History!
  • An overlay to show performance stats.
  • Some kinda neat looking animations?

Things on the roadmap

  • A controller friendly command palette with inputs.
  • More QoL updates.

How to...

...add custom commands

# register a command called 'echo' that executes a callable
Console.register('echo',
	func(text: String):
		Console.println('%s... %s...' % [text, text.to_lower()]
).arg('text', TYPE_STRING)\ # add an argument to this command
	.info('echo a string of text in a creepy way...')

The \ at the end of arg allows for us to continue calling functions on a new line.

The echo command is called like so:

$ echo Testing123
$ echo '...Or if you\'re wanting to have spaces.'

Sorry for the strange sentence. I wanted to demonstrate how to escape 's.

...change the key to toggle the console

Open the cheatsheet.tscn in res://addons/cheatsheet/ and edit the toggle_shortcut property to whatever you want.

Links

Godot Asset Library Listing | Github Repo | Issue Tracker