Skip to content

In-game console for Godot 3. New version coming, see dev branch.

License

Notifications You must be signed in to change notification settings

Japortie/godot-console

 
 

Repository files navigation

All Contributors

Godot Console

In-game console for Godot, easily extensible with new commands.

Screenshot of in-game console for Godot

Features

  • Writing to console using write and writeLine method. You can use BB codes. (Also printed to engine output)

    Console.writeLine('Hello world!')

  • Auto-completion on TAB (complete command) (broken right now), Enter (complete and execute).

  • History (by default using with actions ui_up and ui_down)

  • Custom types (Filter, IntRange, FloatRange, and more...)

  • Logging

  • FuncRef support with Godot >=3.2 (command target).

Installation

  1. Clone or download this repository to your project res://addons/quentincaffeino-console folder.
  2. Enable console in Project/Addons
  3. Add new actions to Input Map: console_toggle, ui_up, ui_down

Example:

Usage we will get:

$ sayHello "Adam Smith"
Hello Adam Smith!

Function that will be called by our command:

func printHello(name = ''):
	Console.writeLine('Hello ' + name + '!')

Registering command:

func _ready():
	# 1. argument is command name
	# 2. arg. is target (target could be a funcref)
	# 3. arg. is target name (name is not required if it is the same as first arg or target is a funcref)
	Console.addCommand('sayHello', self, 'printHello')\
		.setDescription('Prints "Hello %name%!"')\
		.addArgument('name', TYPE_STRING)\
		.register()

For old method for registering commands please read this


Great thanks to @Krakean and @DmitriySalnikov for the motivation to keep improving the original console by @Calinou.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Sergei ZH

💻 💬 📖 🤔 👀

Michael Brune

️️️️♿️ 🐛

Michael Aganier

🐛

hpn332

🐛

Danil

🐛

Paul Hocker

🐛

Samantha Clarke

🐛

Hugo Locurcio

️️️️♿️

Dmitry Derbin

💬

VitexHD

🐛

hilfazer

💻

Crazy Chenz

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

License

Licensed under the MIT license, see LICENSE.md for more information.

About

In-game console for Godot 3. New version coming, see dev branch.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • GDScript 100.0%