Script Health & Word Count Checker

Have an idea how we can improve the engine or this forum? Share it here!
Post Reply
foleso
Posts: 3
Joined: 14 May 2020 04:32

Script Health & Word Count Checker

Post by foleso »

Right now, any errors regarding Naninovel scripts are in the console. This is fine, but it would be nice if there was a way to purely view issues with script files itself: Especially when you have 100+ script files.

Also, it would be nice to be able to see the total word count without having to constantly generate Localization.

RenPy has a feature like this called "Check Script" that generates a .txt file like this:

Code: Select all

Ren'Py 7.4.9.2142 lint report, generated at: Fri Mar 25 16:02:10 2022

Statistics:

The game contains 2 dialogue blocks, containing 21 words and 108 characters,
for an average of 10.5 words and 54 characters per block.

The game contains 0 menus, 0 images, and 29 screens.

Something like this would be very useful, maybe just a button in the menu to generate something similar. Thank you and have a great day ^_^

Elringus
admin
Posts: 521
Joined: 11 May 2020 18:03

Re: Script Health & Word Count Checker

Post by Elringus »

Hi, Not sure what is the issue with the console. It's made just for that. If you prefer text files, all the same errors/warnings are logged in the Unity's log files: https://docs.unity3d.com/Manual/LogFiles.html To log just the script-related errors, clear the console (current log file) and re-import the script assets.

Regarding word counting in the script files, I'll look into extracting the feature from the localization tool, thanks for the suggestion!

foleso
Posts: 3
Joined: 14 May 2020 04:32

Re: Script Health & Word Count Checker

Post by foleso »

Elringus wrote: 25 Mar 2022 23:31

Hi, Not sure what is the issue with the console. It's made just for that. If you prefer text files, all the same errors/warnings are logged in the Unity's log files: https://docs.unity3d.com/Manual/LogFiles.html To log just the script-related errors, clear the console (current log file) and re-import the script assets.

Regarding word counting in the script files, I'll look into extracting the feature from the localization tool, thanks for the suggestion!

What is the best way to solely re-import script assets? Yes, the log files are what I've been using so far—was just wondering what the best way to see solely script-related issues and stats are. Thank you so much!

Elringus
admin
Posts: 521
Joined: 11 May 2020 18:03

Re: Script Health & Word Count Checker

Post by Elringus »

Select the assets (or the parent folder) and click re-import.

Elringus
admin
Posts: 521
Joined: 11 May 2020 18:03

Re: Script Health & Word Count Checker

Post by Elringus »

Here is an example script to count words in scripts: viewtopic.php?f=8&t=425&p=1344

Post Reply