Discuss Scratch

Catnap-e1x6
New Scratcher
1 post

How to create a random string generator based on user input and the like?

I know there's a way to do it with lists which is what I'm hoping to learn how to do… But here's what I'm talking about for those wondering. Note this example is not the project I am working on, nor will it be shared onto Scratch.

Imagine you're making a language and you want to choose random letters. Regular vocabulary generators have stuff like “C=ABCD”, “R=EFGH”, “V=IJKL”, so on. Normally people want the output to be readable English or the like. I want every possible solution.

The user would input stuff like so. The first text box (the ask-for input box) would say “Type your vocabulary string, example V=AEIOUY, or type X to continue”. The input would loop until the user types X, and then move onto “Type your randomizer string. Example: C, CR, CRV”, and then once done it would output everything through the output list.

So like if the randomizer input is “C CR CRV CVR”, it will include words like AH, BFI, CEL, and others, but also include AEI, BFJ, random words that wouldn't make much sense if you WEREN'T making a conlang. How do you do that?

My example uses this along with an LMM of Deepseek to filter out the gobbledegook and keep the words that actually make sense. I would give it (example) “output.txt” in a string, tell it the words and it would say stuff like “Oh! I see the word ‘be’, and the word ‘Bel’!”

I already know the latter part but I'm stuck on the “making-the-generator” bit…

Any help would be super duper appreciated, thank you all
2006kush2010
Scratcher
64 posts

How to create a random string generator based on user input and the like?

Do you mean something like this? https://scratch.mit.edu/projects/1145248125/
(I just shared it)

Powered by DjangoBB