What I am building is not a story or a game, and I'd like for there to be no chance of confusion when users see error messages such as "Apologies. This story requires a less obsolescent web browser" or "Save is missing the required game data". What is the best-practices way of replacing these references w/o resorting to editing the HTML file after building?
Comments
One is the header file. Code.js if you're using vanilla headers, header.html if you're using Sugarcube.
I believe you're also going to have to change engine.js in the Twine directory. If I were going to do this I'd make a backup (engine.js.old) and do a find replace for game and story with notepad++ or something. Make sure not to accidentally change the word history by accident.
I THINK that would be all there is to it, but I can't be too sure without trying.
I don't use Twine (I'm using Twee); I don't think that there is a file comparable to engine.js. I may have to switch to Twine eventually though (I doubt my colleagues would be willing to use a text editor); does engine.js really include messages that wouldn't be seen in a Twee game?
But yes, this is from engine.js. You may recognize it if you've ever worked with Twine and custom Macros. If any Twine/Sugarcube programmers are listening, I too would support a custom variable for something like this. Set a game variable in the beginning to a default (story) and be able to change it with something like $projecttype.
Thanks for confirming!
"There is a technical problem with this [story]" - error on script passage parsing
"Sorry to interrupt, but this [story]'s code has got itself in a mess" - error during in-progress game
"This [story] requires a newer web browser. Sorry." - error on IE7 (or any browser that doesn't support JSON or querySelector)
"NOTE: This [story]'s HTML file contains embedded images that may be too large for this browser to display." - error on IE8 when images are used.
"NOTE: The [story] contains a function that patches History.prototype.display, but takes the wrong number of arguments."
"Are you sure you want to restart this [story]?"
"Your browser couldn't save the state of the [story]."
By default it's set to "game".