Jump to content

Recommended Posts

resourcechecker1.jpg

 

This script goes through all of the data files in the data folder and displays a list of graphics and audio used.

 

It performs a very simple resource check and copy: if it's defined in your database or in any event, it is assumed you are using it.

 

I have not written anything sophisticated such as checking whether the particular resource is ever referenced.

 

This script also does not support custom scripts that reference RTP resources; if you have custom scripts and you know they use RTP materials, you should consider copying everything related to that script over manually.

 

Download

 

Get it at Hime Works!

 

Installation

 

Place this script below Materials and above Main

 

Usage

 

Press F5 to run the resource checker. You can change this key in the configuration section.

 

After the resource checker finishes, a file called "Resource_List.txt" will be created in your project folder.

 

You can also choose to copy files over from the RTP folder directly. In the configuration section, type in the absolute path to the RTP, and enable file copying.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

Wowsers, sounds really handy! It would be pretty easy to set up a rtp and non-rtp install of games this way... Hehe... it might even be possible to have a script that automatically downloads missing files.

Edited by KilloZapit

Share this post


Link to post
Share on other sites

Ya, it should be possible since you have the file list and all.

As long as you have your data files nothing should be stopping you.

 

I was thinking of providing some more "advanced" search methods.

 

For example, when you think of a skill, it's really something that's only used by an actor or an enemy. I should probably search whether the skill is ever learned, added through events, or added through features, and then say "yes, skill is used".

 

Consequently, if a skill isn't used, do we really need the animation assigned to it? I mean, I could just check whether the animation is ever played anywhere else, and then take those two bools and say 'nope, not used'

 

But of course that opens even more risk to scripts dynamically adding stuff.

Share this post


Link to post
Share on other sites

I think the simpler and the more stuff included the better in this case. You know, if you wanted to check scripts, you could do a regex search for the cashe_* commands perhaps...

Share this post


Link to post
Share on other sites

I looked into file utils.

 

Maybe I'm just doing something wrong but half the time my simple read/write method was outperformingFileUtils.copy_file or cp

 

I think the simpler and the more stuff included the better in this case. You know, if you wanted to check scripts, you could do a regex search for the cashe_* commands perhaps...

 

Cache calls are possible, but so is this (I'm guilty of doing this as well)

 

character.animation_id = 3

 

There's just a lot of different ways to access it.

Share this post


Link to post
Share on other sites

I think the simpler and the more stuff included the better in this case. You know, if you wanted to check scripts, you could do a regex search for the cashe_* commands perhaps...

 

Cache calls are possible, but so is this (I'm guilty of doing this as well)

 

character.animation_id = 3

 

There's just a lot of different ways to access it.

 

Well, I mean for manual stuff. I think all animation graphics should be included regardless if the animation is used somewhere or not. Generally including too much do to poorly optimized databases is better then including too little do to missing something.

Share this post


Link to post
Share on other sites

I've updated the script to do a better job with filename searching (used Dir::glob)

 

For Ace it isn't an issue cause all of the audio files were ogg and all of the images with png, but for VX there were midi's as well.

 

I also realized I was actually copying the data twice accidentally (probably when I split some methods out into separate methods)

Edited by Tsukihime

Share this post


Link to post
Share on other sites

I tried it out and keep getting an error message. I'm sure it's something I'm doing.

 

My understanding is that where RTP= goes, you put in the path to the folder which contains your project. But that may be completely wrong. When I put a path to my project, I get the error message "Invalid escape character syntax" followed by RTP_Directory and the path I put it in.

 

Soooo... how am I screwing it up? ;) (And yes, it does this with the slash at the end of the directory path.)

Share this post


Link to post
Share on other sites

If you're typing \ you need to type \\

 

This applies to all \ characters in your path.

 

Just try using / it should work as well (ruby seems to do something with it...)

Edited by Tsukihime

Share this post


Link to post
Share on other sites

Actually I am pretty sure windows has supported using / as an alternate path separator for a while.

Edited by KilloZapit

Share this post


Link to post
Share on other sites

Okay, making progress, lol. I changed all the slashes to /. I made into the game and now when I push F5 my in-game message window pops up and says "RTP directory invalid or inaccesible." I do see in the folder it has made the resources.txt document, but it is empty other than the names of the folders.

Share this post


Link to post
Share on other sites

Okay, making progress, lol. I changed all the slashes to /. I made into the game and now when I push F5 my in-game message window pops up and says "RTP directory invalid or inaccesible." I do see in the folder it has made the resources.txt document, but it is empty other than the names of the folders.

 

Are you referencing the "actual" rtp? or the game's project folder? actual rtp would be something like this:-

 

C:\\Program Files\\Common Files\\Enterbrain\\RGSS3\\RPGVXAce\

 

or

 

C:/Program Files/Common Files/Enterbrain/RGSS3/RPGVXAce/

Share this post


Link to post
Share on other sites

Ummm... Is there a way to make this script check even the referenced resources in note tags? I'm currently using Pearl Falcao battle system and I think it's going to help a lot. :) Thanks!! :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted