This Randomizer connection adds every letter and number of the English alphabet to rando, with support for user-defined punctuation and foreign characters.
The letters in the UI of the game itself will not be visible until you obtain their corresponding item.
You can choose whether vowels, consonants, or numbers are separately included. A toggle also exists for dupe items.
When a letter item is obtained, text will only reflect the new letter's visibility when it next gets updated. This means that some infrequently-updated text (such as area names on the map) may not update promptly or at all. If this is an issue for you, reopening your save should force them to update.
To add custom characters, you can type the desired characters into CustomCharacters.txt, which can be found in the AlphabetRando mod folder. This file can be reloaded in-game from the mod menu.
For streamers using the Streamlabs chat box widget, AlphabetRando can filter the onscreen chat according to which letters you've obtained.
To do this, enable Twitch Integration from the connections menu, and you'll also have to add the following JavaScript to the "Custom HTML/CSS -> JS" panel in Streamlabs:
let letters = [];
const observer = new MutationObserver(function(mutations) {
for(const mutation of mutations) {
for(const node of mutation.addedNodes) {
if(!(node instanceof HTMLElement))
continue;
const message = node.querySelector(".message");
if(!message)
continue;
replaceTextNodes(message);
}
}
});
observer.observe(document.body, {
childList: true,
subtree: true
});
async function updateLetters() {
try {
const response = await fetch("http://localhost:8080/AlphabetRandoReplacements.json");
if(!response.ok)
throw new Error("Server returned " + response.status);
letters = await response.json();
}
catch(e) {
console.log("Couldn't update letters: ", e);
letters = [];
}
}
function doAlphabetFilter(message) {
for(const [key, value] of Object.entries(letters)) {
if(!value) {
message = message.replaceAll(key, "_");
}
}
return message;
}
function replaceTextNodes(element) {
const walker = document.createTreeWalker(element, NodeFilter.SHOW_TEXT);
const nodes = [];
while(walker.nextNode()) {
nodes.push(walker.currentNode);
}
for(const node of nodes) {
node.nodeValue = doAlphabetFilter(node.nodeValue);
}
}
updateLetters();
setInterval(updateLetters, 1000);- At toll locations (stags, maps, elevator pass...), item names may appear blank
- This was a patch that would previously hard-lock your game, so I guess blank is better?
- If another mod calls SetText(), the text may not be retained properly
- I spent so long trying to fix this and came up with nothing but a headache, I'm sorry
- The characters '<' and '>' are not permitted due to how the game uses them to format strings