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


#1

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:


#2

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.


#3

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


#4

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


#5

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?


#6

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.
://forum.choiceofgames.com/t/changing-the-text-of-the-show-stats-button/18941


#7

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.


#8

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.