Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

franklygeorge

3
Posts
1
Topics
1
Followers
10
Following
A member registered Mar 04, 2020

Recent community posts

(1 edit)

So in testing your custom lint function I have found two major issues that would affect my workflow greatly.

1. Your custom linter closes the game each time it is ran. Ren'Py's built in linter can be ran with the game open. Which is great for fast refactoring when paired with Ren'Py's auto reload feature.

2. Your custom linter doesn't run any other custom lint functions. One of the other custom lint functions I use is the amazing Word Counter + by Kigyo. When using your linter his never runs.

Copies of the two different lints for comparison:

custom_lint.txt:

Ren'Py 8.1.3.23091805 lint report, generated at: Sun Dec 31 09:57:04 2023
Statistics:
The game contains 275 dialogue blocks, containing 4,611 words and 24,964
characters, for an average of 16.8 words and 91 characters per block.
The game contains 9 menus, 0 images, and 27 screens.
The game contains 9 inline conditions.
The game contains 1 inline Python expressions.
Lint is not a substitute for thorough testing. Remember to update Ren'Py
before releasing. New releases fix bugs and improve compatibility.

lint.txt [built in lint using my patch]:

Ren'Py 8.1.3.23091805 lint report, generated at: Sun Dec 31 10:02:05 2023
Character statistics:
 * narrator has 189 blocks of dialogue, and 3,646 words.
 * mc has 34 blocks of dialogue, and 266 words.
 * npc1 has 27 blocks of dialogue, and 466 words.
 * npc2 has 10 blocks of dialogue, and 103 words.
 * npc3 has 8 blocks of dialogue, and 68 words.
 * npc4 has 7 blocks of dialogue, and 71 words.
File statistics:
 * [script.rpy] contains 275 dialogue blocks and 4,620 words.
Detailed File statistics:
[script.rpy] contains 275 dialogue blocks and 4,620 words:
 * narrator has 189 blocks of dialogue, and 3,646 words.
 * mc has 34 blocks of dialogue, and 266 words.
 * npc1 has 27 blocks of dialogue, and 466 words.
 * npc2 has 10 blocks of dialogue, and 103 words.
 * npc3 has 8 blocks of dialogue, and 68 words.
 * npc4 has 7 blocks of dialogue, and 71 words.
Menu statistics:
The game has 9 menus, with a total of 36 possible choices, 
for an average of 4.00 choices per menu.
Statistics:
The game contains 275 dialogue blocks, containing 4,620 words and 24,919
characters, for an average of 16.8 words and 91 characters per block.
The game contains 9 menus, 0 images, and 27 screens.
The game contains 9 inline conditions.
The game contains 1 inline Python expressions.
Lint is not a substitute for thorough testing. Remember to update Ren'Py
before releasing. New releases fix bugs and improve compatibility.


Until these two functions have feature parity I seen no reason why I wouldn't prefer my method over the original.

Ah, I was just blind and missed the part about still using the built-in linter in the readme. Testing it out now.

(1 edit)

If you like to use Ren'Py's built in linter like me then these lint errors start to get annoying fast. So I am glad to provide a simple 8 step solution for you guys.


These operations were performed on Ren'Py 8.1.3, your version may vary. If you break your launcher without having a backup to restore from, that's your problem not mine. Do this at your own risk (If you make a backup first you should be completely fine).


1. Inside of your Ren'Py launcher folder find renpy/text/extras.py

2. I suggest making a backup just in case. Copying extras.py to extras.py.bac should do.

3. Open extras.py in your preferred code/text editor.

4. Find:

        if text not in all_tags:

            return "Text tag '%s' is not known." % text


In my case it's on line 117 (If not Ctrl+F is your friend)


5. Replace lines 117 and 118 with:

        if text not in all_tags:

            if text.startswith("if "):

                continue

            elif text.startswith("elif "):

                continue

            return "Text tag '%s' is not known." % text


6. Restart the Ren'Py launcher.

7. Lint your project in peace.

8. Profit???


It would be nice if Feniks or someone else could figure out a way to implement this via a one time patch script.