Auto Fill Chat System

I’m looking to create a system in which you can quickly finish off words by clicking a button that’s the completed version. Essentially, an auto fill system. I’m looking for a module, just a quick way so I don’t have to work a lot.

1 Like

I don’t know if any module for this, but overall it’s pretty simple.

Just make a table with all of your completed strings

When a player makes a change to the text you want to autofill, get the string up to the last space (or the beginning). Then go through your list of strings and put every string that matches your partial string up to that point in another table. Sort it based on how you want to prioritize the suggestions. Then just use the highest priority string(s). You can just use the first or a random one if you have no priority requirements, or if it’s a fixed priority you can manually put the strings in the priority you want.

There is plenty of room for optimization such as indexing the tables based off of letters for directly accessing the texts or sorting the strings and smartly searching, but that would be more to implement for what likely won’t gain you any noticeable performance unless you have a crazy amount of strings.

I guess but it’s just designing to GUI to go on it and it’s very difficult to adapt it to the basic chat UI

Perhaps try recategorizing this post? I feel like it would fit better on Scripting Support or Game Design Support

Did you figure it out yet? (Since im trying to do this too)