Tutorial Newbie guide to spellchecking US-English for RenPy games using the atom.io editor

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,548
2,161
... and when I say "newbie"... I mean me, obviously.

Spellchecking isn't happening.

One thing I've realized since joining F95zone is that a lot of developers don't spellcheck their own games.
I'm guessing it's because their editor of choice doesn't spell check Ren'Py code and exporting it, running it through something like GoogleDocs or MSWord and then putting the corrections back into their code is too much like hard work.

But it doesn't need to be.
This is intended to be a quick guide to using the Atom editor to do all the heavy lifting for you.

It doesn't make up for a good proof-reader and lots of testing... but it can get rid of 90% of the knucklehead stuff before anyone else sees it.

Edit: I've included a replacement default configuration file for Atom... details at the end of this post.


Spellchecking isn't hard.

RenPy's recommended editor is . When you install the RenPy SDK these days, it vigorously suggests using it. And it is great... because it's practically the Swiss army knife of editors.
... and it includes a spell checker by default.

Don't want to use Atom? Fine. Your choice. This guide isn't for you.
You prefer a different editor? Cool... Go write your own damned guide.


Getting atom.io to recognize RenPy code.

If you haven't already... install the package that lets atom.io recognise the syntax of RenPy code.
Edit: If you pick "Atom" from the default editor list on the RenPy launcher's preferences page... it will come with the RenPy language already installed.

File -> Settings -> Install-> search for "renpy" -> Install language-renpy

Good news: Now when you open .rpy files in Atom... it'll do all sorts of stuff to help you out.


Tweaking some of the language-renpy settings.

These are, of course, all personal preferences.

To get into the settings for the language-renpy package go into the following menus:
File -> Settings -> Packages -> search for "renpy" -> click on "settings" for the language-renpy package.

Preferred Line Length:
The default is 80. I prefer 140. It's about right for the "normal" game layout where 4 lines of dialogue are spoken by a character in your game.
It helps you know when your sentences are getting too long.

Tab Type:
The default is auto... change it to soft.
As you probably know by now... RenPy doesn't like tab characters. By setting this to soft, it will replace tabs with 4 spaces.

If the editor default is already soft, auto will be fine here... but to remove all doubt... set it to soft here.


Tweaking some of the other atom.io settings.

Personally, I found some of the auto-fill type behavior a bit annoying. And if you do too... that's okay... because you can switch it off.

File -> Settings -> Packages -> search for "autocomplete" -> Disable autocomplete-plus.


Switching on spellcheck for language-renpy

Now there's one slight problem... this language package doesn't automatically work with the spell checker.
But that's okay... you can switch it back on...

File -> Settings -> Packages -> search for "spell" -> click on "settings" for the spell-check package.

Under Settings, there's a subsection called "Grammars"... with a list of scopes that the spellcheck is allowed to actually spell check. It's missing the one for RenPy.
So just add ", source.renpy" to the end of the existing list.

Mine currently looks like this:
Code:
source.asciidoc, source.gfm, text.git-commit, text.plain, text.plain.null-grammar, source.rst, text.restructuredtext, source.renpy

Using US English, rather than your local language.

Let's be honest, F95zone is primarily for English language games. Not Turkish, Russian, French, German or any other language. Not just English... US English.
So since your target audience is US English... you want to spellcheck your game in US English too. Even if your local computer is Turkish, Russian, French, German or even UK English.

If you're following this guide from top to bottom... you're already at the right place. If not...
File -> Settings -> Packages -> search for "spell" -> click on "settings" for the spell-check package.

Further down the spell-check settings...

Switch on "Use Locales"
Then put "en-US" into the Locales box.
This will ensure, that no matter what language the rest of your computer is using... Atom will spell check in US English.

While you're here... also tick the Add Known Words option. Which will let you add common words you use, like "dunno", "kinda" or "FUUUUUCK" to the exceptions list, even though they aren't dictionary words.


Installing US English as a second language into Windows.

This appears to only be an issue in Windows - since the Atom's help file seems to imply other operating systems like MacOS and Linux already support multiple languages automatically.
I'm not sure how much this changes from one version of Windows to another. But for the spell checker to work in Atom... you need to use a US English language pack.

Windows 10: Settings -> Region & language -> Languages -> Add a Language -> English (United States)
Windows 7: Control Panel -> Region and Language -> Keyboards and Languages -> Install/Uninstall languages (might require Windows 7 Ultimate edition).

With Windows 10, make sure you select the option for US English typing. Win10 has different modules for different uses... like the Windows UI, typing, speech recognition, that sort of thing. Just having the language pack installed isn't enough... you need to make sure that you've already grabbed the typing portion too.

I'm less sure of the Windows 7 solution. It might be that US English is already included in any English installation. The solution wasn't obvious to me as en-US worked without me needing to add anything separately.


A reminder to be patient...

I recently had cause to remote connect to a dev's computer to do all of this. It turns out that it isn't enabled immediately, even when everything is added/installed correctly. We ended up restarting Atom a couple of times... especially after we'd added the Win10 en-US language pack. If in doubt... restart Atom.


A word of thanks...

This newbie post was primarily based on information already available on F95zone here.

Thanks to @bossapplesauce for writing it.

I sort of like the minimap package recommended there too. I actually have it switched on... but find it not quite as useful as I might have hoped.

Edit:
I'm attaching my version of the config to this guide. Only use it if you've only just installed atom.io using the "default editor" section of the RenPy launcher's preferences panel. It will switch on most of the things I've described above, without you needing to do it manually.

To apply it, start Atom and select File -> Config. It will open the editor's config.cson file. Then just copy and paste this there instead. Save it and restart Atom.
You don't have permission to view the spoiler content. Log in or register now.

Using it will replace and/or remove any other configuration you've already made (which is why I suggest only using it if you've just installed Atom) and relies on the fact that the renpy-language package is already installed (which is why I said use the launcher version, not a version installed from elsewhere). Honestly, following the guide above maybe easier... but for it's here if anyone wants it. For the more adventurous among you, you could always copy and paste it to the end and manually merge the two version (yours and mine) together.
 
Last edited:

DillionWhore

Member
Sep 30, 2018
206
125
Nice, i hope some devs make an effort.
Some devs barely know english and should realy get help to make it proper english.
The english grammar will be deadly otherwise. Literal translations, wrong order of words.
But thanks to your post they now have less excuses ;)

Maybe a nice addition to this site, a way for devs to crowdsource translations. :)
 
  • Like
Reactions: namiv
May 13, 2018
469
539
Thanks for this - there are so many games out there that would benefit from spell and grammar checks - - not to mention "MC who thinks like a mature, functioning adult" checks.
 
  • Like
Reactions: ChurryOp

L7Bear

Active Member
May 29, 2017
794
1,317
That is really useful. Thank you!

Is there a way to get to only spellcheck the dialogue?
atom is able to distinguish the code from the dialogue (and color code accordingly), but currently spell checks both code and dialogue.
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,548
2,161
Is there a way to get to only spellcheck the dialogue?
atom is able to distinguish the code from the dialogue (and color code accordingly), but currently spell checks both code and dialogue.
I did try to find out exactly that before I wrote this guide... but never got a satisfying answer from the Atom discussion forums. I came to the opinion that it's the scope that matters and since there's only one single scope for RenPy... it's impossible to differentiate between code and dialogue. I could be wrong though. I didn't really understand it then, and still don't.

I came to the opinion didn't actually matter. As long as you have all this switched on before you start writing a game... the spell checking would be done in real time. As long as the line you are currently typing is spell checked, the lines before can be easily ignored by the developer.

Checking an existing game can be a bit painful. But even so, it's not as bad as you'd think.

If you ever find a better answer, please let me know.
 
  • Like
Reactions: L7Bear

BadMustard

Active Member
Game Developer
Feb 5, 2021
956
2,830
I have been trying to switch on spellcheck for renpy in Atom and I finally found it here.
Thank you.

Now I have to find how to make the snippets work for renpy.
 
  • Like
Reactions: 79flavors

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,548
2,161
Now I have to find how to make the snippets work for renpy.

I thought they worked already, as long as you installed Atom from the RenPy Launcher options menu?
That said, I switched that sort of auto-complete off almost immediately - so perhaps I'm misunderstanding what you mean.

Aren't they enabled by default when the languge-renpy package is installed?
 

BadMustard

Active Member
Game Developer
Feb 5, 2021
956
2,830
I thought they worked already, as long as you installed Atom from the RenPy Launcher options menu?
That said, I switched that sort of auto-complete off almost immediately - so perhaps I'm misunderstanding what you mean.

Aren't they enabled by default when the languge-renpy package is installed?
If I install Atom the snippets work, if Renpy installs Atom they don't work.
I keep N++ for my system editor.
 
  • Thinking Face
Reactions: 79flavors

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,548
2,161
If I install Atom the snippets work, if Renpy installs Atom they don't work.
When RenPy installs Atom, it installs a copy of 1.35.1 portable (I think) within the RenPy folder itself.

If you install Atom yourself from their website... you're obviously installing a much newer version. So maybe that's it.

The reason is that the Atom people changed how Atom loads the list of other files in the project folder after 1.36.x (or 1.37). Apparently they were having some performance issues and their solution was not to populate the list of other files if you opened only a single file (as RenPy does). So Atom loads slightly quicker - but when you use newer versions with RenPy, it doesn't show you all the files in your project folder. Which is why the RenPy launcher still deals with the older version.
There are scripts to get around it, but they never quite worked properly when I tried them - so I settled for running the version that still actually worked how I wanted, even though it's the older version.

It could also be that the Atom packages folder is not shared across multiple versions of Atom (if you have the RenPy version and the latest version installed separately for example). So that's another place to look. I've fallen for that before.

Difficult for me to answer exactly, since I disabled that sort of functionality deliberately pretty early on.
 
  • Like
Reactions: BadMustard

BadMustard

Active Member
Game Developer
Feb 5, 2021
956
2,830
When RenPy installs Atom, it installs a copy of 1.35.1 portable (I think) within the RenPy folder itself.

If you install Atom yourself from their website... you're obviously installing a much newer version. So maybe that's it.

The reason is that the Atom people changed how Atom loads the list of other files in the project folder after 1.36.x (or 1.37). Apparently they were having some performance issues and their solution was not to populate the list of other files if you opened only a single file (as RenPy does). So Atom loads slightly quicker - but when you use newer versions with RenPy, it doesn't show you all the files in your project folder. Which is why the RenPy launcher still deals with the older version.
There are scripts to get around it, but they never quite worked properly when I tried them - so I settled for running the version that still actually worked how I wanted, even though it's the older version.

It could also be that the Atom packages folder is not shared across multiple versions of Atom (if you have the RenPy version and the latest version installed separately for example). So that's another place to look. I've fallen for that before.

Difficult for me to answer exactly, since I disabled that sort of functionality deliberately pretty early on.
Thank you. I'll keep poking at it, maybe someday or some update, and I'll get it working.