- Mar 2, 2020
- 92
- 66
Hello. As you may know, renpy has that built-in Lint thingy to check your project for potential errors.
As you may also know, it doesn't check if the file paths you've set up are correct.
Enter RenParse, a simple python script that runs through all of your .rpy's and for each path within, checks if a file exists.
If it doesn't — you'll get an .rpy file path, a line number and the line with broken path in question.
It's not 100% fail-proof and can yield funny results:
However, most of these you can tweak-out down at RenParseConfig.json generated at first launch.
How-to:
0) download the git repo release .exe or grab a main.py & run as a python script. If you're using the .py, you can figure out the rest.
1) drop RenParse.exe into your project/game folder. If you end up using any other folder I'm not responsible for your results. : )
2) The config file will be created on first launch. You can either proceed with defaults or quit & tweak at this point.
3) Push y and enjoy.
Config options explained:
"skip comments": true/false, will skip #commented out lines
"jump one directory upwards": true/false, will jump one dir upwards so that you can keep RenParse stashed into game/devtools or a similar subdir.
"misc extensions" is a list of non-image file extensions to check path-likes for. For example, if you want RenParse to also check if your .opus audio paths are correct, add ".opus".
"image extensions" is a list of image-specific extensions to check for. Reason it's split from the rest is, both "image derp = images/derp.png" and "image derp = derp.png" are valid paths to the same file for renpy, so we double-check.
"strings to skip" is a list of symbols or substrings you want to omit from the results. If your project uses some interesting python prefixes/string vars, add those here.
As a general rule of thumb, start with default & tweak till you're satisfied.
Designed to be ran after you RenPy Lint and before you build, this program won't magically fix your gig but can save you some time.
Stay thirsty. <3
As you may also know, it doesn't check if the file paths you've set up are correct.
Enter RenParse, a simple python script that runs through all of your .rpy's and for each path within, checks if a file exists.
If it doesn't — you'll get an .rpy file path, a line number and the line with broken path in question.
It's not 100% fail-proof and can yield funny results:
However, most of these you can tweak-out down at RenParseConfig.json generated at first launch.
You must be registered to see the links
How-to:
0) download the git repo release .exe or grab a main.py & run as a python script. If you're using the .py, you can figure out the rest.
1) drop RenParse.exe into your project/game folder. If you end up using any other folder I'm not responsible for your results. : )
2) The config file will be created on first launch. You can either proceed with defaults or quit & tweak at this point.
3) Push y and enjoy.
Config options explained:
"skip comments": true/false, will skip #commented out lines
"jump one directory upwards": true/false, will jump one dir upwards so that you can keep RenParse stashed into game/devtools or a similar subdir.
"misc extensions" is a list of non-image file extensions to check path-likes for. For example, if you want RenParse to also check if your .opus audio paths are correct, add ".opus".
"image extensions" is a list of image-specific extensions to check for. Reason it's split from the rest is, both "image derp = images/derp.png" and "image derp = derp.png" are valid paths to the same file for renpy, so we double-check.
"strings to skip" is a list of symbols or substrings you want to omit from the results. If your project uses some interesting python prefixes/string vars, add those here.
As a general rule of thumb, start with default & tweak till you're satisfied.
Designed to be ran after you RenPy Lint and before you build, this program won't magically fix your gig but can save you some time.
Stay thirsty. <3
Last edited: