Don't Starve Together

Don't Starve Together

27 ratings
Console++ [client version]
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
861.830 KB
Feb 19, 2022 @ 10:19am
Apr 13 @ 5:24pm
38 Change Notes ( view )

Subscribe to download
Console++ [client version]

Description
Multi-line console, scrollable client/caves/master logs, dynamic Lua word completion, and so much more.

Quick overview:
  • Full multi-line capability
    • Paste multi-line text
    • Shift+Enter starts a new line
    • Enter starts a new line if code is missing closing `]]`, `end`, etc
    • Move up and down with arrow keys
  • The console log is scrollable when the console is open
  • View master and caves logs as well
  • Ctrl+Enter runs command without closing the console
  • More word completions
  • Remote/Local will not be toggled when using key combinations
  • You can run "=2 + 3" to pretty print the expression
  • Ctrl+C copies current console contents to .../common/Don't Starve Together/mods/console_clipboard.txt. Use Ctrl+Shift+C to paste file content back to console.
  • Run `ConsolePP.Config()` to open mod configuration without having to go to mod settings and reload.
The following features apply to all text inputs; not just the console
  • Position cursor with mouse click
  • Ctrl+Backspace to delete word
  • Command + Backspace/Delete to delete line
  • Configure tab behaviour
  • Home/End keys move to start/end of line
Use the server version for these features to work outside of client-only worlds.
  • Dynamic word completions when indexing with '.' or ':'
  • Disable Server Un/Paused messages
  • Print expression results
  • c_revealmap() -- Reveals and loads entire map
  • c_revealmap(false) -- Unreveals entire map

As of version 1.5.0, Console++ is organized into highly modular feature modules. These "feature modules" are independent and contain automated tests. They can also be individually disabled and re-enabled from the mod settings. I describe most of the feature modules individually below:

Multiline console
Provides the command console with full multi-line input support. It is stylized slightly differently from the vanilla console and is able to grow and shrink with new lines. Use Shift+Enter to create a new line. Enter is also interpreted to create a new line rather than running the command if there is an unfinished Lua do/end block or similar. However, the reason most people want the multi-line input is to easily paste in multi-line blocks of code.

Dynamic Lua word completions
Provides word prediction suggestions for field names (and global variables). The feature module supports chains (ThePlayer.components.dancer.salsa.). It also currently will evaluate a function *if* it is a simple call and you're indexing the result (c_select().components.burnable.). With the client-only mod, Lua completion won't work server-side except on client-only worlds. To get Lua completion when testing on dedicated servers, install the server version of the mod.

Scrollable Logs
The in-game console log is scrollable, try it!

Shard Logs
Provides access to Master and Caves logs in addition to Client logs. As long as you are the one hosting the server and the files are stored locally, the shard logs can actually be retrieved with only the client-only version of the mod. Alternatively, if the server version of the mod is used, the logs can be retrieved from the server and sent to the client.

Evaluate as Expression
No more wrapping everything in print()! This module adds behaviour similar to what can be found in the Lua REPL. Prefix your input with an equal sign "=" and it will be evaluated as an expression rather than a block. Additionally, even without the "=" it will first try to parse the command as an expression and then only evaluate as a block if it fails. Finally, the results of commands evaluated as an expression will be pretty printed nicely.

textedit_click_to_position
Adds mouse support for text inputs. Click in the text to position the cursor.

quiet_server_pause_messages
Minor feature: disables those pesky "Server Pause" and "Server Unpaused" messages

use_last_remote_toggle
Minor feature: when opening the console, default the remote execute toggle (the "Local/Remote") to last execute command.

keep_open
Minor feature: use Ctrl+Enter to evaluate the console input without closing the console. Toggle an option in mod settings to instead keep the console open with plain Enter, and use Ctrl+Enter to run and close.

console_commands
This feature module is being considered for removal because it is kind of out of the scope of this mod. Currently provides an awesome and efficient c_revealmap() command.

text_navigation
Text navigation features: home, end, ctrl+left, ctrl+right, ctrl+backspace, etc.

pseudoclipboard
The game supports reading from the native clipboard but it does not support saving text to the operating system's clipboard. Pseudo-clipboard is an experimental feature which aims to make it easier to switch between editing a command within the game and editing it in a real text editor. In your `mods` folder you'll see a new file called `console_clipboard.lua` which contains instructions on how to use it: From the console, use Ctrl+C to copy the current console input into the file. To send the current file content back to the console, use Ctrl+Shift+C.

tab_insertion
Supports insertion and deletion of "tabs" (configurable number of spaces in mod settings).

config_screen
Run `ConsolePP.Config()` to open mod settings from anywhere without reloading.

This is the client-only version. See Full Server Version for features when working with multiple shards.

Open for contributions! https://github.com/ruuzia/dst-console-pp-mod
57 Comments
FriendlyGrass  [author] Jan 19 @ 7:52pm 
Finally, here are a few of the Windows-specific bugs and issues in the vanilla game's text input engine that I've found. In the future, I hope to alleviate the issues they cause using this mod.

1. Pressing many key combinations inserts garbage characters into the console input.
2. Entering a new line will sometimes input the characters "\r\n" (correct) or sometimes "\n\r" (incorrect). In the latter case, the text input appears as though two new lines have been created. Also, in either case, it may take two backspace presses to delete the newline, rather than one.
3. Modifier keys can get stuck, as if pressed, if they are pressed down at the moment the game window loses focus.
FriendlyGrass  [author] Jan 19 @ 7:52pm 
Hi, the issue with carriage returns being entered on Windows when running a command is fixed. However, it's possible this hasn't fixed the issue you're describing, even though I couldn't reproduce it again. The game's text input system can be finicky, but let me know if you are still experiencing issues. Also, remember, you can use Ctrl+Enter to "force-run" the command in the console (as opposed to Shift+Enter to create a new line).
FriendlyGrass  [author] Jan 19 @ 6:10am 
Sorry about the delay!! I will test on a Windows machine later today, which seems to be the source of these issues.
Aire Ayquaza Jan 12 @ 4:12am 
Hi! I have same issues as mentionned by @󰀏Niko
󰀏Niko Jan 11 @ 3:09pm 
The mod is still basically unusable. Half the time it wont let me send commands, doing line breaks instead. It only started happening after the latest update. Please fix, this mod use to be a must have for me.
󰀏Niko Jan 5 @ 12:49pm 
The mod seems to crash if sending a console command if you are not the host of the server.
FriendlyGrass  [author] Dec 28, 2024 @ 8:09am 
On a side note, has anyone tried out the pseudoclipboard feature? Do you think it is a useful feature to have?
FriendlyGrass  [author] Dec 28, 2024 @ 7:50am 
Ah, damn. In hindsight it definitely was a bit dirty of me to add the mods directory to assetpath to be able to put console_clipboard.lua, it's just that I thought it would be a much more convenient location. Perhaps I'll move it again to the data directory as you suggest.
\zs Dec 28, 2024 @ 7:21am 
i found that pseudoclipboard is incompatible with Smart Minisign (https://steamcommunity.com/sharedfiles/filedetails/?id=1595631294) . This might be a side effect of adding "../mods/" to packages.assetpath in pseudoclipboard.lua. I recommend not saving the console_clipboard.lua file in the mods directory but instead in the data directory, as I recall that this directory allows file writing with io.open.
FriendlyGrass  [author] Dec 27, 2024 @ 2:50pm 
Hi Niko, sorry I haven't been able to reproduce the issue, but I still have yet to test v1.5.0 on Windows, or MacOS for that matter, and I suspect this may be the issue. Which operating system are you on?