Are there text-based online roleplaying games which can be used for practicing Chinese writing?
I have been interested in table-top role-playing games since I was ten and ever since I started teaching Chinese, i've been interested in finding ways of combining the two. While my answer does not fully satisfy your wishes, I believe it might be as close as you are likely to get.

Together with Kevin Bullaughey, I have created a series of text games over at WordSwing, specifically aimed at students of Chinese. They work on the simple basis of presenting text describing setting, actions and dialogue, followed by a number of choices you can make as a player. This would qualify as a role-playing game since you assume the role of the main character in the story. It's akin to choose-your-own-adventure games, but since it's custom-built, there are lots of things we can do that can't be done in a standard interface (such as built in resource handling, options that are hidden, change or appear depending on other things happening in the game). We also provide recorded audio synced with the text (you can even play in audio-only mode, but I know you asked about writing).



These are several ways these can be said to be for students. First, the text is deliberately kept at a certain level, avoiding difficult language and keeping to common words and easy grammar. Second, choices are meant to actively probe your reading ability. You can't just click on random options and expect to make it to the end, because many choices are outright stupid if you read and understand what's going on.

This is focused on reading, not writing, which is why it doesn't fully answer your question. We did discuss having typed input similar to old-school DOS adventure games such as King's Quest, but we decided this was too hard to implement well and that clever multiple-choice implementation would be more practical and maybe also better.

The first game we created, 逃出去 (Escape) can be played in its entirety for free, so it's easy to check it out and see what you think. You can play in your browser or download the WordSwing app for Android or iOS.

Disclosure: As I said in the second paragraph, I'm recommending my own product here, although 逃出去 (Escape) is available for free. There might be other games out there that come closer to answering the question at hand, but if so, I haven't seen them.