Slynch Posted May 30, 2016 Posted May 30, 2016 (edited) Hello again, Fuwanovel forums! Just stopping by incase anyone is interested in a project I'm currently working on. It's a C++ parser that reads through uncompiled .rpy code and filters out all the unnecessary text, and formats the necessary parts into a plain-text file for further formatting, but the text file will work fine on a Kindle as-is. A technical wizkid can probably program a regex to do the same job, but this is much easier to pick up for the user. Please note that the software is not designed to 1:1 convert script; it is designed to cut the amount of time required to convert a script to eBook manually by roughly 66% by doing the most tedious parts for you. It still requires about an half-hours work to trim the script down to the relevant parts. I do not and cannot condone use of the software with any game you yourself do not have permission to modify/reverse-engineer. The readme on the Github should answer any questions but if you have more, feel free to ask away! The project is open-source and covered by MIT (to comply wtih Ren'Py license) for you to do as ever you like. https://github.com/Slynchy/RPY-eBook Binaries are included in the "Release" section of the Github page, although for scripts that require a bit more configuration you might need to recompile with modification to the DebugStrings code. Here's an image of a test script I ran it through: Spoiler EDIT: Removed PDF support; wasn't working out Edited June 6, 2016 by Slynch Gibberish and Chronopolis 2 Quote
Slynch Posted June 2, 2016 Author Posted June 2, 2016 If anyone's interested, I just pushed a binary release for Windows for anyone who doesn't want to compile their own code; you can find this on the releases section of the Github page. I'm currently reading Hanako's route of Katawa Shoujo from this tool, so I know it works if setup correctly! Quote
Scorp Posted June 2, 2016 Posted June 2, 2016 This would be a bunch of unreadable mess if you parse something complicated with lot of flags, like Remember11. Slynch 1 Quote
Slynch Posted June 3, 2016 Author Posted June 3, 2016 19 hours ago, Scorp said: This would be a bunch of unreadable mess if you parse something complicated with lot of flags, like Remember11. Depends on how the flags are placed into the text. Currently working on making the parser work with KEY scripts, and they have the flags preceded by a backslash, whereas with Ren'Py, most (if not all) of the flags are within {} parentheses. If the flags in Remember11 are placed within {} then the parser would work fine. But hey, won't know until it's tried! Quote
Scorp Posted June 4, 2016 Posted June 4, 2016 18 hours ago, Slynch said: Depends on how the flags are placed into the text. Currently working on making the parser work with KEY scripts, and they have the flags preceded by a backslash, whereas with Ren'Py, most (if not all) of the flags are within {} parentheses. If the flags in Remember11 are placed within {} then the parser would work fine. But hey, won't know until it's tried! I mean you want to make a book from VN, If there is complex flags, like: show text flagA+1 show text flagb+1 if flagb=30 show textA else show textB it would be not a book, but a bunch of barely connected text lines. Slynch 1 Quote
Slynch Posted June 5, 2016 Author Posted June 5, 2016 On 04/06/2016 at 11:22 AM, Scorp said: I mean you want to make a book from VN, If there is complex flags, like: show text flagA+1 show text flagb+1 if flagb=30 show textA else show textB it would be not a book, but a bunch of barely connected text lines. Oh yes, it definitely requires a bit of elbow grease first; the script needs to be trimmed to exclude content from branches you don't want (e.g. remove textB if you want to keep textA). But it's a 20 minute job, depending on the complexity Although, you say "you want to make a book from VN", but as I said I already have; I am actively reading an arc from Katawa Shoujo from an output produced by this tool, so I know it works (if the elbow grease is applied... ). The tool isn't necessarily designed to 1:1 convert it (although I did prototype a version that could, albeit poorly) but is designed to help convert it. God knows how long it would take to manually extract lines of dialogue and format them into a readable format, even with a decent regex; this tool was made to heavily reduce this time KEY scripts are a pain in the butthole, though. Whereas with Ren'Py there's an indicator as to where dialogue jumps to based on decisions, KEY scripts do not; they are just simply lines of strings, and the only indication of where the dialogue jumps to is if there is a comment that says it At any rate, I would love to make/provide presets for different Ren'Py games but because I am unsure as to the legality of this, I've made my code as "vanilla" as possible, copyright-wise. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.