SaphireLattice / tunic-decoder

A dictionary, text recording and glyph decoder/translation tool for TUNIC game's writing
https://lunar.exchange/tunic-decoder/
7 stars 2 forks source link

Autosuggest. #7

Open Erquint opened 11 months ago

Erquint commented 11 months ago

I have a lot of largely-unlabelled words saved at the moment. Sometimes I need to re-enter one into a new text I'm writing. Finding it among the hundreds of entries in the wordlist is a fool's errand.

What I'm usually having to do is exploit the bug/feature where if I painstakingly re-enter the whole word again in the glyph constructor and try saving it — I get the toast of the word collision but it gets pushed into the text. And then the caret advances without clearing the word I input which, if unnoticed, results in clumping the next input word with the last…

Here's another thing I can do however: image Which allows me to match all words sharing one complete glyph I enter. The downside of course is that it's very manual and going lower-level than a whole glyph would take mental gymnastics.

I request the autosuggest feature of dynamically filtering the wordlist by the entered strokes in glyph constructor through bitwise-ANDing the entered word with all suitable subsets of existing words.

SaphireLattice commented 11 months ago

Search for "the word has a glyph that has these lines on" is done through using @ in the search field. Just set your input glyph and then type @ there. It will keep searching as you edit it. It will keep using only the currently edited glyph.

Use @@ for full match.

IIRC there was some way to copy a word into the glyph/word editor without manually doing it over again. But I forgot what it was, sorry.

I'll document the features above and will try to look into autocompletion stuff when I can.

Erquint commented 11 months ago

That's rather neat. Thank you!

As for copying, I think it had something to do with pushing a glyph (advancing the caret) and a second buffer but seemed rather convoluted for me to figure out.

Erquint commented 11 months ago

Oh, I seem to have figured out how to copy. What I call moving the caret moves the split between two buffers (black and red) and the red one persists through loading other words.

However, I'm now busy having an explosion of learning here, since using the @ trick you suggested quickly assisted me to crack the (slightly underwhelming) mystery of the phonetics.

SaphireLattice commented 11 months ago

Yeah, I really should add some kind of "shortcuts help" or "first start" modal that lists the keybinds and search syntax. It's a pretty limited one, but there's also a way to search for "has that many left/right segments on", etc. It's a mess made to find things just by being "close enough".

I might have focused a lot on "upper/lower" separation throughout making this tool and didn't notice the other one. So the tool reflects it a bit.

And yeah, sounds about right for the copying. I honestly don't remember what method I made up to do it, but it was something kinda obvious but not quite.