饥荒联机版

饥荒联机版

Console++ [client version]
57 条留言
FriendlyGrass  [作者] 1 月 19 日 下午 7:52 
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  [作者] 1 月 19 日 下午 7:52 
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  [作者] 1 月 19 日 上午 6:10 
Sorry about the delay!! I will test on a Windows machine later today, which seems to be the source of these issues.
Aire Ayquaza 1 月 12 日 上午 4:12 
Hi! I have same issues as mentionned by @󰀏Niko
󰀏Niko 1 月 11 日 下午 3:09 
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 1 月 5 日 下午 12:49 
The mod seems to crash if sending a console command if you are not the host of the server.
FriendlyGrass  [作者] 2024 年 12 月 28 日 上午 8:09 
On a side note, has anyone tried out the pseudoclipboard feature? Do you think it is a useful feature to have?
FriendlyGrass  [作者] 2024 年 12 月 28 日 上午 7:50 
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 2024 年 12 月 28 日 上午 7:21 
i found that pseudoclipboard is incompatible with Smart Minisign (https://psteamcommunity.yuanyoumao.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  [作者] 2024 年 12 月 27 日 下午 2:50 
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?
󰀏Niko 2024 年 12 月 24 日 下午 3:16 
After the latest update it seems that pressing enter will input a line break before running the command. This ruins the command if done while the cursor is in the middle of the command.
GeneralAndo 2024 年 8 月 1 日 上午 7:07 
good mod but there is still a error with unicode symbols showing when you paste a big function
∮❆Elternass❆∮ 2024 年 6 月 26 日 上午 4:01 
what component change name or description of item?
󰀏Niko 2024 年 3 月 31 日 下午 6:26 
I've been getting engine crashes when trying to open the console while working with strings that are too large for the font renderer to handle, could you make the console clip such strings to a size that wont crash the game? I don't even think strings larger than the screen size can be seen past the screen anyway.
Cliffford W. 2024 年 3 月 3 日 上午 8:16 
This seems to not be friendly with QWERTZ
Attempted to do a [ using Ctrl + Alt + F and { using Ctrl + Alt + B
It does not work
RICK 2024 年 2 月 20 日 上午 9:57 
specifically consolemodder:196
RICK 2024 年 2 月 20 日 上午 9:56 
v.1.4.9 is still broken with TheWorld being nil outside game.
FriendlyGrass  [作者] 2024 年 2 月 14 日 下午 7:40 
Oh no! Sorry things are still broken for you :(
I can't reproduce the crash, but I added the guards that should hopefully be enough resolve any problems.
󰀜瑶光󰀜 2024 年 2 月 13 日 上午 12:13 
I met another crash when I open console in-game:
[00:09:22]: [string "../mods/workshop-2758553790/main/consolemod..."]:239: attempt to index field '?' (a nil value)
LUA ERROR stack traceback:
../mods/workshop-2758553790/main/consolemodder.lua:239 in (method) PostOnBecomeActive (Lua) <204-243>
../mods/workshop-2758553790/main/consolemodder.lua:49 in (method) OnBecomeActive (Lua) <47-50>
scripts/frontend.lua:961 in (method) PushScreen (Lua) <933-966>
scripts/frontend.lua:432 in (method) OnControl (Lua) <410-474>
scripts/input.lua:165 in (method) OnControl (Lua) <162-169>
scripts/input.lua:422 in () ? (Lua) <421-423>
󰀜瑶光󰀜 2024 年 2 月 12 日 下午 7:37 
The mod is crashing when I open console on the main screen. I guess opening the console in a place where "TheWorld" is not defined leads to this crash.

Related code segment:

local function getshard()
if G.TheWorld:HasTag "forest" then

Here's the log:

[string "../mods/workshop-2758553790/main/consolemod..."]:196: attempt to index field 'TheWorld' (a nil value)
LUA ERROR stack traceback:
../mods/workshop-2758553790/main/consolemodder.lua:196 in (upvalue) getshard (Lua) <195-201>
../mods/workshop-2758553790/main/consolemodder.lua:237 in (method) PostOnBecomeActive (Lua) <204-243>
../mods/workshop-2758553790/main/consolemodder.lua:49 in (method) OnBecomeActive (Lua) <47-50>
scripts/frontend.lua:961 in (method) PushScreen (Lua) <933-966>
scripts/frontend.lua:432 in (method) OnControl (Lua) <410-474>
scripts/input.lua:165 in (method) OnControl (Lua) <162-169>
scripts/input.lua:422 in () ? (Lua) <421-423>
FriendlyGrass  [作者] 2024 年 2 月 7 日 上午 10:00 
Thanks, will fix asap.
󰀜瑶光󰀜 2024 年 2 月 5 日 上午 3:39 
@Crestwave is correct. I'm having the same problem.
󰀏Niko 2024 年 1 月 26 日 上午 11:06 
I am having the same problem as Crestwave.
Crestwave 2024 年 1 月 23 日 上午 12:01 
This mod currently crashes the game due to changes from update 590113, which moved GetConsoleHistory() under ConsoleScreenSettings and removed GetConsoleLocalRemoteHistory(), among other things.
RICK 2024 年 1 月 21 日 上午 5:02 
May you update it?
RICK 2023 年 9 月 10 日 上午 7:57 
typing a.components.floater.do_bank_swap and an enter will strangely cause a new line instead executing it. So I have to type a.components['do_bank_swap'] instead
hamurlik 2023 年 9 月 8 日 下午 7:00 
Oh and one more thing, I think this is vanilla behavior. It's the same way in the normal console. Might be asking for too much to fix a vanilla problem, but just be aware.
hamurlik 2023 年 9 月 8 日 下午 6:47 
By the way, there is a workaround to this. You could just paste the code in small batches instead of all at once. Still, would be convenient to do it all at once
hamurlik 2023 年 9 月 8 日 下午 6:20 
Incredibly useful mod. One problem though, ctrl+v'ing really long text (like a whole function) is cut off and places some non sense symbols at the end. It's "?3/4XEa" except in unicode symbols. Would it be possible to fix this?
米开langelo 2023 年 4 月 26 日 下午 11:11 
Pressing the delete key while typing will delete all characters to the left of the cursor, I don't want to do this
FriendlyGrass  [作者] 2023 年 4 月 26 日 上午 8:49 
@My Username
I'm not sure I understand what you mean. Could you explain?
FriendlyGrass  [作者] 2023 年 4 月 26 日 上午 8:48 
@Crestwave thanks, for now I've just bumped up the cut-off like you said.
米开langelo 2023 年 4 月 2 日 下午 8:48 
My Backspace btn will always remove all the left before input point.Too crazy.
米开langelo 2023 年 4 月 2 日 下午 8:37 
How can Backspace btn only delte a char?
Crestwave 2023 年 4 月 1 日 上午 12:33 
The scrollable console log width seems to be much too short by default, leading to text getting cut off. Here's a comparison between the vanilla log and the modded log; note the MOTD line:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2955770409
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2955770471

I personally find 1200 to be a much more reasonable scissor_width, but I'm not sure how universal this would be. The vanilla log uses a width of 900, but uses SetModeScale to dynamically scale.
FriendlyGrass  [作者] 2023 年 3 月 18 日 上午 9:24 
Fixed
Boogiepop210 2023 年 3 月 17 日 下午 8:00 
I got this error when copy and pasting and sometimes when typing : 00:04:57]: [string "../mods/workshop-2758553790/main/completer...."]:142: bad argument #1 to 'sub' (number expected, got nil)
LUA ERROR stack traceback:
=[C]:-1 in (method) sub (C) <-1--1>
../mods/workshop-2758553790/main/completer.lua:142 in (upvalue) forcewordprediction (Lua) <139-157>
../mods/workshop-2758553790/main/completer.lua:299 in () ? (Lua) <281-340>
=(tail call):-1 in () (tail) <-1--1>
../mods/workshop-2758553790/main/consolemodder.lua:83 in (method) RefreshPredictions (Lua) <82-85>
scripts/widgets/wordpredictionwidget.lua:227 in (method) RefreshPredictions (Lua) <224-346>
scripts/widgets/textedit.lua:228 in (method) OnTextInput (Lua) <205-240>
scripts/widgets/textedit.lua:283 in () ? (Lua) <266-327>
FriendlyGrass  [作者] 2023 年 2 月 1 日 下午 7:57 
This should be fixed (I couldn't to reproduce it exactly but added checks to ensure against a crash), thanks.
Monti 2023 年 1 月 26 日 上午 5:04 
I got a crash when clicking in the textbox and then using arrows to change the position of the cursor.
The crash log can be found here:
Crash log [pastebin.com]
RICK 2022 年 12 月 2 日 下午 7:11 
Some more suggestions:1.Do not save to history if the command repeats the previous one. 2.Increase the size of history. 3.I wish to have a text edit widget always shown, but only get focus when I click it/hover over it, and otherwise lose focus. Is this possible so that there is no need to open/close console all the time?
FriendlyGrass  [作者] 2022 年 9 月 13 日 下午 4:42 
Thanks, just submitted a fix for this now.
RICK 2022 年 9 月 13 日 上午 1:12 
playing Island Adventures, crash on Config.SHARD_LOG_COLOURS[shard], maybe you can test if Config.SHARD_LOG_COLOURS[shard]==nil(indicating neither forest nor caves) before you set colour.
FriendlyGrass  [作者] 2022 年 9 月 3 日 下午 7:15 
Thanks, @Niko.

I've changed up the current log colours and added a config for an alternative possibly less extreme theme. (This will be in the next update, in a bit.)

This mod doesn't actually currently support shard logs for real dedicated servers because I can't access their cluster folders from the client :(. A server version could theoretically fix this.

Yeah right now the primitive console log is used when the console is not open, and my scrollable, sharded console log overrides it when the console screen is open. I'll look into changing this but I think there are some technical challenges. Have you noticed the game's scrollable chat log is only used when the chat screen is opened?
󰀏Niko 2022 年 9 月 2 日 下午 1:50 
Also, a bit of a random question but does/will this mod ever support servers that have more than just 2 shards? I don't expect it to seeing as that is an amazingly niche case, but could be handy on rare occasions.
󰀏Niko 2022 年 9 月 2 日 下午 1:48 
Absolutely amazing mod! It has saved me a lot of time and headache.

The only things I can think of improve it is support for ctrl + L (Opens the normal client console instead of this mod's custom console). Oh and this is a bit of personal preference but, I would like if in the config I could tone down the harsh colors of the server/cave consoles. And this isn't as important, but maybe some proper colored inputs would be handy, such as messages that start with/contain the word "Error" be colored red instead of the white/blue/orange of the default text.
FriendlyGrass  [作者] 2022 年 8 月 30 日 上午 6:09 
Oh my! Fix coming.
Bumber 2022 年 8 月 29 日 下午 5:49 
Pressing 'c' without holding ctrl is causing stuff to be written to "psuedoclipboard.txt". (Should also be spelled "pseudo".)
RICK 2022 年 6 月 2 日 下午 5:59 
@ FriendlyGrass Here is a screenshot of the console. https://www.zzzs.ml/open_file/console.png
FriendlyGrass  [作者] 2022 年 6 月 2 日 下午 2:42 
Thanks for the suggestions!
I can't see the position issue you see with the console text box. Is it a little lower? Position is messed around with for it to vertically expand nicely in multiline.
An Undo/Redo would be good. I currently use the basic autocompletion engine that the game uses but really I should make my own. Pretty printing tables would be good but first I should make a serverside mod so that that can work on a networked world with caves. Sure I can make an option to make keeping the console open on run the default and +Ctrl to close.
> Persistent console text box
Maybe, I guess if you need to see the console input while you're moving around.

On a side note...
There's endless features that could be added to the game's console to turn it into a fully fledged editor, but wouldn't it be better to just have a little mod that hot reloads a script in your Klei save folder like customcommands.lua so you can write commands in your favorite text editor when you need it?
RICK 2022 年 5 月 30 日 上午 6:28 
@ FriendlyGrass Could you adjust the position of text box back to original? it looks out of place. Other features I dream of: word-based sentence history tracking with Ctrl+Z/Y, case-insensitive autocompletion(I see in VS Code, you type small letters to match both, and capitalized to match capitalized), pretty print table so that I do not have to use dumptable(), option for keeping console open and Ctrl to close console, persistent console text box that shows log when focused and hides log when blurred