ArchipelagoMW-HollowKnight / Archipelago.HollowKnight

Hollow Knight mod enabling Archipelago multiworld interoperability.
MIT License
5 stars 10 forks source link

Add in-game chat UI for Archipelago messaging. #93

Open Ijwu opened 2 years ago

Ijwu commented 2 years ago

Consider using HKMP as a starting point/example. It would be a good idea to have an in-game UI for chat/archipelago messages which also enables sending messages to the server. This will prevent the need for HK players to need to use the TextClient alongside the game.

dewiniaid commented 2 years ago

Some big challenges with this:

Text input in Unity is often messy. I've seen multiple cases when typing in one place (i.e. a C# REPL console) would trigger commands elsewhere (great fun when I had "K" set to "Kill Hero" in Debug Mod).

Benchwarp has a keyboard shortcuts feature which allows you to warp to specific benches by using two-letter combinations while the game is paused if enabled (e.g. FC => Forgotten Crossroads stag). It needs to not trigger when typing commands in chat.

Keyboard players need to not have chat be inadvertently triggered by playing the game, or game actions triggered while in chat.

BadMagic100 commented 1 year ago

If you wanted the really easy route to this and are not concerned with taking dependencies, I just released a mod called ModTerminal which deals with all of these concerns and has support for handling commands provided by other mods. There are compelling reasons you may not want to go this route though (e.g. the key binding for toggling open the terminal is handled by taking a dependency on debug, and there are some debug commands included as well).

If you wanted a less easy route, ModTerminal uses MagicUI for text input and output, which does a good job of making the text input less awful. ModTerminal is MIT-licensed on my GitHub, so one could copy-paste most of the fiddly bits including UI creation and locking debug and benchwarp hotkeys