NewHorizonsCoreMod icon indicating copy to clipboard operation
NewHorizonsCoreMod copied to clipboard

Added `/wiki` chat command.

Open AbdielKavash opened this issue 1 year ago • 4 comments

The /wiki chat command allows the player to instantly access the GTNH wiki from the game, and search for specific topics (for example, information about blocks or game features).

Planned options:

  • [x] /wiki - Opens the wiki main page.
  • [x] /wiki <topic> - Searches the wiki for the specified topic. For example, /wiki EBF takes you to https://wiki.gtnewhorizons.com/wiki/Electric_Blast_Furnace.
  • [ ] /wiki hand - Searches the wiki for the item currently held in the player's hand.
  • [ ] /wiki block - Searches the wiki for the block the player is currently looking at.
  • [ ] Enable/disable command via config.
  • [ ] Read URLs for search from config (let's say someone wants to use this is a different pack)
  • [ ] Sanitize inputs better for characters not valid in URLs.

First two variants are already implemented; the other two are WIP. Any comments/feedback/suggestions are welcome.

Wiki page is open in the player's default browser. The command respects the "Prompt on links" option from vanilla.

https://github.com/user-attachments/assets/1511870e-2b99-4de5-82b4-c2bc937d6cbf

AbdielKavash avatar Oct 09 '24 12:10 AbdielKavash

also you need to think about adding tabcompletion options so that it's easier to use and we can see everything that's available

Alexdoru avatar Oct 09 '24 13:10 Alexdoru

Looks like a nice addition to the wiki!

OlliedeLeeuw avatar Oct 09 '24 15:10 OlliedeLeeuw

Looks like a nice addition to the wiki!

One of my goals is to encourage a positive feedback loop: players will have easier access to the wiki, they will see articles that are missing or incomplete or outdated, complain about them on discord, which gives us a chance to fix the wiki. Everyone wins!

AbdielKavash avatar Oct 10 '24 08:10 AbdielKavash

The more options you add for the command, the higher likelihood of the player stumbling upon more and more pages that don't exist. Having the options is nice, but I'm still not sure about the expectation of /wiki hand or /wiki block returning an empty page most of the time.

Steelux8 avatar Oct 10 '24 13:10 Steelux8

Permitted to close by @AbdielKavash , they will likely redo this if decided to implement in the future.

UltraProdigy avatar Dec 16 '25 22:12 UltraProdigy