In-game console for Godot, easily extensible with new commands.
-
Writing to console using
write
andwriteLine
method. You can use BB codes. (Also printed to engine output)Console.writeLine('Hello world!')
-
Auto-completion on(broken right now),TAB
(complete command)Enter
(complete and execute). -
History (by default using with actions
ui_up
andui_down
) -
Custom types (
Filter
,IntRange
,FloatRange
, and more...) -
FuncRef support with Godot >=3.2 (command target).
- Clone or download this repository to your project
res://addons/quentincaffeino-console
folder. - Enable console in Project/Addons
- Add new actions to Input Map:
console_toggle
,ui_up
,ui_down
$ sayHello "Adam Smith"
Hello Adam Smith!
func printHello(name = ''):
Console.writeLine('Hello ' + name + '!')
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.
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!
Licensed under the MIT license, see LICENSE.md
for more information.