Resource Tester
Authors: Blizzard
Version: 1.1
Type: Time-and-Space saving Utility
Key Term: Game Utility
IntroductionThis script will search through your database and your maps for resources that are being used. It will create a list of the resources used in your game.
This work is licensed under BSD License 2.0:
QuoteCopyright (c) Boris "Blizzard" Mikić
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
You may use this script for both non-commercial and commercial products without limitations as long as you fulfill the conditions presented by the above license. The "complete" way to give credit is to include the license somewhere in your product (e.g. in the credits screen), but a "simple" way is also acceptable. The "simple" way to give credit is as follows:
QuoteResource Tester licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikić
Alternatively, if your font doesn't support diacritic characters, you may use this variant:
QuoteResource Tester licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikic
In general other similar variants are allowed as long as it is clear who the creator is (e.g. "Resource Tester created by Blizzard" is acceptable). But if possible, prefer to use one of the two variants listed above.
If you fail to give credit and/or claim that this work was created by you, this may result in legal action and/or payment of damages even though this work is free of charge to use normally.
Features- finds all resources used in your game
- incredible speed: searching trough a game with over 300 maps is a matter of just seconds
- optional feature to list all actors, skills, weapons, armors, items, enemies, troops, states, animations, tilesets and common events that are never being used anywhere in the game and only log all the used data
v1.0b- fixed the typing mistake that would cause adding the skill with ID 1 into the logged skills instead of the real skill when the script was processing a "Force Action" event command
- rewritten conditions using classic syntax to avoid RGSS conditioning bug
- now beta
v1.01b- fixed glitch where changing a Battle End ME would be logged as SE
- improved coding
v1.02b- fixed bug caused by a typing mistake
v1.05b- fixed other potential bugs
v1.1- added new license
- added usage and crediting instructions
ScreenshotsN/A for this sort of script
DemoN/A
ScriptJust make a new script above main and paste this code into it.
Script Download (https://downloads.chaos-project.com/scripts/Resource Tester.txt)
InstructionsThis script is totally Plug 'n' Play: Copy paste the code in a new script slot
OVER ALL the other scripts you have, run your game and after the window closes, remove the script again. Voila! It's done!
More specific instruction inside the script in the first comment!
CompatibilityCompatible with anything, even the SDK 2.x (because it gets overriden). Will not search for script required resources.
Credits and Thanks
Author's NotesIf you use a system where you have more than one start location for the game (i.e. a separated mode with a different storyline) and want to turn DEEP_TESTING on during the testing, then just put in the starting map a dummy event with teleport commands to the starting maps of the other game modes.
If you are using DEEP_TESTING, be careful, since teleport commands that use a variable to determine the new map ID can't be tested. Do as you would with with different game modes: Create dummy events.
Auto-start and parallel process common events will be automatically logged from the beginning.
The best moment to use this script is just before you are going to compile and encrypt the game data. If you want to use it for resource cleaning, turn off DEEP_TESTING.
If you find any bugs, please report them here:
http://forum.chaos-project.com
That's it! N-Joy! =D
This is a very nice utility.
this script saved my demo 40 mb :P
Lol!! :)
I tried making a pre-loader by modding this script, caching ALL the graphics before starting the game, Gamemaker style. Just for fun. I failed, but barely, maybe I'll try some other time.
Actually it would be very easy. At the end you should have a list of all resources. Simply use that array of strings to cache them.
That's what I tried, but I was half asleep then. Problem was with seperating the Audio folders. Is it even a good idea?
maby maby not?
You don't have to cache audio, so why separate them? Everything besides ogg files is cached automatically. ogg are always loaded upon playing, you can't change that.
No, I mean to use RPG::Cache.load_bitmap(file) in the iterator, so that's not appropriate. Am I missing something?
There no other way to do it anyway. >_>
Of course, oh well. Hey, can you do use the fileutils.rb and move the RTP files into the project folder?
You actually can, but it ain't funny that way. :D
lol! I'll give it a shot either way. Now, or some other time.
*updates to-do list*
Updated. :3
This isn't much, but I still say it's an awesome script. Anything that can help reduce the overall file size of your project is amazing!!
I AM EXTREMELY SORRY TO NECROPOST LIKE THIS!
But a friend/fellow member at another forum, RPG Maker Finland, wanted to use this with VX, but it was incompatible, so he asked me to ask some one here to make a VX version for this.
So, could someone do it? It would probably help many VX users...
It shouldn't be complicated. If somebody wants to do it, go ahead. That person would mostly only need to change the data structures that are checked and a few of the variables that are checked.
You are the best after all Blizzard.. XD
(Are you going to beat XAS? MogHunter is better in ABS.)
Have you even tried the latest version of Blizz-ABS before you said that?
Quote from: Blizzard on January 17, 2011, 09:27:58 am
Have you even tried the latest version of Blizz-ABS before you said that?
Yeah, I tried it the day before I posted it. Why is the weapon graphic and the actor graphic seperate?
You should combine them. :haha:
Offtopic?
Quote from: The Niche on January 17, 2011, 06:33:44 pm
Offtopic?
Nah... answered Blizz's question..
Hey game_guy, you should inprove this thing so it can generate animation script for us.
(e.g. Moving
Sprite.new thingy)
Quote from: Storm on January 17, 2011, 06:26:22 pm
Quote from: Blizzard on January 17, 2011, 09:27:58 am
Have you even tried the latest version of Blizz-ABS before you said that?
Yeah, I tried it the day before I posted it. Why is the weapon graphic and the actor graphic seperate?
You should combine them. :haha:
No. This way you need only one graphic for each weapon and one graphic for every actor. Otherwise you would need one graphic for every combination of an actor and a weapon. With 10 actors and 100 weapons that would mean 110 graphics in Blizz-ABS or 1000 graphics in XAS. It's obvious which way is better.
Quote from: Blizzard on January 18, 2011, 03:39:29 am
Quote from: Storm on January 17, 2011, 06:26:22 pm
Quote from: Blizzard on January 17, 2011, 09:27:58 am
Have you even tried the latest version of Blizz-ABS before you said that?
Yeah, I tried it the day before I posted it. Why is the weapon graphic and the actor graphic seperate?
You should combine them. :haha:
No. This way you need only one graphic for each weapon and one graphic for every actor. Otherwise you would need one graphic for every combination of an actor and a weapon. With 10 actors and 100 weapons that would mean 110 graphics in Blizz-ABS or 1000 graphics in XAS. It's obvious which way is better.
Yeah.. XD
Anyway, what will happen if the character size is not the same?
Blizz-ABS takes care of that automatically. All you have to do is to make sure that the weapon is centered properly within the frames. Blizz-ABS will apply any weapon to any character properly as long as their positions are right. You can use a huge character sprite and a small weapon sprite or vice versa and Blizz-ABS will still work properly.
Quote from: Blizzard on January 18, 2011, 04:54:15 am
Blizz-ABS takes care of that automatically. All you have to do is to make sure that the weapon is centered properly within the frames. Blizz-ABS will apply any weapon to any character properly as long as their positions are right. You can use a huge character sprite and a small weapon sprite or vice versa and Blizz-ABS will still work properly.
Thanks Blizzard! :haha:
If I want to use graphics from XAS I need to extract them right?
If you mean the weapon graphics from the actor graphics, then yes.
I got the script is hanging error with this script, I placed the script in above all script and followed the correct order but everytime I played the game it give me that error
Thats probably due to the graphics not being updated. Blizz, you might need to include Graphics.update in a few places.
Quote from: LiTTleDRAgo on March 01, 2011, 08:20:07 pm
I got the script is hanging error with this script, I placed the script in above all script and followed the correct order but everytime I played the game it give me that error
As GG said, if the Graphics.update is not called at least once every 10 (I think) seconds the game will crash itself. This is actually an intended built in feature to prevent the application from freezing and being unresponsive, forcing you to end the process manually with Task Manager. During long iterations, such as through an entire games resources, each pixel in a large bitmap, etc, the Graphics.update is not being called. This increases the speed of the program, but can sometimes cause this error. It may even help to make sure that your CPU is not being taxed by another program when running this. The faster it can go, the less likely the error. Or you can add some Graphics.update nested in the enumerations. This will slow the speed down slightly, but it only takes a few seconds anyway (depending), what's a few more. It's not like it is being used everytime the game is ran, or at least it shouldn't be. :???:
It's 8 seconds.
I have added Graphics.update at a few places. Try adding it at some more (possibly inside loops). Keep in mind that this will slow down the process significantly. Pretty much what F0 already said.