Edit of asset "Gsom Console" Accepted

Old/Current New/Edit
Title Gsom Console
Description A Half-Life 1 inspired console for Godot projects. There is an autoload singleton and optional UI.
Implements variables, commands, aliases, input, etc. See full readme on GitHub or built-in Godot docs.

Register CVARs/CMDs/actions from code:
GsomConsole.register_cvar("test", 5, "Description.")
GsomConsole.register_cmd("do_something", "Description.")
GsomConsole.register_action("jump")

This is NOT a GDScript REPL console, it uses separate syntax and rules similar to Half-Life and Quake (and Bash/CMD terminals if that makes sense).

There is a number of built-in commands - all documented in readme and in embedded help. Just a list here: greet, help, quit, mainscene, map, alias, echo, exec, find, write_cvars, write_groups, set, toggle, ifvi, ifvv, inc, dec, condump, open_user, clear, list_bound_commands, list_bind_names, bind, unbind, unbindall, toggle_console, wait.

# A short example script
gravity 10
ifvi gravity == 10 "echo gravity was 10; inc gravity"
bind quote_left toggle_console
bind w +move_up
alias +m_up "+move_up; recolor #549f16"
alias -m_up "-move_up; recolor #9f5416"
bind t +m_up
A Half-Life 1 inspired console for Godot projects.
There is a singleton and optional UI (that doesn't autoload).
It's also possible to craft your own UI instead.
Future versions may provide additional UI implementations as well.

The core idea: you have CVARs (console variables) and CMDs (commands).
You can use CVARs as global variables and settings. CMDs are like global events/signals.

Supported variable types: [code]bool, int, float, String[/code] - the variable type
is determined when it is registered with an initial value.
After that, new values are interpreted as being of that type.

[code]GsomConsole.register_cvar("test", 5, "Description.")[/code] - will register an [code]int[/code] CVAR.

● [code]test[/code] -> output 5
● [code]test 6[/code] -> now [code]test[/code] is [code]6[/code]
● [code]test 7.1[/code] -> now test is [code]7[/code] because it is [code]int[/code]

Registering commands simply declares them for future calls. The console
doesn't do anything specific per CMD call - only emits the [code]called_cmd[/code] signal.

[code]GsomConsole.register_cmd("do_something", "Description.")[/code] - will register the [code]do_something[/code] CMD.

● [code]do_something[/code] -> will emit [code]called_cmd.emit("do_something", [])[/code].
● [code]do_something abc -1 20 true 3.3[/code] -> will
emit [code]called_cmd.emit("do_something", ["abc", "-1", "20", "true", "3.3"])[/code].
Category Tools
License MIT
Repository Provider GitHub
Repository Url https://github.com/raub/gsom_console
Issues Url https://github.com/raub/gsom_console/issues
Godot version Godot 4.2
Version String 1.0.0 0.0.2
Download Commit 11048dc3fda145ac2b1e7039f20e90b79dcfd1d5 ad7af0f54f5f1dea275549a48d565aebff3893ec
Download Url (Computed) https://github.com/raub/gsom_console/archive/11048dc3fda145ac2b1e7039f20e90b79dcfd1d5.zip https://github.com/raub/gsom_console/archive/ad7af0f54f5f1dea275549a48d565aebff3893ec.zip
Icon Url https://raw.githubusercontent.com/raub/gsom_console/0.0.1/icon.png