How do you change what the show stats, restart and settings buttons say?

If possible, can anyone tell me how to change the word by, play again, share with friends, etc. The reason why I want to change the names is because my book is in Spanish, and I think it would be nicer if everything was in Spanish.

Thanks :smile:

1 Like

Unless things have changed, you should be able to do it by editing the mygame’s index.html file, and search for the actual button name text (e.g. Show Stats) to change. Relevant lines should look something like this:

<p><button id="statsButton" onclick="showStats()">Show Stats</button></p>

Edit: I doubt it would be quite as easy to change such as the ‘play again’ wording as those options are generated by the *ending command (where included in your scenes, and when the game reaches the end of the last scene). However, you should be able to create your own “final choice” type of ending at any point, and use the…

Edit again :slight_smile: : *goto_scene startup command for the option where your readers choose to play again. Doing this will automatically reset all *create variable commands to their default values (etc.) and restart the game from the very beginning.


Thank you. I´ll take a look as soon as I can

1 Like

OK, I was able to change he names of the buttons for settings and achievements, but not the show stats button, or any other buttons. Please help

Hmm. If a search on ‘Show Stats’ or ‘Restart’ is coming back with ‘no match found’ or similar, then things have recently changed (probably with the addition of the ‘Menu’ button option to allow the reader to alter font size and background) and it’s likely no longer possible to actually change those buttons?

Can anyone confirm this, one way or the other?

1 Like

At one time I wanted to this but it is best to leave it be as when you get it publiahed CoG can work with you on changing those if you want.

1 Like

Some of these buttons and their names/values are now generated dynamically (usually in ui.js). You could tweak the values there, but as always, there’s no guarantee that any such modificiations will be accepted for publishing.


I have learned that it is better to leave button names alone until you publish the book. I spent a ton of time trying to change them, and ended up with a bug in the script, and it isn’t worth all the trouble, because now I would have to go through the ui.js script, which is suuuuuper long, and find it. Sooo… I’m definetely leaving it alone, and ask Choice of Games to help me when I publish the book.


Well, I am doing an interactive fiction with the ChoiceScript in my native language for a group of friends and would like to know if any way to change the button name “Show stats”

PS: Sorry for any spelling mistakes, my english is bad :’(

You’ll have to do a bit of CS modification. I’m on mobile, so what I’ll say is just a general guide. Might do a detailed one once I got back, or maybe other folks can show you the way more detailed.

Find ui.js file (directory: …/web/); open it with text editor, preferably non-default ones: Notepad++, Atom writer, etc.

Find (Ctrl + F) for the text-elements you want to translate. Save the changes

Your future compiled games should utilize the translated elements.

For reference, go here