Great tool! Thank you! I'm using twine as a first prototyping system for a visual novel and the software works great!
Twine to Ren'Py Tool
A downloadable tool for Windows
The Twine to Ren'Py tool allows you to write a simple Ren'Py game but with the visual outlining of writing in Twine. Convert a Twine html file into rpy files for your Ren'Py game project.
- Converts Twine-like choices into Ren'Py menus
- Replaces special characters and passage titles with Ren'Py safe terms
- Add custom replacement terms
- Use passage tags to break up into separate rpy files
- Includes Sugarcube demo for writing Ren'Py games in Twine
How to use:
- Unzip the directory
- Run twine_to_rpy.exe inside the twine_to_rpy directory
- Select the html file (Demo.html is included for testing) and directory to output rpy files
Curious how to set up your Twine file?
Open the Demo.html in Twine 2 to see how the file is written for tool processing.
Run into a bug?
Drop the steps to reproduce the bug in the comments.
This tool won't be closely supported in the future, but if you have a suggestion for a feature that would help you with a project feel free to let me know in the comments!
Click download now to get access to the following files:
Log in with itch.io to leave a comment.
Is there a way to get the menu option to display your text while the options are up? ie:
"What do you pick?"
"I pick 1":
jump to option1
"I pick 2":
jump to option2
in your demo needs to be
"test_character" to work properly or you get a
test character is not defined error.
[Edit: I was a dum and forgot to put the second script in the scripts section. I copied the error here, then figured it out like 10 seconds later.]
Sorry, confused by the edit—did you get this figured out or are you still seeing the error?
Yeah, I figured my 2nd part out. Thanks :) I love this tool btw.
I'm only getting started with Ren'py, but this will def help me keep my thoughts in order.
One little detail, I could'nt use the converter because can't support some latin caracter, (for example: ó)
Thanks for the heads up--I've had some difficulty implementing a proper encode/decode for special characters so I'll make a note to dig into it again in the future to see if there's a better way to handle it.
Wow! This is a really clever workaround. What I might try to do is add these characters to the hidden replace terms (which are used for the Twine to Ren'Py conversion in the first place). It's been a second since I've sat down at my computer with this script though, but it'll be slated into whenever I can manage an update for sure.
This is a great idea!
You may want to add a note about story format support. The demo is in Sugarcube. I tried it on a Harlowe file, and somethings worked well, but it didn't always translate the links in a way that made sense.
Ah, knew I was forgetting something important. Thanks for the feedback! I've added to the info that the demo is for Sugarcube, but I'll make a personal note to look into support for Harlowe in the future.
uhmmm I'm trying to load the demo, I have no idea of what I'm doing and it looks like if I try and open start.rpy inside the demo folder it will say 'directory name not valid' and won't open it. Can anyone tell me how you do that? If I had screenshots of examples, I'd really appreciate that!
This is a really strange error that sounds unrelated to the tool. From a quick search it sounds like something might be wrong with your directory or you might be having some disk errors. Where is the demo folder--are you saving it to a USB drive? If not, can you skim this list to see if any of them seem relevant?
This is so cool!
I always have trouble organizing different timelines so this really helps /~\
I'm gonna try it later!
Traceback (most recent call last):
File "twine_to_rpy\twine_to_rpy.py", line 465, in run
File "twine_to_rpy\twine_to_rpy_model.py", line 209, in run
AttributeError: 'NoneType' object has no attribute 'encode'
It does work with other simpler projects without a lot of TWINE coding (Sugarcube - variables and the like) in it. Maybe it's because I have too many passages for it to parse or some weird code (JS) I should clean out before transferring?
This tool is designed to write simple Ren'Py games in Twine (already written in Ren'Py language but using the passage jumps of Twine). It will not blanket transform any Twine game into a ready made Ren'Py VN. If you need this for a project I can take a look at the Twine html for testing, feel free to reach out to me at jbtuason/gmail. I have not tested it with any projects using JS.
Ah, that does make sense. I had a TWINE game with 498 passages. LOL. No worries. :) It is a good program though. It does work with my simpler/shorter TWINE games.
omg I'm glad to hear that! I didn't have a wide range of tests outside of our own Twine/VN so that's cool to know.
I tend to think it was the JS code I had put in it - or at least that in combination with a *high* amount of Passages that the program had to try to transcribe. Looking at the output - the code that I managed to transcribe to .rpy file was fine, so I really think It was the amount of passages or the JS code. I had an array in the StoryInit Passage which could have made the program choke or something.
Oh, this is absolutely fantastic! I have a hard time writing in Ren'py because it's just blocks and blocks of text, so being able to organize things with Twine should make things exponentially easier.
My writer had the exact same problem and found it much easier working this way. I hope it's helpful for you too!
What a nice idea ^^
Oh! This seems neat!